mvebu: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / mvebu / files / arch / arm64 / boot / dts / marvell / armada-3720-gl-mv1000.dts
1 // SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
2
3 /dts-v1/;
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/leds/common.h>
7 #include "armada-372x.dtsi"
8
9 / {
10 model = "GL.iNet GL-MV1000";
11 compatible = "glinet,gl-mv1000", "marvell,armada3720";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 };
19
20 chosen {
21 stdout-path = "serial0:115200n8";
22 };
23
24 memory@0 {
25 device_type = "memory";
26 reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
27 };
28
29 vcc_sd_reg1: regulator {
30 compatible = "regulator-gpio";
31 regulator-name = "vcc_sd1";
32 regulator-min-microvolt = <1800000>;
33 regulator-max-microvolt = <3300000>;
34 regulator-boot-on;
35
36 gpios-states = <0>;
37 states = <1800000 0x1
38 3300000 0x0>;
39 enable-active-high;
40 };
41
42 keys {
43 compatible = "gpio-keys";
44
45 reset {
46 label = "reset";
47 linux,code = <KEY_RESTART>;
48 gpios = <&gpionb 14 GPIO_ACTIVE_LOW>;
49 };
50
51 switch {
52 label = "switch";
53 linux,code = <BTN_0>;
54 gpios = <&gpiosb 22 GPIO_ACTIVE_LOW>;
55 };
56 };
57
58 leds {
59 compatible = "gpio-leds";
60
61 vpn {
62 label = "green:vpn";
63 gpios = <&gpionb 11 GPIO_ACTIVE_LOW>;
64 };
65
66 wan {
67 function = LED_FUNCTION_WAN;
68 color = <LED_COLOR_ID_GREEN>;
69 gpios = <&gpionb 12 GPIO_ACTIVE_LOW>;
70 };
71
72 led_power: power {
73 function = LED_FUNCTION_POWER;
74 color = <LED_COLOR_ID_GREEN>;
75 gpios = <&gpionb 13 GPIO_ACTIVE_LOW>;
76 default-state = "on";
77 };
78 };
79 };
80
81 &spi0 {
82 status = "okay";
83
84 flash@0 {
85 reg = <0>;
86 compatible = "jedec,spi-nor";
87 spi-max-frequency = <104000000>;
88 m25p,fast-read;
89 partitions {
90 compatible = "fixed-partitions";
91 #address-cells = <1>;
92 #size-cells = <1>;
93
94 partition@0 {
95 label = "u-boot";
96 reg = <0 0xf0000>;
97 read-only;
98 };
99
100 partition@f0000 {
101 label = "u-boot-env";
102 reg = <0xf0000 0x8000>;
103 read-only;
104 };
105
106 factory: partition@f8000 {
107 label = "factory";
108 reg = <0xf8000 0x8000>;
109 read-only;
110
111 nvmem-layout {
112 compatible = "fixed-layout";
113 #address-cells = <1>;
114 #size-cells = <1>;
115
116 macaddr_factory_0: macaddr@0 {
117 reg = <0x0 0x6>;
118 };
119
120 macaddr_factory_6: macaddr@6 {
121 reg = <0x6 0x6>;
122 };
123 };
124 };
125
126 partition@100000 {
127 label = "gl-firmware-dtb";
128 reg = <0x100000 0x10000>;
129 read-only;
130 };
131
132 partition@110000 {
133 label = "gl-firmware";
134 reg = <0x110000 0xef0000>;
135 read-only;
136 };
137
138 partition@ef0000 {
139 label = "gl-firmware-jffs2";
140 reg = <0xef0000 0x110000>;
141 read-only;
142 };
143 };
144 };
145 };
146
147 &sdhci1 {
148 wp-inverted;
149 bus-width = <4>;
150 cd-gpios = <&gpionb 17 GPIO_ACTIVE_LOW>;
151 marvell,pad-type = "sd";
152 no-1-8-v;
153 vqmmc-supply = <&vcc_sd_reg1>;
154 status = "okay";
155 };
156
157 &sdhci0 {
158 bus-width = <8>;
159 mmc-ddr-1_8v;
160 mmc-hs400-1_8v;
161 non-removable;
162 no-sd;
163 no-sdio;
164 marvell,pad-type = "fixed-1-8v";
165 status = "okay";
166 };
167
168 &usb3 {
169 status = "okay";
170 };
171
172 &usb2 {
173 status = "okay";
174 };
175
176 &uart0 {
177 status = "okay";
178 };
179
180 &mdio {
181 switch0: switch0@1 {
182 compatible = "marvell,mv88e6085";
183 #address-cells = <1>;
184 #size-cells = <0>;
185 reg = <1>;
186
187 dsa,member = <0 0>;
188
189 ports: ports {
190 #address-cells = <1>;
191 #size-cells = <0>;
192
193 port@0 {
194 reg = <0>;
195 ethernet = <&eth0>;
196 };
197
198 port@1 {
199 reg = <1>;
200 label = "wan";
201 phy-handle = <&switch0phy0>;
202 };
203
204 port@2 {
205 reg = <2>;
206 label = "lan0";
207 phy-handle = <&switch0phy1>;
208
209 nvmem-cells = <&macaddr_factory_6>;
210 nvmem-cell-names = "mac-address";
211 };
212
213 port@3 {
214 reg = <3>;
215 label = "lan1";
216 phy-handle = <&switch0phy2>;
217
218 nvmem-cells = <&macaddr_factory_6>;
219 nvmem-cell-names = "mac-address";
220 };
221 };
222
223 mdio {
224 #address-cells = <1>;
225 #size-cells = <0>;
226
227 switch0phy0: switch0phy0@11 {
228 reg = <0x11>;
229 };
230 switch0phy1: switch0phy1@12 {
231 reg = <0x12>;
232 };
233 switch0phy2: switch0phy2@13 {
234 reg = <0x13>;
235 };
236 };
237 };
238 };
239
240 &eth0 {
241 nvmem-cells = <&macaddr_factory_0>;
242 nvmem-cell-names = "mac-address";
243 phy-mode = "rgmii-id";
244 status = "okay";
245
246 fixed-link {
247 speed = <1000>;
248 full-duplex;
249 };
250 };