summaryrefslogtreecommitdiff
path: root/arch/arm/mach-uniphier/pinctrl/pinctrl-ld20.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-04-25 13:45:32 -0400
committerTom Rini <trini@konsulko.com>2016-04-25 13:45:32 -0400
commit9f69ab86d0592d528a0372f01fa23684291243fa (patch)
tree0ad01e07d0097f36840f78b3ac49dbf811ac2f02 /arch/arm/mach-uniphier/pinctrl/pinctrl-ld20.c
parente6a365289974fe030372c0fb0151df7940992d39 (diff)
parentb75e072c1c53cade2c3944433d852d7d6046661b (diff)
downloadu-boot-9f69ab86d0592d528a0372f01fa23684291243fa.tar.gz
Merge branch 'master' of git://www.denx.de/git/u-boot-uniphier
Diffstat (limited to 'arch/arm/mach-uniphier/pinctrl/pinctrl-ld20.c')
-rw-r--r--arch/arm/mach-uniphier/pinctrl/pinctrl-ld20.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/arch/arm/mach-uniphier/pinctrl/pinctrl-ld20.c b/arch/arm/mach-uniphier/pinctrl/pinctrl-ld20.c
new file mode 100644
index 0000000000..6066b169cf
--- /dev/null
+++ b/arch/arm/mach-uniphier/pinctrl/pinctrl-ld20.c
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <linux/io.h>
+
+#include "../init.h"
+#include "../sg-regs.h"
+
+void uniphier_ld20_pin_init(void)
+{
+ /* Comment format: PAD Name -> Function Name */
+
+#ifdef CONFIG_NAND_DENALI
+ sg_set_pinsel(3, 0, 8, 4); /* XNFWP -> XNFWP */
+ sg_set_pinsel(4, 0, 8, 4); /* XNFCE0 -> XNFCE0 */
+ sg_set_pinsel(5, 0, 8, 4); /* NFRYBY0 -> NFRYBY0 */
+ sg_set_pinsel(6, 0, 8, 4); /* XNFRE -> XNFRE */
+ sg_set_pinsel(7, 0, 8, 4); /* XNFWE -> XNFWE */
+ sg_set_pinsel(8, 0, 8, 4); /* NFALE -> NFALE */
+ sg_set_pinsel(9, 0, 8, 4); /* NFCLE -> NFCLE */
+ sg_set_pinsel(10, 0, 8, 4); /* NFD0 -> NFD0 */
+ sg_set_pinsel(11, 0, 8, 4); /* NFD1 -> NFD1 */
+ sg_set_pinsel(12, 0, 8, 4); /* NFD2 -> NFD2 */
+ sg_set_pinsel(13, 0, 8, 4); /* NFD3 -> NFD3 */
+ sg_set_pinsel(14, 0, 8, 4); /* NFD4 -> NFD4 */
+ sg_set_pinsel(15, 0, 8, 4); /* NFD5 -> NFD5 */
+ sg_set_pinsel(16, 0, 8, 4); /* NFD6 -> NFD6 */
+ sg_set_pinsel(17, 0, 8, 4); /* NFD7 -> NFD7 */
+ sg_set_iectrl_range(3, 17);
+#endif
+
+#ifdef CONFIG_USB_XHCI_UNIPHIER
+ sg_set_pinsel(46, 0, 8, 4); /* USB0VBUS -> USB0VBUS */
+ sg_set_pinsel(47, 0, 8, 4); /* USB0OD -> USB0OD */
+ sg_set_pinsel(48, 0, 8, 4); /* USB1VBUS -> USB1VBUS */
+ sg_set_pinsel(49, 0, 8, 4); /* USB1OD -> USB1OD */
+ sg_set_pinsel(50, 0, 8, 4); /* USB2VBUS -> USB2VBUS */
+ sg_set_pinsel(51, 0, 8, 4); /* USB2OD -> USB2OD */
+ sg_set_pinsel(52, 0, 8, 4); /* USB3VBUS -> USB3VBUS */
+ sg_set_pinsel(53, 0, 8, 4); /* USB3OD -> USB3OD */
+ sg_set_iectrl_range(46, 53);
+#endif
+}