ipq40xx: Add files for 4.19
[openwrt/openwrt.git] / target / linux / ipq40xx / files-4.19 / arch / arm / boot / dts / qcom-ipq4018-a42.dts
1 /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
2 * Copyright (c) 2017, Sven Eckelmann <sven.eckelmann@openmesh.com>
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 *
16 */
17
18 #include "qcom-ipq4019.dtsi"
19 #include <dt-bindings/gpio/gpio.h>
20 #include <dt-bindings/input/input.h>
21 #include <dt-bindings/soc/qcom,tcsr.h>
22
23 / {
24 model = "OpenMesh A42";
25 compatible = "openmesh,a42", "qcom,ipq4019";
26
27 soc {
28 mdio@90000 {
29 status = "okay";
30 };
31
32 ess-psgmii@98000 {
33 status = "okay";
34 };
35
36 tcsr@194b000 {
37 /* select hostmode */
38 compatible = "qcom,tcsr";
39 reg = <0x194b000 0x100>;
40 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
41 status = "okay";
42 };
43
44 tcsr@1949000 {
45 compatible = "qcom,tcsr";
46 reg = <0x1949000 0x100>;
47 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
48 };
49
50 ess_tcsr@1953000 {
51 compatible = "qcom,tcsr";
52 reg = <0x1953000 0x1000>;
53 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
54 };
55
56 tcsr@1957000 {
57 compatible = "qcom,tcsr";
58 reg = <0x1957000 0x100>;
59 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
60 };
61
62 usb2: usb2@60f8800 {
63 status = "okay";
64 };
65
66 crypto@8e3a000 {
67 status = "okay";
68 };
69
70 watchdog@b017000 {
71 status = "okay";
72 };
73
74 ess-switch@c000000 {
75 status = "okay";
76 };
77
78 edma@c080000 {
79 status = "okay";
80 };
81 };
82
83 gpio-keys {
84 compatible = "gpio-keys";
85
86 reset {
87 label = "reset";
88 gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
89 linux,code = <KEY_RESTART>;
90 };
91 };
92
93 aliases {
94 led-boot = &power;
95 led-failsafe = &power;
96 led-running = &power;
97 led-upgrade = &power;
98 };
99
100 gpio-leds {
101 compatible = "gpio-leds";
102
103 red {
104 label = "a42:red:status";
105 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
106 linux,default-trigger = "default-off";
107 };
108
109 power: green {
110 label = "a42:green:status";
111 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
112 };
113
114 blue {
115 label = "a42:blue:status";
116 gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
117 linux,default-trigger = "default-off";
118 };
119 };
120
121 watchdog {
122 compatible = "linux,wdt-gpio";
123 gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
124 hw_algo = "toggle";
125 /* hw_margin_ms is actually 300s but driver limits it to 60s */
126 hw_margin_ms = <60000>;
127 always-running;
128 };
129 };
130
131 &tlmm {
132 serial_pins: serial_pinmux {
133 mux {
134 pins = "gpio60", "gpio61";
135 function = "blsp_uart0";
136 bias-disable;
137 };
138 };
139
140 spi_0_pins: spi_0_pinmux {
141 pin {
142 function = "blsp_spi0";
143 pins = "gpio55", "gpio56", "gpio57";
144 drive-strength = <12>;
145 bias-disable;
146 };
147 pin_cs {
148 function = "gpio";
149 pins = "gpio54";
150 drive-strength = <2>;
151 bias-disable;
152 output-high;
153 };
154 };
155 };
156
157 &blsp_dma {
158 status = "okay";
159 };
160
161 &blsp1_spi1 {
162 pinctrl-0 = <&spi_0_pins>;
163 pinctrl-names = "default";
164 status = "okay";
165 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
166
167 m25p80@0 {
168 #address-cells = <1>;
169 #size-cells = <1>;
170 compatible = "jedec,spi-nor";
171 reg = <0>;
172 spi-max-frequency = <24000000>;
173 /* partitions are passed via bootloader */
174 };
175 };
176
177 &blsp1_uart1 {
178 pinctrl-0 = <&serial_pins>;
179 pinctrl-names = "default";
180 status = "okay";
181 };
182
183 &cryptobam {
184 status = "okay";
185 };
186
187 &gmac0 {
188 qcom,phy_mdio_addr = <4>;
189 qcom,poll_required = <1>;
190 qcom,forced_speed = <1000>;
191 qcom,forced_duplex = <1>;
192 vlan_tag = <2 0x20>;
193 };
194
195 &gmac1 {
196 qcom,phy_mdio_addr = <3>;
197 qcom,poll_required = <1>;
198 qcom,forced_speed = <1000>;
199 qcom,forced_duplex = <1>;
200 vlan_tag = <1 0x10>;
201 };
202
203 &usb2_hs_phy {
204 status = "okay";
205 };
206
207 &wifi0 {
208 status = "okay";
209 qcom,ath10k-calibration-variant = "OM-A42";
210 };
211
212 &wifi1 {
213 status = "okay";
214 qcom,ath10k-calibration-variant = "OM-A42";
215 };