[openwrt/openwrt] ath79: convert OpenMesh OM5P-AN WiFis to nvmem-cells
LEDE Commits
lede-commits at lists.infradead.org
Sat Dec 17 11:41:23 PST 2022
hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/f6ca84bf02a816fa66bc656f0f7d3c233207d65c
commit f6ca84bf02a816fa66bc656f0f7d3c233207d65c
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Thu Dec 15 18:13:55 2022 +0100
ath79: convert OpenMesh OM5P-AN WiFis to nvmem-cells
Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.
Merge art into partition node.
Signed-off-by: Nick Hainke <vincent at systemli.org>
---
target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts | 38 ++++++++++++----------
.../etc/hotplug.d/firmware/10-ath9k-eeprom | 3 --
2 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts b/target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts
index 1925031e0b..6fab2b3219 100644
--- a/target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts
+++ b/target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts
@@ -148,10 +148,26 @@
reg = <0x850000 0x7a0000>;
};
- art: partition at ff0000 {
+ partition at ff0000 {
label = "ART";
reg = <0xff0000 0x010000>;
read-only;
+
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_art_0: macaddr at 0 {
+ reg = <0x0 0x6>;
+ };
+
+ calibration_art_1000: calibration at 1000 {
+ reg = <0x1000 0x440>;
+ };
+
+ calibration_art_5000: calibration at 5000 {
+ reg = <0x5000 0x440>;
+ };
};
};
};
@@ -198,9 +214,8 @@
&wmac {
status = "okay";
- mtd-cal-data = <&art 0x1000>;
- nvmem-cells = <&macaddr_art_0>;
- nvmem-cell-names = "mac-address";
+ nvmem-cells = <&macaddr_art_0>, <&calibration_art_1000>;
+ nvmem-cell-names = "mac-address", "calibration";
mac-address-increment = <2>;
};
@@ -210,19 +225,8 @@
wifi at 0,0 {
compatible = "pci168c,0030";
reg = <0x0000 0 0 0 0>;
- qca,no-eeprom;
- nvmem-cells = <&macaddr_art_0>;
- nvmem-cell-names = "mac-address";
+ nvmem-cells = <&macaddr_art_0>, <&calibration_art_5000>;
+ nvmem-cell-names = "mac-address", "calibration";
mac-address-increment = <16>;
};
};
-
-&art {
- compatible = "nvmem-cells";
- #address-cells = <1>;
- #size-cells = <1>;
-
- macaddr_art_0: macaddr at 0 {
- reg = <0x0 0x6>;
- };
-};
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 98d760fa42..aa76d1bc9f 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -112,9 +112,6 @@ case "$FIRMWARE" in
tplink,tl-wr842n-v1)
caldata_extract "art" 0x1000 0x1000
;;
- openmesh,om5p-an)
- caldata_extract "ART" 0x5000 0x440
- ;;
openmesh,om2p-v1)
caldata_extract "ART" 0x1000 0x440
;;
More information about the lede-commits
mailing list