mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 13:48:06 +00:00
mediatek: Cetron CT3003: move mac address setup to dts
It looks like we can put the mac address setting into the device tree. Compile test only. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
This commit is contained in:
parent
3a3a4d3bd3
commit
d555177960
@ -12,6 +12,7 @@
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
label-mac-device = &gmac0;
|
||||
led-boot = &led_status_red;
|
||||
led-failsafe = &led_status_red;
|
||||
led-running = &led_status_green;
|
||||
@ -65,7 +66,7 @@
|
||||
reg = <0>;
|
||||
phy-mode = "2500base-x";
|
||||
|
||||
nvmem-cells = <&macaddr_art_0>;
|
||||
nvmem-cells = <&macaddr_art_0 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
fixed-link {
|
||||
@ -134,7 +135,9 @@
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_art_0: macaddr@0 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x0 0x6>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -192,6 +195,8 @@
|
||||
port@3 {
|
||||
reg = <3>;
|
||||
label = "wan";
|
||||
nvmem-cells = <&macaddr_art_0 3>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
port@6 {
|
||||
|
@ -111,11 +111,6 @@ mediatek_setup_macs()
|
||||
bananapi,bpi-r3)
|
||||
wan_mac=$(macaddr_add $(cat /sys/class/net/eth0/address) 1)
|
||||
;;
|
||||
cetron,ct3003)
|
||||
lan_mac=$(mtd_get_mac_binary "art" 0)
|
||||
wan_mac=$(macaddr_add "$lan_mac" 3)
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
cmcc,rax3000m)
|
||||
case "$(cmdline_get_var root)" in
|
||||
/dev/mmc*)
|
||||
|
Loading…
Reference in New Issue
Block a user