ath79: add support for Archer C58/C59 v1
[openwrt/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 chosen {
12 bootargs = "console=ttyS0,115200n8";
13 };
14
15 led_spi {
16 compatible = "spi-gpio";
17 #address-cells = <1>;
18 #size-cells = <0>;
19
20 gpio-sck = <&gpio 18 GPIO_ACTIVE_HIGH>;
21 gpio-mosi = <&gpio 17 GPIO_ACTIVE_HIGH>;
22 cs-gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
23 num-chipselects = <1>;
24
25 led_gpio: led_gpio@0 {
26 compatible = "fairchild,74hc595";
27 reg = <0>;
28 gpio-controller;
29 #gpio-cells = <2>;
30 registers-number = <1>;
31 spi-max-frequency = <10000000>;
32 };
33 };
34
35 keys {
36 compatible = "gpio-keys-polled";
37 poll-interval = <100>;
38
39 wps_button {
40 label = "WPS button";
41 linux,code = <KEY_WPS_BUTTON>;
42 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
43 };
44
45 wifi_button {
46 label = "WiFi button";
47 linux,code = <KEY_RFKILL>;
48 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
49 };
50
51 reset_button {
52 label = "Reset button";
53 linux,code = <KEY_RESTART>;
54 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
55 };
56 };
57
58 gpio-export {
59 compatible = "gpio-export";
60
61 gpio_shift_register_oe {
62 gpio-export,name = "tp-link:oe:sr";
63 gpio-export,output = <0>;
64 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
65 };
66
67 gpio_shift_register_reset {
68 gpio-export,name = "tp-link:reset:sr";
69 gpio-export,output = <1>;
70 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
71 };
72
73 };
74 };
75
76 &uart {
77 status = "okay";
78 };
79
80 &gpio {
81 status = "okay";
82 };
83
84 &pcie {
85 status = "okay";
86 };
87
88 &eth0 {
89 phy-mode = "mii";
90 phy-handle = <&swphy0>;
91
92 gmac-config {
93 device = <&gmac>;
94
95 switch-phy-addr-swap = <1>;
96 switch-phy-swap = <1>;
97 };
98 };