generic: backport accepted and pending patches for mtk_eth_soc
[openwrt/staging/dangole.git] / target / linux / ath79 / dts / qca9531_engenius_ews511ap.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca953x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "engenius,ews511ap", "qca,qca9531";
11 model = "EnGenius EWS511AP";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 pinctrl-names = "default";
24 pinctrl-0 = <&jtag_disable_pins>;
25
26 reset {
27 label = "reset";
28 linux,code = <KEY_RESTART>;
29 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
30 };
31 };
32
33 leds {
34 compatible = "gpio-leds";
35
36 led_power: power {
37 function = LED_FUNCTION_POWER;
38 color = <LED_COLOR_ID_AMBER>;
39 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
40 default-state = "on";
41 };
42
43 lan1 {
44 label = "blue:lan1";
45 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
46 };
47
48 lan2 {
49 label = "blue:lan2";
50 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
51 };
52
53 wlan2g {
54 label = "green:wlan2g";
55 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
56 linux,default-trigger = "phy0tpt";
57 };
58
59 wlan5g {
60 label = "green:wlan5g";
61 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
62 linux,default-trigger = "phy1tpt";
63 };
64 };
65
66 watchdog {
67 compatible = "linux,wdt-gpio";
68
69 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
70 hw_algo = "toggle";
71 /* hw_margin_ms is actually 300s but driver limits it to 60s */
72 hw_margin_ms = <60000>;
73 always-running;
74 };
75 };
76
77 &wdt {
78 status = "okay";
79 };
80
81 &rst {
82 status = "okay";
83 };
84
85 &pcie0 {
86 status = "okay";
87
88 wifi@0,0 {
89 compatible = "qcom,ath10k";
90 reg = <0x0000 0 0 0 0>;
91 nvmem-cells = <&cal_art_5000>;
92 nvmem-cell-names = "calibration";
93 };
94 };
95
96 &spi {
97 status = "okay";
98
99 flash@0 {
100 compatible = "jedec,spi-nor";
101 reg = <0>;
102 spi-max-frequency = <25000000>;
103
104 partitions {
105 compatible = "fixed-partitions";
106 #address-cells = <1>;
107 #size-cells = <1>;
108
109 partition@0 {
110 label = "u-boot";
111 reg = <0x000000 0x040000>;
112 read-only;
113 };
114
115 ubootenv: partition@40000 {
116 label = "u-boot-env";
117 reg = <0x040000 0x010000>;
118 };
119
120 art: partition@50000 {
121 label = "art";
122 reg = <0x050000 0x010000>;
123 read-only;
124
125 nvmem-layout {
126 compatible = "fixed-layout";
127 #address-cells = <1>;
128 #size-cells = <1>;
129
130 cal_art_5000: calibration@5000 {
131 reg = <0x5000 0x844>;
132 };
133 };
134 };
135
136 partition@60000 {
137 compatible = "denx,uimage";
138 label = "firmware";
139 reg = <0x060000 0xfa0000>;
140 };
141 };
142 };
143 };
144
145 &eth0 {
146 status = "okay";
147
148 phy-handle = <&swphy4>;
149 };
150
151 &wmac {
152 status = "okay";
153
154 mtd-cal-data = <&art 0x1000>;
155 };