Skip to contentSkip to conversation

am33xx/am43xx: Add platform data for GPIOs

PATCH In review Tom Rini 1 participant 2 messages Jan 5, 2016 – Jan 9, 2016 Arm (32-bit)

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 am33xx/am43xx: Add platform data for GPIOs

On these platforms we have many cases of boards that enable device model and GPIO support but do not enable OF_CONTROL and pass in a device tree with the binary. We need to bring in the platform data here as well.

Tested on Beaglebone Black.

---
 arch/arm/cpu/armv7/am33xx/board.c |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
arch/arm/cpu/armv7/am33xx/board.c +23 -0
index 466348f..e8d5be3 100644
@@ -64,8 +64,31 @@ U_BOOT_DEVICES(am33xx_uarts) = {
 #   endif
 #  endif
 };
+
+#ifdef CONFIG_DM_GPIO
+static const struct omap_gpio_platdata am33xx_gpio[] = {
+	{ 0, AM33XX_GPIO0_BASE },
+	{ 1, AM33XX_GPIO1_BASE },
+	{ 2, AM33XX_GPIO2_BASE },
+	{ 3, AM33XX_GPIO3_BASE },
+#ifdef CONFIG_AM43XX
+	{ 4, AM33XX_GPIO4_BASE },
+	{ 5, AM33XX_GPIO5_BASE },
 #endif
+};
 
+U_BOOT_DEVICES(am33xx_gpios) = {
+	{ "gpio_omap", &am33xx_gpio[0] },
+	{ "gpio_omap", &am33xx_gpio[1] },
+	{ "gpio_omap", &am33xx_gpio[2] },
+	{ "gpio_omap", &am33xx_gpio[3] },
+#ifdef CONFIG_AM43XX
+	{ "gpio_omap", &am33xx_gpio[4] },
+	{ "gpio_omap", &am33xx_gpio[5] },
+#endif
+};
+#endif
+#endif
 
 #ifndef CONFIG_DM_GPIO
 static const struct gpio_bank gpio_bank_am33xx[] = {
Signature · 1 line
1.7.9.5
author
#1 lore raw
Quoted 10 lines · Tom Rini

On these platforms we have many cases of boards that enable device model and GPIO support but do not enable OF_CONTROL and pass in a device tree with the binary. We need to bring in the platform data here as well.

Tested on Beaglebone Black.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160108/0b46d58d/attachment.sig>