ramips: add support for MeiG SLT866 4G CPE
[openwrt/openwrt.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 compatible = "nvmem-cells";
93 label = "factory";
94 reg = <0x40000 0x10000>;
95 #address-cells = <1>;
96 #size-cells = <1>;
97 read-only;
98
99 eeprom_factory_0: eeprom@0 {
100 reg = <0x0 0x200>;
101 };
102
103 eeprom_factory_8000: eeprom@8000 {
104 reg = <0x8000 0x200>;
105 };
106 };
107
108 partition@50000 {
109 compatible = "denx,uimage";
110 label = "firmware";
111 reg = <0x50000 0x7b0000>;
112 };
113 };
114 };
115 };
116
117 &state_default {
118 gpio {
119 groups = "i2c", "jtag", "uartf";
120 function = "gpio";
121 };
122 };
123
124 &ethernet {
125 status = "okay";
126
127 port@0 {
128 phy-handle = <&phy0>;
129 phy-mode = "rgmii";
130 };
131
132 mdio-bus {
133 status = "okay";
134
135 phy0: ethernet-phy@0 {
136 reg = <0>;
137 phy-mode = "rgmii";
138
139 qca,ar8327-initvals = <
140 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
141 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
142 0x10 0x40000000 /* Power-on Strapping: 176-pin interface configuration */
143 0x50 0xc437c437 /* LED Control Register 0 */
144 0x54 0xc337c337 /* LED Control Register 1 */
145 0x58 0x00000000 /* LED Control Register 2 */
146 0x5c 0x03ffff00 /* LED Control Register 3 */
147 0x7c 0x0000007e /* PORT0_STATUS */
148 0x94 0x0000007e /* PORT6 STATUS */
149 >;
150 };
151 };
152 };
153
154 &pci {
155 status = "okay";
156 };
157
158 &pci1 {
159 status = "okay";
160
161 wifi@0,1,0 {
162 compatible = "pci1814,3091";
163 reg = <0x0 1 0 0 0>;
164 ralink,5ghz = <0>;
165 nvmem-cells = <&eeprom_factory_8000>;
166 nvmem-cell-names = "eeprom";
167 };
168 };
169
170 &wmac {
171 ralink,2ghz = <0>;
172 nvmem-cells = <&eeprom_factory_0>;
173 nvmem-cell-names = "eeprom";
174 };
175
176 &ehci {
177 status = "okay";
178 };
179
180 &ohci {
181 status = "okay";
182 };