public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: nicolas.ferre@atmel•com (Nicolas Ferre)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 06/14] arm: at91: dt: at91sam9 add pinctrl support
Date: Tue, 11 Sep 2012 12:29:17 +0200	[thread overview]
Message-ID: <504F127D.30506@atmel.com> (raw)
In-Reply-To: <1344603731-32667-6-git-send-email-plagnioj@jcrosoft.com>

On 08/10/2012 03:02 PM, Jean-Christophe PLAGNIOL-VILLARD :
> Cc: Linus Walleij <linus.walleij@linaro•org>
> Cc: Nicolas Ferre <nicolas.ferre@atmel•com>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft•com>
> ---
>  arch/arm/boot/dts/at91sam9260.dtsi |    9 +++++++++
>  arch/arm/boot/dts/at91sam9263.dtsi |   12 ++++++++++++
>  arch/arm/boot/dts/at91sam9g45.dtsi |   11 +++++++++++
>  arch/arm/boot/dts/at91sam9n12.dtsi |   10 ++++++++++
>  arch/arm/boot/dts/at91sam9x5.dtsi  |   10 ++++++++++
>  arch/arm/configs/at91_dt_defconfig |    1 +
>  arch/arm/mach-at91/at91sam9263.c   |    5 +++++
>  arch/arm/mach-at91/at91sam9g45.c   |    6 ++++++
>  arch/arm/mach-at91/at91sam9n12.c   |    3 ---
>  arch/arm/mach-at91/at91sam9x5.c    |    7 -------
>  arch/arm/mach-at91/setup.c         |    3 ++-
>  11 files changed, 66 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi
> index 4aa155d..353eb53 100644
> --- a/arch/arm/boot/dts/at91sam9260.dtsi
> +++ b/arch/arm/boot/dts/at91sam9260.dtsi
> @@ -104,6 +104,15 @@
>  				compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
>  				reg = <0xfffff400 0x600>;
>  
> +				atmel,mux-mask = <
> +				      /*    A         B     */
> +				       0xffffffff 0xffc00c3b  /* pioA */
> +				       0xffffffff 0x7fff3ccf  /* pioB */
> +				       0xffffffff 0x007fffff  /* pioC */
> +				      >;
> +
> +				/* shared pinctrl settings */
> +
>  				pioA: gpio at fffff400 {
>  					compatible = "atmel,at91rm9200-gpio";
>  					reg = <0xfffff400 0x200>;
> diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi
> index f1c838e..e52d5f8 100644
> --- a/arch/arm/boot/dts/at91sam9263.dtsi
> +++ b/arch/arm/boot/dts/at91sam9263.dtsi
> @@ -95,6 +95,17 @@
>  				compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
>  				reg = <0xfffff200 0xa00>;
>  
> +				atmel,mux-mask = <
> +				      /*    A         B     */
> +				       0xfffffffb 0xffffe07f  /* pioA */
> +				       0x0007ffff 0x39072fff  /* pioB */
> +				       0xffffffff 0x3ffffff8  /* pioC */
> +				       0xfffffbff 0xffffffff  /* pioD */
> +				       0xffe00fff 0xfbfcff00  /* pioE */
> +				      >;
> +
> +				/* shared pinctrl settings */
> +
>  				pioA: gpio at fffff200 {
>  					compatible = "atmel,at91rm9200-gpio";
>  					reg = <0xfffff200 0x200>;
> @@ -138,6 +149,7 @@
>  					#gpio-cells = <2>;
>  					gpio-controller;
>  					interrupt-controller;
> +				};
>  			};
>  
>  			dbgu: serial at ffffee00 {
> diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
> index f04bc8d..0e64221 100644
> --- a/arch/arm/boot/dts/at91sam9g45.dtsi
> +++ b/arch/arm/boot/dts/at91sam9g45.dtsi
> @@ -114,6 +114,17 @@
>  
>  				reg = <0xfffff200 0xa00>;
>  
> +				atmel,mux-mask = <
> +				      /*    A         B     */
> +				       0xffffffff 0xffc003ff  /* pioA */
> +				       0xffffffff 0x800f8f00  /* pioB */
> +				       0xffffffff 0x00000e00  /* pioC */
> +				       0xffffffff 0xff0c1381  /* pioD */
> +				       0xffffffff 0x81ffff81  /* pioE */
> +				      >;
> +
> +				/* shared pinctrl settings */
> +
>  				pioA: gpio at fffff200 {
>  					compatible = "atmel,at91rm9200-gpio";
>  					reg = <0xfffff200 0x200>;
> diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi
> index 575c891..ae23a03 100644
> --- a/arch/arm/boot/dts/at91sam9n12.dtsi
> +++ b/arch/arm/boot/dts/at91sam9n12.dtsi
> @@ -107,6 +107,16 @@
>  				compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
>  				reg = <0xfffff400 0x800>;
>  
> +				atmel,mux-mask = <
> +				      /*    A         B          C     */
> +				       0xffffffff 0xffe07983 0x00000000  /* pioA */
> +				       0x00040000 0x00047e0f 0x00000000  /* pioB */
> +				       0xfdffffff 0x07c00000 0xb83fffff  /* pioC */
> +				       0x003fffff 0x003f8000 0x00000000  /* pioD */
> +				      >;
> +
> +				/* shared pinctrl settings */
> +
>  				pioA: gpio at fffff400 {
>  					compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
>  					reg = <0xfffff400 0x200>;
> diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
> index 8b56730..d1df4ea 100644
> --- a/arch/arm/boot/dts/at91sam9x5.dtsi
> +++ b/arch/arm/boot/dts/at91sam9x5.dtsi
> @@ -115,6 +115,16 @@
>  				compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
>  				reg = <0xfffff400 0x800>;
>  
> +				atmel,mux-mask = <
> +				      /*    A         B          C     */
> +				       0xffffffff 0xffe0399f 0xc000001c  /* pioA */
> +				       0xffffffff 0xffc003ff 0xffc003ff  /* pioB */
> +				       0xffffffff 0xffc003ff 0xffc003ff  /* pioC */
> +				       0xffffffff 0xffc003ff 0xffc003ff  /* pioD */
> +				      >;
> +
> +				/* shared pinctrl settings */
> +
>  				pioA: gpio at fffff400 {
>  					compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
>  					reg = <0xfffff400 0x200>;
> diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig
> index 67bc571..b175577 100644
> --- a/arch/arm/configs/at91_dt_defconfig
> +++ b/arch/arm/configs/at91_dt_defconfig
> @@ -111,6 +111,7 @@ CONFIG_I2C=y
>  CONFIG_I2C_GPIO=y
>  CONFIG_SPI=y
>  CONFIG_SPI_ATMEL=y
> +CONFIG_PINCTRL_AT91=y
>  # CONFIG_HWMON is not set
>  CONFIG_WATCHDOG=y
>  CONFIG_AT91SAM9X_WATCHDOG=y
> diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
> index 84b3810..ceef453 100644
> --- a/arch/arm/mach-at91/at91sam9263.c
> +++ b/arch/arm/mach-at91/at91sam9263.c
> @@ -210,6 +210,11 @@ static struct clk_lookup periph_clocks_lookups[] = {
>  	CLKDEV_CON_DEV_ID("hclk", "a00000.ohci", &ohci_clk),
>  	CLKDEV_CON_DEV_ID("spi_clk", "fffa4000.spi", &spi0_clk),
>  	CLKDEV_CON_DEV_ID("spi_clk", "fffa8000.spi", &spi1_clk),
> +	CLKDEV_CON_DEV_ID(NULL, "fffff200.gpio", &pioA_clk),
> +	CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioB_clk),
> +	CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioCDE_clk),
> +	CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioCDE_clk),
> +	CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioCDE_clk),
>  };
>  
>  static struct clk_lookup usart_clocks_lookups[] = {
> diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
> index ef6cedd..8322aa7 100644
> --- a/arch/arm/mach-at91/at91sam9g45.c
> +++ b/arch/arm/mach-at91/at91sam9g45.c
> @@ -256,6 +256,12 @@ static struct clk_lookup periph_clocks_lookups[] = {
>  	CLKDEV_CON_DEV_ID("ehci_clk", "800000.ehci", &uhphs_clk),
>  	/* fake hclk clock */
>  	CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &uhphs_clk),
> +	CLKDEV_CON_DEV_ID(NULL, "fffff200.gpio", &pioA_clk),
> +	CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioB_clk),
> +	CLKDEV_CON_DEV_ID(NULL, "fffff600.gpio", &pioC_clk),
> +	CLKDEV_CON_DEV_ID(NULL, "fffff800.gpio", &pioDE_clk),
> +	CLKDEV_CON_DEV_ID(NULL, "fffffa00.gpio", &pioDE_clk),
> +
>  	CLKDEV_CON_ID("pioA", &pioA_clk),
>  	CLKDEV_CON_ID("pioB", &pioB_clk),
>  	CLKDEV_CON_ID("pioC", &pioC_clk),
> diff --git a/arch/arm/mach-at91/at91sam9n12.c b/arch/arm/mach-at91/at91sam9n12.c
> index 0849466..f4e0e60 100644
> --- a/arch/arm/mach-at91/at91sam9n12.c
> +++ b/arch/arm/mach-at91/at91sam9n12.c
> @@ -221,9 +221,6 @@ static void __init at91sam9n12_map_io(void)
>  void __init at91sam9n12_initialize(void)
>  {
>  	at91_extern_irq = (1 << AT91SAM9N12_ID_IRQ0);
> -
> -	/* Register GPIO subsystem (using DT) */
> -	at91_gpio_init(NULL, 0);
>  }
>  
>  struct at91_init_soc __initdata at91sam9n12_soc = {
> diff --git a/arch/arm/mach-at91/at91sam9x5.c b/arch/arm/mach-at91/at91sam9x5.c
> index 477cf9d..bbd2f8e 100644
> --- a/arch/arm/mach-at91/at91sam9x5.c
> +++ b/arch/arm/mach-at91/at91sam9x5.c
> @@ -310,12 +310,6 @@ static void __init at91sam9x5_map_io(void)
>  	at91_init_sram(0, AT91SAM9X5_SRAM_BASE, AT91SAM9X5_SRAM_SIZE);
>  }
>  
> -void __init at91sam9x5_initialize(void)
> -{
> -	/* Register GPIO subsystem (using DT) */
> -	at91_gpio_init(NULL, 0);
> -}
> -
>  /* --------------------------------------------------------------------
>   *  Interrupt initialization
>   * -------------------------------------------------------------------- */
> @@ -323,5 +317,4 @@ void __init at91sam9x5_initialize(void)
>  struct at91_init_soc __initdata at91sam9x5_soc = {
>  	.map_io = at91sam9x5_map_io,
>  	.register_clocks = at91sam9x5_register_clocks,
> -	.init = at91sam9x5_initialize,
>  };
> diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
> index 50c69b5..fcb66ea 100644
> --- a/arch/arm/mach-at91/setup.c
> +++ b/arch/arm/mach-at91/setup.c
> @@ -449,7 +449,8 @@ void __init at91_dt_initialize(void)
>  	/* Register the processor-specific clocks */
>  	at91_boot_soc.register_clocks();
>  
> -	at91_boot_soc.init();
> +	if (at91_boot_soc.init)
> +		at91_boot_soc.init();
>  }
>  #endif

Ok with this, with correction by Richard,

Acked-by: Nicolas Ferre <nicolas.ferre@atmel•com>


-- 
Nicolas Ferre

  parent reply	other threads:[~2012-09-11 10:29 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-10 12:48 [PATCH 00/14] ARM: at91: add pinctrl support Jean-Christophe PLAGNIOL-VILLARD
2012-08-10 13:01 ` [PATCH 01/14] ARM: at91: gpio: implement request and free Jean-Christophe PLAGNIOL-VILLARD
2012-08-10 13:01   ` [PATCH 02/14] at91: regroup gpio and pinctrl under a simple-bus Jean-Christophe PLAGNIOL-VILLARD
2012-08-15  8:52     ` Linus Walleij
2012-08-18 21:14     ` Arnd Bergmann
2012-08-10 13:02   ` [PATCH 03/14] arm: at91: at91sam9x5: fix gpio number per bank Jean-Christophe PLAGNIOL-VILLARD
2012-08-15  8:54     ` Linus Walleij
2012-09-11 10:21       ` Nicolas Ferre
2012-08-18 21:18     ` Arnd Bergmann
2012-08-20  8:02       ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-10 13:02   ` [PATCH 04/14] ARM: at91: add dummies pinctrl for non dt platform Jean-Christophe PLAGNIOL-VILLARD
2012-08-15  8:55     ` Linus Walleij
2012-09-11 10:22       ` Nicolas Ferre
2012-08-10 13:02   ` [PATCH 05/14] ARM: at91: add pinctrl support Jean-Christophe PLAGNIOL-VILLARD
2012-08-13 14:53     ` Richard Genoud
2012-08-14  2:37       ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-14  7:24         ` Richard Genoud
2012-08-15 14:38     ` Linus Walleij
2012-08-16 12:18       ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-16 15:15         ` Warner Losh
2012-08-22 15:34       ` Stephen Warren
2012-08-23  7:06         ` Richard Genoud
2012-08-23 17:49           ` Stephen Warren
2012-08-25  8:38             ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-27 23:46               ` Linus Walleij
2012-08-28  6:51                 ` Richard Genoud
2012-09-11 10:27     ` Nicolas Ferre
2012-08-10 13:02   ` [PATCH 06/14] arm: at91: dt: at91sam9 " Jean-Christophe PLAGNIOL-VILLARD
2012-08-15  8:57     ` Linus Walleij
2012-08-17 15:39       ` Richard Genoud
2012-08-20 14:09     ` Richard Genoud
2012-08-20 15:11       ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-20 15:43         ` Richard Genoud
2012-09-11 10:29     ` Nicolas Ferre [this message]
2012-08-10 13:02   ` [PATCH 07/14] arm: at91: dt: at91sam9 add serial " Jean-Christophe PLAGNIOL-VILLARD
2012-08-15  9:00     ` Linus Walleij
2012-09-11 10:30     ` Nicolas Ferre
2012-08-10 13:02   ` [PATCH 08/14] tty: atmel_serial: add " Jean-Christophe PLAGNIOL-VILLARD
2012-08-10 16:10     ` Greg KH
2012-08-15  9:01     ` Linus Walleij
2012-09-11 10:33     ` Nicolas Ferre
2012-08-10 13:02   ` [PATCH 09/14] arm: at91: dt: sam9m10g45ek: use rts/cts pinctrl group for uart1 Jean-Christophe PLAGNIOL-VILLARD
2012-08-15  9:02     ` Linus Walleij
2012-09-11 10:34     ` Nicolas Ferre
2012-08-10 13:02   ` [PATCH 10/14] arm: at91: dt: sam9263ek: use rts/cts pinctrl group for uart0 Jean-Christophe PLAGNIOL-VILLARD
2012-08-15  9:02     ` Linus Walleij
2012-09-11 10:34     ` Nicolas Ferre
2012-08-10 13:02   ` [PATCH 11/14] arm: at91: dt: sam9g20ek: use rts/cts/dtr/dsr/dcd/ri " Jean-Christophe PLAGNIOL-VILLARD
2012-08-15  9:03     ` Linus Walleij
2012-09-11 10:36     ` Nicolas Ferre
2012-08-10 13:02   ` [PATCH 12/14] MTD: atmel nand: fix gpio missing request Jean-Christophe PLAGNIOL-VILLARD
2012-08-15  9:05     ` Linus Walleij
2012-08-10 13:02   ` [PATCH 13/14] arm: at91: dt: at91sam9 add nand pinctrl support Jean-Christophe PLAGNIOL-VILLARD
2012-08-15  9:06     ` Linus Walleij
2012-08-16 15:19       ` Richard Genoud
2012-08-16 17:38         ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-17  6:53           ` Richard Genoud
2012-08-20  7:58             ` Jean-Christophe PLAGNIOL-VILLARD
2012-08-10 13:02   ` [PATCH 14/14] MTD: atmel_nand: add pinctrl consumer support Jean-Christophe PLAGNIOL-VILLARD
2012-08-15  9:07     ` Linus Walleij
2012-08-24 11:51     ` Artem Bityutskiy
2012-08-15  8:51   ` [PATCH 01/14] ARM: at91: gpio: implement request and free Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=504F127D.30506@atmel.com \
    --to=nicolas.ferre@atmel$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox