Re: [LEDE-DEV] [PATCH v2] ramips: add support for GL-inet GL-MT300N-V2

2017-05-13 Thread Daniel Golle
On Fri, May 12, 2017 at 05:51:18PM -0500, L. D. Pinney wrote:
> On Fri, May 12, 2017 at 5:29 PM, Mathias Kresin  wrote:
> > 12.05.2017 03:37, kyson lok:
> >>
> >> On Fri, May 12, 2017 at 6:18 AM, L. D. Pinney  wrote:
> 
>  + {
>  +   status = "okay";
>  +
>  +   m25p80@0 {
>  +   #address-cells = <1>;
>  +   #size-cells = <1>;
>  +   compatible = "jedec,spi-nor";
>  +   reg = <0>;
>  +   spi-max-frequency = <1000>;
>  +   m25p,chunked-io = <32>;
>  +
>  +   partition@0 {
>  +   label = "u-boot";
>  +   reg = <0x0 0x3>;
>  +   read-only;
>  +   };
>  +
>  +   partition@3 {
>  +   label = "u-boot-env";
>  +   reg = <0x3 0x1>;
>  +   read-only;
> >>>
> >>>
> >>> Is there a reason that users can not or should not write to the
> >>> uboot-env partition?
> >
> >
> > Yes, to prevent the user to shout them self into the foot. If it ain't broke
> > don't fix it.
> 
> "Unix was not designed to stop you from doing stupid things, because
> that would also stop you from doing clever things."
>  Doug Gwyn
> 
> In this case using the uboot-envtools package...

I generally agree with that philosophy, however, in this case there are
hardly any options other shooting yourself into the foot.
The ramips-version of U-Boot doesn't really allow for any fancy things
to be done with it -- and people who really want to risk ending up
with a device which no longer boots and is only recoverable via serial
console can as well change the device-tree to have unprotected access
to the flash.
Also note that most (if not nearly all) other ramips target got the
u-boot-env partition set to be read-only for that reason.


> >>> Is this correct? other mt76x8 devices with 16MB SPI Flash use :
> >>>
> >>> partition@5 {
> >>> label = "firmware";
> >>> reg = <0x5 0xfb>;
> >>>
> >>
> >> I think it doesn't matter. I only use 15MB for firmware.
> >
> >
> > But why don't you use all available flash space? As far as I can see, there
> > isn't anything in the last 704 KB of the flash. If possible expand the
> > firmware partition to use all of the remaining flash space.
> >
> > Please update the IMAGE_SIZE in the build code to the value set here.

Yes, please use the whole flash chip and don't leave behind unused
areas.


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH v2] ramips: add support for GL-inet GL-MT300N-V2

2017-05-12 Thread L. D. Pinney
On Fri, May 12, 2017 at 5:29 PM, Mathias Kresin  wrote:
> 12.05.2017 03:37, kyson lok:
>>
>> On Fri, May 12, 2017 at 6:18 AM, L. D. Pinney  wrote:

 + {
 +   status = "okay";
 +
 +   m25p80@0 {
 +   #address-cells = <1>;
 +   #size-cells = <1>;
 +   compatible = "jedec,spi-nor";
 +   reg = <0>;
 +   spi-max-frequency = <1000>;
 +   m25p,chunked-io = <32>;
 +
 +   partition@0 {
 +   label = "u-boot";
 +   reg = <0x0 0x3>;
 +   read-only;
 +   };
 +
 +   partition@3 {
 +   label = "u-boot-env";
 +   reg = <0x3 0x1>;
 +   read-only;
>>>
>>>
>>> Is there a reason that users can not or should not write to the
>>> uboot-env partition?
>
>
> Yes, to prevent the user to shout them self into the foot. If it ain't broke
> don't fix it.

"Unix was not designed to stop you from doing stupid things, because
that would also stop you from doing clever things."
 Doug Gwyn

In this case using the uboot-envtools package...

>
>>>
>>>partition@3 {
>>>   label = "u-boot-env";
>>>   reg = <0x3 0x1>;
>>>   read-only; < remove this line IF it is
>>> OK for user to write here.
>>
>>
>> I don't think user can write to uboot-env, other vendor does not.
>>
>>>
 +   };
 +
 +   factory: partition@4 {
 +   label = "factory";
 +   reg = <0x4 0x1>;
 +   read-only;
 +   };
 +
 +   partition@5 {
 +   label = "firmware";
 +   reg = <0x5 0xf0>;
>>>
>>>
>>> Is this correct? other mt76x8 devices with 16MB SPI Flash use :
>>>
>>> partition@5 {
>>> label = "firmware";
>>> reg = <0x5 0xfb>;
>>>
>>
>> I think it doesn't matter. I only use 15MB for firmware.
>
>
> But why don't you use all available flash space? As far as I can see, there
> isn't anything in the last 704 KB of the flash. If possible expand the
> firmware partition to use all of the remaining flash space.
>
> Please update the IMAGE_SIZE in the build code to the value set here.
>
> Mathias

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH v2] ramips: add support for GL-inet GL-MT300N-V2

2017-05-12 Thread Mathias Kresin

12.05.2017 03:37, kyson lok:

On Fri, May 12, 2017 at 6:18 AM, L. D. Pinney  wrote:

+ {
+   status = "okay";
+
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "jedec,spi-nor";
+   reg = <0>;
+   spi-max-frequency = <1000>;
+   m25p,chunked-io = <32>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   read-only;
+   };
+
+   partition@3 {
+   label = "u-boot-env";
+   reg = <0x3 0x1>;
+   read-only;


Is there a reason that users can not or should not write to the
uboot-env partition?


Yes, to prevent the user to shout them self into the foot. If it ain't 
broke don't fix it.




   partition@3 {
  label = "u-boot-env";
  reg = <0x3 0x1>;
  read-only; < remove this line IF it is
OK for user to write here.


I don't think user can write to uboot-env, other vendor does not.




+   };
+
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 0x1>;
+   read-only;
+   };
+
+   partition@5 {
+   label = "firmware";
+   reg = <0x5 0xf0>;


Is this correct? other mt76x8 devices with 16MB SPI Flash use :

partition@5 {
label = "firmware";
reg = <0x5 0xfb>;



I think it doesn't matter. I only use 15MB for firmware.


But why don't you use all available flash space? As far as I can see, 
there isn't anything in the last 704 KB of the flash. If possible expand 
the firmware partition to use all of the remaining flash space.


Please update the IMAGE_SIZE in the build code to the value set here.

Mathias

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH v2] ramips: add support for GL-inet GL-MT300N-V2

2017-05-11 Thread kyson lok
On Fri, May 12, 2017 at 6:18 AM, L. D. Pinney  wrote:
> Hi Kyson :
>
> v2 looks much better ...
> Not a LEDE dev...comments inline.
>
> Thanks for your contribution efforts!
>
> Larry

Thanks for your review, I will modify it later.

>
> On Thu, May 11, 2017 at 3:48 AM, kysonlok  wrote:
>> This patch adds supports for the GL-inet GL-MT300N-V2.
>>
>> Specification:
>> - SoC: MediaTek MT7628AN
>> - Flash: 16 MiB (W25Q128FVSG)
>> - RAM: 128 MiB DDR
>> - Ethernet: 1 x WAN (100 Mbps) and 1 x LAN (100 Mbps)
>> - USB: 1 x USB 2.0 port
>> - Button: 1 x switch button, 1 x reset button
>> - LED: 3 x LEDS (system power led is not GPIO controller)
>> - UART: 1 x UART on PCB (JP1: 3.3V, RX, TX, GND)
>>
>> Installation through Luci:
>> - The original firmware is LEDE, so both LuCI or sysupgrade can be used.
>> - Do not keep settings, for sysupgrade please use the -n option.
>>
>> Installation through bootloader webserver:
>> - Plug power and hold reset button until red LED blink to bright.
>> - Install sysupgrade image using web interface on 192.168.1.1.
>>
>> Signed-off-by: kyson Lok 
>> ---
>>  target/linux/ramips/base-files/etc/board.d/01_leds |   3 +
>>  .../linux/ramips/base-files/etc/board.d/02_network |   4 +
>>  target/linux/ramips/base-files/etc/diag.sh |   3 +
>>  target/linux/ramips/base-files/lib/ramips.sh   |   3 +
>>  .../ramips/base-files/lib/upgrade/platform.sh  |   1 +
>>  target/linux/ramips/dts/GL-MT300N-V2.dts   | 133 
>> +
>>  target/linux/ramips/image/mt7628.mk|   8 ++
>>  7 files changed, 155 insertions(+)
>>  create mode 100644 target/linux/ramips/dts/GL-MT300N-V2.dts
>>
>> diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
>> b/target/linux/ramips/base-files/etc/board.d/01_leds
>> index 52542ec..6c95a92 100755
>> --- a/target/linux/ramips/base-files/etc/board.d/01_leds
>> +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
>> @@ -189,6 +189,9 @@ gl-mt300n|\
>>  gl-mt750)
>> set_wifi_led "$board:wlan"
>> ;;
>> +gl-mt300n-v2)
>> +   set_wifi_led "$board:red:wlan"
>> +   ;;
>>  hc5661|\
>>  hc5661a)
>> ucidef_set_led_default "system" "system" "$board:blue:system" "1"
>> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
>> b/target/linux/ramips/base-files/etc/board.d/02_network
>> index 80a3bc2..741e702 100755
>> --- a/target/linux/ramips/base-files/etc/board.d/02_network
>> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
>> @@ -175,6 +175,10 @@ ramips_setup_interfaces()
>> ucidef_add_switch "switch0" \
>> "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0"
>> ;;
>> +   gl-mt300n-v2)
>> +   ucidef_add_switch "switch0" \
>> +   "1:lan" "0:wan" "6@eth0"
>> +   ;;
>> awapn2403)
>> ucidef_add_switch "switch0" \
>> "0:lan" "1:wan" "6@eth0"
>> diff --git a/target/linux/ramips/base-files/etc/diag.sh 
>> b/target/linux/ramips/base-files/etc/diag.sh
>> index 461f46c..e051dfd 100644
>> --- a/target/linux/ramips/base-files/etc/diag.sh
>> +++ b/target/linux/ramips/base-files/etc/diag.sh
>> @@ -164,6 +164,9 @@ get_status_led() {
>> miwifi-nano)
>> status_led="$board:blue:status"
>> ;;
>> +   gl-mt300n-v2)
>> +   status_led="$board:red:wlan"
>> +   ;;
>> m4-4M|\
>> m4-8M)
>> status_led="m4:blue:status"
>> diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
>> b/target/linux/ramips/base-files/lib/ramips.sh
>> index 87cb7ff..1e031cd 100755
>> --- a/target/linux/ramips/base-files/lib/ramips.sh
>> +++ b/target/linux/ramips/base-files/lib/ramips.sh
>> @@ -214,6 +214,9 @@ ramips_board_detect() {
>> *"GL-MT300N")
>> name="gl-mt300n"
>> ;;
>> +   *"GL-MT300N-V2")
>> +   name="gl-mt300n-v2"
>> +   ;;
>> *"GL-MT750")
>> name="gl-mt750"
>> ;;
>> diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
>> b/target/linux/ramips/base-files/lib/upgrade/platform.sh
>> index adad8da..2c50c3c 100755
>> --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
>> +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
>> @@ -64,6 +64,7 @@ platform_check_image() {
>> freestation5|\
>> gl-mt300a|\
>> gl-mt300n|\
>> +   gl-mt300n-v2|\
>> gl-mt750|\
>> hc5*61|\
>> hc5661a|\
>> diff --git a/target/linux/ramips/dts/GL-MT300N-V2.dts 
>> b/target/linux/ramips/dts/GL-MT300N-V2.dts
>> new file mode 100644
>> index 000..0e2777f
>> --- /dev/null
>> +++ b/target/linux/ramips/dts/GL-MT300N-V2.dts
>> @@ -0,0 +1,133 @@
>> +/dts-v1/;
>> +
>> +#include "mt7628an.dtsi"
>> +
>> +#include 
>> +#include 
>> +
>> +/{
>> +

Re: [LEDE-DEV] [PATCH v2] ramips: add support for GL-inet GL-MT300N-V2

2017-05-11 Thread L. D. Pinney
Hi Kyson :

v2 looks much better ...
Not a LEDE dev...comments inline.

Thanks for your contribution efforts!

Larry

On Thu, May 11, 2017 at 3:48 AM, kysonlok  wrote:
> This patch adds supports for the GL-inet GL-MT300N-V2.
>
> Specification:
> - SoC: MediaTek MT7628AN
> - Flash: 16 MiB (W25Q128FVSG)
> - RAM: 128 MiB DDR
> - Ethernet: 1 x WAN (100 Mbps) and 1 x LAN (100 Mbps)
> - USB: 1 x USB 2.0 port
> - Button: 1 x switch button, 1 x reset button
> - LED: 3 x LEDS (system power led is not GPIO controller)
> - UART: 1 x UART on PCB (JP1: 3.3V, RX, TX, GND)
>
> Installation through Luci:
> - The original firmware is LEDE, so both LuCI or sysupgrade can be used.
> - Do not keep settings, for sysupgrade please use the -n option.
>
> Installation through bootloader webserver:
> - Plug power and hold reset button until red LED blink to bright.
> - Install sysupgrade image using web interface on 192.168.1.1.
>
> Signed-off-by: kyson Lok 
> ---
>  target/linux/ramips/base-files/etc/board.d/01_leds |   3 +
>  .../linux/ramips/base-files/etc/board.d/02_network |   4 +
>  target/linux/ramips/base-files/etc/diag.sh |   3 +
>  target/linux/ramips/base-files/lib/ramips.sh   |   3 +
>  .../ramips/base-files/lib/upgrade/platform.sh  |   1 +
>  target/linux/ramips/dts/GL-MT300N-V2.dts   | 133 
> +
>  target/linux/ramips/image/mt7628.mk|   8 ++
>  7 files changed, 155 insertions(+)
>  create mode 100644 target/linux/ramips/dts/GL-MT300N-V2.dts
>
> diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
> b/target/linux/ramips/base-files/etc/board.d/01_leds
> index 52542ec..6c95a92 100755
> --- a/target/linux/ramips/base-files/etc/board.d/01_leds
> +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
> @@ -189,6 +189,9 @@ gl-mt300n|\
>  gl-mt750)
> set_wifi_led "$board:wlan"
> ;;
> +gl-mt300n-v2)
> +   set_wifi_led "$board:red:wlan"
> +   ;;
>  hc5661|\
>  hc5661a)
> ucidef_set_led_default "system" "system" "$board:blue:system" "1"
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
> b/target/linux/ramips/base-files/etc/board.d/02_network
> index 80a3bc2..741e702 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -175,6 +175,10 @@ ramips_setup_interfaces()
> ucidef_add_switch "switch0" \
> "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0"
> ;;
> +   gl-mt300n-v2)
> +   ucidef_add_switch "switch0" \
> +   "1:lan" "0:wan" "6@eth0"
> +   ;;
> awapn2403)
> ucidef_add_switch "switch0" \
> "0:lan" "1:wan" "6@eth0"
> diff --git a/target/linux/ramips/base-files/etc/diag.sh 
> b/target/linux/ramips/base-files/etc/diag.sh
> index 461f46c..e051dfd 100644
> --- a/target/linux/ramips/base-files/etc/diag.sh
> +++ b/target/linux/ramips/base-files/etc/diag.sh
> @@ -164,6 +164,9 @@ get_status_led() {
> miwifi-nano)
> status_led="$board:blue:status"
> ;;
> +   gl-mt300n-v2)
> +   status_led="$board:red:wlan"
> +   ;;
> m4-4M|\
> m4-8M)
> status_led="m4:blue:status"
> diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
> b/target/linux/ramips/base-files/lib/ramips.sh
> index 87cb7ff..1e031cd 100755
> --- a/target/linux/ramips/base-files/lib/ramips.sh
> +++ b/target/linux/ramips/base-files/lib/ramips.sh
> @@ -214,6 +214,9 @@ ramips_board_detect() {
> *"GL-MT300N")
> name="gl-mt300n"
> ;;
> +   *"GL-MT300N-V2")
> +   name="gl-mt300n-v2"
> +   ;;
> *"GL-MT750")
> name="gl-mt750"
> ;;
> diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
> b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> index adad8da..2c50c3c 100755
> --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> @@ -64,6 +64,7 @@ platform_check_image() {
> freestation5|\
> gl-mt300a|\
> gl-mt300n|\
> +   gl-mt300n-v2|\
> gl-mt750|\
> hc5*61|\
> hc5661a|\
> diff --git a/target/linux/ramips/dts/GL-MT300N-V2.dts 
> b/target/linux/ramips/dts/GL-MT300N-V2.dts
> new file mode 100644
> index 000..0e2777f
> --- /dev/null
> +++ b/target/linux/ramips/dts/GL-MT300N-V2.dts
> @@ -0,0 +1,133 @@
> +/dts-v1/;
> +
> +#include "mt7628an.dtsi"
> +
> +#include 
> +#include 
> +
> +/{
> +   compatible = "gl-inet,gl-mt300n-v2", "ralink,mt7620an-soc";
> +   model = "GL-MT300N-V2";
> +
> +   chosen {
> +   bootargs = "console=ttyS0,115200";
> +   };
> +
> +   memory@0 {
> +   device_type = "memory";
> +   

[LEDE-DEV] [PATCH v2] ramips: add support for GL-inet GL-MT300N-V2

2017-05-11 Thread kysonlok
This patch adds supports for the GL-inet GL-MT300N-V2.

Specification:
- SoC: MediaTek MT7628AN
- Flash: 16 MiB (W25Q128FVSG)
- RAM: 128 MiB DDR
- Ethernet: 1 x WAN (100 Mbps) and 1 x LAN (100 Mbps)
- USB: 1 x USB 2.0 port
- Button: 1 x switch button, 1 x reset button
- LED: 3 x LEDS (system power led is not GPIO controller)
- UART: 1 x UART on PCB (JP1: 3.3V, RX, TX, GND)

Installation through Luci:
- The original firmware is LEDE, so both LuCI or sysupgrade can be used.
- Do not keep settings, for sysupgrade please use the -n option.

Installation through bootloader webserver:
- Plug power and hold reset button until red LED blink to bright.
- Install sysupgrade image using web interface on 192.168.1.1.

Signed-off-by: kyson Lok 
---
 target/linux/ramips/base-files/etc/board.d/01_leds |   3 +
 .../linux/ramips/base-files/etc/board.d/02_network |   4 +
 target/linux/ramips/base-files/etc/diag.sh |   3 +
 target/linux/ramips/base-files/lib/ramips.sh   |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ramips/dts/GL-MT300N-V2.dts   | 133 +
 target/linux/ramips/image/mt7628.mk|   8 ++
 7 files changed, 155 insertions(+)
 create mode 100644 target/linux/ramips/dts/GL-MT300N-V2.dts

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
b/target/linux/ramips/base-files/etc/board.d/01_leds
index 52542ec..6c95a92 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -189,6 +189,9 @@ gl-mt300n|\
 gl-mt750)
set_wifi_led "$board:wlan"
;;
+gl-mt300n-v2)
+   set_wifi_led "$board:red:wlan"
+   ;;
 hc5661|\
 hc5661a)
ucidef_set_led_default "system" "system" "$board:blue:system" "1"
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
b/target/linux/ramips/base-files/etc/board.d/02_network
index 80a3bc2..741e702 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -175,6 +175,10 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0"
;;
+   gl-mt300n-v2)
+   ucidef_add_switch "switch0" \
+   "1:lan" "0:wan" "6@eth0"
+   ;;
awapn2403)
ucidef_add_switch "switch0" \
"0:lan" "1:wan" "6@eth0"
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index 461f46c..e051dfd 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -164,6 +164,9 @@ get_status_led() {
miwifi-nano)
status_led="$board:blue:status"
;;
+   gl-mt300n-v2)
+   status_led="$board:red:wlan"
+   ;;
m4-4M|\
m4-8M)
status_led="m4:blue:status"
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 87cb7ff..1e031cd 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -214,6 +214,9 @@ ramips_board_detect() {
*"GL-MT300N")
name="gl-mt300n"
;;
+   *"GL-MT300N-V2")
+   name="gl-mt300n-v2"
+   ;;
*"GL-MT750")
name="gl-mt750"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index adad8da..2c50c3c 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -64,6 +64,7 @@ platform_check_image() {
freestation5|\
gl-mt300a|\
gl-mt300n|\
+   gl-mt300n-v2|\
gl-mt750|\
hc5*61|\
hc5661a|\
diff --git a/target/linux/ramips/dts/GL-MT300N-V2.dts 
b/target/linux/ramips/dts/GL-MT300N-V2.dts
new file mode 100644
index 000..0e2777f
--- /dev/null
+++ b/target/linux/ramips/dts/GL-MT300N-V2.dts
@@ -0,0 +1,133 @@
+/dts-v1/;
+
+#include "mt7628an.dtsi"
+
+#include 
+#include 
+
+/{
+   compatible = "gl-inet,gl-mt300n-v2", "ralink,mt7620an-soc";
+   model = "GL-MT300N-V2";
+
+   chosen {
+   bootargs = "console=ttyS0,115200";
+   };
+
+   memory@0 {
+   device_type = "memory";
+   reg = <0x0 0x800>;
+   };
+
+   gpio-leds {
+   compatible = "gpio-leds";
+
+   wan {
+   label = "gl-mt300n-v2:blue:wan";
+   gpios = < 11 GPIO_ACTIVE_LOW>;
+   };
+
+   wlan {
+   label = "gl-mt300n-v2:red:wlan";
+   gpios = < 12 GPIO_ACTIVE_LOW>;
+   };
+   };
+
+   gpio-keys