ath79: fix dsa binding for TP-Link TL-WR941ND v2
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9344_devolo_magic-2-wifi.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 "ar9344.dtsi"
8
9 / {
10 model = "Devolo Magic 2 Wifi";
11 compatible = "devolo,magic-2-wifi", "qca,ar9344";
12
13 aliases {
14 led-boot = &led_dlan_red;
15 led-failsafe = &led_dlan_red;
16 led-running = &led_dlan_white;
17 led-upgrade = &led_dlan_red;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 wlan {
24 label = "devolo:white:wlan";
25 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
26 linux,default-trigger = "phy1tpt";
27 };
28
29 led_dlan_white: dlan_white {
30 label = "devolo:white:dlan";
31 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
32 };
33
34 led_dlan_red: dlan_red {
35 label = "devolo:red:dlan";
36 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
37 panic-indicator;
38 };
39 };
40
41 keys {
42 compatible = "gpio-keys";
43
44 reset {
45 label = "Reset button";
46 linux,code = <KEY_RESTART>;
47 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
48 debounce-interval = <60>;
49 };
50
51 wifi {
52 label = "WIFI button";
53 linux,code = <KEY_RFKILL>;
54 gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
55 debounce-interval = <60>;
56 };
57
58 dlan {
59 label = "DLAN button";
60 linux,code = <BTN_0>;
61 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
62 debounce-interval = <60>;
63 };
64 };
65 };
66
67 &gpio {
68 wlan_power {
69 gpio-hog;
70 line-name = "WLAN power";
71 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
72 output-high;
73 };
74 };
75
76 &spi {
77 status = "okay";
78
79 num-cs = <1>;
80
81 flash@0 {
82 compatible = "jedec,spi-nor";
83 reg = <0>;
84 spi-max-frequency = <25000000>;
85
86 partitions {
87 compatible = "fixed-partitions";
88 #address-cells = <1>;
89 #size-cells = <1>;
90
91 uboot: partition@0 {
92 label = "u-boot";
93 reg = <0x0 0x40000>;
94 read-only;
95 };
96
97 partition@40000 {
98 label = "u-boot-env";
99 reg = <0x40000 0x10000>;
100 read-only;
101 };
102
103 partition@50000 {
104 label = "Config1";
105 reg = <0x50000 0x10000>;
106 read-only;
107 };
108
109 partition@60000 {
110 label = "Config2";
111 reg = <0x60000 0x10000>;
112 read-only;
113 };
114
115 partition@70000 {
116 compatible = "denx,uimage";
117 label = "firmware";
118 reg = <0x70000 0xf80000>;
119 };
120
121 art: partition@ff0000 {
122 label = "art";
123 reg = <0xff0000 0x10000>;
124 read-only;
125 };
126 };
127 };
128 };
129
130 &ref {
131 clock-frequency = <40000000>;
132 };
133
134 &uart {
135 status = "okay";
136 };
137
138 &eth0 {
139 status = "okay";
140
141 pll-data = <0x02000000 0x00000101 0x00001616>;
142
143 mtd-mac-address = <&art 0x1002>;
144 mtd-mac-address-increment = <2>;
145
146 phy-mode = "rgmii";
147 phy-handle = <&phy0>;
148 };
149
150 &wmac {
151 status = "okay";
152
153 mtd-cal-data = <&art 0x1000>;
154 };
155
156 &pcie {
157 status = "okay";
158
159 wifi@0,0 {
160 compatible = "qcom,ath10k";
161 reg = <0 0 0 0 0>;
162 };
163 };
164
165 &mdio0 {
166 status = "okay";
167
168 phy0: ethernet-phy@0 {
169 reg = <0>;
170 phy-mode = "rgmii";
171
172 qca,ar8327-initvals = <
173 /* PORT0: RGMII, MAC0/6 exchage, tx_delay 01, No rx_delay */
174 0x04 0x06400000
175 0x08 0x00000000 /* PORT5 PAD MODE CTRL */
176 0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
177 0x7c 0x0000007e /* PORT0_STATUS */
178 >;
179 };
180 };