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