b20a36a031900f9afa473bb38298e915666dec91
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_belkin_f9x-v2.dtsi
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/mtd/partitions/uimage.h>
8
9 / {
10 aliases {
11 led-boot = &led_system;
12 led-failsafe = &led_system;
13 led-running = &led_system;
14 led-upgrade = &led_system;
15 label-mac-device = &eth1;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 usb {
22 label = "green:usb2";
23 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
24 trigger-sources = <&hub_port0>;
25 linux,default-trigger = "usbport";
26 };
27
28 status {
29 label = "amber:status";
30 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
31 };
32
33 wps-amber {
34 label = "amber:wps";
35 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
36 };
37
38 wps-blue {
39 label = "blue:wps";
40 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
41 };
42
43 led_system: system {
44 label = "blue:system";
45 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
46 };
47 };
48
49 gpio-export {
50 compatible = "gpio-export";
51 #size-cells = <0>;
52
53 usb2_power {
54 gpio-export,name = "usb2:power";
55 gpio-export,output = <1>;
56 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
57 };
58 };
59
60 keys {
61 compatible = "gpio-keys";
62
63 wps {
64 label = "WPS button";
65 linux,code = <KEY_WPS_BUTTON>;
66 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
67 debounce-interval = <60>;
68 };
69
70 reset {
71 label = "Reset button";
72 linux,code = <KEY_RESTART>;
73 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
74 debounce-interval = <60>;
75 };
76 };
77
78 virtual_flash {
79 compatible = "mtd-concat";
80
81 devices = <&fwconcat0 &fwconcat1>;
82
83 partitions {
84 compatible = "fixed-partitions";
85 #address-cells = <1>;
86 #size-cells = <1>;
87
88 partition@0 {
89 compatible = "openwrt,uimage", "denx,uimage";
90 openwrt,ih-magic = <IH_MAGIC_OKLI>;
91 label = "firmware";
92 reg = <0x0 0x0>;
93 };
94 };
95 };
96 };
97
98 &pcie1 {
99 status = "okay";
100 };
101
102 &usb_phy0 {
103 status = "okay";
104 };
105
106 &usb0 {
107 status = "okay";
108 };
109
110 &spi {
111 status = "okay";
112
113 flash@0 {
114 compatible = "jedec,spi-nor";
115 reg = <0>;
116 spi-max-frequency = <80000000>;
117 m25p,fast-read;
118
119 partitions {
120 compatible = "fixed-partitions";
121 #address-cells = <1>;
122 #size-cells = <1>;
123
124 uboot: partition@0 {
125 label = "u-boot";
126 reg = <0x000000 0x040000>;
127 read-only;
128 };
129
130 partition@40000 {
131 label = "u-boot-env";
132 reg = <0x040000 0x010000>;
133 };
134
135 fwconcat0: partition@50000 {
136 label = "fwconcat0";
137 reg = <0x050000 0xe20000>;
138 };
139
140 partition@e70000 {
141 label = "loader";
142 reg = <0xe70000 0x10000>;
143 read-only;
144 };
145
146 fwconcat1: partition@e80000 {
147 label = "fwconcat1";
148 reg = <0xe80000 0x170000>;
149 };
150
151 art: partition@ff0000 {
152 label = "art";
153 reg = <0xff0000 0x010000>;
154
155 nvmem-layout {
156 compatible = "fixed-layout";
157 #address-cells = <1>;
158 #size-cells = <1>;
159
160 macaddr_art_0: macaddr@0 {
161 compatible = "mac-base";
162 reg = <0x0 0x6>;
163 #nvmem-cell-cells = <1>;
164 };
165 };
166 };
167 };
168 };
169 };
170
171 &mdio0 {
172 status = "okay";
173
174 phy0: ethernet-phy@0 {
175 reg = <0>;
176
177 qca,ar8327-initvals = <
178 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
179 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
180 0x50 0xc737c737 /* LED_CTRL0 */
181 0x54 0x00000000 /* LED_CTRL1 */
182 0x58 0x00000000 /* LED_CTRL2 */
183 0x5c 0x0030c300 /* LED_CTRL3 */
184 0x7c 0x0000007e /* PORT0_STATUS */
185 0x94 0x0000007e /* PORT6 STATUS */
186 >;
187 };
188 };
189
190 &eth0 {
191 status = "okay";
192
193 nvmem-cells = <&macaddr_art_0 0>;
194 nvmem-cell-names = "mac-address";
195 phy-handle = <&phy0>;
196 pll-data = <0xa6000000 0x00000101 0x00001616>;
197
198 gmac-config {
199 device = <&gmac>;
200 rgmii-enabled = <1>;
201 };
202 };
203
204 &eth1 {
205 status = "okay";
206
207 nvmem-cells = <&macaddr_art_0 (-1)>;
208 nvmem-cell-names = "mac-address";
209 pll-data = <0x03000101 0x00000101 0x00001616>;
210
211 fixed-link {
212 speed = <1000>;
213 full-duplex;
214 };
215 };
216
217 &pcie0 {
218 status = "okay";
219
220 wifi@0,0 {
221 compatible = "qcom,ath10k";
222 reg = <0 0 0 0 0>;
223 };
224 };
225
226 &wmac {
227 status = "okay";
228
229 mtd-cal-data = <&art 0x1000>;
230 };