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