ath79: add support for NEC Aterm WG1200CR
[openwrt/staging/chunkeey.git] / target / linux / ath79 / dts / qca9563_nec_wg1200cr.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 "qca956x.dtsi"
8
9 / {
10 model = "NEC Aterm WG1200CR";
11 compatible = "nec,wg1200cr", "qca,qca9563";
12
13 chosen {
14 bootargs = "console=ttyS0,115200n8";
15 };
16
17 aliases {
18 led-boot = &power_green;
19 led-failsafe = &power_red;
20 led-running = &power_green;
21 led-upgrade = &power_green;
22 };
23
24 leds {
25 compatible = "gpio-leds";
26 /* other LEDs are connected to ath10k (QCA9888) gpiochip */
27
28 power_green: power_green {
29 label = "wg1200cr:green:power";
30 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
31 default-state = "on";
32 };
33
34 power_red: power_red {
35 label = "wg1200cr:red:power";
36 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
37 };
38 };
39
40 keys {
41 compatible = "gpio-keys";
42
43 reset {
44 label = "reset";
45 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_RESTART>;
47 debounce-interval = <60>;
48 };
49
50 wps {
51 label = "wps";
52 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_WPS_BUTTON>;
54 debounce-interval = <60>;
55 };
56
57 bridge {
58 label = "br";
59 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
60 linux,code = <BTN_0>;
61 linux,input-type = <EV_SW>;
62 debounce-interval = <60>;
63 };
64
65 converter {
66 label = "cnv";
67 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
68 linux,code = <BTN_0>;
69 linux,input-type = <EV_SW>;
70 debounce-interval = <60>;
71 };
72 };
73 };
74
75 &spi {
76 status = "okay";
77 num-cs = <1>;
78
79 flash@0 {
80 compatible = "jedec,spi-nor";
81 reg = <0>;
82 spi-max-frequency = <25000000>;
83
84 partitions {
85 compatible = "fixed-partitions";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 partition@0 {
90 label = "u-boot";
91 reg = <0x000000 0x040000>;
92 read-only;
93 };
94
95 partition@40000 {
96 label = "devdata";
97 reg = <0x040000 0x010000>;
98 read-only;
99 };
100
101 partition@50000 {
102 label = "devconf";
103 reg = <0x050000 0x010000>;
104 read-only;
105 };
106
107 partition@60000 {
108 label = "misc";
109 reg = <0x060000 0x010000>;
110 read-only;
111 };
112
113 partition@70000 {
114 label = "wifimngdata";
115 reg = <0x070000 0x010000>;
116 read-only;
117 };
118
119 partition@80000 {
120 compatible = "seama";
121 label = "firmware";
122 reg = <0x080000 0x770000>;
123 };
124
125 partition@7f0000 {
126 label = "art";
127 reg = <0x7f0000 0x010000>;
128 read-only;
129 };
130 };
131 };
132 };
133
134 &mdio0 {
135 status = "okay";
136
137 phy0: ethernet-phy@0 {
138 reg = <0>;
139
140 qca,ar8327-initvals = <
141 0x04 0x00000080 /* PORT0 PAD MODE CTRL */
142 0x50 0xcc35cc35 /* LED_CTRL0 */
143 0x54 0xca35ca35 /* LED_CTRL1 */
144 0x58 0xc935c935 /* LED_CTRL2 */
145 0x5c 0x03ffff00 /* LED_CTRL3 */
146 0x7c 0x0000007e /* PORT0_STATUS */
147 >;
148 };
149 };
150
151 &eth0 {
152 status = "okay";
153
154 pll-data = <0x03000101 0x00000101 0x00001919>;
155
156 phy-mode = "sgmii";
157 phy-handle = <&phy0>;
158 };
159
160 &pcie {
161 status = "okay";
162
163 wifi@0,0 {
164 compatible = "pci168c,0056";
165 reg = <0x0000 0 0 0 0>;
166 };
167 };
168
169 &uart {
170 status = "okay";
171 };
172
173 &wmac {
174 status = "okay";
175 qca,no-eeprom;
176 };