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