stm32mp157-pinctrl.dtsi 8.11 KB
Newer Older
Yann Gautier's avatar
Yann Gautier committed
1
2
3
4
5
6
// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
/*
 * Copyright (C) STMicroelectronics 2017 - All Rights Reserved
 * Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.
 */
#include <dt-bindings/pinctrl/stm32-pinfunc.h>
7

Yann Gautier's avatar
Yann Gautier committed
8
9
/ {
	soc {
10
		pinctrl: pin-controller@50002000 {
Yann Gautier's avatar
Yann Gautier committed
11
12
			#address-cells = <1>;
			#size-cells = <1>;
13
			compatible = "st,stm32mp157-pinctrl";
Yann Gautier's avatar
Yann Gautier committed
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
			ranges = <0 0x50002000 0xa400>;
			pins-are-numbered;

			gpioa: gpio@50002000 {
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
				reg = <0x0 0x400>;
				clocks = <&rcc GPIOA>;
				st,bank-name = "GPIOA";
				status = "disabled";
			};

			gpiob: gpio@50003000 {
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
				reg = <0x1000 0x400>;
				clocks = <&rcc GPIOB>;
				st,bank-name = "GPIOB";
				status = "disabled";
			};

			gpioc: gpio@50004000 {
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
				reg = <0x2000 0x400>;
				clocks = <&rcc GPIOC>;
				st,bank-name = "GPIOC";
				status = "disabled";
			};

			gpiod: gpio@50005000 {
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
				reg = <0x3000 0x400>;
				clocks = <&rcc GPIOD>;
				st,bank-name = "GPIOD";
				status = "disabled";
			};

			gpioe: gpio@50006000 {
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
				reg = <0x4000 0x400>;
				clocks = <&rcc GPIOE>;
				st,bank-name = "GPIOE";
				status = "disabled";
			};

			gpiof: gpio@50007000 {
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
				reg = <0x5000 0x400>;
				clocks = <&rcc GPIOF>;
				st,bank-name = "GPIOF";
				status = "disabled";
			};

			gpiog: gpio@50008000 {
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
				reg = <0x6000 0x400>;
				clocks = <&rcc GPIOG>;
				st,bank-name = "GPIOG";
				status = "disabled";
			};

			gpioh: gpio@50009000 {
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
				reg = <0x7000 0x400>;
				clocks = <&rcc GPIOH>;
				st,bank-name = "GPIOH";
				status = "disabled";
			};

			gpioi: gpio@5000a000 {
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
				reg = <0x8000 0x400>;
				clocks = <&rcc GPIOI>;
				st,bank-name = "GPIOI";
				status = "disabled";
			};

			gpioj: gpio@5000b000 {
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
				reg = <0x9000 0x400>;
				clocks = <&rcc GPIOJ>;
				st,bank-name = "GPIOJ";
				status = "disabled";
			};

			gpiok: gpio@5000c000 {
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
				reg = <0xa000 0x400>;
				clocks = <&rcc GPIOK>;
				st,bank-name = "GPIOK";
				status = "disabled";
			};

138
			qspi_bk1_pins_a: qspi-bk1-0 {
Yann Gautier's avatar
Yann Gautier committed
139
				pins1 {
140
141
142
143
					pinmux = <STM32_PINMUX('F', 8, AF10)>, /* QSPI_BK1_IO0 */
						 <STM32_PINMUX('F', 9, AF10)>, /* QSPI_BK1_IO1 */
						 <STM32_PINMUX('F', 7, AF9)>, /* QSPI_BK1_IO2 */
						 <STM32_PINMUX('F', 6, AF9)>; /* QSPI_BK1_IO3 */
Yann Gautier's avatar
Yann Gautier committed
144
145
					bias-disable;
					drive-push-pull;
146
					slew-rate = <1>;
Yann Gautier's avatar
Yann Gautier committed
147
148
				};
				pins2 {
149
150
151
152
					pinmux = <STM32_PINMUX('B', 6, AF10)>; /* QSPI_BK1_NCS */
					bias-pull-up;
					drive-push-pull;
					slew-rate = <1>;
Yann Gautier's avatar
Yann Gautier committed
153
154
155
				};
			};

156
			qspi_bk2_pins_a: qspi-bk2-0 {
Yann Gautier's avatar
Yann Gautier committed
157
				pins1 {
158
159
160
161
					pinmux = <STM32_PINMUX('H', 2, AF9)>, /* QSPI_BK2_IO0 */
						 <STM32_PINMUX('H', 3, AF9)>, /* QSPI_BK2_IO1 */
						 <STM32_PINMUX('G', 10, AF11)>, /* QSPI_BK2_IO2 */
						 <STM32_PINMUX('G', 7, AF11)>; /* QSPI_BK2_IO3 */
Yann Gautier's avatar
Yann Gautier committed
162
163
					bias-disable;
					drive-push-pull;
164
					slew-rate = <1>;
Yann Gautier's avatar
Yann Gautier committed
165
166
				};
				pins2 {
167
168
169
170
					pinmux = <STM32_PINMUX('C', 0, AF10)>; /* QSPI_BK2_NCS */
					bias-pull-up;
					drive-push-pull;
					slew-rate = <1>;
Yann Gautier's avatar
Yann Gautier committed
171
172
173
				};
			};

174
			qspi_clk_pins_a: qspi-clk-0 {
Yann Gautier's avatar
Yann Gautier committed
175
				pins {
176
177
178
179
180
181
182
183
184
					pinmux = <STM32_PINMUX('F', 10, AF9)>; /* QSPI_CLK */
					bias-disable;
					drive-push-pull;
					slew-rate = <3>;
				};
			};

			sdmmc1_b4_pins_a: sdmmc1-b4-0 {
				pins1 {
Yann Gautier's avatar
Yann Gautier committed
185
186
187
188
189
					pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1_D0 */
						 <STM32_PINMUX('C', 9, AF12)>, /* SDMMC1_D1 */
						 <STM32_PINMUX('C', 10, AF12)>, /* SDMMC1_D2 */
						 <STM32_PINMUX('C', 11, AF12)>, /* SDMMC1_D3 */
						 <STM32_PINMUX('D', 2, AF12)>; /* SDMMC1_CMD */
190
191
192
193
194
195
196
					slew-rate = <1>;
					drive-push-pull;
					bias-disable;
				};
				pins2 {
					pinmux = <STM32_PINMUX('C', 12, AF12)>; /* SDMMC1_CK */
					slew-rate = <2>;
Yann Gautier's avatar
Yann Gautier committed
197
198
199
200
201
					drive-push-pull;
					bias-disable;
				};
			};

202
			sdmmc1_dir_pins_a: sdmmc1-dir-0 {
Yann Gautier's avatar
Yann Gautier committed
203
204
205
206
				pins1 {
					pinmux = <STM32_PINMUX('F', 2, AF11)>, /* SDMMC1_D0DIR */
						 <STM32_PINMUX('C', 7, AF8)>, /* SDMMC1_D123DIR */
						 <STM32_PINMUX('B', 9, AF11)>; /* SDMMC1_CDIR */
207
					slew-rate = <1>;
Yann Gautier's avatar
Yann Gautier committed
208
209
210
211
212
213
214
215
216
					drive-push-pull;
					bias-pull-up;
				};
				pins2{
					pinmux = <STM32_PINMUX('E', 4, AF8)>; /* SDMMC1_CKIN */
					bias-pull-up;
				};
			};

217
218
			sdmmc2_b4_pins_a: sdmmc2-b4-0 {
				pins1 {
Yann Gautier's avatar
Yann Gautier committed
219
220
221
222
223
					pinmux = <STM32_PINMUX('B', 14, AF9)>, /* SDMMC2_D0 */
						 <STM32_PINMUX('B', 15, AF9)>, /* SDMMC2_D1 */
						 <STM32_PINMUX('B', 3, AF9)>, /* SDMMC2_D2 */
						 <STM32_PINMUX('B', 4, AF9)>, /* SDMMC2_D3 */
						 <STM32_PINMUX('G', 6, AF10)>; /* SDMMC2_CMD */
224
225
226
227
228
229
230
					slew-rate = <1>;
					drive-push-pull;
					bias-pull-up;
				};
				pins2 {
					pinmux = <STM32_PINMUX('E', 3, AF9)>; /* SDMMC2_CK */
					slew-rate = <2>;
Yann Gautier's avatar
Yann Gautier committed
231
232
233
234
235
					drive-push-pull;
					bias-pull-up;
				};
			};

236
			sdmmc2_d47_pins_a: sdmmc2-d47-0 {
Yann Gautier's avatar
Yann Gautier committed
237
238
239
240
241
				pins {
					pinmux = <STM32_PINMUX('A', 8, AF9)>, /* SDMMC2_D4 */
						 <STM32_PINMUX('A', 9, AF10)>, /* SDMMC2_D5 */
						 <STM32_PINMUX('E', 5, AF9)>, /* SDMMC2_D6 */
						 <STM32_PINMUX('D', 3, AF9)>; /* SDMMC2_D7 */
242
					slew-rate = <1>;
Yann Gautier's avatar
Yann Gautier committed
243
244
245
246
					drive-push-pull;
					bias-pull-up;
				};
			};
247
248
249
250
251
252
253
254
255
256
257
258
259
260

			uart4_pins_a: uart4-0 {
				pins1 {
					pinmux = <STM32_PINMUX('G', 11, AF6)>; /* UART4_TX */
					bias-disable;
					drive-push-pull;
					slew-rate = <0>;
				};
				pins2 {
					pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
					bias-disable;
				};
			};

261
262
263
264
265
266
267
268
269
270
271
272
273
			uart4_pins_b: uart4-1 {
				pins1 {
					pinmux = <STM32_PINMUX('D', 1, AF8)>; /* UART4_TX */
					bias-disable;
					drive-push-pull;
					slew-rate = <0>;
				};
				pins2 {
					pinmux = <STM32_PINMUX('B', 2, AF8)>; /* UART4_RX */
					bias-disable;
				};
			};

274
275
276
277
278
279
280
281
282
283
284
285
286
			uart7_pins_a: uart7-0 {
				pins1 {
					pinmux = <STM32_PINMUX('E', 8, AF7)>; /* USART7_TX */
					bias-disable;
					drive-push-pull;
					slew-rate = <0>;
				};
				pins2 {
					pinmux = <STM32_PINMUX('E', 7, AF7)>; /* USART7_RX */
					bias-disable;
				};
			};

287
288
289
290
291
292
293
294
295
296
297
298
299
300
			usart3_pins_a: usart3-0 {
				pins1 {
					pinmux = <STM32_PINMUX('B', 10, AF7)>, /* USART3_TX */
						 <STM32_PINMUX('G', 8, AF8)>; /* USART3_RTS */
					bias-disable;
					drive-push-pull;
					slew-rate = <0>;
				};
				pins2 {
					pinmux = <STM32_PINMUX('B', 12, AF8)>, /* USART3_RX */
						 <STM32_PINMUX('I', 10, AF8)>; /* USART3_CTS_NSS */
					bias-disable;
				};
			};
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315

			usart3_pins_b: usart3-1 {
				pins1 {
					pinmux = <STM32_PINMUX('B', 10, AF7)>, /* USART3_TX */
						 <STM32_PINMUX('G', 8, AF8)>; /* USART3_RTS */
					bias-disable;
					drive-push-pull;
					slew-rate = <0>;
				};
				pins2 {
					pinmux = <STM32_PINMUX('B', 12, AF8)>, /* USART3_RX */
						 <STM32_PINMUX('B', 13, AF7)>; /* USART3_CTS_NSS */
					bias-disable;
				};
			};
Yann Gautier's avatar
Yann Gautier committed
316
317
		};

318
		pinctrl_z: pin-controller-z@54004000 {
Yann Gautier's avatar
Yann Gautier committed
319
320
			#address-cells = <1>;
			#size-cells = <1>;
321
			compatible = "st,stm32mp157-z-pinctrl";
Yann Gautier's avatar
Yann Gautier committed
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
			ranges = <0 0x54004000 0x400>;
			pins-are-numbered;

			gpioz: gpio@54004000 {
				gpio-controller;
				#gpio-cells = <2>;
				interrupt-controller;
				#interrupt-cells = <2>;
				reg = <0 0x400>;
				clocks = <&rcc GPIOZ>;
				st,bank-name = "GPIOZ";
				st,bank-ioport = <11>;
				status = "disabled";
			};

337
			i2c4_pins_a: i2c4-0 {
Yann Gautier's avatar
Yann Gautier committed
338
339
340
341
342
343
344
345
346
347
348
				pins {
					pinmux = <STM32_PINMUX('Z', 4, AF6)>, /* I2C4_SCL */
						 <STM32_PINMUX('Z', 5, AF6)>; /* I2C4_SDA */
					bias-disable;
					drive-open-drain;
					slew-rate = <0>;
				};
			};
		};
	};
};