47480481fa14438c8c81b585b7f98c1af36e3c94
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9563_tplink_tl-wr1043n.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         chosen {
10                 bootargs = "console=ttyS0,115200n8";
11         };
12
13         aliases {
14                 led-boot = &led_system;
15                 led-failsafe = &led_system;
16                 led-running = &led_system;
17                 led-upgrade = &led_system;
18                 label-mac-device = &wmac;
19         };
20
21         leds: leds {
22                 compatible = "gpio-leds";
23
24                 led_system: system {
25                         label = "tp-link:green:system";
26                         gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
27                         linux,default-trigger = "heartbeat";
28                 };
29
30                 wifi_green {
31                         label = "tp-link:green:wlan";
32                         gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
33                         linux,default-trigger = "phy0tpt";
34                 };
35
36                 wifi_wps {
37                         label = "tp-link:green:wps";
38                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
39                 };
40
41                 wan {
42                         label = "tp-link:green:wan";
43                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
44                 };
45
46                 wan_fail {
47                         label = "tp-link:orange:wan";
48                         gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
49                 };
50
51                 lan1 {
52                         label = "tp-link:green:lan1";
53                         gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
54                 };
55
56                 lan2 {
57                         label = "tp-link:green:lan2";
58                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
59                 };
60
61                 lan3 {
62                         label = "tp-link:green:lan3";
63                         gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
64                 };
65
66                 lan4 {
67                         label = "tp-link:green:lan4";
68                         gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
69                 };
70         };
71
72         keys {
73                 compatible = "gpio-keys";
74
75                 reset {
76                         label = "Reset button";
77                         linux,code = <KEY_RESTART>;
78                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
79                         debounce-interval = <60>;
80                 };
81
82                 wifi {
83                         label = "RFKILL button";
84                         linux,code = <KEY_RFKILL>;
85                         gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
86                         debounce-interval = <60>;
87                 };
88         };
89 };
90
91 &uart {
92         status = "okay";
93 };
94
95 &gpio {
96         status = "okay";
97 };
98
99 &mdio0 {
100         status = "okay";
101
102         phy-mask = <0>;
103         phy0: ethernet-phy@0 {
104                 reg = <0>;
105                 phy-mode = "sgmii";
106                 qca,mib-poll-interval = <500>;
107
108                 qca,ar8327-initvals = <
109                         0x04 0x00080080 /* PORT0 PAD MODE CTRL */
110                         0x7c 0x0000007e /* PORT0_STATUS */
111                 >;
112         };
113 };
114
115 &eth0 {
116         status = "okay";
117
118         mtd-mac-address = <&info 0x8>;
119         phy-mode = "sgmii";
120         phy-handle = <&phy0>;
121 };
122
123 &wmac {
124         status = "okay";
125
126         mtd-cal-data = <&art 0x1000>;
127         mtd-mac-address = <&info 0x8>;
128 };