ramips: add support for EnGenius ESR600
[oweals/openwrt.git] / target / linux / ramips / dts / mt7628an_mediatek_linkit-smart-7688.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 = "mediatek,linkit-smart-7688", "mediatek,mt7628an-soc";
10         model = "MediaTek LinkIt Smart 7688";
11
12         aliases {
13                 led-boot = &led_wifi;
14                 led-failsafe = &led_wifi;
15                 led-running = &led_wifi;
16                 led-upgrade = &led_wifi;
17         };
18
19         chosen {
20                 bootargs = "console=ttyS2,57600";
21         };
22
23         aliases {
24                 serial0 = &uart2;
25         };
26
27         bootstrap {
28                 compatible = "mediatek,linkit";
29
30                 status = "okay";
31         };
32
33         leds {
34                 compatible = "gpio-leds";
35
36                 led_wifi: wifi {
37                         label = "linkit-smart-7688:orange:wifi";
38                         gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
39                 };
40         };
41
42         keys {
43                 compatible = "gpio-keys-polled";
44                 poll-interval = <20>;
45
46                 wps {
47                         label = "reset";
48                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
49                         linux,code = <KEY_WPS_BUTTON>;
50                 };
51         };
52 };
53
54 &pinctrl {
55         state_default: pinctrl0 {
56                 gpio {
57                         ralink,group = "gpio";
58                         ralink,function = "gpio";
59                 };
60
61                 refclk {
62                         ralink,group = "refclk";
63                         ralink,function = "gpio";
64                 };
65
66                 i2s {
67                         ralink,group = "i2s";
68                         ralink,function = "gpio";
69                 };
70
71                 spis {
72                         ralink,group = "spis";
73                         ralink,function = "gpio";
74                 };
75
76                 wled_an {
77                         ralink,group = "wled_an";
78                         ralink,function = "gpio";
79                 };
80
81                 wdt {
82                         ralink,group = "wdt";
83                         ralink,function = "gpio";
84                 };
85         };
86 };
87
88 &wmac {
89         status = "okay";
90 };
91
92 &spi0 {
93         status = "okay";
94
95         pinctrl-names = "default";
96         pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
97
98         m25p80@0 {
99                 compatible = "jedec,spi-nor";
100                 reg = <0>;
101                 spi-max-frequency = <40000000>;
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                         };
118
119                         factory: partition@40000 {
120                                 label = "factory";
121                                 reg = <0x40000 0x10000>;
122                                 read-only;
123                         };
124
125                         partition@50000 {
126                                 compatible = "denx,uimage";
127                                 label = "firmware";
128                                 reg = <0x50000 0x1fb0000>;
129                         };
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-high;
165 };
166
167 &wmac {
168         status = "okay";
169 };