summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2016-11-17 16:19:05 +0800
committerYe Li <ye.li@nxp.com>2016-11-22 17:49:32 +0800
commit6f7fccf9f35e8e670205a8cf1da5c4ca822b7436 (patch)
tree64dd4805bf5d448e2e8aad8f508dc00d90c87068 /arch
parentc51a6bd2950fca16849d379e8f244f715a3f1232 (diff)
downloadu-boot-imx-6f7fccf9f35e8e670205a8cf1da5c4ca822b7436.zip
u-boot-imx-6f7fccf9f35e8e670205a8cf1da5c4ca822b7436.tar.gz
u-boot-imx-6f7fccf9f35e8e670205a8cf1da5c4ca822b7436.tar.bz2
MLK-13450-12 gpio: Add Rapid GPIO2P driver for i.MX7ULP
Add the imx_rgpio2p driver for Rapid GPIO2P controllers on i.MX7ULP. Have added all ports on RGPIO2P_0 and RGPIO2P_1. The configurations CONFIG_IMX_RGPIO2P and CONFIG_DM_GPIO must be set to y to enable the drivers. To use the GPIO function, the IBE and OBE needs to set in IOMUXC. We did not set the bits in driver, but leave them to IOMUXC settings of the GPIO pins. User should use IMX_GPIO_NR to generate the GPIO number for gpio APIs access. Signed-off-by: Ye Li <ye.li@nxp.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/arch-mx7ulp/gpio.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-mx7ulp/gpio.h b/arch/arm/include/asm/arch-mx7ulp/gpio.h
new file mode 100644
index 0000000..ab81fba
--- /dev/null
+++ b/arch/arm/include/asm/arch-mx7ulp/gpio.h
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2015 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __ASM_ARCH_MX7ULP_GPIO_H
+#define __ASM_ARCH_MX7ULP_GPIO_H
+
+struct gpio_regs {
+ u32 gpio_pdor;
+ u32 gpio_psor;
+ u32 gpio_pcor;
+ u32 gpio_ptor;
+ u32 gpio_pdir;
+ u32 gpio_pddr;
+ u32 gpio_gacr;
+};
+
+#define IMX_GPIO_NR(port, index) ((((port)-1)*32)+((index)&31))
+
+#endif /* __ASM_ARCH_MX7ULP_GPIO_H */