Skip to content

Commit

Permalink
pinctrl/nomadik: basic Nomadik pinctrl interface
Browse files Browse the repository at this point in the history
This adds a scratch pin control interface to the Nomadik pinctrl
driver, and defines the pins and groups in the DB8500 ASIC. We
define GPIO ranges to cover the pins exposed. The DB8500 has
more pins than this but we restrict the driver to the pins that
can be controlled from the combined GPIO and pin control hardware
to begin with.

ChangeLog v1->v2:
- Base on the latest pinctrl development from
  pinctrl-mergebase-20120418 so we can get rid of legacy
  group count mechanism. Also drop the range checks for group
  index, this is handled by the core now.

Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Linus Walleij committed May 11, 2012
1 parent 072e82a commit e98ea77
Show file tree
Hide file tree
Showing 8 changed files with 935 additions and 2 deletions.
3 changes: 3 additions & 0 deletions arch/arm/mach-ux500/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ config UX500_SOC_COMMON
select ARM_ERRATA_754322
select ARM_ERRATA_764369
select CACHE_L2X0
select PINCTRL
select PINCTRL_NOMADIK

config UX500_SOC_DB5500
bool
Expand All @@ -20,6 +22,7 @@ config UX500_SOC_DB8500
select REGULATOR
select REGULATOR_DB8500_PRCMU
select CPU_FREQ_TABLE if CPU_FREQ
select PINCTRL_DB8500

menu "Ux500 target platform (boards)"

Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-ux500/cpu-db8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ static void __init db8500_add_gpios(struct device *parent)

dbx500_add_gpios(parent, ARRAY_AND_SIZE(db8500_gpio_base),
IRQ_DB8500_GPIO0, &pdata);
dbx500_add_pinctrl(parent, "pinctrl-db8500");
}

static int usb_db8500_rx_dma_cfg[] = {
Expand Down
12 changes: 12 additions & 0 deletions arch/arm/mach-ux500/devices-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,16 @@ struct nmk_gpio_platform_data;
void dbx500_add_gpios(struct device *parent, resource_size_t *base, int num,
int irq, struct nmk_gpio_platform_data *pdata);

static inline void
dbx500_add_pinctrl(struct device *parent, const char *name)
{
struct platform_device_info pdevinfo = {
.parent = parent,
.name = name,
.id = -1,
};

platform_device_register_full(&pdevinfo);
}

#endif
8 changes: 8 additions & 0 deletions drivers/pinctrl/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ config PINCTRL_MMP2
select PINCTRL_PXA3xx
select PINCONF

config PINCTRL_NOMADIK
bool "Nomadik pin controller driver"
depends on ARCH_U8500

config PINCTRL_DB8500
bool "DB8500 pin controller driver"
depends on PINCTRL_NOMADIK && ARCH_U8500

config PINCTRL_PXA168
bool "PXA168 pin controller driver"
depends on ARCH_MMP
Expand Down
3 changes: 2 additions & 1 deletion drivers/pinctrl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ endif
obj-$(CONFIG_GENERIC_PINCONF) += pinconf-generic.o
obj-$(CONFIG_PINCTRL_PXA3xx) += pinctrl-pxa3xx.o
obj-$(CONFIG_PINCTRL_MMP2) += pinctrl-mmp2.o
obj-$(CONFIG_PLAT_NOMADIK) += pinctrl-nomadik.o
obj-$(CONFIG_PINCTRL_NOMADIK) += pinctrl-nomadik.o
obj-$(CONFIG_PINCTRL_DB8500) += pinctrl-nomadik-db8500.o
obj-$(CONFIG_PINCTRL_PXA168) += pinctrl-pxa168.o
obj-$(CONFIG_PINCTRL_PXA910) += pinctrl-pxa910.o
obj-$(CONFIG_PINCTRL_SIRF) += pinctrl-sirf.o
Expand Down
Loading

0 comments on commit e98ea77

Please sign in to comment.