48ec783058a72d713b02cafe4ba9d77d9deb82d9
[oweals/openwrt.git] / target / linux / ath79 / dts / ar9341_pcs_cr3000.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 "ar9341.dtsi"
8
9 / {
10         model = "PowerCloud Systems CR3000";
11         compatible = "pcs,cr3000", "qca,ar9341";
12
13         aliases {
14                 serial0 = &uart;
15                 led-status = &status;
16         };
17
18         keys {
19                 compatible = "gpio-keys-polled";
20                 poll-interval = <20>;
21                 #address-cells = <1>;
22                 #size-cells = <0>;
23                 pinctrl-names = "default";
24                 pinctrl-0 = <&jtag_disable_pins>;
25
26                 reset {
27                         label = "Reset button";
28                         linux,code = <KEY_RESTART>;
29                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
30                         debounce-interval = <60>;
31                 };
32
33                 wps {
34                         label = "WPS button";
35                         linux,code = <KEY_WPS_BUTTON>;
36                         gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
37                         debounce-interval = <60>;
38                 };
39         };
40
41         leds {
42                 compatible = "gpio-leds";
43
44                 status: power {
45                         label = "pcs:amber:power";
46                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
47                         default-state = "on";
48                 };
49
50                 wlan2g {
51                         label = "pcs:blue:wlan";
52                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
53                         default-state = "off";
54                         linux,default-trigger = "phy0tpt";
55                 };
56
57                 wan {
58                         label = "pcs:blue:wan";
59                         gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
60                         default-state = "off";
61                 };
62
63                 lan1 {
64                         label = "pcs:blue:lan1";
65                         gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
66                         default-state = "off";
67                 };
68
69                 lan2 {
70                         label = "pcs:blue:lan2";
71                         gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
72                         default-state = "off";
73                 };
74
75                 lan3 {
76                         label = "pcs:blue:lan3";
77                         gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
78                         default-state = "off";
79                 };
80
81                 lan4 {
82                         label = "pcs:blue:lan4";
83                         gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
84                         default-state = "off";
85                 };
86         };
87 };
88
89 &ref {
90         clock-frequency = <25000000>;
91 };
92
93 &uart {
94         status = "okay";
95 };
96
97 &gpio {
98         status = "okay";
99 };
100
101 &spi {
102         num-cs = <1>;
103
104         status = "okay";
105
106         flash@0 {
107                 #address-cells = <1>;
108                 #size-cells = <1>;
109                 compatible = "jedec,spi-nor";
110                 reg = <0>;
111                 spi-max-frequency = <25000000>;
112
113                 partitions {
114                         compatible = "fixed-partitions";
115                         #address-cells = <1>;
116                         #size-cells = <1>;
117
118                         uboot: partition@0 {
119                                 label = "u-boot";
120                                 reg = <0x000000 0x040000>;
121                                 read-only;
122                         };
123
124                         partition@40000 {
125                                 label = "u-boot-env";
126                                 reg = <0x040000 0x010000>;
127                                 read-only;
128                         };
129
130                         partition@50000 {
131                                 label = "firmware";
132                                 reg = <0x050000 0x07a0000>;
133                         };
134
135                         art: partition@7f0000 {
136                                 label = "art";
137                                 reg = <0x7f0000 0x010000>;
138                                 read-only;
139                         };
140                 };
141         };
142 };
143
144 &wmac {
145         status = "okay";
146
147         mtd-cal-data = <&art 0x1000>;
148         mtd-mac-address = <&art 0x1002>;
149 };
150
151 &eth0 {
152         status = "okay";
153
154         phy-handle = <&swphy0>;
155         mtd-mac-address = <&art 0x0>;
156         mtd-mac-address-increment = <1>;
157
158 };
159
160 &eth1 {
161         status = "okay";
162
163         phy-handle = <&swphy4>;
164         mtd-mac-address = <&art 0x0>;
165         phy-mode = "gmii";
166         pll-data = <0x06000000 0x00000101 0x00001616>;
167
168         gmac-config {
169                 device = <&gmac>;
170                 switch-phy-swap = <1>;
171         };
172 };