0966f019089ba738836c3f91b86e0215f6a11f93
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_tplink_re350k-v1.dts
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 model = "TP-Link RE350K v1";
10 compatible = "tplink,re350k-v1", "qca,qca9558";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 mdio-gpio0 = &mdio2;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 app-config {
24 label = "app-config";
25 linux,code = <BTN_0>;
26 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
27 debounce-interval = <60>;
28 };
29
30 led {
31 label = "led";
32 linux,code = <BTN_1>;
33 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
34 debounce-interval = <60>;
35 };
36
37 reset {
38 label = "reset";
39 linux,code = <KEY_RESTART>;
40 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
41 debounce-interval = <60>;
42 };
43 };
44
45 leds {
46 compatible = "gpio-leds";
47
48 led_power: power {
49 label = "green:power";
50 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
51 default-state = "on";
52 };
53
54 wlan2g_green {
55 label = "green:wlan2g";
56 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
57 linux,default-trigger = "phy1tpt";
58 };
59
60 wlan2g_red {
61 label = "red:wlan2g";
62 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
63 };
64
65 wlan5g_green {
66 label = "green:wlan5g";
67 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
68 linux,default-trigger = "phy0tpt";
69 };
70
71 wlan5g_red {
72 label = "red:wlan5g";
73 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
74 };
75 };
76
77 mdio2: mdio {
78 compatible = "virtual,mdio-gpio";
79
80 #address-cells = <1>;
81 #size-cells = <0>;
82
83 gpios = <&gpio 23 GPIO_ACTIVE_HIGH>,
84 <&gpio 18 GPIO_ACTIVE_HIGH>;
85
86 phy4: ethernet-phy@4 {
87 reg = <4>;
88
89 phy-mode = "rgmii-rxid";
90 eee-broken-100tx;
91 eee-broken-1000t;
92 };
93 };
94 };
95
96 &eth0 {
97 status = "okay";
98
99 phy-handle = <&phy4>;
100 pll-data = <0x9e000000 0x80000101 0x80001313>;
101
102 nvmem-cells = <&macaddr_info_8>;
103 nvmem-cell-names = "mac-address";
104
105 gmac-config {
106 device = <&gmac>;
107
108 rxdv-delay = <2>;
109 rxd-delay = <2>;
110 txen-delay = <0>;
111 txd-delay = <0>;
112 rgmii-enabled = <1>;
113 };
114 };
115
116 &pcie0 {
117 status = "okay";
118 };
119
120 &spi {
121 status = "okay";
122
123 flash@0 {
124 compatible = "jedec,spi-nor";
125 reg = <0>;
126 spi-max-frequency = <25000000>;
127
128 partitions {
129 compatible = "fixed-partitions";
130 #address-cells = <1>;
131 #size-cells = <1>;
132
133 partition@0 {
134 label = "u-boot";
135 reg = <0x000000 0x020000>;
136 read-only;
137 };
138
139 partition@20000 {
140 compatible = "tplink,firmware";
141 label = "firmware";
142 reg = <0x020000 0xd70000>;
143 };
144
145 partition@d90000 {
146 label = "partition-table";
147 reg = <0xd90000 0x010000>;
148 read-only;
149 };
150
151 info: partition@da0000 {
152 label = "info";
153 reg = <0xda0000 0x020000>;
154 read-only;
155 };
156
157 partition@dc0000 {
158 label = "config";
159 reg = <0xdc0000 0x230000>;
160 read-only;
161 };
162
163 art: partition@ff0000 {
164 label = "art";
165 reg = <0xff0000 0x010000>;
166 read-only;
167 };
168 };
169 };
170 };
171
172 &wmac {
173 status = "okay";
174
175 mtd-cal-data = <&art 0x1000>;
176 nvmem-cells = <&macaddr_info_8>;
177 nvmem-cell-names = "mac-address";
178 };
179
180 &info {
181 compatible = "nvmem-cells";
182 #address-cells = <1>;
183 #size-cells = <1>;
184
185 macaddr_info_8: macaddr@8 {
186 reg = <0x8 0x6>;
187 };
188 };