e4bb6c25e550d025244dd864edcaa703950da713
[openwrt/staging/wigyori.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 #address-cells = <1>;
108 #size-cells = <0>;
109 status = "okay";
110
111 hub_port0: port@1 {
112 reg = <1>;
113 #trigger-source-cells = <0>;
114 };
115 };
116
117 &spi {
118 status = "okay";
119
120 flash@0 {
121 compatible = "jedec,spi-nor";
122 reg = <0>;
123 spi-max-frequency = <80000000>;
124 m25p,fast-read;
125
126 partitions {
127 compatible = "fixed-partitions";
128 #address-cells = <1>;
129 #size-cells = <1>;
130
131 uboot: partition@0 {
132 label = "u-boot";
133 reg = <0x000000 0x040000>;
134 read-only;
135 };
136
137 partition@40000 {
138 label = "u-boot-env";
139 reg = <0x040000 0x010000>;
140 };
141
142 fwconcat0: partition@50000 {
143 label = "fwconcat0";
144 reg = <0x050000 0xe20000>;
145 };
146
147 partition@e70000 {
148 label = "loader";
149 reg = <0xe70000 0x10000>;
150 read-only;
151 };
152
153 fwconcat1: partition@e80000 {
154 label = "fwconcat1";
155 reg = <0xe80000 0x170000>;
156 };
157
158 art: partition@ff0000 {
159 label = "art";
160 reg = <0xff0000 0x010000>;
161 };
162 };
163 };
164 };
165
166 &mdio0 {
167 status = "okay";
168
169 phy0: ethernet-phy@0 {
170 reg = <0>;
171
172 qca,ar8327-initvals = <
173 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
174 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
175 0x50 0xc737c737 /* LED_CTRL0 */
176 0x54 0x00000000 /* LED_CTRL1 */
177 0x58 0x00000000 /* LED_CTRL2 */
178 0x5c 0x0030c300 /* LED_CTRL3 */
179 0x7c 0x0000007e /* PORT0_STATUS */
180 0x94 0x0000007e /* PORT6 STATUS */
181 >;
182 };
183 };
184
185 &eth0 {
186 status = "okay";
187
188 mtd-mac-address = <&art 0x0>;
189 phy-handle = <&phy0>;
190 pll-data = <0xa6000000 0x00000101 0x00001616>;
191
192 gmac-config {
193 device = <&gmac>;
194 rgmii-enabled = <1>;
195 };
196 };
197
198 &eth1 {
199 status = "okay";
200
201 mtd-mac-address = <&art 0x0>;
202 mtd-mac-address-increment = <(-1)>;
203 pll-data = <0x03000101 0x00000101 0x00001616>;
204
205 fixed-link {
206 speed = <1000>;
207 full-duplex;
208 };
209 };
210
211 &pcie0 {
212 status = "okay";
213
214 wifi@0,0 {
215 compatible = "qcom,ath10k";
216 reg = <0 0 0 0 0>;
217 };
218 };
219
220 &wmac {
221 status = "okay";
222
223 mtd-cal-data = <&art 0x1000>;
224 };