ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_netgear_eax12.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "netgear,eax12", "mediatek,mt7621-soc";
11 model = "Netgear EAX12";
12
13 aliases {
14 led-boot = &led_power_green;
15 led-failsafe = &led_power_red;
16 led-running = &led_power_green;
17 led-upgrade = &led_power_red;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32
33 wps {
34 label = "wps";
35 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_WPS_BUTTON>;
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 led_power_green: power_green {
44 function = LED_FUNCTION_POWER;
45 color = <LED_COLOR_ID_GREEN>;
46 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
47 };
48
49 led_power_red: power_red {
50 function = LED_FUNCTION_POWER;
51 color = <LED_COLOR_ID_RED>;
52 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
53 };
54
55 client_green {
56 label = "green:client";
57 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
58 };
59
60 client_red {
61 label = "red:client";
62 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
63 };
64
65 router_green {
66 label = "green:router";
67 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
68 };
69
70 router_red {
71 label = "red:router";
72 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
73 };
74
75 wps_green {
76 function = LED_FUNCTION_WPS;
77 color = <LED_COLOR_ID_GREEN>;
78 gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
79 };
80
81 eth_green {
82 label = "green:eth";
83 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
84 };
85
86 eth_yellow {
87 label = "yellow:eth";
88 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
89 };
90 };
91 };
92
93 &nand {
94 status = "okay";
95
96 partitions {
97 compatible = "fixed-partitions";
98 #address-cells = <1>;
99 #size-cells = <1>;
100
101 partition@0 {
102 label = "Bootloader";
103 reg = <0x0 0x80000>;
104 read-only;
105 };
106
107 partition@80000 {
108 label = "Config";
109 reg = <0x80000 0x80000>;
110 read-only;
111 };
112
113 factory: partition@100000 {
114 label = "Factory";
115 reg = <0x100000 0x80000>;
116 read-only;
117
118 nvmem-layout {
119 compatible = "fixed-layout";
120 #address-cells = <1>;
121 #size-cells = <1>;
122
123 eeprom_factory_0: eeprom@0 {
124 reg = <0x0 0xe00>;
125 };
126
127 precal_factory_e10: precal@e10 {
128 reg = <0xe10 0x19c10>;
129 };
130 };
131 };
132
133 partition@180000 {
134 label = "firmware";
135 reg = <0x180000 0x3800000>;
136
137 compatible = "fixed-partitions";
138 #address-cells = <1>;
139 #size-cells = <1>;
140
141 partition@0 {
142 label = "kernel";
143 reg = <0x0 0x400000>;
144 };
145
146 partition@400000 {
147 label = "ubi";
148 reg = <0x400000 0x3400000>;
149 };
150 };
151
152 partition@2780000 {
153 label = "firmware_backup";
154 reg = <0x3980000 0x3800000>;
155 read-only;
156 };
157
158 partition@4d80000 {
159 label = "CFG";
160 reg = <0x7180000 0x200000>;
161 read-only;
162 };
163
164 partition@5580000 {
165 label = "RAE";
166 reg = <0x7380000 0x600000>;
167 read-only;
168 };
169
170 partition@5980000 {
171 label = "POT";
172 reg = <0x7980000 0x020000>;
173 read-only;
174 };
175
176 partition@6780000 {
177 label = "LOG";
178 reg = <0x79A0000 0x40000>;
179 read-only;
180 };
181 };
182 };
183
184 &pcie {
185 status = "okay";
186 };
187
188 &pcie1 {
189 wifi@0,0 {
190 compatible = "mediatek,mt76";
191 reg = <0x0000 0 0 0 0>;
192 nvmem-cells = <&eeprom_factory_0>, <&precal_factory_e10>;
193 nvmem-cell-names = "eeprom", "precal";
194 };
195 };
196
197 &switch0 {
198 ports {
199 port@0 {
200 status = "okay";
201 label = "lan";
202 };
203 };
204 };
205
206 &xhci {
207 status = "disabled";
208 };