ath79: utilize ath9k 'nvmem-cells' on ALFA Network boards
authorPiotr Dymacz <pepe2k@gmail.com>
Tue, 22 Feb 2022 15:29:27 +0000 (16:29 +0100)
committerPiotr Dymacz <pepe2k@gmail.com>
Sun, 27 Feb 2022 14:09:36 +0000 (15:09 +0100)
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@gmail.com>
target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi
target/linux/ath79/dts/ar9344_alfa-network_n5q.dts
target/linux/ath79/dts/qca9531_alfa-network_r36a.dtsi

index e12205c310e7efcc78c48d9d015dc7def0460a23..2be7cdb05d59a1d928aff8780ee4cc730220be29 100644 (file)
                                reg = <0x030000 0x010000>;
                        };
 
-                       art: partition@40000 {
+                       partition@40000 {
                                label = "art";
                                reg = <0x040000 0x010000>;
                                read-only;
+
+                               compatible = "nvmem-cells";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               cal_art_1000: cal@1000 {
+                                       reg = <0x1000 0x440>;
+                               };
+
+                               macaddr_art_0: macaddr@0 {
+                                       reg = <0x0 0x6>;
+                               };
+
+                               macaddr_art_1002: macaddr@1002 {
+                                       reg = <0x1002 0x6>;
+                               };
                        };
 
                        partition@50000 {
 &wmac {
        status = "okay";
 
-       mtd-cal-data = <&art 0x1000>;
-};
-
-&art {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_art_0: macaddr@0 {
-               reg = <0x0 0x6>;
-       };
+       nvmem-cells = <&cal_art_1000>, <&macaddr_art_1002>;
+       nvmem-cell-names = "calibration", "mac-address";
 };
index c54270a78dc2f4e0d0010b769d844e12484ca966..ca762c3bca40741166e2dcea4aa11eba65ad4d8c 100644 (file)
                                reg = <0x060000 0x010000>;
                        };
 
-                       art: partition@70000 {
+                       partition@70000 {
                                label = "art";
                                reg = <0x070000 0x010000>;
                                read-only;
+
+                               compatible = "nvmem-cells";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+
+                               cal_art_1000: cal@1000 {
+                                       reg = <0x1000 0x440>;
+                               };
+
+                               macaddr_art_0: macaddr@0 {
+                                       reg = <0x0 0x6>;
+                               };
+
+                               macaddr_art_6: macaddr@6 {
+                                       reg = <0x6 0x6>;
+                               };
+
+                               macaddr_art_1002: macaddr@1002 {
+                                       reg = <0x1002 0x6>;
+                               };
                        };
 
                        partition@80000 {
 &wmac {
        status = "okay";
 
-       mtd-cal-data = <&art 0x1000>;
-};
-
-&art {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_art_0: macaddr@0 {
-               reg = <0x0 0x6>;
-       };
-
-       macaddr_art_6: macaddr@6 {
-               reg = <0x6 0x6>;
-       };
+       nvmem-cells = <&cal_art_1000>, <&macaddr_art_1002>;
+       nvmem-cell-names = "calibration", "mac-address";
 };
index 7e89605480386ec9e5ab512825366e41fecba5e9..9704e69211b46a78a0039d6d492b50f9f6f397b9 100644 (file)
@@ -82,7 +82,7 @@
                                reg = <0x060000 0x010000>;
                        };
 
-                       art: partition@70000 {
+                       partition@70000 {
                                label = "art";
                                reg = <0x070000 0x010000>;
                                read-only;
                                #address-cells = <1>;
                                #size-cells = <1>;
 
+                               cal_art_1000: cal@1000 {
+                                       reg = <0x1000 0x440>;
+                               };
+
                                macaddr_art_1002: macaddr@1002 {
                                        reg = <0x1002 0x6>;
                                };
 &wmac {
        status = "okay";
 
-       mtd-cal-data = <&art 0x1000>;
+       nvmem-cells = <&cal_art_1000>, <&macaddr_art_1002>;
+       nvmem-cell-names = "calibration", "mac-address";
 };