[openwrt/openwrt] ath79: utilize ath9k 'nvmem-cells' on ALFA Network boards
LEDE Commits
lede-commits at lists.infradead.org
Sun Feb 27 08:03:33 PST 2022
pepe2k pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/53ac6ee552baca52f3f18fc95b793c03e1bf9581
commit 53ac6ee552baca52f3f18fc95b793c03e1bf9581
Author: Piotr Dymacz <pepe2k at gmail.com>
AuthorDate: Tue Feb 22 16:29:27 2022 +0100
ath79: utilize ath9k 'nvmem-cells' on ALFA Network boards
Drop custom 'mtd-cal-data' and switch to 'nvmem-cells' based solution
for fetching radio calibration data and its MAC address.
Signed-off-by: Piotr Dymacz <pepe2k at gmail.com>
---
.../ath79/dts/ar9331_alfa-network_ap121f.dtsi | 31 ++++++++++-------
target/linux/ath79/dts/ar9344_alfa-network_n5q.dts | 39 +++++++++++++---------
.../linux/ath79/dts/qca9531_alfa-network_r36a.dtsi | 9 +++--
3 files changed, 49 insertions(+), 30 deletions(-)
diff --git a/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi b/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi
index e12205c310..2be7cdb05d 100644
--- a/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi
+++ b/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi
@@ -96,10 +96,26 @@
reg = <0x030000 0x010000>;
};
- art: partition at 40000 {
+ partition at 40000 {
label = "art";
reg = <0x040000 0x010000>;
read-only;
+
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_1000: cal at 1000 {
+ reg = <0x1000 0x440>;
+ };
+
+ macaddr_art_0: macaddr at 0 {
+ reg = <0x0 0x6>;
+ };
+
+ macaddr_art_1002: macaddr at 1002 {
+ reg = <0x1002 0x6>;
+ };
};
partition at 50000 {
@@ -122,15 +138,6 @@
&wmac {
status = "okay";
- mtd-cal-data = <&art 0x1000>;
-};
-
-&art {
- compatible = "nvmem-cells";
- #address-cells = <1>;
- #size-cells = <1>;
-
- macaddr_art_0: macaddr at 0 {
- reg = <0x0 0x6>;
- };
+ nvmem-cells = <&cal_art_1000>, <&macaddr_art_1002>;
+ nvmem-cell-names = "calibration", "mac-address";
};
diff --git a/target/linux/ath79/dts/ar9344_alfa-network_n5q.dts b/target/linux/ath79/dts/ar9344_alfa-network_n5q.dts
index c54270a78d..ca762c3bca 100644
--- a/target/linux/ath79/dts/ar9344_alfa-network_n5q.dts
+++ b/target/linux/ath79/dts/ar9344_alfa-network_n5q.dts
@@ -131,10 +131,30 @@
reg = <0x060000 0x010000>;
};
- art: partition at 70000 {
+ partition at 70000 {
label = "art";
reg = <0x070000 0x010000>;
read-only;
+
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_art_1000: cal at 1000 {
+ reg = <0x1000 0x440>;
+ };
+
+ macaddr_art_0: macaddr at 0 {
+ reg = <0x0 0x6>;
+ };
+
+ macaddr_art_6: macaddr at 6 {
+ reg = <0x6 0x6>;
+ };
+
+ macaddr_art_1002: macaddr at 1002 {
+ reg = <0x1002 0x6>;
+ };
};
partition at 80000 {
@@ -149,19 +169,6 @@
&wmac {
status = "okay";
- mtd-cal-data = <&art 0x1000>;
-};
-
-&art {
- compatible = "nvmem-cells";
- #address-cells = <1>;
- #size-cells = <1>;
-
- macaddr_art_0: macaddr at 0 {
- reg = <0x0 0x6>;
- };
-
- macaddr_art_6: macaddr at 6 {
- reg = <0x6 0x6>;
- };
+ nvmem-cells = <&cal_art_1000>, <&macaddr_art_1002>;
+ nvmem-cell-names = "calibration", "mac-address";
};
diff --git a/target/linux/ath79/dts/qca9531_alfa-network_r36a.dtsi b/target/linux/ath79/dts/qca9531_alfa-network_r36a.dtsi
index 7e89605480..9704e69211 100644
--- a/target/linux/ath79/dts/qca9531_alfa-network_r36a.dtsi
+++ b/target/linux/ath79/dts/qca9531_alfa-network_r36a.dtsi
@@ -82,7 +82,7 @@
reg = <0x060000 0x010000>;
};
- art: partition at 70000 {
+ partition at 70000 {
label = "art";
reg = <0x070000 0x010000>;
read-only;
@@ -91,6 +91,10 @@
#address-cells = <1>;
#size-cells = <1>;
+ cal_art_1000: cal at 1000 {
+ reg = <0x1000 0x440>;
+ };
+
macaddr_art_1002: macaddr at 1002 {
reg = <0x1002 0x6>;
};
@@ -124,5 +128,6 @@
&wmac {
status = "okay";
- mtd-cal-data = <&art 0x1000>;
+ nvmem-cells = <&cal_art_1000>, <&macaddr_art_1002>;
+ nvmem-cell-names = "calibration", "mac-address";
};
More information about the lede-commits
mailing list