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