reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ band@1 {
+ reg = <1>;
+ nvmem-cells = <&macaddr_factory_8004>;
+ nvmem-cell-names = "mac-address";
+ };
};
};
reg = <0x0 0xe00>;
};
+ macaddr_factory_8004: macaddr@8004 {
+ reg = <0x8004 0x6>;
+ };
+
macaddr_factory_e000: macaddr@e000 {
compatible = "mac-base";
reg = <0xe000 0x6>;
};
macaddr_factory_4: macaddr@4 {
+ compatible = "mac-base";
reg = <0x4 0x6>;
+ #nvmem-cell-cells = <1>;
};
precal_factory_e10: precal@e10 {
nvmem-cells = <&eeprom_factory_0>, <&precal_factory_e10>;
nvmem-cell-names = "eeprom", "precal";
mediatek,disable-radar-background;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ band@0 {
+ reg = <0>;
+ nvmem-cells = <&macaddr_factory_4 1>;
+ nvmem-cell-names = "mac-address";
+ };
+
+ band@1 {
+ reg = <1>;
+ nvmem-cells = <&macaddr_factory_4 4>;
+ nvmem-cell-names = "mac-address";
+ };
};
};
};
&gmac0 {
- nvmem-cells = <&macaddr_factory_4>;
+ nvmem-cells = <&macaddr_factory_4 0>;
nvmem-cell-names = "mac-address";
};
};
macaddr_factory_e000: macaddr@e000 {
+ compatible = "mac-base";
reg = <0xe000 0x6>;
+ #nvmem-cell-cells = <1>;
};
macaddr_factory_e006: macaddr@e006 {
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
- /* The correct Mac addresses are set in 10_fix_wifi_mac. */
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ band@0 {
+ reg = <0>;
+ nvmem-cells = <&macaddr_factory_e000 1>;
+ nvmem-cell-names = "mac-address";
+ };
+
+ band@1 {
+ reg = <1>;
+ nvmem-cells = <&macaddr_factory_e000 2>;
+ nvmem-cell-names = "mac-address";
+ };
};
};
&gmac0 {
- nvmem-cells = <&macaddr_factory_e000>;
+ nvmem-cells = <&macaddr_factory_e000 0>;
nvmem-cell-names = "mac-address";
};
};
macaddr_factory_e000: macaddr@e000 {
+ compatible = "mac-base";
reg = <0xe000 0x6>;
+ #nvmem-cell-cells = <1>;
};
};
};
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
- /* The correct MAC addresses are set in 10_fix_wifi_mac. */
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ band@0 {
+ reg = <0>;
+ nvmem-cells = <&macaddr_factory_e000 1>;
+ nvmem-cell-names = "mac-address";
+ };
+
+ band@1 {
+ reg = <1>;
+ nvmem-cells = <&macaddr_factory_e000 2>;
+ nvmem-cell-names = "mac-address";
+ };
};
};
&gmac0 {
- nvmem-cells = <&macaddr_factory_e000>;
+ nvmem-cells = <&macaddr_factory_e000 0>;
nvmem-cell-names = "mac-address";
};
reg = <0x0 0x4da8>;
};
+ macaddr_factory_4: macaddr@4 {
+ compatible = "mac-base";
+ reg = <0x4 0x6>;
+ #nvmem-cell-cells = <1>;
+ };
+
macaddr_factory_4000: macaddr@4000 {
compatible = "mac-base";
reg = <0x4000 0x6>;
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ band@1 {
+ reg = <1>;
+ nvmem-cells = <&macaddr_factory_4 1>;
+ nvmem-cell-names = "mac-address";
+ };
};
};
};
macaddr_factory_4: macaddr@4 {
+ compatible = "mac-base";
reg = <0x4 0x6>;
+ #nvmem-cell-cells = <1>;
};
macaddr_factory_28: macaddr@28 {
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ band@1 {
+ reg = <1>;
+ nvmem-cells = <&macaddr_factory_4 2>;
+ nvmem-cell-names = "mac-address";
+ };
};
};
};
&gmac0 {
- nvmem-cells = <&macaddr_factory_4>;
+ nvmem-cells = <&macaddr_factory_4 0>;
nvmem-cell-names = "mac-address";
};
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
- nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_8 0>;
- nvmem-cell-names = "eeprom", "mac-address";
+ nvmem-cells = <&eeprom_radio_0>;
+ nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ band@0 {
+ reg = <0>;
+ nvmem-cells = <&macaddr_config_8 0>;
+ nvmem-cell-names = "mac-address";
+ };
+
+ band@1 {
+ reg = <1>;
+ nvmem-cells = <&macaddr_config_8 (-1)>;
+ nvmem-cell-names = "mac-address";
+ };
};
};
reg = <0x0 0x4da8>;
};
+ macaddr_factory_8004: macaddr@8004 {
+ reg = <0x8004 0x6>;
+ };
+
macaddr_factory_e000: macaddr@e000 {
reg = <0xe000 0x6>;
};
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ band@1 {
+ reg = <1>;
+ nvmem-cells = <&macaddr_factory_8004>;
+ nvmem-cell-names = "mac-address";
+ };
};
};
reg = <0x0 0xe00>;
};
+ macaddr_factory_4: macaddr@0 {
+ compatible = "mac-base";
+ reg = <0x4 0x6>;
+ #nvmem-cell-cells = <1>;
+ };
+
macaddr_factory_e000: macaddr@e000 {
reg = <0xe000 0x6>;
};
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ band@1 {
+ reg = <1>;
+ nvmem-cells = <&macaddr_factory_4 4>;
+ nvmem-cell-names = "mac-address";
+ };
};
};
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
- nvmem-cells = <&eeprom_radio_0>, <&macaddr_config_8 0>;
- nvmem-cell-names = "eeprom", "mac-address";
+ nvmem-cells = <&eeprom_radio_0>;
+ nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ band@0 {
+ reg = <0>;
+ nvmem-cells = <&macaddr_config_8 0>;
+ nvmem-cell-names = "mac-address";
+ };
+
+ band@1 {
+ reg = <1>;
+ nvmem-cells = <&macaddr_config_8 (-1)>;
+ nvmem-cell-names = "mac-address";
+ };
};
};
#size-cells = <1>;
macaddr: macaddr@8 {
+ compatible = "mac-base";
reg = <0x8 0x6>;
+ #nvmem-cell-cells = <1>;
};
};
};
nvmem-cells = <&eeprom_radio_0>;
nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ band@0 {
+ reg = <0>;
+ nvmem-cells = <&macaddr 0>;
+ nvmem-cell-names = "mac-address";
+ };
+
+ band@1 {
+ reg = <1>;
+ nvmem-cells = <&macaddr 1>;
+ nvmem-cell-names = "mac-address";
+ };
};
};
&gmac0 {
- nvmem-cells = <&macaddr>;
+ nvmem-cells = <&macaddr 0>;
nvmem-cell-names = "mac-address";
};
#size-cells = <1>;
macaddr_info_8: macaddr@8 {
+ compatible = "mac-base";
reg = <0x8 0x6>;
+ #nvmem-cell-cells = <1>;
};
};
};
nvmem-cells = <&eeprom_radio_0>;
nvmem-cell-names = "eeprom";
mediatek,disable-radar-background;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ band@0 {
+ reg = <0>;
+ nvmem-cells = <&macaddr_info_8 0>;
+ nvmem-cell-names = "mac-address";
+ };
+
+ band@1 {
+ reg = <1>;
+ nvmem-cells = <&macaddr_info_8 1>;
+ nvmem-cell-names = "mac-address";
+ };
};
};
&gmac0 {
- nvmem-cells = <&macaddr_info_8>;
+ nvmem-cells = <&macaddr_info_8 0>;
nvmem-cell-names = "mac-address";
};
label = "lan0";
phy-handle = <ðphy0>;
- nvmem-cells = <&macaddr_info_8>;
+ nvmem-cells = <&macaddr_info_8 0>;
nvmem-cell-names = "mac-address";
};
wifi@0,0 {
compatible = "mediatek,mt76";
reg = <0x0000 0 0 0 0>;
- nvmem-cells = <&eeprom_radio_0>, <&precal_radio_e10>, <&macaddr_rom_file_f100 0>;
- nvmem-cell-names = "eeprom", "precal", "mac-address";
+ nvmem-cells = <&eeprom_radio_0>, <&precal_radio_e10>;
+ nvmem-cell-names = "eeprom", "precal";
mediatek,disable-radar-background;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ band@0 {
+ reg = <0>;
+ nvmem-cells = <&macaddr_rom_file_f100 0>;
+ nvmem-cell-names = "mac-address";
+ };
+
+ band@1 {
+ reg = <1>;
+ nvmem-cells = <&macaddr_rom_file_f100 2>;
+ nvmem-cell-names = "mac-address";
+ };
};
};
reg = <0x0 0xe00>;
};
+ macaddr_factory_4: macaddr@4 {
+ compatible = "mac-base";
+ reg = <0x4 0x6>;
+ #nvmem-cell-cells = <1>;
+ };
+
macaddr_factory_3fff4: macaddr@3fff4 {
reg = <0x3fff4 0x6>;
};
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ band@1 {
+ reg = <1>;
+ nvmem-cells = <&macaddr_factory_4 1>;
+ nvmem-cell-names = "mac-address";
+ };
};
};
[ "$PHYNBR" = "1" ] && \
macaddr_add $lan_mac_addr 8 > /sys${DEVPATH}/macaddress
;;
- comfast,cf-e390ax)
- [ "$PHYNBR" = "0" ] && echo -n "$(mtd_get_mac_binary factory 0x0004)" > /sys${DEVPATH}/macaddress
- [ "$PHYNBR" = "1" ] && echo -n "$(mtd_get_mac_binary factory 0x8004)" > /sys${DEVPATH}/macaddress
- ;;
cudy,x6-v1|\
cudy,x6-v2)
hw_mac_addr="$(mtd_get_mac_binary bdinfo 0xde00)"
[ "$PHYNBR" = "1" ] && \
macaddr_setbit_la "$(macaddr_add $hw_mac_addr 0x100000)" > /sys${DEVPATH}/macaddress
;;
- dlink,dap-1620-b1|\
- dlink,dir-853-a1|\
- dlink,dra-1360-a1)
- lan_mac_addr="$(mtd_get_mac_binary factory 0xe000)"
- [ "$PHYNBR" = "0" ] && \
- macaddr_add $lan_mac_addr 1 > /sys${DEVPATH}/macaddress
- [ "$PHYNBR" = "1" ] && \
- macaddr_add $lan_mac_addr 2 > /sys${DEVPATH}/macaddress
- ;;
dlink,covr-x1860-a1)
label_mac=$(mtd_get_mac_ascii config2 factory_mac)
[ "$PHYNBR" = "0" ] && \
[ "$PHYNBR" = "1" ] && \
macaddr_add $label_mac 2 > /sys${DEVPATH}/macaddress
;;
- dlink,dap-x1860-a1)
- hw_mac_addr="$(mtd_get_mac_binary factory 0x4)"
- [ "$PHYNBR" = "0" ] && \
- macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress
- [ "$PHYNBR" = "1" ] && \
- macaddr_add $hw_mac_addr 4 > /sys${DEVPATH}/macaddress
- ;;
dlink,dir-3040-a1)
lan_mac_addr="$(mtd_get_mac_binary factory 0xe000)"
[ "$PHYNBR" = "0" ] && \
macaddr_setbit_la "$base_mac" > /sys${DEVPATH}/macaddress
fi
;;
- glinet,gl-mt1300|\
- z-router,zr-2660)
- [ "$PHYNBR" = "1" ] && \
- macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1 > /sys${DEVPATH}/macaddress
- ;;
h3c,tx1800-plus|\
h3c,tx1801-plus|\
h3c,tx1806)
[ "$PHYNBR" = "0" ] && echo $hw_mac_addr > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 0x800000 > /sys${DEVPATH}/macaddress
;;
- keenetic,kn-1910)
- lan_mac_addr="$(mtd_get_mac_binary RF-EEPROM 0x4)"
- [ "$PHYNBR" = "1" ] && \
- macaddr_add $lan_mac_addr 2 > /sys${DEVPATH}/macaddress
- ;;
keenetic,kn-3510)
[ "$PHYNBR" = "1" ] && \
macaddr_setbit_la "$(mtd_get_mac_binary rf-eeprom 0x4)" > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "0" ] && echo -n "$hw_mac_2g" > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && echo -n "$hw_mac_5g" > /sys${DEVPATH}/macaddress
;;
- mercusys,mr70x-v1|\
- tplink,archer-ax23-v1)
- hw_mac_addr="$(mtd_get_mac_binary config 0x8)"
- [ "$PHYNBR" = "1" ] && macaddr_add "$hw_mac_addr" -1 > "/sys${DEVPATH}/macaddress"
- ;;
mts,wg430223)
hw_mac_addr=$(macaddr_add $(mtd_get_mac_encrypted_arcadyan "board_data") 1)
[ "$PHYNBR" = "0" ] && echo -n "$hw_mac_addr" > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
;;
- snr,snr-cpe-me2-sfp)
- hw_mac_addr="$(mtd_get_mac_binary factory 0x8004)"
- [ "$PHYNBR" = "1" ] && echo -n "$hw_mac_addr" > /sys${DEVPATH}/macaddress
- ;;
tenbay,t-mb5eu-v01)
hw_mac_addr="$(mtd_get_mac_binary factory 0x4)"
[ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr "0x100000" > /sys${DEVPATH}/macaddress
;;
- totolink,x5000r)
- hw_mac_addr="$(mtd_get_mac_binary factory 0x4)"
- [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 4 > /sys${DEVPATH}/macaddress
- ;;
- tplink,eap613-v1|\
- tplink,eap615-wall-v1)
- hw_mac_addr="$(mtd_get_mac_binary product-info 0x8)"
- macaddr_add "$hw_mac_addr" "$PHYNBR" > "/sys${DEVPATH}/macaddress"
- ;;
- tplink,ex220-v1)
- hw_mac_addr="$(mtd_get_mac_binary rom_file 0xf100)"
- [ "$PHYNBR" = "1" ] && macaddr_add "$hw_mac_addr" 2 > "/sys${DEVPATH}/macaddress"
- ;;
yuncore,ax820|\
yuncore,g720)
[ "$PHYNBR" = "1" ] && \