aboutsummaryrefslogtreecommitdiffstats
path: root/roms/u-boot/arch/arm/include/asm/arch-am33xx/gpio.h
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/u-boot/arch/arm/include/asm/arch-am33xx/gpio.h
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/u-boot/arch/arm/include/asm/arch-am33xx/gpio.h')
-rw-r--r--roms/u-boot/arch/arm/include/asm/arch-am33xx/gpio.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/roms/u-boot/arch/arm/include/asm/arch-am33xx/gpio.h b/roms/u-boot/arch/arm/include/asm/arch-am33xx/gpio.h
new file mode 100644
index 000000000..24dc4bb1d
--- /dev/null
+++ b/roms/u-boot/arch/arm/include/asm/arch-am33xx/gpio.h
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+#ifndef _GPIO_AM33xx_H
+#define _GPIO_AM33xx_H
+
+#include <asm/omap_gpio.h>
+
+#ifdef CONFIG_AM43XX
+#define OMAP_MAX_GPIO 192
+#else
+#define OMAP_MAX_GPIO 128
+#endif
+
+#define AM33XX_GPIO0_BASE 0x44E07000
+#define AM33XX_GPIO1_BASE 0x4804C000
+#define AM33XX_GPIO2_BASE 0x481AC000
+#define AM33XX_GPIO3_BASE 0x481AE000
+#define AM33XX_GPIO4_BASE 0x48320000
+#define AM33XX_GPIO5_BASE 0x48322000
+
+/* GPIO CTRL register */
+#define GPIO_CTRL_DISABLEMODULE_SHIFT 0
+#define GPIO_CTRL_DISABLEMODULE_MASK (1 << 0)
+#define GPIO_CTRL_ENABLEMODULE GPIO_CTRL_DISABLEMODULE_MASK
+
+/* GPIO OUTPUT ENABLE register */
+#define GPIO_OE_ENABLE(x) (1 << x)
+
+/* GPIO SETDATAOUT register */
+#define GPIO_SETDATAOUT(x) (1 << x)
+#endif /* _GPIO_AM33xx_H */