summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-12-24 19:34:38 +0100
committerHans de Goede <hdegoede@redhat.com>2015-01-14 14:56:38 +0100
commit6c727e09a022fcc0701eef58c4a5aedae5d9a6ac (patch)
treeb03dcd3a57abfd69fa7747c24ac91ff706cf7d33 /arch/arm
parentd27f7d14eaa1299b93c1e5efb691ddf0884885fa (diff)
downloadu-boot-imx-6c727e09a022fcc0701eef58c4a5aedae5d9a6ac.zip
u-boot-imx-6c727e09a022fcc0701eef58c4a5aedae5d9a6ac.tar.gz
u-boot-imx-6c727e09a022fcc0701eef58c4a5aedae5d9a6ac.tar.bz2
sunxi: gpio: Add support for gpio pins on the AXP209 pmic
Some boards use GPIO-s on the pmic, one example of this is the A13-OLinuXino board, which uses gpio0 of the axp209 for the lcd-power signal. This commit adds support for gpio pins on the AXP209 pmic, the sunxi_gpio.c changes are universal, adding gpio support for the other AXP pmics (when necessary) should be a matter of adding the necessary axp_gpio_foo functions to their resp. drivers, and add "#define AXP_GPIO" to their header file. Note this commit only adds support for the non device-model version of the gpio code, patches for adding support to the device-model version are very welcome. The string representation for these gpio-s is AXP0-#, the 0 in the AXP0 prefix is there in case we need to support gpio-s on more then 1 pmic in the future. At least A80 boards have 2 pmics, and we may end up needing to support gpio-s on both. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/include/asm/arch-sunxi/gpio.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h b/arch/arm/include/asm/arch-sunxi/gpio.h
index 6730879..32941cb 100644
--- a/arch/arm/include/asm/arch-sunxi/gpio.h
+++ b/arch/arm/include/asm/arch-sunxi/gpio.h
@@ -114,6 +114,7 @@ enum sunxi_gpio_number {
SUNXI_GPIO_I_START = SUNXI_GPIO_NEXT(SUNXI_GPIO_H),
SUNXI_GPIO_L_START = 352,
SUNXI_GPIO_M_START = SUNXI_GPIO_NEXT(SUNXI_GPIO_L),
+ SUNXI_GPIO_AXP0_START = 1024,
};
/* SUNXI GPIO number definitions */
@@ -129,6 +130,8 @@ enum sunxi_gpio_number {
#define SUNXI_GPL(_nr) (SUNXI_GPIO_L_START + (_nr))
#define SUNXI_GPM(_nr) (SUNXI_GPIO_M_START + (_nr))
+#define SUNXI_GPAXP0(_nr) (SUNXI_GPIO_AXP0_START + (_nr))
+
/* GPIO pin function config */
#define SUNXI_GPIO_INPUT 0
#define SUNXI_GPIO_OUTPUT 1