linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ARM: dts: document pinctrl-single,pins when #pinctrl-cells = 2
@ 2020-09-19 20:08 Drew Fustini
  2020-09-23  7:38 ` Tony Lindgren
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Drew Fustini @ 2020-09-19 20:08 UTC (permalink / raw)
  To: Tony Lindgren, Rob Herring, Linus Walleij, Jason Kridner,
	Robert Nelson, Trent Piepho, Christina Quast, linux-omap,
	linux-kernel, devicetree, linux-gpio
  Cc: Drew Fustini

Document the values in pinctrl-single,pins when #pinctrl-cells = <2>

Fixes: 27c90e5e48d0 ("ARM: dts: am33xx-l4: change #pinctrl-cells from 1 to 2")
Reported-by: Trent Piepho <tpiepho@gmail.com>
Link: https://lore.kernel.org/linux-omap/3139716.CMS8C0sQ7x@zen.local/
Signed-off-by: Drew Fustini <drew@beagleboard.org>
---
v2 change:
- rephrase to make it clear that the pin conf value and pin mux value
  are OR'd together with #pinctrl-cells = <2>


 .../bindings/pinctrl/pinctrl-single.txt       | 21 ++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
index e705acd3612c..f903eb4471f8 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
@@ -94,16 +94,23 @@ pinctrl-single,bit-per-mux is set), and uses the common pinctrl bindings as
 specified in the pinctrl-bindings.txt document in this directory.
 
 The pin configuration nodes for pinctrl-single are specified as pinctrl
-register offset and value pairs using pinctrl-single,pins. Only the bits
-specified in pinctrl-single,function-mask are updated. For example, setting
-a pin for a device could be done with:
+register offset and values using pinctrl-single,pins. Only the bits specified
+in pinctrl-single,function-mask are updated.
+
+When #pinctrl-cells = 1, then setting a pin for a device could be done with:
 
 	pinctrl-single,pins = <0xdc 0x118>;
 
-Where 0xdc is the offset from the pinctrl register base address for the
-device pinctrl register, and 0x118 contains the desired value of the
-pinctrl register. See the device example and static board pins example
-below for more information.
+Where 0xdc is the offset from the pinctrl register base address for the device
+pinctrl register, and 0x118 contains the desired value of the pinctrl register.
+
+When #pinctrl-cells = 2, then setting a pin for a device could be done with:
+
+	pinctrl-single,pins = <0xdc 0x30 0x07>;
+
+Where 0x30 is the pin configuration value and 0x07 is the pin mux mode value.
+These two values are OR'd together to produce the value stored at offset 0xdc.
+See the device example and static board pins example below for more information.
 
 In case when one register changes more than one pin's mux the
 pinctrl-single,bits need to be used which takes three parameters:
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ARM: dts: document pinctrl-single,pins when #pinctrl-cells = 2
  2020-09-19 20:08 [PATCH v2] ARM: dts: document pinctrl-single,pins when #pinctrl-cells = 2 Drew Fustini
@ 2020-09-23  7:38 ` Tony Lindgren
  2020-09-29 16:51 ` Rob Herring
  2020-09-30  9:42 ` Linus Walleij
  2 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2020-09-23  7:38 UTC (permalink / raw)
  To: Drew Fustini
  Cc: Rob Herring, Linus Walleij, Jason Kridner, Robert Nelson,
	Trent Piepho, Christina Quast, linux-omap, linux-kernel,
	devicetree, linux-gpio

* Drew Fustini <drew@beagleboard.org> [200919 23:10]:
> Document the values in pinctrl-single,pins when #pinctrl-cells = <2>
> 
> Fixes: 27c90e5e48d0 ("ARM: dts: am33xx-l4: change #pinctrl-cells from 1 to 2")
> Reported-by: Trent Piepho <tpiepho@gmail.com>
> Link: https://lore.kernel.org/linux-omap/3139716.CMS8C0sQ7x@zen.local/
> Signed-off-by: Drew Fustini <drew@beagleboard.org>
> ---
> v2 change:
> - rephrase to make it clear that the pin conf value and pin mux value
>   are OR'd together with #pinctrl-cells = <2>

Acked-by: Tony Lindgren <tony@atomide.com>

>  .../bindings/pinctrl/pinctrl-single.txt       | 21 ++++++++++++-------
>  1 file changed, 14 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
> index e705acd3612c..f903eb4471f8 100644
> --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
> +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt
> @@ -94,16 +94,23 @@ pinctrl-single,bit-per-mux is set), and uses the common pinctrl bindings as
>  specified in the pinctrl-bindings.txt document in this directory.
>  
>  The pin configuration nodes for pinctrl-single are specified as pinctrl
> -register offset and value pairs using pinctrl-single,pins. Only the bits
> -specified in pinctrl-single,function-mask are updated. For example, setting
> -a pin for a device could be done with:
> +register offset and values using pinctrl-single,pins. Only the bits specified
> +in pinctrl-single,function-mask are updated.
> +
> +When #pinctrl-cells = 1, then setting a pin for a device could be done with:
>  
>  	pinctrl-single,pins = <0xdc 0x118>;
>  
> -Where 0xdc is the offset from the pinctrl register base address for the
> -device pinctrl register, and 0x118 contains the desired value of the
> -pinctrl register. See the device example and static board pins example
> -below for more information.
> +Where 0xdc is the offset from the pinctrl register base address for the device
> +pinctrl register, and 0x118 contains the desired value of the pinctrl register.
> +
> +When #pinctrl-cells = 2, then setting a pin for a device could be done with:
> +
> +	pinctrl-single,pins = <0xdc 0x30 0x07>;
> +
> +Where 0x30 is the pin configuration value and 0x07 is the pin mux mode value.
> +These two values are OR'd together to produce the value stored at offset 0xdc.
> +See the device example and static board pins example below for more information.
>  
>  In case when one register changes more than one pin's mux the
>  pinctrl-single,bits need to be used which takes three parameters:
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ARM: dts: document pinctrl-single,pins when #pinctrl-cells = 2
  2020-09-19 20:08 [PATCH v2] ARM: dts: document pinctrl-single,pins when #pinctrl-cells = 2 Drew Fustini
  2020-09-23  7:38 ` Tony Lindgren
@ 2020-09-29 16:51 ` Rob Herring
  2020-09-30  9:42 ` Linus Walleij
  2 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2020-09-29 16:51 UTC (permalink / raw)
  To: Drew Fustini
  Cc: Jason Kridner, Linus Walleij, Rob Herring, Tony Lindgren,
	Robert Nelson, linux-kernel, Christina Quast, devicetree,
	linux-omap, linux-gpio, Trent Piepho

On Sat, 19 Sep 2020 22:08:37 +0200, Drew Fustini wrote:
> Document the values in pinctrl-single,pins when #pinctrl-cells = <2>
> 
> Fixes: 27c90e5e48d0 ("ARM: dts: am33xx-l4: change #pinctrl-cells from 1 to 2")
> Reported-by: Trent Piepho <tpiepho@gmail.com>
> Link: https://lore.kernel.org/linux-omap/3139716.CMS8C0sQ7x@zen.local/
> Signed-off-by: Drew Fustini <drew@beagleboard.org>
> ---
> v2 change:
> - rephrase to make it clear that the pin conf value and pin mux value
>   are OR'd together with #pinctrl-cells = <2>
> 
> 
>  .../bindings/pinctrl/pinctrl-single.txt       | 21 ++++++++++++-------
>  1 file changed, 14 insertions(+), 7 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ARM: dts: document pinctrl-single,pins when #pinctrl-cells = 2
  2020-09-19 20:08 [PATCH v2] ARM: dts: document pinctrl-single,pins when #pinctrl-cells = 2 Drew Fustini
  2020-09-23  7:38 ` Tony Lindgren
  2020-09-29 16:51 ` Rob Herring
@ 2020-09-30  9:42 ` Linus Walleij
  2 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2020-09-30  9:42 UTC (permalink / raw)
  To: Drew Fustini
  Cc: Tony Lindgren, Rob Herring, Jason Kridner, Robert Nelson,
	Trent Piepho, Christina Quast, Linux-OMAP, linux-kernel,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list:GPIO SUBSYSTEM

On Sat, Sep 19, 2020 at 10:10 PM Drew Fustini <drew@beagleboard.org> wrote:

> Document the values in pinctrl-single,pins when #pinctrl-cells = <2>
>
> Fixes: 27c90e5e48d0 ("ARM: dts: am33xx-l4: change #pinctrl-cells from 1 to 2")
> Reported-by: Trent Piepho <tpiepho@gmail.com>
> Link: https://lore.kernel.org/linux-omap/3139716.CMS8C0sQ7x@zen.local/
> Signed-off-by: Drew Fustini <drew@beagleboard.org>
> ---
> v2 change:
> - rephrase to make it clear that the pin conf value and pin mux value
>   are OR'd together with #pinctrl-cells = <2>

Patch applied with the ACKs.

Thanks for fixing this!

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-30  9:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-19 20:08 [PATCH v2] ARM: dts: document pinctrl-single,pins when #pinctrl-cells = 2 Drew Fustini
2020-09-23  7:38 ` Tony Lindgren
2020-09-29 16:51 ` Rob Herring
2020-09-30  9:42 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).