ath79: add pinmux to ar9330
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_tl-wr1043nd.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "qca9557.dtsi"
8
9 / {
10 chosen {
11 bootargs = "console=ttyS0,115200n8";
12 };
13
14 aliases {
15 led-status = &system;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 system: system {
22 label = "tp-link:green:system";
23 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
24 linux,default-trigger = "heartbeat";
25 };
26
27 usb {
28 label = "tp-link:green:usb";
29 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
30 default-state = "off";
31 trigger-sources = <&hub_port0>;
32 linux,default-trigger = "usbport";
33 };
34
35 wifi_green {
36 label = "tp-link:green:wlan";
37 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
38 default-state = "off";
39 linux,default-trigger = "phy0tpt";
40 };
41
42 wifi_wps {
43 label = "tp-link:green:wps";
44 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
45 default-state = "off";
46 };
47 };
48
49 keys {
50 compatible = "gpio-keys";
51 #address-cells = <1>;
52 #size-cells = <0>;
53
54 reset {
55 label = "Reset button";
56 linux,code = <KEY_RESTART>;
57 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
58 debounce-interval = <60>;
59 };
60
61 wifi {
62 label = "RFKILL button";
63 linux,code = <KEY_RFKILL>;
64 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
65 debounce-interval = <60>;
66 };
67 };
68
69 gpio-export {
70 compatible = "gpio-export";
71 #size-cells = <0>;
72
73 gpio_usb_power {
74 gpio-export,name = "tp-link:power:usb";
75 gpio-export,output = <1>;
76 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
77 };
78 };
79 };
80
81 &uart {
82 status = "okay";
83 };
84
85 &gpio {
86 status = "okay";
87 };
88
89 &usb_phy0 {
90 status = "okay";
91 };
92
93 &usb0 {
94 status = "okay";
95
96 hub_port0: port@1 {
97 reg = <1>;
98 #trigger-source-cells = <0>;
99 };
100 };
101
102 &spi {
103 status = "okay";
104 num-cs = <1>;
105
106 flash@0 {
107 #address-cells = <1>;
108 #size-cells = <1>;
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 label = "firmware";
126 reg = <0x020000 0x7d0000>;
127 };
128
129 art: partition@7f0000 {
130 label = "art";
131 reg = <0x7f0000 0x010000>;
132 read-only;
133 };
134 };
135 };
136 };
137
138 &mdio0 {
139 status = "okay";
140
141 phy0: ethernet-phy@0 {
142 reg = <0>;
143 qca,ar8327-initvals = <
144 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
145 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
146 0x10 0x81000080 /* POWER_ON_STRIP */
147 0x50 0xcc35cc35 /* LED_CTRL0 */
148 0x54 0xca35ca35 /* LED_CTRL1 */
149 0x58 0xc935c935 /* LED_CTRL2 */
150 0x5c 0x03ffff00 /* LED_CTRL3 */
151 0x7c 0x0000007e /* PORT0_STATUS */
152 0x94 0x0000007e /* PORT6 STATUS */
153 >;
154 };
155 };
156
157 &mdio1 {
158 status = "okay";
159
160 phy1: ethernet-phy@1 {
161 reg = <1>;
162 };
163 };
164
165 &eth0 {
166 status = "okay";
167
168 mtd-mac-address = <&uboot 0x1fc00>;
169 mtd-mac-address-increment = <1>;
170 phy-handle = <&phy0>;
171 };
172
173 &eth1 {
174 status = "okay";
175
176 mtd-mac-address = <&uboot 0x1fc00>;
177 phy-handle = <&phy1>;
178
179 fixed-link {
180 speed = <1000>;
181 full-duplex;
182 };
183 };
184
185 &wmac {
186 status = "okay";
187 mtd-cal-data = <&art 0x1000>;
188 mtd-mac-address = <&uboot 0x1fc00>;
189 };