ath79: add support for Siemens WS-AP3610
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar7161_siemens_ws-ap3610.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 "ar7100.dtsi"
8
9 / {
10 compatible = "siemens,ws-ap3610", "qca,ar7161";
11 model = "Siemens WS-AP3610";
12
13 chosen {
14 bootargs = "console=ttyS0,115200";
15 };
16
17 aliases {
18 led-boot = &led_power_green;
19 led-failsafe = &led_power_red;
20 led-running = &led_power_green;
21 led-upgrade = &led_power_red;
22 label-mac-device = &eth0;
23 };
24
25 extosc: ref {
26 compatible = "fixed-clock";
27 #clock-cells = <0>;
28 clock-output-names = "ref";
29 clock-frequency = <40000000>;
30 };
31
32 leds {
33 compatible = "gpio-leds";
34
35 led_power_green: led_power_green {
36 label = "ws-ap3610:green:power";
37 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
38 };
39
40 led_power_red: led_power_red {
41 label = "ws-ap3610:red:power";
42 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
43 };
44
45 led_wlan5_blue {
46 label = "ws-ap3610:blue:wlan5";
47 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
48 linux,default-trigger = "phy0tpt";
49 };
50
51 led_wlan5_green {
52 label = "ws-ap3610:green:wlan5";
53 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
54 };
55
56 led_wlan2_blue {
57 label = "ws-ap3610:blue:wlan2";
58 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
59 linux,default-trigger = "phy1tpt";
60 };
61
62 led_wlan2_green {
63 label = "ws-ap3610:green:wlan2";
64 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
65 };
66 };
67
68 keys {
69 compatible = "gpio-keys";
70
71 reset {
72 label = "reset";
73 linux,code = <KEY_RESTART>;
74 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
75 };
76 };
77 };
78
79 &pcie0 {
80 status = "okay";
81 };
82
83 &uart {
84 status = "okay";
85 };
86
87 &mdio0 {
88 status = "okay";
89
90 phy0: ethernet-phy@0 {
91 /*
92 * When the compatible-is missing, PHY autodetection
93 * is performed, but the PHY-ID reads all 0xff.
94 *
95 * Linux does not create the device in this case,
96 * and the reset is never even de-asserted.
97 */
98 compatible = "ethernet-phy-id0143.bca2",
99 "ethernet-phy-ieee802.3-c22";
100 reg = <0>;
101
102 resets = <&rst 8>;
103 reset-names = "phy";
104 reset-assert-us = <10000>;
105 reset-deassert-us = <10000>;
106 };
107 };
108
109 &eth0 {
110 status = "okay";
111
112 phy-mode = "rgmii-id";
113 phy-handle = <&phy0>;
114 };
115
116 &spi {
117 status = "okay";
118
119 num-cs = <1>;
120
121 flash@0 {
122 compatible = "jedec,spi-nor";
123 reg = <0>;
124 spi-max-frequency = <25000000>;
125
126 partitions {
127 compatible = "fixed-partitions";
128 #address-cells = <1>;
129 #size-cells = <1>;
130
131 partition@0 {
132 label = "u-boot";
133 reg = <0x0 0x40000>;
134 read-only;
135 };
136
137 partition@40000 {
138 label = "u-boot-bak";
139 reg = <0x40000 0x40000>;
140 read-only;
141 };
142
143 partition@80000 {
144 compatible = "denx,uimage";
145 label = "firmware";
146 reg = <0x80000 0xe00000>;
147 };
148
149 partition@e80000 {
150 label = "cfg1";
151 reg = <0xe80000 0x40000>;
152 read-only;
153 };
154
155 partition@ec0000 {
156 label = "cfg2";
157 reg = <0xec0000 0x40000>;
158 read-only;
159 };
160
161 partition@f00000 {
162 label = "nvram1";
163 reg = <0xf00000 0x40000>;
164 read-only;
165 };
166
167 partition@f40000 {
168 label = "nvram2";
169 reg = <0xf40000 0x40000>;
170 read-only;
171 };
172
173 partition@f80000 {
174 label = "rsvd1";
175 reg = <0xf80000 0x40000>;
176 read-only;
177 };
178
179 partition@fc0000 {
180 label = "rsvd2";
181 reg = <0xfc0000 0x40000>;
182 read-only;
183 };
184 };
185 };
186 };