ramips: add button support and make LEDs known to userspace for DIR-860L B1
[oweals/openwrt.git] / target / linux / ramips / dts / WIDORA-NEO.dts
1 /dts-v1/;
2
3 #include "mt7628an.dtsi"
4
5 / {
6         compatible = "mediatek,widora-neo", "mediatek,mt7628an-soc";
7         model = "Widora-NEO";
8
9         chosen {
10                 bootargs = "console=ttyS0,115200";
11         };
12
13         memory@0 {
14                 device_type = "memory";
15                 reg = <0x0 0x8000000>;
16         };
17
18         gpio-leds {
19                 compatible = "gpio-leds";
20
21                 wifi {
22                         label = "widora:orange:wifi";
23                         gpios = <&wgpio 0 0>;
24                         default-state = "on";
25                 };
26         };
27
28         gpio-keys-polled {
29                 compatible = "gpio-keys-polled";
30                 #address-cells = <1>;
31                 #size-cells = <0>;
32                 poll-interval = <20>;
33
34                 wps {
35                         label = "reset";
36                         gpios = <&gpio1 6 1>;
37                         linux,code = <0x211>;
38                 };
39         };
40
41         wgpio: gpio-wifi {
42                 compatible = "mediatek,gpio-wifi";
43                 #address-cells = <1>;
44                 #size-cells = <0>;
45                 gpio-controller;
46                 #gpio-cells = <2>;
47         };
48 };
49
50 &pinctrl {
51         state_default: pinctrl0 {
52                 gpio {
53                         ralink,group = "gpio";
54                         ralink,function = "gpio";
55                 };
56
57                 perst {
58                         ralink,group = "perst";
59                         ralink,function = "gpio";
60                 };
61
62                 refclk {
63                         ralink,group = "refclk";
64                         ralink,function = "gpio";
65                 };
66
67                 i2s {
68                         ralink,group = "i2s";
69                         ralink,function = "gpio";
70                 };
71
72                 spis {
73                         ralink,group = "spis";
74                         ralink,function = "gpio";
75                 };
76
77                 wled_kn {
78                         ralink,group = "wled_kn";
79                         ralink,function = "gpio";
80                 };
81
82                 wled_an {
83                         ralink,group = "wled_an";
84                         ralink,function = "wled_an";
85                 };
86
87                 wdt {
88                         ralink,group = "wdt";
89                         ralink,function = "gpio";
90                 };
91         };
92 };
93
94
95 &spi0 {
96         status = "okay";
97
98         pinctrl-names = "default";
99         pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
100
101         m25p80@0 {
102                 #address-cells = <1>;
103                 #size-cells = <1>;
104                 compatible = "jedec,spi-nor";
105                 reg = <0>;
106                 linux,modalias = "m25p80", "w25q128";
107                 spi-max-frequency = <40000000>;
108                 m25p,chunked-io = <31>;
109
110                 partition@0 {
111                         label = "u-boot";
112                         reg = <0x0 0x30000>;
113                         read-only;
114                 };
115
116                 partition@30000 {
117                         label = "u-boot-env";
118                         reg = <0x30000 0x10000>;
119                 };
120
121                 factory: partition@40000 {
122                         label = "factory";
123                         reg = <0x40000 0x10000>;
124                         read-only;
125                 };
126
127                 partition@50000 {
128                         label = "firmware";
129                         reg = <0x50000 0x0fb0000>;
130                 };
131         };
132
133         spidev@1 {
134                 #address-cells = <1>;
135                 #size-cells = <1>;
136                 compatible = "linux,spidev";
137                 reg = <1>;
138                 spi-max-frequency = <40000000>;
139         };
140 };
141
142 &i2c {
143         status = "okay";
144 };
145
146 &uart1 {
147         status = "okay";
148 };
149
150 &uart2 {
151         status = "okay";
152 };
153
154 &pwm {
155         status = "okay";
156 };
157
158 &ethernet {
159         mtd-mac-address = <&factory 0x28>;
160 };
161
162 &sdhci {
163         status = "okay";
164         mediatek,cd-low;
165 };
166
167 &wmac {
168         status = "okay";
169 };