blob: 537deaf2324da683e558cb9d8c8838f26aa7acef [file] [log] [blame]
Masahiro Yamadaea4d3db2016-04-28 15:37:15 +09001/*
2 * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include "../init.h"
8#include "../sg-regs.h"
9
10int uniphier_ld20_early_pin_init(const struct uniphier_board_data *bd)
11{
12 /* Comment format: PAD Name -> Function Name */
13 sg_set_pinsel(0, 0, 8, 4); /* XECS1 -> XECS1 */
14 sg_set_pinsel(1, 0, 8, 4); /* ERXW -> ERXW */
15 sg_set_pinsel(2, 0, 8, 4); /* XERWE1 -> XERWE1 */
16 sg_set_pinsel(6, 2, 8, 4); /* XNFRE -> XERWE0 */
17 sg_set_pinsel(7, 2, 8, 4); /* XNFWE -> ES0 */
18 sg_set_pinsel(8, 2, 8, 4); /* NFALE -> ES1 */
19 sg_set_pinsel(9, 2, 8, 4); /* NFCLE -> ES2 */
20 sg_set_pinsel(10, 2, 8, 4); /* NFD0 -> ED0 */
21 sg_set_pinsel(11, 2, 8, 4); /* NFD1 -> ED1 */
22 sg_set_pinsel(12, 2, 8, 4); /* NFD2 -> ED2 */
23 sg_set_pinsel(13, 2, 8, 4); /* NFD3 -> ED3 */
24 sg_set_pinsel(14, 2, 8, 4); /* NFD4 -> ED4 */
25 sg_set_pinsel(15, 2, 8, 4); /* NFD5 -> ED5 */
26 sg_set_pinsel(16, 2, 8, 4); /* NFD6 -> ED6 */
27 sg_set_pinsel(17, 2, 8, 4); /* NFD7 -> ED7 */
28 sg_set_iectrl_range(0, 2);
29 sg_set_iectrl_range(6, 17);
30
31 return 0;
32}