ramips: improve netis WF-2881 support
[oweals/openwrt.git] / target / linux / ramips / dts / mt7628an_glinet_gl-mt300n-v2.dts
1 /dts-v1/;
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 /{
9         compatible = "glinet,gl-mt300n-v2", "mediatek,mt7628an-soc";
10         model = "GL-MT300N-V2";
11
12         aliases {
13                 led-boot = &led_power;
14                 led-failsafe = &led_power;
15                 led-running = &led_power;
16                 led-upgrade = &led_power;
17                 label-mac-device = &ethernet;
18         };
19
20         chosen {
21                 bootargs = "console=ttyS0,115200";
22         };
23
24         leds {
25                 compatible = "gpio-leds";
26
27                 led_power: power {
28                         label = "gl-mt300n-v2:green:power";
29                         default-state = "on";
30                         gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
31                 };
32
33                 wan {
34                         label = "gl-mt300n-v2:green:wan";
35                         gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
36                 };
37
38                 wlan {
39                         label = "gl-mt300n-v2:red:wlan";
40                         gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
41                 };
42         };
43
44         keys {
45                 compatible = "gpio-keys";
46
47                 reset {
48                         label = "reset";
49                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
50                         linux,code = <KEY_RESTART>;
51                 };
52
53                 BTN_0 {
54                         label = "BTN_0";
55                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
56                         linux,code = <BTN_0>;
57                 };
58
59                 BTN_1 {
60                         label = "BTN_1";
61                         gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
62                         linux,code = <BTN_1>;
63                 };
64         };
65
66         gpio_export {
67                 compatible = "gpio-export";
68                 #size-cells = <0>;
69
70                 usb {
71                         gpio-export,name = "usb";
72                         gpio-export,output = <1>;
73                         gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
74                 };
75         };
76 };
77
78 &pinctrl {
79         state_default: pinctrl0 {
80                 gpio {
81                         ralink,group = "wdt", "gpio", "wled_an", "p0led_an", "p1led_an", "i2s";
82                         ralink,function = "gpio";
83                 };
84         };
85 };
86
87 &ethernet {
88         mtd-mac-address = <&factory 0x4>;
89 };
90
91 &wmac {
92         status = "okay";
93 };
94
95 &spi0 {
96         status = "okay";
97
98         m25p80@0 {
99                 compatible = "jedec,spi-nor";
100                 reg = <0>;
101                 spi-max-frequency = <10000000>;
102
103                 partitions {
104                         compatible = "fixed-partitions";
105                         #address-cells = <1>;
106                         #size-cells = <1>;
107
108                         partition@0 {
109                                 label = "u-boot";
110                                 reg = <0x0 0x30000>;
111                                 read-only;
112                         };
113
114                         partition@30000 {
115                                 label = "u-boot-env";
116                                 reg = <0x30000 0x10000>;
117                                 read-only;
118                         };
119
120                         factory: partition@40000 {
121                                 label = "factory";
122                                 reg = <0x40000 0x10000>;
123                                 read-only;
124                         };
125
126                         partition@50000 {
127                                 compatible = "denx,uimage";
128                                 label = "firmware";
129                                 reg = <0x50000 0xfb0000>;
130                         };
131                 };
132         };
133 };
134
135 &uart1 {
136         status = "okay";
137 };
138
139 &ehci {
140         status = "okay";
141 };
142
143 &ohci {
144         status = "okay";
145 };