ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3883_sitecom_wlr-6000.dts
1 #include "rt3883.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 compatible = "sitecom,wlr-6000", "ralink,rt3883-soc";
9 model = "Sitecom WLR-6000";
10
11 aliases {
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 };
17
18 keys {
19 compatible = "gpio-keys-polled";
20 poll-interval = <20>;
21
22 reset {
23 label = "reset";
24 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_RESTART>;
26 };
27 };
28
29 leds {
30 compatible = "gpio-leds";
31
32 led_power: power {
33 function = LED_FUNCTION_POWER;
34 color = <LED_COLOR_ID_RED>;
35 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
36 };
37
38 ops {
39 label = "white:ops";
40 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 gpio_export {
45 compatible = "gpio-export";
46 #size-cells = <0>;
47
48 usb {
49 gpio-export,name = "usb";
50 gpio-export,output = <1>;
51 gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
52 };
53 };
54 };
55
56 &gpio1 {
57 status = "okay";
58 };
59
60 &state_default {
61 gpio {
62 groups = "i2c", "jtag", "uartf";
63 function = "gpio";
64 };
65 };
66
67 &ethernet {
68 status = "okay";
69 nvmem-cells = <&macaddr_factory_8004 1>;
70 nvmem-cell-names = "mac-address";
71
72 port@0 {
73 phy-handle = <&phy0>;
74 phy-mode = "rgmii";
75 };
76
77 mdio-bus {
78 status = "okay";
79
80 phy0: ethernet-phy@0 {
81 reg = <0>;
82 phy-mode = "rgmii";
83
84 qca,ar8327-initvals = <
85 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
86 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
87 0x10 0x40000000 /* Power-on Strapping: 176-pin interface configuration */
88 0x50 0xc437c437 /* LED Control Register 0 */
89 0x54 0xc337c337 /* LED Control Register 1 */
90 0x58 0x00000000 /* LED Control Register 2 */
91 0x5c 0x03ffff00 /* LED Control Register 3 */
92 0x7c 0x0000007e /* PORT0_STATUS */
93 0x94 0x0000007e /* PORT6 STATUS */
94 >;
95 };
96 };
97 };
98
99 &spi0 {
100 status = "okay";
101
102 flash@0 {
103 compatible = "jedec,spi-nor";
104 reg = <0>;
105 spi-max-frequency = <8600000>;
106 m25p,fast-read;
107
108 partitions {
109 compatible = "fixed-partitions";
110 #address-cells = <1>;
111 #size-cells = <1>;
112
113 partition@0 {
114 label = "u-boot";
115 reg = <0x0 0x30000>;
116 read-only;
117 };
118
119 partition@30000 {
120 label = "u-boot-env";
121 reg = <0x30000 0x10000>;
122 read-only;
123 };
124
125 factory: partition@40000 {
126 label = "factory";
127 reg = <0x40000 0x10000>;
128 read-only;
129
130 nvmem-layout {
131 compatible = "fixed-layout";
132 #address-cells = <1>;
133 #size-cells = <1>;
134
135 eeprom_factory_0: eeprom@0 {
136 reg = <0x0 0x200>;
137 };
138
139 eeprom_factory_8000: eeprom@8000 {
140 reg = <0x8000 0x200>;
141 };
142
143 macaddr_factory_8004: macaddr@8004 {
144 compatible = "mac-base";
145 reg = <0x8004 0x6>;
146 #nvmem-cell-cells = <1>;
147 };
148 };
149 };
150
151 partition@50000 {
152 compatible = "denx,uimage";
153 label = "firmware";
154 reg = <0x50000 0x713000>;
155 };
156
157 partition@763000 {
158 label = "manufacture";
159 reg = <0x763000 0x7D000>;
160 read-only;
161 };
162
163 partition@7E0000 {
164 label = "backup";
165 reg = <0x7E0000 0x10000>;
166 read-only;
167 };
168
169 partition@7F0000 {
170 label = "storage";
171 reg = <0x7F0000 0x10000>;
172 read-only;
173 };
174 };
175 };
176 };
177
178 &pci {
179 status = "okay";
180 };
181
182 &pci1 {
183 status = "okay";
184
185 wifi@0,0 {
186 compatible = "pci1814,3091";
187 reg = <0x10000 0 0 0 0>;
188 nvmem-cells = <&eeprom_factory_8000>;
189 nvmem-cell-names = "eeprom";
190 };
191 };
192
193 &wmac {
194 ralink,2ghz = <0>;
195 nvmem-cells = <&eeprom_factory_0>;
196 nvmem-cell-names = "eeprom";
197 };
198
199 &ehci {
200 status = "okay";
201 };
202
203 &ohci {
204 status = "okay";
205 };