ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / ar9331_teltonika_rut230-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9331.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 model = "Teltonika RUT230 v1";
11 compatible = "teltonika,rut230-v1", "qca,ar9331";
12
13 aliases {
14 label-mac-device = &eth1;
15 led-boot = &led_ss0;
16 led-failsafe = &led_ss0;
17 led-upgrade = &led_ss0;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 reset {
24 label = "reset";
25 linux,code = <KEY_RESTART>;
26 gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
27 debounce-interval = <60>;
28 };
29
30 input {
31 label = "input";
32 linux,code = <BTN_0>;
33 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
34 debounce-interval = <60>;
35 };
36
37 sim-tray {
38 label = "sim-tray";
39 linux,code = <BTN_1>;
40 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
41 debounce-interval = <60>;
42 };
43 };
44
45 leds {
46 compatible = "gpio-leds";
47 pinctrl-names = "default";
48 pinctrl-0 = <&switch_led_disable_pins>;
49
50 led_ss0: signal-strength-0 {
51 label = "green:signal-strength-0";
52 gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
53 };
54
55 signal-strength-1 {
56 label = "green:signal-strength-1";
57 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
58 };
59
60 signal-strength-2 {
61 label = "green:signal-strength-2";
62 gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
63 };
64
65 signal-strength-3 {
66 label = "green:signal-strength-3";
67 gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
68 };
69
70 signal-strength-4 {
71 label = "green:signal-strength4";
72 gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
73 };
74
75 2g {
76 label = "green:2g";
77 gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
78 };
79
80 3g {
81 label = "green:3g";
82 gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
83 };
84
85 lan {
86 function = LED_FUNCTION_LAN;
87 color = <LED_COLOR_ID_GREEN>;
88 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
89 /* GPIO 13 - ACTIVE HIGH for hwrev 0 */
90 };
91
92 wan {
93 function = LED_FUNCTION_WAN;
94 color = <LED_COLOR_ID_GREEN>;
95 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
96 /* GPIO 14 - ACTIVE HIGH for hwrev 0 */
97 };
98
99 /* 4G LED - GPIO21 ACTIVE_HIGH for RUT240 */
100 };
101
102 reg_usb_vbus: reg_usb_vbus {
103 compatible = "regulator-fixed";
104 regulator-name = "usb_vbus";
105 regulator-min-microvolt = <5000000>;
106 regulator-max-microvolt = <5000000>;
107 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
108 enable-active-high;
109 };
110 };
111
112 &eth0 {
113 status = "okay";
114
115 nvmem-cells = <&macaddr_config_0 1>;
116 nvmem-cell-names = "mac-address";
117 };
118
119 &eth1 {
120 status = "okay";
121
122 nvmem-cells = <&macaddr_config_0 0>;
123 nvmem-cell-names = "mac-address";
124 };
125
126 &spi {
127 status = "okay";
128
129 flash@0 {
130 compatible = "jedec,spi-nor";
131 reg = <0>;
132 spi-max-frequency = <30000000>;
133
134 partitions {
135 compatible = "fixed-partitions";
136 #address-cells = <1>;
137 #size-cells = <1>;
138
139 partition@0 {
140 label = "u-boot";
141 reg = <0x0 0x20000>;
142 read-only;
143 };
144
145 config: partition@20000 {
146 label = "config";
147 reg = <0x20000 0x10000>;
148 read-only;
149
150 nvmem-layout {
151 compatible = "fixed-layout";
152 #address-cells = <1>;
153 #size-cells = <1>;
154
155 macaddr_config_0: macaddr@0 {
156 compatible = "mac-base";
157 reg = <0x0 0x6>;
158 #nvmem-cell-cells = <1>;
159 };
160 };
161 };
162
163 art: partition@30000 {
164 label = "art";
165 reg = <0x30000 0x10000>;
166 read-only;
167 };
168
169 partition@40000 {
170 compatible = "tplink,firmware";
171 label = "firmware";
172 reg = <0x40000 0xf30000>;
173 };
174
175 partition@f70000 {
176 label = "event-log";
177 reg = <0xf70000 0x90000>;
178 read-only;
179 };
180 };
181 };
182 };
183
184 &usb {
185 dr_mode = "host";
186 vbus-supply = <&reg_usb_vbus>;
187 status = "okay";
188 };
189
190 &gpio {
191 modem-power {
192 gpio-hog;
193 output-low;
194 gpios = <18 GPIO_ACTIVE_HIGH>;
195 line-name = "modem-power";
196 };
197 };
198
199 &usb_phy {
200 status = "okay";
201 };
202
203 &wmac {
204 status = "okay";
205
206 mtd-cal-data = <&art 0x1000>;
207 nvmem-cells = <&macaddr_config_0 2>;
208 nvmem-cell-names = "mac-address";
209 };