diff options
author | Antony Pavlov <antonynpavlov@gmail.com> | 2015-09-23 01:34:09 +0300 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-09-23 10:28:03 +0200 |
commit | 15cc058c06d168abda7363387d1d69b733a96a16 (patch) | |
tree | ae7e4d06d837e9d46e3ec8eb33882b613f1da756 /arch/mips/mach-ath79 | |
parent | e40e6e479c7114de63a0f846f7e989d72465c4bb (diff) | |
download | barebox-15cc058c06d168abda7363387d1d69b733a96a16.tar.gz barebox-15cc058c06d168abda7363387d1d69b733a96a16.tar.xz |
gpio: add ath79-gpio driver for Atheros MIPS SoCs
This driver is based on linux-4.2 driver.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips/mach-ath79')
-rw-r--r-- | arch/mips/mach-ath79/include/mach/ar71xx_regs.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/mips/mach-ath79/include/mach/ar71xx_regs.h b/arch/mips/mach-ath79/include/mach/ar71xx_regs.h index 77138ab48e..b82a8c38c7 100644 --- a/arch/mips/mach-ath79/include/mach/ar71xx_regs.h +++ b/arch/mips/mach-ath79/include/mach/ar71xx_regs.h @@ -23,6 +23,8 @@ #define AR71XX_APB_BASE 0x18000000 +#define AR71XX_GPIO_BASE (AR71XX_APB_BASE + 0x00040000) +#define AR71XX_GPIO_SIZE 0x100 #define AR71XX_PLL_BASE (AR71XX_APB_BASE + 0x00050000) #define AR71XX_PLL_SIZE 0x100 #define AR71XX_RESET_BASE (AR71XX_APB_BASE + 0x00060000) @@ -32,6 +34,21 @@ #define AR933X_UART_SIZE 0x14 /* + * GPIO block + */ +#define AR71XX_GPIO_REG_OE 0x00 +#define AR71XX_GPIO_REG_IN 0x04 +#define AR71XX_GPIO_REG_OUT 0x08 +#define AR71XX_GPIO_REG_SET 0x0c +#define AR71XX_GPIO_REG_CLEAR 0x10 +#define AR71XX_GPIO_REG_INT_MODE 0x14 +#define AR71XX_GPIO_REG_INT_TYPE 0x18 +#define AR71XX_GPIO_REG_INT_POLARITY 0x1c +#define AR71XX_GPIO_REG_INT_PENDING 0x20 +#define AR71XX_GPIO_REG_INT_ENABLE 0x24 +#define AR71XX_GPIO_REG_FUNC 0x28 + +/* * PLL block */ #define AR933X_PLL_CPU_CONFIG_REG 0x00 |