ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / qca9531_teltonika_rut300.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/leds/common.h>
7 #include "qca953x.dtsi"
8
9 / {
10 compatible = "teltonika,rut300", "teltonika,rut30x", "qca,qca9531";
11 model = "TELTONIKA RUT300";
12
13 aliases {
14 label-mac-device = &eth1;
15 led-boot = &led_wan;
16 led-failsafe = &led_wan;
17 led-running = &led_wan;
18 led-upgrade = &led_wan;
19 serial0 = &uart;
20 };
21
22 leds {
23 compatible = "gpio-leds";
24 pinctrl-names = "default";
25 pinctrl-0 = <&pmx_leds_switch>, <&jtag_disable_pins>;
26
27 led_wan: wan {
28 function = LED_FUNCTION_WAN;
29 color = <LED_COLOR_ID_YELLOW>;
30 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
31 };
32
33 lan1 {
34 label = "yellow:lan1";
35 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
36 };
37
38 lan2 {
39 label = "yellow:lan2";
40 gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
41 };
42
43 lan3 {
44 label = "yellow:lan3";
45 gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
46 };
47
48 lan4 {
49 label = "yellow:lan4";
50 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
51 };
52 };
53
54 keys {
55 compatible = "gpio-keys";
56
57 reset {
58 label = "reset";
59 linux,code = <KEY_RESTART>;
60 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
61 };
62 };
63 };
64
65 &spi {
66 status = "okay";
67 num-cs = <1>;
68
69 flash@0 {
70 compatible = "jedec,spi-nor";
71 reg = <0>;
72 spi-max-frequency = <25000000>;
73
74 partitions {
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 partition@0 {
80 label = "u-boot";
81 reg = <0x000000 0x020000>;
82 read-only;
83 };
84
85 config: partition@20000 {
86 label = "config";
87 reg = <0x020000 0x010000>;
88 read-only;
89
90 nvmem-layout {
91 compatible = "fixed-layout";
92 #address-cells = <1>;
93 #size-cells = <1>;
94
95 macaddr_config_0: macaddr@0 {
96 compatible = "mac-base";
97 reg = <0x0 0x6>;
98 #nvmem-cell-cells = <1>;
99 };
100 };
101 };
102
103 partition@30000 {
104 label = "art";
105 reg = <0x030000 0x010000>;
106 read-only;
107 };
108
109 partition@40000 {
110 compatible = "denx,uimage";
111 label = "firmware";
112 reg = <0x040000 0xf30000>;
113 };
114
115 partition@f70000 {
116 label = "event-log";
117 reg = <0xf70000 0x090000>;
118 };
119 };
120 };
121 };
122
123 &usb0 {
124 status = "okay";
125 };
126
127 &usb_phy {
128 status = "okay";
129 };
130
131 &uart {
132 status = "okay";
133 };
134
135 &eth0 {
136 status = "okay";
137 phy-handle = <&swphy0>;
138
139 nvmem-cells = <&macaddr_config_0 1>;
140 nvmem-cell-names = "mac-address";
141 };
142
143 &eth1 {
144 phy-handle = <&swphy4>;
145 nvmem-cells = <&macaddr_config_0 0>;
146 nvmem-cell-names = "mac-address";
147
148 gmac-config {
149 device = <&gmac>;
150 switch-phy-swap = <1>;
151 };
152 };
153
154 &pinmux {
155 pmx_leds_switch: leds_switch {
156 // switch port LEDs on GPIO 0~4
157 pinctrl-single,bits = <0x0 0x00000000 0xffffffff>,
158 <0x4 0x00000000 0x000000ff>;
159 };
160 };