Steve Sakoman | 6229e33 | 2012-06-04 05:35:34 +0000 | [diff] [blame] | 1 | /* |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 2 | * SPDX-License-Identifier: GPL-2.0+ |
Steve Sakoman | 6229e33 | 2012-06-04 05:35:34 +0000 | [diff] [blame] | 3 | */ |
| 4 | #ifndef _GPIO_AM33xx_H |
| 5 | #define _GPIO_AM33xx_H |
| 6 | |
| 7 | #include <asm/omap_gpio.h> |
| 8 | |
Nikita Kiryanov | 55a0bf9 | 2015-07-30 23:56:22 +0300 | [diff] [blame] | 9 | #ifdef CONFIG_AM43XX |
| 10 | #define OMAP_MAX_GPIO 192 |
| 11 | #else |
Axel Lin | 01a461f | 2013-06-21 18:54:25 +0800 | [diff] [blame] | 12 | #define OMAP_MAX_GPIO 128 |
Nikita Kiryanov | 55a0bf9 | 2015-07-30 23:56:22 +0300 | [diff] [blame] | 13 | #endif |
Axel Lin | 01a461f | 2013-06-21 18:54:25 +0800 | [diff] [blame] | 14 | |
Steve Sakoman | 6229e33 | 2012-06-04 05:35:34 +0000 | [diff] [blame] | 15 | #define AM33XX_GPIO0_BASE 0x44E07000 |
| 16 | #define AM33XX_GPIO1_BASE 0x4804C000 |
| 17 | #define AM33XX_GPIO2_BASE 0x481AC000 |
| 18 | #define AM33XX_GPIO3_BASE 0x481AE000 |
Dave Gerlach | 00822ca | 2014-02-10 11:41:49 -0500 | [diff] [blame] | 19 | #define AM33XX_GPIO4_BASE 0x48320000 |
| 20 | #define AM33XX_GPIO5_BASE 0x48322000 |
Lokesh Vutla | dd0037a | 2013-12-10 15:02:23 +0530 | [diff] [blame] | 21 | |
| 22 | /* GPIO CTRL register */ |
| 23 | #define GPIO_CTRL_DISABLEMODULE_SHIFT 0 |
| 24 | #define GPIO_CTRL_DISABLEMODULE_MASK (1 << 0) |
| 25 | #define GPIO_CTRL_ENABLEMODULE GPIO_CTRL_DISABLEMODULE_MASK |
| 26 | |
| 27 | /* GPIO OUTPUT ENABLE register */ |
| 28 | #define GPIO_OE_ENABLE(x) (1 << x) |
| 29 | |
| 30 | /* GPIO SETDATAOUT register */ |
| 31 | #define GPIO_SETDATAOUT(x) (1 << x) |
Steve Sakoman | 6229e33 | 2012-06-04 05:35:34 +0000 | [diff] [blame] | 32 | #endif /* _GPIO_AM33xx_H */ |