rockchip: add Radxa CM3 IO board support
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7620a_engenius_esr600.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 = "engenius,esr600", "ralink,mt7620a-soc";
11 model = "EnGenius ESR600";
12
13 chosen {
14 bootargs = "console=ttyS0,115200";
15 };
16
17 aliases {
18 led-boot = &led_power;
19 led-failsafe = &led_power;
20 led-running = &led_power;
21 led-upgrade = &led_power;
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_power: power {
28 function = LED_FUNCTION_POWER;
29 color = <LED_COLOR_ID_AMBER>;
30 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
31 };
32
33 wps2g {
34 label = "amber:wps2g";
35 gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
36 };
37
38 wlan5g {
39 label = "blue:wlan5g";
40 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
41 };
42
43 wlan2g {
44 label = "blue:wlan2g";
45 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
46 };
47 };
48
49 keys {
50 compatible = "gpio-keys";
51
52 reset {
53 label = "reset";
54 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
55 linux,code = <KEY_RESTART>;
56 debounce-interval = <60>;
57 };
58
59 wps {
60 label = "wps";
61 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
62 linux,code = <KEY_WPS_BUTTON>;
63 debounce-interval = <60>;
64 };
65 };
66 };
67
68 &gpio2 {
69 status = "okay";
70 };
71
72 &gpio3 {
73 status = "okay";
74 };
75
76 &spi0 {
77 status = "okay";
78
79 flash@0 {
80 compatible = "jedec,spi-nor";
81 reg = <0>;
82 spi-max-frequency = <50000000>;
83 m25p,fast-read;
84
85 partitions {
86 compatible = "fixed-partitions";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 partition@0 {
91 label = "u-boot";
92 reg = <0x0 0x30000>;
93 read-only;
94 };
95
96 partition@30000 {
97 label = "u-boot-env";
98 reg = <0x30000 0x10000>;
99 read-only;
100 };
101
102 factory: partition@40000 {
103 label = "factory";
104 reg = <0x40000 0x10000>;
105 read-only;
106
107 nvmem-layout {
108 compatible = "fixed-layout";
109 #address-cells = <1>;
110 #size-cells = <1>;
111
112 eeprom_factory_0: eeprom@0 {
113 reg = <0x0 0x200>;
114 };
115 };
116 };
117
118 iNIC_rf: partition@50000 {
119 label = "iNIC_rf";
120 reg = <0x50000 0x10000>;
121 read-only;
122
123 nvmem-layout {
124 compatible = "fixed-layout";
125 #address-cells = <1>;
126 #size-cells = <1>;
127
128 eeprom_iNIC_rf_0: eeprom@0 {
129 reg = <0x0 0x200>;
130 };
131
132 macaddr_iNIC_rf_4: macaddr@4 {
133 reg = <0x4 0x6>;
134 };
135 };
136 };
137
138 partition@60000 {
139 label = "firmware";
140 reg = <0x60000 0xf40000>;
141 compatible = "denx,uimage";
142 };
143
144 partition@fa0000 {
145 label = "backup";
146 reg = <0xfa0000 0x10000>;
147 read-only;
148 };
149
150 partition@fb0000 {
151 label = "storage";
152 reg = <0xfb0000 0x50000>;
153 read-only;
154 };
155 };
156 };
157 };
158
159 &ethernet {
160 pinctrl-names = "default";
161 pinctrl-0 = <&rgmii1_pins &mdio_pins>;
162
163 nvmem-cells = <&macaddr_iNIC_rf_4>;
164 nvmem-cell-names = "mac-address";
165
166 port@5 {
167 status = "okay";
168 phy-mode = "rgmii";
169 mediatek,fixed-link = <1000 1 1 1>;
170 };
171
172 mdio-bus {
173 status = "okay";
174
175 ethernet-phy@0 {
176 reg = <0>;
177 phy-mode = "rgmii";
178 qca,ar8327-initvals = <
179 0x10 0x40000000 /* POWER-ON STRAPPING */
180 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
181 0x7c 0x0000007e /* PORT0 STATUS */
182 0x0c 0x05600000 /* PORT6 PAD MODE CTRL */
183 0x94 0x0000007e /* PORT6 STATUS */
184 >;
185 };
186 };
187 };
188
189 &gsw {
190 mediatek,ephy-base = /bits/ 8 <8>;
191 };
192
193 &state_default {
194 gpio {
195 groups = "i2c", "uartf", "nd_sd", "wled";
196 function = "gpio";
197 };
198 };
199
200 &pcie {
201 status = "okay";
202 };
203
204 &pcie0 {
205 wifi@0,0 {
206 compatible = "pci1814,5592";
207 reg = <0x0 0 0 0 0>;
208 nvmem-cells = <&eeprom_factory_0>;
209 nvmem-cell-names = "eeprom";
210 };
211 };
212
213 &wmac {
214 nvmem-cells = <&eeprom_iNIC_rf_0>;
215 nvmem-cell-names = "eeprom";
216 };
217
218 &ehci {
219 status = "okay";
220 };
221
222 &ohci {
223 status = "okay";
224 };