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