ath79: convert boards based on ar9344_openmesh_mr600.dtsi to nvmem-cells
authorNick Hainke <vincent@systemli.org>
Thu, 15 Dec 2022 17:09:21 +0000 (18:09 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 17 Dec 2022 19:40:29 +0000 (20:40 +0100)
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@systemli.org>
target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi
target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom

index 5a6ef3b0fceb43ae63bc62e938fd084e71ab00e0..b35d699bdc1675d8b0d7fb68186246b8f72e3ddc 100644 (file)
                                reg = <0x850000 0x7a0000>;
                        };
 
-                       art: partition@ff0000 {
+                       partition@ff0000 {
                                label = "ART";
                                reg = <0xff0000 0x010000>;
                                read-only;
+
+                               compatible = "nvmem-cells";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               macaddr_art_0: macaddr@0 {
+                                       reg = <0x0 0x6>;
+                               };
+
+                               calibration_art_1000: calibration@1000 {
+                                       reg = <0x1000 0x440>;
+                               };
+
+                               calibration_art_5000: calibration@5000 {
+                                       reg = <0x5000 0x440>;
+                               };
                        };
                };
        };
 &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 = <1>;
 };
 
        ath9k: wifi@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 = <8>;
 
                gpio-controller;
                #gpio-cells = <2>;
        };
 };
-
-&art {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_art_0: macaddr@0 {
-               reg = <0x0 0x6>;
-       };
-};
index 9640baac1728e419032129cd7669068da0643fde..98d760fa42815b6003c4b394943f3b4fc725db11 100644 (file)
@@ -112,8 +112,6 @@ case "$FIRMWARE" in
        tplink,tl-wr842n-v1)
                caldata_extract "art" 0x1000 0x1000
                ;;
-       openmesh,mr600-v1|\
-       openmesh,mr600-v2|\
        openmesh,om5p-an)
                caldata_extract "ART" 0x5000 0x440
                ;;