b5fef91eacc5f2c88a1e1acb16ac0bd3dba4a8f3
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar9344_pcs_cr5000.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9344.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "PowerCloud Systems CR5000";
10 compatible = "pcs,cr5000", "qca,ar9344";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 keys {
20 compatible = "gpio-keys";
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 led_power: power {
44 label = "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 = "blue:wlan";
52 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
53 linux,default-trigger = "phy0tpt";
54 };
55
56 wps_white {
57 label = "white:wps";
58 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
59 };
60 };
61 };
62
63 &ref {
64 clock-frequency = <25000000>;
65 };
66
67 &spi {
68 status = "okay";
69
70 flash@0 {
71 compatible = "jedec,spi-nor";
72 reg = <0>;
73 spi-max-frequency = <25000000>;
74
75 partitions {
76 compatible = "fixed-partitions";
77 #address-cells = <1>;
78 #size-cells = <1>;
79
80 uboot: partition@0 {
81 label = "u-boot";
82 reg = <0x000000 0x040000>;
83 read-only;
84 };
85
86 partition@40000 {
87 label = "u-boot-env";
88 reg = <0x040000 0x010000>;
89 read-only;
90 };
91
92 partition@50000 {
93 compatible = "denx,uimage";
94 label = "firmware";
95 reg = <0x050000 0x07a0000>;
96 };
97
98 art: partition@7f0000 {
99 label = "art";
100 reg = <0x7f0000 0x010000>;
101 read-only;
102 };
103 };
104 };
105 };
106
107 &usb {
108 status = "okay";
109 };
110
111 &usb_phy {
112 status = "okay";
113 };
114
115 &pcie {
116 status = "okay";
117
118 ath9k: wifi@0,0 {
119 compatible = "pci168c,0030";
120 reg = <0x0000 0 0 0 0>;
121 nvmem-cells = <&macaddr_art_5002>;
122 nvmem-cell-names = "mac-address";
123 #gpio-cells = <2>;
124 gpio-controller;
125 };
126 };
127
128 &mdio0 {
129 status = "okay";
130
131 phy0: ethernet-phy@0 {
132 reg = <0>;
133 phy-mode = "rgmii";
134 qca,ar8327-initvals = <
135 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
136 0x10 0x81000080 /* POWER_ON_STRAP */
137 0x50 0xcc35cc35 /* LED_CTRL0 */
138 0x54 0xca35ca35 /* LED_CTRL1 */
139 0x58 0xc935c935 /* LED_CTRL2 */
140 0x5c 0x03ffff00 /* LED_CTRL3 */
141 0x7c 0x0000007e /* PORT0_STATUS */
142 >;
143 };
144 };
145
146 &eth0 {
147 #address-cells = <1>;
148 #size-cells = <0>;
149 status = "okay";
150
151 /* default for ar934x, except for 1000M */
152 pll-data = <0x06000000 0x00000101 0x00001616>;
153
154 nvmem-cells = <&macaddr_art_0>;
155 nvmem-cell-names = "mac-address";
156
157 phy-mode = "rgmii";
158 phy-handle = <&phy0>;
159
160 aliases {
161 ag0 = &eth1;
162 };
163
164 port@0 {
165 compatible = "swconfig,port";
166 reg = <0>;
167 swconfig,segment = "lan";
168 swconfig,portmap = <1 1>;
169 };
170
171 port@1 {
172 compatible = "swconfig,port";
173 reg = <1>;
174 swconfig,segment = "lan";
175 swconfig,portmap = <2 2>;
176 };
177
178 port@2 {
179 compatible = "swconfig,port";
180 reg = <2>;
181 swconfig,segment = "lan";
182 swconfig,portmap = <3 3>;
183 };
184
185 port@3 {
186 compatible = "swconfig,port";
187 reg = <3>;
188 swconfig,segment = "lan";
189 swconfig,portmap = <4 4>;
190 };
191
192 port@4 {
193 compatible = "swconfig,port";
194 reg = <4>;
195 swconfig,segment = "wan";
196 swconfig,portmap = <5 5>;
197 };
198 };
199
200 &wmac {
201 status = "okay";
202
203 mtd-cal-data = <&art 0x1000>;
204 };
205
206 &art {
207 compatible = "nvmem-cells";
208 #address-cells = <1>;
209 #size-cells = <1>;
210
211 macaddr_art_0: macaddr@0 {
212 reg = <0x0 0x6>;
213 };
214
215 macaddr_art_5002: macaddr@5002 {
216 reg = <0x5002 0x6>;
217 };
218 };