ath79: drop and consolidate redundant chosen/bootargs
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9561_avm_fritz4020.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 "qca956x.dtsi"
8
9 / {
10         compatible = "avm,fritz4020", "qca,qca9560";
11         model = "AVM FRITZ!Box 4020";
12
13         aliases {
14                 led-boot = &led_power;
15                 led-failsafe = &led_info_red;
16                 led-running = &led_power;
17                 led-upgrade = &led_info_red;
18         };
19
20         led_spi {
21                 compatible = "spi-gpio";
22                 #address-cells = <1>;
23                 #size-cells = <0>;
24
25                 sck-gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
26                 mosi-gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
27                 num-chipselects = <0>;
28
29                 led_gpio: led_gpio@0 {
30                         compatible = "fairchild,74hc595";
31                         reg = <0>;
32                         gpio-controller;
33                         #gpio-cells = <2>;
34                         registers-number = <1>;
35                         spi-max-frequency = <10000000>;
36
37                         gpio_latch_bit {
38                                 gpio-hog;
39                                 gpios = <7 GPIO_ACTIVE_HIGH>;
40                                 output-high;
41                                 line-name = "gpio-latch-bit";
42                         };
43                 };
44         };
45
46         leds {
47                 compatible = "gpio-leds";
48
49                 led_power: power {
50                         label = "fritz4020:green:power";
51                         gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
52                         default-state = "on";
53                 };
54
55                 wlan {
56                         label = "fritz4020:green:wlan";
57                         gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
58                         linux,default-trigger = "phy0tpt";
59                 };
60
61                 lan {
62                         label = "fritz4020:green:lan";
63                         gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
64                 };
65
66                 wan {
67                         label = "fritz4020:green:wan";
68                         gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
69                 };
70
71                 info {
72                         label = "fritz4020:green:info";
73                         gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
74                 };
75
76                 led_info_red: info_red {
77                         label = "fritz4020:red:info";
78                         gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
79                 };
80         };
81
82         keys {
83                 compatible = "gpio-keys";
84
85                 wps {
86                         label = "WPS button";
87                         linux,code = <KEY_WPS_BUTTON>;
88                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
89                 };
90
91                 wlan {
92                         label = "WLAN button";
93                         linux,code = <KEY_RFKILL>;
94                         gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
95                 };
96         };
97 };
98
99 &uart {
100         status = "okay";
101 };
102
103 &gpio {
104         status = "okay";
105 };
106
107 &spi {
108         status = "okay";
109
110         num-cs = <1>;
111
112         flash@0 {
113                 compatible = "jedec,spi-nor";
114                 reg = <0>;
115                 spi-max-frequency = <25000000>;
116
117                 partitions {
118                         compatible = "fixed-partitions";
119                         #address-cells = <1>;
120                         #size-cells = <1>;
121
122                         partition@0 {
123                                 label = "urlader";
124                                 reg = <0x000000 0x020000>;
125                                 read-only;
126                         };
127
128                         partition@1 {
129                                 compatible = "avm,eva-firmware";
130                                 label = "firmware";
131                                 reg = <0x020000 0xee0000>;
132                         };
133
134                         partition@2 {
135                                 label = "tffs (1)";
136                                 reg = <0xf00000 0x080000>;
137                                 read-only;
138                         };
139
140                         partition@3 {
141                                 label = "tffs (2)";
142                                 reg = <0xf80000 0x080000>;
143                                 read-only;
144                         };
145                 };
146         };
147 };
148
149 &eth0 {
150         status = "okay";
151
152         phy-handle = <&swphy0>;
153
154         gmac-config {
155                 device = <&gmac>;
156
157                 switch-phy-addr-swap = <1>;
158                 switch-phy-swap = <1>;
159         };
160 };
161
162 &eth1 {
163         status = "okay";
164 };
165
166 &wmac {
167         status = "okay";
168
169         qca,no-eeprom;
170 };