ramips: fix power LED DTB for wt3020
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / GL-MT300A.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "glinet,gl-mt300a", "ralink,mt7620a-soc";
10 model = "GL-MT300A";
11
12 chosen {
13 bootargs = "console=ttyS0,115200";
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 wan {
20 label = "gl-mt300a:wan";
21 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
22 };
23
24 lan {
25 label = "gl-mt300a:lan";
26 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
27 };
28
29 wlan {
30 label = "gl-mt300a:wlan";
31 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
32 };
33
34 usb {
35 label = "gl-mt300a:usb";
36 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
37 };
38 };
39
40 gpio-keys-polled {
41 compatible = "gpio-keys-polled";
42 poll-interval = <20>;
43 reset {
44 label = "reset";
45 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_RESTART>;
47 };
48
49 BTN_0 {
50 label = "BTN_0";
51 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
52 linux,code = <BTN_0>;
53 };
54
55 BTN_1 {
56 label = "BTN_1";
57 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
58 linux,code = <BTN_1>;
59 };
60 };
61 };
62
63 &gpio0 {
64 status = "okay";
65 };
66
67 &gpio1 {
68 status = "okay";
69 };
70
71 &gpio2 {
72 status = "okay";
73 };
74
75 &gpio3 {
76 status = "okay";
77 };
78
79 &spi0 {
80 status = "okay";
81
82 m25p80@0 {
83 compatible = "jedec,spi-nor";
84 reg = <0>;
85 spi-max-frequency = <10000000>;
86
87 partitions {
88 compatible = "fixed-partitions";
89 #address-cells = <1>;
90 #size-cells = <1>;
91
92 partition@0 {
93 label = "u-boot";
94 reg = <0x0 0x30000>;
95 };
96
97 partition@30000 {
98 label = "u-boot-env";
99 reg = <0x30000 0x10000>;
100 read-only;
101 };
102
103 factory: partition@40000 {
104 label = "factory";
105 reg = <0x40000 0x10000>;
106 read-only;
107 };
108
109 partition@50000 {
110 label = "firmware";
111 reg = <0x50000 0xf80000>;
112 };
113
114 partition@ff0000 {
115 label = "art";
116 reg = <0xff0000 0x10000>;
117 };
118 };
119 };
120 };
121
122 &sdhci {
123 status = "okay";
124 };
125
126 &ehci {
127 status = "okay";
128 };
129
130 &ohci {
131 status = "okay";
132 };
133
134 &ethernet {
135 mtd-mac-address = <&factory 0x4000>;
136 mediatek,portmap = "wllll";
137 };
138
139 &wmac {
140 ralink,mtd-eeprom = <&factory 0>;
141 };
142
143 &pinctrl {
144 state_default: pinctrl0 {
145 gpio {
146 ralink,group = "wled","ephy","uartf","i2c";
147 ralink,function = "gpio";
148 };
149 };
150 };