blob: e3f2952c8294dcef94d395ea9b3633897730b06a [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 };
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053095};
96
97&ethernet0 {
98 status = "okay";
Marek Vasut88562b42020-03-31 19:51:32 +020099 pinctrl-0 = <&ethernet0_rgmii_pins_b>;
100 pinctrl-1 = <&ethernet0_rgmii_pins_sleep_b>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530101 pinctrl-names = "default", "sleep";
102 phy-mode = "rgmii";
103 max-speed = <1000>;
104 phy-handle = <&phy0>;
105
106 mdio0 {
107 #address-cells = <1>;
108 #size-cells = <0>;
109 compatible = "snps,dwmac-mdio";
110 phy0: ethernet-phy@7 {
111 reg = <7>;
112 };
113 };
114};
115
116&i2c1 {
117 pinctrl-names = "default";
118 pinctrl-0 = <&i2c1_pins_b>;
119 i2c-scl-rising-time-ns = <185>;
120 i2c-scl-falling-time-ns = <20>;
121 status = "okay";
122 /delete-property/dmas;
123 /delete-property/dma-names;
124};
125
126&i2c2 {
127 pinctrl-names = "default";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200128 pinctrl-0 = <&i2c2_pins_b1 &i2c2_pins_b2>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530129 i2c-scl-rising-time-ns = <185>;
130 i2c-scl-falling-time-ns = <20>;
131 status = "okay";
132 /delete-property/dmas;
133 /delete-property/dma-names;
134};
135
136&i2c4 {
137 pinctrl-names = "default";
138 pinctrl-0 = <&i2c4_pins_a>;
139 i2c-scl-rising-time-ns = <185>;
140 i2c-scl-falling-time-ns = <20>;
141 status = "okay";
142 /delete-property/dmas;
143 /delete-property/dma-names;
144
145 pmic: stpmic@33 {
146 compatible = "st,stpmic1";
147 reg = <0x33>;
148 interrupts-extended = <&exti 55 IRQ_TYPE_EDGE_FALLING>;
149 interrupt-controller;
150 #interrupt-cells = <2>;
151 status = "okay";
152
153 st,main-control-register = <0x04>;
154 st,vin-control-register = <0xc0>;
155 st,usb-control-register = <0x30>;
156
157 regulators {
158 compatible = "st,stpmic1-regulators";
159
160 ldo1-supply = <&v3v3>;
161 ldo2-supply = <&v3v3>;
162 ldo3-supply = <&vdd_ddr>;
163 ldo5-supply = <&v3v3>;
164 ldo6-supply = <&v3v3>;
165 pwr_sw1-supply = <&bst_out>;
166 pwr_sw2-supply = <&bst_out>;
167
168 vddcore: buck1 {
169 regulator-name = "vddcore";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200170 regulator-min-microvolt = <1200000>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530171 regulator-max-microvolt = <1350000>;
172 regulator-always-on;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200173 regulator-initial-mode = <0>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530174 regulator-over-current-protection;
175 };
176
177 vdd_ddr: buck2 {
178 regulator-name = "vdd_ddr";
179 regulator-min-microvolt = <1350000>;
180 regulator-max-microvolt = <1350000>;
181 regulator-always-on;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200182 regulator-initial-mode = <0>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530183 regulator-over-current-protection;
184 };
185
186 vdd: buck3 {
187 regulator-name = "vdd";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200188 regulator-min-microvolt = <3300000>;
189 regulator-max-microvolt = <3300000>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530190 regulator-always-on;
191 st,mask_reset;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200192 regulator-initial-mode = <0>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530193 regulator-over-current-protection;
194 };
195
196 v3v3: buck4 {
197 regulator-name = "v3v3";
198 regulator-min-microvolt = <3300000>;
199 regulator-max-microvolt = <3300000>;
200 regulator-always-on;
201 regulator-over-current-protection;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200202 regulator-initial-mode = <0>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530203 };
204
205 vdda: ldo1 {
206 regulator-name = "vdda";
207 regulator-min-microvolt = <2900000>;
208 regulator-max-microvolt = <2900000>;
209 interrupts = <IT_CURLIM_LDO1 0>;
210 interrupt-parent = <&pmic>;
211 };
212
213 v2v8: ldo2 {
214 regulator-name = "v2v8";
215 regulator-min-microvolt = <2800000>;
216 regulator-max-microvolt = <2800000>;
217 interrupts = <IT_CURLIM_LDO2 0>;
218 interrupt-parent = <&pmic>;
219 };
220
221 vtt_ddr: ldo3 {
222 regulator-name = "vtt_ddr";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200223 regulator-min-microvolt = <500000>;
224 regulator-max-microvolt = <750000>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530225 regulator-always-on;
226 regulator-over-current-protection;
227 };
228
229 vdd_usb: ldo4 {
230 regulator-name = "vdd_usb";
231 regulator-min-microvolt = <3300000>;
232 regulator-max-microvolt = <3300000>;
233 interrupts = <IT_CURLIM_LDO4 0>;
234 interrupt-parent = <&pmic>;
235 };
236
237 vdd_sd: ldo5 {
238 regulator-name = "vdd_sd";
239 regulator-min-microvolt = <2900000>;
240 regulator-max-microvolt = <2900000>;
241 interrupts = <IT_CURLIM_LDO5 0>;
242 interrupt-parent = <&pmic>;
243 regulator-boot-on;
244 };
245
246 v1v8: ldo6 {
247 regulator-name = "v1v8";
248 regulator-min-microvolt = <1800000>;
249 regulator-max-microvolt = <1800000>;
250 interrupts = <IT_CURLIM_LDO6 0>;
251 interrupt-parent = <&pmic>;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200252 regulator-enable-ramp-delay = <300000>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530253 };
254
255 vref_ddr: vref_ddr {
256 regulator-name = "vref_ddr";
257 regulator-always-on;
258 regulator-over-current-protection;
259 };
260
261 bst_out: boost {
262 regulator-name = "bst_out";
263 interrupts = <IT_OCP_BOOST 0>;
264 interrupt-parent = <&pmic>;
265 };
266
267 vbus_otg: pwr_sw1 {
268 regulator-name = "vbus_otg";
269 interrupts = <IT_OCP_OTG 0>;
270 interrupt-parent = <&pmic>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530271 };
272
273 vbus_sw: pwr_sw2 {
274 regulator-name = "vbus_sw";
275 interrupts = <IT_OCP_SWOUT 0>;
276 interrupt-parent = <&pmic>;
Patrick Delaunayb9c16b72020-01-28 10:11:00 +0100277 regulator-active-discharge = <1>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530278 };
279 };
280
281 onkey {
282 compatible = "st,stpmic1-onkey";
283 interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 1>;
284 interrupt-names = "onkey-falling", "onkey-rising";
285 status = "okay";
286 };
287
288 watchdog {
289 compatible = "st,stpmic1-wdt";
290 status = "disabled";
291 };
292 };
Marek Vasut679fa9d2020-03-31 19:51:30 +0200293
294 eeprom0: eeprom@53 {
295 compatible = "atmel,24c02";
296 reg = <0x53>;
297 pagesize = <16>;
298 };
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530299};
300
301&iwdg2 {
302 timeout-sec = <32>;
303 status = "okay";
304};
305
Patrick Delaunay900494d2020-01-28 10:10:59 +0100306&pwr_regulators {
307 vdd-supply = <&vdd>;
308 vdd_3v3_usbfs-supply = <&vdd_usb>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530309};
310
Marek Vasut96eb91a2020-03-31 19:51:28 +0200311&qspi {
312 pinctrl-names = "default", "sleep";
313 pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>;
314 pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a>;
315 reg = <0x58003000 0x1000>, <0x70000000 0x200000>;
316 #address-cells = <1>;
317 #size-cells = <0>;
318 status = "okay";
319
320 flash0: spi-flash@0 {
321 compatible = "jedec,spi-nor";
322 reg = <0>;
323 spi-rx-bus-width = <4>;
324 spi-max-frequency = <108000000>;
325 #address-cells = <1>;
326 #size-cells = <1>;
327 };
328};
329
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530330&rng1 {
331 status = "okay";
332};
333
334&rtc {
335 status = "okay";
336};
337
338&sdmmc1 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200339 pinctrl-names = "default", "opendrain", "sleep";
Marek Vasutc9052ef2020-03-31 19:51:25 +0200340 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_b>;
341 pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_b>;
342 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>;
343 cd-gpios = <&gpioi 8 GPIO_ACTIVE_LOW>;
344 disable-wp;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530345 st,sig-dir;
346 st,neg-edge;
347 st,use-ckin;
Marek Vasutc9052ef2020-03-31 19:51:25 +0200348 sd-uhs-sdr104;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530349 bus-width = <4>;
350 vmmc-supply = <&vdd_sd>;
Marek Vasutc9052ef2020-03-31 19:51:25 +0200351 vqmmc-supply = <&sd_switch>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530352 status = "okay";
353};
354
355&sdmmc2 {
356 pinctrl-names = "default";
Marek Vasute22085a2020-03-31 19:51:27 +0200357 pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_b>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530358 non-removable;
359 no-sd;
360 no-sdio;
361 st,neg-edge;
362 bus-width = <8>;
363 vmmc-supply = <&v3v3>;
364 mmc-ddr-3_3v;
365 status = "okay";
366};
367
368&spi2 {
369 pinctrl-names = "default";
370 pinctrl-0 = <&spi2_pins_a>;
371 status = "okay";
372};
373
374&uart4 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200375 /* On Low speed expansion header */
376 label = "LS-UART1";
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530377 pinctrl-names = "default";
378 pinctrl-0 = <&uart4_pins_b>;
379 status = "okay";
380};
381
382&uart7 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200383 /* On Low speed expansion header */
384 label = "LS-UART0";
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530385 pinctrl-names = "default";
386 pinctrl-0 = <&uart7_pins_a>;
387 status = "okay";
388};
389
390&usbh_ehci {
391 phys = <&usbphyc_port0>;
392 phy-names = "usb";
393 status = "okay";
394};
395
396&usbotg_hs {
397 dr_mode = "peripheral";
398 phys = <&usbphyc_port1 0>;
399 phy-names = "usb2-phy";
400 status = "okay";
401};
402
403&usbphyc {
404 status = "okay";
405};
406
407&usbphyc_port0 {
408 phy-supply = <&vdd_usb>;
409};
410
411&usbphyc_port1 {
412 phy-supply = <&vdd_usb>;
413};