ramips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_asus_rt-acx5p.dtsi
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 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "reset";
22 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_RESTART>;
24 };
25
26 wps {
27 label = "wps";
28 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_WPS_BUTTON>;
30 };
31 };
32
33 leds {
34 compatible = "gpio-leds";
35
36 led_power: power {
37 function = LED_FUNCTION_POWER;
38 color = <LED_COLOR_ID_BLUE>;
39 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
40 };
41
42 wlan5g {
43 label = "blue:wlan5g";
44 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
45 linux,default-trigger = "phy1tpt";
46 };
47
48 wlan2g {
49 label = "blue:wlan2g";
50 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
51 linux,default-trigger = "phy0tpt";
52 };
53 };
54 };
55
56 &i2c {
57 status = "okay";
58 };
59
60 &sdhci {
61 status = "okay";
62 };
63
64 &nand {
65 status = "okay";
66
67 partitions {
68 compatible = "fixed-partitions";
69 #address-cells = <1>;
70 #size-cells = <1>;
71
72 partition@0 {
73 label = "u-boot";
74 reg = <0x0 0xe0000>;
75 read-only;
76 };
77
78 partition@e0000 {
79 label = "u-boot-env";
80 reg = <0xe0000 0x100000>;
81 read-only;
82 };
83
84 factory: partition@1e0000 {
85 label = "factory";
86 reg = <0x1e0000 0x100000>;
87 read-only;
88
89 nvmem-layout {
90 compatible = "fixed-layout";
91 #address-cells = <1>;
92 #size-cells = <1>;
93
94 eeprom_factory_0: eeprom@0 {
95 reg = <0x0 0x4da8>;
96 };
97
98 eeprom_factory_8000: eeprom@8000 {
99 reg = <0x8000 0x4da8>;
100 };
101
102 macaddr_factory_e000: macaddr@e000 {
103 reg = <0xe000 0x6>;
104 };
105 };
106 };
107
108 factory2: partition@2e0000 {
109 label = "factory2";
110 reg = <0x2e0000 0x100000>;
111 read-only;
112 };
113
114 partition@3e0000 {
115 label = "kernel";
116 reg = <0x3e0000 0x400000>;
117 };
118
119 partition@7e0000 {
120 label = "ubi";
121 reg = <0x7e0000 0x2e00000>;
122 };
123
124 partition@35e0000 {
125 label = "firmware2";
126 reg = <0x35e0000 0x3200000>;
127 };
128 };
129 };
130
131 &pcie {
132 status = "okay";
133 };
134
135 &pcie0 {
136 wifi0: wifi@0,0 {
137 compatible = "pci14c3,7615";
138 reg = <0x0000 0 0 0 0>;
139 nvmem-cells = <&eeprom_factory_0>;
140 nvmem-cell-names = "eeprom";
141 ieee80211-freq-limit = <2400000 2500000>;
142 };
143 };
144
145 &pcie1 {
146 wifi1: wifi@0,0 {
147 compatible = "pci14c3,7615";
148 reg = <0x0000 0 0 0 0>;
149 nvmem-cells = <&eeprom_factory_8000>;
150 nvmem-cell-names = "eeprom";
151 ieee80211-freq-limit = <5000000 6000000>;
152 };
153 };
154
155 &gmac0 {
156 nvmem-cells = <&macaddr_factory_e000>;
157 nvmem-cell-names = "mac-address";
158 };
159
160 &gmac1 {
161 status = "okay";
162 label = "wan";
163 phy-handle = <&ethphy0>;
164
165 nvmem-cells = <&macaddr_factory_e000>;
166 nvmem-cell-names = "mac-address";
167 };
168
169 &mdio {
170 ethphy0: ethernet-phy@0 {
171 reg = <0>;
172 };
173 };
174
175 &switch0 {
176 ports {
177 port@1 {
178 status = "okay";
179 label = "lan1";
180 };
181
182 port@2 {
183 status = "okay";
184 label = "lan2";
185 };
186
187 port@3 {
188 status = "okay";
189 label = "lan3";
190 };
191
192 port@4 {
193 status = "okay";
194 label = "lan4";
195 };
196 };
197 };
198
199 &state_default {
200 gpio {
201 groups = "uart2", "uart3", "i2c";
202 function = "gpio";
203 };
204 };