26410bcc11bd2bb836ca1194a16313d4ff2b68f2
[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 led-boot = &led_power;
11 led-failsafe = &led_power;
12 led-running = &led_power;
13 led-upgrade = &led_power;
14 label-mac-device = &wmac;
15 };
16
17 leds: leds {
18 compatible = "gpio-leds";
19
20 led_power: power {
21 label = "green:power";
22 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
23 default-state = "on";
24 };
25
26 wlan {
27 label = "green:wlan";
28 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
29 linux,default-trigger = "phy0tpt";
30 };
31
32 qss {
33 label = "green:qss";
34 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
35 };
36
37 wan {
38 label = "green:wan";
39 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
40 };
41
42 lan1 {
43 label = "green:lan1";
44 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
45 };
46
47 lan2 {
48 label = "green:lan2";
49 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
50 };
51
52 lan3 {
53 label = "green:lan3";
54 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
55 };
56
57 lan4 {
58 label = "green:lan4";
59 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
60 };
61 };
62 };
63
64 &ref {
65 clock-frequency = <25000000>;
66 };
67
68 &gpio {
69 pinctrl-names = "default";
70 pinctrl-0 = <&jtag_disable_pins &pmx_usb_power>;
71 };
72
73 &pinmux {
74 pmx_usb_power: usb_power {
75 pinctrl-single,bits = <0x4 0x0 0xff>;
76 };
77 };
78
79 &eth0 {
80 status = "okay";
81
82 phy-handle = <&swphy0>;
83
84 mtd-mac-address = <&uboot 0x1fc00>;
85 mtd-mac-address-increment = <(-1)>;
86 };
87
88 &eth1 {
89 mtd-mac-address = <&uboot 0x1fc00>;
90
91 gmac-config {
92 device = <&gmac>;
93 switch-phy-swap = <1>;
94 };
95 };
96
97 &wmac {
98 status = "okay";
99
100 mtd-cal-data = <&art 0x1000>;
101 mtd-mac-address = <&uboot 0x1fc00>;
102 };