ramips: move compatible for Ubiquiti Edgerouter X to DTS file
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / mt7620a_engenius_esr600.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7620a.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.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 label = "esr600:amber:power";
29 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
30 };
31
32 wps2g {
33 label = "esr600:amber:wps2g";
34 gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
35 };
36
37 wlan5g {
38 label = "esr600:blue:wlan5g";
39 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
40 };
41
42 wlan2g {
43 label = "esr600:blue:wlan2g";
44 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
45 };
46 };
47
48 keys {
49 compatible = "gpio-keys";
50
51 reset {
52 label = "reset";
53 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_RESTART>;
55 debounce-interval = <60>;
56 };
57
58 wps {
59 label = "wps";
60 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
61 linux,code = <KEY_WPS_BUTTON>;
62 debounce-interval = <60>;
63 };
64 };
65 };
66
67 &gpio1 {
68 status = "okay";
69 };
70
71 &gpio2 {
72 status = "okay";
73 };
74
75 &gpio3 {
76 status = "okay";
77 };
78
79 &spi0 {
80 status = "okay";
81
82 flash@0 {
83 compatible = "jedec,spi-nor";
84 reg = <0>;
85 spi-max-frequency = <50000000>;
86 m25p,fast-read;
87
88 partitions {
89 compatible = "fixed-partitions";
90 #address-cells = <1>;
91 #size-cells = <1>;
92
93 partition@0 {
94 label = "u-boot";
95 reg = <0x0 0x30000>;
96 read-only;
97 };
98
99 partition@30000 {
100 label = "u-boot-env";
101 reg = <0x30000 0x10000>;
102 read-only;
103 };
104
105 factory: partition@40000 {
106 label = "factory";
107 reg = <0x40000 0x10000>;
108 read-only;
109 };
110
111 iNIC_rf: partition@50000 {
112 label = "iNIC_rf";
113 reg = <0x50000 0x10000>;
114 read-only;
115 };
116
117 partition@60000 {
118 label = "firmware";
119 reg = <0x60000 0xf40000>;
120 compatible = "denx,uimage";
121 };
122
123 partition@fa0000 {
124 label = "backup";
125 reg = <0xfa0000 0x10000>;
126 read-only;
127 };
128
129 partition@fb0000 {
130 label = "storage";
131 reg = <0xfb0000 0x50000>;
132 read-only;
133 };
134 };
135 };
136 };
137
138 &ethernet {
139 status = "okay";
140 pinctrl-names = "default";
141 pinctrl-0 = <&rgmii1_pins &mdio_pins>;
142 mtd-mac-address = <&iNIC_rf 0x4>;
143
144 port@5 {
145 status = "okay";
146 phy-mode = "rgmii";
147 mediatek,fixed-link = <1000 1 1 1>;
148 };
149
150 mdio-bus {
151 status = "okay";
152 mediatek,mdio-mode;
153
154 ethernet-phy@0 {
155 reg = <0>;
156 phy-mode = "rgmii";
157 qca,ar8327-initvals = <
158 0x10 0x40000000 /* POWER-ON STRAPPING */
159 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
160 0x7c 0x0000007e /* PORT0 STATUS */
161 0x0c 0x05600000 /* PORT6 PAD MODE CTRL */
162 0x94 0x0000007e /* PORT6 STATUS */
163 >;
164 };
165 };
166 };
167
168 &state_default {
169 gpio {
170 ralink,group = "i2c", "uartf", "nd_sd", "wled";
171 ralink,function = "gpio";
172 };
173 };
174
175 &pcie {
176 status = "okay";
177 };
178
179 &pcie0 {
180 wifi@0,0 {
181 compatible = "pci1814,5592";
182 reg = <0x0 0 0 0 0>;
183 ralink,mtd-eeprom = <&factory 0x0>;
184 };
185 };
186
187 &wmac {
188 ralink,mtd-eeprom = <&iNIC_rf 0x0>;
189 };
190
191 &ehci {
192 status = "okay";
193 };
194
195 &ohci {
196 status = "okay";
197 };