blob: 023390a66225da59b2f4f11b756d8c6a014d747f [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;
Marek Vasut96eb91a2020-03-31 19:51:28 +020023 spi0 = &qspi;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053024 };
25
26 chosen {
27 stdout-path = "serial0:115200n8";
28 };
29
30 memory@c0000000 {
Patrick Delaunay708cae72019-07-30 19:16:12 +020031 device_type = "memory";
Manivannan Sadhasivamd1564072019-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 };
Marek Vasutc9052ef2020-03-31 19:51:25 +020080
81 sd_switch: regulator-sd_switch {
82 compatible = "regulator-gpio";
83 regulator-name = "sd_switch";
84 regulator-min-microvolt = <1800000>;
85 regulator-max-microvolt = <2900000>;
86 regulator-type = "voltage";
87 regulator-always-on;
88
89 gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>;
90 gpios-states = <0>;
91 states = <1800000 0x1>,
92 <2900000 0x0>;
93 };
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053094};
95
96&ethernet0 {
97 status = "okay";
98 pinctrl-0 = <&ethernet0_rgmii_pins_a>;
99 pinctrl-1 = <&ethernet0_rgmii_pins_sleep_a>;
100 pinctrl-names = "default", "sleep";
101 phy-mode = "rgmii";
102 max-speed = <1000>;
103 phy-handle = <&phy0>;
104
105 mdio0 {
106 #address-cells = <1>;
107 #size-cells = <0>;
108 compatible = "snps,dwmac-mdio";
109 phy0: ethernet-phy@7 {
110 reg = <7>;
111 };
112 };
113};
114
115&i2c1 {
116 pinctrl-names = "default";
117 pinctrl-0 = <&i2c1_pins_b>;
118 i2c-scl-rising-time-ns = <185>;
119 i2c-scl-falling-time-ns = <20>;
120 status = "okay";
121 /delete-property/dmas;
122 /delete-property/dma-names;
123};
124
125&i2c2 {
126 pinctrl-names = "default";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200127 pinctrl-0 = <&i2c2_pins_b1 &i2c2_pins_b2>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530128 i2c-scl-rising-time-ns = <185>;
129 i2c-scl-falling-time-ns = <20>;
130 status = "okay";
131 /delete-property/dmas;
132 /delete-property/dma-names;
133};
134
135&i2c4 {
136 pinctrl-names = "default";
137 pinctrl-0 = <&i2c4_pins_a>;
138 i2c-scl-rising-time-ns = <185>;
139 i2c-scl-falling-time-ns = <20>;
140 status = "okay";
141 /delete-property/dmas;
142 /delete-property/dma-names;
143
144 pmic: stpmic@33 {
145 compatible = "st,stpmic1";
146 reg = <0x33>;
147 interrupts-extended = <&exti 55 IRQ_TYPE_EDGE_FALLING>;
148 interrupt-controller;
149 #interrupt-cells = <2>;
150 status = "okay";
151
152 st,main-control-register = <0x04>;
153 st,vin-control-register = <0xc0>;
154 st,usb-control-register = <0x30>;
155
156 regulators {
157 compatible = "st,stpmic1-regulators";
158
159 ldo1-supply = <&v3v3>;
160 ldo2-supply = <&v3v3>;
161 ldo3-supply = <&vdd_ddr>;
162 ldo5-supply = <&v3v3>;
163 ldo6-supply = <&v3v3>;
164 pwr_sw1-supply = <&bst_out>;
165 pwr_sw2-supply = <&bst_out>;
166
167 vddcore: buck1 {
168 regulator-name = "vddcore";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200169 regulator-min-microvolt = <1200000>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530170 regulator-max-microvolt = <1350000>;
171 regulator-always-on;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200172 regulator-initial-mode = <0>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530173 regulator-over-current-protection;
174 };
175
176 vdd_ddr: buck2 {
177 regulator-name = "vdd_ddr";
178 regulator-min-microvolt = <1350000>;
179 regulator-max-microvolt = <1350000>;
180 regulator-always-on;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200181 regulator-initial-mode = <0>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530182 regulator-over-current-protection;
183 };
184
185 vdd: buck3 {
186 regulator-name = "vdd";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200187 regulator-min-microvolt = <3300000>;
188 regulator-max-microvolt = <3300000>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530189 regulator-always-on;
190 st,mask_reset;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200191 regulator-initial-mode = <0>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530192 regulator-over-current-protection;
193 };
194
195 v3v3: buck4 {
196 regulator-name = "v3v3";
197 regulator-min-microvolt = <3300000>;
198 regulator-max-microvolt = <3300000>;
199 regulator-always-on;
200 regulator-over-current-protection;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200201 regulator-initial-mode = <0>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530202 };
203
204 vdda: ldo1 {
205 regulator-name = "vdda";
206 regulator-min-microvolt = <2900000>;
207 regulator-max-microvolt = <2900000>;
208 interrupts = <IT_CURLIM_LDO1 0>;
209 interrupt-parent = <&pmic>;
210 };
211
212 v2v8: ldo2 {
213 regulator-name = "v2v8";
214 regulator-min-microvolt = <2800000>;
215 regulator-max-microvolt = <2800000>;
216 interrupts = <IT_CURLIM_LDO2 0>;
217 interrupt-parent = <&pmic>;
218 };
219
220 vtt_ddr: ldo3 {
221 regulator-name = "vtt_ddr";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200222 regulator-min-microvolt = <500000>;
223 regulator-max-microvolt = <750000>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530224 regulator-always-on;
225 regulator-over-current-protection;
226 };
227
228 vdd_usb: ldo4 {
229 regulator-name = "vdd_usb";
230 regulator-min-microvolt = <3300000>;
231 regulator-max-microvolt = <3300000>;
232 interrupts = <IT_CURLIM_LDO4 0>;
233 interrupt-parent = <&pmic>;
234 };
235
236 vdd_sd: ldo5 {
237 regulator-name = "vdd_sd";
238 regulator-min-microvolt = <2900000>;
239 regulator-max-microvolt = <2900000>;
240 interrupts = <IT_CURLIM_LDO5 0>;
241 interrupt-parent = <&pmic>;
242 regulator-boot-on;
243 };
244
245 v1v8: ldo6 {
246 regulator-name = "v1v8";
247 regulator-min-microvolt = <1800000>;
248 regulator-max-microvolt = <1800000>;
249 interrupts = <IT_CURLIM_LDO6 0>;
250 interrupt-parent = <&pmic>;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200251 regulator-enable-ramp-delay = <300000>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530252 };
253
254 vref_ddr: vref_ddr {
255 regulator-name = "vref_ddr";
256 regulator-always-on;
257 regulator-over-current-protection;
258 };
259
260 bst_out: boost {
261 regulator-name = "bst_out";
262 interrupts = <IT_OCP_BOOST 0>;
263 interrupt-parent = <&pmic>;
264 };
265
266 vbus_otg: pwr_sw1 {
267 regulator-name = "vbus_otg";
268 interrupts = <IT_OCP_OTG 0>;
269 interrupt-parent = <&pmic>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530270 };
271
272 vbus_sw: pwr_sw2 {
273 regulator-name = "vbus_sw";
274 interrupts = <IT_OCP_SWOUT 0>;
275 interrupt-parent = <&pmic>;
Patrick Delaunayb9c16b72020-01-28 10:11:00 +0100276 regulator-active-discharge = <1>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530277 };
278 };
279
280 onkey {
281 compatible = "st,stpmic1-onkey";
282 interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 1>;
283 interrupt-names = "onkey-falling", "onkey-rising";
284 status = "okay";
285 };
286
287 watchdog {
288 compatible = "st,stpmic1-wdt";
289 status = "disabled";
290 };
291 };
292};
293
294&iwdg2 {
295 timeout-sec = <32>;
296 status = "okay";
297};
298
Patrick Delaunay900494d2020-01-28 10:10:59 +0100299&pwr_regulators {
300 vdd-supply = <&vdd>;
301 vdd_3v3_usbfs-supply = <&vdd_usb>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530302};
303
Marek Vasut96eb91a2020-03-31 19:51:28 +0200304&qspi {
305 pinctrl-names = "default", "sleep";
306 pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>;
307 pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a>;
308 reg = <0x58003000 0x1000>, <0x70000000 0x200000>;
309 #address-cells = <1>;
310 #size-cells = <0>;
311 status = "okay";
312
313 flash0: spi-flash@0 {
314 compatible = "jedec,spi-nor";
315 reg = <0>;
316 spi-rx-bus-width = <4>;
317 spi-max-frequency = <108000000>;
318 #address-cells = <1>;
319 #size-cells = <1>;
320 };
321};
322
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530323&rng1 {
324 status = "okay";
325};
326
327&rtc {
328 status = "okay";
329};
330
331&sdmmc1 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200332 pinctrl-names = "default", "opendrain", "sleep";
Marek Vasutc9052ef2020-03-31 19:51:25 +0200333 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_b>;
334 pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_b>;
335 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>;
336 cd-gpios = <&gpioi 8 GPIO_ACTIVE_LOW>;
337 disable-wp;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530338 st,sig-dir;
339 st,neg-edge;
340 st,use-ckin;
Marek Vasutc9052ef2020-03-31 19:51:25 +0200341 sd-uhs-sdr104;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530342 bus-width = <4>;
343 vmmc-supply = <&vdd_sd>;
Marek Vasutc9052ef2020-03-31 19:51:25 +0200344 vqmmc-supply = <&sd_switch>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530345 status = "okay";
346};
347
348&sdmmc2 {
349 pinctrl-names = "default";
Marek Vasute22085a2020-03-31 19:51:27 +0200350 pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_b>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530351 non-removable;
352 no-sd;
353 no-sdio;
354 st,neg-edge;
355 bus-width = <8>;
356 vmmc-supply = <&v3v3>;
357 mmc-ddr-3_3v;
358 status = "okay";
359};
360
361&spi2 {
362 pinctrl-names = "default";
363 pinctrl-0 = <&spi2_pins_a>;
364 status = "okay";
365};
366
367&uart4 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200368 /* On Low speed expansion header */
369 label = "LS-UART1";
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530370 pinctrl-names = "default";
371 pinctrl-0 = <&uart4_pins_b>;
372 status = "okay";
373};
374
375&uart7 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200376 /* On Low speed expansion header */
377 label = "LS-UART0";
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530378 pinctrl-names = "default";
379 pinctrl-0 = <&uart7_pins_a>;
380 status = "okay";
381};
382
383&usbh_ehci {
384 phys = <&usbphyc_port0>;
385 phy-names = "usb";
386 status = "okay";
387};
388
389&usbotg_hs {
390 dr_mode = "peripheral";
391 phys = <&usbphyc_port1 0>;
392 phy-names = "usb2-phy";
393 status = "okay";
394};
395
396&usbphyc {
397 status = "okay";
398};
399
400&usbphyc_port0 {
401 phy-supply = <&vdd_usb>;
402};
403
404&usbphyc_port1 {
405 phy-supply = <&vdd_usb>;
406};