2efedcffec66012b0b8bd3efc9712d76cb6a25c5
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9563_nec_wg800hp.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 WG800HP";
11         compatible = "nec,wg800hp", "qca,qca9563";
12
13         chosen {
14                 bootargs = "console=ttyS0,115200n8";
15         };
16
17         aliases {
18                 led-boot = &led_power_green;
19                 led-failsafe = &led_power_red;
20                 led-running = &led_power_green;
21                 led-upgrade = &led_power_green;
22         };
23
24         leds {
25                 compatible = "gpio-leds";
26                 pinctrl-names = "default";
27                 pinctrl-0 = <&jtag_disable_pins>;
28
29                 wlan2g_red {
30                         label = "wg800hp:red:wlan2g";
31                         gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
32                 };
33
34                 active_red {
35                         label = "wg800hp:red:active";
36                         gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
37                 };
38
39                 active_green {
40                         label = "wg800hp:green:active";
41                         gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
42                 };
43
44                 led_power_red: power_red {
45                         label = "wg800hp:red:power";
46                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
47                 };
48
49                 led_power_green: power_green {
50                         label = "wg800hp:green:power";
51                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
52                         default-state = "on";
53                 };
54
55                 wlan5g_red {
56                         label = "wg800hp:red:wlan5g";
57                         gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
58                 };
59
60                 wlan5g_green {
61                         label = "wg800hp:green:wlan5g";
62                         gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
63                         linux,default-trigger = "phy0tpt";
64                 };
65
66                 wlan2g_green {
67                         label = "wg800hp:green:wlan2g";
68                         gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
69                         linux,default-trigger = "phy1tpt";
70                 };
71         };
72
73         keys {
74                 compatible = "gpio-keys";
75
76                 br {
77                         label = "br";
78                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
79                         linux,code = <BTN_0>;
80                         linux,input-type = <EV_SW>;
81                         debounce-interval = <60>;
82                 };
83
84                 reset {
85                         label = "reset";
86                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
87                         linux,code = <KEY_RESTART>;
88                         debounce-interval = <60>;
89                 };
90
91                 wps {
92                         label = "wps";
93                         gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
94                         linux,code = <KEY_WPS_BUTTON>;
95                         debounce-interval = <60>;
96                 };
97         };
98 };
99
100 &spi {
101         status = "okay";
102         num-cs = <1>;
103
104         flash@0 {
105                 compatible = "jedec,spi-nor";
106                 reg = <0>;
107                 spi-max-frequency = <25000000>;
108
109                 partitions {
110                         compatible = "fixed-partitions";
111                         #address-cells = <1>;
112                         #size-cells = <1>;
113
114                         partition@0 {
115                                 label = "u-boot";
116                                 reg = <0x000000 0x040000>;
117                                 read-only;
118                         };
119
120                         partition@40000 {
121                                 label = "u-boot-env";
122                                 reg = <0x040000 0x010000>;
123                                 read-only;
124                         };
125
126                         partition@50000 {
127                                 compatible = "denx,uimage";
128                                 label = "firmware";
129                                 reg = <0x050000 0x6f0000>;
130                         };
131
132                         partition@740000 {
133                                 label = "user_data";
134                                 reg = <0x740000 0x0a0000>;
135                                 read-only;
136                         };
137
138                         partition@7e0000 {
139                                 label = "board_data";
140                                 reg = <0x7e0000 0x010000>;
141                                 read-only;
142                         };
143
144                         art: partition@7f0000 {
145                                 label = "art";
146                                 reg = <0x7f0000 0x010000>;
147                                 read-only;
148                         };
149                 };
150         };
151 };
152
153 &mdio0 {
154         status = "okay";
155
156         phy0: ethernet-phy@0 {
157                 reg = <0>;
158
159                 qca,ar8327-initvals = <
160                         0x04 0x00000080 /* PORT0 PAD MODE CTRL */
161                         0x50 0xcc35cc35 /* LED_CTRL0 */
162                         0x54 0xca35ca35 /* LED_CTRL1 */
163                         0x58 0xc935c935 /* LED_CTRL2 */
164                         0x5c 0x03ffff00 /* LED_CTRL3 */
165                         0x7c 0x0000007e /* PORT0_STATUS */
166                 >;
167         };
168 };
169
170 &eth0 {
171         status = "okay";
172
173         phy-mode = "sgmii";
174         phy-handle = <&phy0>;
175 };
176
177 &pcie {
178         status = "okay";
179 };
180
181 &uart {
182         status = "okay";
183 };
184
185 &wmac {
186         status = "okay";
187         qca,no-eeprom;
188 };