ramips: convert mtd-mac-address to nvmem for D-Link DIR-8xx
Convert this series by moving the definitions to the individual devices. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
parent
cc0112d9d7
commit
7f1b0f68f1
@ -11,6 +11,7 @@
|
||||
|
||||
aliases {
|
||||
label-mac-device = &gmac0;
|
||||
|
||||
led-boot = &led_power_orange;
|
||||
led-failsafe = &led_power_blue;
|
||||
led-running = &led_power_blue;
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
aliases {
|
||||
label-mac-device = &wan;
|
||||
|
||||
led-boot = &led_power_orange;
|
||||
led-failsafe = &led_power_blue;
|
||||
led-running = &led_power_blue;
|
||||
@ -93,16 +94,20 @@
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
|
||||
mediatek,mtd-eeprom = <&factory 0x0>;
|
||||
|
||||
/* 5 GHz (phy1) does not take the address from calibration data,
|
||||
but setting it manually here works */
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
nvmem-cells = <&macaddr_factory_4>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
mtd-mac-address-increment = <(-1)>;
|
||||
nvmem-cells = <&macaddr_factory_4>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <(-1)>;
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
@ -130,8 +135,9 @@
|
||||
wan: port@4 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
mtd-mac-address-increment = <(-2)>;
|
||||
nvmem-cells = <&macaddr_factory_4>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <(-2)>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -142,3 +148,13 @@
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
||||
|
||||
&factory {
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_factory_4: macaddr@4 {
|
||||
reg = <0x4 0x6>;
|
||||
};
|
||||
};
|
||||
|
@ -8,11 +8,12 @@
|
||||
model = "D-Link DIR-860L B1";
|
||||
|
||||
aliases {
|
||||
label-mac-device = &gmac0;
|
||||
|
||||
led-boot = &led_power_green;
|
||||
led-failsafe = &led_power_green;
|
||||
led-running = &led_power_green;
|
||||
led-upgrade = &led_power_green;
|
||||
label-mac-device = &gmac0;
|
||||
};
|
||||
|
||||
leds {
|
||||
|
@ -6,4 +6,32 @@
|
||||
/ {
|
||||
compatible = "dlink,dir-867-a1", "mediatek,mt7621-soc";
|
||||
model = "D-Link DIR-867 A1";
|
||||
|
||||
aliases {
|
||||
label-mac-device = &gmac0;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
nvmem-cells = <&macaddr_factory_e000>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&wan {
|
||||
nvmem-cells = <&macaddr_factory_e006>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&factory {
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_factory_e000: macaddr@e000 {
|
||||
reg = <0xe000 0x6>;
|
||||
};
|
||||
|
||||
macaddr_factory_e006: macaddr@e006 {
|
||||
reg = <0xe006 0x6>;
|
||||
};
|
||||
};
|
||||
|
@ -6,4 +6,32 @@
|
||||
/ {
|
||||
compatible = "dlink,dir-878-a1", "mediatek,mt7621-soc";
|
||||
model = "D-Link DIR-878 A1";
|
||||
|
||||
aliases {
|
||||
label-mac-device = &gmac0;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
nvmem-cells = <&macaddr_factory_e000>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&wan {
|
||||
nvmem-cells = <&macaddr_factory_e006>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&factory {
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_factory_e000: macaddr@e000 {
|
||||
reg = <0xe000 0x6>;
|
||||
};
|
||||
|
||||
macaddr_factory_e006: macaddr@e006 {
|
||||
reg = <0xe006 0x6>;
|
||||
};
|
||||
};
|
||||
|
@ -6,6 +6,10 @@
|
||||
/ {
|
||||
compatible = "dlink,dir-882-a1", "mediatek,mt7621-soc";
|
||||
model = "D-Link DIR-882 A1";
|
||||
|
||||
aliases {
|
||||
label-mac-device = &gmac0;
|
||||
};
|
||||
};
|
||||
|
||||
&leds {
|
||||
@ -23,3 +27,27 @@
|
||||
linux,default-trigger = "usbport";
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
nvmem-cells = <&macaddr_factory_e000>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&wan {
|
||||
nvmem-cells = <&macaddr_factory_e006>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&factory {
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_factory_e000: macaddr@e000 {
|
||||
reg = <0xe000 0x6>;
|
||||
};
|
||||
|
||||
macaddr_factory_e006: macaddr@e006 {
|
||||
reg = <0xe006 0x6>;
|
||||
};
|
||||
};
|
||||
|
@ -6,6 +6,10 @@
|
||||
/ {
|
||||
compatible = "dlink,dir-882-r1", "mediatek,mt7621-soc";
|
||||
model = "D-Link DIR-882 R1";
|
||||
|
||||
aliases {
|
||||
label-mac-device = &gmac0;
|
||||
};
|
||||
};
|
||||
|
||||
&leds {
|
||||
@ -23,3 +27,27 @@
|
||||
linux,default-trigger = "usbport";
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
nvmem-cells = <&macaddr_factory_e000>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&wan {
|
||||
nvmem-cells = <&macaddr_factory_e006>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&factory {
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_factory_e000: macaddr@e000 {
|
||||
reg = <0xe000 0x6>;
|
||||
};
|
||||
|
||||
macaddr_factory_e006: macaddr@e006 {
|
||||
reg = <0xe006 0x6>;
|
||||
};
|
||||
};
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
label-mac-device = &gmac0;
|
||||
led-boot = &led_power_orange;
|
||||
led-failsafe = &led_power_green;
|
||||
led-running = &led_power_green;
|
||||
@ -91,10 +90,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
mtd-mac-address = <&factory 0xe000>;
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ports {
|
||||
port@0 {
|
||||
@ -117,10 +112,9 @@
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@4 {
|
||||
wan: port@4 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
mtd-mac-address = <&factory 0xe006>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user