f617d89c5ba766ff92b79ae7e6f8628b698bb8af
[oweals/openwrt.git] / target / linux / ath79 / dts / ar9132_tplink_tl-wr1043nd-v1.dts
1 // SPDX-License-Identifier: GPL-2.0
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "ar9132.dtsi"
8
9 / {
10         compatible = "tplink,tl-wr1043nd-v1", "qca,ar9132";
11         model = "TP-Link TL-WR1043ND v1";
12
13         aliases {
14                 led-boot = &system;
15                 led-failsafe = &system;
16                 led-running = &system;
17                 led-upgrade = &system;
18         };
19
20         extosc: ref {
21                 compatible = "fixed-clock";
22                 #clock-cells = <0>;
23                 clock-frequency = <40000000>;
24         };
25
26         keys {
27                 compatible = "gpio-keys";
28
29                 button0 {
30                         label = "reset";
31                         linux,code = <KEY_RESTART>;
32                         gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
33                         debounce-interval = <60>;
34                 };
35
36                 button1 {
37                         label = "qss";
38                         linux,code = <KEY_WPS_BUTTON>;
39                         gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
40                         debounce-interval = <60>;
41                 };
42         };
43
44         leds {
45                 compatible = "gpio-leds";
46                 usb {
47                         label = "tp-link:green:usb";
48                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
49                         trigger-sources = <&hub_port>;
50                         linux,default-trigger = "usbport";
51                 };
52
53                 system: system {
54                         label = "tp-link:green:system";
55                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
56                         linux,default-trigger = "heartbeat";
57                 };
58
59                 qss {
60                         label = "tp-link:green:qss";
61                         gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
62                 };
63
64                 wlan {
65                         label = "tp-link:green:wlan";
66                         gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
67                         linux,default-trigger = "phy0tpt";
68                 };
69         };
70
71         rtl8366rb {
72                 compatible = "realtek,rtl8366rb";
73                 gpio-sda = <&gpio 18 GPIO_ACTIVE_HIGH>;
74                 gpio-sck = <&gpio 19 GPIO_ACTIVE_HIGH>;
75
76                 resets = <&rst 8>;
77                 reset-names = "switch";
78         };
79 };
80
81 &uart {
82         status = "okay";
83 };
84
85 &pll {
86         clocks = <&extosc>;
87 };
88
89 &usb {
90         #address-cells = <1>;
91         #size-cells = <0>;
92         status = "okay";
93
94         hub_port: port@1 {
95                 reg = <1>;
96                 #trigger-source-cells = <0>;
97         };
98 };
99
100 &usb_phy {
101         status = "okay";
102 };
103
104 &spi {
105         status = "okay";
106         num-cs = <1>;
107
108         flash@0 {
109                 compatible = "jedec,spi-nor";
110                 reg = <0>;
111                 spi-max-frequency = <25000000>;
112
113                 partitions {
114                         compatible = "fixed-partitions";
115                         #address-cells = <1>;
116                         #size-cells = <1>;
117
118                         uboot: partition@0 {
119                                 label = "u-boot";
120                                 reg = <0x000000 0x020000>;
121                                 read-only;
122                         };
123
124                         partition@20000 {
125                                 compatible = "tplink,firmware";
126                                 label = "firmware";
127                                 reg = <0x020000 0x7D0000>;
128                         };
129
130                         art: partition@7F0000 {
131                                 label = "art";
132                                 reg = <0x7F0000 0x010000>;
133                                 read-only;
134                         };
135                 };
136         };
137 };
138
139 &eth0 {
140         status = "okay";
141
142         phy-mode = "rgmii";
143         mtd-mac-address = <&uboot 0x1fc00>;
144
145         fixed-link {
146                 speed = <1000>;
147                 full-duplex;
148         };
149 };
150
151 &wmac {
152         status = "okay";
153         mtd-cal-data = <&art 0x1000>;
154         mtd-mac-address = <&uboot 0x1fc00>;
155 };