mvebu: add LED support for GL.iNet GL-MV1000
[openwrt/openwrt.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 "armada-372x.dtsi"
6
7 / {
8 model = "GL.iNet GL-MV1000";
9 compatible = "glinet,gl-mv1000", "marvell,armada3720";
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 chosen {
19 stdout-path = "serial0:115200n8";
20 };
21
22 memory@0 {
23 device_type = "memory";
24 reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
25 };
26
27 vcc_sd_reg1: regulator {
28 compatible = "regulator-gpio";
29 regulator-name = "vcc_sd1";
30 regulator-min-microvolt = <1800000>;
31 regulator-max-microvolt = <3300000>;
32 regulator-boot-on;
33
34 gpios-states = <0>;
35 states = <1800000 0x1
36 3300000 0x0>;
37 enable-active-high;
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 vpn {
44 label = "green:vpn";
45 gpios = <&gpionb 11 GPIO_ACTIVE_LOW>;
46 };
47
48 wan {
49 label = "green:wan";
50 gpios = <&gpionb 12 GPIO_ACTIVE_LOW>;
51 };
52
53 led_power: power {
54 label = "green:power";
55 gpios = <&gpionb 13 GPIO_ACTIVE_LOW>;
56 default-state = "on";
57 };
58 };
59 };
60
61 &spi0 {
62 status = "okay";
63
64 flash@0 {
65 reg = <0>;
66 compatible = "jedec,spi-nor";
67 spi-max-frequency = <104000000>;
68 m25p,fast-read;
69 partitions {
70 compatible = "fixed-partitions";
71 #address-cells = <1>;
72 #size-cells = <1>;
73
74 partition@0 {
75 label = "u-boot";
76 reg = <0 0xf0000>;
77 };
78
79 partition@f0000 {
80 label = "u-boot-env";
81 reg = <0Xf0000 0x8000>;
82 };
83
84 factory: partition@f8000 {
85 label = "factory";
86 reg = <0xf8000 0x8000>;
87 };
88 };
89 };
90 };
91
92 &sdhci1 {
93 wp-inverted;
94 bus-width = <4>;
95 cd-gpios = <&gpionb 17 GPIO_ACTIVE_LOW>;
96 marvell,pad-type = "sd";
97 no-1-8-v;
98 vqmmc-supply = <&vcc_sd_reg1>;
99 status = "okay";
100 };
101
102 &sdhci0 {
103 bus-width = <8>;
104 mmc-ddr-1_8v;
105 mmc-hs400-1_8v;
106 non-removable;
107 no-sd;
108 no-sdio;
109 marvell,pad-type = "fixed-1-8v";
110 status = "okay";
111 };
112
113 &usb3 {
114 status = "okay";
115 };
116
117 &usb2 {
118 status = "okay";
119 };
120
121 &uart0 {
122 status = "okay";
123 };
124
125 &mdio {
126 switch0: switch0@1 {
127 compatible = "marvell,mv88e6085";
128 #address-cells = <1>;
129 #size-cells = <0>;
130 reg = <1>;
131
132 dsa,member = <0 0>;
133
134 ports: ports {
135 #address-cells = <1>;
136 #size-cells = <0>;
137
138 port@0 {
139 reg = <0>;
140 label = "cpu";
141 ethernet = <&eth0>;
142 };
143
144 port@1 {
145 reg = <1>;
146 label = "wan";
147 phy-handle = <&switch0phy0>;
148 };
149
150 port@2 {
151 reg = <2>;
152 label = "lan0";
153 phy-handle = <&switch0phy1>;
154 };
155
156 port@3 {
157 reg = <3>;
158 label = "lan1";
159 phy-handle = <&switch0phy2>;
160 };
161 };
162
163 mdio {
164 #address-cells = <1>;
165 #size-cells = <0>;
166
167 switch0phy0: switch0phy0@11 {
168 reg = <0x11>;
169 };
170 switch0phy1: switch0phy1@12 {
171 reg = <0x12>;
172 };
173 switch0phy2: switch0phy2@13 {
174 reg = <0x13>;
175 };
176 };
177 };
178 };
179
180 &eth0 {
181 mtd-mac-address = <&factory 0x0>;
182 phy-mode = "rgmii-id";
183 status = "okay";
184
185 fixed-link {
186 speed = <1000>;
187 full-duplex;
188 };
189 };