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