5e6e44be749ad8f3c1482ce37416632f641d6999
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9558_domywifi_dw33d.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 "qca955x.dtsi"
8
9 / {
10         compatible = "domywifi,dw33d", "qca,qca9558";
11         model = "DomyWifi DW33D";
12
13         chosen {
14                 bootargs = "console=ttyS0,115200n8";
15         };
16
17         aliases {
18                 led-boot = &led_system;
19                 led-failsafe = &led_system;
20                 led-running = &led_system;
21                 led-upgrade = &led_system;
22         };
23
24         leds {
25                 compatible = "gpio-leds";
26
27                 led_system: system {
28                         label = "dw33d:blue:system";
29                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
30                 };
31
32                 mmc {
33                         label = "dw33d:blue:mmc";
34                         gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
35                         trigger-sources = <&hub_port0>;
36                         linux,default-trigger = "usbport";
37                 };
38
39                 usb {
40                         label = "dw33d:blue:usb";
41                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
42                         trigger-sources = <&hub_port1>;
43                         linux,default-trigger = "usbport";
44                 };
45
46                 wlan2g {
47                         label = "dw33d:blue:wlan2g";
48                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
49                         linux,default-trigger = "phy1tpt";
50                 };
51
52                 internet {
53                         label = "dw33d:blue:internet";
54                         gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
55                 };
56         };
57
58         keys {
59                 compatible = "gpio-keys";
60
61                 reset {
62                         label = "Reset button";
63                         linux,code = <KEY_RESTART>;
64                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
65                         debounce-interval = <60>;
66                 };
67         };
68 };
69
70 &pcie0 {
71         status = "okay";
72
73         wifi@0,0 {
74                 compatible = "qcom,ath10k";
75                 reg = <0 0 0 0 0>;
76         };
77 };
78
79 &uart {
80         status = "okay";
81 };
82
83 &usb_phy0 {
84         status = "okay";
85 };
86
87 &usb0 {
88         #address-cells = <1>;
89         #size-cells = <0>;
90         status = "okay";
91
92         hub_port0: port@1 {
93                 reg = <1>;
94                 #trigger-source-cells = <0>;
95         };
96 };
97
98 &usb_phy1 {
99         status = "okay";
100 };
101
102 &usb1 {
103         #address-cells = <1>;
104         #size-cells = <0>;
105         status = "okay";
106
107         hub_port1: port@1 {
108                 reg = <1>;
109                 #trigger-source-cells = <0>;
110         };
111 };
112
113 &spi {
114         status = "okay";
115
116         num-cs = <1>;
117
118         flash@0 {
119                 compatible = "jedec,spi-nor";
120                 reg = <0>;
121                 spi-max-frequency = <25000000>;
122
123                 partitions {
124                         compatible = "fixed-partitions";
125                         #address-cells = <1>;
126                         #size-cells = <1>;
127
128                         partition@0 {
129                                 label = "u-boot";
130                                 reg = <0x0 0x40000>;
131                                 read-only;
132                         };
133
134                         partition@40000 {
135                                 label = "u-boot-env";
136                                 reg = <0x40000 0x10000>;
137                         };
138
139                         partition@50000 {
140                                 label = "oem-firmware";
141                                 reg = <0x50000 0xfa0000>;
142                         };
143
144                         art: partition@ff0000 {
145                                 label = "art";
146                                 reg = <0xff0000 0x10000>;
147                                 read-only;
148                         };
149                 };
150         };
151 };
152
153 &nand {
154         status = "okay";
155
156         partitions {
157                 compatible = "fixed-partitions";
158                 #address-cells = <1>;
159                 #size-cells = <1>;
160
161                 partition@0 {
162                         label = "kernel";
163                         reg = <0x0 0x500000>;
164                 };
165
166                 partition@500000 {
167                         label = "ubi";
168                         reg = <0x500000 0x5b00000>;
169                 };
170
171                 partition@6000000 {
172                         label = "oem-backup";
173                         reg = <0x6000000 0x2000000>;
174                 };
175         };
176 };
177
178 &mdio0 {
179         status = "okay";
180
181         phy0: ethernet-phy@0 {
182                 reg = <0>;
183
184                 qca,ar8327-initvals = <
185                         0x04 0x87600000 /* PORT0 PAD MODE CTRL */
186                         0x0c 0x00080080 /* PORT6 PAD MODE CTRL */
187                         0x7c 0x0000007e /* PORT0_STATUS */
188                         0x94 0x0000007e /* PORT6 STATUS */
189                         >;
190         };
191 };
192
193 &eth0 {
194         status = "okay";
195
196         mtd-mac-address = <&art 0x0>;
197         pll-data = <0x56000000 0x00000101 0x00001616>;
198         phy-handle = <&phy0>;
199 };
200
201 &eth1 {
202         status = "okay";
203
204         mtd-mac-address = <&art 0x6>;
205         pll-data = <0x03000101 0x00000101 0x00001616>;
206         fixed-link {
207                 speed = <1000>;
208                 full-duplex;
209         };
210 };
211
212 &wmac {
213         status = "okay";
214
215         mtd-cal-data = <&art 0x1000>;
216         mtd-mac-address = <&art 0xc>;
217 };