aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/denverton_ns/include/soc/gpio.h
blob: 2012a474034652cbc1fc148e687f7bc343c1be13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
 * This file is part of the coreboot project.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 2 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */

#ifndef _SOC_DENVERTON_NS_GPIO_H_
#define _SOC_DENVERTON_NS_GPIO_H_

#include <soc/gpio_defs.h>

#define GPIO_MISCCFG		0x10 /* Miscellaneous Configuration offset */

#define GPIO_MAX_NUM_PER_GROUP	32


#define NUM_NC_GPI_REGS	\
	(ALIGN_UP(V_PCH_GPIO_NC_PAD_MAX, GPIO_MAX_NUM_PER_GROUP) \
	/ GPIO_MAX_NUM_PER_GROUP)

#define NUM_SC_DFX_GPI_REGS	\
	(ALIGN_UP(V_PCH_GPIO_SC_DFX_PAD_MAX, GPIO_MAX_NUM_PER_GROUP) \
	/ GPIO_MAX_NUM_PER_GROUP)

#define NUM_SC0_GPI_REGS	\
	(ALIGN_UP(V_PCH_GPIO_SC0_PAD_MAX, GPIO_MAX_NUM_PER_GROUP) \
	/ GPIO_MAX_NUM_PER_GROUP)

#define NUM_SC1_GPI_REGS	\
	(ALIGN_UP(V_PCH_GPIO_SC1_PAD_MAX, GPIO_MAX_NUM_PER_GROUP) \
	/ GPIO_MAX_NUM_PER_GROUP)

#define NUM_GPI_STATUS_REGS (NUM_NC_GPI_REGS + NUM_SC_DFX_GPI_REGS +\
			     NUM_SC0_GPI_REGS + NUM_SC1_GPI_REGS)


#define GPIO_NUM_PAD_CFG_REGS   2 /* DW0, DW1 */

#include <intelblocks/gpio.h>/* intelblocks/gpio.h depends on definitions in
				lines above and soc/gpio_defs.h */

#endif /* _SOC_DENVERTON_NS_GPIO_H_ */