2b199bfa4893b12fa3fbe031528c6d82cf4e635d
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9557_iodata_wn-ac-dgr.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 #include "qca955x.dtsi"
7
8 / {
9         aliases {
10                 led-boot = &led_power;
11                 led-failsafe = &led_power;
12                 led-running = &led_power;
13                 led-upgrade = &led_power;
14         };
15
16         chosen {
17                 bootargs = "console=ttyS0,115200n8";
18         };
19
20         leds: leds {
21                 compatible = "gpio-leds";
22
23                 led_power: power {
24                         label = "iodata:green:power";
25                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
26                         default-state = "on";
27                 };
28
29                 eco {
30                         label = "iodata:green:eco";
31                         gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
32                 };
33
34                 wlan5g {
35                         label = "iodata:green:wlan5g";
36                         gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
37                         linux,default-trigger = "phy0tpt";
38                 };
39
40                 wlan2g {
41                         label = "iodata:green:wlan2g";
42                         gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
43                         linux,default-trigger = "phy1tpt";
44                 };
45
46                 notification {
47                         label = "iodata:amber:notification";
48                         gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
49                 };
50         };
51
52         keys: keys {
53                 compatible = "gpio-keys";
54
55                 eco {
56                         label = "eco";
57                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
58                         linux,code = <BTN_1>;
59                         debounce-interval = <60>;
60                 };
61
62                 auto {
63                         label = "auto";
64                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
65                         linux,code = <BTN_0>;
66                         linux,input-type = <EV_SW>;
67                         debounce-interval = <60>;
68                 };
69
70                 wps {
71                         label = "wps";
72                         gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
73                         linux,code = <KEY_WPS_BUTTON>;
74                         debounce-interval = <60>;
75                 };
76
77                 reset {
78                         label = "reset";
79                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
80                         linux,code = <KEY_RESTART>;
81                         debounce-interval = <60>;
82                 };
83
84                 router {
85                         label = "router";
86                         gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
87                         linux,code = <BTN_0>;
88                         linux,input-type = <EV_SW>;
89                         debounce-interval = <60>;
90                 };
91         };
92 };
93
94 &spi {
95         status = "okay";
96
97         num-cs = <1>;
98
99         flash@0 {
100                 compatible = "jedec,spi-nor";
101                 reg = <0>;
102                 spi-max-frequency = <25000000>;
103
104                 partitions {
105                         compatible = "fixed-partitions";
106                         #address-cells = <1>;
107                         #size-cells = <1>;
108
109                         partition@0 {
110                                 label = "u-boot";
111                                 reg = <0x000000 0x030000>;
112                                 read-only;
113                         };
114
115                         partition@30000 {
116                                 label = "u-boot-env";
117                                 reg = <0x030000 0x010000>;
118                                 read-only;
119                         };
120
121                         partition@40000 {
122                                 compatible = "denx,uimage";
123                                 label = "firmware";
124                                 reg = <0x040000 0xe50000>;
125                         };
126
127                         partition@e90000 {
128                                 label = "manufacture";
129                                 reg = <0xe90000 0x100000>;
130                                 read-only;
131                         };
132
133                         partition@f90000 {
134                                 label = "backup";
135                                 reg = <0xf90000 0x010000>;
136                                 read-only;
137                         };
138
139                         partition@fa0000 {
140                                 label = "storage";
141                                 reg = <0xfa0000 0x050000>;
142                                 read-only;
143                         };
144
145                         art: partition@ff0000 {
146                                 label = "art";
147                                 reg = <0xff0000 0x010000>;
148                                 read-only;
149                         };
150                 };
151         };
152 };
153
154 &mdio0 {
155         status = "okay";
156
157         phy0: ethernet-phy@0 {
158                 reg = <0>;
159
160                 qca,ar8327-initvals = <
161                         0x04 0x87600000 /* PORT0 PAD MODE CTRL */
162                         0x7c 0x0000007e /* PORT0_STATUS */
163                 >;
164         };
165 };
166
167 &eth0 {
168         status = "okay";
169
170         pll-data = <0xa6000000 0x00000101 0x00001616>;
171         phy-handle = <&phy0>;
172 };
173
174 &pcie1 {
175         status = "okay";
176
177         wifi@0,0 {
178                 compatible = "pci168c,003c";
179                 reg = <0x0000 0 0 0 0>;
180         };
181 };
182
183 &uart {
184         status = "okay";
185 };
186
187 &usb_phy0 {
188         status = "okay";
189 };
190
191 &usb0 {
192         status = "okay";
193 };
194
195 &wmac {
196         status = "okay";
197
198         qca,no-eeprom;
199 };