ath79: DTS file style update and harmonization
[oweals/openwrt.git] / target / linux / ath79 / dts / ar9341_tplink.dtsi
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 "ar9341.dtsi"
8
9 / {
10         aliases {
11                 serial0 = &uart;
12                 led-boot = &led_power;
13                 led-failsafe = &led_power;
14                 led-running = &led_power;
15                 led-upgrade = &led_power;
16                 label-mac-device = &wmac;
17         };
18
19         keys: keys {
20                 compatible = "gpio-keys";
21
22                 pinctrl-names = "default";
23                 pinctrl-0 = <&jtag_disable_pins>;
24
25                 rfkill {
26                         label = "WiFi";
27                         linux,code = <KEY_RFKILL>;
28                         gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
29                         debounce-interval = <60>;
30                 };
31         };
32
33         leds: leds {
34                 compatible = "gpio-leds";
35
36                 led_power: power {
37                         label = "tp-link:green:power";
38                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
39                         default-state = "on";
40                 };
41
42                 wlan {
43                         label = "tp-link:green:wlan";
44                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
45                         linux,default-trigger = "phy0tpt";
46                 };
47
48                 qss {
49                         label = "tp-link:green:qss";
50                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
51                 };
52
53                 wan {
54                         label = "tp-link:green:wan";
55                         gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
56                 };
57
58                 lan1 {
59                         label = "tp-link:green:lan1";
60                         gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
61                 };
62
63                 lan2 {
64                         label = "tp-link:green:lan2";
65                         gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
66                 };
67
68                 lan3 {
69                         label = "tp-link:green:lan3";
70                         gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
71                 };
72
73                 lan4 {
74                         label = "tp-link:green:lan4";
75                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
76                 };
77         };
78 };
79
80 &ref {
81         clock-frequency = <25000000>;
82 };
83
84 &uart {
85         status = "okay";
86 };
87
88 &gpio {
89         status = "okay";
90 };
91
92 &eth0 {
93         status = "okay";
94
95         phy-handle = <&swphy0>;
96
97         mtd-mac-address = <&uboot 0x1fc00>;
98         mtd-mac-address-increment = <(-1)>;
99 };
100
101 &eth1 {
102         mtd-mac-address = <&uboot 0x1fc00>;
103
104         gmac-config {
105                 device = <&gmac>;
106                 switch-phy-swap = <1>;
107         };
108 };
109
110 &wmac {
111         status = "okay";
112
113         mtd-cal-data = <&art 0x1000>;
114         mtd-mac-address = <&uboot 0x1fc00>;
115 };