Masahiro Yamada | 28f40d4 | 2015-09-22 00:27:40 +0900 | [diff] [blame] | 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> |
Masahiro Yamada | 107b3fb | 2016-01-09 01:51:13 +0900 | [diff] [blame] | 8 | |
| 9 | #include "../init.h" |
| 10 | #include "../sg-regs.h" |
Masahiro Yamada | 28f40d4 | 2015-09-22 00:27:40 +0900 | [diff] [blame] | 11 | |
| 12 | void ph1_pro5_pin_init(void) |
| 13 | { |
| 14 | /* Comment format: PAD Name -> Function Name */ |
| 15 | |
| 16 | #ifdef CONFIG_NAND_DENALI |
| 17 | sg_set_pinsel(19, 0, 4, 8); /* XNFRE -> XNFRE */ |
| 18 | sg_set_pinsel(20, 0, 4, 8); /* XNFWE -> XNFWE */ |
| 19 | sg_set_pinsel(21, 0, 4, 8); /* NFALE -> NFALE */ |
| 20 | sg_set_pinsel(22, 0, 4, 8); /* NFCLE -> NFCLE */ |
| 21 | sg_set_pinsel(23, 0, 4, 8); /* XNFWP -> XNFWP */ |
| 22 | sg_set_pinsel(24, 0, 4, 8); /* XNFCE0 -> XNFCE0 */ |
| 23 | sg_set_pinsel(25, 0, 4, 8); /* NRYBY0 -> NRYBY0 */ |
| 24 | sg_set_pinsel(26, 0, 4, 8); /* XNFCE1 -> XNFCE1 */ |
| 25 | sg_set_pinsel(27, 0, 4, 8); /* NRYBY1 -> NRYBY1 */ |
| 26 | sg_set_pinsel(28, 0, 4, 8); /* NFD0 -> NFD0 */ |
| 27 | sg_set_pinsel(29, 0, 4, 8); /* NFD1 -> NFD1 */ |
| 28 | sg_set_pinsel(30, 0, 4, 8); /* NFD2 -> NFD2 */ |
| 29 | sg_set_pinsel(31, 0, 4, 8); /* NFD3 -> NFD3 */ |
| 30 | sg_set_pinsel(32, 0, 4, 8); /* NFD4 -> NFD4 */ |
| 31 | sg_set_pinsel(33, 0, 4, 8); /* NFD5 -> NFD5 */ |
| 32 | sg_set_pinsel(34, 0, 4, 8); /* NFD6 -> NFD6 */ |
| 33 | sg_set_pinsel(35, 0, 4, 8); /* NFD7 -> NFD7 */ |
| 34 | #endif |
| 35 | |
| 36 | #ifdef CONFIG_USB_XHCI_UNIPHIER |
| 37 | sg_set_pinsel(124, 0, 4, 8); /* USB0VBUS -> USB0VBUS */ |
| 38 | sg_set_pinsel(125, 0, 4, 8); /* USB0OD -> USB0OD */ |
| 39 | sg_set_pinsel(126, 0, 4, 8); /* USB1VBUS -> USB1VBUS */ |
| 40 | sg_set_pinsel(127, 0, 4, 8); /* USB1OD -> USB1OD */ |
| 41 | #endif |
| 42 | |
| 43 | writel(1, SG_LOADPINCTRL); |
| 44 | } |