From: nicolas.ferre@atmel.com (Nicolas Ferre)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pinctrl: dt: at91: new binding
Date: Fri, 6 Mar 2015 16:08:46 +0100 [thread overview]
Message-ID: <54F9C2FE.8060804@atmel.com> (raw)
In-Reply-To: <1424943294-8805-1-git-send-email-plagnioj@jcrosoft.com>
Le 26/02/2015 10:34, Jean-Christophe PLAGNIOL-VILLARD a ?crit :
> Today if we want to disable a pio bank we may will siliently break pinctrl
> configuration in the DT. This will be detected only at runtime.
>
> So move the pinctrl configuration to the bank instead of the bus.
> This allow to detect pinctrl issue at DT compiling time when disable a bank.
>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: devicetree at vger.kernel.org
> ---
> .../bindings/pinctrl/atmel,at91-pinctrl.txt | 66 ++++++++++++++++++++++
> 1 file changed, 66 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt
> index b7a93e8..78355ee 100644
> --- a/Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt
> +++ b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt
> @@ -148,3 +148,69 @@ dbgu: serial at fffff200 {
> pinctrl-0 = <&pinctrl_dbgu>;
> status = "disabled";
> };
> +
> +II) New Bindings per PIO Block
Sorry but NACK.
I don't want to manage another flavor of the pinmux biding with no real
benefit. I would have been good if we had it from day-1. Now it's too late.
Moreover, splitting a binding definition if you have a function given by
multiple banks can be weird and not well understood in regard to our
current group+function definition scheme (Cf. your last example).
> +This allow to detect pinctrl issue at DT compiling time when disable a bank
> +
> +Required properties for iomux controller:
> +- compatible: "atmel,at91rm9200-pio-pinctrl" or "atmel,at91sam9x5-pio-pinctrl"
> + or "atmel,sama5d3-pio-pinctrl"
> +- atmel,mux-mask: array of mask (periph per bank) to describe if a pin can be
> + configured in this periph mode. All the periph and bank need to be describe.
> +
> +How to create such array:
> +
> +Each column will represent the possible peripheral of the pinctrl for the bank
> +
> +Take an example on the 9260
> +Peripheral: 2 ( A and B)
> +=>
> +
> + /* A B */
> + 0xffffffff 0xffc00c3b /* pioA */
> +
> +For each peripheral/bank we will descibe in a u32 if a pin can be
> +configured in it by putting 1 to the pin bit (1 << pin)
> +
> +Required properties for pin configuration node:
> +- atmel,pins: 3 integers array, represents a group of pins mux and config
> + setting. The format is atmel,pins = <PIN_NUM PERIPH CONFIG>.
> + The PERIPH 0 means gpio, PERIPH 1 is periph A, PERIPH 2 is periph B...
> +
> +Bits used for CONFIG:
> +cf atmel,at91-pinctrl
> +
> +pioB: gpio at fffff600 {
> + compatible = "atmel,at91rm9200-gpio", "atmel,at91rm9200-pio-pinctrl";
> + reg = <0xfffff600 0x200>;
> + interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
> + #gpio-cells = <2>;
> + gpio-controller;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + clocks = <&pioB_clk>;
> +
> + /* A B */
> + atmel,mux-mask = <0xffffffff 0x7fff3ccf>;
> +
> + dbgu {
> + pinctrl_dbgu: dbgu-0 {
> + atmel,pins =
> + <14 0x1 0x0 /* PB14 periph A */
> + 15 0x1 0x1>; /* PB15 periph A with pullup */
> + };
> + };
> +};
> +
> +dbgu: serial at fffff200 {
> + compatible = "atmel,at91sam9260-usart";
> + reg = <0xfffff200 0x200>;
> + interrupts = <1 4 7>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_dbgu>;
> + status = "disabled";
> +};
> +
> +if you have to use multiple bank
> + pinctrl-0 = <&pinctrl_ip_piaa>, <&pinctrl_ip_piab>;
>
Best regards,
--
Nicolas Ferre
WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Ferre <nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
To: Jean-Christophe PLAGNIOL-VILLARD
<plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Linus Walleij
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Boris BREZILLON
<boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
Alexandre Belloni
<alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Subject: Re: [PATCH] pinctrl: dt: at91: new binding
Date: Fri, 6 Mar 2015 16:08:46 +0100 [thread overview]
Message-ID: <54F9C2FE.8060804@atmel.com> (raw)
In-Reply-To: <1424943294-8805-1-git-send-email-plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>
Le 26/02/2015 10:34, Jean-Christophe PLAGNIOL-VILLARD a écrit :
> Today if we want to disable a pio bank we may will siliently break pinctrl
> configuration in the DT. This will be detected only at runtime.
>
> So move the pinctrl configuration to the bank instead of the bus.
> This allow to detect pinctrl issue at DT compiling time when disable a bank.
>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj-sclMFOaUSTDQFizaE/u3fw@public.gmane.orgm>
> Cc: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> ---
> .../bindings/pinctrl/atmel,at91-pinctrl.txt | 66 ++++++++++++++++++++++
> 1 file changed, 66 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt
> index b7a93e8..78355ee 100644
> --- a/Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt
> +++ b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt
> @@ -148,3 +148,69 @@ dbgu: serial@fffff200 {
> pinctrl-0 = <&pinctrl_dbgu>;
> status = "disabled";
> };
> +
> +II) New Bindings per PIO Block
Sorry but NACK.
I don't want to manage another flavor of the pinmux biding with no real
benefit. I would have been good if we had it from day-1. Now it's too late.
Moreover, splitting a binding definition if you have a function given by
multiple banks can be weird and not well understood in regard to our
current group+function definition scheme (Cf. your last example).
> +This allow to detect pinctrl issue at DT compiling time when disable a bank
> +
> +Required properties for iomux controller:
> +- compatible: "atmel,at91rm9200-pio-pinctrl" or "atmel,at91sam9x5-pio-pinctrl"
> + or "atmel,sama5d3-pio-pinctrl"
> +- atmel,mux-mask: array of mask (periph per bank) to describe if a pin can be
> + configured in this periph mode. All the periph and bank need to be describe.
> +
> +How to create such array:
> +
> +Each column will represent the possible peripheral of the pinctrl for the bank
> +
> +Take an example on the 9260
> +Peripheral: 2 ( A and B)
> +=>
> +
> + /* A B */
> + 0xffffffff 0xffc00c3b /* pioA */
> +
> +For each peripheral/bank we will descibe in a u32 if a pin can be
> +configured in it by putting 1 to the pin bit (1 << pin)
> +
> +Required properties for pin configuration node:
> +- atmel,pins: 3 integers array, represents a group of pins mux and config
> + setting. The format is atmel,pins = <PIN_NUM PERIPH CONFIG>.
> + The PERIPH 0 means gpio, PERIPH 1 is periph A, PERIPH 2 is periph B...
> +
> +Bits used for CONFIG:
> +cf atmel,at91-pinctrl
> +
> +pioB: gpio@fffff600 {
> + compatible = "atmel,at91rm9200-gpio", "atmel,at91rm9200-pio-pinctrl";
> + reg = <0xfffff600 0x200>;
> + interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
> + #gpio-cells = <2>;
> + gpio-controller;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + clocks = <&pioB_clk>;
> +
> + /* A B */
> + atmel,mux-mask = <0xffffffff 0x7fff3ccf>;
> +
> + dbgu {
> + pinctrl_dbgu: dbgu-0 {
> + atmel,pins =
> + <14 0x1 0x0 /* PB14 periph A */
> + 15 0x1 0x1>; /* PB15 periph A with pullup */
> + };
> + };
> +};
> +
> +dbgu: serial@fffff200 {
> + compatible = "atmel,at91sam9260-usart";
> + reg = <0xfffff200 0x200>;
> + interrupts = <1 4 7>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_dbgu>;
> + status = "disabled";
> +};
> +
> +if you have to use multiple bank
> + pinctrl-0 = <&pinctrl_ip_piaa>, <&pinctrl_ip_piab>;
>
Best regards,
--
Nicolas Ferre
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-03-06 15:08 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-26 9:34 [PATCH] pinctrl: dt: at91: new binding Jean-Christophe PLAGNIOL-VILLARD
2015-02-26 9:34 ` Jean-Christophe PLAGNIOL-VILLARD
2015-02-26 10:43 ` Ludovic Desroches
2015-02-26 10:43 ` Ludovic Desroches
2015-02-26 11:03 ` Jean-Christophe PLAGNIOL-VILLARD
2015-02-26 11:03 ` Jean-Christophe PLAGNIOL-VILLARD
2015-03-06 15:08 ` Nicolas Ferre [this message]
2015-03-06 15:08 ` Nicolas Ferre
2015-03-06 16:49 ` Jean-Christophe PLAGNIOL-VILLARD
2015-03-06 16:49 ` Jean-Christophe PLAGNIOL-VILLARD
2015-03-06 17:07 ` Alexandre Belloni
2015-03-06 17:07 ` Alexandre Belloni
2015-03-06 18:23 ` Boris Brezillon
2015-03-06 18:23 ` Boris Brezillon
2015-03-06 18:33 ` Jean-Christophe PLAGNIOL-VILLARD
2015-03-06 18:33 ` Jean-Christophe PLAGNIOL-VILLARD
2015-03-17 12:07 ` Linus Walleij
2015-03-17 12:07 ` Linus Walleij
2015-03-29 20:55 ` Olof Johansson
2015-03-29 20:55 ` Olof Johansson
2015-04-02 8:18 ` Jean-Christophe PLAGNIOL-VILLARD
2015-04-02 8:18 ` Jean-Christophe PLAGNIOL-VILLARD
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=54F9C2FE.8060804@atmel.com \
--to=nicolas.ferre@atmel.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.