blob: 6c5d58f856b9c32cf44b33d230dc3ce692e55c7c [file] [log] [blame]
Masahiro Yamadafa714412015-07-21 14:04:22 +09001/*
2 * Copyright (C) 2011-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
Masahiro Yamadaefdf3402016-01-09 01:51:13 +09007#include "../init.h"
8#include "../sg-regs.h"
Masahiro Yamadafa714412015-07-21 14:04:22 +09009
Masahiro Yamada98905692016-03-30 20:17:02 +090010int uniphier_sld3_early_pin_init(const struct uniphier_board_data *bd)
Masahiro Yamadafa714412015-07-21 14:04:22 +090011{
12 /* Comment format: PAD Name -> Function Name */
13
14#ifdef CONFIG_UNIPHIER_SERIAL
Masahiro Yamada6e429742015-09-11 20:17:48 +090015 sg_set_pinsel(63, 0, 4, 4); /* RXD0 */
16 sg_set_pinsel(64, 1, 4, 4); /* TXD0 */
Masahiro Yamadafa714412015-07-21 14:04:22 +090017
Masahiro Yamada6e429742015-09-11 20:17:48 +090018 sg_set_pinsel(65, 0, 4, 4); /* RXD1 */
19 sg_set_pinsel(66, 1, 4, 4); /* TXD1 */
Masahiro Yamadafa714412015-07-21 14:04:22 +090020
Masahiro Yamada6e429742015-09-11 20:17:48 +090021 sg_set_pinsel(96, 2, 4, 4); /* RXD2 */
22 sg_set_pinsel(102, 2, 4, 4); /* TXD2 */
Masahiro Yamadafa714412015-07-21 14:04:22 +090023#endif
Masahiro Yamada75f16f82015-09-22 00:27:39 +090024
Masahiro Yamada9b4ebb02016-04-28 15:37:16 +090025 sg_set_pinsel(99, 1, 4, 4); /* GPIO26 -> EA24 */
26
Masahiro Yamada75f16f82015-09-22 00:27:39 +090027 return 0;
Masahiro Yamadafa714412015-07-21 14:04:22 +090028}