GNU Linux-libre 6.1.90-gnu
[releases.git] / arch / arm / boot / dts / stm32mp15xx-dhcor-drc-compact.dtsi
1 // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
2 /*
3  * Copyright (C) 2022 Marek Vasut <marex@denx.de>
4  */
5
6 / {
7         aliases {
8                 ethernet0 = &ethernet0;
9                 ethernet1 = &ksz8851;
10                 mmc0 = &sdmmc1;
11                 rtc0 = &hwrtc;
12                 rtc1 = &rtc;
13                 serial0 = &uart4;
14                 serial1 = &uart8;
15                 serial2 = &usart3;
16                 serial3 = &uart5;
17                 spi0 = &qspi;
18         };
19
20         chosen {
21                 stdout-path = "serial0:115200n8";
22         };
23
24         led {
25                 compatible = "gpio-leds";
26                 led1 {
27                         label = "yellow:user0";
28                         gpios = <&gpioz 6 GPIO_ACTIVE_LOW>;
29                         default-state = "off";
30                 };
31
32                 led2 {
33                         label = "red:user1";
34                         gpios = <&gpioz 3 GPIO_ACTIVE_LOW>;
35                         default-state = "off";
36                 };
37         };
38
39         ethernet_vio: vioregulator {
40                 compatible = "regulator-fixed";
41                 regulator-name = "vio";
42                 regulator-min-microvolt = <3300000>;
43                 regulator-max-microvolt = <3300000>;
44                 gpio = <&gpioh 2 GPIO_ACTIVE_LOW>;
45                 regulator-always-on;
46                 regulator-boot-on;
47                 vin-supply = <&vdd>;
48         };
49 };
50
51 &adc {  /* X11 ADC inputs */
52         pinctrl-names = "default";
53         pinctrl-0 = <&adc12_ain_pins_b>;
54         vdd-supply = <&vdd>;
55         vdda-supply = <&vdda>;
56         vref-supply = <&vdda>;
57         status = "okay";
58
59         adc1: adc@0 {
60                 st,adc-channels = <0 1 6>;
61                 st,min-sample-time-nsecs = <5000>;
62                 status = "okay";
63         };
64
65         adc2: adc@100 {
66                 st,adc-channels = <0 1 2>;
67                 st,min-sample-time-nsecs = <5000>;
68                 status = "okay";
69         };
70 };
71
72 &ethernet0 {
73         status = "okay";
74         pinctrl-0 = <&ethernet0_rgmii_pins_c>;
75         pinctrl-1 = <&ethernet0_rgmii_sleep_pins_c>;
76         pinctrl-names = "default", "sleep";
77         phy-mode = "rgmii";
78         max-speed = <1000>;
79         phy-handle = <&phy0>;
80
81         mdio {
82                 #address-cells = <1>;
83                 #size-cells = <0>;
84                 compatible = "snps,dwmac-mdio";
85                 reset-gpios = <&gpioz 2 GPIO_ACTIVE_LOW>;
86                 reset-delay-us = <1000>;
87                 reset-post-delay-us = <1000>;
88
89                 phy0: ethernet-phy@7 {
90                         reg = <7>;
91
92                         rxc-skew-ps = <1500>;
93                         rxdv-skew-ps = <540>;
94                         rxd0-skew-ps = <420>;
95                         rxd1-skew-ps = <420>;
96                         rxd2-skew-ps = <420>;
97                         rxd3-skew-ps = <420>;
98
99                         txc-skew-ps = <1440>;
100                         txen-skew-ps = <540>;
101                         txd0-skew-ps = <420>;
102                         txd1-skew-ps = <420>;
103                         txd2-skew-ps = <420>;
104                         txd3-skew-ps = <420>;
105                 };
106         };
107 };
108
109 &fmc {
110         pinctrl-names = "default", "sleep";
111         pinctrl-0 = <&fmc_pins_b>;
112         pinctrl-1 = <&fmc_sleep_pins_b>;
113         status = "okay";
114
115         ksz8851: ethernet@1,0 {
116                 compatible = "micrel,ks8851-mll";
117                 reg = <1 0x0 0x2>, <1 0x2 0x20000>;
118                 interrupt-parent = <&gpioc>;
119                 interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
120                 bank-width = <2>;
121
122                 /* Timing values are in nS */
123                 st,fmc2-ebi-cs-mux-enable;
124                 st,fmc2-ebi-cs-transaction-type = <4>;
125                 st,fmc2-ebi-cs-buswidth = <16>;
126                 st,fmc2-ebi-cs-address-setup-ns = <5>;
127                 st,fmc2-ebi-cs-address-hold-ns = <5>;
128                 st,fmc2-ebi-cs-bus-turnaround-ns = <5>;
129                 st,fmc2-ebi-cs-data-setup-ns = <45>;
130                 st,fmc2-ebi-cs-data-hold-ns = <1>;
131                 st,fmc2-ebi-cs-write-address-setup-ns = <5>;
132                 st,fmc2-ebi-cs-write-address-hold-ns = <5>;
133                 st,fmc2-ebi-cs-write-bus-turnaround-ns = <5>;
134                 st,fmc2-ebi-cs-write-data-setup-ns = <45>;
135                 st,fmc2-ebi-cs-write-data-hold-ns = <1>;
136         };
137 };
138
139 &gpioa {
140         gpio-line-names = "", "", "", "",
141                           "DRCC-VAR2", "", "", "",
142                           "", "", "", "",
143                           "", "", "", "";
144 };
145
146 &gpioe {
147         gpio-line-names = "", "", "", "",
148                           "", "DRCC-GPIO0", "", "",
149                           "", "", "", "",
150                           "", "", "", "";
151 };
152
153 &gpiog {
154         gpio-line-names = "", "", "", "",
155                           "", "", "", "",
156                           "", "", "", "",
157                           "DRCC-GPIO5", "", "", "";
158 };
159
160 &gpioh {
161         gpio-line-names = "", "", "", "DRCC-HW2",
162                           "DRCC-GPIO4", "", "", "",
163                           "DRCC-HW1", "DRCC-HW0", "", "DRCC-VAR1",
164                           "DRCC-VAR0", "", "", "DRCC-GPIO6";
165 };
166
167 &gpioi {
168         gpio-line-names = "", "", "", "",
169                           "", "", "", "DRCC-GPIO2",
170                           "", "DRCC-GPIO1", "", "",
171                           "", "", "", "";
172 };
173
174 &i2c1 { /* X11 I2C1 */
175         pinctrl-names = "default";
176         pinctrl-0 = <&i2c1_pins_b>;
177         i2c-scl-rising-time-ns = <185>;
178         i2c-scl-falling-time-ns = <20>;
179         status = "okay";
180         /delete-property/dmas;
181         /delete-property/dma-names;
182 };
183
184 &i2c4 {
185         hwrtc: rtc@32 {
186                 compatible = "microcrystal,rv8803";
187                 reg = <0x32>;
188         };
189
190         eeprom@50 {
191                 compatible = "atmel,24c04";
192                 reg = <0x50>;
193                 pagesize = <16>;
194         };
195
196         dh_mac_eeprom: eeprom@53 {
197                 compatible = "atmel,24c02";
198                 reg = <0x53>;
199                 pagesize = <16>;
200         };
201 };
202
203 &sdmmc1 {       /* MicroSD */
204         pinctrl-names = "default", "opendrain", "sleep";
205         pinctrl-0 = <&sdmmc1_b4_pins_a>;
206         pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
207         pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
208         cd-gpios = <&gpioi 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
209         disable-wp;
210         st,neg-edge;
211         bus-width = <4>;
212         vmmc-supply = <&vdd>;
213         vqmmc-supply = <&vdd>;
214         status = "okay";
215 };
216
217 &sdmmc2 {       /* eMMC */
218         pinctrl-names = "default", "opendrain", "sleep";
219         pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_c>;
220         pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_c>;
221         pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_c>;
222         bus-width = <8>;
223         no-sd;
224         no-sdio;
225         non-removable;
226         st,neg-edge;
227         vmmc-supply = <&v3v3>;
228         vqmmc-supply = <&vdd>;
229         status = "okay";
230 };
231
232 &sdmmc3 {       /* SDIO Wi-Fi */
233         pinctrl-names = "default", "opendrain", "sleep";
234         pinctrl-0 = <&sdmmc3_b4_pins_a>;
235         pinctrl-1 = <&sdmmc3_b4_od_pins_a>;
236         pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>;
237         broken-cd;
238         bus-width = <4>;
239         mmc-ddr-3_3v;
240         st,neg-edge;
241         vmmc-supply = <&v3v3>;
242         vqmmc-supply = <&v3v3>;
243         status = "okay";
244 };
245
246 &spi2 { /* X11 SPI */
247         pinctrl-names = "default";
248         pinctrl-0 = <&spi2_pins_b>;
249         cs-gpios = <&gpioi 0 0>;
250         status = "disabled";
251         /delete-property/dmas;
252         /delete-property/dma-names;
253 };
254
255 &uart4 {
256         label = "UART0";
257         pinctrl-names = "default";
258         pinctrl-0 = <&uart4_pins_d>;
259         /delete-property/dmas;
260         /delete-property/dma-names;
261         status = "okay";
262 };
263
264 &uart5 {        /* X11 UART */
265         label = "X11-UART5";
266         pinctrl-names = "default";
267         pinctrl-0 = <&uart5_pins_a>;
268         /delete-property/dmas;
269         /delete-property/dma-names;
270         status = "okay";
271 };
272
273 &uart8 {
274         label = "RS485-1";
275         pinctrl-names = "default";
276         pinctrl-0 = <&uart8_pins_a &uart8_rtscts_pins_a>;
277         uart-has-rtscts;
278         /delete-property/dmas;
279         /delete-property/dma-names;
280         status = "okay";
281 };
282
283 &usart3 {       /* RS485 or RS232 */
284         label = "RS485-2";
285         pinctrl-names = "default", "sleep";
286         pinctrl-0 = <&usart3_pins_e>;
287         pinctrl-1 = <&usart3_sleep_pins_e>;
288         uart-has-rtscts;
289         /delete-property/dmas;
290         /delete-property/dma-names;
291         status = "okay";
292 };
293
294 &usbh_ehci {
295         phys = <&usbphyc_port0>;
296         status = "okay";
297 };
298
299 &usbh_ohci {
300         phys = <&usbphyc_port0>;
301         status = "okay";
302 };
303
304 &usbotg_hs {
305         dr_mode = "otg";
306         pinctrl-0 = <&usbotg_hs_pins_a>;
307         pinctrl-names = "default";
308         phy-names = "usb2-phy";
309         phys = <&usbphyc_port1 0>;
310         vbus-supply = <&vbus_otg>;
311         status = "okay";
312 };
313
314 &usbphyc {
315         status = "okay";
316 };
317
318 &usbphyc_port0 {
319         phy-supply = <&vdd_usb>;
320         connector {
321                 compatible = "usb-a-connector";
322                 vbus-supply = <&vbus_sw>;
323         };
324 };
325
326 &usbphyc_port1 {
327         phy-supply = <&vdd_usb>;
328 };