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