1// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
2/*
3 * Copyright (C) Linaro Ltd 2019 - All Rights Reserved
4 * Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
5 * Copyright (C) 2020 Marek Vasut <marex@denx.de>
6 */
7
8/dts-v1/;
9
10#include "stm32mp15xx-dhcor-io1v8.dtsi"
11#include "stm32mp15xx-dhcor-avenger96-u-boot.dtsi"
12
13/ {
14	model = "Arrow Electronics STM32MP15xx Avenger96 board";
15	compatible = "arrow,stm32mp15xx-avenger96", "st,stm32mp15x";
16
17	aliases {
18		eeprom0 = &eeprom0;
19		ethernet0 = &ethernet0;
20		mmc0 = &sdmmc1;
21		serial0 = &uart4;
22		serial1 = &uart7;
23	};
24
25	chosen {
26		stdout-path = "serial0:115200n8";
27	};
28
29	led {
30		compatible = "gpio-leds";
31		led1 {
32			label = "green:user0";
33			gpios = <&gpioz 7 GPIO_ACTIVE_HIGH>;
34			linux,default-trigger = "heartbeat";
35			default-state = "off";
36		};
37
38		led2 {
39			label = "green:user1";
40			gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>;
41			linux,default-trigger = "mmc0";
42			default-state = "off";
43		};
44
45		led3 {
46			label = "green:user2";
47			gpios = <&gpiog 0 GPIO_ACTIVE_HIGH>;
48			linux,default-trigger = "mmc1";
49			default-state = "off";
50		};
51
52		led4 {
53			label = "green:user3";
54			gpios = <&gpiog 1 GPIO_ACTIVE_HIGH>;
55			linux,default-trigger = "none";
56			default-state = "off";
57			panic-indicator;
58		};
59
60		led5 {
61			label = "yellow:wifi";
62			gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>;
63			linux,default-trigger = "phy0tx";
64			default-state = "off";
65		};
66
67		led6 {
68			label = "blue:bt";
69			gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
70			linux,default-trigger = "bluetooth-power";
71			default-state = "off";
72		};
73	};
74
75	sd_switch: regulator-sd_switch {
76		compatible = "regulator-gpio";
77		regulator-name = "sd_switch";
78		regulator-min-microvolt = <1800000>;
79		regulator-max-microvolt = <2900000>;
80		regulator-type = "voltage";
81		regulator-always-on;
82
83		gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>;
84		gpios-states = <0>;
85		states = <1800000 0x1>,
86			 <2900000 0x0>;
87	};
88};
89
90&ethernet0 {
91	status = "okay";
92	pinctrl-0 = <&ethernet0_rgmii_pins_c>;
93	pinctrl-1 = <&ethernet0_rgmii_sleep_pins_c>;
94	pinctrl-names = "default", "sleep";
95	phy-mode = "rgmii";
96	max-speed = <1000>;
97	phy-handle = <&phy0>;
98	phy-reset-gpios = <&gpioz 2 GPIO_ACTIVE_LOW>;
99
100	mdio0 {
101		#address-cells = <1>;
102		#size-cells = <0>;
103		compatible = "snps,dwmac-mdio";
104		phy0: ethernet-phy@7 {
105			reg = <7>;
106		};
107	};
108};
109
110&i2c1 {	/* X6 I2C1 */
111	pinctrl-names = "default";
112	pinctrl-0 = <&i2c1_pins_b>;
113	i2c-scl-rising-time-ns = <185>;
114	i2c-scl-falling-time-ns = <20>;
115	status = "okay";
116	/delete-property/dmas;
117	/delete-property/dma-names;
118};
119
120&i2c2 {	/* X6 I2C2 */
121	pinctrl-names = "default";
122	pinctrl-0 = <&i2c2_pins_c>;
123	i2c-scl-rising-time-ns = <185>;
124	i2c-scl-falling-time-ns = <20>;
125	status = "okay";
126	/delete-property/dmas;
127	/delete-property/dma-names;
128};
129
130&i2c4 {
131	eeprom0: eeprom@53 {
132		compatible = "atmel,24c02";
133		reg = <0x53>;
134		pagesize = <16>;
135	};
136};
137
138&sdmmc1 {
139	pinctrl-names = "default", "opendrain", "sleep";
140	pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_b>;
141	pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_b>;
142	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>;
143	disable-wp;
144	st,sig-dir;
145	st,neg-edge;
146	st,use-ckin;
147	bus-width = <4>;
148	vmmc-supply = <&vdd_sd>;
149	vqmmc-supply = <&sd_switch>;
150	status = "okay";
151};
152
153&sdmmc2 {
154	pinctrl-names = "default";
155	pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_b>;
156	non-removable;
157	no-sd;
158	no-sdio;
159	st,neg-edge;
160	bus-width = <8>;
161	vmmc-supply = <&v3v3>;
162	mmc-ddr-3_3v;
163	status = "okay";
164};
165
166&spi2 {
167	pinctrl-names = "default";
168	pinctrl-0 = <&spi2_pins_a>;
169	status = "okay";
170};
171
172&uart4 {
173	/* On Low speed expansion header */
174	label = "LS-UART1";
175	pinctrl-names = "default";
176	pinctrl-0 = <&uart4_pins_b>;
177	status = "okay";
178};
179
180&uart7 {
181	/* On Low speed expansion header */
182	label = "LS-UART0";
183	pinctrl-names = "default";
184	pinctrl-0 = <&uart7_pins_a>;
185	status = "okay";
186};
187
188&usbh_ehci {
189	phys = <&usbphyc_port0>;
190	phy-names = "usb";
191	status = "okay";
192};
193
194&usbotg_hs {
195	pinctrl-0 = <&usbotg_hs_pins_a>;
196	pinctrl-names = "default";
197	phys = <&usbphyc_port1 0>;
198	phy-names = "usb2-phy";
199	status = "okay";
200};
201
202&usbphyc {
203	status = "okay";
204};
205
206&usbphyc_port0 {
207	phy-supply = <&vdd_usb>;
208};
209
210&usbphyc_port1 {
211	phy-supply = <&vdd_usb>;
212};
213