From abbfcc85259a4f6658c61e99dd3d2d3567e3eb3a Mon Sep 17 00:00:00 2001 From: Kyson Lok Date: Wed, 17 May 2017 18:18:45 +0800 Subject: ramips: add support for GL-inet GL-MT300N-V2 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 [match maximum image size with firmware partition] Signed-off-by: Mathias Kresin --- target/linux/ramips/dts/GL-MT300N-V2.dts | 133 +++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 target/linux/ramips/dts/GL-MT300N-V2.dts (limited to 'target/linux/ramips/dts') 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 0000000..e40c4cf --- /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 0x8000000>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wan { + label = "gl-mt300n-v2:blue:wan"; + gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; + }; + + wlan { + label = "gl-mt300n-v2:red:wlan"; + gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; + }; + }; + + gpio-keys { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + BTN_0 { + label = "BTN_0"; + gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + BTN_1 { + label = "BTN_1"; + gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + gpio_export { + compatible = "gpio-export"; + #size-cells = <0>; + + usb { + gpio-export,name = "usb"; + gpio-export,output = <1>; + gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; + }; + }; + +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "wdt", "gpio", "wled_an", "p0led_an", "i2s"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4000>; +}; + +&wmac { + status = "okay"; + ralink,mtd-eeprom = <&factory 0x0>; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + m25p,chunked-io = <32>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; -- cgit v1.1