blob: b23fa6dee018a367e42ee3ba5af69f553ad614b3 [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 {
Marek Vasut679fa9d2020-03-31 19:51:30 +020019 eeprom0 = &eeprom0;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053020 ethernet0 = &ethernet0;
Patrick Delaunay708cae72019-07-30 19:16:12 +020021 mmc0 = &sdmmc1;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053022 serial0 = &uart4;
Patrick Delaunay708cae72019-07-30 19:16:12 +020023 serial1 = &uart7;
Marek Vasut96eb91a2020-03-31 19:51:28 +020024 spi0 = &qspi;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053025 };
26
27 chosen {
28 stdout-path = "serial0:115200n8";
29 };
30
31 memory@c0000000 {
Patrick Delaunay708cae72019-07-30 19:16:12 +020032 device_type = "memory";
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053033 reg = <0xc0000000 0x40000000>;
34 };
35
36 led {
37 compatible = "gpio-leds";
38 led1 {
39 label = "green:user1";
40 gpios = <&gpioz 7 GPIO_ACTIVE_HIGH>;
41 linux,default-trigger = "heartbeat";
42 default-state = "off";
43 };
44
45 led2 {
46 label = "green:user2";
47 gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>;
48 linux,default-trigger = "mmc0";
49 default-state = "off";
50 };
51
52 led3 {
53 label = "green:user3";
54 gpios = <&gpiog 0 GPIO_ACTIVE_HIGH>;
55 linux,default-trigger = "mmc1";
56 default-state = "off";
57 };
58
59 led4 {
60 label = "green:user3";
61 gpios = <&gpiog 1 GPIO_ACTIVE_HIGH>;
62 linux,default-trigger = "none";
63 default-state = "off";
64 panic-indicator;
65 };
66
67 led5 {
68 label = "yellow:wifi";
69 gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>;
70 linux,default-trigger = "phy0tx";
71 default-state = "off";
72 };
73
74 led6 {
75 label = "blue:bt";
76 gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
77 linux,default-trigger = "bluetooth-power";
78 default-state = "off";
79 };
80 };
Marek Vasutc9052ef2020-03-31 19:51:25 +020081
82 sd_switch: regulator-sd_switch {
83 compatible = "regulator-gpio";
84 regulator-name = "sd_switch";
85 regulator-min-microvolt = <1800000>;
86 regulator-max-microvolt = <2900000>;
87 regulator-type = "voltage";
88 regulator-always-on;
89
90 gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>;
91 gpios-states = <0>;
92 states = <1800000 0x1>,
93 <2900000 0x0>;
94 };
Marek Vasutb177bf32020-03-31 19:51:34 +020095
96 /* Enpirion EP3A8LQI U2 on the DHCOR */
97 vdd_io: regulator-buck-io {
98 compatible = "regulator-fixed";
99 regulator-name = "buck-io";
100 regulator-min-microvolt = <1800000>;
101 regulator-max-microvolt = <1800000>;
102 regulator-always-on;
103 regulator-boot-on;
104 vin-supply = <&vdd>;
105 };
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530106};
107
108&ethernet0 {
109 status = "okay";
Marek Vasut88562b42020-03-31 19:51:32 +0200110 pinctrl-0 = <&ethernet0_rgmii_pins_b>;
111 pinctrl-1 = <&ethernet0_rgmii_pins_sleep_b>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530112 pinctrl-names = "default", "sleep";
113 phy-mode = "rgmii";
114 max-speed = <1000>;
115 phy-handle = <&phy0>;
Marek Vasut81ff3852020-03-31 19:51:33 +0200116 phy-reset-gpios = <&gpioz 2 GPIO_ACTIVE_LOW>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530117
118 mdio0 {
119 #address-cells = <1>;
120 #size-cells = <0>;
121 compatible = "snps,dwmac-mdio";
122 phy0: ethernet-phy@7 {
123 reg = <7>;
124 };
125 };
126};
127
128&i2c1 {
129 pinctrl-names = "default";
130 pinctrl-0 = <&i2c1_pins_b>;
131 i2c-scl-rising-time-ns = <185>;
132 i2c-scl-falling-time-ns = <20>;
133 status = "okay";
134 /delete-property/dmas;
135 /delete-property/dma-names;
136};
137
138&i2c2 {
139 pinctrl-names = "default";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200140 pinctrl-0 = <&i2c2_pins_b1 &i2c2_pins_b2>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530141 i2c-scl-rising-time-ns = <185>;
142 i2c-scl-falling-time-ns = <20>;
143 status = "okay";
144 /delete-property/dmas;
145 /delete-property/dma-names;
146};
147
148&i2c4 {
149 pinctrl-names = "default";
150 pinctrl-0 = <&i2c4_pins_a>;
151 i2c-scl-rising-time-ns = <185>;
152 i2c-scl-falling-time-ns = <20>;
153 status = "okay";
154 /delete-property/dmas;
155 /delete-property/dma-names;
156
157 pmic: stpmic@33 {
158 compatible = "st,stpmic1";
159 reg = <0x33>;
160 interrupts-extended = <&exti 55 IRQ_TYPE_EDGE_FALLING>;
161 interrupt-controller;
162 #interrupt-cells = <2>;
163 status = "okay";
164
165 st,main-control-register = <0x04>;
166 st,vin-control-register = <0xc0>;
167 st,usb-control-register = <0x30>;
168
169 regulators {
170 compatible = "st,stpmic1-regulators";
171
172 ldo1-supply = <&v3v3>;
173 ldo2-supply = <&v3v3>;
174 ldo3-supply = <&vdd_ddr>;
175 ldo5-supply = <&v3v3>;
176 ldo6-supply = <&v3v3>;
177 pwr_sw1-supply = <&bst_out>;
178 pwr_sw2-supply = <&bst_out>;
179
180 vddcore: buck1 {
181 regulator-name = "vddcore";
Marek Vasutb177bf32020-03-31 19:51:34 +0200182 regulator-min-microvolt = <800000>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530183 regulator-max-microvolt = <1350000>;
184 regulator-always-on;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200185 regulator-initial-mode = <0>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530186 regulator-over-current-protection;
187 };
188
189 vdd_ddr: buck2 {
190 regulator-name = "vdd_ddr";
191 regulator-min-microvolt = <1350000>;
192 regulator-max-microvolt = <1350000>;
193 regulator-always-on;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200194 regulator-initial-mode = <0>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530195 regulator-over-current-protection;
196 };
197
198 vdd: buck3 {
199 regulator-name = "vdd";
Marek Vasutb177bf32020-03-31 19:51:34 +0200200 regulator-min-microvolt = <2900000>;
201 regulator-max-microvolt = <2900000>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530202 regulator-always-on;
203 st,mask_reset;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200204 regulator-initial-mode = <0>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530205 regulator-over-current-protection;
206 };
207
208 v3v3: buck4 {
209 regulator-name = "v3v3";
210 regulator-min-microvolt = <3300000>;
211 regulator-max-microvolt = <3300000>;
212 regulator-always-on;
213 regulator-over-current-protection;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200214 regulator-initial-mode = <0>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530215 };
216
217 vdda: ldo1 {
218 regulator-name = "vdda";
219 regulator-min-microvolt = <2900000>;
220 regulator-max-microvolt = <2900000>;
221 interrupts = <IT_CURLIM_LDO1 0>;
222 interrupt-parent = <&pmic>;
223 };
224
225 v2v8: ldo2 {
226 regulator-name = "v2v8";
227 regulator-min-microvolt = <2800000>;
228 regulator-max-microvolt = <2800000>;
229 interrupts = <IT_CURLIM_LDO2 0>;
230 interrupt-parent = <&pmic>;
231 };
232
233 vtt_ddr: ldo3 {
234 regulator-name = "vtt_ddr";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200235 regulator-min-microvolt = <500000>;
236 regulator-max-microvolt = <750000>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530237 regulator-always-on;
238 regulator-over-current-protection;
239 };
240
241 vdd_usb: ldo4 {
242 regulator-name = "vdd_usb";
243 regulator-min-microvolt = <3300000>;
244 regulator-max-microvolt = <3300000>;
245 interrupts = <IT_CURLIM_LDO4 0>;
246 interrupt-parent = <&pmic>;
247 };
248
249 vdd_sd: ldo5 {
250 regulator-name = "vdd_sd";
251 regulator-min-microvolt = <2900000>;
252 regulator-max-microvolt = <2900000>;
253 interrupts = <IT_CURLIM_LDO5 0>;
254 interrupt-parent = <&pmic>;
255 regulator-boot-on;
256 };
257
258 v1v8: ldo6 {
259 regulator-name = "v1v8";
260 regulator-min-microvolt = <1800000>;
261 regulator-max-microvolt = <1800000>;
262 interrupts = <IT_CURLIM_LDO6 0>;
263 interrupt-parent = <&pmic>;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200264 regulator-enable-ramp-delay = <300000>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530265 };
266
267 vref_ddr: vref_ddr {
268 regulator-name = "vref_ddr";
269 regulator-always-on;
270 regulator-over-current-protection;
271 };
272
273 bst_out: boost {
274 regulator-name = "bst_out";
275 interrupts = <IT_OCP_BOOST 0>;
276 interrupt-parent = <&pmic>;
277 };
278
279 vbus_otg: pwr_sw1 {
280 regulator-name = "vbus_otg";
281 interrupts = <IT_OCP_OTG 0>;
282 interrupt-parent = <&pmic>;
Marek Vasutb177bf32020-03-31 19:51:34 +0200283 regulator-active-discharge = <1>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530284 };
285
286 vbus_sw: pwr_sw2 {
287 regulator-name = "vbus_sw";
288 interrupts = <IT_OCP_SWOUT 0>;
289 interrupt-parent = <&pmic>;
Patrick Delaunayb9c16b72020-01-28 10:11:00 +0100290 regulator-active-discharge = <1>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530291 };
292 };
293
294 onkey {
295 compatible = "st,stpmic1-onkey";
296 interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 1>;
297 interrupt-names = "onkey-falling", "onkey-rising";
298 status = "okay";
299 };
300
301 watchdog {
302 compatible = "st,stpmic1-wdt";
303 status = "disabled";
304 };
305 };
Marek Vasut679fa9d2020-03-31 19:51:30 +0200306
307 eeprom0: eeprom@53 {
308 compatible = "atmel,24c02";
309 reg = <0x53>;
310 pagesize = <16>;
311 };
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530312};
313
314&iwdg2 {
315 timeout-sec = <32>;
316 status = "okay";
317};
318
Patrick Delaunay900494d2020-01-28 10:10:59 +0100319&pwr_regulators {
Marek Vasutb177bf32020-03-31 19:51:34 +0200320 vdd-supply = <&vdd_io>;
Patrick Delaunay900494d2020-01-28 10:10:59 +0100321 vdd_3v3_usbfs-supply = <&vdd_usb>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530322};
323
Marek Vasut96eb91a2020-03-31 19:51:28 +0200324&qspi {
325 pinctrl-names = "default", "sleep";
326 pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>;
327 pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a>;
328 reg = <0x58003000 0x1000>, <0x70000000 0x200000>;
329 #address-cells = <1>;
330 #size-cells = <0>;
331 status = "okay";
332
333 flash0: spi-flash@0 {
334 compatible = "jedec,spi-nor";
335 reg = <0>;
336 spi-rx-bus-width = <4>;
337 spi-max-frequency = <108000000>;
338 #address-cells = <1>;
339 #size-cells = <1>;
340 };
341};
342
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530343&rng1 {
344 status = "okay";
345};
346
347&rtc {
348 status = "okay";
349};
350
351&sdmmc1 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200352 pinctrl-names = "default", "opendrain", "sleep";
Marek Vasutc9052ef2020-03-31 19:51:25 +0200353 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_b>;
354 pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_b>;
355 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>;
Marek Vasutc9052ef2020-03-31 19:51:25 +0200356 disable-wp;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530357 st,sig-dir;
358 st,neg-edge;
359 st,use-ckin;
Marek Vasutc9052ef2020-03-31 19:51:25 +0200360 sd-uhs-sdr104;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530361 bus-width = <4>;
362 vmmc-supply = <&vdd_sd>;
Marek Vasutc9052ef2020-03-31 19:51:25 +0200363 vqmmc-supply = <&sd_switch>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530364 status = "okay";
365};
366
367&sdmmc2 {
368 pinctrl-names = "default";
Marek Vasute22085a2020-03-31 19:51:27 +0200369 pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_b>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530370 non-removable;
371 no-sd;
372 no-sdio;
373 st,neg-edge;
374 bus-width = <8>;
375 vmmc-supply = <&v3v3>;
376 mmc-ddr-3_3v;
377 status = "okay";
378};
379
380&spi2 {
381 pinctrl-names = "default";
382 pinctrl-0 = <&spi2_pins_a>;
383 status = "okay";
384};
385
386&uart4 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200387 /* On Low speed expansion header */
388 label = "LS-UART1";
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530389 pinctrl-names = "default";
390 pinctrl-0 = <&uart4_pins_b>;
391 status = "okay";
392};
393
394&uart7 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200395 /* On Low speed expansion header */
396 label = "LS-UART0";
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530397 pinctrl-names = "default";
398 pinctrl-0 = <&uart7_pins_a>;
399 status = "okay";
400};
401
402&usbh_ehci {
403 phys = <&usbphyc_port0>;
404 phy-names = "usb";
405 status = "okay";
406};
407
408&usbotg_hs {
409 dr_mode = "peripheral";
410 phys = <&usbphyc_port1 0>;
411 phy-names = "usb2-phy";
412 status = "okay";
413};
414
415&usbphyc {
416 status = "okay";
417};
418
419&usbphyc_port0 {
420 phy-supply = <&vdd_usb>;
421};
422
423&usbphyc_port1 {
424 phy-supply = <&vdd_usb>;
425};