lantiq: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / vr9_lantiq_easy80920.dtsi
1 #include "vr9.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/leds/common.h>
5 #include <dt-bindings/mips/lantiq_rcu_gphy.h>
6
7 / {
8 compatible = "lantiq,easy80920", "lantiq,xway", "lantiq,vr9";
9
10 chosen {
11 bootargs = "console=ttyLTQ0,115200";
12 };
13
14 aliases {
15 led-boot = &power;
16 led-failsafe = &power;
17 led-running = &power;
18 led-upgrade = &power;
19 };
20
21 memory@0 {
22 device_type = "memory";
23 reg = <0x0 0x4000000>;
24 };
25
26 keys {
27 compatible = "gpio-keys-polled";
28 poll-interval = <100>;
29 /* reset {
30 label = "reset";
31 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_RESTART>;
33 };*/
34 paging {
35 label = "paging";
36 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_PHONE>;
38 };
39 };
40
41 leds {
42 compatible = "gpio-leds";
43
44 power: power {
45 function = LED_FUNCTION_POWER;
46 color = <LED_COLOR_ID_GREEN>;
47 gpios = <&stp 9 GPIO_ACTIVE_HIGH>;
48 default-state = "keep";
49 };
50 warning {
51 label = "green:warning";
52 gpios = <&stp 22 GPIO_ACTIVE_HIGH>;
53 };
54 fxs1 {
55 label = "green:fxs1";
56 gpios = <&stp 21 GPIO_ACTIVE_HIGH>;
57 };
58 fxs2 {
59 label = "green:fxs2";
60 gpios = <&stp 20 GPIO_ACTIVE_HIGH>;
61 };
62 fxo {
63 label = "green:fxo";
64 gpios = <&stp 19 GPIO_ACTIVE_HIGH>;
65 };
66 usb1 {
67 label = "green:usb1";
68 gpios = <&stp 18 GPIO_ACTIVE_HIGH>;
69 trigger-sources = <&ehci_port1>;
70 linux,default-trigger = "usbport";
71 };
72
73 usb2 {
74 label = "green:usb2";
75 gpios = <&stp 15 GPIO_ACTIVE_HIGH>;
76 trigger-sources = <&ehci_port2>;
77 linux,default-trigger = "usbport";
78 };
79 sd {
80 function = LED_FUNCTION_SD;
81 color = <LED_COLOR_ID_GREEN>;
82 gpios = <&stp 14 GPIO_ACTIVE_HIGH>;
83 };
84 wps {
85 function = LED_FUNCTION_WPS;
86 color = <LED_COLOR_ID_GREEN>;
87 gpios = <&stp 12 GPIO_ACTIVE_HIGH>;
88 };
89 };
90
91 usb_vbus: regulator-usb-vbus {
92 compatible = "regulator-fixed";
93
94 regulator-name = "USB_VBUS";
95
96 regulator-min-microvolt = <5000000>;
97 regulator-max-microvolt = <5000000>;
98
99 gpio = <&gpio 33 GPIO_ACTIVE_HIGH>;
100 enable-active-high;
101 };
102 };
103
104 &gphy0 {
105 lantiq,gphy-mode = <GPHY_MODE_GE>;
106 };
107
108 &gphy1 {
109 lantiq,gphy-mode = <GPHY_MODE_GE>;
110 };
111
112 &gpio {
113 pinctrl-names = "default";
114 pinctrl-0 = <&state_default>;
115
116 state_default: pinmux {
117 exin3 {
118 lantiq,groups = "exin3";
119 lantiq,function = "exin";
120 };
121 conf_out {
122 lantiq,pins = "io21",
123 "io33";
124 lantiq,open-drain;
125 lantiq,pull = <0>;
126 lantiq,output = <1>;
127 };
128 pcie-rst {
129 lantiq,pins = "io38";
130 lantiq,pull = <0>;
131 lantiq,output = <1>;
132 };
133 conf_in {
134 lantiq,pins = "io39"; /* exin3 */
135 lantiq,pull = <2>;
136 };
137 };
138 };
139
140 &gswip {
141 pinctrl-0 = <&mdio_pins>;
142 pinctrl-names = "default";
143 };
144
145 &gswip_mdio {
146 phy0: ethernet-phy@0 {
147 reg = <0x0>;
148 };
149 phy1: ethernet-phy@1 {
150 reg = <0x1>;
151 };
152 phy5: ethernet-phy@5 {
153 reg = <0x5>;
154 };
155 phy11: ethernet-phy@11 {
156 reg = <0x11>;
157 };
158 phy13: ethernet-phy@13 {
159 reg = <0x13>;
160 };
161 };
162
163 &gswip_ports {
164 port@0 {
165 reg = <0>;
166 label = "lan4";
167 phy-mode = "rgmii";
168 phy-handle = <&phy0>;
169 };
170 port@1 {
171 reg = <1>;
172 label = "lan3";
173 phy-mode = "rgmii";
174 phy-handle = <&phy1>;
175 };
176 port@2 {
177 reg = <2>;
178 label = "lan2";
179 phy-mode = "internal";
180 phy-handle = <&phy11>;
181 };
182 port@4 {
183 reg = <4>;
184 label = "lan1";
185 phy-mode = "internal";
186 phy-handle = <&phy13>;
187 };
188 port@5 {
189 reg = <5>;
190 label = "wan";
191 phy-mode = "rgmii";
192 phy-handle = <&phy5>;
193 };
194 };
195
196 &spi {
197 status = "okay";
198
199 flash@4 {
200 compatible = "jedec,spi-nor";
201 reg = <4>;
202 spi-max-frequency = <1000000>;
203
204 partitions {
205 compatible = "fixed-partitions";
206 #address-cells = <1>;
207 #size-cells = <1>;
208
209 partition@0 {
210 reg = <0x0 0x20000>;
211 label = "SPI (RO) U-Boot Image";
212 read-only;
213 };
214
215 partition@20000 {
216 reg = <0x20000 0x10000>;
217 label = "ENV_MAC";
218 read-only;
219 };
220
221 partition@30000 {
222 reg = <0x30000 0x10000>;
223 label = "DPF";
224 read-only;
225 };
226
227 partition@40000 {
228 reg = <0x40000 0x10000>;
229 label = "NVRAM";
230 read-only;
231 };
232
233 partition@50000 {
234 reg = <0x50000 0x3a0000>;
235 label = "kernel";
236 };
237 };
238 };
239 };
240
241 &pci0 {
242 pinctrl-0 = <&pci_gnt1_pins>, <&pci_req1_pins>;
243 pinctrl-names = "default";
244 };
245
246 &stp {
247 status = "okay";
248
249 lantiq,shadow = <0xffff>;
250 lantiq,dsl = <0x3>;
251 lantiq,phy1 = <0x7>;
252 lantiq,phy2 = <0x7>;
253 /* lantiq,rising; */
254 };
255
256 &usb_phy0 {
257 status = "okay";
258 };
259
260 &usb0 {
261 status = "okay";
262 vbus-supply = <&usb_vbus>;
263 };