ath79: enable UART in SoC DTSI files
[openwrt/staging/jow.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 &spi {
99 status = "okay";
100
101 flash@0 {
102 compatible = "jedec,spi-nor";
103 reg = <0>;
104 spi-max-frequency = <25000000>;
105
106 partitions {
107 compatible = "fixed-partitions";
108 #address-cells = <1>;
109 #size-cells = <1>;
110
111 partition@0 {
112 label = "urlader";
113 reg = <0x000000 0x020000>;
114 read-only;
115 };
116
117 partition@1 {
118 compatible = "avm,eva-firmware";
119 label = "firmware";
120 reg = <0x020000 0xee0000>;
121 };
122
123 partition@2 {
124 label = "tffs (1)";
125 reg = <0xf00000 0x080000>;
126 read-only;
127 };
128
129 partition@3 {
130 label = "tffs (2)";
131 reg = <0xf80000 0x080000>;
132 read-only;
133 };
134 };
135 };
136 };
137
138 &eth0 {
139 status = "okay";
140
141 phy-handle = <&swphy0>;
142
143 gmac-config {
144 device = <&gmac>;
145
146 switch-phy-addr-swap = <1>;
147 switch-phy-swap = <1>;
148 };
149 };
150
151 &eth1 {
152 status = "okay";
153 };
154
155 &wmac {
156 status = "okay";
157
158 qca,no-eeprom;
159 };