ramips: mt7620a: convert to nvmem-layout
[openwrt/staging/hauke.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 = "amber:power";
28 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
29 };
30
31 wps2g {
32 label = "amber:wps2g";
33 gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
34 };
35
36 wlan5g {
37 label = "blue:wlan5g";
38 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
39 };
40
41 wlan2g {
42 label = "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 &gpio2 {
67 status = "okay";
68 };
69
70 &gpio3 {
71 status = "okay";
72 };
73
74 &spi0 {
75 status = "okay";
76
77 flash@0 {
78 compatible = "jedec,spi-nor";
79 reg = <0>;
80 spi-max-frequency = <50000000>;
81 m25p,fast-read;
82
83 partitions {
84 compatible = "fixed-partitions";
85 #address-cells = <1>;
86 #size-cells = <1>;
87
88 partition@0 {
89 label = "u-boot";
90 reg = <0x0 0x30000>;
91 read-only;
92 };
93
94 partition@30000 {
95 label = "u-boot-env";
96 reg = <0x30000 0x10000>;
97 read-only;
98 };
99
100 factory: partition@40000 {
101 label = "factory";
102 reg = <0x40000 0x10000>;
103 read-only;
104
105 nvmem-layout {
106 compatible = "fixed-layout";
107 #address-cells = <1>;
108 #size-cells = <1>;
109
110 eeprom_factory_0: eeprom@0 {
111 reg = <0x0 0x200>;
112 };
113 };
114 };
115
116 iNIC_rf: partition@50000 {
117 label = "iNIC_rf";
118 reg = <0x50000 0x10000>;
119 read-only;
120
121 nvmem-layout {
122 compatible = "fixed-layout";
123 #address-cells = <1>;
124 #size-cells = <1>;
125
126 eeprom_iNIC_rf_0: eeprom@0 {
127 reg = <0x0 0x200>;
128 };
129
130 macaddr_iNIC_rf_4: macaddr@4 {
131 reg = <0x4 0x6>;
132 };
133 };
134 };
135
136 partition@60000 {
137 label = "firmware";
138 reg = <0x60000 0xf40000>;
139 compatible = "denx,uimage";
140 };
141
142 partition@fa0000 {
143 label = "backup";
144 reg = <0xfa0000 0x10000>;
145 read-only;
146 };
147
148 partition@fb0000 {
149 label = "storage";
150 reg = <0xfb0000 0x50000>;
151 read-only;
152 };
153 };
154 };
155 };
156
157 &ethernet {
158 pinctrl-names = "default";
159 pinctrl-0 = <&rgmii1_pins &mdio_pins>;
160
161 nvmem-cells = <&macaddr_iNIC_rf_4>;
162 nvmem-cell-names = "mac-address";
163
164 port@5 {
165 status = "okay";
166 phy-mode = "rgmii";
167 mediatek,fixed-link = <1000 1 1 1>;
168 };
169
170 mdio-bus {
171 status = "okay";
172
173 ethernet-phy@0 {
174 reg = <0>;
175 phy-mode = "rgmii";
176 qca,ar8327-initvals = <
177 0x10 0x40000000 /* POWER-ON STRAPPING */
178 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
179 0x7c 0x0000007e /* PORT0 STATUS */
180 0x0c 0x05600000 /* PORT6 PAD MODE CTRL */
181 0x94 0x0000007e /* PORT6 STATUS */
182 >;
183 };
184 };
185 };
186
187 &gsw {
188 mediatek,ephy-base = /bits/ 8 <8>;
189 };
190
191 &state_default {
192 gpio {
193 groups = "i2c", "uartf", "nd_sd", "wled";
194 function = "gpio";
195 };
196 };
197
198 &pcie {
199 status = "okay";
200 };
201
202 &pcie0 {
203 wifi@0,0 {
204 compatible = "pci1814,5592";
205 reg = <0x0 0 0 0 0>;
206 nvmem-cells = <&eeprom_factory_0>;
207 nvmem-cell-names = "eeprom";
208 };
209 };
210
211 &wmac {
212 nvmem-cells = <&eeprom_iNIC_rf_0>;
213 nvmem-cell-names = "eeprom";
214 };
215
216 &ehci {
217 status = "okay";
218 };
219
220 &ohci {
221 status = "okay";
222 };