All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Lamparter <chunkeey@gmail.com>
To: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org,
	ath9k-devel@qca.qualcomm.com
Subject: [RFC PATCH v1 1/3] dt-bindings:net:wireless:qca,ath9k: add nvmem-cells for calibration data
Date: Sat, 21 Aug 2021 03:09:13 +0200	[thread overview]
Message-ID: <91e68ca7f65bee7197ed5829ef91bc526df16e8a.1629508039.git.chunkeey@gmail.com> (raw)

On most embedded ath9k devices (like range extenders,
routers, accesspoints, ...) the calibration data for
the RF/PHY is simply stored in a MTD partition named
"ART", "caldata"/"calibration", etc.

Any mtd partition is automatically registered in the
nvmem subsystem. This makes is possible to fetch the
necessary calibration directly from there at the low
cost of adding nvmem cell information via the
device-tree or via similar means.

This speeds up the driver's initialization a lot,
because the driver doesn't have to wait for userspace
to provide the data via helpers.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
---
 .../devicetree/bindings/net/wireless/qca,ath9k.txt     | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt
index aaaeeb5f935b..88b322b55dd8 100644
--- a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt
+++ b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt
@@ -34,6 +34,13 @@ Optional properties:
 			ath9k wireless chip (in this case the calibration /
 			EEPROM data will be loaded from userspace using the
 			kernel firmware loader).
+- nvmem-cells: A phandle pointing to a nvmem-cells node representing registers
+			that has information about the MAC-Address or
+			calibration data.
+			Please refer the for nvmem-cells bindings
+			Documentation/devicetree/bindings/nvmem/nvmem.yaml.
+- nvmem-cell-names: Should be "address" for the MAC address. "calibration"
+			for ART/caldata.
 
 The MAC address will be determined using the optional properties defined in
 net/ethernet.txt.
@@ -44,5 +51,8 @@ In this example, the node is defined as child node of the PCI controller:
 		compatible = "pci168c,002d";
 		reg = <0x7000 0 0 0 0x1000>;
 		qca,no-eeprom;
+
+		nvmem-cells = <&macaddr_art_c>, <&cal_art_1000>;
+		nvmem-cell-names = "mac-address", "calibration";
 	};
 };
-- 
2.33.0


             reply	other threads:[~2021-08-21  1:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-21  1:09 Christian Lamparter [this message]
2021-08-21  1:09 ` [RFC PATCH v1 2/3] ath9k: fetch calibration data via nvmem subsystem Christian Lamparter
2021-08-21  1:09 ` [RFC PATCH v1 3/3] ath9k: owl-loader: fetch pci init values through nvmem Christian Lamparter
2021-08-21  5:40 ` [RFC PATCH v1 1/3] dt-bindings:net:wireless:qca,ath9k: add nvmem-cells for calibration data Kalle Valo
2021-08-21 20:02   ` Christian Lamparter
2021-08-22  5:09     ` Kalle Valo
2021-08-24 16:51     ` Rob Herring
2021-08-24 16:51 ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=91e68ca7f65bee7197ed5829ef91bc526df16e8a.1629508039.git.chunkeey@gmail.com \
    --to=chunkeey@gmail.com \
    --cc=ath9k-devel@qca.qualcomm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.