blob: 5b15a4a915e671035082d42767fc465dc182e3a0 [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
9#include "stm32mp157c.dtsi"
Patrick Delaunayfe915332019-07-30 19:16:12 +020010#include "stm32mp157xac-pinctrl.dtsi"
Manivannan Sadhasivam93ffa2b2019-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 Delaunayfe915332019-07-30 19:16:12 +020016 compatible = "arrow,stm32mp157a-avenger96", "st,stm32mp157";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053017
18 aliases {
19 ethernet0 = &ethernet0;
Patrick Delaunayfe915332019-07-30 19:16:12 +020020 mmc0 = &sdmmc1;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053021 serial0 = &uart4;
Patrick Delaunayfe915332019-07-30 19:16:12 +020022 serial1 = &uart7;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053023 };
24
25 chosen {
26 stdout-path = "serial0:115200n8";
27 };
28
29 memory@c0000000 {
Patrick Delaunayfe915332019-07-30 19:16:12 +020030 device_type = "memory";
Manivannan Sadhasivam93ffa2b2019-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 };
79};
80
81&ethernet0 {
82 status = "okay";
83 pinctrl-0 = <&ethernet0_rgmii_pins_a>;
84 pinctrl-1 = <&ethernet0_rgmii_pins_sleep_a>;
85 pinctrl-names = "default", "sleep";
86 phy-mode = "rgmii";
87 max-speed = <1000>;
88 phy-handle = <&phy0>;
89
90 mdio0 {
91 #address-cells = <1>;
92 #size-cells = <0>;
93 compatible = "snps,dwmac-mdio";
94 phy0: ethernet-phy@7 {
95 reg = <7>;
96 };
97 };
98};
99
100&i2c1 {
101 pinctrl-names = "default";
102 pinctrl-0 = <&i2c1_pins_b>;
103 i2c-scl-rising-time-ns = <185>;
104 i2c-scl-falling-time-ns = <20>;
105 status = "okay";
106 /delete-property/dmas;
107 /delete-property/dma-names;
108};
109
110&i2c2 {
111 pinctrl-names = "default";
Patrick Delaunayfe915332019-07-30 19:16:12 +0200112 pinctrl-0 = <&i2c2_pins_b1 &i2c2_pins_b2>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530113 i2c-scl-rising-time-ns = <185>;
114 i2c-scl-falling-time-ns = <20>;
115 status = "okay";
116 /delete-property/dmas;
117 /delete-property/dma-names;
118};
119
120&i2c4 {
121 pinctrl-names = "default";
122 pinctrl-0 = <&i2c4_pins_a>;
123 i2c-scl-rising-time-ns = <185>;
124 i2c-scl-falling-time-ns = <20>;
125 status = "okay";
126 /delete-property/dmas;
127 /delete-property/dma-names;
128
129 pmic: stpmic@33 {
130 compatible = "st,stpmic1";
131 reg = <0x33>;
132 interrupts-extended = <&exti 55 IRQ_TYPE_EDGE_FALLING>;
133 interrupt-controller;
134 #interrupt-cells = <2>;
135 status = "okay";
136
137 st,main-control-register = <0x04>;
138 st,vin-control-register = <0xc0>;
139 st,usb-control-register = <0x30>;
140
141 regulators {
142 compatible = "st,stpmic1-regulators";
143
144 ldo1-supply = <&v3v3>;
145 ldo2-supply = <&v3v3>;
146 ldo3-supply = <&vdd_ddr>;
147 ldo5-supply = <&v3v3>;
148 ldo6-supply = <&v3v3>;
149 pwr_sw1-supply = <&bst_out>;
150 pwr_sw2-supply = <&bst_out>;
151
152 vddcore: buck1 {
153 regulator-name = "vddcore";
Patrick Delaunayfe915332019-07-30 19:16:12 +0200154 regulator-min-microvolt = <1200000>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530155 regulator-max-microvolt = <1350000>;
156 regulator-always-on;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200157 regulator-initial-mode = <0>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530158 regulator-over-current-protection;
159 };
160
161 vdd_ddr: buck2 {
162 regulator-name = "vdd_ddr";
163 regulator-min-microvolt = <1350000>;
164 regulator-max-microvolt = <1350000>;
165 regulator-always-on;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200166 regulator-initial-mode = <0>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530167 regulator-over-current-protection;
168 };
169
170 vdd: buck3 {
171 regulator-name = "vdd";
Patrick Delaunayfe915332019-07-30 19:16:12 +0200172 regulator-min-microvolt = <3300000>;
173 regulator-max-microvolt = <3300000>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530174 regulator-always-on;
175 st,mask_reset;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200176 regulator-initial-mode = <0>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530177 regulator-over-current-protection;
178 };
179
180 v3v3: buck4 {
181 regulator-name = "v3v3";
182 regulator-min-microvolt = <3300000>;
183 regulator-max-microvolt = <3300000>;
184 regulator-always-on;
185 regulator-over-current-protection;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200186 regulator-initial-mode = <0>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530187 };
188
189 vdda: ldo1 {
190 regulator-name = "vdda";
191 regulator-min-microvolt = <2900000>;
192 regulator-max-microvolt = <2900000>;
193 interrupts = <IT_CURLIM_LDO1 0>;
194 interrupt-parent = <&pmic>;
195 };
196
197 v2v8: ldo2 {
198 regulator-name = "v2v8";
199 regulator-min-microvolt = <2800000>;
200 regulator-max-microvolt = <2800000>;
201 interrupts = <IT_CURLIM_LDO2 0>;
202 interrupt-parent = <&pmic>;
203 };
204
205 vtt_ddr: ldo3 {
206 regulator-name = "vtt_ddr";
Patrick Delaunayfe915332019-07-30 19:16:12 +0200207 regulator-min-microvolt = <500000>;
208 regulator-max-microvolt = <750000>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530209 regulator-always-on;
210 regulator-over-current-protection;
211 };
212
213 vdd_usb: ldo4 {
214 regulator-name = "vdd_usb";
215 regulator-min-microvolt = <3300000>;
216 regulator-max-microvolt = <3300000>;
217 interrupts = <IT_CURLIM_LDO4 0>;
218 interrupt-parent = <&pmic>;
219 };
220
221 vdd_sd: ldo5 {
222 regulator-name = "vdd_sd";
223 regulator-min-microvolt = <2900000>;
224 regulator-max-microvolt = <2900000>;
225 interrupts = <IT_CURLIM_LDO5 0>;
226 interrupt-parent = <&pmic>;
227 regulator-boot-on;
228 };
229
230 v1v8: ldo6 {
231 regulator-name = "v1v8";
232 regulator-min-microvolt = <1800000>;
233 regulator-max-microvolt = <1800000>;
234 interrupts = <IT_CURLIM_LDO6 0>;
235 interrupt-parent = <&pmic>;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200236 regulator-enable-ramp-delay = <300000>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530237 };
238
239 vref_ddr: vref_ddr {
240 regulator-name = "vref_ddr";
241 regulator-always-on;
242 regulator-over-current-protection;
243 };
244
245 bst_out: boost {
246 regulator-name = "bst_out";
247 interrupts = <IT_OCP_BOOST 0>;
248 interrupt-parent = <&pmic>;
249 };
250
251 vbus_otg: pwr_sw1 {
252 regulator-name = "vbus_otg";
253 interrupts = <IT_OCP_OTG 0>;
254 interrupt-parent = <&pmic>;
255 regulator-active-discharge;
256 };
257
258 vbus_sw: pwr_sw2 {
259 regulator-name = "vbus_sw";
260 interrupts = <IT_OCP_SWOUT 0>;
261 interrupt-parent = <&pmic>;
262 regulator-active-discharge;
263 };
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
285&pwr {
Patrick Delaunay5e959ab2019-07-30 19:16:42 +0200286 pwr-regulators {
287 vdd-supply = <&vdd>;
288 vdd_3v3_usbfs-supply = <&vdd_usb>;
289 };
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530290};
291
292&rng1 {
293 status = "okay";
294};
295
296&rtc {
297 status = "okay";
298};
299
300&sdmmc1 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200301 pinctrl-names = "default", "opendrain", "sleep";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530302 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200303 pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
304 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530305 broken-cd;
306 st,sig-dir;
307 st,neg-edge;
308 st,use-ckin;
309 bus-width = <4>;
310 vmmc-supply = <&vdd_sd>;
311 status = "okay";
312};
313
314&sdmmc2 {
315 pinctrl-names = "default";
316 pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
317 non-removable;
318 no-sd;
319 no-sdio;
320 st,neg-edge;
321 bus-width = <8>;
322 vmmc-supply = <&v3v3>;
323 mmc-ddr-3_3v;
324 status = "okay";
325};
326
327&spi2 {
328 pinctrl-names = "default";
329 pinctrl-0 = <&spi2_pins_a>;
330 status = "okay";
331};
332
333&uart4 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200334 /* On Low speed expansion header */
335 label = "LS-UART1";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530336 pinctrl-names = "default";
337 pinctrl-0 = <&uart4_pins_b>;
338 status = "okay";
339};
340
341&uart7 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200342 /* On Low speed expansion header */
343 label = "LS-UART0";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530344 pinctrl-names = "default";
345 pinctrl-0 = <&uart7_pins_a>;
346 status = "okay";
347};
348
349&usbh_ehci {
350 phys = <&usbphyc_port0>;
351 phy-names = "usb";
352 status = "okay";
353};
354
355&usbotg_hs {
356 dr_mode = "peripheral";
357 phys = <&usbphyc_port1 0>;
358 phy-names = "usb2-phy";
359 status = "okay";
360};
361
362&usbphyc {
363 status = "okay";
364};
365
366&usbphyc_port0 {
367 phy-supply = <&vdd_usb>;
368};
369
370&usbphyc_port1 {
371 phy-supply = <&vdd_usb>;
372};