ath79: add support for Netgear WNR1000 v2
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9557_iodata_wn-ac-dgr.dtsi
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 "qca9557.dtsi"
8
9 / {
10 aliases {
11 led-boot = &power;
12 led-failsafe = &power;
13 led-running = &power;
14 led-upgrade = &power;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200n8";
19 };
20
21 leds: leds {
22 compatible = "gpio-leds";
23
24 power: power {
25 label = "iodata:green:power";
26 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
27 default-state = "on";
28 };
29
30 eco {
31 label = "iodata:green:eco";
32 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
33 };
34
35 wlan5g {
36 label = "iodata:green:wlan5g";
37 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
38 linux,default-trigger = "phy0tpt";
39 };
40
41 wlan2g {
42 label = "iodata:green:wlan2g";
43 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
44 linux,default-trigger = "phy1tpt";
45 };
46
47 notification {
48 label = "iodata:amber:notification";
49 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
50 };
51 };
52
53 keys: keys {
54 compatible = "gpio-keys";
55
56 eco {
57 label = "eco";
58 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
59 linux,code = <BTN_1>;
60 debounce-interval = <60>;
61 };
62
63 auto {
64 label = "auto";
65 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
66 linux,code = <BTN_0>;
67 linux,input-type = <EV_SW>;
68 debounce-interval = <60>;
69 };
70
71 wps {
72 label = "wps";
73 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
74 linux,code = <KEY_WPS_BUTTON>;
75 debounce-interval = <60>;
76 };
77
78 reset {
79 label = "reset";
80 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
81 linux,code = <KEY_RESTART>;
82 debounce-interval = <60>;
83 };
84
85 router {
86 label = "router";
87 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
88 linux,code = <BTN_0>;
89 linux,input-type = <EV_SW>;
90 debounce-interval = <60>;
91 };
92 };
93 };
94
95 &spi {
96 status = "okay";
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 qca,no-eeprom;
198 };