ramips: Use dts alias based status led
[openwrt/openwrt.git] / target / linux / ramips / dts / VOCORE.dtsi
1 #include "rt5350.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4
5 / {
6 compatible = "vocore,vocore", "ralink,rt5350-soc";
7
8 aliases {
9 led-status = &led_status;
10 };
11
12 gpio-export {
13 compatible = "gpio-export";
14 #size-cells = <0>;
15
16 gpio0 {
17 gpio-export,name = "gpio0";
18 gpio-export,direction_may_change = <1>;
19 gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
20 };
21
22 /* UARTF */
23 gpio7 {
24 /* UARTF_RTS_N */
25 gpio-export,name = "gpio7";
26 gpio-export,direction_may_change = <1>;
27 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
28 };
29
30 gpio8 {
31 /* UARTF_TXD */
32 gpio-export,name = "gpio8";
33 gpio-export,direction_may_change = <1>;
34 gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
35 };
36
37 gpio9 {
38 /* UARTF_CTS_N */
39 gpio-export,name = "gpio9";
40 gpio-export,direction_may_change = <1>;
41 gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
42 };
43
44 gpio12 {
45 /* UARTF_DCD_N */
46 gpio-export,name = "gpio12";
47 gpio-export,direction_may_change = <1>;
48 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
49 };
50
51 gpio13 {
52 /* UARTF_DSR_N */
53 gpio-export,name = "gpio13";
54 gpio-export,direction_may_change = <1>;
55 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
56 };
57
58 gpio14 {
59 /* UARTF_RIN */
60 gpio-export,name = "gpio14";
61 gpio-export,direction_may_change = <1>;
62 gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
63 };
64
65 /* JTAG */
66 gpio17 {
67 /* JTAG_TDO */
68 gpio-export,name = "gpio17";
69 gpio-export,direction_may_change = <1>;
70 gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
71 };
72
73 gpio18 {
74 /* JTAG_TDI */
75 gpio-export,name = "gpio18";
76 gpio-export,direction_may_change = <1>;
77 gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
78 };
79
80 gpio19 {
81 /* JTAG_TMS */
82 gpio-export,name = "gpio19";
83 gpio-export,direction_may_change = <1>;
84 gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
85 };
86
87 gpio20 {
88 /* JTAG_TCLK */
89 gpio-export,name = "gpio20";
90 gpio-export,direction_may_change = <1>;
91 gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
92 };
93
94 gpio21 {
95 /* JTAG_TRST_N */
96 gpio-export,name = "gpio21";
97 gpio-export,direction_may_change = <1>;
98 gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
99 };
100
101 /* ETH LEDs */
102 gpio22 {
103 /* ETH0_LED */
104 gpio-export,name = "gpio22";
105 gpio-export,direction_may_change = <1>;
106 gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
107 };
108
109 gpio23 {
110 /* ETH1_LED */
111 gpio-export,name = "gpio23";
112 gpio-export,direction_may_change = <1>;
113 gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
114 };
115
116 gpio24 {
117 /* ETH2_LED */
118 gpio-export,name = "gpio24";
119 gpio-export,direction_may_change = <1>;
120 gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
121 };
122
123 gpio25 {
124 /* ETH3_LED */
125 gpio-export,name = "gpio25";
126 gpio-export,direction_may_change = <1>;
127 gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
128 };
129
130 gpio26 {
131 /* ETH4_LED */
132 gpio-export,name = "gpio26";
133 gpio-export,direction_may_change = <1>;
134 gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
135 };
136 };
137
138 gpio-leds {
139 compatible = "gpio-leds";
140
141 led_status: status {
142 /* UARTF_RXD */
143 label = "vocore:green:status";
144 gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
145 };
146
147 eth {
148 /* UARTF_DTR_N */
149 label = "vocore:orange:eth";
150 gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
151 };
152 };
153 };
154
155 &gpio1 {
156 status = "okay";
157 };
158
159 &i2c {
160 status = "okay";
161 };
162
163 &pinctrl {
164 state_default: pinctrl0 {
165 gpio {
166 ralink,group = "jtag", "uartf", "led";
167 ralink,function = "gpio";
168 };
169 };
170 };
171
172 &ethernet {
173 mtd-mac-address = <&factory 0x4>;
174 };
175
176 &esw {
177 mediatek,portmap = <0x11>;
178 mediatek,portdisable = <0x2e>;
179 };
180
181 &wmac {
182 ralink,mtd-eeprom = <&factory 0>;
183 };
184
185 &ehci {
186 status = "okay";
187 };
188
189 &ohci {
190 status = "okay";
191 };
192
193 &spi1 {
194 status = "okay";
195
196 spidev@0 {
197 compatible = "linux,spidev";
198 spi-max-frequency = <10000000>;
199 reg = <0>;
200 };
201 };