ramips: rtxxxx: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / rt3662_engenius_esr600h.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "rt3883.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "engenius,esr600h", "ralink,rt3662-soc", "ralink,rt3883-soc";
10 model = "EnGenius ESR600H";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led_power: power {
23 label = "blue:power";
24 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
25 default-state = "on";
26 };
27
28 wps {
29 label = "blue:wps";
30 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
31 };
32 };
33
34 keys {
35 compatible = "gpio-keys-polled";
36 poll-interval = <100>;
37
38 reset-wps {
39 label = "reset-wps";
40 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_RESTART>;
42 };
43 };
44
45 gpio_export {
46 compatible = "gpio-export";
47 #size-cells = <0>;
48
49 usb {
50 gpio-export,name = "usb";
51 gpio-export,output = <1>;
52 gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
53 };
54 };
55 };
56
57 &gpio1 {
58 status = "okay";
59 };
60
61 &spi0 {
62 status = "okay";
63
64 flash@0 {
65 compatible = "jedec,spi-nor";
66 reg = <0>;
67 spi-max-frequency = <20000000>;
68
69 partitions {
70 compatible = "fixed-partitions";
71 #address-cells = <1>;
72 #size-cells = <1>;
73
74 partition@0 {
75 label = "u-boot";
76 reg = <0x0 0x30000>;
77 read-only;
78 };
79
80 partition@30000 {
81 label = "u-boot-env";
82 reg = <0x30000 0x1000>;
83 };
84
85 partition@32000 {
86 label = "config";
87 reg = <0x32000 0xe000>;
88 read-only;
89 };
90
91 factory: partition@40000 {
92 label = "factory";
93 reg = <0x40000 0x10000>;
94 read-only;
95
96 nvmem-layout {
97 compatible = "fixed-layout";
98 #address-cells = <1>;
99 #size-cells = <1>;
100
101 eeprom_factory_0: eeprom@0 {
102 reg = <0x0 0x200>;
103 };
104
105 eeprom_factory_8000: eeprom@8000 {
106 reg = <0x8000 0x200>;
107 };
108 };
109 };
110
111 partition@50000 {
112 compatible = "denx,uimage";
113 label = "firmware";
114 reg = <0x50000 0x7b0000>;
115 };
116 };
117 };
118 };
119
120 &state_default {
121 gpio {
122 groups = "i2c", "jtag", "uartf";
123 function = "gpio";
124 };
125 };
126
127 &ethernet {
128 status = "okay";
129
130 port@0 {
131 phy-handle = <&phy0>;
132 phy-mode = "rgmii";
133 };
134
135 mdio-bus {
136 status = "okay";
137
138 phy0: ethernet-phy@0 {
139 reg = <0>;
140 phy-mode = "rgmii";
141
142 qca,ar8327-initvals = <
143 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
144 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
145 0x10 0x40000000 /* Power-on Strapping: 176-pin interface configuration */
146 0x50 0xc437c437 /* LED Control Register 0 */
147 0x54 0xc337c337 /* LED Control Register 1 */
148 0x58 0x00000000 /* LED Control Register 2 */
149 0x5c 0x03ffff00 /* LED Control Register 3 */
150 0x7c 0x0000007e /* PORT0_STATUS */
151 0x94 0x0000007e /* PORT6 STATUS */
152 >;
153 };
154 };
155 };
156
157 &pci {
158 status = "okay";
159 };
160
161 &pci1 {
162 status = "okay";
163
164 wifi@0,1,0 {
165 compatible = "pci1814,3091";
166 reg = <0x0 1 0 0 0>;
167 ralink,5ghz = <0>;
168 nvmem-cells = <&eeprom_factory_8000>;
169 nvmem-cell-names = "eeprom";
170 };
171 };
172
173 &wmac {
174 ralink,2ghz = <0>;
175 nvmem-cells = <&eeprom_factory_0>;
176 nvmem-cell-names = "eeprom";
177 };
178
179 &ehci {
180 status = "okay";
181 };
182
183 &ohci {
184 status = "okay";
185 };