blob: 2d62ab3d8894df36723a5edc2dac62e77688f206 [file] [log] [blame]
Masahiro Yamada1fe65d32015-09-22 00:27:41 +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>
Masahiro Yamadaefdf3402016-01-09 01:51:13 +09008
9#include "../init.h"
10#include "../sg-regs.h"
Masahiro Yamada1fe65d32015-09-22 00:27:41 +090011
Masahiro Yamada98905692016-03-30 20:17:02 +090012void uniphier_pxs2_pin_init(void)
Masahiro Yamada1fe65d32015-09-22 00:27:41 +090013{
14 /* Comment format: PAD Name -> Function Name */
15
16#ifdef CONFIG_NAND_DENALI
17 sg_set_pinsel(30, 8, 8, 4); /* XNFRE -> XNFRE */
18 sg_set_pinsel(31, 8, 8, 4); /* XNFWE -> XNFWE */
19 sg_set_pinsel(32, 8, 8, 4); /* NFALE -> NFALE */
20 sg_set_pinsel(33, 8, 8, 4); /* NFCLE -> NFCLE */
21 sg_set_pinsel(34, 8, 8, 4); /* XNFWP -> XNFWP */
22 sg_set_pinsel(35, 8, 8, 4); /* XNFCE0 -> XNFCE0 */
23 sg_set_pinsel(36, 8, 8, 4); /* NRYBY0 -> NRYBY0 */
24 sg_set_pinsel(37, 8, 8, 4); /* XNFCE1 -> NRYBY1 */
25 sg_set_pinsel(38, 8, 8, 4); /* NRYBY1 -> XNFCE1 */
26 sg_set_pinsel(39, 8, 8, 4); /* NFD0 -> NFD0 */
27 sg_set_pinsel(40, 8, 8, 4); /* NFD1 -> NFD1 */
28 sg_set_pinsel(41, 8, 8, 4); /* NFD2 -> NFD2 */
29 sg_set_pinsel(42, 8, 8, 4); /* NFD3 -> NFD3 */
30 sg_set_pinsel(43, 8, 8, 4); /* NFD4 -> NFD4 */
31 sg_set_pinsel(44, 8, 8, 4); /* NFD5 -> NFD5 */
32 sg_set_pinsel(45, 8, 8, 4); /* NFD6 -> NFD6 */
33 sg_set_pinsel(46, 8, 8, 4); /* NFD7 -> NFD7 */
34#endif
35
36#ifdef CONFIG_USB_XHCI_UNIPHIER
37 sg_set_pinsel(56, 8, 8, 4); /* USB0VBUS -> USB0VBUS */
38 sg_set_pinsel(57, 8, 8, 4); /* USB0OD -> USB0OD */
39 sg_set_pinsel(58, 8, 8, 4); /* USB1VBUS -> USB1VBUS */
40 sg_set_pinsel(59, 8, 8, 4); /* USB1OD -> USB1OD */
41 sg_set_pinsel(60, 8, 8, 4); /* USB2VBUS -> USB2VBUS */
42 sg_set_pinsel(61, 8, 8, 4); /* USB2OD -> USB2OD */
43 sg_set_pinsel(62, 8, 8, 4); /* USB3VBUS -> USB3VBUS */
44 sg_set_pinsel(63, 8, 8, 4); /* USB3OD -> USB3OD */
45#endif
46}