diff mbox series

[OpenWrt-Devel,2/2] ramips: fix and tidy up DTS for D-Link DIR-810L

Message ID 20200227134625.48028-2-freifunk@adrianschmutzler.de
State Accepted
Delegated to: Adrian Schmutzler
Headers show
Series [OpenWrt-Devel,1/2] ramips: fix partition offset for D-Link DIR-810L | expand

Commit Message

Adrian Schmutzler Feb. 27, 2020, 1:46 p.m. UTC
This patch addresses several issues for D-Link DIR-810L:

- add correct button codes
- harmonize button node names
- use generic flash@0
- remove unused pin groups from state_default
- improve sorting of properties

The patch is only build-tested.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>

---

If somebody owns this device, I'd be delighted about a test of both patches
in general as well as if somebody would test if higher SPI frequency is
possible.

---
 .../ramips/dts/mt7620a_dlink_dir-810l.dts      | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

Comments

Thomas Richard via openwrt-devel Feb. 28, 2020, 12:33 p.m. UTC | #1
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
Hi Adrian,

I tested the patches on the device. I sysupgraded from the current
master and everything seems OK.

- Partitions

root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00030000 00001000 "u-boot"
mtd1: 00010000 00001000 "u-boot-env"
mtd2: 00010000 00001000 "factory"
mtd3: 00010000 00001000 "factory5g"
mtd4: 00010000 00001000 "Wolf_Config"
mtd5: 00080000 00001000 "MyDlink"
mtd6: 00080000 00001000 "Jffs2"
mtd7: 00690000 00001000 "firmware"
mtd8: 00198a90 00001000 "kernel"
mtd9: 004f7570 00001000 "rootfs"
mtd10: 001d4000 00001000 "rootfs_data"

- Button codes OK both

- No missing functionalities

I noticed, however, that the green "Internet" LED blinks to the LAN4
port, while -I guess- it should blink to the INTERNET (wan/eth0.2) port.
But this was already happening before, it's not related to your patch.

Roger

El 27/2/20 a les 14:46, Adrian Schmutzler ha escrit:
> This patch addresses several issues for D-Link DIR-810L:
>
> - add correct button codes
> - harmonize button node names
> - use generic flash@0
> - remove unused pin groups from state_default
> - improve sorting of properties
>
> The patch is only build-tested.
>
> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
>
> ---
>
> If somebody owns this device, I'd be delighted about a test of both patches
> in general as well as if somebody would test if higher SPI frequency is
> possible.
>
> ---
>  .../ramips/dts/mt7620a_dlink_dir-810l.dts      | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts b/target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts
> index 0b1ca26ba4..514e9cc354 100644
> --- a/target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts
> +++ b/target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts
> @@ -23,20 +23,20 @@
>  		reset {
>  			label = "reset";
>  			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
> -			linux,code = <BTN_0>;
> +			linux,code = <KEY_RESTART>;
>  		};
>  
>  		wps {
>  			label = "wps";
>  			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
> -			linux,code = <BTN_0>;
> +			linux,code = <KEY_WPS_BUTTON>;
>  		};
>  	};
>  
>  	leds {
>  		compatible = "gpio-leds";
>  
> -		led_power_green: power {
> +		led_power_green: power_green {
>  			label = "dir-810l:green:power";
>  			gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
>  		};
> @@ -46,7 +46,7 @@
>  			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
>  		};
>  
> -		power2 {
> +		power_orange {
>  			label = "dir-810l:orange:power";
>  			gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
>  		};
> @@ -56,7 +56,7 @@
>  &spi0 {
>  	status = "okay";
>  
> -	m25p80@0 {
> +	flash@0 {
>  		compatible = "jedec,spi-nor";
>  		reg = <0>;
>  		spi-max-frequency = <10000000>;
> @@ -119,7 +119,7 @@
>  
>  &state_default {
>  	gpio {
> -		ralink,group = "mdio", "rgmii1", "i2c", "wled", "uartf";
> +		ralink,group = "i2c", "uartf";
>  		ralink,function = "gpio";
>  	};
>  };
> @@ -130,9 +130,10 @@
>  };
>  
>  &gsw {
> -	mediatek,port4 = "ephy";
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&ephy_pins>;
> +
> +	mediatek,port4 = "ephy";
>  };
>  
>  &pcie {
> @@ -140,9 +141,10 @@
>  };
>  
>  &wmac {
> -	ralink,mtd-eeprom = <&factory 0x0>;
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&pa_pins>;
> +
> +	ralink,mtd-eeprom = <&factory 0x0>;
>  	mtd-mac-address = <&factory 0x28>;
>  };
>
Thomas Richard via openwrt-devel March 2, 2020, 2:59 p.m. UTC | #2
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
Ah, sorry, I also tested the spi-max-frequency.

The device reports a mx25l6405d flash chip. I tried all the maximum
values in the devices' datasheet (Table 10. AC CHARACTERISTICS). All of
them worked with and without "m25p,fast-read":

# 10 MHz
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    1m 33.00s
user    0m 0.01s
sys    1m 7.56s

# 25 MHz
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    0m 34.42s
user    0m 0.02s
sys    0m 23.58s

# 25 MHz, fast read
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    0m 34.45s
user    0m 0.02s
sys    0m 23.59s

# 33 MHz
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    0m 34.39s
user    0m 0.00s
sys    0m 23.60s

# 33 MHz, fast read
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    0m 34.46s
user    0m 0.01s
sys    0m 23.62s

# 50 MHz
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    0m 26.81s
user    0m 0.01s
sys    0m 18.25s

# 50 MHz, fast read
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    0m 26.84s
user    0m 0.00s
sys    0m 18.25s

# 66 MHz
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    0m 26.80s
user    0m 0.01s
sys    0m 18.23s

# 66 MHz, fast read
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    0m 26.80s
user    0m 0.02s
sys    0m 18.23s

# 86 MHz
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    0m 26.84s
user    0m 0.01s
sys    0m 18.24s

# 86 MHz, fast read
root@OpenWrt:~# time cat /dev/mtd* > /dev/null
real    0m 26.80s
user    0m 0.02s
sys    0m 18.23s

It seems that fast read has no effect --or is always enabled, regardless
of the DTS--. I also went for 100 MHz and the device failed to boot
(both with and without fast read).

You can safely use 33 MHz. I don't know, however, it 50 MHz + fast read
is actually working or something else is hindering the max. frequency
from being achieved.

Roger

El 28/2/20 a les 13:33, Roger Pueyo Centelles | Guifi.net ha escrit:
> Hi Adrian,
>
> I tested the patches on the device. I sysupgraded from the current
> master and everything seems OK.
>
> - Partitions
>
> root@OpenWrt:~# cat /proc/mtd
> dev:    size   erasesize  name
> mtd0: 00030000 00001000 "u-boot"
> mtd1: 00010000 00001000 "u-boot-env"
> mtd2: 00010000 00001000 "factory"
> mtd3: 00010000 00001000 "factory5g"
> mtd4: 00010000 00001000 "Wolf_Config"
> mtd5: 00080000 00001000 "MyDlink"
> mtd6: 00080000 00001000 "Jffs2"
> mtd7: 00690000 00001000 "firmware"
> mtd8: 00198a90 00001000 "kernel"
> mtd9: 004f7570 00001000 "rootfs"
> mtd10: 001d4000 00001000 "rootfs_data"
>
> - Button codes OK both
>
> - No missing functionalities
>
> I noticed, however, that the green "Internet" LED blinks to the LAN4
> port, while -I guess- it should blink to the INTERNET (wan/eth0.2) port.
> But this was already happening before, it's not related to your patch.
>
> Roger
>
> El 27/2/20 a les 14:46, Adrian Schmutzler ha escrit:
>> This patch addresses several issues for D-Link DIR-810L:
>>
>> - add correct button codes
>> - harmonize button node names
>> - use generic flash@0
>> - remove unused pin groups from state_default
>> - improve sorting of properties
>>
>> The patch is only build-tested.
>>
>> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
>>
>> ---
>>
>> If somebody owns this device, I'd be delighted about a test of both patches
>> in general as well as if somebody would test if higher SPI frequency is
>> possible.
>>
>> ---
>>  .../ramips/dts/mt7620a_dlink_dir-810l.dts      | 18 ++++++++++--------
>>  1 file changed, 10 insertions(+), 8 deletions(-)
>>
>> diff --git a/target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts b/target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts
>> index 0b1ca26ba4..514e9cc354 100644
>> --- a/target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts
>> +++ b/target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts
>> @@ -23,20 +23,20 @@
>>  		reset {
>>  			label = "reset";
>>  			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
>> -			linux,code = <BTN_0>;
>> +			linux,code = <KEY_RESTART>;
>>  		};
>>  
>>  		wps {
>>  			label = "wps";
>>  			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
>> -			linux,code = <BTN_0>;
>> +			linux,code = <KEY_WPS_BUTTON>;
>>  		};
>>  	};
>>  
>>  	leds {
>>  		compatible = "gpio-leds";
>>  
>> -		led_power_green: power {
>> +		led_power_green: power_green {
>>  			label = "dir-810l:green:power";
>>  			gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
>>  		};
>> @@ -46,7 +46,7 @@
>>  			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
>>  		};
>>  
>> -		power2 {
>> +		power_orange {
>>  			label = "dir-810l:orange:power";
>>  			gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
>>  		};
>> @@ -56,7 +56,7 @@
>>  &spi0 {
>>  	status = "okay";
>>  
>> -	m25p80@0 {
>> +	flash@0 {
>>  		compatible = "jedec,spi-nor";
>>  		reg = <0>;
>>  		spi-max-frequency = <10000000>;
>> @@ -119,7 +119,7 @@
>>  
>>  &state_default {
>>  	gpio {
>> -		ralink,group = "mdio", "rgmii1", "i2c", "wled", "uartf";
>> +		ralink,group = "i2c", "uartf";
>>  		ralink,function = "gpio";
>>  	};
>>  };
>> @@ -130,9 +130,10 @@
>>  };
>>  
>>  &gsw {
>> -	mediatek,port4 = "ephy";
>>  	pinctrl-names = "default";
>>  	pinctrl-0 = <&ephy_pins>;
>> +
>> +	mediatek,port4 = "ephy";
>>  };
>>  
>>  &pcie {
>> @@ -140,9 +141,10 @@
>>  };
>>  
>>  &wmac {
>> -	ralink,mtd-eeprom = <&factory 0x0>;
>>  	pinctrl-names = "default";
>>  	pinctrl-0 = <&pa_pins>;
>> +
>> +	ralink,mtd-eeprom = <&factory 0x0>;
>>  	mtd-mac-address = <&factory 0x28>;
>>  };
>>
Adrian Schmutzler March 3, 2020, 6:14 p.m. UTC | #3
Hi,

> -----Original Message-----
> From: Roger Pueyo Centelles | Guifi.net [mailto:roger.pueyo@guifi.net]
> Sent: Montag, 2. März 2020 15:59
> To: Adrian Schmutzler <freifunk@adrianschmutzler.de>; openwrt-
> devel@lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH 2/2] ramips: fix and tidy up DTS for D-
> Link DIR-810L
> 
> Ah, sorry, I also tested the spi-max-frequency.
> 
> The device reports a mx25l6405d flash chip. I tried all the maximum values in
> the devices' datasheet (Table 10. AC CHARACTERISTICS). All of them worked
> with and without "m25p,fast-read":

thanks for providing this large test series.

> 
> # 10 MHz
> root@OpenWrt:~# time cat /dev/mtd* > /dev/null real    1m 33.00s user    0m
> 0.01s sys    1m 7.56s
> 
> # 25 MHz
> root@OpenWrt:~# time cat /dev/mtd* > /dev/null real    0m 34.42s user    0m
> 0.02s sys    0m 23.58s
> 
> # 25 MHz, fast read
> root@OpenWrt:~# time cat /dev/mtd* > /dev/null real    0m 34.45s user    0m
> 0.02s sys    0m 23.59s
> 
> # 33 MHz
> root@OpenWrt:~# time cat /dev/mtd* > /dev/null real    0m 34.39s user    0m
> 0.00s sys    0m 23.60s
> 
> # 33 MHz, fast read
> root@OpenWrt:~# time cat /dev/mtd* > /dev/null real    0m 34.46s user    0m
> 0.01s sys    0m 23.62s
> 
> # 50 MHz
> root@OpenWrt:~# time cat /dev/mtd* > /dev/null real    0m 26.81s user    0m
> 0.01s sys    0m 18.25s
> 
> # 50 MHz, fast read
> root@OpenWrt:~# time cat /dev/mtd* > /dev/null real    0m 26.84s user    0m
> 0.00s sys    0m 18.25s
> 
> # 66 MHz
> root@OpenWrt:~# time cat /dev/mtd* > /dev/null real    0m 26.80s user    0m
> 0.01s sys    0m 18.23s
> 
> # 66 MHz, fast read
> root@OpenWrt:~# time cat /dev/mtd* > /dev/null real    0m 26.80s user    0m
> 0.02s sys    0m 18.23s
> 
> # 86 MHz
> root@OpenWrt:~# time cat /dev/mtd* > /dev/null real    0m 26.84s user    0m
> 0.01s sys    0m 18.24s
> 
> # 86 MHz, fast read
> root@OpenWrt:~# time cat /dev/mtd* > /dev/null real    0m 26.80s user    0m
> 0.02s sys    0m 18.23s
> 
> It seems that fast read has no effect --or is always enabled, regardless of the
> DTS--. I also went for 100 MHz and the device failed to boot (both with and
> without fast read).
> 
> You can safely use 33 MHz. I don't know, however, it 50 MHz + fast read is

Why 33 MHz and not 50 MHz, where the duration drops again? I do not get you argumentation here ...

Best

Adrian

> actually working or something else is hindering the max. frequency from
> being achieved.
> 
> Roger
> 
> El 28/2/20 a les 13:33, Roger Pueyo Centelles | Guifi.net ha escrit:
> > Hi Adrian,
> >
> > I tested the patches on the device. I sysupgraded from the current
> > master and everything seems OK.
> >
> > - Partitions
> >
> > root@OpenWrt:~# cat /proc/mtd
> > dev:    size   erasesize  name
> > mtd0: 00030000 00001000 "u-boot"
> > mtd1: 00010000 00001000 "u-boot-env"
> > mtd2: 00010000 00001000 "factory"
> > mtd3: 00010000 00001000 "factory5g"
> > mtd4: 00010000 00001000 "Wolf_Config"
> > mtd5: 00080000 00001000 "MyDlink"
> > mtd6: 00080000 00001000 "Jffs2"
> > mtd7: 00690000 00001000 "firmware"
> > mtd8: 00198a90 00001000 "kernel"
> > mtd9: 004f7570 00001000 "rootfs"
> > mtd10: 001d4000 00001000 "rootfs_data"
> >
> > - Button codes OK both
> >
> > - No missing functionalities
> >
> > I noticed, however, that the green "Internet" LED blinks to the LAN4
> > port, while -I guess- it should blink to the INTERNET (wan/eth0.2) port.
> > But this was already happening before, it's not related to your patch.
> >
> > Roger
> >
> > El 27/2/20 a les 14:46, Adrian Schmutzler ha escrit:
> >> This patch addresses several issues for D-Link DIR-810L:
> >>
> >> - add correct button codes
> >> - harmonize button node names
> >> - use generic flash@0
> >> - remove unused pin groups from state_default
> >> - improve sorting of properties
> >>
> >> The patch is only build-tested.
> >>
> >> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
> >>
> >> ---
> >>
> >> If somebody owns this device, I'd be delighted about a test of both
> >> patches in general as well as if somebody would test if higher SPI
> >> frequency is possible.
> >>
> >> ---
> >>  .../ramips/dts/mt7620a_dlink_dir-810l.dts      | 18 ++++++++++--------
> >>  1 file changed, 10 insertions(+), 8 deletions(-)
> >>
> >> diff --git a/target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts
> >> b/target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts
> >> index 0b1ca26ba4..514e9cc354 100644
> >> --- a/target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts
> >> +++ b/target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts
> >> @@ -23,20 +23,20 @@
> >>  		reset {
> >>  			label = "reset";
> >>  			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
> >> -			linux,code = <BTN_0>;
> >> +			linux,code = <KEY_RESTART>;
> >>  		};
> >>
> >>  		wps {
> >>  			label = "wps";
> >>  			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
> >> -			linux,code = <BTN_0>;
> >> +			linux,code = <KEY_WPS_BUTTON>;
> >>  		};
> >>  	};
> >>
> >>  	leds {
> >>  		compatible = "gpio-leds";
> >>
> >> -		led_power_green: power {
> >> +		led_power_green: power_green {
> >>  			label = "dir-810l:green:power";
> >>  			gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
> >>  		};
> >> @@ -46,7 +46,7 @@
> >>  			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
> >>  		};
> >>
> >> -		power2 {
> >> +		power_orange {
> >>  			label = "dir-810l:orange:power";
> >>  			gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
> >>  		};
> >> @@ -56,7 +56,7 @@
> >>  &spi0 {
> >>  	status = "okay";
> >>
> >> -	m25p80@0 {
> >> +	flash@0 {
> >>  		compatible = "jedec,spi-nor";
> >>  		reg = <0>;
> >>  		spi-max-frequency = <10000000>;
> >> @@ -119,7 +119,7 @@
> >>
> >>  &state_default {
> >>  	gpio {
> >> -		ralink,group = "mdio", "rgmii1", "i2c", "wled", "uartf";
> >> +		ralink,group = "i2c", "uartf";
> >>  		ralink,function = "gpio";
> >>  	};
> >>  };
> >> @@ -130,9 +130,10 @@
> >>  };
> >>
> >>  &gsw {
> >> -	mediatek,port4 = "ephy";
> >>  	pinctrl-names = "default";
> >>  	pinctrl-0 = <&ephy_pins>;
> >> +
> >> +	mediatek,port4 = "ephy";
> >>  };
> >>
> >>  &pcie {
> >> @@ -140,9 +141,10 @@
> >>  };
> >>
> >>  &wmac {
> >> -	ralink,mtd-eeprom = <&factory 0x0>;
> >>  	pinctrl-names = "default";
> >>  	pinctrl-0 = <&pa_pins>;
> >> +
> >> +	ralink,mtd-eeprom = <&factory 0x0>;
> >>  	mtd-mac-address = <&factory 0x28>;
> >>  };
> >>
Thomas Richard via openwrt-devel March 3, 2020, 6:38 p.m. UTC | #4
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
Hi,

El 3/3/20 a les 19:14, Adrian Schmutzler ha escrit:
> Why 33 MHz and not 50 MHz, where the duration drops again? I do not get you argumentation here ...

I checked again, 50 MHz corresponds to 2READ (2 I/O), not to FAST_READ.
So, yes, 50 MHz should be the maximum, not 33 MHz.

Roger

>
> Best
>
> Adrian
>
Adrian Schmutzler March 5, 2020, 12:05 p.m. UTC | #5
Thanks again for your massive help, Roger. I've merged both patches and
added a third one for the spi frequency on top.

I took the liberty to add your Tested-by.

Best

Adrian

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org]
> On Behalf Of Roger Pueyo Centelles | Guifi.net via openwrt-devel
> Sent: Montag, 2. März 2020 15:59
> To: Adrian Schmutzler <freifunk@adrianschmutzler.de>; openwrt-
> devel@lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH 2/2] ramips: fix and tidy up DTS for
D-
> Link DIR-810L
> 
> The sender domain has a DMARC Reject/Quarantine policy which disallows
> sending mailing list messages using the original "From" header.
> 
> To mitigate this problem, the original message has been wrapped
> automatically by the mailing list software.
Adrian Schmutzler March 5, 2020, 6:42 p.m. UTC | #6
Hi,

> I noticed, however, that the green "Internet" LED blinks to the LAN4 port,
> while -I guess- it should blink to the INTERNET (wan/eth0.2) port.
> But this was already happening before, it's not related to your patch.

green internet LED is not present in the DTS (only orange WAN LED), and there is no entry for the device in 01_leds.

So, the LED seems to be controlled by some driver ...

Best

Adrian
diff mbox series

Patch

diff --git a/target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts b/target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts
index 0b1ca26ba4..514e9cc354 100644
--- a/target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts
+++ b/target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts
@@ -23,20 +23,20 @@ 
 		reset {
 			label = "reset";
 			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
-			linux,code = <BTN_0>;
+			linux,code = <KEY_RESTART>;
 		};
 
 		wps {
 			label = "wps";
 			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
-			linux,code = <BTN_0>;
+			linux,code = <KEY_WPS_BUTTON>;
 		};
 	};
 
 	leds {
 		compatible = "gpio-leds";
 
-		led_power_green: power {
+		led_power_green: power_green {
 			label = "dir-810l:green:power";
 			gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
 		};
@@ -46,7 +46,7 @@ 
 			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
 		};
 
-		power2 {
+		power_orange {
 			label = "dir-810l:orange:power";
 			gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
 		};
@@ -56,7 +56,7 @@ 
 &spi0 {
 	status = "okay";
 
-	m25p80@0 {
+	flash@0 {
 		compatible = "jedec,spi-nor";
 		reg = <0>;
 		spi-max-frequency = <10000000>;
@@ -119,7 +119,7 @@ 
 
 &state_default {
 	gpio {
-		ralink,group = "mdio", "rgmii1", "i2c", "wled", "uartf";
+		ralink,group = "i2c", "uartf";
 		ralink,function = "gpio";
 	};
 };
@@ -130,9 +130,10 @@ 
 };
 
 &gsw {
-	mediatek,port4 = "ephy";
 	pinctrl-names = "default";
 	pinctrl-0 = <&ephy_pins>;
+
+	mediatek,port4 = "ephy";
 };
 
 &pcie {
@@ -140,9 +141,10 @@ 
 };
 
 &wmac {
-	ralink,mtd-eeprom = <&factory 0x0>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pa_pins>;
+
+	ralink,mtd-eeprom = <&factory 0x0>;
 	mtd-mac-address = <&factory 0x28>;
 };