blob: 80ee9c0a2c96c35680e7ddc39f50e11dd816a66a [file] [log] [blame]
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +05301// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
2/*
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +05303 * Copyright (C) Linaro Ltd 2019 - All Rights Reserved
4 * Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
5 */
6
7/dts-v1/;
8
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +01009#include "stm32mp157.dtsi"
10#include "stm32mp15-pinctrl.dtsi"
Tom Rini1f47e2a2020-04-07 11:58:44 -040011#include "stm32mp157-pinctrl.dtsi"
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +010012#include "stm32mp15xxac-pinctrl.dtsi"
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053013#include <dt-bindings/gpio/gpio.h>
14#include <dt-bindings/mfd/st,stpmic1.h>
15
16/ {
17 model = "Arrow Electronics STM32MP157A Avenger96 board";
Patrick Delaunayfe915332019-07-30 19:16:12 +020018 compatible = "arrow,stm32mp157a-avenger96", "st,stm32mp157";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053019
20 aliases {
Marek Vasute182dca2020-03-31 19:51:30 +020021 eeprom0 = &eeprom0;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053022 ethernet0 = &ethernet0;
Patrick Delaunayfe915332019-07-30 19:16:12 +020023 mmc0 = &sdmmc1;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053024 serial0 = &uart4;
Patrick Delaunayfe915332019-07-30 19:16:12 +020025 serial1 = &uart7;
Marek Vasut2f0b5d932020-03-31 19:51:28 +020026 spi0 = &qspi;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053027 };
28
29 chosen {
30 stdout-path = "serial0:115200n8";
31 };
32
33 memory@c0000000 {
Patrick Delaunayfe915332019-07-30 19:16:12 +020034 device_type = "memory";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053035 reg = <0xc0000000 0x40000000>;
36 };
37
38 led {
39 compatible = "gpio-leds";
40 led1 {
41 label = "green:user1";
42 gpios = <&gpioz 7 GPIO_ACTIVE_HIGH>;
43 linux,default-trigger = "heartbeat";
44 default-state = "off";
45 };
46
47 led2 {
48 label = "green:user2";
49 gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>;
50 linux,default-trigger = "mmc0";
51 default-state = "off";
52 };
53
54 led3 {
55 label = "green:user3";
56 gpios = <&gpiog 0 GPIO_ACTIVE_HIGH>;
57 linux,default-trigger = "mmc1";
58 default-state = "off";
59 };
60
61 led4 {
62 label = "green:user3";
63 gpios = <&gpiog 1 GPIO_ACTIVE_HIGH>;
64 linux,default-trigger = "none";
65 default-state = "off";
66 panic-indicator;
67 };
68
69 led5 {
70 label = "yellow:wifi";
71 gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>;
72 linux,default-trigger = "phy0tx";
73 default-state = "off";
74 };
75
76 led6 {
77 label = "blue:bt";
78 gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
79 linux,default-trigger = "bluetooth-power";
80 default-state = "off";
81 };
82 };
Marek Vasut45fa59b2020-03-31 19:51:25 +020083
84 sd_switch: regulator-sd_switch {
85 compatible = "regulator-gpio";
86 regulator-name = "sd_switch";
87 regulator-min-microvolt = <1800000>;
88 regulator-max-microvolt = <2900000>;
89 regulator-type = "voltage";
90 regulator-always-on;
91
92 gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>;
93 gpios-states = <0>;
94 states = <1800000 0x1>,
95 <2900000 0x0>;
96 };
Marek Vasut2f3c4b82020-03-31 19:51:34 +020097
98 /* Enpirion EP3A8LQI U2 on the DHCOR */
99 vdd_io: regulator-buck-io {
100 compatible = "regulator-fixed";
101 regulator-name = "buck-io";
102 regulator-min-microvolt = <1800000>;
103 regulator-max-microvolt = <1800000>;
104 regulator-always-on;
105 regulator-boot-on;
106 vin-supply = <&vdd>;
107 };
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530108};
109
110&ethernet0 {
111 status = "okay";
Marek Vasut6bb45d02020-03-31 19:51:32 +0200112 pinctrl-0 = <&ethernet0_rgmii_pins_b>;
113 pinctrl-1 = <&ethernet0_rgmii_pins_sleep_b>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530114 pinctrl-names = "default", "sleep";
115 phy-mode = "rgmii";
116 max-speed = <1000>;
117 phy-handle = <&phy0>;
Marek Vasut4c8e4c62020-03-31 19:51:33 +0200118 phy-reset-gpios = <&gpioz 2 GPIO_ACTIVE_LOW>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530119
120 mdio0 {
121 #address-cells = <1>;
122 #size-cells = <0>;
123 compatible = "snps,dwmac-mdio";
124 phy0: ethernet-phy@7 {
125 reg = <7>;
126 };
127 };
128};
129
130&i2c1 {
131 pinctrl-names = "default";
132 pinctrl-0 = <&i2c1_pins_b>;
133 i2c-scl-rising-time-ns = <185>;
134 i2c-scl-falling-time-ns = <20>;
135 status = "okay";
136 /delete-property/dmas;
137 /delete-property/dma-names;
138};
139
140&i2c2 {
141 pinctrl-names = "default";
Patrick Delaunayfe915332019-07-30 19:16:12 +0200142 pinctrl-0 = <&i2c2_pins_b1 &i2c2_pins_b2>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530143 i2c-scl-rising-time-ns = <185>;
144 i2c-scl-falling-time-ns = <20>;
145 status = "okay";
146 /delete-property/dmas;
147 /delete-property/dma-names;
148};
149
150&i2c4 {
151 pinctrl-names = "default";
152 pinctrl-0 = <&i2c4_pins_a>;
153 i2c-scl-rising-time-ns = <185>;
154 i2c-scl-falling-time-ns = <20>;
155 status = "okay";
156 /delete-property/dmas;
157 /delete-property/dma-names;
158
159 pmic: stpmic@33 {
160 compatible = "st,stpmic1";
161 reg = <0x33>;
162 interrupts-extended = <&exti 55 IRQ_TYPE_EDGE_FALLING>;
163 interrupt-controller;
164 #interrupt-cells = <2>;
165 status = "okay";
166
167 st,main-control-register = <0x04>;
168 st,vin-control-register = <0xc0>;
169 st,usb-control-register = <0x30>;
170
171 regulators {
172 compatible = "st,stpmic1-regulators";
173
174 ldo1-supply = <&v3v3>;
175 ldo2-supply = <&v3v3>;
176 ldo3-supply = <&vdd_ddr>;
177 ldo5-supply = <&v3v3>;
178 ldo6-supply = <&v3v3>;
179 pwr_sw1-supply = <&bst_out>;
180 pwr_sw2-supply = <&bst_out>;
181
182 vddcore: buck1 {
183 regulator-name = "vddcore";
Marek Vasut2f3c4b82020-03-31 19:51:34 +0200184 regulator-min-microvolt = <800000>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530185 regulator-max-microvolt = <1350000>;
186 regulator-always-on;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200187 regulator-initial-mode = <0>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530188 regulator-over-current-protection;
189 };
190
191 vdd_ddr: buck2 {
192 regulator-name = "vdd_ddr";
193 regulator-min-microvolt = <1350000>;
194 regulator-max-microvolt = <1350000>;
195 regulator-always-on;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200196 regulator-initial-mode = <0>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530197 regulator-over-current-protection;
198 };
199
200 vdd: buck3 {
201 regulator-name = "vdd";
Marek Vasut2f3c4b82020-03-31 19:51:34 +0200202 regulator-min-microvolt = <2900000>;
203 regulator-max-microvolt = <2900000>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530204 regulator-always-on;
205 st,mask_reset;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200206 regulator-initial-mode = <0>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530207 regulator-over-current-protection;
208 };
209
210 v3v3: buck4 {
211 regulator-name = "v3v3";
212 regulator-min-microvolt = <3300000>;
213 regulator-max-microvolt = <3300000>;
214 regulator-always-on;
215 regulator-over-current-protection;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200216 regulator-initial-mode = <0>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530217 };
218
219 vdda: ldo1 {
220 regulator-name = "vdda";
221 regulator-min-microvolt = <2900000>;
222 regulator-max-microvolt = <2900000>;
223 interrupts = <IT_CURLIM_LDO1 0>;
224 interrupt-parent = <&pmic>;
225 };
226
227 v2v8: ldo2 {
228 regulator-name = "v2v8";
229 regulator-min-microvolt = <2800000>;
230 regulator-max-microvolt = <2800000>;
231 interrupts = <IT_CURLIM_LDO2 0>;
232 interrupt-parent = <&pmic>;
233 };
234
235 vtt_ddr: ldo3 {
236 regulator-name = "vtt_ddr";
Patrick Delaunayfe915332019-07-30 19:16:12 +0200237 regulator-min-microvolt = <500000>;
238 regulator-max-microvolt = <750000>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530239 regulator-always-on;
240 regulator-over-current-protection;
241 };
242
243 vdd_usb: ldo4 {
244 regulator-name = "vdd_usb";
245 regulator-min-microvolt = <3300000>;
246 regulator-max-microvolt = <3300000>;
247 interrupts = <IT_CURLIM_LDO4 0>;
248 interrupt-parent = <&pmic>;
249 };
250
251 vdd_sd: ldo5 {
252 regulator-name = "vdd_sd";
253 regulator-min-microvolt = <2900000>;
254 regulator-max-microvolt = <2900000>;
255 interrupts = <IT_CURLIM_LDO5 0>;
256 interrupt-parent = <&pmic>;
257 regulator-boot-on;
258 };
259
260 v1v8: ldo6 {
261 regulator-name = "v1v8";
262 regulator-min-microvolt = <1800000>;
263 regulator-max-microvolt = <1800000>;
264 interrupts = <IT_CURLIM_LDO6 0>;
265 interrupt-parent = <&pmic>;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200266 regulator-enable-ramp-delay = <300000>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530267 };
268
269 vref_ddr: vref_ddr {
270 regulator-name = "vref_ddr";
271 regulator-always-on;
272 regulator-over-current-protection;
273 };
274
275 bst_out: boost {
276 regulator-name = "bst_out";
277 interrupts = <IT_OCP_BOOST 0>;
278 interrupt-parent = <&pmic>;
279 };
280
281 vbus_otg: pwr_sw1 {
282 regulator-name = "vbus_otg";
283 interrupts = <IT_OCP_OTG 0>;
284 interrupt-parent = <&pmic>;
Marek Vasut2f3c4b82020-03-31 19:51:34 +0200285 regulator-active-discharge = <1>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530286 };
287
288 vbus_sw: pwr_sw2 {
289 regulator-name = "vbus_sw";
290 interrupts = <IT_OCP_SWOUT 0>;
291 interrupt-parent = <&pmic>;
Patrick Delaunayd35a5af2020-01-28 10:11:00 +0100292 regulator-active-discharge = <1>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530293 };
294 };
295
296 onkey {
297 compatible = "st,stpmic1-onkey";
298 interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 1>;
299 interrupt-names = "onkey-falling", "onkey-rising";
300 status = "okay";
301 };
302
303 watchdog {
304 compatible = "st,stpmic1-wdt";
305 status = "disabled";
306 };
307 };
Marek Vasute182dca2020-03-31 19:51:30 +0200308
309 eeprom0: eeprom@53 {
310 compatible = "atmel,24c02";
311 reg = <0x53>;
312 pagesize = <16>;
313 };
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530314};
315
316&iwdg2 {
317 timeout-sec = <32>;
318 status = "okay";
319};
320
Patrick Delaunay7915b992020-01-28 10:10:59 +0100321&pwr_regulators {
Marek Vasut2f3c4b82020-03-31 19:51:34 +0200322 vdd-supply = <&vdd_io>;
Patrick Delaunay7915b992020-01-28 10:10:59 +0100323 vdd_3v3_usbfs-supply = <&vdd_usb>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530324};
325
Marek Vasut2f0b5d932020-03-31 19:51:28 +0200326&qspi {
327 pinctrl-names = "default", "sleep";
328 pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>;
329 pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a>;
330 reg = <0x58003000 0x1000>, <0x70000000 0x200000>;
331 #address-cells = <1>;
332 #size-cells = <0>;
333 status = "okay";
334
335 flash0: spi-flash@0 {
336 compatible = "jedec,spi-nor";
337 reg = <0>;
338 spi-rx-bus-width = <4>;
339 spi-max-frequency = <108000000>;
340 #address-cells = <1>;
341 #size-cells = <1>;
342 };
343};
344
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530345&rng1 {
346 status = "okay";
347};
348
349&rtc {
350 status = "okay";
351};
352
353&sdmmc1 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200354 pinctrl-names = "default", "opendrain", "sleep";
Marek Vasut45fa59b2020-03-31 19:51:25 +0200355 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_b>;
356 pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_b>;
357 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>;
358 cd-gpios = <&gpioi 8 GPIO_ACTIVE_LOW>;
359 disable-wp;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530360 st,sig-dir;
361 st,neg-edge;
362 st,use-ckin;
Marek Vasut45fa59b2020-03-31 19:51:25 +0200363 sd-uhs-sdr104;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530364 bus-width = <4>;
365 vmmc-supply = <&vdd_sd>;
Marek Vasut45fa59b2020-03-31 19:51:25 +0200366 vqmmc-supply = <&sd_switch>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530367 status = "okay";
368};
369
370&sdmmc2 {
371 pinctrl-names = "default";
Marek Vasutdf7f49c2020-03-31 19:51:27 +0200372 pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_b>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530373 non-removable;
374 no-sd;
375 no-sdio;
376 st,neg-edge;
377 bus-width = <8>;
378 vmmc-supply = <&v3v3>;
379 mmc-ddr-3_3v;
380 status = "okay";
381};
382
383&spi2 {
384 pinctrl-names = "default";
385 pinctrl-0 = <&spi2_pins_a>;
386 status = "okay";
387};
388
389&uart4 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200390 /* On Low speed expansion header */
391 label = "LS-UART1";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530392 pinctrl-names = "default";
393 pinctrl-0 = <&uart4_pins_b>;
394 status = "okay";
395};
396
397&uart7 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200398 /* On Low speed expansion header */
399 label = "LS-UART0";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530400 pinctrl-names = "default";
401 pinctrl-0 = <&uart7_pins_a>;
402 status = "okay";
403};
404
405&usbh_ehci {
406 phys = <&usbphyc_port0>;
407 phy-names = "usb";
408 status = "okay";
409};
410
411&usbotg_hs {
412 dr_mode = "peripheral";
413 phys = <&usbphyc_port1 0>;
414 phy-names = "usb2-phy";
415 status = "okay";
416};
417
418&usbphyc {
419 status = "okay";
420};
421
422&usbphyc_port0 {
423 phy-supply = <&vdd_usb>;
424};
425
426&usbphyc_port1 {
427 phy-supply = <&vdd_usb>;
428};