aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2018-10-18 14:28:27 +0200
committerStefano Babic <sbabic@denx.de>2018-10-22 12:59:01 +0200
commit8b2a31f13362521e65ccb4c7d73db467068e8e6a (patch)
treeea682ff3642f407f3ddec415831d14548beeba21 /arch
parent2d58296f3ec93b9d9ff862eb6e656af1f7cd8c47 (diff)
downloadu-boot-8b2a31f13362521e65ccb4c7d73db467068e8e6a.zip
u-boot-8b2a31f13362521e65ccb4c7d73db467068e8e6a.tar.gz
u-boot-8b2a31f13362521e65ccb4c7d73db467068e8e6a.tar.bz2
gpio: mxc_gpio: add support for i.MX8
Add i.MX8 support, there are 8 GPIO banks. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Anatolij Gustschin <agust@denx.de> Cc: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/arch-imx8/gpio.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-imx8/gpio.h b/arch/arm/include/asm/arch-imx8/gpio.h
new file mode 100644
index 0000000..24cfde3
--- /dev/null
+++ b/arch/arm/include/asm/arch-imx8/gpio.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2018 NXP
+ */
+
+#ifndef __ASM_ARCH_IMX8_GPIO_H
+#define __ASM_ARCH_IMX8_GPIO_H
+
+#if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
+/* GPIO registers */
+struct gpio_regs {
+ u32 gpio_dr; /* data */
+ u32 gpio_dir; /* direction */
+ u32 gpio_psr; /* pad satus */
+};
+#endif
+
+/* IMX8 the GPIO index is from 0 not 1 */
+#define IMX_GPIO_NR(port, index) (((port) * 32) + ((index) & 31))
+
+#endif /* __ASM_ARCH_IMX8_GPIO_H */