blob: 24dc4bb1d0b8c86120d1e6e2afb1c10f04bae63f [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Steve Sakoman6229e332012-06-04 05:35:34 +00002#ifndef _GPIO_AM33xx_H
3#define _GPIO_AM33xx_H
4
5#include <asm/omap_gpio.h>
6
Nikita Kiryanov55a0bf92015-07-30 23:56:22 +03007#ifdef CONFIG_AM43XX
8#define OMAP_MAX_GPIO 192
9#else
Axel Lin01a461f2013-06-21 18:54:25 +080010#define OMAP_MAX_GPIO 128
Nikita Kiryanov55a0bf92015-07-30 23:56:22 +030011#endif
Axel Lin01a461f2013-06-21 18:54:25 +080012
Steve Sakoman6229e332012-06-04 05:35:34 +000013#define AM33XX_GPIO0_BASE 0x44E07000
14#define AM33XX_GPIO1_BASE 0x4804C000
15#define AM33XX_GPIO2_BASE 0x481AC000
16#define AM33XX_GPIO3_BASE 0x481AE000
Dave Gerlach00822ca2014-02-10 11:41:49 -050017#define AM33XX_GPIO4_BASE 0x48320000
18#define AM33XX_GPIO5_BASE 0x48322000
Lokesh Vutladd0037a2013-12-10 15:02:23 +053019
20/* GPIO CTRL register */
21#define GPIO_CTRL_DISABLEMODULE_SHIFT 0
22#define GPIO_CTRL_DISABLEMODULE_MASK (1 << 0)
23#define GPIO_CTRL_ENABLEMODULE GPIO_CTRL_DISABLEMODULE_MASK
24
25/* GPIO OUTPUT ENABLE register */
26#define GPIO_OE_ENABLE(x) (1 << x)
27
28/* GPIO SETDATAOUT register */
29#define GPIO_SETDATAOUT(x) (1 << x)
Steve Sakoman6229e332012-06-04 05:35:34 +000030#endif /* _GPIO_AM33xx_H */