blob: f9b79fada056e09e34674aaa8cf6eee0b79f676c [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
Patrick Delaunay1a4f57c2020-03-06 17:54:41 +01009#include "stm32mp157.dtsi"
10#include "stm32mp15-pinctrl.dtsi"
11#include "stm32mp15xxac-pinctrl.dtsi"
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053012#include <dt-bindings/gpio/gpio.h>
13#include <dt-bindings/mfd/st,stpmic1.h>
14
15/ {
16 model = "Arrow Electronics STM32MP157A Avenger96 board";
Patrick Delaunayfe915332019-07-30 19:16:12 +020017 compatible = "arrow,stm32mp157a-avenger96", "st,stm32mp157";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053018
19 aliases {
Marek Vasute182dca2020-03-31 19:51:30 +020020 eeprom0 = &eeprom0;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053021 ethernet0 = &ethernet0;
Patrick Delaunayfe915332019-07-30 19:16:12 +020022 mmc0 = &sdmmc1;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053023 serial0 = &uart4;
Patrick Delaunayfe915332019-07-30 19:16:12 +020024 serial1 = &uart7;
Marek Vasut2f0b5d932020-03-31 19:51:28 +020025 spi0 = &qspi;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053026 };
27
28 chosen {
29 stdout-path = "serial0:115200n8";
30 };
31
32 memory@c0000000 {
Patrick Delaunayfe915332019-07-30 19:16:12 +020033 device_type = "memory";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053034 reg = <0xc0000000 0x40000000>;
35 };
36
37 led {
38 compatible = "gpio-leds";
39 led1 {
Marek Vasut9528f8a2020-04-06 15:05:58 +020040 label = "green:user0";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053041 gpios = <&gpioz 7 GPIO_ACTIVE_HIGH>;
42 linux,default-trigger = "heartbeat";
43 default-state = "off";
44 };
45
46 led2 {
Marek Vasut9528f8a2020-04-06 15:05:58 +020047 label = "green:user1";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053048 gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>;
49 linux,default-trigger = "mmc0";
50 default-state = "off";
51 };
52
53 led3 {
Marek Vasut9528f8a2020-04-06 15:05:58 +020054 label = "green:user2";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +053055 gpios = <&gpiog 0 GPIO_ACTIVE_HIGH>;
56 linux,default-trigger = "mmc1";
57 default-state = "off";
58 };
59
60 led4 {
61 label = "green:user3";
62 gpios = <&gpiog 1 GPIO_ACTIVE_HIGH>;
63 linux,default-trigger = "none";
64 default-state = "off";
65 panic-indicator;
66 };
67
68 led5 {
69 label = "yellow:wifi";
70 gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>;
71 linux,default-trigger = "phy0tx";
72 default-state = "off";
73 };
74
75 led6 {
76 label = "blue:bt";
77 gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
78 linux,default-trigger = "bluetooth-power";
79 default-state = "off";
80 };
81 };
Marek Vasut45fa59b2020-03-31 19:51:25 +020082
83 sd_switch: regulator-sd_switch {
84 compatible = "regulator-gpio";
85 regulator-name = "sd_switch";
86 regulator-min-microvolt = <1800000>;
87 regulator-max-microvolt = <2900000>;
88 regulator-type = "voltage";
89 regulator-always-on;
90
91 gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>;
92 gpios-states = <0>;
93 states = <1800000 0x1>,
94 <2900000 0x0>;
95 };
Marek Vasut2f3c4b82020-03-31 19:51:34 +020096
97 /* Enpirion EP3A8LQI U2 on the DHCOR */
98 vdd_io: regulator-buck-io {
99 compatible = "regulator-fixed";
100 regulator-name = "buck-io";
101 regulator-min-microvolt = <1800000>;
102 regulator-max-microvolt = <1800000>;
103 regulator-always-on;
104 regulator-boot-on;
105 vin-supply = <&vdd>;
106 };
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530107};
108
109&ethernet0 {
110 status = "okay";
Marek Vasut6bb45d02020-03-31 19:51:32 +0200111 pinctrl-0 = <&ethernet0_rgmii_pins_b>;
112 pinctrl-1 = <&ethernet0_rgmii_pins_sleep_b>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530113 pinctrl-names = "default", "sleep";
114 phy-mode = "rgmii";
115 max-speed = <1000>;
116 phy-handle = <&phy0>;
Marek Vasut4c8e4c62020-03-31 19:51:33 +0200117 phy-reset-gpios = <&gpioz 2 GPIO_ACTIVE_LOW>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530118
119 mdio0 {
120 #address-cells = <1>;
121 #size-cells = <0>;
122 compatible = "snps,dwmac-mdio";
123 phy0: ethernet-phy@7 {
124 reg = <7>;
125 };
126 };
127};
128
129&i2c1 {
130 pinctrl-names = "default";
131 pinctrl-0 = <&i2c1_pins_b>;
132 i2c-scl-rising-time-ns = <185>;
133 i2c-scl-falling-time-ns = <20>;
134 status = "okay";
135 /delete-property/dmas;
136 /delete-property/dma-names;
137};
138
139&i2c2 {
140 pinctrl-names = "default";
Patrick Delaunayfe915332019-07-30 19:16:12 +0200141 pinctrl-0 = <&i2c2_pins_b1 &i2c2_pins_b2>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530142 i2c-scl-rising-time-ns = <185>;
143 i2c-scl-falling-time-ns = <20>;
144 status = "okay";
145 /delete-property/dmas;
146 /delete-property/dma-names;
147};
148
149&i2c4 {
150 pinctrl-names = "default";
151 pinctrl-0 = <&i2c4_pins_a>;
152 i2c-scl-rising-time-ns = <185>;
153 i2c-scl-falling-time-ns = <20>;
154 status = "okay";
155 /delete-property/dmas;
156 /delete-property/dma-names;
157
158 pmic: stpmic@33 {
159 compatible = "st,stpmic1";
160 reg = <0x33>;
161 interrupts-extended = <&exti 55 IRQ_TYPE_EDGE_FALLING>;
162 interrupt-controller;
163 #interrupt-cells = <2>;
164 status = "okay";
165
166 st,main-control-register = <0x04>;
167 st,vin-control-register = <0xc0>;
168 st,usb-control-register = <0x30>;
169
170 regulators {
171 compatible = "st,stpmic1-regulators";
172
173 ldo1-supply = <&v3v3>;
174 ldo2-supply = <&v3v3>;
175 ldo3-supply = <&vdd_ddr>;
176 ldo5-supply = <&v3v3>;
177 ldo6-supply = <&v3v3>;
178 pwr_sw1-supply = <&bst_out>;
179 pwr_sw2-supply = <&bst_out>;
180
181 vddcore: buck1 {
182 regulator-name = "vddcore";
Marek Vasut2f3c4b82020-03-31 19:51:34 +0200183 regulator-min-microvolt = <800000>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530184 regulator-max-microvolt = <1350000>;
185 regulator-always-on;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200186 regulator-initial-mode = <0>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530187 regulator-over-current-protection;
188 };
189
190 vdd_ddr: buck2 {
191 regulator-name = "vdd_ddr";
192 regulator-min-microvolt = <1350000>;
193 regulator-max-microvolt = <1350000>;
194 regulator-always-on;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200195 regulator-initial-mode = <0>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530196 regulator-over-current-protection;
197 };
198
199 vdd: buck3 {
200 regulator-name = "vdd";
Marek Vasut2f3c4b82020-03-31 19:51:34 +0200201 regulator-min-microvolt = <2900000>;
202 regulator-max-microvolt = <2900000>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530203 regulator-always-on;
204 st,mask_reset;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200205 regulator-initial-mode = <0>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530206 regulator-over-current-protection;
207 };
208
209 v3v3: buck4 {
210 regulator-name = "v3v3";
211 regulator-min-microvolt = <3300000>;
212 regulator-max-microvolt = <3300000>;
213 regulator-always-on;
214 regulator-over-current-protection;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200215 regulator-initial-mode = <0>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530216 };
217
218 vdda: ldo1 {
219 regulator-name = "vdda";
220 regulator-min-microvolt = <2900000>;
221 regulator-max-microvolt = <2900000>;
222 interrupts = <IT_CURLIM_LDO1 0>;
223 interrupt-parent = <&pmic>;
224 };
225
226 v2v8: ldo2 {
227 regulator-name = "v2v8";
228 regulator-min-microvolt = <2800000>;
229 regulator-max-microvolt = <2800000>;
230 interrupts = <IT_CURLIM_LDO2 0>;
231 interrupt-parent = <&pmic>;
232 };
233
234 vtt_ddr: ldo3 {
235 regulator-name = "vtt_ddr";
Patrick Delaunayfe915332019-07-30 19:16:12 +0200236 regulator-min-microvolt = <500000>;
237 regulator-max-microvolt = <750000>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530238 regulator-always-on;
239 regulator-over-current-protection;
240 };
241
242 vdd_usb: ldo4 {
243 regulator-name = "vdd_usb";
244 regulator-min-microvolt = <3300000>;
245 regulator-max-microvolt = <3300000>;
246 interrupts = <IT_CURLIM_LDO4 0>;
247 interrupt-parent = <&pmic>;
248 };
249
250 vdd_sd: ldo5 {
251 regulator-name = "vdd_sd";
252 regulator-min-microvolt = <2900000>;
253 regulator-max-microvolt = <2900000>;
254 interrupts = <IT_CURLIM_LDO5 0>;
255 interrupt-parent = <&pmic>;
256 regulator-boot-on;
257 };
258
259 v1v8: ldo6 {
260 regulator-name = "v1v8";
261 regulator-min-microvolt = <1800000>;
262 regulator-max-microvolt = <1800000>;
263 interrupts = <IT_CURLIM_LDO6 0>;
264 interrupt-parent = <&pmic>;
Patrick Delaunayfe915332019-07-30 19:16:12 +0200265 regulator-enable-ramp-delay = <300000>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530266 };
267
268 vref_ddr: vref_ddr {
269 regulator-name = "vref_ddr";
270 regulator-always-on;
271 regulator-over-current-protection;
272 };
273
274 bst_out: boost {
275 regulator-name = "bst_out";
276 interrupts = <IT_OCP_BOOST 0>;
277 interrupt-parent = <&pmic>;
278 };
279
280 vbus_otg: pwr_sw1 {
281 regulator-name = "vbus_otg";
282 interrupts = <IT_OCP_OTG 0>;
283 interrupt-parent = <&pmic>;
Marek Vasut2f3c4b82020-03-31 19:51:34 +0200284 regulator-active-discharge = <1>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530285 };
286
287 vbus_sw: pwr_sw2 {
288 regulator-name = "vbus_sw";
289 interrupts = <IT_OCP_SWOUT 0>;
290 interrupt-parent = <&pmic>;
Patrick Delaunayd35a5af2020-01-28 10:11:00 +0100291 regulator-active-discharge = <1>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530292 };
293 };
294
295 onkey {
296 compatible = "st,stpmic1-onkey";
297 interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 1>;
298 interrupt-names = "onkey-falling", "onkey-rising";
299 status = "okay";
300 };
301
302 watchdog {
303 compatible = "st,stpmic1-wdt";
304 status = "disabled";
305 };
306 };
Marek Vasute182dca2020-03-31 19:51:30 +0200307
308 eeprom0: eeprom@53 {
309 compatible = "atmel,24c02";
310 reg = <0x53>;
311 pagesize = <16>;
312 };
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530313};
314
315&iwdg2 {
316 timeout-sec = <32>;
317 status = "okay";
318};
319
Patrick Delaunay7915b992020-01-28 10:10:59 +0100320&pwr_regulators {
Marek Vasut2f3c4b82020-03-31 19:51:34 +0200321 vdd-supply = <&vdd_io>;
Patrick Delaunay7915b992020-01-28 10:10:59 +0100322 vdd_3v3_usbfs-supply = <&vdd_usb>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530323};
324
Marek Vasut2f0b5d932020-03-31 19:51:28 +0200325&qspi {
326 pinctrl-names = "default", "sleep";
327 pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>;
328 pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a>;
329 reg = <0x58003000 0x1000>, <0x70000000 0x200000>;
330 #address-cells = <1>;
331 #size-cells = <0>;
332 status = "okay";
333
334 flash0: spi-flash@0 {
335 compatible = "jedec,spi-nor";
336 reg = <0>;
337 spi-rx-bus-width = <4>;
338 spi-max-frequency = <108000000>;
339 #address-cells = <1>;
340 #size-cells = <1>;
341 };
342};
343
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530344&rng1 {
345 status = "okay";
346};
347
348&rtc {
349 status = "okay";
350};
351
352&sdmmc1 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200353 pinctrl-names = "default", "opendrain", "sleep";
Marek Vasut45fa59b2020-03-31 19:51:25 +0200354 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_b>;
355 pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_b>;
356 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>;
Marek Vasut45fa59b2020-03-31 19:51:25 +0200357 disable-wp;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530358 st,sig-dir;
359 st,neg-edge;
360 st,use-ckin;
Marek Vasut45fa59b2020-03-31 19:51:25 +0200361 sd-uhs-sdr104;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530362 bus-width = <4>;
363 vmmc-supply = <&vdd_sd>;
Marek Vasut45fa59b2020-03-31 19:51:25 +0200364 vqmmc-supply = <&sd_switch>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530365 status = "okay";
366};
367
368&sdmmc2 {
369 pinctrl-names = "default";
Marek Vasutdf7f49c2020-03-31 19:51:27 +0200370 pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_b>;
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530371 non-removable;
372 no-sd;
373 no-sdio;
374 st,neg-edge;
375 bus-width = <8>;
376 vmmc-supply = <&v3v3>;
377 mmc-ddr-3_3v;
378 status = "okay";
379};
380
381&spi2 {
382 pinctrl-names = "default";
383 pinctrl-0 = <&spi2_pins_a>;
384 status = "okay";
385};
386
387&uart4 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200388 /* On Low speed expansion header */
389 label = "LS-UART1";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530390 pinctrl-names = "default";
391 pinctrl-0 = <&uart4_pins_b>;
392 status = "okay";
393};
394
395&uart7 {
Patrick Delaunayfe915332019-07-30 19:16:12 +0200396 /* On Low speed expansion header */
397 label = "LS-UART0";
Manivannan Sadhasivam93ffa2b2019-05-02 13:26:44 +0530398 pinctrl-names = "default";
399 pinctrl-0 = <&uart7_pins_a>;
400 status = "okay";
401};
402
403&usbh_ehci {
404 phys = <&usbphyc_port0>;
405 phy-names = "usb";
406 status = "okay";
407};
408
409&usbotg_hs {
410 dr_mode = "peripheral";
411 phys = <&usbphyc_port1 0>;
412 phy-names = "usb2-phy";
413 status = "okay";
414};
415
416&usbphyc {
417 status = "okay";
418};
419
420&usbphyc_port0 {
421 phy-supply = <&vdd_usb>;
422};
423
424&usbphyc_port1 {
425 phy-supply = <&vdd_usb>;
426};