2 * Copyright (C) 2014 STMicroelectronics Limited.
3 * Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * publishhed by the Free Software Foundation.
10 #include <dt-bindings/interrupt-controller/arm-gic.h>
21 /* 10-19: PIO_FRONT0 */
41 /* 40-42: PIO_FLASH */
51 compatible = "st,stih407-sbc-pinctrl";
52 st,syscfg = <&syscfg_sbc>;
53 reg = <0x0961f080 0x4>;
55 interrupts = <GIC_SPI 188 IRQ_TYPE_NONE>;
56 interrupts-names = "irqmux";
57 ranges = <0 0x09610000 0x6000>;
63 #interrupt-cells = <2>;
65 st,bank-name = "PIO0";
71 #interrupt-cells = <2>;
73 st,bank-name = "PIO1";
79 #interrupt-cells = <2>;
81 st,bank-name = "PIO2";
87 #interrupt-cells = <2>;
89 st,bank-name = "PIO3";
95 #interrupt-cells = <2>;
97 st,bank-name = "PIO4";
100 pio5: gpio@09615000 {
103 interrupt-controller;
104 #interrupt-cells = <2>;
105 reg = <0x5000 0x100>;
106 st,bank-name = "PIO5";
107 st,retime-pin-mask = <0x3f>;
113 ir = <&pio4 0 ALT2 IN>;
118 /* SBC_ASC0 - UART10 */
120 pinctrl_sbc_serial0: sbc_serial0-0 {
122 tx = <&pio3 4 ALT1 OUT>;
123 rx = <&pio3 5 ALT1 IN>;
127 /* SBC_ASC1 - UART11 */
129 pinctrl_sbc_serial1: sbc_serial1-0 {
131 tx = <&pio2 6 ALT3 OUT>;
132 rx = <&pio2 7 ALT3 IN>;
138 pinctrl_i2c10_default: i2c10-default {
140 sda = <&pio4 6 ALT1 BIDIR>;
141 scl = <&pio4 5 ALT1 BIDIR>;
147 pinctrl_i2c11_default: i2c11-default {
149 sda = <&pio5 1 ALT1 BIDIR>;
150 scl = <&pio5 0 ALT1 BIDIR>;
156 pinctrl_keyscan: keyscan {
158 keyin0 = <&pio4 0 ALT6 IN>;
159 keyin1 = <&pio4 5 ALT4 IN>;
160 keyin2 = <&pio0 4 ALT2 IN>;
161 keyin3 = <&pio2 6 ALT2 IN>;
163 keyout0 = <&pio4 6 ALT4 OUT>;
164 keyout1 = <&pio1 7 ALT2 OUT>;
165 keyout2 = <&pio0 6 ALT2 OUT>;
166 keyout3 = <&pio2 7 ALT2 OUT>;
173 * Almost all the boards based on STiH407 SoC have an embedded
174 * switch where the mdio/mdc have been used for managing the SMI
175 * iface via I2C. For this reason these lines can be allocated
176 * by using dedicated configuration (in case of there will be a
177 * standard PHY transceiver on-board).
179 pinctrl_rgmii1: rgmii1-0 {
182 txd0 = <&pio0 0 ALT1 OUT DE_IO 0 CLK_A>;
183 txd1 = <&pio0 1 ALT1 OUT DE_IO 0 CLK_A>;
184 txd2 = <&pio0 2 ALT1 OUT DE_IO 0 CLK_A>;
185 txd3 = <&pio0 3 ALT1 OUT DE_IO 0 CLK_A>;
186 txen = <&pio0 5 ALT1 OUT DE_IO 0 CLK_A>;
187 txclk = <&pio0 6 ALT1 IN NICLK 0 CLK_A>;
188 rxd0 = <&pio1 4 ALT1 IN DE_IO 0 CLK_A>;
189 rxd1 = <&pio1 5 ALT1 IN DE_IO 0 CLK_A>;
190 rxd2 = <&pio1 6 ALT1 IN DE_IO 0 CLK_A>;
191 rxd3 = <&pio1 7 ALT1 IN DE_IO 0 CLK_A>;
192 rxdv = <&pio2 0 ALT1 IN DE_IO 0 CLK_A>;
193 rxclk = <&pio2 2 ALT1 IN NICLK 500 CLK_A>;
194 clk125 = <&pio3 7 ALT4 IN NICLK 0 CLK_A>;
195 phyclk = <&pio2 3 ALT4 OUT NICLK 1750 CLK_B>;
199 pinctrl_rgmii1_mdio: rgmii1-mdio {
201 mdio = <&pio1 0 ALT1 OUT BYPASS 0>;
202 mdc = <&pio1 1 ALT1 OUT NICLK 0 CLK_A>;
203 mdint = <&pio1 3 ALT1 IN BYPASS 0>;
209 txd0 = <&pio0 0 ALT1 OUT SE_NICLK_IO 0 CLK_A>;
210 txd1 = <&pio0 1 ALT1 OUT SE_NICLK_IO 0 CLK_A>;
211 txd2 = <&pio0 2 ALT1 OUT SE_NICLK_IO 0 CLK_A>;
212 txd3 = <&pio0 3 ALT1 OUT SE_NICLK_IO 0 CLK_A>;
213 txer = <&pio0 4 ALT1 OUT SE_NICLK_IO 0 CLK_A>;
214 txen = <&pio0 5 ALT1 OUT SE_NICLK_IO 0 CLK_A>;
215 txclk = <&pio0 6 ALT1 IN NICLK 0 CLK_A>;
216 col = <&pio0 7 ALT1 IN BYPASS 1000>;
218 mdio = <&pio1 0 ALT1 OUT BYPASS 1500>;
219 mdc = <&pio1 1 ALT1 OUT NICLK 0 CLK_A>;
220 crs = <&pio1 2 ALT1 IN BYPASS 1000>;
221 mdint = <&pio1 3 ALT1 IN BYPASS 0>;
222 rxd0 = <&pio1 4 ALT1 IN SE_NICLK_IO 0 CLK_A>;
223 rxd1 = <&pio1 5 ALT1 IN SE_NICLK_IO 0 CLK_A>;
224 rxd2 = <&pio1 6 ALT1 IN SE_NICLK_IO 0 CLK_A>;
225 rxd3 = <&pio1 7 ALT1 IN SE_NICLK_IO 0 CLK_A>;
227 rxdv = <&pio2 0 ALT1 IN SE_NICLK_IO 0 CLK_A>;
228 rx_er = <&pio2 1 ALT1 IN SE_NICLK_IO 0 CLK_A>;
229 rxclk = <&pio2 2 ALT1 IN NICLK 0 CLK_A>;
230 phyclk = <&pio2 3 ALT1 OUT NICLK 0 CLK_A>;
236 pinctrl_pwm1_chan0_default: pwm1-0-default {
238 pwm-out = <&pio3 0 ALT1 OUT>;
241 pinctrl_pwm1_chan1_default: pwm1-1-default {
243 pwm-out = <&pio4 4 ALT1 OUT>;
246 pinctrl_pwm1_chan2_default: pwm1-2-default {
248 pwm-out = <&pio4 6 ALT3 OUT>;
251 pinctrl_pwm1_chan3_default: pwm1-3-default {
253 pwm-out = <&pio4 7 ALT3 OUT>;
259 pin-controller-front0 {
260 #address-cells = <1>;
262 compatible = "st,stih407-front-pinctrl";
263 st,syscfg = <&syscfg_front>;
264 reg = <0x0920f080 0x4>;
265 reg-names = "irqmux";
266 interrupts = <GIC_SPI 189 IRQ_TYPE_NONE>;
267 interrupts-names = "irqmux";
268 ranges = <0 0x09200000 0x10000>;
270 pio10: pio@09200000 {
273 interrupt-controller;
274 #interrupt-cells = <2>;
276 st,bank-name = "PIO10";
278 pio11: pio@09201000 {
281 interrupt-controller;
282 #interrupt-cells = <2>;
283 reg = <0x1000 0x100>;
284 st,bank-name = "PIO11";
286 pio12: pio@09202000 {
289 interrupt-controller;
290 #interrupt-cells = <2>;
291 reg = <0x2000 0x100>;
292 st,bank-name = "PIO12";
294 pio13: pio@09203000 {
297 interrupt-controller;
298 #interrupt-cells = <2>;
299 reg = <0x3000 0x100>;
300 st,bank-name = "PIO13";
302 pio14: pio@09204000 {
305 interrupt-controller;
306 #interrupt-cells = <2>;
307 reg = <0x4000 0x100>;
308 st,bank-name = "PIO14";
310 pio15: pio@09205000 {
313 interrupt-controller;
314 #interrupt-cells = <2>;
315 reg = <0x5000 0x100>;
316 st,bank-name = "PIO15";
318 pio16: pio@09206000 {
321 interrupt-controller;
322 #interrupt-cells = <2>;
323 reg = <0x6000 0x100>;
324 st,bank-name = "PIO16";
326 pio17: pio@09207000 {
329 interrupt-controller;
330 #interrupt-cells = <2>;
331 reg = <0x7000 0x100>;
332 st,bank-name = "PIO17";
334 pio18: pio@09208000 {
337 interrupt-controller;
338 #interrupt-cells = <2>;
339 reg = <0x8000 0x100>;
340 st,bank-name = "PIO18";
342 pio19: pio@09209000 {
345 interrupt-controller;
346 #interrupt-cells = <2>;
347 reg = <0x9000 0x100>;
348 st,bank-name = "PIO19";
353 pinctrl_serial0: serial0-0 {
355 tx = <&pio17 0 ALT1 OUT>;
356 rx = <&pio17 1 ALT1 IN>;
362 pinctrl_serial1: serial1-0 {
364 tx = <&pio16 0 ALT1 OUT>;
365 rx = <&pio16 1 ALT1 IN>;
371 pinctrl_serial2: serial2-0 {
373 tx = <&pio15 0 ALT1 OUT>;
374 rx = <&pio15 1 ALT1 IN>;
382 sd_clk = <&pio19 3 ALT5 BIDIR NICLK 0 CLK_B>;
383 sd_cmd = <&pio19 2 ALT5 BIDIR_PU BYPASS 0>;
384 sd_dat0 = <&pio19 4 ALT5 BIDIR_PU BYPASS 0>;
385 sd_dat1 = <&pio19 5 ALT5 BIDIR_PU BYPASS 0>;
386 sd_dat2 = <&pio19 6 ALT5 BIDIR_PU BYPASS 0>;
387 sd_dat3 = <&pio19 7 ALT5 BIDIR_PU BYPASS 0>;
388 sd_led = <&pio16 6 ALT6 OUT>;
389 sd_pwren = <&pio16 7 ALT6 OUT>;
390 sd_cd = <&pio19 0 ALT6 IN>;
391 sd_wp = <&pio19 1 ALT6 IN>;
398 pinctrl_i2c0_default: i2c0-default {
400 sda = <&pio10 6 ALT2 BIDIR>;
401 scl = <&pio10 5 ALT2 BIDIR>;
407 pinctrl_i2c1_default: i2c1-default {
409 sda = <&pio11 1 ALT2 BIDIR>;
410 scl = <&pio11 0 ALT2 BIDIR>;
416 pinctrl_i2c2_default: i2c2-default {
418 sda = <&pio15 6 ALT2 BIDIR>;
419 scl = <&pio15 5 ALT2 BIDIR>;
425 pinctrl_i2c3_default: i2c3-default {
427 sda = <&pio18 6 ALT1 BIDIR>;
428 scl = <&pio18 5 ALT1 BIDIR>;
434 pinctrl_spi0_default: spi0-default {
436 mtsr = <&pio12 6 ALT2 BIDIR>;
437 mrst = <&pio12 7 ALT2 BIDIR>;
438 scl = <&pio12 5 ALT2 BIDIR>;
444 pin-controller-front1 {
445 #address-cells = <1>;
447 compatible = "st,stih407-front-pinctrl";
448 st,syscfg = <&syscfg_front>;
449 reg = <0x0921f080 0x4>;
450 reg-names = "irqmux";
451 interrupts = <GIC_SPI 190 IRQ_TYPE_NONE>;
452 interrupts-names = "irqmux";
453 ranges = <0 0x09210000 0x10000>;
455 pio20: pio@09210000 {
458 interrupt-controller;
459 #interrupt-cells = <2>;
461 st,bank-name = "PIO20";
465 pin-controller-rear {
466 #address-cells = <1>;
468 compatible = "st,stih407-rear-pinctrl";
469 st,syscfg = <&syscfg_rear>;
470 reg = <0x0922f080 0x4>;
471 reg-names = "irqmux";
472 interrupts = <GIC_SPI 191 IRQ_TYPE_NONE>;
473 interrupts-names = "irqmux";
474 ranges = <0 0x09220000 0x6000>;
476 pio30: gpio@09220000 {
479 interrupt-controller;
480 #interrupt-cells = <2>;
482 st,bank-name = "PIO30";
484 pio31: gpio@09221000 {
487 interrupt-controller;
488 #interrupt-cells = <2>;
489 reg = <0x1000 0x100>;
490 st,bank-name = "PIO31";
492 pio32: gpio@09222000 {
495 interrupt-controller;
496 #interrupt-cells = <2>;
497 reg = <0x2000 0x100>;
498 st,bank-name = "PIO32";
500 pio33: gpio@09223000 {
503 interrupt-controller;
504 #interrupt-cells = <2>;
505 reg = <0x3000 0x100>;
506 st,bank-name = "PIO33";
508 pio34: gpio@09224000 {
511 interrupt-controller;
512 #interrupt-cells = <2>;
513 reg = <0x4000 0x100>;
514 st,bank-name = "PIO34";
516 pio35: gpio@09225000 {
519 interrupt-controller;
520 #interrupt-cells = <2>;
521 reg = <0x5000 0x100>;
522 st,bank-name = "PIO35";
523 st,retime-pin-mask = <0x7f>;
527 pinctrl_i2c4_default: i2c4-default {
529 sda = <&pio30 1 ALT1 BIDIR>;
530 scl = <&pio30 0 ALT1 BIDIR>;
536 pinctrl_i2c5_default: i2c5-default {
538 sda = <&pio34 4 ALT1 BIDIR>;
539 scl = <&pio34 3 ALT1 BIDIR>;
545 pinctrl_usb3: usb3-2 {
547 usb-oc-detect = <&pio35 4 ALT1 IN>;
548 usb-pwr-enable = <&pio35 5 ALT1 OUT>;
549 usb-vbus-valid = <&pio35 6 ALT1 IN>;
555 pinctrl_pwm0_chan0_default: pwm0-0-default {
557 pwm-out = <&pio31 1 ALT1 OUT>;
563 pin-controller-flash {
564 #address-cells = <1>;
566 compatible = "st,stih407-flash-pinctrl";
567 st,syscfg = <&syscfg_flash>;
568 reg = <0x0923f080 0x4>;
569 reg-names = "irqmux";
570 interrupts = <GIC_SPI 192 IRQ_TYPE_NONE>;
571 interrupts-names = "irqmux";
572 ranges = <0 0x09230000 0x3000>;
574 pio40: gpio@09230000 {
577 interrupt-controller;
578 #interrupt-cells = <2>;
580 st,bank-name = "PIO40";
582 pio41: gpio@09231000 {
585 interrupt-controller;
586 #interrupt-cells = <2>;
587 reg = <0x1000 0x100>;
588 st,bank-name = "PIO41";
590 pio42: gpio@09232000 {
593 interrupt-controller;
594 #interrupt-cells = <2>;
595 reg = <0x2000 0x100>;
596 st,bank-name = "PIO42";
600 pinctrl_mmc0: mmc0-0 {
602 emmc_clk = <&pio40 6 ALT1 BIDIR>;
603 emmc_cmd = <&pio40 7 ALT1 BIDIR_PU>;
604 emmc_d0 = <&pio41 0 ALT1 BIDIR_PU>;
605 emmc_d1 = <&pio41 1 ALT1 BIDIR_PU>;
606 emmc_d2 = <&pio41 2 ALT1 BIDIR_PU>;
607 emmc_d3 = <&pio41 3 ALT1 BIDIR_PU>;
608 emmc_d4 = <&pio41 4 ALT1 BIDIR_PU>;
609 emmc_d5 = <&pio41 5 ALT1 BIDIR_PU>;
610 emmc_d6 = <&pio41 6 ALT1 BIDIR_PU>;
611 emmc_d7 = <&pio41 7 ALT1 BIDIR_PU>;