xref: /linux/arch/arm/boot/dts/st/stm32h7-pinctrl.dtsi (revision cdd5b5a9761fd66d17586e4f4ba6588c70e640ea)
1*724ba675SRob Herring/*
2*724ba675SRob Herring * Copyright 2017 - Alexandre Torgue <alexandre.torgue@st.com>
3*724ba675SRob Herring *
4*724ba675SRob Herring * This file is dual-licensed: you can use it either under the terms
5*724ba675SRob Herring * of the GPL or the X11 license, at your option. Note that this dual
6*724ba675SRob Herring * licensing only applies to this file, and not this project as a
7*724ba675SRob Herring * whole.
8*724ba675SRob Herring *
9*724ba675SRob Herring *  a) This file is free software; you can redistribute it and/or
10*724ba675SRob Herring *     modify it under the terms of the GNU General Public License as
11*724ba675SRob Herring *     published by the Free Software Foundation; either version 2 of the
12*724ba675SRob Herring *     License, or (at your option) any later version.
13*724ba675SRob Herring *
14*724ba675SRob Herring *     This file is distributed in the hope that it will be useful,
15*724ba675SRob Herring *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16*724ba675SRob Herring *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17*724ba675SRob Herring *     GNU General Public License for more details.
18*724ba675SRob Herring *
19*724ba675SRob Herring * Or, alternatively,
20*724ba675SRob Herring *
21*724ba675SRob Herring *  b) Permission is hereby granted, free of charge, to any person
22*724ba675SRob Herring *     obtaining a copy of this software and associated documentation
23*724ba675SRob Herring *     files (the "Software"), to deal in the Software without
24*724ba675SRob Herring *     restriction, including without limitation the rights to use,
25*724ba675SRob Herring *     copy, modify, merge, publish, distribute, sublicense, and/or
26*724ba675SRob Herring *     sell copies of the Software, and to permit persons to whom the
27*724ba675SRob Herring *     Software is furnished to do so, subject to the following
28*724ba675SRob Herring *     conditions:
29*724ba675SRob Herring *
30*724ba675SRob Herring *     The above copyright notice and this permission notice shall be
31*724ba675SRob Herring *     included in all copies or substantial portions of the Software.
32*724ba675SRob Herring *
33*724ba675SRob Herring *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34*724ba675SRob Herring *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35*724ba675SRob Herring *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36*724ba675SRob Herring *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37*724ba675SRob Herring *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38*724ba675SRob Herring *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39*724ba675SRob Herring *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40*724ba675SRob Herring *     OTHER DEALINGS IN THE SOFTWARE.
41*724ba675SRob Herring */
42*724ba675SRob Herring
43*724ba675SRob Herring#include <dt-bindings/pinctrl/stm32-pinfunc.h>
44*724ba675SRob Herring
45*724ba675SRob Herring&pinctrl {
46*724ba675SRob Herring
47*724ba675SRob Herring	i2c1_pins_a: i2c1-0 {
48*724ba675SRob Herring		pins {
49*724ba675SRob Herring			pinmux = <STM32_PINMUX('B', 6, AF4)>, /* I2C1_SCL */
50*724ba675SRob Herring				 <STM32_PINMUX('B', 7, AF4)>; /* I2C1_SDA */
51*724ba675SRob Herring			bias-disable;
52*724ba675SRob Herring			drive-open-drain;
53*724ba675SRob Herring			slew-rate = <0>;
54*724ba675SRob Herring		};
55*724ba675SRob Herring	};
56*724ba675SRob Herring
57*724ba675SRob Herring	ethernet_rmii: rmii-0 {
58*724ba675SRob Herring		pins {
59*724ba675SRob Herring			pinmux = <STM32_PINMUX('G', 11, AF11)>,
60*724ba675SRob Herring				 <STM32_PINMUX('G', 13, AF11)>,
61*724ba675SRob Herring				 <STM32_PINMUX('G', 12, AF11)>,
62*724ba675SRob Herring				 <STM32_PINMUX('C', 4, AF11)>,
63*724ba675SRob Herring				 <STM32_PINMUX('C', 5, AF11)>,
64*724ba675SRob Herring				 <STM32_PINMUX('A', 7, AF11)>,
65*724ba675SRob Herring				 <STM32_PINMUX('C', 1, AF11)>,
66*724ba675SRob Herring				 <STM32_PINMUX('A', 2, AF11)>,
67*724ba675SRob Herring				 <STM32_PINMUX('A', 1, AF11)>;
68*724ba675SRob Herring			slew-rate = <2>;
69*724ba675SRob Herring		};
70*724ba675SRob Herring	};
71*724ba675SRob Herring
72*724ba675SRob Herring	sdmmc1_b4_pins_a: sdmmc1-b4-0 {
73*724ba675SRob Herring		pins {
74*724ba675SRob Herring			pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1_D0 */
75*724ba675SRob Herring				 <STM32_PINMUX('C', 9, AF12)>, /* SDMMC1_D1 */
76*724ba675SRob Herring				 <STM32_PINMUX('C', 10, AF12)>, /* SDMMC1_D2 */
77*724ba675SRob Herring				 <STM32_PINMUX('C', 11, AF12)>, /* SDMMC1_D3 */
78*724ba675SRob Herring				 <STM32_PINMUX('C', 12, AF12)>, /* SDMMC1_CK */
79*724ba675SRob Herring				 <STM32_PINMUX('D', 2, AF12)>; /* SDMMC1_CMD */
80*724ba675SRob Herring			slew-rate = <3>;
81*724ba675SRob Herring			drive-push-pull;
82*724ba675SRob Herring			bias-disable;
83*724ba675SRob Herring		};
84*724ba675SRob Herring	};
85*724ba675SRob Herring
86*724ba675SRob Herring	sdmmc1_b4_od_pins_a: sdmmc1-b4-od-0 {
87*724ba675SRob Herring		pins1 {
88*724ba675SRob Herring			pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1_D0 */
89*724ba675SRob Herring				 <STM32_PINMUX('C', 9, AF12)>, /* SDMMC1_D1 */
90*724ba675SRob Herring				 <STM32_PINMUX('C', 10, AF12)>, /* SDMMC1_D2 */
91*724ba675SRob Herring				 <STM32_PINMUX('C', 11, AF12)>, /* SDMMC1_D3 */
92*724ba675SRob Herring				 <STM32_PINMUX('C', 12, AF12)>; /* SDMMC1_CK */
93*724ba675SRob Herring			slew-rate = <3>;
94*724ba675SRob Herring			drive-push-pull;
95*724ba675SRob Herring			bias-disable;
96*724ba675SRob Herring		};
97*724ba675SRob Herring		pins2 {
98*724ba675SRob Herring			pinmux = <STM32_PINMUX('D', 2, AF12)>; /* SDMMC1_CMD */
99*724ba675SRob Herring			slew-rate = <3>;
100*724ba675SRob Herring			drive-open-drain;
101*724ba675SRob Herring			bias-disable;
102*724ba675SRob Herring		};
103*724ba675SRob Herring	};
104*724ba675SRob Herring
105*724ba675SRob Herring	sdmmc1_b4_sleep_pins_a: sdmmc1-b4-sleep-0 {
106*724ba675SRob Herring		pins {
107*724ba675SRob Herring			pinmux = <STM32_PINMUX('C', 8, ANALOG)>, /* SDMMC1_D0 */
108*724ba675SRob Herring				 <STM32_PINMUX('C', 9, ANALOG)>, /* SDMMC1_D1 */
109*724ba675SRob Herring				 <STM32_PINMUX('C', 10, ANALOG)>, /* SDMMC1_D2 */
110*724ba675SRob Herring				 <STM32_PINMUX('C', 11, ANALOG)>, /* SDMMC1_D3 */
111*724ba675SRob Herring				 <STM32_PINMUX('C', 12, ANALOG)>, /* SDMMC1_CK */
112*724ba675SRob Herring				 <STM32_PINMUX('D', 2, ANALOG)>; /* SDMMC1_CMD */
113*724ba675SRob Herring		};
114*724ba675SRob Herring	};
115*724ba675SRob Herring
116*724ba675SRob Herring	sdmmc1_dir_pins_a: sdmmc1-dir-0 {
117*724ba675SRob Herring		pins1 {
118*724ba675SRob Herring			pinmux = <STM32_PINMUX('C', 6, AF8)>, /* SDMMC1_D0DIR */
119*724ba675SRob Herring				 <STM32_PINMUX('C', 7, AF8)>, /* SDMMC1_D123DIR */
120*724ba675SRob Herring				 <STM32_PINMUX('B', 9, AF7)>; /* SDMMC1_CDIR */
121*724ba675SRob Herring			slew-rate = <3>;
122*724ba675SRob Herring			drive-push-pull;
123*724ba675SRob Herring			bias-pull-up;
124*724ba675SRob Herring		};
125*724ba675SRob Herring		pins2 {
126*724ba675SRob Herring			pinmux = <STM32_PINMUX('B', 8, AF7)>; /* SDMMC1_CKIN */
127*724ba675SRob Herring			bias-pull-up;
128*724ba675SRob Herring		};
129*724ba675SRob Herring	};
130*724ba675SRob Herring
131*724ba675SRob Herring	sdmmc1_dir_sleep_pins_a: sdmmc1-dir-sleep-0 {
132*724ba675SRob Herring		pins {
133*724ba675SRob Herring			pinmux = <STM32_PINMUX('C', 6, ANALOG)>, /* SDMMC1_D0DIR */
134*724ba675SRob Herring				 <STM32_PINMUX('C', 7, ANALOG)>, /* SDMMC1_D123DIR */
135*724ba675SRob Herring				 <STM32_PINMUX('B', 9, ANALOG)>, /* SDMMC1_CDIR */
136*724ba675SRob Herring				 <STM32_PINMUX('B', 8, ANALOG)>; /* SDMMC1_CKIN */
137*724ba675SRob Herring		};
138*724ba675SRob Herring	};
139*724ba675SRob Herring
140*724ba675SRob Herring	sdmmc2_b4_pins_a: sdmmc2-b4-0 {
141*724ba675SRob Herring		pins {
142*724ba675SRob Herring			pinmux = <STM32_PINMUX('B', 14, AF9)>, /* SDMMC1_D0 */
143*724ba675SRob Herring				 <STM32_PINMUX('B', 15, AF9)>, /* SDMMC1_D1 */
144*724ba675SRob Herring				 <STM32_PINMUX('B', 3, AF9)>, /* SDMMC1_D2 */
145*724ba675SRob Herring				 <STM32_PINMUX('B', 4, AF9)>, /* SDMMC1_D3 */
146*724ba675SRob Herring				 <STM32_PINMUX('D', 6, AF11)>, /* SDMMC1_CK */
147*724ba675SRob Herring				 <STM32_PINMUX('D', 7, AF11)>; /* SDMMC1_CMD */
148*724ba675SRob Herring			slew-rate = <3>;
149*724ba675SRob Herring			drive-push-pull;
150*724ba675SRob Herring			bias-disable;
151*724ba675SRob Herring		};
152*724ba675SRob Herring	};
153*724ba675SRob Herring
154*724ba675SRob Herring	sdmmc2_b4_od_pins_a: sdmmc2-b4-od-0 {
155*724ba675SRob Herring		pins1 {
156*724ba675SRob Herring			pinmux = <STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */
157*724ba675SRob Herring				 <STM32_PINMUX('B', 15, AF9)>, /* SDMMC1_D1 */
158*724ba675SRob Herring				 <STM32_PINMUX('B', 3, AF9)>, /* SDMMC1_D2 */
159*724ba675SRob Herring				 <STM32_PINMUX('B', 4, AF9)>, /* SDMMC1_D3 */
160*724ba675SRob Herring				 <STM32_PINMUX('D', 6, AF11)>; /* SDMMC1_CK */
161*724ba675SRob Herring			slew-rate = <3>;
162*724ba675SRob Herring			drive-push-pull;
163*724ba675SRob Herring			bias-disable;
164*724ba675SRob Herring		};
165*724ba675SRob Herring		pins2 {
166*724ba675SRob Herring			pinmux = <STM32_PINMUX('D', 7, AF11)>; /* SDMMC1_CMD */
167*724ba675SRob Herring			slew-rate = <3>;
168*724ba675SRob Herring			drive-open-drain;
169*724ba675SRob Herring			bias-disable;
170*724ba675SRob Herring		};
171*724ba675SRob Herring	};
172*724ba675SRob Herring
173*724ba675SRob Herring	sdmmc2_b4_sleep_pins_a: sdmmc2-b4-sleep-0 {
174*724ba675SRob Herring		pins {
175*724ba675SRob Herring			pinmux = <STM32_PINMUX('B', 14, ANALOG)>, /* SDMMC1_D0 */
176*724ba675SRob Herring				 <STM32_PINMUX('B', 15, ANALOG)>, /* SDMMC1_D1 */
177*724ba675SRob Herring				 <STM32_PINMUX('B', 3, ANALOG)>, /* SDMMC1_D2 */
178*724ba675SRob Herring				 <STM32_PINMUX('B', 4, ANALOG)>, /* SDMMC1_D3 */
179*724ba675SRob Herring				 <STM32_PINMUX('D', 6, ANALOG)>, /* SDMMC1_CK */
180*724ba675SRob Herring				 <STM32_PINMUX('D', 7, ANALOG)>; /* SDMMC1_CMD */
181*724ba675SRob Herring		};
182*724ba675SRob Herring	};
183*724ba675SRob Herring
184*724ba675SRob Herring	spi1_pins: spi1-0 {
185*724ba675SRob Herring		pins1 {
186*724ba675SRob Herring			pinmux = <STM32_PINMUX('A', 5, AF5)>,
187*724ba675SRob Herring				/* SPI1_CLK */
188*724ba675SRob Herring				 <STM32_PINMUX('B', 5, AF5)>;
189*724ba675SRob Herring				/* SPI1_MOSI */
190*724ba675SRob Herring			bias-disable;
191*724ba675SRob Herring			drive-push-pull;
192*724ba675SRob Herring			slew-rate = <2>;
193*724ba675SRob Herring		};
194*724ba675SRob Herring		pins2 {
195*724ba675SRob Herring			pinmux = <STM32_PINMUX('G', 9, AF5)>;
196*724ba675SRob Herring				/* SPI1_MISO */
197*724ba675SRob Herring			bias-disable;
198*724ba675SRob Herring		};
199*724ba675SRob Herring	};
200*724ba675SRob Herring
201*724ba675SRob Herring	uart4_pins: uart4-0 {
202*724ba675SRob Herring		pins1 {
203*724ba675SRob Herring			pinmux = <STM32_PINMUX('A', 0, AF8)>; /* UART4_TX */
204*724ba675SRob Herring			bias-disable;
205*724ba675SRob Herring			drive-push-pull;
206*724ba675SRob Herring			slew-rate = <0>;
207*724ba675SRob Herring		};
208*724ba675SRob Herring		pins2 {
209*724ba675SRob Herring			pinmux = <STM32_PINMUX('I', 9, AF8)>; /* UART4_RX */
210*724ba675SRob Herring			bias-disable;
211*724ba675SRob Herring		};
212*724ba675SRob Herring	};
213*724ba675SRob Herring
214*724ba675SRob Herring	usart1_pins: usart1-0 {
215*724ba675SRob Herring		pins1 {
216*724ba675SRob Herring			pinmux = <STM32_PINMUX('B', 14, AF4)>; /* USART1_TX */
217*724ba675SRob Herring			bias-disable;
218*724ba675SRob Herring			drive-push-pull;
219*724ba675SRob Herring			slew-rate = <0>;
220*724ba675SRob Herring		};
221*724ba675SRob Herring		pins2 {
222*724ba675SRob Herring			pinmux = <STM32_PINMUX('B', 15, AF4)>; /* USART1_RX */
223*724ba675SRob Herring			bias-disable;
224*724ba675SRob Herring		};
225*724ba675SRob Herring	};
226*724ba675SRob Herring
227*724ba675SRob Herring	usart2_pins: usart2-0 {
228*724ba675SRob Herring		pins1 {
229*724ba675SRob Herring			pinmux = <STM32_PINMUX('D', 5, AF7)>; /* USART2_TX */
230*724ba675SRob Herring			bias-disable;
231*724ba675SRob Herring			drive-push-pull;
232*724ba675SRob Herring			slew-rate = <0>;
233*724ba675SRob Herring		};
234*724ba675SRob Herring		pins2 {
235*724ba675SRob Herring			pinmux = <STM32_PINMUX('D', 6, AF7)>; /* USART2_RX */
236*724ba675SRob Herring			bias-disable;
237*724ba675SRob Herring		};
238*724ba675SRob Herring	};
239*724ba675SRob Herring
240*724ba675SRob Herring	usart3_pins: usart3-0 {
241*724ba675SRob Herring		pins1 {
242*724ba675SRob Herring			pinmux = <STM32_PINMUX('B', 10, AF7)>, /* USART3_TX */
243*724ba675SRob Herring				 <STM32_PINMUX('D', 12, AF7)>; /* USART3_RTS_DE */
244*724ba675SRob Herring			bias-disable;
245*724ba675SRob Herring			drive-push-pull;
246*724ba675SRob Herring			slew-rate = <0>;
247*724ba675SRob Herring		};
248*724ba675SRob Herring		pins2 {
249*724ba675SRob Herring			pinmux = <STM32_PINMUX('B', 11, AF7)>, /* USART3_RX */
250*724ba675SRob Herring				 <STM32_PINMUX('D', 11, AF7)>; /* USART3_CTS_NSS */
251*724ba675SRob Herring			bias-disable;
252*724ba675SRob Herring		};
253*724ba675SRob Herring	};
254*724ba675SRob Herring
255*724ba675SRob Herring	usbotg_hs_pins_a: usbotg-hs-0 {
256*724ba675SRob Herring		pins {
257*724ba675SRob Herring			pinmux = <STM32_PINMUX('H', 4, AF10)>,	/* ULPI_NXT */
258*724ba675SRob Herring					 <STM32_PINMUX('I', 11, AF10)>, /* ULPI_DIR> */
259*724ba675SRob Herring					 <STM32_PINMUX('C', 0, AF10)>,	/* ULPI_STP> */
260*724ba675SRob Herring					 <STM32_PINMUX('A', 5, AF10)>,	/* ULPI_CK> */
261*724ba675SRob Herring					 <STM32_PINMUX('A', 3, AF10)>,	/* ULPI_D0> */
262*724ba675SRob Herring					 <STM32_PINMUX('B', 0, AF10)>,	/* ULPI_D1> */
263*724ba675SRob Herring					 <STM32_PINMUX('B', 1, AF10)>,	/* ULPI_D2> */
264*724ba675SRob Herring					 <STM32_PINMUX('B', 10, AF10)>, /* ULPI_D3> */
265*724ba675SRob Herring					 <STM32_PINMUX('B', 11, AF10)>, /* ULPI_D4> */
266*724ba675SRob Herring					 <STM32_PINMUX('B', 12, AF10)>, /* ULPI_D5> */
267*724ba675SRob Herring					 <STM32_PINMUX('B', 13, AF10)>, /* ULPI_D6> */
268*724ba675SRob Herring					 <STM32_PINMUX('B', 5, AF10)>;	/* ULPI_D7> */
269*724ba675SRob Herring			bias-disable;
270*724ba675SRob Herring			drive-push-pull;
271*724ba675SRob Herring			slew-rate = <2>;
272*724ba675SRob Herring		};
273*724ba675SRob Herring	};
274*724ba675SRob Herring};
275*724ba675SRob Herring
276