ipq40xx: add support for EnGenius EMR3500
[oweals/openwrt.git] / target / linux / ipq40xx / files-5.4 / arch / arm / boot / dts / qcom-ipq4018-emr3500.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include "qcom-ipq4019.dtsi"
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/soc/qcom,tcsr.h>
7
8 / {
9         model = "EnGenius EMR3500";
10         compatible = "engenius,emr3500";
11
12         soc {
13                 rng@22000 {
14                         status = "okay";
15                 };
16
17                 mdio@90000 {
18                         status = "okay";
19                 };
20
21                 ess-psgmii@98000 {
22                         status = "okay";
23                 };
24
25                 tcsr@1949000 {
26                         compatible = "qcom,tcsr";
27                         reg = <0x1949000 0x100>;
28                         qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
29                 };
30
31                 ess_tcsr@1953000 {
32                         compatible = "qcom,tcsr";
33                         reg = <0x1953000 0x1000>;
34                         qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
35                 };
36
37                 tcsr@1957000 {
38                         compatible = "qcom,tcsr";
39                         reg = <0x1957000 0x100>;
40                         qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
41                 };
42
43                 usb2_hs_phy: hsphy@a8000 {
44                         status = "okay";
45                 };
46
47                 crypto@8e3a000 {
48                         status = "okay";
49                 };
50
51                 watchdog@b017000 {
52                         status = "okay";
53                 };
54
55                 ess-switch@c000000 {
56                         status = "okay";
57                 };
58
59                 edma@c080000 {
60                         status = "okay";
61                 };
62         };
63
64         keys {
65                 compatible = "gpio-keys";
66
67                 reset {
68                         label = "reset";
69                         gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
70                         linux,code = <KEY_RESTART>;
71                 };
72         };
73
74         aliases {
75                 led-boot = &power;
76                 led-failsafe = &power;
77                 led-running = &power;
78                 led-upgrade = &power;
79         };
80
81         leds {
82                 compatible = "gpio-leds";
83
84                 power: white {
85                         label = "emr3500:white:power";
86                         gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
87                 };
88
89                 blue {
90                         label = "emr3500:blue";
91                         gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
92                 };
93
94                 red {
95                         label = "emr3500:red";
96                         gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
97                 };
98
99                 orange {
100                         label = "emr3500:orange";
101                         gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
102                 };
103         };
104 };
105
106 &tlmm {
107         serial_pins: serial_pinmux {
108                 mux {
109                         pins = "gpio60", "gpio61";
110                         function = "blsp_uart0";
111                         bias-disable;
112                 };
113         };
114
115         spi_0_pins: spi_0_pinmux {
116                 pin {
117                         function = "blsp_spi0";
118                         pins = "gpio54", "gpio55", "gpio56", "gpio57";
119                         drive-strength = <12>;
120                         bias-disable;
121                 };
122                 pin_cs {
123                         function = "gpio";
124                         pins = "gpio54";
125                         drive-strength = <2>;
126                         bias-disable;
127                         output-high;
128                 };
129         };
130 };
131
132 &blsp_dma {
133         status = "okay";
134 };
135
136 &blsp1_spi1 {
137         pinctrl-0 = <&spi_0_pins>;
138         pinctrl-names = "default";
139         status = "okay";
140         cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
141
142         m25p80@0 {
143                 compatible = "jedec,spi-nor";
144                 reg = <0>;
145                 spi-max-frequency = <24000000>;
146                 partitions {
147                         compatible = "fixed-partitions";
148                         #address-cells = <1>;
149                         #size-cells = <1>;
150
151                         partition@0 {
152                                 label = "0:SBL1";
153                                 reg = <0x00000000 0x00040000>;
154                                 read-only;
155                         };
156                         partition@40000 {
157                                 label = "0:MIBIB";
158                                 reg = <0x00040000 0x00020000>;
159                                 read-only;
160                         };
161                         partition@60000 {
162                                 label = "0:QSEE";
163                                 reg = <0x00060000 0x00060000>;
164                                 read-only;
165                         };
166                         partition@c0000 {
167                                 label = "0:CDT";
168                                 reg = <0x000c0000 0x00010000>;
169                                 read-only;
170                         };
171                         partition@d0000 {
172                                 label = "0:DDRPARAMS";
173                                 reg = <0x000d0000 0x00010000>;
174                                 read-only;
175                         };
176                         partition@e0000 {
177                                 label = "0:APPSBLENV";
178                                 reg = <0x000e0000 0x00010000>;
179                                 read-only;
180                         };
181                         partition@f0000 {
182                                 label = "0:APPSBL";
183                                 reg = <0x000f0000 0x00080000>;
184                                 read-only;
185                         };
186                         partition@170000 {
187                                 label = "0:ART";
188                                 reg = <0x00170000 0x00010000>;
189                                 read-only;
190                         };
191                         partition@180000 {
192                                 label = "userconfig";
193                                 reg = <0x00180000 0x00080000>;
194                                 read-only;
195                         };
196                         partition@200000 {
197                                 compatible = "denx,fit";
198                                 label = "firmware";
199                                 reg = <0x200000 0x1e00000>;
200                         };
201                 };
202         };
203 };
204
205 &blsp1_uart1 {
206         pinctrl-0 = <&serial_pins>;
207         pinctrl-names = "default";
208         status = "okay";
209 };
210
211 &cryptobam {
212         status = "okay";
213 };
214
215 &gmac0 {
216         vlan_tag = <1 0x10>;
217 };
218
219 &gmac1 {
220         vlan_tag = <2 0x20>;
221 };
222
223 &usb2_hs_phy {
224         status = "okay";
225 };
226
227 &wifi0 {
228         status = "okay";
229         qcom,ath10k-calibration-variant = "EnGenius-EMR3500";
230 };
231
232 &wifi1 {
233         status = "okay";
234         qcom,ath10k-calibration-variant = "EnGenius-EMR3500";
235 };