treewide: convert mtd-mac-address-increment* to generic implementation
authorAnsuel Smith <ansuelsmth@gmail.com>
Mon, 12 Jul 2021 19:42:41 +0000 (21:42 +0200)
committerPetr Štetiar <ynezz@true.cz>
Mon, 19 Jul 2021 12:51:22 +0000 (14:51 +0200)
Rework patch 681-NET-add-mtd-mac-address-support to implement
only the function to read the mac-address from mtd.
Generalize mtd-mac-address-increment function so it can be applied
to any source of of_get_mac_address.
Rename any mtd-mac-address-increment to mac-address-increment.
Rename any mtd-mac-address-increment-byte to mac-address-increment-byte.

This should make simplify the conversion of target to nvmem implementation.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
160 files changed:
target/linux/ath79/dts/ar7161_aruba_ap-105.dts
target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi
target/linux/ath79/dts/ar7161_meraki_mr16.dts
target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts
target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts
target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi
target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi
target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts
target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi
target/linux/ath79/dts/ar7241_tplink.dtsi
target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts
target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts
target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts
target/linux/ath79/dts/ar7242_meraki_mr12.dts
target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts
target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi
target/linux/ath79/dts/ar9331_tplink_tl-wr710n.dtsi
target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi
target/linux/ath79/dts/ar9341_pcs_cr3000.dts
target/linux/ath79/dts/ar9341_tplink.dtsi
target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts
target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi
target/linux/ath79/dts/ar9344_engenius_eap600.dts
target/linux/ath79/dts/ar9344_engenius_ecb600.dts
target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi
target/linux/ath79/dts/ar9344_pcs_cap324.dts
target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts
target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts
target/linux/ath79/dts/ar9344_samsung_wam250.dts
target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts
target/linux/ath79/dts/ar9344_teltonika_rut955.dts
target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi
target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts
target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi
target/linux/ath79/dts/ar9344_winchannel_wb2000.dts
target/linux/ath79/dts/qca9531_alfa-network_n2q.dts
target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts
target/linux/ath79/dts/qca9531_alfa-network_r36a.dts
target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts
target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts
target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts
target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi
target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
target/linux/ath79/dts/qca9531_glinet_gl-x750.dts
target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi
target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts
target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts
target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts
target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi
target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi
target/linux/ath79/dts/qca9533_tplink_tl-wr802n.dtsi
target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi
target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts
target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi
target/linux/ath79/dts/qca9557_engenius_eap1200h.dts
target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts
target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts
target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi
target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts
target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts
target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi
target/linux/ath79/dts/qca9558_openmesh_mr.dtsi
target/linux/ath79/dts/qca9558_openmesh_mr900-v1.dts
target/linux/ath79/dts/qca9558_openmesh_mr900-v2.dts
target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi
target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi
target/linux/ath79/dts/qca9558_tplink_archer-d7-v1.dts
target/linux/ath79/dts/qca9558_tplink_archer-d7b-v1.dts
target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi
target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts
target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi
target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts
target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi
target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi
target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts
target/linux/ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi
target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi
target/linux/ath79/dts/tp9343_tplink_tl-wx.dtsi
target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch [new file with mode: 0644]
target/linux/generic/pending-5.10/681-NET-add-of_get_mac_address_mtd.patch [deleted file]
target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch [new file with mode: 0644]
target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch [new file with mode: 0644]
target/linux/generic/pending-5.4/681-NET-add-of_get_mac_address_mtd.patch [deleted file]
target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch [new file with mode: 0644]
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi
target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts
target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-e300.dtsi
target/linux/ramips/dts/mt7620a_cameo_810.dtsi
target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts
target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts
target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts
target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts
target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts
target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi
target/linux/ramips/dts/mt7621_adslr_g7.dts
target/linux/ramips/dts/mt7621_afoundry_ew1200.dts
target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts
target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts
target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts
target/linux/ramips/dts/mt7621_cudy_wr1300.dts
target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts
target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts
target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts
target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts
target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts
target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts
target/linux/ramips/dts/mt7621_firefly_firewrt.dts
target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts
target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts
target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts
target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts
target/linux/ramips/dts/mt7621_mqmaker_witi.dts
target/linux/ramips/dts/mt7621_mtc_wr1201.dts
target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi
target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi
target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts
target/linux/ramips/dts/mt7621_telco-electronics_x1.dts
target/linux/ramips/dts/mt7621_totolink_a7000r.dts
target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts
target/linux/ramips/dts/mt7621_tplink_re350-v1.dts
target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi
target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts
target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi
target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi
target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi
target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts
target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts
target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts
target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi
target/linux/ramips/dts/mt7628an_netgear_r6120.dts
target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts
target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts
target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts
target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts
target/linux/ramips/dts/mt7628an_tplink_re200.dtsi
target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts
target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts
target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts
target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts
target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts
target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts

index e24236324cc5c7ccd069a50861c297fd73d492a6..083db183d421322c209a0fb814780be295fd4c18 100644 (file)
        ath9k0: wifi@0,11 { /* 2.4 GHz */
                compatible = "pci168c,0029";
                mtd-mac-address = <&hwinfo 0x1c>;
-               mtd-mac-address-increment = <1>;
+               mac-address-increment = <1>;
                reg = <0x8800 0 0 0 0>;
                #gpio-cells = <2>;
                gpio-controller;
        ath9k1: wifi@0,12 { /* 5 GHz */
                compatible = "pci168c,0029";
                mtd-mac-address = <&hwinfo 0x1c>;
-               mtd-mac-address-increment = <2>;
+               mac-address-increment = <2>;
                reg = <0x9000 0 0 0 0>;
                #gpio-cells = <2>;
                gpio-controller;
index b8176dc0595c76b29b0e68d3ca3d6f2c7779f9f5..15ac14869760e487127fe284efbc389d47f8182d 100644 (file)
        status = "okay";
 
        mtd-mac-address = <&art 0x520c>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 
        phy-handle = <&phy4>;
 };
index afbf1e31f2aa7383df52d504c10f51f91a9f7141..3d11e641eb8be8e94f601df254ff4eb8a2282a37 100644 (file)
@@ -82,7 +82,7 @@
                reg = <0x8800 0 0 0 0>;
                qca,no-eeprom;
                mtd-mac-address = <&config 0x66>;
-               mtd-mac-address-increment = <1>;
+               mac-address-increment = <1>;
                #gpio-cells = <2>;
                gpio-controller;
        };
@@ -92,7 +92,7 @@
                reg = <0x9000 0 0 0 0>;
                qca,no-eeprom;
                mtd-mac-address = <&config 0x66>;
-               mtd-mac-address-increment = <2>;
+               mac-address-increment = <2>;
                #gpio-cells = <2>;
                gpio-controller;
        };
index e5d7ea57f14e2fb993cfc0e8a9585d12ab74ebcb..7f736dc005346256633cb1d87dbdd09c31f155b5 100644 (file)
        status = "okay";
 
        mtd-mac-address = <&art 0x120c>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &pcie {
index 7e1c87addec5a23cb9d41d093c377b22bf16d4ab..931032d851b722854f7e5cd2039e511dc94c0fca 100644 (file)
                compatible = "pci168c,002b";
                reg = <0x0000 0 0 0 0>;
                mtd-mac-address = <&art 0x0>;
-               mtd-mac-address-increment = <1>;
+               mac-address-increment = <1>;
                qca,no-eeprom;
                #gpio-cells = <2>;
                gpio-controller;
index 7202e1d68490a83f99db70fb70d66b09e3f354dc..91438ebf8fdbbab9e4af45ef9378f546fa4f9c72 100644 (file)
                compatible = "pci168c,002b";
                reg = <0x0000 0 0 0 0>;
                mtd-mac-address = <&art 0x0>;
-               mtd-mac-address-increment = <1>;
+               mac-address-increment = <1>;
                qca,no-eeprom;
                #gpio-cells = <2>;
                gpio-controller;
index bd6caacdf670192b0b72aac08e0c03b6ba67df29..adc6cc87b3281c7a502c8869d1664564b2336ee1 100644 (file)
 
 &eth0 {
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
 
 &eth1 {
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &ath9k {
index de2b5362270b7c2caace1f5d22fa5463b7526e6c..380f82a59f4d69412bded5185618398fd4484ca0 100644 (file)
                compatible = "pci168c,002e";
                reg = <0x0000 0 0 0 0>;
                mtd-mac-address = <&art 0x0>;
-               mtd-mac-address-increment = <1>;
+               mac-address-increment = <1>;
                qca,no-eeprom;
                #gpio-cells = <2>;
                gpio-controller;
index e704ddd9fcf610f31324cbf122745e7c47194a48..0098b0f03ed0495c9cf706d61b837e35654787fe 100644 (file)
                compatible = "pci168c,002e";
                reg = <0x0000 0 0 0 0>;
                mtd-mac-address = <&art 0x0>;
-               mtd-mac-address-increment = <1>;
+               mac-address-increment = <1>;
                qca,no-eeprom;
                #gpio-cells = <2>;
                gpio-controller;
index 6d7f7515ef05ecd75a1da9fede685dee6d864bc0..c2c81b3a872b120092a01d7ada1a317985d4cc8a 100644 (file)
        status = "okay";
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
 
 &eth1 {
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
index ca1ad270ce870ef29a5bf1fc2b72f759d4faff93..4cc6d2a8f134ec26a5ad5c24c44014806065c39a 100644 (file)
        status = "okay";
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
 
 &eth1 {
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
index 436d8c128999b8f82541b4e3afdaa5521b7db2a4..3e2a67697f17d7c62f7f53c0b49ab319d977e607 100644 (file)
@@ -78,7 +78,7 @@
                compatible = "pci168c,002a";
                reg = <0x0 0 0 0 0>;
                mtd-mac-address = <&art 0x0>;
-               mtd-mac-address-increment = <1>;
+               mac-address-increment = <1>;
                qca,no-eeprom;
                #gpio-cells = <2>;
                gpio-controller;
index be9a19317058490eaf4512548f6a17b75923d4db..9026eb997fc78a2934a7d23668558ffb9f26cdb9 100644 (file)
@@ -78,7 +78,7 @@
                compatible = "pci168c,002a";
                reg = <0x0 0 0 0 0>;
                mtd-mac-address = <&art 0x0>;
-               mtd-mac-address-increment = <(-1)>;
+               mac-address-increment = <(-1)>;
                qca,no-eeprom;
                #gpio-cells = <2>;
                gpio-controller;
index ea64b947ef9b905c2af98013a7df8a6c4321f5d0..8a19bffe6ec36f89d004082cdbd1655951e96cdf 100644 (file)
@@ -82,7 +82,7 @@
                reg = <0x0000 0 0 0 0>;
                qca,no-eeprom;
                mtd-mac-address = <&config 0x66>;
-               mtd-mac-address-increment = <1>;
+               mac-address-increment = <1>;
        };
 };
 
index 48bf4d159f4eb961cdb268daffccf6be38a14fd0..b14e70c132dafd3521f1236e7959356a55b57fd8 100644 (file)
@@ -94,8 +94,8 @@
        status = "okay";
 
        mtd-mac-address = <&art 0x1002>;
-       mtd-mac-address-increment-byte = <3>;
-       mtd-mac-address-increment = <0x40>;
+       mac-address-increment-byte = <3>;
+       mac-address-increment = <0x40>;
 };
 
 &mdio1 {
index 3f20843b0886de3b774e826b6ebc1c2905ccc90d..261657312b732ff75b836eabafb1b7dad1a69c7c 100644 (file)
@@ -25,7 +25,7 @@
        status = "okay";
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 
        gmac-config {
                device = <&gmac>;
@@ -39,7 +39,7 @@
        status = "okay";
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &pinmux {
index 7d2cbeb95c967ab605e532e6ba5bfebebf19e3c3..9207a0fde08a9860eedb9382cc38a20158f7c6d3 100644 (file)
@@ -61,7 +61,7 @@
        status = "okay";
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
 
 &usb {
index e460e4cd2370d5d2b1877bfabb47e597a9e15074..248a2b646e3e149f16a84a7d01875cff95318cc8 100644 (file)
        status = "okay";
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 
        gmac-config {
                device = <&gmac>;
        status = "okay";
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
 
 &wmac {
index 1d742a785dc05d6be4ea9d131f43f895d732765c..f822c69aeeeac15d6ae10ac8ae23061822e00421 100644 (file)
 
        phy-handle = <&swphy0>;
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
index 26410bcc11bd2bb836ca1194a16313d4ff2b68f2..0f6e0bc114a166e8fe2d051767ec4020f38a8711 100644 (file)
@@ -82,7 +82,7 @@
        phy-handle = <&swphy0>;
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
 
 &eth1 {
index fae3eec7863f7febc006439a92003003b5dd10a6..2f871943758a79b5acb68e473f01b319757bf24b 100644 (file)
                reg = <0x0000 0 0 0 0>;
 
                mtd-mac-address = <&hw_info 0x0>;
-               mtd-mac-address-increment = <2>;
+               mac-address-increment = <2>;
        };
 };
 
        status = "okay";
 
        mtd-mac-address = <&hw_info 0x0>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &nand {
index 9424e48654b6382dbac917621e712ba80743021c..b61ab75ae8e347bd3fc68a2b6131276e471fcb07 100644 (file)
        pll-data = <0x02000000 0x00000101 0x00001616>;
 
        mtd-mac-address = <&art 0x1002>;
-       mtd-mac-address-increment = <2>;
+       mac-address-increment = <2>;
 
        phy-mode = "rgmii";
        phy-handle = <&phy0>;
index c6961f636ec57e0c5faed0906daeb36213b2da08..b25e3be17f179a3a508cbb5dc5ac12ca643098a9 100644 (file)
@@ -30,7 +30,7 @@
 
 &eth0 {
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <(-2)>;
+       mac-address-increment = <(-2)>;
 };
 
 &pcie {
@@ -41,5 +41,5 @@
 
 &wmac {
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
index 13167adc4dde97f076925e46f3749925c7518a0b..6c7a99c47778e9a99450d4af44c2f9cdb3146a42 100644 (file)
 &pcie {
        wifi@0,0,0 {
                mtd-mac-address = <&art 0x0>;
-               mtd-mac-address-increment = <(-2)>;
+               mac-address-increment = <(-2)>;
        };
 };
 
 &wmac {
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
index ff532733b6671512363a93d9688bcaffbf1098c5..6a7af59147b3593af8000c4d11a7fb11ac02314b 100644 (file)
 
        mtd-cal-data = <&art 0x1000>;
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &pcie {
                reg = <0x0000 0 0 0 0>;
                qca,no-eeprom;
                mtd-mac-address = <&art 0x0>;
-               mtd-mac-address-increment = <8>;
+               mac-address-increment = <8>;
        };
 };
index 3ce8bb58fcd829a82c6d46a60695d587c64597e8..4125a40269203ac50ed71d4f956a5321e16bafd9 100644 (file)
                compatible = "168c,0030";
                reg = <0x0000 0 0 0 0>;
                mtd-mac-address = <&art 0x0>;
-               mtd-mac-address-increment = <(-2)>;
+               mac-address-increment = <(-2)>;
                mtd-cal-data = <&art 0x5000>;
                qca,no-eeprom;
                qca,disable-5ghz;
        qca,disable-2ghz;
        mtd-cal-data = <&art 0x1000>;
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
 
 &mdio0 {
index 61389be1272fe6c258dc207cb52b66ee4d0d7c76..366a0f720ad6f7a8692978928ce7c50aebb2aa5e 100644 (file)
@@ -25,7 +25,7 @@
        phy-handle = <&swphy4>;
 
        mtd-mac-address = <&pridata 0x400>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
index e232cdab24cf982a02e3ec10c398dc8b6e2d9e1a..994b842f346fe66ca7bb7e795b9daea8725191aa 100644 (file)
@@ -25,7 +25,7 @@
        phy-handle = <&swphy4>;
 
        mtd-mac-address = <&pridata 0x400>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
index 0f38ff82eede91fc76298aab58faaa3a97778ea3..bca757e77fec5105bff01046fbace6cc3aa51d86 100644 (file)
@@ -67,7 +67,7 @@
        phy-handle = <&swphy0>;
 
        mtd-mac-address = <&art 0x1002>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 
        gmac-config {
                device = <&gmac>;
index eb9606e58bf0c11502f523e5405389ce22bc591a..22c2163fecb3d60941d79b5aae401d2e926925b7 100644 (file)
        phy-handle = <&swphy4>;
 
        mtd-mac-address = <&config 0x0>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
index ba840a05d3d2380ac5c3749a49fd1f9acbec1fb9..28dbb74511940f5f9cbe9b6d4c15b62f07fb0657 100644 (file)
        phy-handle = <&swphy4>;
 
        mtd-mac-address = <&config 0x0>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
index d9c66d2745fe5d52b526acb5d7c6c025a42e460b..53fe69ae0006c536c6781ed482ca5aa188ba5e56 100644 (file)
 
        mtd-cal-data = <&art 0x1000>;
        mtd-mac-address = <&config 0x0>;
-       mtd-mac-address-increment = <2>;
+       mac-address-increment = <2>;
 };
 
 &pinmux {
index 59a06346aeea3b3a90e3c10cc2627ff78a9c8a63..e8f9672b58c97fbe992ed716a004c47be543b000 100644 (file)
@@ -58,7 +58,7 @@
 
 &ath9k {
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &wmac {
@@ -69,7 +69,7 @@
        status = "okay";
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 
        gmac-config {
                device = <&gmac>;
@@ -84,5 +84,5 @@
        phy-handle = <&swphy4>;
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <2>;
+       mac-address-increment = <2>;
 };
index 21fd079e1a06225d985f08de5853344bc908b740..f8b4d0385afe69b6401d3c28cc2863cfea0c7aac 100644 (file)
@@ -85,7 +85,7 @@
 
 &wmac {
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
 
 &mdio0 {
index 72cd5aab494dae13579070d74a80a928e5b41634..87bbd206b2ce05cb1d7c95bb315ea4d8c1ae18cb 100644 (file)
                reg = <0x0000 0 0 0 0>;
                qca,no-eeprom;
                mtd-mac-address = <&addr 0x0>;
-               mtd-mac-address-increment = <0x10>;
+               mac-address-increment = <0x10>;
                #gpio-cells = <2>;
                gpio-controller;
        };
        pll-data = <0xe000000 0x04000101 0x04001313>;
 
        mtd-mac-address = <&addr 0x0>;
-       mtd-mac-address-increment = <0x21>;
+       mac-address-increment = <0x21>;
 
        phy-mode = "rgmii-rxid";
        phy-handle = <&phy4>;
index 40eabd0488ddf5fa0c094aef48d1b993659e49d2..4f0e371c229e845acf75ec85e56bb3549ddbec9f 100644 (file)
 
 &eth0 {
        mtd-mac-address = <&art 0x1002>;
-       mtd-mac-address-increment = <(-2)>;
+       mac-address-increment = <(-2)>;
 };
 
 &eth1 {
        mtd-mac-address = <&art 0x1002>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
 
 &pcie0 {
index 42f2c9ffe58f73e708312c0847953d24d72a47e1..4288e92fcdea773c56f94c78f111144c22e0faae 100644 (file)
@@ -46,7 +46,7 @@
 
 &eth0 {
        mtd-mac-address = <&art 0x1002>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
 
 &eth1 {
index ab65369246f3b7bf4e12c353dd97167bc68764ae..1effb4485b61fa2da0d13ebcf7d3bed342b209f9 100644 (file)
@@ -51,7 +51,7 @@
 
 &eth0 {
        mtd-mac-address = <&art 0x1002>;
-       mtd-mac-address-increment = <(-2)>;
+       mac-address-increment = <(-2)>;
 };
 
 &eth1 {
@@ -60,7 +60,7 @@
        compatible = "qca,qca9530-eth", "syscon", "simple-mfd";
 
        mtd-mac-address = <&art 0x1002>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
 
 &gpio_export {
index a7ea34eeb0aa9eb7d09564fa7af8c92d9b17f02e..634d20015d92476ab6159f9b137f216e24f522f9 100644 (file)
        phy-handle = <&swphy4>;
 
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
 
        mtd-cal-data = <&art 0x1000>;
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <10>;
+       mac-address-increment = <10>;
 };
index edb6bbe5f30d719fb38ab45c6f5a031c5247f1ef..f67a8cbb728c08227bae1bc0a168eb0a54f9a438 100644 (file)
        phy-handle = <&swphy4>;
 
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
 
        mtd-cal-data = <&art 0x1000>;
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <3>;
+       mac-address-increment = <3>;
 };
index 6ae2e4eb54e9b50895da072b3d7d00acdaea6d63..44c85b62e199ce218d40b65d36b1eb40f6349ea0 100644 (file)
        mtd-cal-data = <&art 0x1000>;
 
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <10>;
+       mac-address-increment = <10>;
 };
index d0b0d88c484bf21a90efb02779a92b93a242c9f3..3b20fa51ab54b7890ed1f8bc0a0c72d75f9bd5bd 100644 (file)
 
 &eth1 {
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &wmac {
index 24dc8aaf6ac39eefda7524d36f12a20c2148a271..80623085f085f6d4cfd005e634c15e52598ddd8f 100644 (file)
 
 &eth1 {
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &wmac {
index c755e00033b0ef0ba8600354de82c16664a15328..8cb611c11d586e9773786b5f884cfd2936f8f3fc 100644 (file)
 
 &eth1 {
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &wmac {
index 7c6ed9f4fe39253aa0b3e4b148299c5e9f96cd4e..6423ae02722e39a8fcc80f6c46ef19a2aa96493c 100644 (file)
@@ -96,7 +96,7 @@
        phy-handle = <&swphy4>;
 
        mtd-mac-address = <&pridata 0x400>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
index 9a390019353f181b3c1defdbc3a9f152dd69c60e..1113c51be5ce8fbf92027f5b902ff236e67ac784 100644 (file)
        phy-handle = <&swphy4>;
 
        mtd-mac-address = <&romfile 0xf100>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
index 0e2c158260475a66180281fcd4ed0bb7b52efd98..4c730375a69e6fe5085ab21396e9917512cd1672 100644 (file)
        phy-handle = <&swphy4>;
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
index 82a73d301d64f0d430d2e447c3ac4f31440cbfaf..47d9e0846afdb140dc0aadd90128a5d2f4837cc9 100644 (file)
        phy-handle = <&swphy0>;
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
 
 &wmac {
index 69445df7415ac6414351c8b4a09fc0014dad7455..a769a81d580d3fea03f0d654daea7dd54b444728 100644 (file)
        phy-handle = <&swphy4>;
 
        mtd-mac-address = <&info 0x8>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
index 53eb08b253bb66909e86bf38c78b353e1d4738fe..e38fc9378aae674e8a286b45e5b33e4d40934caa 100644 (file)
 
        mtd-cal-data = <&art 0x1000>;
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <2>;
+       mac-address-increment = <2>;
 };
index c506c849f91b722ef1e52ac04f1e4f39cc820322..6df843f143dde2a0b72ea3d1017c427e48855ea8 100644 (file)
        compatible = "qca,qca9530-eth", "syscon", "simple-mfd";
 
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &wmac {
 
        mtd-cal-data = <&art 0x1000>;
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <2>;
+       mac-address-increment = <2>;
 };
index fb034195ec8966152545a9799ede88475c78089f..1835cbcb96e8c3c7034af4ac99fbe6a4769e868c 100644 (file)
@@ -74,7 +74,7 @@
        phy-handle = <&swphy4>;
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
index 416668679595bb742688fc85797c85cbbce7a027..df68a56d4774d01bb20ad2ac22d3445d35af9f30 100644 (file)
        phy-handle = <&swphy4>;
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
index db99f70b36d59afd41f3daa12be7f9979e1c346a..cb93afa233d73ac6f49e26037d41b64cd20f9cfa 100644 (file)
        phy-handle = <&swphy4>;
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
index ab8ac92426a8577982b1b97160b21df14b774871..27d9681eadd9235657e83f99ad8da5671a641691 100644 (file)
@@ -91,7 +91,7 @@
        phy-handle = <&swphy4>;
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
index 80298a9d8260fc72916845e1437377be2781bb9a..0b006bcffb5635e7da940fb44d6be99f8fbb8492 100644 (file)
@@ -90,5 +90,5 @@
 
        mtd-cal-data = <&art 0x1000>;
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
index 5da50ff6d9dd9e1b25804403a7cea51d14774174..9a45bd4277e999a83c27a5c957b85200f298c4c8 100644 (file)
        status = "okay";
 
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 
        phy-handle = <&phy2>;
 
index 973cb16efb75950d390301495de7c098f4555dca..3b9e25e3e8f2b42e6076476d299352cc5a2eb6f7 100644 (file)
@@ -90,5 +90,6 @@
 
        mtd-cal-data = <&art 0x1000>;
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
+       qca-no-eeprom;
 };
index e4bb6c25e550d025244dd864edcaa703950da713..81c2c0866f15e89945e119a5bc5fb7445ed31980 100644 (file)
        status = "okay";
 
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
        pll-data = <0x03000101 0x00000101 0x00001616>;
 
        fixed-link {
index 9e38a9f3923a8aef97da109db252dd239d810d3e..85617cc809997782d6b339b7c5902c8981f7fdb3 100644 (file)
@@ -59,7 +59,7 @@
        status = "okay";
 
        mtd-mac-address = <&art 0x00>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 
        phy-handle = <&phy1>;
        pll-data = <0x03000101 0x00000101 0x00001313>;
index 0a1c9cb6dd27f6d6467d2116dc7cddd26390ef06..895398e358a18bf8d2af0b32653f362a8442a11d 100644 (file)
@@ -94,7 +94,7 @@
        status = "okay";
 
        mtd-mac-address = <&art 0x00>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 
        phy-handle = <&phy1>;
        pll-data = <0x03000101 0x00000101 0x00001313>;
index 7ae33c3e04e89a622fb54f21369fcc4a9765131f..ba7f014e6a4cfd53fd2f31a0942b2771de505abb 100644 (file)
 
        mtd-cal-data = <&art 0x1000>;
        mtd-mac-address = <&art 0x00>;
-       mtd-mac-address-increment = <(-2)>;
+       mac-address-increment = <(-2)>;
 };
index f4eed22460b7b6610b943ea614e0cc0fb6316e54..fa379030e754ef2be4b39dd17b7c9ec9bd5fe882 100644 (file)
 
        mtd-cal-data = <&art 0x1000>;
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &pcie0 {
index f7889b00cc0c38ba95085d7bfd5b44dff2e25729..6704fbbe81024e286bed6e5e4b3d16fcd2a264d8 100644 (file)
@@ -20,6 +20,6 @@
                compatible = "pci168c,0033";
                reg = <0x0000 0 0 0 0>;
                mtd-mac-address = <&art 0x0>;
-               mtd-mac-address-increment = <16>;
+               mac-address-increment = <16>;
        };
 };
index 1f54d2134a3e753106cd9e3d80dfc7111c45fc0d..7221b5b09885f640d8f9742572328564a845436b 100644 (file)
@@ -20,6 +20,6 @@
                compatible = "pci168c,0033";
                reg = <0x0000 0 0 0 0>;
                mtd-mac-address = <&art 0x0>;
-               mtd-mac-address-increment = <16>;
+               mac-address-increment = <16>;
        };
 };
index 21946c42b20e19026286a3d7b4d58189a70c8b68..e1c44af3f7af5640bd3ca65dcaa9a36e258c953a 100644 (file)
        phy-handle = <&phy0>;
 
        mtd-mac-address = <&pridata 0x400>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
index 52cbb5d016c20794c5d7e580d480c736bd8fb560..3f965f5b959813bcfc76275c5ea45e047ed14e7f 100644 (file)
        status = "okay";
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
        phy-handle = <&phy0>;
        pll-data = <0x56000000 0x00000101 0x00001616>;
 
index fd1717b66885d8d1cb975bd8b98758e952efda55..90332f18746dafb7968952e2b06372be8e244ebf 100644 (file)
@@ -71,7 +71,7 @@
 
 &eth0 {
        mtd-mac-address = <&romfs 0xf100>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
index d2ef7e82a7f4df6ee4f231ccf80824b046adc5b7..754cb17918b722301cade59fa0b81ac76e19e1ee 100644 (file)
@@ -65,7 +65,7 @@
 
 &eth0 {
        mtd-mac-address = <&romfs 0xf100>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
index 6c487f15beb542fc05fc228e971eaeb00dbcb84e..b12b547a7f75d378eeb96df17b7050af70e55642 100644 (file)
 
        mtd-cal-data = <&art 0x1000>;
        mtd-mac-address = <&info 0x8>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
index 0099592dc178d39f1c96c5c4ab1da5a83e602b53..10d6e6040b0752a95c8ffafe215c3bf083436e32 100644 (file)
@@ -97,7 +97,7 @@
                compatible = "pci168c,0033";
                reg = <0x0000 0 0 0 0>;
                mtd-mac-address = <&uboot 0x1fc00>;
-               mtd-mac-address-increment = <(-2)>;
+               mac-address-increment = <(-2)>;
                qca,no-eeprom;
                #gpio-cells = <2>;
                gpio-controller;
        status = "okay";
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
        phy-handle = <&phy0>;
        pll-data = <0x56000000 0x00000101 0x00001616>;
 
 
        mtd-cal-data = <&art 0x1000>;
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
index 959d5c35fbf10ad2fdf6a24f59d74850f4465553..8f2b626bad2067a4112ab75235b72652ebc9247a 100644 (file)
        pll-data = <0x56000000 0x00000101 0x00001616>;
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
        phy-handle = <&phy0>;
 };
 
index bf744f108787499132216ae95fa53d90bb4a4a3a..66a578305d640a81561f002ec985d9667da75e08 100644 (file)
        status = "okay";
 
        mtd-mac-address = <&info 0x8>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &wmac {
index 664032936c9e03ef52bd2fa6159effb6ab622d61..673805e132b7d41ec041906bbbbfbc6ca37c1d09 100644 (file)
        phy-handle = <&swphy0>;
 
        mtd-mac-address = <&info 0x8>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 
        gmac-config {
                device = <&gmac>;
index 75d3816b727cc9d3c47a09dab470e5d11bf642ee..5c5d1620b9499a341187ce8c476a81fce9cefd2d 100644 (file)
@@ -73,7 +73,7 @@
        phy-handle = <&swphy4>;
 
        mtd-mac-address = <&info 0x8>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
index 821f125c203a30136c2e4fee996bef00c2b6ceec..6693a5cd737546cc14f8eb2262c3ced055baeccc 100644 (file)
 
        mtd-cal-data = <&art 0x1000>;
        mtd-mac-address = <&art 0x0>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
index 78eb0fe219874e8343396b8129f8026baa86fae1..044485316c37c1319cbb427a8c647d012ff98cf5 100644 (file)
        pll-data = <0x03000101 0x00000101 0x00001919>;
 
        mtd-mac-address = <&art 0x1002>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
        phy-mode = "sgmii";
        phy-handle = <&phy0>;
 };
index 5c897b16a099048c7abd0e6e498f5639f8be8ccb..c1c553e8c822b27b1152a3c4962b4cfc975db52d 100644 (file)
@@ -64,5 +64,5 @@
 
 &eth1 {
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
index 31079123c575321aeb56edddec261baeff71380d..14e10596b58bdabfa1c3fd40a2f63ed41e70fb87 100644 (file)
@@ -51,7 +51,7 @@
        phy-handle = <&swphy4>;
 
        mtd-mac-address = <&uboot 0x1fc00>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &eth1 {
diff --git a/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch b/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
new file mode 100644 (file)
index 0000000..44a6b6a
--- /dev/null
@@ -0,0 +1,134 @@
+From 6f8e5369ae054ec6c9265581d5a7e39738a5cd84 Mon Sep 17 00:00:00 2001
+From: Ansuel Smith <ansuelsmth@gmail.com>
+Date: Tue, 30 Mar 2021 13:16:38 +0200
+Subject: [PATCH 1/2] NET: add mtd-mac-address support to of_get_mac_address()
+
+Many embedded devices have information such as mac addresses stored inside mtd
+devices. This patch allows us to add a property inside a node describing a
+network interface. The new property points at a mtd partition with an offset
+where the mac address can be found.
+
+Signed-off-by: John Crispin <blogic@openwrt.org>
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+---
+ drivers/of/of_net.c | 75 ++++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 74 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
+index 6e411821583e..f072e2509cc9 100644
+--- a/drivers/of/of_net.c
++++ b/drivers/of/of_net.c
+@@ -11,6 +11,7 @@
+ #include <linux/phy.h>
+ #include <linux/export.h>
+ #include <linux/device.h>
++#include <linux/mtd/mtd.h>
+ /**
+  * of_get_phy_mode - Get phy mode for given device_node
+@@ -45,7 +46,7 @@ int of_get_phy_mode(struct device_node *np, phy_interface_t *interface)
+ }
+ EXPORT_SYMBOL_GPL(of_get_phy_mode);
+-static const void *of_get_mac_addr(struct device_node *np, const char *name)
++static void *of_get_mac_addr(struct device_node *np, const char *name)
+ {
+       struct property *pp = of_find_property(np, name, NULL);
+@@ -78,6 +79,70 @@ static const void *of_get_mac_addr_nvmem(struct device_node *np)
+       return mac;
+ }
++static const void *of_get_mac_address_mtd(struct device_node *np)
++{
++#ifdef CONFIG_MTD
++      struct device_node *mtd_np = NULL;
++      struct property *prop;
++      size_t retlen;
++      int size, ret;
++      struct mtd_info *mtd;
++      const char *part;
++      const __be32 *list;
++      phandle phandle;
++      u8 mac[ETH_ALEN];
++      void *addr;
++
++      list = of_get_property(np, "mtd-mac-address", &size);
++      if (!list || (size != (2 * sizeof(*list))))
++              return NULL;
++
++      phandle = be32_to_cpup(list++);
++      if (phandle)
++              mtd_np = of_find_node_by_phandle(phandle);
++
++      if (!mtd_np)
++              return NULL;
++
++      part = of_get_property(mtd_np, "label", NULL);
++      if (!part)
++              part = mtd_np->name;
++
++      mtd = get_mtd_device_nm(part);
++      if (IS_ERR(mtd))
++              return NULL;
++
++      ret = mtd_read(mtd, be32_to_cpup(list), 6, &retlen, mac);
++      put_mtd_device(mtd);
++
++      if (!is_valid_ether_addr(mac))
++              return NULL;
++
++      addr = of_get_mac_addr(np, "mac-address");
++      if (addr) {
++              memcpy(addr, mac, ETH_ALEN);
++              return addr;
++      }
++
++      prop = kzalloc(sizeof(*prop), GFP_KERNEL);
++      if (!prop)
++              return NULL;
++
++      prop->name = "mac-address";
++      prop->length = ETH_ALEN;
++      prop->value = kmemdup(mac, ETH_ALEN, GFP_KERNEL);
++      if (!prop->value || of_add_property(np, prop))
++              goto free;
++
++      return prop->value;
++free:
++      kfree(prop->value);
++      kfree(prop);
++#endif
++      return NULL;
++}
++
++
+ /**
+  * Search the device tree for the best MAC address to use.  'mac-address' is
+  * checked first, because that is supposed to contain to "most recent" MAC
+@@ -98,6 +163,10 @@ static const void *of_get_mac_addr_nvmem(struct device_node *np)
+  * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
+  * but is all zeros.
+  *
++ *
++ * If a mtd-mac-address property exists, try to fetch the MAC address from the
++ * specified mtd device, and store it as a 'mac-address' property
++ *
+  * Return: Will be a valid pointer on success and ERR_PTR in case of error.
+ */
+ const void *of_get_mac_address(struct device_node *np)
+@@ -116,6 +185,10 @@ const void *of_get_mac_address(struct device_node *np)
+       if (addr)
+               return addr;
++      addr = of_get_mac_address_mtd(np);
++      if (addr)
++              return addr;
++
+       return of_get_mac_addr_nvmem(np);
+ }
+ EXPORT_SYMBOL(of_get_mac_address);
+-- 
+2.30.2
+
diff --git a/target/linux/generic/pending-5.10/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/pending-5.10/681-NET-add-of_get_mac_address_mtd.patch
deleted file mode 100644 (file)
index 71fbfe9..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-From: John Crispin <blogic@openwrt.org>
-Subject: NET: add mtd-mac-address support to of_get_mac_address()
-
-Many embedded devices have information such as mac addresses stored inside mtd
-devices. This patch allows us to add a property inside a node describing a
-network interface. The new property points at a mtd partition with an offset
-where the mac address can be found.
-
-Signed-off-by: John Crispin <blogic@openwrt.org>
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
- drivers/of/of_net.c    |   37 +++++++++++++++++++++++++++++++++++++
- include/linux/of_net.h |    1 +
- 2 files changed, 38 insertions(+)
-
---- a/drivers/of/of_net.c
-+++ b/drivers/of/of_net.c
-@@ -11,6 +11,7 @@
- #include <linux/phy.h>
- #include <linux/export.h>
- #include <linux/device.h>
-+#include <linux/mtd/mtd.h>
- /**
-  * of_get_phy_mode - Get phy mode for given device_node
-@@ -45,7 +46,7 @@ int of_get_phy_mode(struct device_node *
- }
- EXPORT_SYMBOL_GPL(of_get_phy_mode);
--static const void *of_get_mac_addr(struct device_node *np, const char *name)
-+static void *of_get_mac_addr(struct device_node *np, const char *name)
- {
-       struct property *pp = of_find_property(np, name, NULL);
-@@ -78,6 +79,79 @@ static const void *of_get_mac_addr_nvmem
-       return mac;
- }
-+static const void *of_get_mac_address_mtd(struct device_node *np)
-+{
-+#ifdef CONFIG_MTD
-+      struct device_node *mtd_np = NULL;
-+      struct property *prop;
-+      size_t retlen;
-+      int size, ret;
-+      struct mtd_info *mtd;
-+      const char *part;
-+      const __be32 *list;
-+      phandle phandle;
-+      u32 mac_inc = 0;
-+      u8 mac[ETH_ALEN];
-+      void *addr;
-+      u32 inc_idx;
-+
-+      list = of_get_property(np, "mtd-mac-address", &size);
-+      if (!list || (size != (2 * sizeof(*list))))
-+              return NULL;
-+
-+      phandle = be32_to_cpup(list++);
-+      if (phandle)
-+              mtd_np = of_find_node_by_phandle(phandle);
-+
-+      if (!mtd_np)
-+              return NULL;
-+
-+      part = of_get_property(mtd_np, "label", NULL);
-+      if (!part)
-+              part = mtd_np->name;
-+
-+      mtd = get_mtd_device_nm(part);
-+      if (IS_ERR(mtd))
-+              return NULL;
-+
-+      ret = mtd_read(mtd, be32_to_cpup(list), 6, &retlen, mac);
-+      put_mtd_device(mtd);
-+
-+      if (of_property_read_u32(np, "mtd-mac-address-increment-byte", &inc_idx))
-+              inc_idx = 5;
-+      if (inc_idx > 5)
-+              return NULL;
-+
-+      if (!of_property_read_u32(np, "mtd-mac-address-increment", &mac_inc))
-+              mac[inc_idx] += mac_inc;
-+
-+      if (!is_valid_ether_addr(mac))
-+              return NULL;
-+
-+      addr = of_get_mac_addr(np, "mac-address");
-+      if (addr) {
-+              memcpy(addr, mac, ETH_ALEN);
-+              return addr;
-+      }
-+
-+      prop = kzalloc(sizeof(*prop), GFP_KERNEL);
-+      if (!prop)
-+              return NULL;
-+
-+      prop->name = "mac-address";
-+      prop->length = ETH_ALEN;
-+      prop->value = kmemdup(mac, ETH_ALEN, GFP_KERNEL);
-+      if (!prop->value || of_add_property(np, prop))
-+              goto free;
-+
-+      return prop->value;
-+free:
-+      kfree(prop->value);
-+      kfree(prop);
-+#endif
-+      return NULL;
-+}
-+
- /**
-  * Search the device tree for the best MAC address to use.  'mac-address' is
-  * checked first, because that is supposed to contain to "most recent" MAC
-@@ -98,12 +172,20 @@ static const void *of_get_mac_addr_nvmem
-  * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
-  * but is all zeros.
-  *
-+ *
-+ * If a mtd-mac-address property exists, try to fetch the MAC address from the
-+ * specified mtd device, and store it as a 'mac-address' property
-+ *
-  * Return: Will be a valid pointer on success and ERR_PTR in case of error.
- */
- const void *of_get_mac_address(struct device_node *np)
- {
-       const void *addr;
-+      addr = of_get_mac_address_mtd(np);
-+      if (addr)
-+              return addr;
-+
-       addr = of_get_mac_addr(np, "mac-address");
-       if (addr)
-               return addr;
diff --git a/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch b/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch
new file mode 100644 (file)
index 0000000..1c08e23
--- /dev/null
@@ -0,0 +1,133 @@
+From 639dba857aa554f2a78572adc4cf3c32de9ec2e2 Mon Sep 17 00:00:00 2001
+From: Ansuel Smith <ansuelsmth@gmail.com>
+Date: Tue, 30 Mar 2021 18:21:14 +0200
+Subject: [PATCH 2/2] of_net: add mac-address-increment support
+
+Lots of embedded devices use the mac-address of other interface
+extracted from nvmem cells and increments it by one or two. Add two
+bindings to integrate this and directly use the right mac-address for
+the interface. Some example are some routers that use the gmac
+mac-address stored in the art partition and increments it by one for the
+wifi. mac-address-increment-byte bindings is used to tell what byte of
+the mac-address has to be increased (if not defined the last byte is
+increased) and mac-address-increment tells how much the byte decided
+early has to be increased.
+
+Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+---
+ drivers/of/of_net.c | 59 ++++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 45 insertions(+), 14 deletions(-)
+
+diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
+index f072e2509cc9..0dbd1f7ef396 100644
+--- a/drivers/of/of_net.c
++++ b/drivers/of/of_net.c
+@@ -55,31 +55,36 @@ static void *of_get_mac_addr(struct device_node *np, const char *name)
+       return NULL;
+ }
+-static const void *of_get_mac_addr_nvmem(struct device_node *np)
++static void *of_get_mac_addr_nvmem(struct device_node *np, int *err)
+ {
+       int ret;
+-      const void *mac;
++      void *mac;
+       u8 nvmem_mac[ETH_ALEN];
+       struct platform_device *pdev = of_find_device_by_node(np);
+-      if (!pdev)
+-              return ERR_PTR(-ENODEV);
++      if (!pdev) {
++              *err = -ENODEV;
++              return NULL;
++      }
+       ret = nvmem_get_mac_address(&pdev->dev, &nvmem_mac);
+       if (ret) {
+               put_device(&pdev->dev);
+-              return ERR_PTR(ret);
++              *err = ret;
++              return NULL;
+       }
+       mac = devm_kmemdup(&pdev->dev, nvmem_mac, ETH_ALEN, GFP_KERNEL);
+       put_device(&pdev->dev);
+-      if (!mac)
+-              return ERR_PTR(-ENOMEM);
++      if (!mac) {
++              *err = -ENOMEM;
++              return NULL;
++      }
+       return mac;
+ }
+-static const void *of_get_mac_address_mtd(struct device_node *np)
++static void *of_get_mac_address_mtd(struct device_node *np)
+ {
+ #ifdef CONFIG_MTD
+       struct device_node *mtd_np = NULL;
+@@ -167,28 +172,54 @@ static const void *of_get_mac_address_mtd(struct device_node *np)
+  * If a mtd-mac-address property exists, try to fetch the MAC address from the
+  * specified mtd device, and store it as a 'mac-address' property
+  *
++ * DT can tell the system to increment the mac-address after is extracted by
++ * using:
++ * - mac-address-increment-byte to decide what byte to increase
++ *   (if not defined is increased the last byte)
++ * - mac-address-increment to decide how much to increase. The value will
++ *   not overflow to other bytes if the increment is over 255.
++ *   (example 00:01:02:03:04:ff + 1 == 00:01:02:03:04:00)
++ *
+  * Return: Will be a valid pointer on success and ERR_PTR in case of error.
+ */
+ const void *of_get_mac_address(struct device_node *np)
+ {
+-      const void *addr;
++      u32 inc_idx, mac_inc;
++      int ret = 0;
++      u8 *addr;
++
++      /* Check first if the increment byte is present and valid.
++       * If not set assume to increment the last byte if found.
++       */
++      if (of_property_read_u32(np, "mac-address-increment-byte", &inc_idx))
++              inc_idx = 5;
++      if (inc_idx < 3 || inc_idx > 5)
++              return ERR_PTR(-EINVAL);
+       addr = of_get_mac_addr(np, "mac-address");
+       if (addr)
+-              return addr;
++              goto found;
+       addr = of_get_mac_addr(np, "local-mac-address");
+       if (addr)
+-              return addr;
++              goto found;
+       addr = of_get_mac_addr(np, "address");
+       if (addr)
+-              return addr;
++              goto found;
+       addr = of_get_mac_address_mtd(np);
+       if (addr)
+-              return addr;
++              goto found;
++
++      addr = of_get_mac_addr_nvmem(np, &ret);
++      if (ret)
++              return ERR_PTR(ret);
++
++found:
++      if (!of_property_read_u32(np, "mac-address-increment", &mac_inc))
++              addr[inc_idx] += mac_inc;
+-      return of_get_mac_addr_nvmem(np);
++      return addr;
+ }
+ EXPORT_SYMBOL(of_get_mac_address);
+-- 
+2.30.2
+
diff --git a/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch b/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
new file mode 100644 (file)
index 0000000..44a6b6a
--- /dev/null
@@ -0,0 +1,134 @@
+From 6f8e5369ae054ec6c9265581d5a7e39738a5cd84 Mon Sep 17 00:00:00 2001
+From: Ansuel Smith <ansuelsmth@gmail.com>
+Date: Tue, 30 Mar 2021 13:16:38 +0200
+Subject: [PATCH 1/2] NET: add mtd-mac-address support to of_get_mac_address()
+
+Many embedded devices have information such as mac addresses stored inside mtd
+devices. This patch allows us to add a property inside a node describing a
+network interface. The new property points at a mtd partition with an offset
+where the mac address can be found.
+
+Signed-off-by: John Crispin <blogic@openwrt.org>
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+---
+ drivers/of/of_net.c | 75 ++++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 74 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
+index 6e411821583e..f072e2509cc9 100644
+--- a/drivers/of/of_net.c
++++ b/drivers/of/of_net.c
+@@ -11,6 +11,7 @@
+ #include <linux/phy.h>
+ #include <linux/export.h>
+ #include <linux/device.h>
++#include <linux/mtd/mtd.h>
+ /**
+  * of_get_phy_mode - Get phy mode for given device_node
+@@ -45,7 +46,7 @@ int of_get_phy_mode(struct device_node *np, phy_interface_t *interface)
+ }
+ EXPORT_SYMBOL_GPL(of_get_phy_mode);
+-static const void *of_get_mac_addr(struct device_node *np, const char *name)
++static void *of_get_mac_addr(struct device_node *np, const char *name)
+ {
+       struct property *pp = of_find_property(np, name, NULL);
+@@ -78,6 +79,70 @@ static const void *of_get_mac_addr_nvmem(struct device_node *np)
+       return mac;
+ }
++static const void *of_get_mac_address_mtd(struct device_node *np)
++{
++#ifdef CONFIG_MTD
++      struct device_node *mtd_np = NULL;
++      struct property *prop;
++      size_t retlen;
++      int size, ret;
++      struct mtd_info *mtd;
++      const char *part;
++      const __be32 *list;
++      phandle phandle;
++      u8 mac[ETH_ALEN];
++      void *addr;
++
++      list = of_get_property(np, "mtd-mac-address", &size);
++      if (!list || (size != (2 * sizeof(*list))))
++              return NULL;
++
++      phandle = be32_to_cpup(list++);
++      if (phandle)
++              mtd_np = of_find_node_by_phandle(phandle);
++
++      if (!mtd_np)
++              return NULL;
++
++      part = of_get_property(mtd_np, "label", NULL);
++      if (!part)
++              part = mtd_np->name;
++
++      mtd = get_mtd_device_nm(part);
++      if (IS_ERR(mtd))
++              return NULL;
++
++      ret = mtd_read(mtd, be32_to_cpup(list), 6, &retlen, mac);
++      put_mtd_device(mtd);
++
++      if (!is_valid_ether_addr(mac))
++              return NULL;
++
++      addr = of_get_mac_addr(np, "mac-address");
++      if (addr) {
++              memcpy(addr, mac, ETH_ALEN);
++              return addr;
++      }
++
++      prop = kzalloc(sizeof(*prop), GFP_KERNEL);
++      if (!prop)
++              return NULL;
++
++      prop->name = "mac-address";
++      prop->length = ETH_ALEN;
++      prop->value = kmemdup(mac, ETH_ALEN, GFP_KERNEL);
++      if (!prop->value || of_add_property(np, prop))
++              goto free;
++
++      return prop->value;
++free:
++      kfree(prop->value);
++      kfree(prop);
++#endif
++      return NULL;
++}
++
++
+ /**
+  * Search the device tree for the best MAC address to use.  'mac-address' is
+  * checked first, because that is supposed to contain to "most recent" MAC
+@@ -98,6 +163,10 @@ static const void *of_get_mac_addr_nvmem(struct device_node *np)
+  * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
+  * but is all zeros.
+  *
++ *
++ * If a mtd-mac-address property exists, try to fetch the MAC address from the
++ * specified mtd device, and store it as a 'mac-address' property
++ *
+  * Return: Will be a valid pointer on success and ERR_PTR in case of error.
+ */
+ const void *of_get_mac_address(struct device_node *np)
+@@ -116,6 +185,10 @@ const void *of_get_mac_address(struct device_node *np)
+       if (addr)
+               return addr;
++      addr = of_get_mac_address_mtd(np);
++      if (addr)
++              return addr;
++
+       return of_get_mac_addr_nvmem(np);
+ }
+ EXPORT_SYMBOL(of_get_mac_address);
+-- 
+2.30.2
+
diff --git a/target/linux/generic/pending-5.4/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/pending-5.4/681-NET-add-of_get_mac_address_mtd.patch
deleted file mode 100644 (file)
index b02febe..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-From: John Crispin <blogic@openwrt.org>
-Subject: NET: add mtd-mac-address support to of_get_mac_address()
-
-Many embedded devices have information such as mac addresses stored inside mtd
-devices. This patch allows us to add a property inside a node describing a
-network interface. The new property points at a mtd partition with an offset
-where the mac address can be found.
-
-Signed-off-by: John Crispin <blogic@openwrt.org>
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
- drivers/of/of_net.c    |   37 +++++++++++++++++++++++++++++++++++++
- include/linux/of_net.h |    1 +
- 2 files changed, 38 insertions(+)
-
---- a/drivers/of/of_net.c
-+++ b/drivers/of/of_net.c
-@@ -11,6 +11,7 @@
- #include <linux/phy.h>
- #include <linux/export.h>
- #include <linux/device.h>
-+#include <linux/mtd/mtd.h>
- /**
-  * of_get_phy_mode - Get phy mode for given device_node
-@@ -39,7 +40,7 @@ int of_get_phy_mode(struct device_node *
- }
- EXPORT_SYMBOL_GPL(of_get_phy_mode);
--static const void *of_get_mac_addr(struct device_node *np, const char *name)
-+static void *of_get_mac_addr(struct device_node *np, const char *name)
- {
-       struct property *pp = of_find_property(np, name, NULL);
-@@ -72,6 +73,79 @@ static const void *of_get_mac_addr_nvmem
-       return mac;
- }
-+static const void *of_get_mac_address_mtd(struct device_node *np)
-+{
-+#ifdef CONFIG_MTD
-+      struct device_node *mtd_np = NULL;
-+      struct property *prop;
-+      size_t retlen;
-+      int size, ret;
-+      struct mtd_info *mtd;
-+      const char *part;
-+      const __be32 *list;
-+      phandle phandle;
-+      u32 mac_inc = 0;
-+      u8 mac[ETH_ALEN];
-+      void *addr;
-+      u32 inc_idx;
-+
-+      list = of_get_property(np, "mtd-mac-address", &size);
-+      if (!list || (size != (2 * sizeof(*list))))
-+              return NULL;
-+
-+      phandle = be32_to_cpup(list++);
-+      if (phandle)
-+              mtd_np = of_find_node_by_phandle(phandle);
-+
-+      if (!mtd_np)
-+              return NULL;
-+
-+      part = of_get_property(mtd_np, "label", NULL);
-+      if (!part)
-+              part = mtd_np->name;
-+
-+      mtd = get_mtd_device_nm(part);
-+      if (IS_ERR(mtd))
-+              return NULL;
-+
-+      ret = mtd_read(mtd, be32_to_cpup(list), 6, &retlen, mac);
-+      put_mtd_device(mtd);
-+
-+      if (of_property_read_u32(np, "mtd-mac-address-increment-byte", &inc_idx))
-+              inc_idx = 5;
-+      if (inc_idx > 5)
-+              return NULL;
-+
-+      if (!of_property_read_u32(np, "mtd-mac-address-increment", &mac_inc))
-+              mac[inc_idx] += mac_inc;
-+
-+      if (!is_valid_ether_addr(mac))
-+              return NULL;
-+
-+      addr = of_get_mac_addr(np, "mac-address");
-+      if (addr) {
-+              memcpy(addr, mac, ETH_ALEN);
-+              return addr;
-+      }
-+
-+      prop = kzalloc(sizeof(*prop), GFP_KERNEL);
-+      if (!prop)
-+              return NULL;
-+
-+      prop->name = "mac-address";
-+      prop->length = ETH_ALEN;
-+      prop->value = kmemdup(mac, ETH_ALEN, GFP_KERNEL);
-+      if (!prop->value || of_add_property(np, prop))
-+              goto free;
-+
-+      return prop->value;
-+free:
-+      kfree(prop->value);
-+      kfree(prop);
-+#endif
-+      return NULL;
-+}
-+
- /**
-  * Search the device tree for the best MAC address to use.  'mac-address' is
-  * checked first, because that is supposed to contain to "most recent" MAC
-@@ -92,12 +166,20 @@ static const void *of_get_mac_addr_nvmem
-  * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
-  * but is all zeros.
-  *
-+ *
-+ * If a mtd-mac-address property exists, try to fetch the MAC address from the
-+ * specified mtd device, and store it as a 'mac-address' property
-+ *
-  * Return: Will be a valid pointer on success and ERR_PTR in case of error.
- */
- const void *of_get_mac_address(struct device_node *np)
- {
-       const void *addr;
-+      addr = of_get_mac_address_mtd(np);
-+      if (addr)
-+              return addr;
-+
-       addr = of_get_mac_addr(np, "mac-address");
-       if (addr)
-               return addr;
diff --git a/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch b/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch
new file mode 100644 (file)
index 0000000..1c08e23
--- /dev/null
@@ -0,0 +1,133 @@
+From 639dba857aa554f2a78572adc4cf3c32de9ec2e2 Mon Sep 17 00:00:00 2001
+From: Ansuel Smith <ansuelsmth@gmail.com>
+Date: Tue, 30 Mar 2021 18:21:14 +0200
+Subject: [PATCH 2/2] of_net: add mac-address-increment support
+
+Lots of embedded devices use the mac-address of other interface
+extracted from nvmem cells and increments it by one or two. Add two
+bindings to integrate this and directly use the right mac-address for
+the interface. Some example are some routers that use the gmac
+mac-address stored in the art partition and increments it by one for the
+wifi. mac-address-increment-byte bindings is used to tell what byte of
+the mac-address has to be increased (if not defined the last byte is
+increased) and mac-address-increment tells how much the byte decided
+early has to be increased.
+
+Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+---
+ drivers/of/of_net.c | 59 ++++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 45 insertions(+), 14 deletions(-)
+
+diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
+index f072e2509cc9..0dbd1f7ef396 100644
+--- a/drivers/of/of_net.c
++++ b/drivers/of/of_net.c
+@@ -55,31 +55,36 @@ static void *of_get_mac_addr(struct device_node *np, const char *name)
+       return NULL;
+ }
+-static const void *of_get_mac_addr_nvmem(struct device_node *np)
++static void *of_get_mac_addr_nvmem(struct device_node *np, int *err)
+ {
+       int ret;
+-      const void *mac;
++      void *mac;
+       u8 nvmem_mac[ETH_ALEN];
+       struct platform_device *pdev = of_find_device_by_node(np);
+-      if (!pdev)
+-              return ERR_PTR(-ENODEV);
++      if (!pdev) {
++              *err = -ENODEV;
++              return NULL;
++      }
+       ret = nvmem_get_mac_address(&pdev->dev, &nvmem_mac);
+       if (ret) {
+               put_device(&pdev->dev);
+-              return ERR_PTR(ret);
++              *err = ret;
++              return NULL;
+       }
+       mac = devm_kmemdup(&pdev->dev, nvmem_mac, ETH_ALEN, GFP_KERNEL);
+       put_device(&pdev->dev);
+-      if (!mac)
+-              return ERR_PTR(-ENOMEM);
++      if (!mac) {
++              *err = -ENOMEM;
++              return NULL;
++      }
+       return mac;
+ }
+-static const void *of_get_mac_address_mtd(struct device_node *np)
++static void *of_get_mac_address_mtd(struct device_node *np)
+ {
+ #ifdef CONFIG_MTD
+       struct device_node *mtd_np = NULL;
+@@ -167,28 +172,54 @@ static const void *of_get_mac_address_mtd(struct device_node *np)
+  * If a mtd-mac-address property exists, try to fetch the MAC address from the
+  * specified mtd device, and store it as a 'mac-address' property
+  *
++ * DT can tell the system to increment the mac-address after is extracted by
++ * using:
++ * - mac-address-increment-byte to decide what byte to increase
++ *   (if not defined is increased the last byte)
++ * - mac-address-increment to decide how much to increase. The value will
++ *   not overflow to other bytes if the increment is over 255.
++ *   (example 00:01:02:03:04:ff + 1 == 00:01:02:03:04:00)
++ *
+  * Return: Will be a valid pointer on success and ERR_PTR in case of error.
+ */
+ const void *of_get_mac_address(struct device_node *np)
+ {
+-      const void *addr;
++      u32 inc_idx, mac_inc;
++      int ret = 0;
++      u8 *addr;
++
++      /* Check first if the increment byte is present and valid.
++       * If not set assume to increment the last byte if found.
++       */
++      if (of_property_read_u32(np, "mac-address-increment-byte", &inc_idx))
++              inc_idx = 5;
++      if (inc_idx < 3 || inc_idx > 5)
++              return ERR_PTR(-EINVAL);
+       addr = of_get_mac_addr(np, "mac-address");
+       if (addr)
+-              return addr;
++              goto found;
+       addr = of_get_mac_addr(np, "local-mac-address");
+       if (addr)
+-              return addr;
++              goto found;
+       addr = of_get_mac_addr(np, "address");
+       if (addr)
+-              return addr;
++              goto found;
+       addr = of_get_mac_address_mtd(np);
+       if (addr)
+-              return addr;
++              goto found;
++
++      addr = of_get_mac_addr_nvmem(np, &ret);
++      if (ret)
++              return ERR_PTR(ret);
++
++found:
++      if (!of_property_read_u32(np, "mac-address-increment", &mac_inc))
++              addr[inc_idx] += mac_inc;
+-      return of_get_mac_addr_nvmem(np);
++      return addr;
+ }
+ EXPORT_SYMBOL(of_get_mac_address);
+-- 
+2.30.2
+
index af0efb256564a361d5835697c839581c0096ca07..bbecdb7f0c1e0a24aad3dc00398d34995592d44b 100644 (file)
        pinctrl-names = "default";
 
        mtd-mac-address = <&defaultmac 0x8>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 
        fixed-link {
                speed = <1000>;
index 893addf240909b36c925158acb2f228630be058c..79b22ff0c361401dcc2d1222386fe37b93f75999 100644 (file)
        pinctrl-names = "default";
 
        mtd-mac-address = <&defaultmac 0>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 
        fixed-link {
                speed = <1000>;
index 55291cd531e24a8173140fae849d200ae7dcc01b..94442351730ec3fd3b6030d1722566eb763baa1f 100644 (file)
                        reg = <0x00010000 0 0 0 0>;
 
                        mtd-mac-address = <&art 6>;
-                       mtd-mac-address-increment = <(1)>;
+                       mac-address-increment = <(1)>;
                };
        };
 };
                        reg = <0x00010000 0 0 0 0>;
 
                        mtd-mac-address = <&art 6>;
-                       mtd-mac-address-increment = <(2)>;
+                       mac-address-increment = <(2)>;
                };
        };
 };
index 4a4a06514f480799a5a5bf9eca8481059a03e1da..19cb54db6ba8e7c1b206d0ef260ae1cc0a686040 100644 (file)
@@ -97,7 +97,7 @@
        phy-mode = "rmii";
        phy-handle = <&phy0>;
        mtd-mac-address = <&ath9k_cal 0xa91>;
-       mtd-mac-address-increment = <(-2)>;
+       mac-address-increment = <(-2)>;
 
        mdio-bus {
                #address-cells = <1>;
index 5f38936577ef6ddf88f6a3be266c7efaec1e5b42..4d7986f0a579b7fa7f0d17b3393ac25ae01c39ad 100644 (file)
@@ -98,7 +98,7 @@
 &gsw {
        phy-mode = "mii";
        mtd-mac-address = <&ath9k_cal 0xa91>;
-       mtd-mac-address-increment = <(-2)>;
+       mac-address-increment = <(-2)>;
 };
 
 &gpio {
index 87954fef02f61b9e20dc551b1e3b5c619ea0ffcd..f0b288c6ba97fd0a792e17559f2b651826d9a2d8 100644 (file)
                ralink,mtd-eeprom = <&boardconfig 0x410>;
                ralink,mtd-eeprom-swap;
                mtd-mac-address = <&boardconfig 0x16>;
-               mtd-mac-address-increment = <1>;
+               mac-address-increment = <1>;
        };
 };
index f2592961cbf8786cf74b11ffa02790a40bad2e50..ca0cf107dd092bc1e98f949d91eb90b90efdee1f 100644 (file)
                reg = <0x7000 0 0 0 0>;
                qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
                mtd-mac-address = <&boardconfig 0x16>;
-               mtd-mac-address-increment = <1>;
+               mac-address-increment = <1>;
        };
 };
 
index 5986279e6ed3e7fe178daac30b92fa3136a9bbf6..3b9f6c246188c6240a5229acd6809a3286d0dbad 100644 (file)
                reg = <0x7000 0 0 0 0>;
                qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
                mtd-mac-address = <&art 0x16>;
-               mtd-mac-address-increment = <1>;
+               mac-address-increment = <1>;
        };
 };
 
index 8faf335c02bed21f17c35e7afc4da09d0bed616f..7a277892bbbab1482a92fa42ad3201c0242c7940 100644 (file)
                ralink,mtd-eeprom = <&boardconfig 0x410>;
                ralink,mtd-eeprom-swap;
                mtd-mac-address = <&boardconfig 0x16>;
-               mtd-mac-address-increment = <1>;
+               mac-address-increment = <1>;
        };
 };
 
index 7c3ab53d73261148ae58e72e37fde9b54b751e25..c8dd817b6c8d04b3efda131f8529ceefc4e7eb3a 100644 (file)
 
 &eth0 {
        mtd-mac-address = <&boardconfig 0x16>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &gphy0 {
                ralink,mtd-eeprom = <&boardconfig 0x410>;
                ralink,mtd-eeprom-swap;
                mtd-mac-address = <&boardconfig 0x16>;
-               mtd-mac-address-increment = <1>;
+               mac-address-increment = <1>;
        };
 };
 
index dafff26f1b87991814d7fb8e5c68e152b8a71a15..d91dc74e2f0a556ef730105d2062daa2f15fc286 100644 (file)
@@ -82,7 +82,7 @@
 
 &eth0 {
        mtd-mac-address = <&urlader 0xa91>;
-       mtd-mac-address-increment = <(-2)>;
+       mac-address-increment = <(-2)>;
 };
 
 &gphy0 {
index 10389e539fb5c71409548778689d1d8fc43a69e6..77494108160158c1ab511f28bd3c2f0db6127c8c 100644 (file)
                        qca,no-eeprom;
                        qca,disable-5ghz;
                        mtd-mac-address = <&ath9k_cal 0xf100>;
-                       mtd-mac-address-increment = <2>;
+                       mac-address-increment = <2>;
                };
        };
 };
index d3d89078602a32fbe78b958b82450899b04848dc..67edc01d90bebfc25e605a3b3f8057f3387feb5a 100644 (file)
                        big-endian;
                        ieee80211-freq-limit = <5000000 6000000>;
                        mtd-mac-address = <&romfile 0xf100>;
-                       mtd-mac-address-increment = <2>;
+                       mac-address-increment = <2>;
                };
        };
 };
index 3ca132d0c03087a6eb5e301a18add01c6dd21622..10bb353683a53bacc90907b06d152e86e7e9ec67 100644 (file)
                        phy-handle = <&phy1>;
                        phy-connection-type = "rgmii-id";
                        mtd-mac-address = <&hwinfo 0>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
 
                gpio0: gpio-controller@fc00 {
index 7d4c7f0de9d2e57ace4e26ea32a844bbe7c11943..7a4d2e66838d4a26f239c0467af108a60a669ea4 100644 (file)
                        phy-mode = "sgmii";
                        phy-handle = <&phy5>;
                        mtd-mac-address = <&eeprom 0>;
-                       mtd-mac-address-increment = <(1)>;
+                       mac-address-increment = <(1)>;
                };
 
                ethernet@2 {
                        phy-mode = "sgmii";
                        phy-handle = <&phy6>;
                        mtd-mac-address = <&eeprom 0>;
-                       mtd-mac-address-increment = <(2)>;
+                       mac-address-increment = <(2)>;
                };
 
                ethernet@3 {
                        phy-mode = "sgmii";
                        phy-handle = <&phy7>;
                        mtd-mac-address = <&eeprom 0>;
-                       mtd-mac-address-increment = <(3)>;
+                       mac-address-increment = <(3)>;
                };
        };
 };
index 70407449db667a9d930b7b900f88205cec9c56e7..b1a50bb7116cdf45c6c7a72c6bee09c371fd295f 100644 (file)
                mediatek,mtd-eeprom = <&factory 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
                mtd-mac-address = <&factory 0x28>;
-               mtd-mac-address-increment = <2>;
+               mac-address-increment = <2>;
        };
 };
index 774d90c79d41fb0692281a8b82160500abb6201f..5b8d883dd591c330d6ecd805644960a2c60043a3 100644 (file)
        mt76x0e@0,0 {
                reg = <0x0000 0 0 0 0>;
                mtd-mac-address = <&config 0xe490>;
-               mtd-mac-address-increment = <(2)>;
+               mac-address-increment = <(2)>;
                mediatek,mtd-eeprom = <&config 0xe05d>;
        };
 };
index b86ab1449b680a30b39215cbdfdb1dfce3dded29..2e755b66205d966eff811ab39af511442f39c5dc 100644 (file)
        wifi@0,0 {
                reg = <0x0000 0 0 0 0>;
                mtd-mac-address = <&config 0xe496>;
-               mtd-mac-address-increment = <(2)>;
+               mac-address-increment = <(2)>;
                mediatek,mtd-eeprom = <&config 0xe083>;
 
                led {
index b0dd31cafcd8974bff7159325192b5dcf8e77fe5..eec4969ff378419a1c366b4e08048aa2ef39a0f4 100644 (file)
                reg = <0x0000 0 0 0 0>;
                ieee80211-freq-limit = <5000000 6000000>;
                mtd-mac-address = <&config 0xe4a8>;
-               mtd-mac-address-increment = <(2)>;
+               mac-address-increment = <(2)>;
 
                led {
                        led-sources = <2>;
index 4284c61aa2e87d0522172ca8d3265becc5546f87..eed57f7f6843242b4ad87666729084f8b1d09f61 100644 (file)
                ieee80211-freq-limit = <5000000 6000000>;
                mediatek,mtd-eeprom = <&config 0xe08e>;
                mtd-mac-address = <&config 0xe50e>;
-               mtd-mac-address-increment = <2>;
+               mac-address-increment = <2>;
        };
 };
 
index 41d69d009b0c52e777cae20c92c14bf74836aee8..2f882b3b5040f1e1ed2aa8c48bb54ab740b41288 100644 (file)
        mt76x0e@0,0 {
                reg = <0x0000 0 0 0 0>;
                mtd-mac-address = <&config 0xe07e>;
-               mtd-mac-address-increment = <(2)>;
+               mac-address-increment = <(2)>;
                mediatek,mtd-eeprom = <&config 0xe08a>;
        };
 };
index 184af58d2920d7207943461094fe9ffdad67e947..cfd55ea2218b5a38fac6ef34b4a3ba63e800ae74 100644 (file)
                reg = <0x0000 0 0 0 0>;
                mediatek,mtd-eeprom = <&radio 0x8000>;
                mtd-mac-address = <&rom 0xf100>;
-               mtd-mac-address-increment = <(-1)>;
+               mac-address-increment = <(-1)>;
        };
 };
index f7e7d50df7ce9e816432b44ab244ec924a9ae82b..89f48dc7d31e6d5427376e1e04ffe06ec58e58c4 100644 (file)
        pinctrl-0 = <&pa_pins>;
 
        mtd-mac-address = <&rom 0xf100>;
-       mtd-mac-address-increment = <(-2)>;
+       mac-address-increment = <(-2)>;
 };
 
 &wifi {
        mtd-mac-address = <&rom 0xf100>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
index a6c3cea7360065f1f113b158383a55ea9f93fedb..c4fb98c4676c9302a8396bb9bd2155ced4c6f5df 100644 (file)
@@ -58,5 +58,5 @@
 
 &wifi {
        mtd-mac-address = <&rom 0xf100>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
index d564552ff0b63d4e1e369caf0331b077de0a8d74..8de87caecc071a642a4f98ea5d44b1c19b44e200 100644 (file)
        pinctrl-0 = <&pa_pins>;
 
        mtd-mac-address = <&rom 0xf100>;
-       mtd-mac-address-increment = <(-2)>;
+       mac-address-increment = <(-2)>;
 };
 
 &wifi {
        mtd-mac-address = <&rom 0xf100>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
index 80b47b7d774b4ed6b54202e0bb7ba9c0d7870dfa..7b3025e8b48ae48cef131084b4f3f697d01e6be0 100644 (file)
@@ -89,7 +89,7 @@
                reg = <0x0000 0 0 0 0>;
                mediatek,mtd-eeprom = <&radio 0x8000>;
                mtd-mac-address = <&uboot 0x1fc00>;
-               mtd-mac-address-increment = <2>;
+               mac-address-increment = <2>;
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
index 3290a5e710c41c969a55eb9d49f6de7e1362115b..84c0d3b282852466ba272a18166d845c01e73389 100644 (file)
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0xe00c>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
        };
 };
index ed9e9852d3f10f4f205e576bc5742b7b1a735c48..0a4971d06c8ae7a83ab257867def0c16ee454f80 100644 (file)
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0xe000>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
        };
 };
index cf91dc03119b61ba9ad11f6b8ca121d79b91c91e..0e66057fa59f3a550489a2533b58533e9eb5bca5 100644 (file)
@@ -18,7 +18,7 @@
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0xe000>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
        };
 };
index 5a4c03fb7c0db5ad5cb9a2521cf91b25a5c8336e..4088b8137dc1456f9611637ba8556cc34ce3facd 100644 (file)
@@ -13,7 +13,7 @@
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0xe000>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
 
                port@2 {
index 048eac5a3dd4b9759d875da1f8ca23934e1e7145..9244c8368b398ec80ab268fe69d1f6e708d41949 100644 (file)
 
 &gmac0 {
        mtd-mac-address = <&factory 0x4>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
 
 &switch0 {
index a66ce942a57391db769c6dc7ec91c2d3a5ef3127..e943c040695d771ef32937296353f1b203d72661 100644 (file)
                reg = <0x0000 0 0 0 0>;
                mediatek,mtd-eeprom = <&factory 0x8000>;
                mtd-mac-address = <&bdinfo 0xde00>;
-               mtd-mac-address-increment = <2>;
+               mac-address-increment = <2>;
                ieee80211-freq-limit = <5000000 6000000>;
 
                led {
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&bdinfo 0xde00>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
        };
 };
index 0f4fbc1873a148ed10e87dabc0eb68db1d9777e8..fd11768ce6485ac9052febbd97d157622996ea24 100644 (file)
 
 &wifi0 {
        mtd-mac-address = <&factory 0xe000>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &wifi1 {
        mtd-mac-address = <&factory 0xe000>;
-       mtd-mac-address-increment = <2>;
+       mac-address-increment = <2>;
 };
index 323a7906000dbbf2c39dd9568d00003a0baafcf4..b19f70f7c95f1be4506bb433a264ff39c53ff863 100644 (file)
 
 &wifi0 {
        mtd-mac-address = <&factory 0xe000>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &wifi1 {
        mtd-mac-address = <&factory 0xe000>;
-       mtd-mac-address-increment = <2>;
+       mac-address-increment = <2>;
 };
index fbf233d96f18e75bbedbf57939f8c4409555ec6d..a4d72876abcabe5d8e284b5d46bc5415ef81d100 100644 (file)
 
 &wifi0 {
        mtd-mac-address = <&factory 0xe000>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &wifi1 {
        mtd-mac-address = <&factory 0xe000>;
-       mtd-mac-address-increment = <2>;
+       mac-address-increment = <2>;
 };
index b6a73835574722140a026c7c82c8923914ef6f35..f8ea5dbbbfac7403686a2efe110e4350ed5c1a18 100644 (file)
                reg = <0x0000 0 0 0 0>;
                mediatek,mtd-eeprom = <&factory 0x0>;
                mtd-mac-address = <&factory 0xe000>;
-               mtd-mac-address-increment = <1>;
+               mac-address-increment = <1>;
        };
 };
 
index 6349fd487ed998b1ed4df01714f3c70a367644bf..becd2a9f9deaecff78dbcbc2458bdd6b06e653b5 100644 (file)
@@ -49,5 +49,5 @@
 
 &wifi {
        mtd-mac-address = <&factory 0x4>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
index 11b782488ab982ce5726f6b819dd7bd5112c48f6..5cc8ff27f67ad34b274348a472faff1a825fb4d9 100644 (file)
@@ -49,5 +49,5 @@
 
 &wifi {
        mtd-mac-address = <&factory 0xe006>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
index 62423f02e5c4addd1e8713ac899f08f051415dd2..96893265708811eb6f2777b3470c3def5bc6d0e6 100644 (file)
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0xe000>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
        };
 };
index e7b19fa42c1c059c97c0db53d4dfa73edfbac8f7..f0152e8db3c1909b7b3ca85c3e0dc7ba9257f034 100644 (file)
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0xe000>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
        };
 };
index 20f63902afa7856d08a1c7b80f1581efe3bc58d3..629a9a243942b74b40f4f94bbbe81fc883c5404b 100644 (file)
 
 &gmac0 {
        mtd-mac-address = <&factory 0x4000>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &switch0 {
index 879fb68c853bb4e48988e3c0d33b5efb49ced580..c549bbb5183521d722a31f313dca73b733d3ea4d 100644 (file)
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0x4>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
 
                port@1 {
index 06d024e9a7c75a6e59bcce4b7206d4c495fb319c..91f30f87216c924482df7362a63ecbddd37affe0 100644 (file)
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0x4>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
 
                port@1 {
index 04996558a42975fb9210a2edfb6d05d6fa5ab487..ec9be40ce40dcec8cec7cdb5a9a7d58846d0a6b1 100644 (file)
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0x5>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
        };
 };
index 45901474d2bd78934a37ba45154a01ba7f2c65b8..130193c171cee4e51e1a40d95c7168ccd9d8c6f9 100644 (file)
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0xe000>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
        };
 };
index 8a79d9ca9a6cb73da34495c2abc4e50d16cd23fd..cfa0e6af241904b0e0660aed58a9dad96fffec09 100644 (file)
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0x4>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
        };
 };
index 1a19cd048b2d8b7578427e8432d4bf27ca18f913..eaf9059e39d693bfab4d2e79bef56a034d143376 100644 (file)
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0x4>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
        };
 };
index 71c95e75bd6d44036a8479a9ddf78b670b5bb1da..3ed8bc55e952973b3dfe1e16ecc481a381cae79c 100644 (file)
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0x4>;
-                       mtd-mac-address-increment = <2>;
+                       mac-address-increment = <2>;
                };
        };
 };
index 7a15cd1f6cb4e5e062fc3bf509fc5f63a8f104ed..61cb522dfdbc0ab696c8cb639d904eba71dce217 100644 (file)
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0x4>;
-                       mtd-mac-address-increment = <2>;
+                       mac-address-increment = <2>;
                };
        };
 };
index d44960a9a1ec4a5d5e723233a37b706d6db911d0..6ecf71895c36617134be8f5fa08ef3766ed30202 100644 (file)
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0xe006>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
        };
 };
index f597d0f63a337e9087afc65a7d193149d3678e96..0386a3cdd22e44000274673587107819d002641a 100644 (file)
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0xe006>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
        };
 };
index d0e38f1721b4e519fc9c5bbfa1555e42bd9d185e..4b53e60cd583a3f88ab6a5534b0fe2a3921110cc 100644 (file)
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0xe000>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
        };
 };
index 17308eb605b81a6bf392277f16cee3abf72fefe3..cf63e6b989ad8c026e4b7e36f5a7c3acee7560ed 100644 (file)
                mediatek,mtd-eeprom = <&radio 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
                mtd-mac-address = <&info 0x8>;
-               mtd-mac-address-increment = <1>;
+               mac-address-increment = <1>;
        };
 };
 
index 9f29ecd8cfec3cffe1c37f6978264fc2cb6f8000..0a810b0195b99e7c93d92ed6032e24b121d6492d 100644 (file)
                reg = <0x0000 0 0 0 0>;
                mediatek,mtd-eeprom = <&radio 0x0>;
                mtd-mac-address = <&config 0x10008>;
-               mtd-mac-address-increment = <1>;
+               mac-address-increment = <1>;
        };
 };
 
                mediatek,mtd-eeprom = <&radio 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
                mtd-mac-address = <&config 0x10008>;
-               mtd-mac-address-increment = <2>;
+               mac-address-increment = <2>;
        };
 };
 
index 45a983098d2fba82f59b541762d3d9e82e2bca72..0ec83fa389b6b862f73f8c2cc3103c2c9e2acbfc 100644 (file)
                reg = <0x0000 0 0 0 0>;
                mediatek,mtd-eeprom = <&radio 0x0>;
                mtd-mac-address = <&config 0x10008>;
-               mtd-mac-address-increment = <1>;
+               mac-address-increment = <1>;
                ieee80211-freq-limit = <2400000 2500000>;
        };
 };
                reg = <0x0000 0 0 0 0>;
                mediatek,mtd-eeprom = <&radio 0x8000>;
                mtd-mac-address = <&config 0x10008>;
-               mtd-mac-address-increment = <2>;
+               mac-address-increment = <2>;
                ieee80211-freq-limit = <5000000 6000000>;
        };
 };
index 9f92178900346015b32f05c44aa804f95d7d4dcb..536180be104d867f3c36008c9f99e390e351a397 100644 (file)
@@ -67,7 +67,7 @@
                        phy-handle = <&ephy7>;
                        phy-mode = "rgmii-rxid";
                        mtd-mac-address = <&factory 0x22>;
-                       mtd-mac-address-increment = <5>;
+                       mac-address-increment = <5>;
                };
        };
 };
index 04eb49bfa359fa5feaf1280466de924ac6fb1f0b..b92dc8f3f06672d0bfae4d63178ae5cf74a7a1e2 100644 (file)
                        status = "okay";
                        label = "eth1";
                        mtd-mac-address = <&factory 0x22>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
 
                port@2 {
                        status = "okay";
                        label = "eth2";
                        mtd-mac-address = <&factory 0x22>;
-                       mtd-mac-address-increment = <2>;
+                       mac-address-increment = <2>;
                };
 
                port@3 {
                        status = "okay";
                        label = "eth3";
                        mtd-mac-address = <&factory 0x22>;
-                       mtd-mac-address-increment = <3>;
+                       mac-address-increment = <3>;
                };
 
                port@4 {
                        status = "okay";
                        label = "eth4";
                        mtd-mac-address = <&factory 0x22>;
-                       mtd-mac-address-increment = <4>;
+                       mac-address-increment = <4>;
                };
        };
 };
index 336f68ea61a6eb9f38a5e04728e069ca00d64333..b9b16fbb4bbc72289c2659c124db7f810640a99f 100644 (file)
@@ -82,7 +82,7 @@
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0xe000>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
 
                port@1 {
index 3b149df85ad92fa058af6e6d9bc4ffe517f32498..29e62517214791a5145940904add1b73c219b9a9 100644 (file)
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0xe000>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
        };
 };
index b90ff92c70495952a77089fe9797b22d17d814bc..ee1a452fa99b12b74b4d92aa8200177a44a393de 100644 (file)
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0x4>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
        };
 };
index 182b6db5b3dbb09438c6ff1d2543bc32c6574300..afee235ac7da00fceb6d8bb40f6a57fbafd8f872 100644 (file)
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0xe000>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
        };
 };
index d0d656ba6db8296f7a3d01dc0346af2f985b4667..b1fbf5393133cc41c88a4248b746b499a355e0fa 100644 (file)
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0xe000>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
        };
 };
index 515d37ceaa6471886f6bd438dfe34d19895c886a..2fe855abd559829ad207bf8bb52ef27beddc3571 100644 (file)
                        status = "okay";
                        label = "wan";
                        mtd-mac-address = <&factory 0xe000>;
-                       mtd-mac-address-increment = <1>;
+                       mac-address-increment = <1>;
                };
        };
 };
index f4d9823cd29a635518899f91b03cd725e14ebcdf..c70db4989bdde9be9ca5c7c2c4df1e0170ddce69 100644 (file)
@@ -45,5 +45,5 @@
 
 &wifi5 {
        mtd-mac-address = <&factory 0x4>;
-       mtd-mac-address-increment = <(2)>;
+       mac-address-increment = <(2)>;
 };
index 58743db6b4d4c88c9162b4efd3164e0c36deb828..55f39db68043f39b117db56e27d58885106ea30c 100644 (file)
@@ -78,7 +78,7 @@
 };
 
 &wmac {
-       mtd-mac-address-increment = <(-2)>;
+       mac-address-increment = <(-2)>;
 };
 
 &esw {
                mediatek,mtd-eeprom = <&factory 0x28000>;
                ieee80211-freq-limit = <5000000 6000000>;
                mtd-mac-address = <&factory 0xf100>;
-               mtd-mac-address-increment = <(-1)>;
+               mac-address-increment = <(-1)>;
        };
 };
index d76ce34ca9a39b7ef3f203997783369c3413c7fe..38879d70e69a9463a37e38409f7b88c6966b090f 100644 (file)
@@ -97,6 +97,6 @@
                mediatek,mtd-eeprom = <&radio 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
                mtd-mac-address = <&rom 0xf100>;
-               mtd-mac-address-increment = <(-1)>;
+               mac-address-increment = <(-1)>;
        };
 };
index 4966d56a68fe58f74dbb07e8814dacb3daa51dba..bb13bac8c8e90062c395cfa06d7c1fb36c8e8534 100644 (file)
@@ -97,6 +97,6 @@
                mediatek,mtd-eeprom = <&factory 0x28000>;
                ieee80211-freq-limit = <5000000 6000000>;
                mtd-mac-address = <&factory 0xf100>;
-               mtd-mac-address-increment = <(-1)>;
+               mac-address-increment = <(-1)>;
        };
 };
index 11bf903531b0b6b9ef993325a2206a725c686156..34170547a4e8a6cfdc0a767c905718bd2f89df72 100644 (file)
@@ -95,6 +95,6 @@
                mediatek,mtd-eeprom = <&radio 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
                mtd-mac-address = <&rom 0xf100>;
-               mtd-mac-address-increment = <(-1)>;
+               mac-address-increment = <(-1)>;
        };
 };
index 95addff3c02652e95f31095da49a5ffc4b7237a4..633950f287f4a5b9d51685b67d9245dec5de628d 100644 (file)
 
        mediatek,mtd-eeprom = <&radio 0x0>;
        mtd-mac-address = <&config 0x2008>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &pcie {
                mediatek,mtd-eeprom = <&radio 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
                mtd-mac-address = <&config 0x2008>;
-               mtd-mac-address-increment = <2>;
+               mac-address-increment = <2>;
        };
 };
index 22e15eb7a1a812362567970c120414de59fa0777..300ea3bb297344173a7584fd45e0937647c1d194 100644 (file)
                mediatek,mtd-eeprom = <&radio 0x8000>;
                ieee80211-freq-limit = <5000000 6000000>;
                mtd-mac-address = <&config 0x10008>;
-               mtd-mac-address-increment = <2>;
+               mac-address-increment = <2>;
        };
 };
 
 
        mediatek,mtd-eeprom = <&radio 0x0>;
        mtd-mac-address = <&config 0x10008>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
 
 &ethernet {
index 77a68acf340af5e1c56fffcb115f018295e4dc6b..d3558547b8eec3c8a0ff7fb2122fbea3e59464b1 100644 (file)
@@ -93,6 +93,6 @@
                mediatek,mtd-eeprom = <&factory 0x28000>;
                ieee80211-freq-limit = <5000000 6000000>;
                mtd-mac-address = <&factory 0xf100>;
-               mtd-mac-address-increment = <(-1)>;
+               mac-address-increment = <(-1)>;
        };
 };
index 37797fc368cb1c5545a74f0ecc4cfcde717c6dbb..ff562cbff40985366bb19a6a3368bb259556f2a0 100644 (file)
@@ -36,7 +36,7 @@
 
 &ethernet {
        mtd-mac-address = <&factory 0x4>;
-       mtd-mac-address-increment = <(-1)>;
+       mac-address-increment = <(-1)>;
 };
 
 &esw {
index ccf9917dac6a9f935fd341317759506ec44b34e4..6bed6f57bccc9e536d69d9e5df1dafb31110dbf9 100644 (file)
@@ -65,7 +65,7 @@
 &ethernet {
        status = "okay";
        mtd-mac-address = <&factory 0x8004>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 
        port@0 {
                phy-handle = <&phy0>;
index 03e504a6d19f4ee13b97fd9ca6aa1e222b6a11c9..b5cae66732ed322318929bf1d5e42d9877340ec1 100644 (file)
        ralink,mtd-eeprom = <&factory 0x0>;
        ralink,5ghz = <0>;
        mtd-mac-address = <&factory 0x4>;
-       mtd-mac-address-increment = <1>;
+       mac-address-increment = <1>;
 };
index 95a2bb75f3e2a4fccfe08f6846c2923149493746..39fb3d1c78d4d22a4f531c891302bb6166584ded 100644 (file)
        ralink,mtd-eeprom = <&factory 0x0>;
        ralink,5ghz = <0>;
        mtd-mac-address = <&factory 0x4>;
-       mtd-mac-address-increment = <3>;
+       mac-address-increment = <3>;
 };