ramips: Use dts alias based status led
[openwrt/openwrt.git] / target / linux / ramips / dts / F5D8235_V1.dts
1 /dts-v1/;
2
3 #include "rt2880.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 #address-cells = <1>;
10 #size-cells = <1>;
11 compatible = "belkin,f5d8235-v1", "ralink,rt2880-soc";
12 model = "Belkin F5D8235 v1";
13
14 aliases {
15 led-status = &led_wired_blue;
16 };
17
18 pci@440000 {
19 status = "ok";
20 };
21
22 cfi@1f000000 {
23 compatible = "cfi-flash";
24 reg = <0xbc400000 0x800000>;
25 bank-width = <2>;
26 device-width = <2>;
27 #address-cells = <1>;
28 #size-cells = <1>;
29
30 partition@0 {
31 label = "uboot";
32 reg = <0x0 0x30000>;
33 read-only;
34 };
35
36 partition@30000 {
37 label = "uboot-env";
38 reg = <0x30000 0x10000>;
39 read-only;
40 };
41
42 factory: partition@40000 {
43 label = "factory";
44 reg = <0x40000 0x10000>;
45 read-only;
46 };
47
48 partition@50000 {
49 label = "firmware";
50 reg = <0x50000 0x7b0000>;
51 };
52 };
53
54 rtl8366s {
55 compatible = "realtek,rtl8366s";
56 gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
57 gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
58
59 realtek,initvals = <
60 0x0242 0x02BF
61 0x0245 0x02BF
62 0x0248 0x02BF
63 0x024B 0x02BF
64 0x024E 0x02BF
65 0x0251 0x02BF
66 0x0254 0x0A3F
67 0x0256 0x0A3F
68 0x0258 0x0A3F
69 0x025A 0x0A3F
70 0x025C 0x0A3F
71 0x025E 0x0A3F
72 0x0263 0x007C
73 0x0100 0x0004
74 0xBE5B 0x3500
75 0x800E 0x200F
76 0xBE1D 0x0F00
77 0x8001 0x5011
78 0x800A 0xA2F4
79 0x800B 0x17A3
80 0xBE4B 0x17A3
81 0xBE41 0x5011
82 0xBE17 0x2100
83 0x8000 0x8304
84 0xBE40 0x8304
85 0xBE4A 0xA2F4
86 0x800C 0xA8D5
87 0x8014 0x5500
88 0x8015 0x0004
89 0xBE4C 0xA8D5
90 0xBE59 0x0008
91 0xBE09 0x0E00
92 0xBE36 0x1036
93 0xBE37 0x1036
94 0x800D 0x00FF
95 0xBE4D 0x00FF
96 >;
97
98 realtek,green-ethernet-features;
99 };
100
101 gpio-keys-polled {
102 compatible = "gpio-keys-polled";
103 #address-cells = <1>;
104 #size-cells = <0>;
105 poll-interval = <100>;
106
107 wps {
108 label = "wps";
109 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
110 linux,code = <KEY_WPS_BUTTON>;
111 };
112
113 reset {
114 label = "reset";
115 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
116 linux,code = <KEY_RESTART>;
117 };
118 };
119
120 gpio-leds {
121 compatible = "gpio-leds";
122
123 internet {
124 label = "f5d8235-v1:blue:internet";
125 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
126 };
127
128 internet2 {
129 label = "f5d8235-v1:amber:internet";
130 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
131 };
132
133 modem {
134 label = "f5d8235-v1:blue:modem";
135 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
136 };
137
138 modem2 {
139 label = "f5d8235-v1:amber:modem";
140 gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
141 };
142
143 router {
144 label = "f5d8235-v1:blue:router";
145 gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
146 };
147
148 storage {
149 label = "f5d8235-v1:blue:storage";
150 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
151 };
152
153 storage2 {
154 label = "f5d8235-v1:amber:storage";
155 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
156 };
157
158 security {
159 label = "f5d8235-v1:blue:security";
160 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
161 };
162
163 security2 {
164 label = "f5d8235-v1:amber:security";
165 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
166 };
167
168 led_wired_blue: wired {
169 label = "f5d8235-v1:blue:wired";
170 gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
171 };
172
173 wired2 {
174 label = "f5d8235-v1:amber:wired";
175 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
176 };
177
178 wireless {
179 label = "f5d8235-v1:blue:wireless";
180 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
181 };
182
183 wireless2 {
184 label = "f5d8235-v1:amber:wireless";
185 gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
186 };
187 };
188 };
189
190 &gpio0 {
191 status = "okay";
192 };
193
194 &pinctrl {
195 state_default: pinctrl0 {
196 gpio {
197 ralink,group = "spi", "i2c", "jtag", "mdio", "uartlite";
198 ralink,function = "gpio";
199 };
200 };
201 };
202
203 &ethernet {
204 status = "okay";
205 mtd-mac-address = <&factory 0x4>;
206
207 port@0 {
208 mediatek,fixed-link = <1000 1 1 1>;
209 };
210 };
211
212 &wmac {
213 status = "okay";
214 ralink,mtd-eeprom = <&factory 0x0>;
215 };