xref: /rk3399_rockchip-uboot/arch/arm/include/asm/arch-omap5/gpio.h (revision 080795b70ccf97d934676371288650cff5055ca7)
1508a58faSSricharan /*
2508a58faSSricharan  * Copyright (c) 2009 Wind River Systems, Inc.
3508a58faSSricharan  * Tom Rix <Tom.Rix@windriver.com>
4508a58faSSricharan  *
5bcd4d4ebSWolfgang Denk  * SPDX-License-Identifier:	GPL-2.0
6508a58faSSricharan  *
7508a58faSSricharan  * This work is derived from the linux 2.6.27 kernel source
8508a58faSSricharan  * To fetch, use the kernel repository
9508a58faSSricharan  * git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
10508a58faSSricharan  * Use the v2.6.27 tag.
11508a58faSSricharan  *
12508a58faSSricharan  * Below is the original's header including its copyright
13508a58faSSricharan  *
14508a58faSSricharan  *  linux/arch/arm/plat-omap/gpio.c
15508a58faSSricharan  *
16508a58faSSricharan  * Support functions for OMAP GPIO
17508a58faSSricharan  *
18508a58faSSricharan  * Copyright (C) 2003-2005 Nokia Corporation
19508a58faSSricharan  * Written by Juha Yrjölä <juha.yrjola@nokia.com>
20508a58faSSricharan  */
21508a58faSSricharan #ifndef _GPIO_OMAP5_H
22508a58faSSricharan #define _GPIO_OMAP5_H
23508a58faSSricharan 
24508a58faSSricharan #include <asm/omap_gpio.h>
25508a58faSSricharan 
2687bd05d7SAxel Lin #define OMAP_MAX_GPIO			256
2787bd05d7SAxel Lin 
28508a58faSSricharan #define OMAP54XX_GPIO1_BASE		0x4Ae10000
29508a58faSSricharan #define OMAP54XX_GPIO2_BASE		0x48055000
30508a58faSSricharan #define OMAP54XX_GPIO3_BASE		0x48057000
31508a58faSSricharan #define OMAP54XX_GPIO4_BASE		0x48059000
32508a58faSSricharan #define OMAP54XX_GPIO5_BASE		0x4805B000
33508a58faSSricharan #define OMAP54XX_GPIO6_BASE		0x4805D000
3487bd05d7SAxel Lin #define OMAP54XX_GPIO7_BASE		0x48051000
3587bd05d7SAxel Lin #define OMAP54XX_GPIO8_BASE		0x48053000
36508a58faSSricharan 
37*080795b7SRoger Quadros 
38*080795b7SRoger Quadros /* Get the GPIO index from the given bank number and bank gpio */
39*080795b7SRoger Quadros #define GPIO_TO_PIN(bank, bank_gpio)	(32 * (bank - 1) + (bank_gpio))
40*080795b7SRoger Quadros 
41508a58faSSricharan #endif /* _GPIO_OMAP5_H */
42