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