ath79: add support for NEC Aterm WF1200CR
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9561_nec_wf1200cr.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 WF1200CR";
10 compatible = "nec,wf1200cr", "qca,qca9561";
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 15 GPIO_ACTIVE_LOW>;
26 };
27
28 led_power_red: power_red {
29 label = "red:power";
30 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
31 };
32 };
33
34 keys {
35 compatible = "gpio-keys";
36
37 reset {
38 label = "reset";
39 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_RESTART>;
41 debounce-interval = <60>;
42 };
43
44 router {
45 label = "rt";
46 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
47 linux,code = <BTN_0>;
48 linux,input-type = <EV_SW>;
49 debounce-interval = <60>;
50 };
51
52 wps {
53 label = "wps";
54 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
55 linux,code = <KEY_WPS_BUTTON>;
56 debounce-interval = <60>;
57 };
58 };
59 };
60
61 &spi {
62 status = "okay";
63
64 flash@0 {
65 compatible = "jedec,spi-nor";
66 reg = <0>;
67 spi-max-frequency = <25000000>;
68
69 partitions {
70 compatible = "fixed-partitions";
71 #address-cells = <1>;
72 #size-cells = <1>;
73
74 partition@0 {
75 label = "u-boot";
76 reg = <0x000000 0x040000>;
77 read-only;
78 };
79
80 partition@40000 {
81 label = "devdata";
82 reg = <0x040000 0x010000>;
83 read-only;
84 };
85
86 partition@50000 {
87 label = "devconf";
88 reg = <0x050000 0x010000>;
89 read-only;
90 };
91
92 partition@60000 {
93 label = "misc";
94 reg = <0x060000 0x010000>;
95 read-only;
96 };
97
98 partition@70000 {
99 compatible = "seama";
100 label = "firmware";
101 reg = <0x070000 0x780000>;
102 };
103
104 partition@7f0000 {
105 label = "art";
106 reg = <0x7f0000 0x010000>;
107 read-only;
108 };
109 };
110 };
111 };
112
113 &eth0 {
114 status = "okay";
115
116 pll-data = <0x03000101 0x00000101 0x00001919>;
117
118 phy-handle = <&swphy0>;
119
120 gmac-config {
121 device = <&gmac>;
122
123 switch-phy-swap = <1>;
124 switch-phy-addr-swap = <0>;
125 };
126 };
127
128 &eth1 {
129 status = "okay";
130
131 pinctrl-names = "default";
132 pinctrl-0 = <&pinmux_swled_enable_pins>;
133 };
134
135 &gpio {
136 switch_leds {
137 gpio-hog;
138 gpios = <14 GPIO_ACTIVE_HIGH>, /* WAN */
139 <19 GPIO_ACTIVE_HIGH>; /* LAN */
140 output-high;
141 line-name = "led:wan-lan";
142 };
143 };
144
145 &pinmux {
146 pinmux_swled_enable_pins: swled_enable_pins {
147 pinctrl-single,bits =
148 <0xc 0x240000 0xff0000>, /* WAN */
149 <0x10 0x10000000 0xff000000>; /* LAN */
150 };
151 };
152
153 &pcie {
154 status = "okay";
155
156 wifi@0,0 {
157 compatible = "qcom,ath10k";
158 reg = <0x0000 0 0 0 0>;
159 };
160 };
161
162 &wmac {
163 status = "okay";
164
165 qca,no-eeprom;
166 };