blob: a6cc0824e23dff086dfccbb14e1e5b4f8a0865e0 [file] [log] [blame]
Masahiro Yamada28f40d42015-09-22 00:27:40 +09001/*
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
11void ph1_pro5_pin_init(void)
12{
13 /* Comment format: PAD Name -> Function Name */
14
15#ifdef CONFIG_NAND_DENALI
16 sg_set_pinsel(19, 0, 4, 8); /* XNFRE -> XNFRE */
17 sg_set_pinsel(20, 0, 4, 8); /* XNFWE -> XNFWE */
18 sg_set_pinsel(21, 0, 4, 8); /* NFALE -> NFALE */
19 sg_set_pinsel(22, 0, 4, 8); /* NFCLE -> NFCLE */
20 sg_set_pinsel(23, 0, 4, 8); /* XNFWP -> XNFWP */
21 sg_set_pinsel(24, 0, 4, 8); /* XNFCE0 -> XNFCE0 */
22 sg_set_pinsel(25, 0, 4, 8); /* NRYBY0 -> NRYBY0 */
23 sg_set_pinsel(26, 0, 4, 8); /* XNFCE1 -> XNFCE1 */
24 sg_set_pinsel(27, 0, 4, 8); /* NRYBY1 -> NRYBY1 */
25 sg_set_pinsel(28, 0, 4, 8); /* NFD0 -> NFD0 */
26 sg_set_pinsel(29, 0, 4, 8); /* NFD1 -> NFD1 */
27 sg_set_pinsel(30, 0, 4, 8); /* NFD2 -> NFD2 */
28 sg_set_pinsel(31, 0, 4, 8); /* NFD3 -> NFD3 */
29 sg_set_pinsel(32, 0, 4, 8); /* NFD4 -> NFD4 */
30 sg_set_pinsel(33, 0, 4, 8); /* NFD5 -> NFD5 */
31 sg_set_pinsel(34, 0, 4, 8); /* NFD6 -> NFD6 */
32 sg_set_pinsel(35, 0, 4, 8); /* NFD7 -> NFD7 */
33#endif
34
35#ifdef CONFIG_USB_XHCI_UNIPHIER
36 sg_set_pinsel(124, 0, 4, 8); /* USB0VBUS -> USB0VBUS */
37 sg_set_pinsel(125, 0, 4, 8); /* USB0OD -> USB0OD */
38 sg_set_pinsel(126, 0, 4, 8); /* USB1VBUS -> USB1VBUS */
39 sg_set_pinsel(127, 0, 4, 8); /* USB1OD -> USB1OD */
40#endif
41
42 writel(1, SG_LOADPINCTRL);
43}