ath79: add QCA956x GMAC config
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / ar9344_pcs_cr5000.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 = "PowerCloud Systems CR5000";
11 compatible = "pcs,cr5000", "qca,ar9344";
12
13 aliases {
14 serial0 = &uart;
15 led-status = &status;
16 };
17
18 keys {
19 compatible = "gpio-keys-polled";
20 poll-interval = <20>;
21
22 pinctrl-names = "default";
23 pinctrl-0 = <&jtag_disable_pins>;
24
25 reset {
26 label = "Reset button";
27 linux,code = <KEY_RESTART>;
28 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
29 debounce-interval = <60>;
30 };
31
32 wps {
33 label = "WPS button";
34 linux,code = <KEY_WPS_BUTTON>;
35 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
36 debounce-interval = <60>;
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 status: power {
44 label = "pcs:amber:power";
45 gpios = <&gpio 2 GPIO_ACTIVE_LOW>,
46 <&gpio 4 GPIO_ACTIVE_LOW>;
47 default-state = "on";
48 };
49
50 wlan2g {
51 label = "pcs:blue:wlan";
52 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
53 default-state = "off";
54 linux,default-trigger = "phy0tpt";
55 };
56
57 wps_white {
58 label = "pcs:white:wps";
59 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
60 default-state = "off";
61 };
62 };
63
64 };
65
66 &ref {
67 clock-frequency = <25000000>;
68 };
69
70 &uart {
71 status = "okay";
72 };
73
74 &gpio {
75 status = "okay";
76 };
77
78 &spi {
79 num-cs = <1>;
80
81 status = "okay";
82
83 flash@0 {
84 compatible = "jedec,spi-nor";
85 reg = <0>;
86 spi-max-frequency = <25000000>;
87
88 partitions {
89 compatible = "fixed-partitions";
90 #address-cells = <1>;
91 #size-cells = <1>;
92
93 uboot: partition@0 {
94 label = "u-boot";
95 reg = <0x000000 0x040000>;
96 read-only;
97 };
98
99 partition@40000 {
100 label = "u-boot-env";
101 reg = <0x040000 0x010000>;
102 read-only;
103 };
104
105 partition@50000 {
106 label = "firmware";
107 reg = <0x050000 0x07a0000>;
108 };
109
110 art: partition@7f0000 {
111 label = "art";
112 reg = <0x7f0000 0x010000>;
113 read-only;
114 };
115 };
116 };
117 };
118
119 &usb {
120 status = "okay";
121 #address-cells = <1>;
122 #size-cells = <0>;
123
124 hub_port1: port@1 {
125 reg = <1>;
126 #trigger-source-cells = <0>;
127 };
128 };
129
130 &usb_phy {
131 status = "okay";
132 };
133
134 &pcie {
135 status = "okay";
136
137 ath9k: wifi@0,0 {
138 compatible = "pci168c,0030";
139 reg = <0x0000 0 0 0 0>;
140 mtd-mac-address = <&art 0x5002>;
141 #gpio-cells = <2>;
142 gpio-controller;
143 };
144 };
145
146 &mdio0 {
147 status = "okay";
148
149 phy-mask = <0>;
150
151 phy0: ethernet-phy@0 {
152 reg = <0>;
153 phy-mode = "rgmii";
154 qca,ar8327-initvals = <
155 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
156 0x10 0x81000080 /* POWER_ON_STRAP */
157 0x50 0xcc35cc35 /* LED_CTRL0 */
158 0x54 0xca35ca35 /* LED_CTRL1 */
159 0x58 0xc935c935 /* LED_CTRL2 */
160 0x5c 0x03ffff00 /* LED_CTRL3 */
161 0x7c 0x0000007e /* PORT0_STATUS */
162 >;
163 };
164 };
165
166 &eth0 {
167 #address-cells = <1>;
168 #size-cells = <0>;
169 status = "okay";
170
171 /* default for ar934x, except for 1000M */
172 pll-data = <0x06000000 0x00000101 0x00001616>;
173
174 mtd-mac-address = <&art 0x0>;
175
176 phy-mode = "rgmii";
177 phy-handle = <&phy0>;
178
179
180 aliases {
181 ag0 = &eth1;
182 };
183
184 port@0 {
185 compatible = "swconfig,port";
186 reg = <0>;
187 swconfig,segment = "lan";
188 swconfig,portmap = <1 1>;
189 };
190
191 port@1 {
192 compatible = "swconfig,port";
193 reg = <1>;
194 swconfig,segment = "lan";
195 swconfig,portmap = <2 2>;
196 };
197
198 port@2 {
199 compatible = "swconfig,port";
200 reg = <2>;
201 swconfig,segment = "lan";
202 swconfig,portmap = <3 3>;
203 };
204
205 port@3 {
206 compatible = "swconfig,port";
207 reg = <3>;
208 swconfig,segment = "lan";
209 swconfig,portmap = <4 4>;
210 };
211
212 port@4 {
213 compatible = "swconfig,port";
214 reg = <4>;
215 swconfig,segment = "wan";
216 swconfig,portmap = <5 5>;
217 };
218
219 };
220
221 &wmac {
222 status = "okay";
223
224 mtd-cal-data = <&art 0x1000>;
225 mtd-mac-address = <&art 0x1002>;
226 };