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