blob: 3065593bf2add004a41d8ff43677592331bde0e6 [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>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530255 };
256
257 vbus_sw: pwr_sw2 {
258 regulator-name = "vbus_sw";
259 interrupts = <IT_OCP_SWOUT 0>;
260 interrupt-parent = <&pmic>;
Patrick Delaunayd35a5af2020-01-28 10:11:00 +0100261 regulator-active-discharge = <1>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530262 };
263 };
264
265 onkey {
266 compatible = "st,stpmic1-onkey";
267 interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 1>;
268 interrupt-names = "onkey-falling", "onkey-rising";
269 status = "okay";
270 };
271
272 watchdog {
273 compatible = "st,stpmic1-wdt";
274 status = "disabled";
275 };
276 };
277};
278
279&iwdg2 {
280 timeout-sec = <32>;
281 status = "okay";
282};
283
Patrick Delaunay7915b992020-01-28 10:10:59 +0100284&pwr_regulators {
285 vdd-supply = <&vdd>;
286 vdd_3v3_usbfs-supply = <&vdd_usb>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530287};
288
289&rng1 {
290 status = "okay";
291};
292
293&rtc {
294 status = "okay";
295};
296
297&sdmmc1 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200298 pinctrl-names = "default", "opendrain", "sleep";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530299 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200300 pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
301 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530302 broken-cd;
303 st,sig-dir;
304 st,neg-edge;
305 st,use-ckin;
306 bus-width = <4>;
307 vmmc-supply = <&vdd_sd>;
308 status = "okay";
309};
310
311&sdmmc2 {
312 pinctrl-names = "default";
313 pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>;
314 non-removable;
315 no-sd;
316 no-sdio;
317 st,neg-edge;
318 bus-width = <8>;
319 vmmc-supply = <&v3v3>;
320 mmc-ddr-3_3v;
321 status = "okay";
322};
323
324&spi2 {
325 pinctrl-names = "default";
326 pinctrl-0 = <&spi2_pins_a>;
327 status = "okay";
328};
329
330&uart4 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200331 /* On Low speed expansion header */
332 label = "LS-UART1";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530333 pinctrl-names = "default";
334 pinctrl-0 = <&uart4_pins_b>;
335 status = "okay";
336};
337
338&uart7 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200339 /* On Low speed expansion header */
340 label = "LS-UART0";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530341 pinctrl-names = "default";
342 pinctrl-0 = <&uart7_pins_a>;
343 status = "okay";
344};
345
346&usbh_ehci {
347 phys = <&usbphyc_port0>;
348 phy-names = "usb";
349 status = "okay";
350};
351
352&usbotg_hs {
353 dr_mode = "peripheral";
354 phys = <&usbphyc_port1 0>;
355 phy-names = "usb2-phy";
356 status = "okay";
357};
358
359&usbphyc {
360 status = "okay";
361};
362
363&usbphyc_port0 {
364 phy-supply = <&vdd_usb>;
365};
366
367&usbphyc_port1 {
368 phy-supply = <&vdd_usb>;
369};