ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / qca9558_librerouter_librerouter-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca955x.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 compatible = "librerouter,librerouter-v1", "qca,qca9558";
11 model = "LibreRouter v1";
12
13 aliases {
14 led-boot = &led_system;
15 led-failsafe = &led_system;
16 led-running = &led_system;
17 led-upgrade = &led_system;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_system: system {
24 label = "green:system";
25 gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
26 default-state = "on";
27 };
28
29 wifi_green {
30 label = "green:wlan2g";
31 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
32 linux,default-trigger = "phy0tpt";
33 };
34
35 status_blue {
36 function = LED_FUNCTION_STATUS;
37 color = <LED_COLOR_ID_BLUE>;
38 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
39 };
40 };
41
42 keys {
43 compatible = "gpio-keys";
44
45 pinctrl-names = "default";
46 /* GPIO1 (poe_pass) and GPIO2 (watchdog) requires jtag disabled */
47 pinctrl-0 = <&jtag_disable_pins>;
48
49 reset {
50 label = "Reset";
51 linux,code = <KEY_RESTART>;
52 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
53 debounce-interval = <60>;
54 };
55 };
56
57 watchdog {
58 compatible = "linux,wdt-gpio";
59 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
60 hw_algo = "toggle";
61 hw_margin_ms = <1000>;
62 always-running;
63 };
64 };
65
66 &pcie0 {
67 status = "okay";
68
69 wifi@0,0 {
70 compatible = "pci168c,0033";
71 reg = <0x0000 0 0 0 0>;
72 };
73 };
74
75 &pcie1 {
76 status = "okay";
77
78 wifi@0,0 {
79 compatible = "pci168c,0033";
80 reg = <0x0000 0 0 0 0>;
81 };
82 };
83
84 &usb_phy0 {
85 status = "okay";
86 };
87
88 &usb0 {
89 status = "okay";
90 };
91
92 &usb_phy1 {
93 status = "okay";
94 };
95
96 &usb1 {
97 status = "okay";
98 };
99
100 &spi {
101 status = "okay";
102
103 flash@0 {
104 compatible = "jedec,spi-nor";
105 reg = <0>;
106 spi-max-frequency = <25000000>;
107
108 partitions {
109 compatible = "fixed-partitions";
110 #address-cells = <1>;
111 #size-cells = <1>;
112
113 partition@0 {
114 label = "u-boot";
115 reg = <0x000000 0x040000>;
116 read-only;
117 };
118
119 partition@40000 {
120 label = "u-boot-env";
121 reg = <0x040000 0x010000>;
122 };
123
124 partition@50000 {
125 compatible = "denx,uimage";
126 label = "firmware";
127 reg = <0x050000 0x7c0000>;
128 };
129
130 partition@810000 {
131 label = "fw2";
132 reg = <0x810000 0x7d0000>;
133 };
134
135 partition@fd0000 {
136 label = "res";
137 reg = <0xfd0000 0x20000>;
138 };
139
140 art: partition@ff0000 {
141 label = "art";
142 reg = <0xff0000 0x010000>;
143 read-only;
144
145 nvmem-layout {
146 compatible = "fixed-layout";
147 #address-cells = <1>;
148 #size-cells = <1>;
149
150 macaddr_art_0: macaddr@0 {
151 reg = <0x0 0x6>;
152 };
153
154 macaddr_art_6: macaddr@6 {
155 reg = <0x6 0x6>;
156 };
157
158 macaddr_art_c: macaddr@c {
159 reg = <0xc 0x6>;
160 };
161 };
162 };
163 };
164 };
165 };
166
167 &mdio0 {
168 status = "okay";
169
170 phy0: ethernet-phy@0 {
171 reg = <0>;
172 qca,ar8327-initvals = <
173 0x04 0x87600000 /* PORT0: RGMII, MAC0/6 exchage, tx_delay 01, rx_delay 10 */
174 0x0c 0x00000080 /* PORT6: SGMII */
175 0x10 0x81000080 /* POWER_ON_STRAP: LED open drain, SerDes auto-neg disabled */
176 0x50 0xcf37cf37 /* LED_CTRL0 */
177 0x54 0xcf37cf37 /* LED_CTRL1 */
178 0x58 0xcf37cf37 /* LED_CTRL2 */
179 0x5c 0x0 /* LED_CTRL3 */
180 0x7c 0x0000007e /* PORT0_STATUS */
181 0x94 0x0000007e /* PORT6 STATUS */
182 >;
183 };
184 };
185
186 &eth0 {
187 status = "okay";
188
189 pll-data = <0xa6000000 0x00000101 0x00001616>;
190 nvmem-cells = <&macaddr_art_0>;
191 nvmem-cell-names = "mac-address";
192
193 phy-handle = <&phy0>;
194 };
195
196 &eth1 {
197 status = "okay";
198
199 pll-data = <0x03000101 0x00000101 0x00001616>;
200 nvmem-cells = <&macaddr_art_6>;
201 nvmem-cell-names = "mac-address";
202
203 fixed-link {
204 speed = <1000>;
205 full-duplex;
206 };
207 };
208
209 &wmac {
210 status = "okay";
211
212 mtd-cal-data = <&art 0x1000>;
213 nvmem-cells = <&macaddr_art_c>;
214 nvmem-cell-names = "mac-address";
215 };