ath79: add support for Compex WPJ531 (16M)
[openwrt/staging/dedeckeh.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 "qca955x.dtsi"
8
9 / {
10 model = "TP-Link RE350K v1";
11 compatible = "tplink,re350k-v1", "qca,qca9558";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 mdio-gpio0 = &mdio2;
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 app-config {
25 label = "app-config";
26 linux,code = <BTN_0>;
27 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
28 debounce-interval = <60>;
29 };
30
31 led {
32 label = "led";
33 linux,code = <BTN_1>;
34 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
35 debounce-interval = <60>;
36 };
37
38 reset {
39 label = "reset";
40 linux,code = <KEY_RESTART>;
41 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
42 debounce-interval = <60>;
43 };
44 };
45
46 leds {
47 compatible = "gpio-leds";
48
49 led_power: power {
50 label = "tp-link:green:power";
51 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
52 default-state = "on";
53 };
54
55 wlan2g_green {
56 label = "tp-link:green:wlan2g";
57 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
58 linux,default-trigger = "phy1tpt";
59 };
60
61 wlan2g_red {
62 label = "tp-link:red:wlan2g";
63 gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
64 };
65
66 wlan5g_green {
67 label = "tp-link:green:wlan5g";
68 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
69 linux,default-trigger = "phy0tpt";
70 };
71
72 wlan5g_red {
73 label = "tp-link:red:wlan5g";
74 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
75 };
76 };
77
78 mdio2: mdio {
79 compatible = "virtual,mdio-gpio";
80
81 #address-cells = <1>;
82 #size-cells = <0>;
83
84 gpios = <&gpio 23 GPIO_ACTIVE_HIGH>,
85 <&gpio 18 GPIO_ACTIVE_HIGH>;
86
87 phy4: ethernet-phy@4 {
88 reg = <4>;
89
90 phy-mode = "rgmii-rxid";
91 eee-broken-100tx;
92 eee-broken-1000t;
93 };
94 };
95 };
96
97 &eth0 {
98 status = "okay";
99
100 phy-handle = <&phy4>;
101 pll-data = <0x9e000000 0x80000101 0x80001313>;
102
103 mtd-mac-address = <&config 0x10008>;
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 num-cs = <1>;
124
125 flash@0 {
126 compatible = "jedec,spi-nor";
127 reg = <0>;
128 spi-max-frequency = <25000000>;
129
130 partitions {
131 compatible = "fixed-partitions";
132 #address-cells = <1>;
133 #size-cells = <1>;
134
135 partition@0 {
136 label = "u-boot";
137 reg = <0x000000 0x020000>;
138 read-only;
139 };
140
141 partition@20000 {
142 compatible = "tplink,firmware";
143 label = "firmware";
144 reg = <0x020000 0xd70000>;
145 };
146
147 config: partition@d90000 {
148 label = "config";
149 reg = <0xd90000 0x260000>;
150 read-only;
151 };
152
153 art: partition@ff0000 {
154 label = "art";
155 reg = <0xff0000 0x010000>;
156 read-only;
157 };
158 };
159 };
160 };
161
162 &uart {
163 status = "okay";
164 };
165
166 &wmac {
167 status = "okay";
168
169 mtd-cal-data = <&art 0x1000>;
170 mtd-mac-address = <&config 0x10008>;
171 };