blob: 843a00b95588344f6f16d4c1868e36ef9c72e486 [file] [log] [blame]
Stefan Bosch8d393b22020-07-10 19:07:30 +02001/* SPDX-License-Identifier: GPL-2.0+
2 *
3 * Pinctrl driver for Nexell SoCs
4 * (C) Copyright 2016 Nexell
5 * Bongyu, KOO <freestyle@nexell.co.kr>
6 */
7
8#ifndef __PINCTRL_S5PXX18_H_
9#define __PINCTRL_S5PXX18_H_
10
11#include <linux/types.h>
12#include <asm/io.h>
13
14#define GPIOX_ALTFN0 0x20
15#define GPIOX_ALTFN1 0x24
16#define GPIOX_DRV1 0x48
17#define GPIOX_DRV0 0x50
18#define GPIOX_PULLSEL 0x58
19#define GPIOX_PULLENB 0x60
20
21#define GPIOX_SLEW_DISABLE_DEFAULT 0x44
22#define GPIOX_DRV1_DISABLE_DEFAULT 0x4C
23#define GPIOX_DRV0_DISABLE_DEFAULT 0x54
24#define GPIOX_PULLSEL_DISABLE_DEFAULT 0x5C
25#define GPIOX_PULLENB_DISABLE_DEFAULT 0x64
26
27#define ALIVE_PWRGATE 0x0
28#define ALIVE_PADPULLUPRST 0x80
29#define ALIVE_PADPULLUPSET 0x84
30#define ALIVE_PADPULLUPREAD 0x88
31
32enum {
33 nx_gpio_padfunc_0 = 0ul,
34 nx_gpio_padfunc_1 = 1ul,
35 nx_gpio_padfunc_2 = 2ul,
36 nx_gpio_padfunc_3 = 3ul
37};
38
39enum {
40 nx_gpio_drvstrength_0 = 0ul,
41 nx_gpio_drvstrength_1 = 1ul,
42 nx_gpio_drvstrength_2 = 2ul,
43 nx_gpio_drvstrength_3 = 3ul
44};
45
46enum {
47 nx_gpio_pull_down = 0ul,
48 nx_gpio_pull_up = 1ul,
49 nx_gpio_pull_off = 2ul
50};
51
52int s5pxx18_pinctrl_init(struct udevice *dev);
53#endif /* __PINCTRL_S5PXX18_H_ */