f229a1917e11bd62033c1aeab8011b197b14c314
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9341_tplink.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9341.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 serial0 = &uart;
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 label-mac-device = &wmac;
16 };
17
18 leds: leds {
19 compatible = "gpio-leds";
20
21 led_power: power {
22 label = "green:power";
23 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
24 default-state = "on";
25 };
26
27 wlan {
28 label = "green:wlan";
29 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
30 linux,default-trigger = "phy0tpt";
31 };
32
33 qss {
34 label = "green:qss";
35 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
36 };
37
38 wan {
39 label = "green:wan";
40 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
41 };
42
43 lan1 {
44 label = "green:lan1";
45 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
46 };
47
48 lan2 {
49 label = "green:lan2";
50 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
51 };
52
53 lan3 {
54 label = "green:lan3";
55 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
56 };
57
58 lan4 {
59 label = "green:lan4";
60 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
61 };
62 };
63 };
64
65 &ref {
66 clock-frequency = <25000000>;
67 };
68
69 &uart {
70 status = "okay";
71 };
72
73 &gpio {
74 pinctrl-names = "default";
75 pinctrl-0 = <&jtag_disable_pins &pmx_usb_power>;
76 };
77
78 &pinmux {
79 pmx_usb_power: usb_power {
80 pinctrl-single,bits = <0x4 0x0 0xff>;
81 };
82 };
83
84 &eth0 {
85 status = "okay";
86
87 phy-handle = <&swphy0>;
88
89 mtd-mac-address = <&uboot 0x1fc00>;
90 mtd-mac-address-increment = <(-1)>;
91 };
92
93 &eth1 {
94 mtd-mac-address = <&uboot 0x1fc00>;
95
96 gmac-config {
97 device = <&gmac>;
98 switch-phy-swap = <1>;
99 };
100 };
101
102 &wmac {
103 status = "okay";
104
105 mtd-cal-data = <&art 0x1000>;
106 mtd-mac-address = <&uboot 0x1fc00>;
107 };