Skip to contentSkip to conversation

gpio: Add DM GPIO driver for Marvell MVEBU

PATCH New Stefan Roese 2 participants 5 messages Feb 12, 2016 – Mar 24, 2016 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: Add DM GPIO driver for Marvell MVEBU

This patch adds a DM GPIO driver for the Marvell MVEBU SoCs. There are other non-DM drivers that might be used on these platforms. But this patch creates a new DM driver. Which will be used by all Armada XP/38x boards. Other MVEBU SoC (Kirkwood / Orion) may follow once they support DM as well.

Cc Dirk Eibach <[email protected]>
Cc Phil Sutter <[email protected]>
Cc Kevin Smith <[email protected]>
Cc Luka Perkov <[email protected]>
Cc Tom Rini <[email protected]>
---
 drivers/gpio/Kconfig      |   7 +++
 drivers/gpio/Makefile     |   1 +
 drivers/gpio/mvebu_gpio.c | 119 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 127 insertions(+)
 create mode 100644 drivers/gpio/mvebu_gpio.c
drivers/gpio/Kconfig +7 -0
index 845dc72..6147aa3 100644
@@ -90,4 +90,11 @@ config PIC32_GPIO
 	help
 	  Say yes here to support Microchip PIC32 GPIOs.
 
+config MVEBU_GPIO
+	bool "Marvell MVEBU GPIO driver"
+	depends on DM_GPIO && ARCH_MVEBU
+	default y
+	help
+	  Say yes here to support Marvell MVEBU (Armada XP/38x) GPIOs.
+
 endmenu
drivers/gpio/Makefile +1 -0
index 845a6d4..54d1706 100644
@@ -47,3 +47,4 @@ obj-$(CONFIG_ZYNQ_GPIO)		+= zynq_gpio.o
 obj-$(CONFIG_VYBRID_GPIO)	+= vybrid_gpio.o
 obj-$(CONFIG_HIKEY_GPIO)	+= hi6220_gpio.o
 obj-$(CONFIG_PIC32_GPIO)	+= pic32_gpio.o
+obj-$(CONFIG_MVEBU_GPIO)	+= mvebu_gpio.o
drivers/gpio/mvebu_gpio.c new file +119 -0

119 lines not on this page · raw message

Signature · 1 line
2.7.1
#1 lore raw

PATCH 1/1 gpio: Add DM GPIO driver for Marvell MVEBU

Hi Stefan,

Quoted 6 lines · Stefan Roese

This patch adds a DM GPIO driver for the Marvell MVEBU SoCs. There are other non-DM drivers that might be used on these platforms. But this patch creates a new DM driver. Which will be used by all Armada XP/38x boards. Other MVEBU SoC (Kirkwood / Orion) may follow once they support DM as well.

Are there any GPIO functions on the db-88f6820-gp board that I can use to test this patch? I'm not seeing any "xxxx-gpios = <&gpioX ...>" nodes in the current device tree.

Thank you,
Kevin

#2 lore raw

PATCH 1/1 gpio: Add DM GPIO driver for Marvell MVEBU

Hi Kevin,

Quoted 10 lines · Kevin Smith
Quoted 6 lines · Stefan Roese

This patch adds a DM GPIO driver for the Marvell MVEBU SoCs. There are other non-DM drivers that might be used on these platforms. But this patch creates a new DM driver. Which will be used by all Armada XP/38x boards. Other MVEBU SoC (Kirkwood / Orion) may follow once they support DM as well.

Are there any GPIO functions on the db-88f6820-gp board that I can use to test this patch? I'm not seeing any "xxxx-gpios = <&gpioX ...>" nodes in the current device tree.

Correct. But there are the GPIO controller DT nodes. That will instantiate the GPIO DM interface. So you could use:

=> dm tree

to see the GPIO controllers listed (if enabled). And if you enable the GPIO commands (CONFIG_CMD_GPIO) then you can e.g. do:

=> gpio status -a

to list all GPIOs and there status. If a board / driver claims a GPIO (request_gpio) this should also be visible via this interface.

Thanks,
Stefan

#3 lore raw

PATCH 1/1 gpio: Add DM GPIO driver for Marvell MVEBU

In reply to Stefan Roese
Quoted 6 lines · Stefan Roese

This patch adds a DM GPIO driver for the Marvell MVEBU SoCs. There are other non-DM drivers that might be used on these platforms. But this patch creates a new DM driver. Which will be used by all Armada XP/38x boards. Other MVEBU SoC (Kirkwood / Orion) may follow once they support DM as well.

Quoted 8 lines
Cc Dirk Eibach <[email protected]>
Cc Phil Sutter <[email protected]>
Cc Kevin Smith <[email protected]>
Cc Luka Perkov <[email protected]>
Cc Tom Rini <[email protected]>

---

#4 lore raw

PATCH 1/1 gpio: Add DM GPIO driver for Marvell MVEBU

In reply to Stefan Roese
Quoted 6 lines · Stefan Roese

This patch adds a DM GPIO driver for the Marvell MVEBU SoCs. There are other non-DM drivers that might be used on these platforms. But this patch creates a new DM driver. Which will be used by all Armada XP/38x boards. Other MVEBU SoC (Kirkwood / Orion) may follow once they support DM as well.

Quoted 6 lines
Cc Dirk Eibach <[email protected]>
Cc Phil Sutter <[email protected]>
Cc Kevin Smith <[email protected]>
Cc Luka Perkov <[email protected]>
Cc Tom Rini <[email protected]>

Applied to u-boot-marvell/master.

Thanks,
Stefan