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