ath79: fix dts of Teltonika RUT9xx devices
[openwrt/staging/wigyori.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 m25p,fast-read;
116
117 partitions {
118 compatible = "fixed-partitions";
119 #address-cells = <1>;
120 #size-cells = <1>;
121
122 uboot: partition@0 {
123 label = "u-boot";
124 reg = <0x000000 0x020000>;
125 read-only;
126 };
127
128 partition@20000 {
129 compatible = "tplink,firmware";
130 label = "firmware";
131 reg = <0x020000 0x7D0000>;
132 };
133
134 art: partition@7F0000 {
135 label = "art";
136 reg = <0x7F0000 0x010000>;
137 read-only;
138 };
139 };
140 };
141 };
142
143 &eth0 {
144 status = "okay";
145
146 phy-mode = "rgmii";
147 mtd-mac-address = <&uboot 0x1fc00>;
148
149 fixed-link {
150 speed = <1000>;
151 full-duplex;
152 };
153 };
154
155 &wmac {
156 status = "okay";
157
158 mtd-cal-data = <&art 0x1000>;
159 mtd-mac-address = <&uboot 0x1fc00>;
160 };