ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_iodata_wn-ac733gr3.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7620a.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 = "iodata,wn-ac733gr3", "ralink,mt7620a-soc";
11 model = "I-O DATA WN-AC733GR3";
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 leds {
21 compatible = "gpio-leds";
22
23 led_power: power {
24 function = LED_FUNCTION_POWER;
25 color = <LED_COLOR_ID_GREEN>;
26 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
27 default-state = "on";
28 };
29
30 notification {
31 label = "green:notification";
32 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
33 };
34
35 wlan2g {
36 label = "green:wlan2g";
37 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
38 };
39
40 wlan5g {
41 label = "green:wlan5g";
42 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
43 };
44 };
45
46 keys {
47 compatible = "gpio-keys";
48
49 reset {
50 label = "reset";
51 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
52 linux,code = <KEY_RESTART>;
53 };
54
55 wps {
56 label = "wps";
57 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
58 linux,code = <KEY_WPS_BUTTON>;
59 };
60
61 router {
62 label = "router";
63 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
64 linux,code = <BTN_0>;
65 linux,input-type = <EV_SW>;
66 };
67
68 auto {
69 label = "auto";
70 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
71 linux,code = <BTN_0>;
72 linux,input-type = <EV_SW>;
73 };
74 };
75
76 rtl8367rb {
77 compatible = "realtek,rtl8367b";
78 gpio-sda = <&gpio0 22 GPIO_ACTIVE_HIGH>;
79 gpio-sck = <&gpio0 23 GPIO_ACTIVE_HIGH>;
80 realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
81 };
82 };
83
84 &spi0 {
85 status = "okay";
86
87 flash@0 {
88 compatible = "jedec,spi-nor";
89 reg = <0>;
90 spi-max-frequency = <10000000>;
91
92 partitions {
93 compatible = "fixed-partitions";
94 #address-cells = <1>;
95 #size-cells = <1>;
96
97 partition@0 {
98 label = "u-boot";
99 reg = <0x0 0x30000>;
100 read-only;
101 };
102
103 partition@30000 {
104 label = "u-boot-env";
105 reg = <0x30000 0x10000>;
106 read-only;
107 };
108
109 factory: partition@40000 {
110 label = "factory";
111 reg = <0x40000 0x8000>;
112 read-only;
113
114 nvmem-layout {
115 compatible = "fixed-layout";
116 #address-cells = <1>;
117 #size-cells = <1>;
118
119 eeprom_factory_0: eeprom@0 {
120 reg = <0x0 0x200>;
121 };
122
123 macaddr_factory_4: macaddr@4 {
124 reg = <0x4 0x6>;
125 };
126 };
127 };
128
129 iNIC_rf: partition@48000 {
130 label = "iNIC_rf";
131 reg = <0x48000 0x8000>;
132 read-only;
133
134 nvmem-layout {
135 compatible = "fixed-layout";
136 #address-cells = <1>;
137 #size-cells = <1>;
138
139 eeprom_iNIC_rf_0: eeprom@0 {
140 reg = <0x0 0x200>;
141 };
142 };
143 };
144
145 partition@50000 {
146 compatible = "denx,uimage";
147 label = "firmware";
148 reg = <0x50000 0x6d4000>;
149 };
150
151 partition@724000 {
152 label = "manufacture";
153 reg = <0x724000 0x8c000>;
154 read-only;
155 };
156
157 partition@7b0000 {
158 label = "backup";
159 reg = <0x7b0000 0x10000>;
160 read-only;
161 };
162
163 partition@7c0000 {
164 label = "storage";
165 reg = <0x7c0000 0x40000>;
166 read-only;
167 };
168 };
169 };
170 };
171
172 &ethernet {
173 pinctrl-names = "default";
174 pinctrl-0 = <&rgmii1_pins>;
175
176 nvmem-cells = <&macaddr_factory_4>;
177 nvmem-cell-names = "mac-address";
178
179 port@5 {
180 status = "okay";
181 mediatek,fixed-link = <1000 1 1 1>;
182 phy-mode = "rgmii";
183 };
184 };
185
186 &gpio0 {
187 rtl8367rb_reset {
188 gpio-hog;
189 gpios = <0 GPIO_ACTIVE_HIGH>;
190 output-high;
191 line-name = "rtl8367rb-reset";
192 };
193 };
194
195 &state_default {
196 gpio {
197 groups = "i2c", "uartf", "mdio";
198 function = "gpio";
199 };
200 };
201
202 &pcie {
203 status = "okay";
204 };
205
206 &pcie0 {
207 wifi@0,0 {
208 compatible = "mediatek,mt76";
209 reg = <0x0000 0 0 0 0>;
210 nvmem-cells = <&eeprom_iNIC_rf_0>;
211 nvmem-cell-names = "eeprom";
212 ieee80211-freq-limit = <5000000 6000000>;
213 };
214 };
215
216 &wmac {
217 nvmem-cells = <&eeprom_factory_0>;
218 nvmem-cell-names = "eeprom";
219 };