ath79: fix dts of Teltonika RUT9xx devices
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / ar9344_teltonika_rut955-h7v3c0.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "ar9344_teltonika_rut9xx.dtsi"
5 #include <dt-bindings/interrupt-controller/irq.h>
6
7 / {
8 model = "Teltonika RUT955 H7V3C0";
9 compatible = "teltonika,rut955-h7v3c0", "teltonika,rut9xx", "qca,ar9344";
10
11 aliases {
12 led-boot = &led_system_green;
13 led-failsafe = &led_system_red;
14 led-running = &led_system_green;
15 led-upgrade = &led_system_red;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 signal0 {
22 label = "rut955:green:signal0";
23 gpios = <&gpio_ext 0 GPIO_ACTIVE_HIGH>;
24 };
25
26 signal1 {
27 label = "rut955:green:signal1";
28 gpios = <&gpio_ext 1 GPIO_ACTIVE_HIGH>;
29 };
30
31 signal2 {
32 label = "rut955:green:signal2";
33 gpios = <&gpio_ext 2 GPIO_ACTIVE_HIGH>;
34 };
35
36 signal3 {
37 label = "rut955:green:signal3";
38 gpios = <&gpio_ext 3 GPIO_ACTIVE_HIGH>;
39 };
40
41 signal4 {
42 label = "rut955:green:signal4";
43 gpios = <&gpio_ext 4 GPIO_ACTIVE_HIGH>;
44 };
45
46 led_system_red: system_red {
47 label = "rut955:red:system";
48 gpios = <&gpio_ext 5 GPIO_ACTIVE_HIGH>;
49 };
50
51 led_system_green: system_green {
52 label = "rut955:green:system";
53 gpios = <&gpio_ext 6 GPIO_ACTIVE_HIGH>;
54 default-state = "on";
55 };
56 };
57 };
58
59 &gpio {
60 pinctrl-names = "default";
61 pinctrl-0 = <&jtag_disable_pins>;
62
63 gpio-line-names = "RS485_D", "led_wan", "wmac_lna", "mmc_cs",
64 "EXT_INT", "", "", "",
65 "", "", "", "",
66 "", "led_lan2", "led_lan1", "",
67 "i2c_scl", "i2c_sda", "", "",
68 "", "", "led_lan3", "",
69 "", "", "", "",
70 "", "", "", "";
71
72 ext_lna {
73 gpio-hog;
74 gpios = <2 GPIO_ACTIVE_HIGH>;
75 output-high;
76 line-name = "rut955:wmac:ext_lna";
77 };
78
79 mmc_cs {
80 gpio-hog;
81 gpios = <3 GPIO_ACTIVE_HIGH>;
82 output-high;
83 line-name = "rut955:mmc:cs";
84 };
85
86 ext_int {
87 gpio-hog;
88 gpios = <4 GPIO_ACTIVE_LOW>;
89 input;
90 line-name = "rut955:ext:int";
91 };
92
93 uart1_td {
94 gpio-hog;
95 gpios = <18 GPIO_ACTIVE_HIGH>;
96 output-high;
97 line-name = "rut955:uart1:td";
98 };
99
100 uart1_rd {
101 gpio-hog;
102 gpios = <11 GPIO_ACTIVE_LOW>;
103 input;
104 line-name = "rut955:uart1:rd";
105 };
106
107 led_wan {
108 gpio-hog;
109 gpios = <1 GPIO_ACTIVE_HIGH>;
110 output-high;
111 line-name = "rut955:led:wan";
112 };
113
114 led_lan2 {
115 gpio-hog;
116 gpios = <13 GPIO_ACTIVE_HIGH>;
117 output-high;
118 line-name = "rut955:led:lan2";
119 };
120
121 led_lan1 {
122 gpio-hog;
123 gpios = <14 GPIO_ACTIVE_HIGH>;
124 output-high;
125 line-name = "rut955:led:lan1";
126 };
127
128 led_lan3 {
129 gpio-hog;
130 gpios = <22 GPIO_ACTIVE_HIGH>;
131 output-high;
132 line-name = "rut955:led:lan3";
133 };
134 };
135
136 &i2c0 {
137 gpio_ext: gpio_ext@74 {
138 status = "okay";
139
140 compatible = "nxp,pca9539";
141 reg = <0x74>;
142
143 #address-cells = <1>;
144 #size-cells = <0>;
145
146 gpio-controller;
147 #gpio-cells = <2>;
148
149 reset-gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
150
151 interrupt-parent = <&gpio>;
152 interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
153 interrupt-controller;
154 #interrupt-cells = <2>;
155
156 gpio-line-names = "signal_bar0", "signal_bar1", "signal_bar2", "signal_bar3",
157 "signal_bar4", "status_red", "status_green", "sim_sel",
158 "DOUT1", "DOUT2", "DIN2", "DIN1",
159 "MON", "MRST", "SDCD", "RS485_R";
160 };
161 };
162
163 &hs_uart {
164 dtr-gpios = <&gpio_ext 15 GPIO_ACTIVE_HIGH>;
165 };
166
167 &eth0 {
168 status = "okay";
169
170 phy-handle = <&swphy4>;
171
172 mtd-mac-address = <&config 0x0>;
173 mtd-mac-address-increment = <1>;
174 };
175
176 &eth1 {
177 status = "okay";
178
179 mtd-mac-address = <&config 0x0>;
180 };
181
182 &builtin_switch {
183 pinctrl-names = "default";
184 pinctrl-0 = <&pmx_leds_switch>;
185 };
186
187 &wmac {
188 pinctrl-names = "default";
189 pinctrl-0 = <&pmx_ext_lna>;
190 };
191
192 &pinmux {
193 pmx_ext_lna: ext_lna {
194 // EXT_LNA0 on GPIO 2
195 pinctrl-single,bits = <0x0 0x002e0000 0x00ff0000>;
196 };
197 };