blob: 5bc377d5e3a490b1cdf0e3c30c292c4791ea78bd [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"
11#include "stm32mp15xxac-pinctrl.dtsi"
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053012#include <dt-bindings/gpio/gpio.h>
13#include <dt-bindings/mfd/st,stpmic1.h>
14
15/ {
16 model = "Arrow Electronics STM32MP157A Avenger96 board";
Patrick Delaunayfe915332019-07-30 19:16:12 +020017 compatible = "arrow,stm32mp157a-avenger96", "st,stm32mp157";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053018
19 aliases {
20 ethernet0 = &ethernet0;
Patrick Delaunayfe915332019-07-30 19:16:12 +020021 mmc0 = &sdmmc1;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053022 serial0 = &uart4;
Patrick Delaunayfe915332019-07-30 19:16:12 +020023 serial1 = &uart7;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053024 };
25
26 chosen {
27 stdout-path = "serial0:115200n8";
28 };
29
30 memory@c0000000 {
Patrick Delaunayfe915332019-07-30 19:16:12 +020031 device_type = "memory";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053032 reg = <0xc0000000 0x40000000>;
33 };
34
35 led {
36 compatible = "gpio-leds";
37 led1 {
38 label = "green:user1";
39 gpios = <&gpioz 7 GPIO_ACTIVE_HIGH>;
40 linux,default-trigger = "heartbeat";
41 default-state = "off";
42 };
43
44 led2 {
45 label = "green:user2";
46 gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>;
47 linux,default-trigger = "mmc0";
48 default-state = "off";
49 };
50
51 led3 {
52 label = "green:user3";
53 gpios = <&gpiog 0 GPIO_ACTIVE_HIGH>;
54 linux,default-trigger = "mmc1";
55 default-state = "off";
56 };
57
58 led4 {
59 label = "green:user3";
60 gpios = <&gpiog 1 GPIO_ACTIVE_HIGH>;
61 linux,default-trigger = "none";
62 default-state = "off";
63 panic-indicator;
64 };
65
66 led5 {
67 label = "yellow:wifi";
68 gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>;
69 linux,default-trigger = "phy0tx";
70 default-state = "off";
71 };
72
73 led6 {
74 label = "blue:bt";
75 gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
76 linux,default-trigger = "bluetooth-power";
77 default-state = "off";
78 };
79 };
80};
81
82&ethernet0 {
83 status = "okay";
84 pinctrl-0 = <&ethernet0_rgmii_pins_a>;
85 pinctrl-1 = <&ethernet0_rgmii_pins_sleep_a>;
86 pinctrl-names = "default", "sleep";
87 phy-mode = "rgmii";
88 max-speed = <1000>;
89 phy-handle = <&phy0>;
90
91 mdio0 {
92 #address-cells = <1>;
93 #size-cells = <0>;
94 compatible = "snps,dwmac-mdio";
95 phy0: ethernet-phy@7 {
96 reg = <7>;
97 };
98 };
99};
100
101&i2c1 {
102 pinctrl-names = "default";
103 pinctrl-0 = <&i2c1_pins_b>;
104 i2c-scl-rising-time-ns = <185>;
105 i2c-scl-falling-time-ns = <20>;
106 status = "okay";
107 /delete-property/dmas;
108 /delete-property/dma-names;
109};
110
111&i2c2 {
112 pinctrl-names = "default";
Patrick Delaunayfe915332019-07-30 19:16:12 +0200113 pinctrl-0 = <&i2c2_pins_b1 &i2c2_pins_b2>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530114 i2c-scl-rising-time-ns = <185>;
115 i2c-scl-falling-time-ns = <20>;
116 status = "okay";
117 /delete-property/dmas;
118 /delete-property/dma-names;
119};
120
121&i2c4 {
122 pinctrl-names = "default";
123 pinctrl-0 = <&i2c4_pins_a>;
124 i2c-scl-rising-time-ns = <185>;
125 i2c-scl-falling-time-ns = <20>;
126 status = "okay";
127 /delete-property/dmas;
128 /delete-property/dma-names;
129
130 pmic: stpmic@33 {
131 compatible = "st,stpmic1";
132 reg = <0x33>;
133 interrupts-extended = <&exti 55 IRQ_TYPE_EDGE_FALLING>;
134 interrupt-controller;
135 #interrupt-cells = <2>;
136 status = "okay";
137
138 st,main-control-register = <0x04>;
139 st,vin-control-register = <0xc0>;
140 st,usb-control-register = <0x30>;
141
142 regulators {
143 compatible = "st,stpmic1-regulators";
144
145 ldo1-supply = <&v3v3>;
146 ldo2-supply = <&v3v3>;
147 ldo3-supply = <&vdd_ddr>;
148 ldo5-supply = <&v3v3>;
149 ldo6-supply = <&v3v3>;
150 pwr_sw1-supply = <&bst_out>;
151 pwr_sw2-supply = <&bst_out>;
152
153 vddcore: buck1 {
154 regulator-name = "vddcore";
Patrick Delaunayfe915332019-07-30 19:16:12 +0200155 regulator-min-microvolt = <1200000>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530156 regulator-max-microvolt = <1350000>;
157 regulator-always-on;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200158 regulator-initial-mode = <0>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530159 regulator-over-current-protection;
160 };
161
162 vdd_ddr: buck2 {
163 regulator-name = "vdd_ddr";
164 regulator-min-microvolt = <1350000>;
165 regulator-max-microvolt = <1350000>;
166 regulator-always-on;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200167 regulator-initial-mode = <0>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530168 regulator-over-current-protection;
169 };
170
171 vdd: buck3 {
172 regulator-name = "vdd";
Patrick Delaunayfe915332019-07-30 19:16:12 +0200173 regulator-min-microvolt = <3300000>;
174 regulator-max-microvolt = <3300000>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530175 regulator-always-on;
176 st,mask_reset;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200177 regulator-initial-mode = <0>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530178 regulator-over-current-protection;
179 };
180
181 v3v3: buck4 {
182 regulator-name = "v3v3";
183 regulator-min-microvolt = <3300000>;
184 regulator-max-microvolt = <3300000>;
185 regulator-always-on;
186 regulator-over-current-protection;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200187 regulator-initial-mode = <0>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530188 };
189
190 vdda: ldo1 {
191 regulator-name = "vdda";
192 regulator-min-microvolt = <2900000>;
193 regulator-max-microvolt = <2900000>;
194 interrupts = <IT_CURLIM_LDO1 0>;
195 interrupt-parent = <&pmic>;
196 };
197
198 v2v8: ldo2 {
199 regulator-name = "v2v8";
200 regulator-min-microvolt = <2800000>;
201 regulator-max-microvolt = <2800000>;
202 interrupts = <IT_CURLIM_LDO2 0>;
203 interrupt-parent = <&pmic>;
204 };
205
206 vtt_ddr: ldo3 {
207 regulator-name = "vtt_ddr";
Patrick Delaunayfe915332019-07-30 19:16:12 +0200208 regulator-min-microvolt = <500000>;
209 regulator-max-microvolt = <750000>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530210 regulator-always-on;
211 regulator-over-current-protection;
212 };
213
214 vdd_usb: ldo4 {
215 regulator-name = "vdd_usb";
216 regulator-min-microvolt = <3300000>;
217 regulator-max-microvolt = <3300000>;
218 interrupts = <IT_CURLIM_LDO4 0>;
219 interrupt-parent = <&pmic>;
220 };
221
222 vdd_sd: ldo5 {
223 regulator-name = "vdd_sd";
224 regulator-min-microvolt = <2900000>;
225 regulator-max-microvolt = <2900000>;
226 interrupts = <IT_CURLIM_LDO5 0>;
227 interrupt-parent = <&pmic>;
228 regulator-boot-on;
229 };
230
231 v1v8: ldo6 {
232 regulator-name = "v1v8";
233 regulator-min-microvolt = <1800000>;
234 regulator-max-microvolt = <1800000>;
235 interrupts = <IT_CURLIM_LDO6 0>;
236 interrupt-parent = <&pmic>;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200237 regulator-enable-ramp-delay = <300000>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530238 };
239
240 vref_ddr: vref_ddr {
241 regulator-name = "vref_ddr";
242 regulator-always-on;
243 regulator-over-current-protection;
244 };
245
246 bst_out: boost {
247 regulator-name = "bst_out";
248 interrupts = <IT_OCP_BOOST 0>;
249 interrupt-parent = <&pmic>;
250 };
251
252 vbus_otg: pwr_sw1 {
253 regulator-name = "vbus_otg";
254 interrupts = <IT_OCP_OTG 0>;
255 interrupt-parent = <&pmic>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530256 };
257
258 vbus_sw: pwr_sw2 {
259 regulator-name = "vbus_sw";
260 interrupts = <IT_OCP_SWOUT 0>;
261 interrupt-parent = <&pmic>;
Patrick Delaunayd35a5af2020-01-28 10:11:00 +0100262 regulator-active-discharge = <1>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530263 };
264 };
265
266 onkey {
267 compatible = "st,stpmic1-onkey";
268 interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 1>;
269 interrupt-names = "onkey-falling", "onkey-rising";
270 status = "okay";
271 };
272
273 watchdog {
274 compatible = "st,stpmic1-wdt";
275 status = "disabled";
276 };
277 };
278};
279
280&iwdg2 {
281 timeout-sec = <32>;
282 status = "okay";
283};
284
Patrick Delaunay7915b992020-01-28 10:10:59 +0100285&pwr_regulators {
286 vdd-supply = <&vdd>;
287 vdd_3v3_usbfs-supply = <&vdd_usb>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530288};
289
290&rng1 {
291 status = "okay";
292};
293
294&rtc {
295 status = "okay";
296};
297
298&sdmmc1 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200299 pinctrl-names = "default", "opendrain", "sleep";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530300 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200301 pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
302 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530303 broken-cd;
304 st,sig-dir;
305 st,neg-edge;
306 st,use-ckin;
307 bus-width = <4>;
308 vmmc-supply = <&vdd_sd>;
309 status = "okay";
310};
311
312&sdmmc2 {
313 pinctrl-names = "default";
314 pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
315 non-removable;
316 no-sd;
317 no-sdio;
318 st,neg-edge;
319 bus-width = <8>;
320 vmmc-supply = <&v3v3>;
321 mmc-ddr-3_3v;
322 status = "okay";
323};
324
325&spi2 {
326 pinctrl-names = "default";
327 pinctrl-0 = <&spi2_pins_a>;
328 status = "okay";
329};
330
331&uart4 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200332 /* On Low speed expansion header */
333 label = "LS-UART1";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530334 pinctrl-names = "default";
335 pinctrl-0 = <&uart4_pins_b>;
336 status = "okay";
337};
338
339&uart7 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200340 /* On Low speed expansion header */
341 label = "LS-UART0";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530342 pinctrl-names = "default";
343 pinctrl-0 = <&uart7_pins_a>;
344 status = "okay";
345};
346
347&usbh_ehci {
348 phys = <&usbphyc_port0>;
349 phy-names = "usb";
350 status = "okay";
351};
352
353&usbotg_hs {
354 dr_mode = "peripheral";
355 phys = <&usbphyc_port1 0>;
356 phy-names = "usb2-phy";
357 status = "okay";
358};
359
360&usbphyc {
361 status = "okay";
362};
363
364&usbphyc_port0 {
365 phy-supply = <&vdd_usb>;
366};
367
368&usbphyc_port1 {
369 phy-supply = <&vdd_usb>;
370};