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