ramips: Use dts alias based status led
[openwrt/staging/jow.git] / target / linux / ramips / dts / LINKIT7688.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-status = &led_wifi;
14 };
15
16 chosen {
17 bootargs = "console=ttyS2,57600";
18 };
19
20 aliases {
21 serial0 = &uart2;
22 };
23
24 memory@0 {
25 device_type = "memory";
26 reg = <0x0 0x8000000>;
27 };
28
29 bootstrap {
30 compatible = "mediatek,linkit";
31
32 status = "okay";
33 };
34
35 gpio-leds {
36 compatible = "gpio-leds";
37
38 led_wifi: wifi {
39 label = "linkit-smart-7688:orange:wifi";
40 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 gpio-keys-polled {
45 compatible = "gpio-keys-polled";
46 #address-cells = <1>;
47 #size-cells = <0>;
48 poll-interval = <20>;
49
50 wps {
51 label = "reset";
52 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_WPS_BUTTON>;
54 };
55 };
56 };
57
58 &pinctrl {
59 state_default: pinctrl0 {
60 gpio {
61 ralink,group = "gpio";
62 ralink,function = "gpio";
63 };
64
65 refclk {
66 ralink,group = "refclk";
67 ralink,function = "gpio";
68 };
69
70 i2s {
71 ralink,group = "i2s";
72 ralink,function = "gpio";
73 };
74
75 spis {
76 ralink,group = "spis";
77 ralink,function = "gpio";
78 };
79
80 wled_an {
81 ralink,group = "wled_an";
82 ralink,function = "gpio";
83 };
84
85 wdt {
86 ralink,group = "wdt";
87 ralink,function = "gpio";
88 };
89 };
90 };
91
92 &wmac {
93 status = "okay";
94 };
95
96 &spi0 {
97 status = "okay";
98
99 pinctrl-names = "default";
100 pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
101
102 m25p80@0 {
103 #address-cells = <1>;
104 #size-cells = <1>;
105 compatible = "jedec,spi-nor";
106 reg = <0>;
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 0x1fb0000>;
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 };