ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / qca9558_tplink_tl-wr1043nd.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca955x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 aliases {
11 led-boot = &led_system;
12 led-failsafe = &led_system;
13 led-running = &led_system;
14 led-upgrade = &led_system;
15 label-mac-device = &wmac;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 led_system: system {
22 label = "green:system";
23 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
24 linux,default-trigger = "heartbeat";
25 };
26
27 usb {
28 function = LED_FUNCTION_USB;
29 color = <LED_COLOR_ID_GREEN>;
30 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
31 trigger-sources = <&hub_port0>;
32 linux,default-trigger = "usbport";
33 };
34
35 wifi_green {
36 function = LED_FUNCTION_WLAN;
37 color = <LED_COLOR_ID_GREEN>;
38 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
39 linux,default-trigger = "phy0tpt";
40 };
41
42 wifi_wps {
43 function = LED_FUNCTION_WPS;
44 color = <LED_COLOR_ID_GREEN>;
45 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
46 };
47 };
48
49 keys {
50 compatible = "gpio-keys";
51
52 reset {
53 label = "Reset button";
54 linux,code = <KEY_RESTART>;
55 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
56 debounce-interval = <60>;
57 };
58
59 wifi {
60 label = "RFKILL button";
61 linux,code = <KEY_RFKILL>;
62 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
63 debounce-interval = <60>;
64 };
65 };
66
67 gpio-export {
68 compatible = "gpio-export";
69 #size-cells = <0>;
70
71 gpio_usb_power {
72 gpio-export,name = "tp-link:power:usb";
73 gpio-export,output = <1>;
74 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
75 };
76 };
77 };
78
79 &usb_phy0 {
80 status = "okay";
81 };
82
83 &usb0 {
84 status = "okay";
85 };
86
87 &spi {
88 status = "okay";
89
90 flash@0 {
91 compatible = "jedec,spi-nor";
92 reg = <0>;
93 spi-max-frequency = <33400000>;
94
95 partitions {
96 compatible = "fixed-partitions";
97 #address-cells = <1>;
98 #size-cells = <1>;
99
100 uboot: partition@0 {
101 label = "u-boot";
102 reg = <0x000000 0x020000>;
103 read-only;
104
105 nvmem-layout {
106 compatible = "fixed-layout";
107 #address-cells = <1>;
108 #size-cells = <1>;
109
110 macaddr_uboot_1fc00: macaddr@1fc00 {
111 compatible = "mac-base";
112 reg = <0x1fc00 0x6>;
113 #nvmem-cell-cells = <1>;
114 };
115 };
116 };
117
118 partition@20000 {
119 compatible = "tplink,firmware";
120 label = "firmware";
121 reg = <0x020000 0x7d0000>;
122 };
123
124 art: partition@7f0000 {
125 label = "art";
126 reg = <0x7f0000 0x010000>;
127 read-only;
128 };
129 };
130 };
131 };
132
133 &mdio0 {
134 status = "okay";
135
136 phy0: ethernet-phy@0 {
137 reg = <0>;
138 qca,ar8327-initvals = <
139 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
140 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
141 0x10 0x81000080 /* POWER_ON_STRAP */
142 0x50 0xcc35cc35 /* LED_CTRL0 */
143 0x54 0xca35ca35 /* LED_CTRL1 */
144 0x58 0xc935c935 /* LED_CTRL2 */
145 0x5c 0x03ffff00 /* LED_CTRL3 */
146 0x7c 0x0000007e /* PORT0_STATUS */
147 0x94 0x0000007e /* PORT6 STATUS */
148 >;
149 };
150 };
151
152 &eth0 {
153 status = "okay";
154
155 pll-data = <0x56000000 0x00000101 0x00001616>;
156
157 nvmem-cells = <&macaddr_uboot_1fc00 1>;
158 nvmem-cell-names = "mac-address";
159 phy-handle = <&phy0>;
160 };
161
162 &eth1 {
163 status = "okay";
164
165 pll-data = <0x03000101 0x00000101 0x00001616>;
166
167 nvmem-cells = <&macaddr_uboot_1fc00 0>;
168 nvmem-cell-names = "mac-address";
169
170 fixed-link {
171 speed = <1000>;
172 full-duplex;
173 };
174 };
175
176 &wmac {
177 status = "okay";
178 mtd-cal-data = <&art 0x1000>;
179 nvmem-cells = <&macaddr_uboot_1fc00 0>;
180 nvmem-cell-names = "mac-address";
181 };