bd7c2a60dc740938dee32d717bf8b047199ab358
[oweals/openwrt.git] / target / linux / ath79 / dts / ar9344_pcs_cap324.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 CAP324";
11         compatible = "pcs,cap324", "qca,ar9344";
12
13         aliases {
14                 serial0 = &uart;
15                 led-boot = &status;
16                 led-failsafe = &status;
17                 led-running = &status;
18                 led-upgrade = &status;
19         };
20
21         keys {
22                 compatible = "gpio-keys-polled";
23                 poll-interval = <20>;
24
25                 pinctrl-names = "default";
26                 pinctrl-0 = <&jtag_disable_pins>;
27
28                 reset {
29                         label = "Reset button";
30                         linux,code = <KEY_RESTART>;
31                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
32                         debounce-interval = <60>;
33                 };
34         };
35
36         leds {
37                 compatible = "gpio-leds";
38
39                 power_amber {
40                         label = "pcs:amber:power";
41                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
42                         default-state = "off";
43                 };
44
45                 status: power_green {
46                         label = "pcs:green:power";
47                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
48                         default-state = "on";
49                 };
50
51                 wlan_amber {
52                         label = "pcs:amber:wlan";
53                         gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
54                         default-state = "off";
55                         linux,default-trigger = "phy1tpt";
56                 };
57
58                 wlan_green {
59                         label = "pcs:green:wlan";
60                         gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
61                         default-state = "off";
62                         linux,default-trigger = "phy0tpt";
63                 };
64
65                 lan_amber {
66                         label = "pcs:lan:amber";
67                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
68                         default-state = "off";
69                 };
70
71                 lan_green {
72                         label = "pcs:lan:green";
73                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
74                         default-state = "off";
75                 };
76         };
77 };
78
79 &ref {
80         clock-frequency = <25000000>;
81 };
82
83 &uart {
84         status = "okay";
85 };
86
87 &gpio {
88         status = "okay";
89 };
90
91 &spi {
92         num-cs = <1>;
93
94         status = "okay";
95
96         flash@0 {
97                 compatible = "jedec,spi-nor";
98                 reg = <0>;
99                 spi-max-frequency = <25000000>;
100
101                 partitions {
102                         compatible = "fixed-partitions";
103                         #address-cells = <1>;
104                         #size-cells = <1>;
105
106                         uboot: partition@0 {
107                                 label = "u-boot";
108                                 reg = <0x000000 0x040000>;
109                                 read-only;
110                         };
111
112                         partition@40000 {
113                                 label = "u-boot-env";
114                                 reg = <0x040000 0x010000>;
115                                 read-only;
116                         };
117
118                         partition@50000 {
119                                 label = "firmware";
120                                 reg = <0x050000 0x0fa0000>;
121                         };
122
123                         art: partition@7f0000 {
124                                 label = "art";
125                                 reg = <0xff0000 0x010000>;
126                                 read-only;
127                         };
128                 };
129         };
130 };
131
132 &pcie {
133         status = "okay";
134
135         ath9k: wifi@0,0 {
136                 compatible = "168c,0030";
137                 reg = <0x0000 0 0 0 0>;
138                 mtd-mac-address = <&art 0x0>;
139                 mtd-mac-address-increment = <(-2)>;
140                 mtd-cal-data = <&art 0x5000>;
141                 qca,no-eeprom;
142                 qca,disable-5ghz;
143                 #gpio-cells = <2>;
144                 gpio-controller;
145         };
146 };
147
148 &wmac {
149         status = "okay";
150
151         qca,disable-2ghz;
152         mtd-cal-data = <&art 0x1000>;
153         mtd-mac-address = <&art 0x0>;
154         mtd-mac-address-increment = <(-1)>;
155 };
156
157 &mdio0 {
158         status = "okay";
159
160         phy-mask = <0>;
161
162         phy0: ethernet-phy@0 {
163                 reg = <0>;
164                 phy-mode = "rgmii";
165         };
166 };
167
168 &eth0 {
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 };