blob: 3fca1ed56d765e41959fd166c5c0960e8b67d644 [file] [log] [blame]
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +05301// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
2/*
Manivannan Sadhasivamd1564072019-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
9#include "stm32mp157c.dtsi"
Patrick Delaunay708cae72019-07-30 19:16:12 +020010#include "stm32mp157xac-pinctrl.dtsi"
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053011#include <dt-bindings/gpio/gpio.h>
12#include <dt-bindings/mfd/st,stpmic1.h>
13
14/ {
15 model = "Arrow Electronics STM32MP157A Avenger96 board";
Patrick Delaunay708cae72019-07-30 19:16:12 +020016 compatible = "arrow,stm32mp157a-avenger96", "st,stm32mp157";
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053017
18 aliases {
19 ethernet0 = &ethernet0;
Patrick Delaunay708cae72019-07-30 19:16:12 +020020 mmc0 = &sdmmc1;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053021 serial0 = &uart4;
Patrick Delaunay708cae72019-07-30 19:16:12 +020022 serial1 = &uart7;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053023 };
24
25 chosen {
26 stdout-path = "serial0:115200n8";
27 };
28
29 memory@c0000000 {
Patrick Delaunay708cae72019-07-30 19:16:12 +020030 device_type = "memory";
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053031 reg = <0xc0000000 0x40000000>;
32 };
33
34 led {
35 compatible = "gpio-leds";
36 led1 {
37 label = "green:user1";
38 gpios = <&gpioz 7 GPIO_ACTIVE_HIGH>;
39 linux,default-trigger = "heartbeat";
40 default-state = "off";
41 };
42
43 led2 {
44 label = "green:user2";
45 gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>;
46 linux,default-trigger = "mmc0";
47 default-state = "off";
48 };
49
50 led3 {
51 label = "green:user3";
52 gpios = <&gpiog 0 GPIO_ACTIVE_HIGH>;
53 linux,default-trigger = "mmc1";
54 default-state = "off";
55 };
56
57 led4 {
58 label = "green:user3";
59 gpios = <&gpiog 1 GPIO_ACTIVE_HIGH>;
60 linux,default-trigger = "none";
61 default-state = "off";
62 panic-indicator;
63 };
64
65 led5 {
66 label = "yellow:wifi";
67 gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>;
68 linux,default-trigger = "phy0tx";
69 default-state = "off";
70 };
71
72 led6 {
73 label = "blue:bt";
74 gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
75 linux,default-trigger = "bluetooth-power";
76 default-state = "off";
77 };
78 };
Marek Vasutc9052ef2020-03-31 19:51:25 +020079
80 sd_switch: regulator-sd_switch {
81 compatible = "regulator-gpio";
82 regulator-name = "sd_switch";
83 regulator-min-microvolt = <1800000>;
84 regulator-max-microvolt = <2900000>;
85 regulator-type = "voltage";
86 regulator-always-on;
87
88 gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>;
89 gpios-states = <0>;
90 states = <1800000 0x1>,
91 <2900000 0x0>;
92 };
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053093};
94
95&ethernet0 {
96 status = "okay";
97 pinctrl-0 = <&ethernet0_rgmii_pins_a>;
98 pinctrl-1 = <&ethernet0_rgmii_pins_sleep_a>;
99 pinctrl-names = "default", "sleep";
100 phy-mode = "rgmii";
101 max-speed = <1000>;
102 phy-handle = <&phy0>;
103
104 mdio0 {
105 #address-cells = <1>;
106 #size-cells = <0>;
107 compatible = "snps,dwmac-mdio";
108 phy0: ethernet-phy@7 {
109 reg = <7>;
110 };
111 };
112};
113
114&i2c1 {
115 pinctrl-names = "default";
116 pinctrl-0 = <&i2c1_pins_b>;
117 i2c-scl-rising-time-ns = <185>;
118 i2c-scl-falling-time-ns = <20>;
119 status = "okay";
120 /delete-property/dmas;
121 /delete-property/dma-names;
122};
123
124&i2c2 {
125 pinctrl-names = "default";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200126 pinctrl-0 = <&i2c2_pins_b1 &i2c2_pins_b2>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530127 i2c-scl-rising-time-ns = <185>;
128 i2c-scl-falling-time-ns = <20>;
129 status = "okay";
130 /delete-property/dmas;
131 /delete-property/dma-names;
132};
133
134&i2c4 {
135 pinctrl-names = "default";
136 pinctrl-0 = <&i2c4_pins_a>;
137 i2c-scl-rising-time-ns = <185>;
138 i2c-scl-falling-time-ns = <20>;
139 status = "okay";
140 /delete-property/dmas;
141 /delete-property/dma-names;
142
143 pmic: stpmic@33 {
144 compatible = "st,stpmic1";
145 reg = <0x33>;
146 interrupts-extended = <&exti 55 IRQ_TYPE_EDGE_FALLING>;
147 interrupt-controller;
148 #interrupt-cells = <2>;
149 status = "okay";
150
151 st,main-control-register = <0x04>;
152 st,vin-control-register = <0xc0>;
153 st,usb-control-register = <0x30>;
154
155 regulators {
156 compatible = "st,stpmic1-regulators";
157
158 ldo1-supply = <&v3v3>;
159 ldo2-supply = <&v3v3>;
160 ldo3-supply = <&vdd_ddr>;
161 ldo5-supply = <&v3v3>;
162 ldo6-supply = <&v3v3>;
163 pwr_sw1-supply = <&bst_out>;
164 pwr_sw2-supply = <&bst_out>;
165
166 vddcore: buck1 {
167 regulator-name = "vddcore";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200168 regulator-min-microvolt = <1200000>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530169 regulator-max-microvolt = <1350000>;
170 regulator-always-on;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200171 regulator-initial-mode = <0>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530172 regulator-over-current-protection;
173 };
174
175 vdd_ddr: buck2 {
176 regulator-name = "vdd_ddr";
177 regulator-min-microvolt = <1350000>;
178 regulator-max-microvolt = <1350000>;
179 regulator-always-on;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200180 regulator-initial-mode = <0>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530181 regulator-over-current-protection;
182 };
183
184 vdd: buck3 {
185 regulator-name = "vdd";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200186 regulator-min-microvolt = <3300000>;
187 regulator-max-microvolt = <3300000>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530188 regulator-always-on;
189 st,mask_reset;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200190 regulator-initial-mode = <0>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530191 regulator-over-current-protection;
192 };
193
194 v3v3: buck4 {
195 regulator-name = "v3v3";
196 regulator-min-microvolt = <3300000>;
197 regulator-max-microvolt = <3300000>;
198 regulator-always-on;
199 regulator-over-current-protection;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200200 regulator-initial-mode = <0>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530201 };
202
203 vdda: ldo1 {
204 regulator-name = "vdda";
205 regulator-min-microvolt = <2900000>;
206 regulator-max-microvolt = <2900000>;
207 interrupts = <IT_CURLIM_LDO1 0>;
208 interrupt-parent = <&pmic>;
209 };
210
211 v2v8: ldo2 {
212 regulator-name = "v2v8";
213 regulator-min-microvolt = <2800000>;
214 regulator-max-microvolt = <2800000>;
215 interrupts = <IT_CURLIM_LDO2 0>;
216 interrupt-parent = <&pmic>;
217 };
218
219 vtt_ddr: ldo3 {
220 regulator-name = "vtt_ddr";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200221 regulator-min-microvolt = <500000>;
222 regulator-max-microvolt = <750000>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530223 regulator-always-on;
224 regulator-over-current-protection;
225 };
226
227 vdd_usb: ldo4 {
228 regulator-name = "vdd_usb";
229 regulator-min-microvolt = <3300000>;
230 regulator-max-microvolt = <3300000>;
231 interrupts = <IT_CURLIM_LDO4 0>;
232 interrupt-parent = <&pmic>;
233 };
234
235 vdd_sd: ldo5 {
236 regulator-name = "vdd_sd";
237 regulator-min-microvolt = <2900000>;
238 regulator-max-microvolt = <2900000>;
239 interrupts = <IT_CURLIM_LDO5 0>;
240 interrupt-parent = <&pmic>;
241 regulator-boot-on;
242 };
243
244 v1v8: ldo6 {
245 regulator-name = "v1v8";
246 regulator-min-microvolt = <1800000>;
247 regulator-max-microvolt = <1800000>;
248 interrupts = <IT_CURLIM_LDO6 0>;
249 interrupt-parent = <&pmic>;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200250 regulator-enable-ramp-delay = <300000>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530251 };
252
253 vref_ddr: vref_ddr {
254 regulator-name = "vref_ddr";
255 regulator-always-on;
256 regulator-over-current-protection;
257 };
258
259 bst_out: boost {
260 regulator-name = "bst_out";
261 interrupts = <IT_OCP_BOOST 0>;
262 interrupt-parent = <&pmic>;
263 };
264
265 vbus_otg: pwr_sw1 {
266 regulator-name = "vbus_otg";
267 interrupts = <IT_OCP_OTG 0>;
268 interrupt-parent = <&pmic>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530269 };
270
271 vbus_sw: pwr_sw2 {
272 regulator-name = "vbus_sw";
273 interrupts = <IT_OCP_SWOUT 0>;
274 interrupt-parent = <&pmic>;
Patrick Delaunayb9c16b72020-01-28 10:11:00 +0100275 regulator-active-discharge = <1>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530276 };
277 };
278
279 onkey {
280 compatible = "st,stpmic1-onkey";
281 interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 1>;
282 interrupt-names = "onkey-falling", "onkey-rising";
283 status = "okay";
284 };
285
286 watchdog {
287 compatible = "st,stpmic1-wdt";
288 status = "disabled";
289 };
290 };
291};
292
293&iwdg2 {
294 timeout-sec = <32>;
295 status = "okay";
296};
297
Patrick Delaunay900494d2020-01-28 10:10:59 +0100298&pwr_regulators {
299 vdd-supply = <&vdd>;
300 vdd_3v3_usbfs-supply = <&vdd_usb>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530301};
302
303&rng1 {
304 status = "okay";
305};
306
307&rtc {
308 status = "okay";
309};
310
311&sdmmc1 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200312 pinctrl-names = "default", "opendrain", "sleep";
Marek Vasutc9052ef2020-03-31 19:51:25 +0200313 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_b>;
314 pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_b>;
315 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>;
316 cd-gpios = <&gpioi 8 GPIO_ACTIVE_LOW>;
317 disable-wp;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530318 st,sig-dir;
319 st,neg-edge;
320 st,use-ckin;
Marek Vasutc9052ef2020-03-31 19:51:25 +0200321 sd-uhs-sdr104;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530322 bus-width = <4>;
323 vmmc-supply = <&vdd_sd>;
Marek Vasutc9052ef2020-03-31 19:51:25 +0200324 vqmmc-supply = <&sd_switch>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530325 status = "okay";
326};
327
328&sdmmc2 {
329 pinctrl-names = "default";
Marek Vasute22085a2020-03-31 19:51:27 +0200330 pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_b>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530331 non-removable;
332 no-sd;
333 no-sdio;
334 st,neg-edge;
335 bus-width = <8>;
336 vmmc-supply = <&v3v3>;
337 mmc-ddr-3_3v;
338 status = "okay";
339};
340
341&spi2 {
342 pinctrl-names = "default";
343 pinctrl-0 = <&spi2_pins_a>;
344 status = "okay";
345};
346
347&uart4 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200348 /* On Low speed expansion header */
349 label = "LS-UART1";
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530350 pinctrl-names = "default";
351 pinctrl-0 = <&uart4_pins_b>;
352 status = "okay";
353};
354
355&uart7 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200356 /* On Low speed expansion header */
357 label = "LS-UART0";
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530358 pinctrl-names = "default";
359 pinctrl-0 = <&uart7_pins_a>;
360 status = "okay";
361};
362
363&usbh_ehci {
364 phys = <&usbphyc_port0>;
365 phy-names = "usb";
366 status = "okay";
367};
368
369&usbotg_hs {
370 dr_mode = "peripheral";
371 phys = <&usbphyc_port1 0>;
372 phy-names = "usb2-phy";
373 status = "okay";
374};
375
376&usbphyc {
377 status = "okay";
378};
379
380&usbphyc_port0 {
381 phy-supply = <&vdd_usb>;
382};
383
384&usbphyc_port1 {
385 phy-supply = <&vdd_usb>;
386};