]> git.sur5r.net Git - u-boot/blob - arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-ld6b.c
ARM: uniphier: add ProXstream2 and PH1-LD6b support
[u-boot] / arch / arm / mach-uniphier / pinctrl / pinctrl-ph1-ld6b.c
1 /*
2  * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6
7 #include <linux/io.h>
8 #include <mach/init.h>
9 #include <mach/sg-regs.h>
10
11 void ph1_ld6b_pin_init(void)
12 {
13         /* Comment format:    PAD Name -> Function Name */
14
15 #ifdef CONFIG_NAND_DENALI
16         sg_set_pinsel(30, 0, 8, 4);     /* XNFRE  -> XNFRE */
17         sg_set_pinsel(31, 0, 8, 4);     /* XNFWE  -> XNFWE */
18         sg_set_pinsel(32, 0, 8, 4);     /* NFALE  -> NFALE */
19         sg_set_pinsel(33, 0, 8, 4);     /* NFCLE  -> NFCLE */
20         sg_set_pinsel(34, 0, 8, 4);     /* XNFWP  -> XNFWP */
21         sg_set_pinsel(35, 0, 8, 4);     /* XNFCE0 -> XNFCE0 */
22         sg_set_pinsel(36, 0, 8, 4);     /* NRYBY0 -> NRYBY0 */
23         sg_set_pinsel(37, 0, 8, 4);     /* XNFCE1 -> NRYBY1 */
24         sg_set_pinsel(38, 0, 8, 4);     /* NRYBY1 -> XNFCE1 */
25         sg_set_pinsel(39, 0, 8, 4);     /* NFD0   -> NFD0 */
26         sg_set_pinsel(40, 0, 8, 4);     /* NFD1   -> NFD1 */
27         sg_set_pinsel(41, 0, 8, 4);     /* NFD2   -> NFD2 */
28         sg_set_pinsel(42, 0, 8, 4);     /* NFD3   -> NFD3 */
29         sg_set_pinsel(43, 0, 8, 4);     /* NFD4   -> NFD4 */
30         sg_set_pinsel(44, 0, 8, 4);     /* NFD5   -> NFD5 */
31         sg_set_pinsel(45, 0, 8, 4);     /* NFD6   -> NFD6 */
32         sg_set_pinsel(46, 0, 8, 4);     /* NFD7   -> NFD7 */
33 #endif
34
35 #ifdef CONFIG_USB_XHCI_UNIPHIER
36         sg_set_pinsel(56, 0, 8, 4);     /* USB0VBUS -> USB0VBUS */
37         sg_set_pinsel(57, 0, 8, 4);     /* USB0OD   -> USB0OD */
38         sg_set_pinsel(58, 0, 8, 4);     /* USB1VBUS -> USB1VBUS */
39         sg_set_pinsel(59, 0, 8, 4);     /* USB1OD   -> USB1OD */
40         sg_set_pinsel(60, 0, 8, 4);     /* USB2VBUS -> USB2VBUS */
41         sg_set_pinsel(61, 0, 8, 4);     /* USB2OD   -> USB2OD */
42         sg_set_pinsel(62, 0, 8, 4);     /* USB3VBUS -> USB3VBUS */
43         sg_set_pinsel(63, 0, 8, 4);     /* USB3OD   -> USB3OD */
44 #endif
45 }