blob: 11e7e6367da9a48231b8b8479dda72872b04c9fc [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
Patrick Delaunay48c5e902020-03-06 17:54:41 +01009#include "stm32mp157.dtsi"
10#include "stm32mp15-pinctrl.dtsi"
Tom Rini7357a352020-04-07 11:58:44 -040011#include "stm32mp157-pinctrl.dtsi"
Patrick Delaunay48c5e902020-03-06 17:54:41 +010012#include "stm32mp15xxac-pinctrl.dtsi"
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053013#include <dt-bindings/gpio/gpio.h>
14#include <dt-bindings/mfd/st,stpmic1.h>
15
16/ {
17 model = "Arrow Electronics STM32MP157A Avenger96 board";
Patrick Delaunay708cae72019-07-30 19:16:12 +020018 compatible = "arrow,stm32mp157a-avenger96", "st,stm32mp157";
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053019
20 aliases {
Marek Vasut679fa9d2020-03-31 19:51:30 +020021 eeprom0 = &eeprom0;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053022 ethernet0 = &ethernet0;
Patrick Delaunay708cae72019-07-30 19:16:12 +020023 mmc0 = &sdmmc1;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053024 serial0 = &uart4;
Patrick Delaunay708cae72019-07-30 19:16:12 +020025 serial1 = &uart7;
Marek Vasut96eb91a2020-03-31 19:51:28 +020026 spi0 = &qspi;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053027 };
28
29 chosen {
30 stdout-path = "serial0:115200n8";
31 };
32
33 memory@c0000000 {
Patrick Delaunay708cae72019-07-30 19:16:12 +020034 device_type = "memory";
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053035 reg = <0xc0000000 0x40000000>;
36 };
37
38 led {
39 compatible = "gpio-leds";
40 led1 {
Marek Vasute5f93c32020-04-06 15:05:58 +020041 label = "green:user0";
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053042 gpios = <&gpioz 7 GPIO_ACTIVE_HIGH>;
43 linux,default-trigger = "heartbeat";
44 default-state = "off";
45 };
46
47 led2 {
Marek Vasute5f93c32020-04-06 15:05:58 +020048 label = "green:user1";
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053049 gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>;
50 linux,default-trigger = "mmc0";
51 default-state = "off";
52 };
53
54 led3 {
Marek Vasute5f93c32020-04-06 15:05:58 +020055 label = "green:user2";
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +053056 gpios = <&gpiog 0 GPIO_ACTIVE_HIGH>;
57 linux,default-trigger = "mmc1";
58 default-state = "off";
59 };
60
61 led4 {
62 label = "green:user3";
63 gpios = <&gpiog 1 GPIO_ACTIVE_HIGH>;
64 linux,default-trigger = "none";
65 default-state = "off";
66 panic-indicator;
67 };
68
69 led5 {
70 label = "yellow:wifi";
71 gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>;
72 linux,default-trigger = "phy0tx";
73 default-state = "off";
74 };
75
76 led6 {
77 label = "blue:bt";
78 gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
79 linux,default-trigger = "bluetooth-power";
80 default-state = "off";
81 };
82 };
Marek Vasutc9052ef2020-03-31 19:51:25 +020083
84 sd_switch: regulator-sd_switch {
85 compatible = "regulator-gpio";
86 regulator-name = "sd_switch";
87 regulator-min-microvolt = <1800000>;
88 regulator-max-microvolt = <2900000>;
89 regulator-type = "voltage";
90 regulator-always-on;
91
92 gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>;
93 gpios-states = <0>;
94 states = <1800000 0x1>,
95 <2900000 0x0>;
96 };
Marek Vasutb177bf32020-03-31 19:51:34 +020097
98 /* Enpirion EP3A8LQI U2 on the DHCOR */
99 vdd_io: regulator-buck-io {
100 compatible = "regulator-fixed";
101 regulator-name = "buck-io";
102 regulator-min-microvolt = <1800000>;
103 regulator-max-microvolt = <1800000>;
104 regulator-always-on;
105 regulator-boot-on;
106 vin-supply = <&vdd>;
107 };
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530108};
109
110&ethernet0 {
111 status = "okay";
Marek Vasut88562b42020-03-31 19:51:32 +0200112 pinctrl-0 = <&ethernet0_rgmii_pins_b>;
113 pinctrl-1 = <&ethernet0_rgmii_pins_sleep_b>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530114 pinctrl-names = "default", "sleep";
115 phy-mode = "rgmii";
116 max-speed = <1000>;
117 phy-handle = <&phy0>;
Marek Vasut81ff3852020-03-31 19:51:33 +0200118 phy-reset-gpios = <&gpioz 2 GPIO_ACTIVE_LOW>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530119
120 mdio0 {
121 #address-cells = <1>;
122 #size-cells = <0>;
123 compatible = "snps,dwmac-mdio";
124 phy0: ethernet-phy@7 {
125 reg = <7>;
126 };
127 };
128};
129
130&i2c1 {
131 pinctrl-names = "default";
132 pinctrl-0 = <&i2c1_pins_b>;
133 i2c-scl-rising-time-ns = <185>;
134 i2c-scl-falling-time-ns = <20>;
135 status = "okay";
136 /delete-property/dmas;
137 /delete-property/dma-names;
138};
139
140&i2c2 {
141 pinctrl-names = "default";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200142 pinctrl-0 = <&i2c2_pins_b1 &i2c2_pins_b2>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530143 i2c-scl-rising-time-ns = <185>;
144 i2c-scl-falling-time-ns = <20>;
145 status = "okay";
146 /delete-property/dmas;
147 /delete-property/dma-names;
148};
149
150&i2c4 {
151 pinctrl-names = "default";
152 pinctrl-0 = <&i2c4_pins_a>;
153 i2c-scl-rising-time-ns = <185>;
154 i2c-scl-falling-time-ns = <20>;
155 status = "okay";
156 /delete-property/dmas;
157 /delete-property/dma-names;
158
159 pmic: stpmic@33 {
160 compatible = "st,stpmic1";
161 reg = <0x33>;
162 interrupts-extended = <&exti 55 IRQ_TYPE_EDGE_FALLING>;
163 interrupt-controller;
164 #interrupt-cells = <2>;
165 status = "okay";
166
167 st,main-control-register = <0x04>;
168 st,vin-control-register = <0xc0>;
169 st,usb-control-register = <0x30>;
170
171 regulators {
172 compatible = "st,stpmic1-regulators";
173
174 ldo1-supply = <&v3v3>;
175 ldo2-supply = <&v3v3>;
176 ldo3-supply = <&vdd_ddr>;
177 ldo5-supply = <&v3v3>;
178 ldo6-supply = <&v3v3>;
179 pwr_sw1-supply = <&bst_out>;
180 pwr_sw2-supply = <&bst_out>;
181
182 vddcore: buck1 {
183 regulator-name = "vddcore";
Marek Vasutb177bf32020-03-31 19:51:34 +0200184 regulator-min-microvolt = <800000>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530185 regulator-max-microvolt = <1350000>;
186 regulator-always-on;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200187 regulator-initial-mode = <0>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530188 regulator-over-current-protection;
189 };
190
191 vdd_ddr: buck2 {
192 regulator-name = "vdd_ddr";
193 regulator-min-microvolt = <1350000>;
194 regulator-max-microvolt = <1350000>;
195 regulator-always-on;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200196 regulator-initial-mode = <0>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530197 regulator-over-current-protection;
198 };
199
200 vdd: buck3 {
201 regulator-name = "vdd";
Marek Vasutb177bf32020-03-31 19:51:34 +0200202 regulator-min-microvolt = <2900000>;
203 regulator-max-microvolt = <2900000>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530204 regulator-always-on;
205 st,mask_reset;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200206 regulator-initial-mode = <0>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530207 regulator-over-current-protection;
208 };
209
210 v3v3: buck4 {
211 regulator-name = "v3v3";
212 regulator-min-microvolt = <3300000>;
213 regulator-max-microvolt = <3300000>;
214 regulator-always-on;
215 regulator-over-current-protection;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200216 regulator-initial-mode = <0>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530217 };
218
219 vdda: ldo1 {
220 regulator-name = "vdda";
221 regulator-min-microvolt = <2900000>;
222 regulator-max-microvolt = <2900000>;
223 interrupts = <IT_CURLIM_LDO1 0>;
224 interrupt-parent = <&pmic>;
225 };
226
227 v2v8: ldo2 {
228 regulator-name = "v2v8";
229 regulator-min-microvolt = <2800000>;
230 regulator-max-microvolt = <2800000>;
231 interrupts = <IT_CURLIM_LDO2 0>;
232 interrupt-parent = <&pmic>;
233 };
234
235 vtt_ddr: ldo3 {
236 regulator-name = "vtt_ddr";
Patrick Delaunay708cae72019-07-30 19:16:12 +0200237 regulator-min-microvolt = <500000>;
238 regulator-max-microvolt = <750000>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530239 regulator-always-on;
240 regulator-over-current-protection;
241 };
242
243 vdd_usb: ldo4 {
244 regulator-name = "vdd_usb";
245 regulator-min-microvolt = <3300000>;
246 regulator-max-microvolt = <3300000>;
247 interrupts = <IT_CURLIM_LDO4 0>;
248 interrupt-parent = <&pmic>;
249 };
250
251 vdd_sd: ldo5 {
252 regulator-name = "vdd_sd";
253 regulator-min-microvolt = <2900000>;
254 regulator-max-microvolt = <2900000>;
255 interrupts = <IT_CURLIM_LDO5 0>;
256 interrupt-parent = <&pmic>;
257 regulator-boot-on;
258 };
259
260 v1v8: ldo6 {
261 regulator-name = "v1v8";
262 regulator-min-microvolt = <1800000>;
263 regulator-max-microvolt = <1800000>;
264 interrupts = <IT_CURLIM_LDO6 0>;
265 interrupt-parent = <&pmic>;
Patrick Delaunay708cae72019-07-30 19:16:12 +0200266 regulator-enable-ramp-delay = <300000>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530267 };
268
269 vref_ddr: vref_ddr {
270 regulator-name = "vref_ddr";
271 regulator-always-on;
272 regulator-over-current-protection;
273 };
274
275 bst_out: boost {
276 regulator-name = "bst_out";
277 interrupts = <IT_OCP_BOOST 0>;
278 interrupt-parent = <&pmic>;
279 };
280
281 vbus_otg: pwr_sw1 {
282 regulator-name = "vbus_otg";
283 interrupts = <IT_OCP_OTG 0>;
284 interrupt-parent = <&pmic>;
Marek Vasutb177bf32020-03-31 19:51:34 +0200285 regulator-active-discharge = <1>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530286 };
287
288 vbus_sw: pwr_sw2 {
289 regulator-name = "vbus_sw";
290 interrupts = <IT_OCP_SWOUT 0>;
291 interrupt-parent = <&pmic>;
Patrick Delaunayb9c16b72020-01-28 10:11:00 +0100292 regulator-active-discharge = <1>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530293 };
294 };
295
296 onkey {
297 compatible = "st,stpmic1-onkey";
298 interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 1>;
299 interrupt-names = "onkey-falling", "onkey-rising";
300 status = "okay";
301 };
302
303 watchdog {
304 compatible = "st,stpmic1-wdt";
305 status = "disabled";
306 };
307 };
Marek Vasut679fa9d2020-03-31 19:51:30 +0200308
309 eeprom0: eeprom@53 {
310 compatible = "atmel,24c02";
311 reg = <0x53>;
312 pagesize = <16>;
313 };
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530314};
315
316&iwdg2 {
317 timeout-sec = <32>;
318 status = "okay";
319};
320
Patrick Delaunay900494d2020-01-28 10:10:59 +0100321&pwr_regulators {
Marek Vasutb177bf32020-03-31 19:51:34 +0200322 vdd-supply = <&vdd_io>;
Patrick Delaunay900494d2020-01-28 10:10:59 +0100323 vdd_3v3_usbfs-supply = <&vdd_usb>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530324};
325
Marek Vasut96eb91a2020-03-31 19:51:28 +0200326&qspi {
327 pinctrl-names = "default", "sleep";
328 pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>;
329 pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a>;
330 reg = <0x58003000 0x1000>, <0x70000000 0x200000>;
331 #address-cells = <1>;
332 #size-cells = <0>;
333 status = "okay";
334
335 flash0: spi-flash@0 {
336 compatible = "jedec,spi-nor";
337 reg = <0>;
338 spi-rx-bus-width = <4>;
339 spi-max-frequency = <108000000>;
340 #address-cells = <1>;
341 #size-cells = <1>;
342 };
343};
344
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530345&rng1 {
346 status = "okay";
347};
348
349&rtc {
350 status = "okay";
351};
352
353&sdmmc1 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200354 pinctrl-names = "default", "opendrain", "sleep";
Marek Vasutc9052ef2020-03-31 19:51:25 +0200355 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_b>;
356 pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_b>;
357 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>;
Marek Vasutc9052ef2020-03-31 19:51:25 +0200358 disable-wp;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530359 st,sig-dir;
360 st,neg-edge;
361 st,use-ckin;
Marek Vasutc9052ef2020-03-31 19:51:25 +0200362 sd-uhs-sdr104;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530363 bus-width = <4>;
364 vmmc-supply = <&vdd_sd>;
Marek Vasutc9052ef2020-03-31 19:51:25 +0200365 vqmmc-supply = <&sd_switch>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530366 status = "okay";
367};
368
369&sdmmc2 {
370 pinctrl-names = "default";
Marek Vasute22085a2020-03-31 19:51:27 +0200371 pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_b>;
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530372 non-removable;
373 no-sd;
374 no-sdio;
375 st,neg-edge;
376 bus-width = <8>;
377 vmmc-supply = <&v3v3>;
378 mmc-ddr-3_3v;
379 status = "okay";
380};
381
382&spi2 {
383 pinctrl-names = "default";
384 pinctrl-0 = <&spi2_pins_a>;
385 status = "okay";
386};
387
388&uart4 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200389 /* On Low speed expansion header */
390 label = "LS-UART1";
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530391 pinctrl-names = "default";
392 pinctrl-0 = <&uart4_pins_b>;
393 status = "okay";
394};
395
396&uart7 {
Patrick Delaunay708cae72019-07-30 19:16:12 +0200397 /* On Low speed expansion header */
398 label = "LS-UART0";
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530399 pinctrl-names = "default";
400 pinctrl-0 = <&uart7_pins_a>;
401 status = "okay";
402};
403
404&usbh_ehci {
405 phys = <&usbphyc_port0>;
406 phy-names = "usb";
407 status = "okay";
408};
409
410&usbotg_hs {
411 dr_mode = "peripheral";
412 phys = <&usbphyc_port1 0>;
413 phy-names = "usb2-phy";
414 status = "okay";
415};
416
417&usbphyc {
418 status = "okay";
419};
420
421&usbphyc_port0 {
422 phy-supply = <&vdd_usb>;
423};
424
425&usbphyc_port1 {
426 phy-supply = <&vdd_usb>;
427};