ath79: replace "mac-address-ascii" with "mac-base"
authorRafał Miłecki <rafal@milecki.pl>
Fri, 21 Jul 2023 05:34:25 +0000 (07:34 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Fri, 28 Jul 2023 08:28:05 +0000 (10:28 +0200)
With upstream accepted "mac-base" binding there is no need for a
downstream "mac-address-ascii" workaround anymore.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
target/linux/ath79/dts/ar9331_hiwifi_hc6361.dts
target/linux/ath79/dts/ar9342_zyxel_nwa11xx.dtsi
target/linux/ath79/dts/ar9344_dlink_dir-8x5.dtsi
target/linux/ath79/dts/qca9558_dlink_dir-629-a1.dts
target/linux/ath79/dts/qca9563_dlink_dir-8x9-a1.dtsi

index 0e39be7d0bb97cb3a19daff9e0891197a19241b7..bdb678298d73eedeed4c28ec92a52feeb0ed0e03 100644 (file)
        ath9k0: wifi@0,11 {
                compatible = "pci168c,0029";
                reg = <0x8800 0 0 0 0>;
-               nvmem-cells = <&macaddr_lan>, <&cal_art_1000>;
-               nvmem-cell-names = "mac-address-ascii", "calibration";
+               nvmem-cells = <&macaddr_lan 0>, <&cal_art_1000>;
+               nvmem-cell-names = "mac-address", "calibration";
                #gpio-cells = <2>;
                gpio-controller;
        };
        ath9k1: wifi@0,12 {
                compatible = "pci168c,0029";
                reg = <0x9000 0 0 0 0>;
-               nvmem-cells = <&macaddr_wan>, <&cal_art_5000>;
-               nvmem-cell-names = "mac-address-ascii", "calibration";
-               mac-address-increment = <1>;
+               nvmem-cells = <&macaddr_wan 1>, <&cal_art_5000>;
+               nvmem-cell-names = "mac-address", "calibration";
                #gpio-cells = <2>;
                gpio-controller;
        };
                                label = "caldata";
                                reg = <0x660000 0x010000>;
                                read-only;
-                               #address-cells = <1>;
-                               #size-cells = <1>;
 
-                               cal_art_1000: cal@1000 {
-                                       reg = <0x1000 0xeb8>;
-                               };
-
-                               cal_art_5000: cal@5000 {
-                                       reg = <0x5000 0xeb8>;
-                               };
-
-                               macaddr_lan: macaddr@ffa0 {
-                                       reg = <0xffa0 0x11>;
-                               };
-
-                               macaddr_wan: macaddr@ffb4 {
-                                       reg = <0xffb4 0x11>;
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       cal_art_1000: cal@1000 {
+                                               reg = <0x1000 0xeb8>;
+                                       };
+
+                                       cal_art_5000: cal@5000 {
+                                               reg = <0x5000 0xeb8>;
+                                       };
+
+                                       macaddr_lan: macaddr@ffa0 {
+                                               compatible = "mac-base";
+                                               reg = <0xffa0 0x11>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+
+                                       macaddr_wan: macaddr@ffb4 {
+                                               compatible = "mac-base";
+                                               reg = <0xffb4 0x11>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
                                };
                        };
 
 
        pll-data = <0x11110000 0x00001099 0x00991099>;
 
-       nvmem-cells = <&macaddr_lan>;
-       nvmem-cell-names = "mac-address-ascii";
+       nvmem-cells = <&macaddr_lan 0>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <1000>;
 
        pll-data = <0x11110000 0x00001099 0x00991099>;
 
-       nvmem-cells = <&macaddr_wan>;
-       nvmem-cell-names = "mac-address-ascii";
+       nvmem-cells = <&macaddr_wan 0>;
+       nvmem-cell-names = "mac-address";
 
        phy-handle = <&phy4>;
 };
index 05d3f6730e7d2c320e74c1d5a8ad2a731d72bf9f..fa000ab90c7ced443c8e0bd032375db8bed02472 100644 (file)
                        };
 
                        bdinfo: partition@10000 {
+                               compatible = "nvmem-cells";
                                reg = <0x10000 0x10000>;
                                label = "bdinfo";
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_bdinfo_18a: macaddr@18a {
+                                               compatible = "mac-base";
+                                               reg = <0x18a 0x11>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+                               };
                        };
 
                        firmware: partition@20000 {
 &eth0 {
        status = "okay";
 
-       nvmem-cells = <&macaddr_bdinfo_18a>;
-       nvmem-cell-names = "mac-address-ascii";
-       mac-address-increment = <1>;
+       nvmem-cells = <&macaddr_bdinfo_18a 1>;
+       nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
        status = "okay";
 
-       nvmem-cells = <&macaddr_bdinfo_18a>;
-       nvmem-cell-names = "mac-address-ascii";
+       nvmem-cells = <&macaddr_bdinfo_18a 0>;
+       nvmem-cell-names = "mac-address";
 };
 
 &wmac {
        status = "okay";
        mtd-cal-data = <&art 0x1000>;
 
-       nvmem-cells = <&macaddr_bdinfo_18a>;
-       nvmem-cell-names = "mac-address-ascii";
-       mac-address-increment = <2>;
-};
-
-&bdinfo {
-       compatible = "nvmem-cells";
-       #address-cells = <1>;
-       #size-cells = <1>;
-
-       macaddr_bdinfo_18a: macaddr@18a {
-               reg = <0x18a 0x11>;
-       };
+       nvmem-cells = <&macaddr_bdinfo_18a 2>;
+       nvmem-cell-names = "mac-address";
 };
index 7cc1bba3fc416226983e88e4119d69f5a6d53d0e..a05cc2e2637630315e9a3a3b9ffd93ced2d0789e 100644 (file)
                                read-only;
 
                                compatible = "nvmem-cells";
-                               #address-cells = <1>;
-                               #size-cells = <1>;
-
-                               macaddr_mib0_4b: macaddr@4b {
-                                       reg = <0x4b 0x11>;
-                               };
 
-                               macaddr_mib0_66: macaddr@66 {
-                                       reg = <0x66 0x11>;
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_mib0_4b: macaddr@4b {
+                                               compatible = "mac-base";
+                                               reg = <0x4b 0x11>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+
+                                       macaddr_mib0_66: macaddr@66 {
+                                               compatible = "mac-base";
+                                               reg = <0x66 0x11>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
                                };
                        };
 
 
        ieee80211-freq-limit = <2402000 2482000>;
 
-       nvmem-cells = <&macaddr_mib0_4b>, <&calibration_ath9k>;
-       nvmem-cell-names = "mac-address-ascii", "calibration";
+       nvmem-cells = <&macaddr_mib0_4b 0>, <&calibration_ath9k>;
+       nvmem-cell-names = "mac-address", "calibration";
 };
index 8e21b0dd9e8ff83b2ca9c8b99dfd99a9ad395c23..8db1bf5e0c0ded71144685f10de720a0a0966376 100644 (file)
@@ -29,8 +29,8 @@
        /* default for ar934x, except for 1000M */
        pll-data = <0x06000000 0x00000101 0x00001616>;
 
-       nvmem-cells = <&macaddr_lan>;
-       nvmem-cell-names = "mac-address-ascii";
+       nvmem-cells = <&macaddr_lan 0>;
+       nvmem-cell-names = "mac-address";
 
        phy-mode = "rgmii";
        phy-handle = <&phy0>;
        ath9k: wifi@0,0 {
                compatible = "pci168c,0030";
                reg = <0x0000 0 0 0 0>;
-               /* "mac-address-ascii" currently does not work for
+               /* "mac-address" currently does not work for
                   ath9k pci devices. these below are retained for future
                   improvements. */
-               /* nvmem-cells = <&macaddr_wan>, <&cal_art_5000>;
-                  nvmem-cell-names = "mac-address-ascii", "calibration";
-                  mac-address-increment = <1>; */
-               qca,no-eeprom; /* remove this when "mac-address-ascii" works  */
+               /* nvmem-cells = <&macaddr_wan 1>, <&cal_art_5000>;
+                  nvmem-cell-names = "mac-address", "calibration";
+                */
+               qca,no-eeprom; /* remove this when "mac-address" works  */
                gpio-controller;
                #gpio-cells = <2>;
        };
                                read-only;
 
                                compatible = "nvmem-cells";
-                               #address-cells = <1>;
-                               #size-cells = <1>;
-
-                               macaddr_lan: macaddr@4 {
-                                       reg = <0x4 0x11>;
-                               };
 
-                               macaddr_wan: macaddr@18 {
-                                       reg = <0x18 0x11>;
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_lan: macaddr@4 {
+                                               compatible = "mac-base";
+                                               reg = <0x4 0x11>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+
+                                       macaddr_wan: macaddr@18 {
+                                               compatible = "mac-base";
+                                               reg = <0x18 0x11>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
                                };
                        };
 
 
 &wmac {
        status = "okay";
-       nvmem-cells = <&macaddr_lan>, <&cal_art_1000>;
-       nvmem-cell-names = "mac-address-ascii", "calibration";
+       nvmem-cells = <&macaddr_lan 0>, <&cal_art_1000>;
+       nvmem-cell-names = "mac-address", "calibration";
 };
index 41b0039e9303ae2d0dbefd0e36c0e2d419e26ec9..d012ae4c5056e6b1d4702b775f584d6a5ea823bf 100644 (file)
@@ -65,8 +65,8 @@
 
        phy-mode = "mii";
 
-       nvmem-cells = <&macaddr_mfcdata_35>;
-       nvmem-cell-names = "mac-address-ascii";
+       nvmem-cells = <&macaddr_mfcdata_35 0>;
+       nvmem-cell-names = "mac-address";
 
        fixed-link {
                speed = <100>;
                                read-only;
 
                                compatible = "nvmem-cells";
-                               #address-cells = <1>;
-                               #size-cells = <1>;
-
-                               macaddr_mfcdata_35: macaddr@35 {
-                                       reg = <0x35 0x11>;
-                               };
 
-                               macaddr_mfcdata_51: macaddr@51 {
-                                       reg = <0x51 0x11>;
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_mfcdata_35: macaddr@35 {
+                                               compatible = "mac-base";
+                                               reg = <0x35 0x11>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+
+                                       macaddr_mfcdata_51: macaddr@51 {
+                                               compatible = "mac-base";
+                                               reg = <0x51 0x11>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
                                };
                        };
 
 &wmac {
        status = "okay";
 
-       nvmem-cells = <&cal_art_1000>, <&macaddr_mfcdata_51>;
-       nvmem-cell-names = "calibration", "mac-address-ascii";
+       nvmem-cells = <&cal_art_1000>, <&macaddr_mfcdata_51 0>;
+       nvmem-cell-names = "calibration", "mac-address";
 };
index 3fd9790c4a23828b90f65b9398968da1b2b4ae76..616c29a4c1569fc4f4c98e581935af632351582f 100644 (file)
@@ -32,8 +32,8 @@
                compatible = "qcom,ath10k";
                reg = <0x0000 0 0 0 0>;
 
-               nvmem-cells = <&calibration_ath10k>, <&macaddr_devdata_94>;
-               nvmem-cell-names = "calibration", "mac-address-ascii";
+               nvmem-cells = <&calibration_ath10k>, <&macaddr_devdata_94 0>;
+               nvmem-cell-names = "calibration", "mac-address";
        };
 };
 
                                read-only;
 
                                compatible = "nvmem-cells";
-                               #address-cells = <1>;
-                               #size-cells = <1>;
 
-                               macaddr_devdata_94: macaddr@94 {
-                                       reg = <0x94 0x11>;
+                               nvmem-layout {
+                                       compatible = "fixed-layout";
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       macaddr_devdata_94: macaddr@94 {
+                                               compatible = "mac-base";
+                                               reg = <0x94 0x11>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
+
+                                       macaddr_devdata_b0: macaddr@b0 {
+                                               compatible = "mac-base";
+                                               reg = <0xb0 0x11>;
+                                               #nvmem-cell-cells = <1>;
+                                       };
                                };
 
-                               macaddr_devdata_b0: macaddr@b0 {
-                                       reg = <0xb0 0x11>;
-                               };
                        };
 
                        partition@60000 {
 &wmac {
        status = "okay";
 
-       nvmem-cells = <&calibration_ath9k>, <&macaddr_devdata_b0>;
-       nvmem-cell-names = "calibration", "mac-address-ascii";
+       nvmem-cells = <&calibration_ath9k>, <&macaddr_devdata_b0 0>;
+       nvmem-cell-names = "calibration", "mac-address";
 };