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