ath79: use "fixed-layout" for Embedded Wireless devices
[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 };
156 };
157 };
158
159 &mdio0 {
160 status = "okay";
161
162 phy0: ethernet-phy@0 {
163 reg = <0>;
164
165 qca,ar8327-initvals = <
166 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
167 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
168 0x50 0xc737c737 /* LED_CTRL0 */
169 0x54 0x00000000 /* LED_CTRL1 */
170 0x58 0x00000000 /* LED_CTRL2 */
171 0x5c 0x0030c300 /* LED_CTRL3 */
172 0x7c 0x0000007e /* PORT0_STATUS */
173 0x94 0x0000007e /* PORT6 STATUS */
174 >;
175 };
176 };
177
178 &eth0 {
179 status = "okay";
180
181 nvmem-cells = <&macaddr_art_0>;
182 nvmem-cell-names = "mac-address";
183 phy-handle = <&phy0>;
184 pll-data = <0xa6000000 0x00000101 0x00001616>;
185
186 gmac-config {
187 device = <&gmac>;
188 rgmii-enabled = <1>;
189 };
190 };
191
192 &eth1 {
193 status = "okay";
194
195 nvmem-cells = <&macaddr_art_0>;
196 nvmem-cell-names = "mac-address";
197 mac-address-increment = <(-1)>;
198 pll-data = <0x03000101 0x00000101 0x00001616>;
199
200 fixed-link {
201 speed = <1000>;
202 full-duplex;
203 };
204 };
205
206 &pcie0 {
207 status = "okay";
208
209 wifi@0,0 {
210 compatible = "qcom,ath10k";
211 reg = <0 0 0 0 0>;
212 };
213 };
214
215 &wmac {
216 status = "okay";
217
218 mtd-cal-data = <&art 0x1000>;
219 };
220
221 &art {
222 compatible = "nvmem-cells";
223 #address-cells = <1>;
224 #size-cells = <1>;
225
226 macaddr_art_0: macaddr@0 {
227 reg = <0x0 0x6>;
228 };
229 };