ath79: ubnt-unifi: make u-boot-env partition read-only
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_tplink_archer-c.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
8 / {
9 aliases {
10 led-boot = &led_system;
11 led-failsafe = &led_system;
12 led-running = &led_system;
13 led-upgrade = &led_system;
14 label-mac-device = &eth1;
15 };
16
17 leds: leds {
18 compatible = "gpio-leds";
19
20 led_system: system {
21 label = "green:system";
22 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
23 default-state = "on";
24 };
25
26 usb1 {
27 label = "green:usb1";
28 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
29 trigger-sources = <&hub_port1>;
30 linux,default-trigger = "usbport";
31 };
32
33 usb2 {
34 label = "green:usb2";
35 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
36 trigger-sources = <&hub_port0>;
37 linux,default-trigger = "usbport";
38 };
39
40 wlan2g {
41 label = "green:wlan2g";
42 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
43 linux,default-trigger = "phy1tpt";
44 };
45
46 qss {
47 label = "green:qss";
48 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
49 };
50 };
51
52 keys: keys {
53 compatible = "gpio-keys";
54
55 reset {
56 label = "Reset button";
57 linux,code = <KEY_RESTART>;
58 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
59 debounce-interval = <60>;
60 };
61 };
62
63 gpio-export {
64 compatible = "gpio-export";
65
66 gpio_usb1_power {
67 gpio-export,name = "tp-link:power:usb1";
68 gpio-export,output = <1>;
69 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
70 };
71
72 gpio_usb2_power {
73 gpio-export,name = "tp-link:power:usb2";
74 gpio-export,output = <1>;
75 gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
76 };
77 };
78 };
79
80 &pcie1 {
81 status = "okay";
82 };
83
84 &uart {
85 status = "okay";
86 };
87
88 &usb_phy0 {
89 status = "okay";
90 };
91
92 &usb0 {
93 #address-cells = <1>;
94 #size-cells = <0>;
95 status = "okay";
96
97 hub_port0: port@1 {
98 reg = <1>;
99 #trigger-source-cells = <0>;
100 };
101 };
102
103 &usb_phy1 {
104 status = "okay";
105 };
106
107 &usb1 {
108 #address-cells = <1>;
109 #size-cells = <0>;
110 status = "okay";
111
112 hub_port1: port@1 {
113 reg = <1>;
114 #trigger-source-cells = <0>;
115 };
116 };
117
118 &spi {
119 status = "okay";
120
121 num-cs = <1>;
122
123 flash@0 {
124 compatible = "jedec,spi-nor";
125 reg = <0>;
126 spi-max-frequency = <25000000>;
127
128 mtdparts: partitions {
129 compatible = "fixed-partitions";
130 #address-cells = <1>;
131 #size-cells = <1>;
132 };
133 };
134 };
135
136 &mdio0 {
137 status = "okay";
138
139 phy0: ethernet-phy@0 {
140 reg = <0>;
141
142 qca,ar8327-initvals = <
143 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
144 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
145 0x50 0xc737c737 /* LED_CTRL0 */
146 0x54 0x00000000 /* LED_CTRL1 */
147 0x58 0x00000000 /* LED_CTRL2 */
148 0x5c 0x0030c300 /* LED_CTRL3 */
149 0x7c 0x0000007e /* PORT0_STATUS */
150 0x94 0x0000007e /* PORT6 STATUS */
151 >;
152 };
153 };
154
155 &eth0 {
156 status = "okay";
157
158 mtd-mac-address = <&uboot 0x1fc00>;
159 mtd-mac-address-increment = <1>;
160 phy-handle = <&phy0>;
161 pll-data = <0x56000000 0x00000101 0x00001616>;
162
163 gmac-config {
164 device = <&gmac>;
165 rgmii-enabled = <1>;
166 };
167 };
168
169 &eth1 {
170 status = "okay";
171
172 mtd-mac-address = <&uboot 0x1fc00>;
173 pll-data = <0x03000101 0x00000101 0x00001616>;
174
175 fixed-link {
176 speed = <1000>;
177 full-duplex;
178 };
179 };
180
181 &wmac {
182 status = "okay";
183
184 mtd-cal-data = <&art 0x1000>;
185 mtd-mac-address = <&uboot 0x1fc00>;
186 };