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