ath79: drop and consolidate redundant chosen/bootargs
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9561_tplink_archer-c5x.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 #include "qca956x.dtsi"
7
8 / {
9         compatible = "tplink,archer-c5x", "qca,qca9560";
10
11         aliases {
12                 led-boot = &led_power;
13                 led-failsafe = &led_power;
14                 led-running = &led_power;
15                 led-upgrade = &led_power;
16                 label-mac-device = &eth1;
17         };
18
19         led_spi {
20                 compatible = "spi-gpio";
21                 #address-cells = <1>;
22                 #size-cells = <0>;
23
24                 sck-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
25                 mosi-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
26                 cs-gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
27                 num-chipselects = <1>;
28
29                 led_gpio: led_gpio@0 {
30                         compatible = "fairchild,74hc595";
31                         reg = <0>;
32                         gpio-controller;
33                         #gpio-cells = <2>;
34                         registers-number = <1>;
35                         spi-max-frequency = <10000000>;
36                 };
37         };
38
39         leds: leds {
40                 compatible = "gpio-leds";
41
42                 led_power: power {
43                         label = "tp-link:green:power";
44                         gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
45                         default-state = "on";
46                 };
47
48                 wlan2g {
49                         label = "tp-link:green:wlan2g";
50                         gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
51                         linux,default-trigger = "phy1tpt";
52                 };
53
54                 wlan5g {
55                         label = "tp-link:green:wlan5g";
56                         gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
57                         linux,default-trigger = "phy0tpt";
58                 };
59
60                 wan_green {
61                         label = "tp-link:green:wan";
62                         gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
63                 };
64
65                 wan_amber {
66                         label = "tp-link:amber:wan";
67                         gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
68                 };
69
70                 lan {
71                         label = "tp-link:green:lan";
72                         gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
73                 };
74
75                 wps {
76                         label = "tp-link:green:wps";
77                         gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
78                 };
79         };
80
81         keys {
82                 compatible = "gpio-keys";
83
84                 wps {
85                         label = "WPS button";
86                         linux,code = <KEY_WPS_BUTTON>;
87                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
88                 };
89
90                 wifi {
91                         label = "WiFi button";
92                         linux,code = <KEY_RFKILL>;
93                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
94                 };
95
96                 reset {
97                         label = "Reset button";
98                         linux,code = <KEY_RESTART>;
99                         gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
100                 };
101         };
102
103         gpio-export {
104                 compatible = "gpio-export";
105
106                 gpio_shift_register_oe {
107                         gpio-export,name = "tp-link:oe:sr";
108                         gpio-export,output = <0>;
109                         gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
110                 };
111
112                 gpio_shift_register_reset {
113                         gpio-export,name = "tp-link:reset:sr";
114                         gpio-export,output = <1>;
115                         gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
116                 };
117         };
118 };
119
120 &uart {
121         status = "okay";
122 };
123
124 &gpio {
125         status = "okay";
126 };
127
128 &pcie {
129         status = "okay";
130 };
131
132 &eth0 {
133         status = "okay";
134
135         phy-handle = <&swphy0>;
136
137         mtd-mac-address = <&mac 0x8>;
138         mtd-mac-address-increment = <1>;
139
140         gmac-config {
141                 device = <&gmac>;
142
143                 switch-phy-addr-swap = <1>;
144                 switch-phy-swap = <1>;
145         };
146 };
147
148 &eth1 {
149         status = "okay";
150
151         mtd-mac-address = <&mac 0x8>;
152 };
153
154 &wmac {
155         status = "okay";
156
157         mtd-cal-data = <&art 0x1000>;
158         mtd-mac-address = <&mac 0x8>;
159 };