ramips: switch to new mac-address-ascii bindings for jdcloud re-sp-01b
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
a01c999ea7
commit
8ea6f9a6bf
@ -14,6 +14,7 @@
|
||||
led-failsafe = &led_red;
|
||||
led-running = &led_green;
|
||||
led-upgrade = &led_blue;
|
||||
label-mac-device = &gmac0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@ -51,6 +52,11 @@
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
nvmem-cells = <&macaddr_config_4429>;
|
||||
nvmem-cell-names = "mac-address-ascii";
|
||||
}
|
||||
|
||||
&gmac1 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
@ -86,7 +92,7 @@
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
config: partition@30000 {
|
||||
label = "config";
|
||||
reg = <0x30000 0x10000>;
|
||||
read-only;
|
||||
@ -140,6 +146,8 @@
|
||||
&pcie0 {
|
||||
wifi@0,0 {
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&macaddr_config_4429>;
|
||||
nvmem-cell-names = "mac-address-ascii";
|
||||
mediatek,mtd-eeprom = <&factory 0x0>;
|
||||
};
|
||||
};
|
||||
@ -147,6 +155,10 @@
|
||||
&pcie1 {
|
||||
wifi@0,0 {
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&macaddr_config_4429>;
|
||||
nvmem-cell-names = "mac-address-ascii";
|
||||
mac-address-increment-byte = <3>;
|
||||
mac-address-increment = <0x80>;
|
||||
mediatek,mtd-eeprom = <&factory 0x8000>;
|
||||
ieee80211-freq-limit = <5000000 6000000>;
|
||||
};
|
||||
@ -158,3 +170,13 @@
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
||||
|
||||
&config {
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_config_4429: macaddr@4429 {
|
||||
reg = <0x4429 0x11>;
|
||||
};
|
||||
};
|
||||
|
||||
@ -223,12 +223,6 @@ ramips_setup_macs()
|
||||
zbtlink,zbt-wg3526-32m)
|
||||
label_mac=$(mtd_get_mac_binary factory 0x4)
|
||||
;;
|
||||
jdcloud,re-sp-01b)
|
||||
local index="$(find_mtd_index "config")"
|
||||
label_mac=$(macaddr_canonicalize $(dd if="/dev/mtd${index}" bs=12 skip=17449 iflag=skip_bytes count=1 2>/dev/null))
|
||||
lan_mac=$label_mac
|
||||
wan_mac=$label_mac
|
||||
;;
|
||||
linksys,e5600|\
|
||||
linksys,ea6350-v4|\
|
||||
linksys,ea7300-v1|\
|
||||
|
||||
@ -98,12 +98,6 @@ case "$board" in
|
||||
[ "$PHYNBR" = "1" ] && \
|
||||
macaddr_setbit_la "$(mtd_get_mac_binary Factory 0x4)" > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
jdcloud,re-sp-01b)
|
||||
local index="$(find_mtd_index "config")"
|
||||
local label_mac=$(macaddr_canonicalize $(dd if="/dev/mtd${index}" bs=12 skip=17449 iflag=skip_bytes count=1 2>/dev/null))
|
||||
[ "$PHYNBR" -eq 0 ] && echo $label_mac > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" -eq 1 ] && macaddr_add $label_mac 0x800000 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
linksys,e5600|\
|
||||
linksys,ea6350-v4|\
|
||||
linksys,ea7300-v1|\
|
||||
|
||||
Loading…
Reference in New Issue
Block a user