ath79: convert remaining mtd-mac-address cases to nvmem
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / qca9561_tplink_archer-c5x.dtsi
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 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 };
17
18 led_spi {
19 compatible = "spi-gpio";
20 #address-cells = <1>;
21 #size-cells = <0>;
22
23 sck-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
24 mosi-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
25 cs-gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
26 num-chipselects = <1>;
27
28 led_gpio: led_gpio@0 {
29 compatible = "fairchild,74hc595";
30 reg = <0>;
31 gpio-controller;
32 #gpio-cells = <2>;
33 registers-number = <1>;
34 spi-max-frequency = <10000000>;
35 };
36 };
37
38 leds: leds {
39 compatible = "gpio-leds";
40
41 led_power: power {
42 label = "green:power";
43 gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
44 default-state = "on";
45 };
46
47 wlan2g {
48 label = "green:wlan2g";
49 gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
50 linux,default-trigger = "phy1tpt";
51 };
52
53 wlan5g {
54 label = "green:wlan5g";
55 gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
56 linux,default-trigger = "phy0tpt";
57 };
58
59 wan_green {
60 label = "green:wan";
61 gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
62 };
63
64 wan_amber {
65 label = "amber:wan";
66 gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
67 };
68
69 lan {
70 label = "green:lan";
71 gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
72 };
73
74 wps {
75 label = "green:wps";
76 gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
77 };
78 };
79
80 keys {
81 compatible = "gpio-keys";
82
83 wps {
84 label = "WPS button";
85 linux,code = <KEY_WPS_BUTTON>;
86 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
87 };
88
89 wifi {
90 label = "WiFi button";
91 linux,code = <KEY_RFKILL>;
92 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
93 };
94
95 reset {
96 label = "Reset button";
97 linux,code = <KEY_RESTART>;
98 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
99 };
100 };
101
102 gpio-export {
103 compatible = "gpio-export";
104
105 gpio_shift_register_oe {
106 gpio-export,name = "tp-link:oe:sr";
107 gpio-export,output = <0>;
108 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
109 };
110
111 gpio_shift_register_reset {
112 gpio-export,name = "tp-link:reset:sr";
113 gpio-export,output = <1>;
114 gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
115 };
116 };
117 };
118
119 &pcie {
120 status = "okay";
121 };
122
123 &eth0 {
124 status = "okay";
125
126 phy-handle = <&swphy0>;
127
128 gmac-config {
129 device = <&gmac>;
130
131 switch-phy-addr-swap = <1>;
132 switch-phy-swap = <1>;
133 };
134 };
135
136 &eth1 {
137 status = "okay";
138 };
139
140 &wmac {
141 status = "okay";
142 };