Skip to contentSkip to conversation

ARM: dts: document pinctrl-single,pins when #pinctrl-cells = 2

PATCH In review Drew Fustini 4 participants 4 messages Sep 19, 2020 – Sep 30, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: dts: document pinctrl-single,pins when #pinctrl-cells = 2

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

Fixes 27c90e5e48d0 ("ARM: dts: am33xx-l4: change #pinctrl-cells from 1 to 2")

---
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(-)
Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt +14 -7
index e705acd3612c..f903eb4471f8 100644
@@ -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:
Signature · 1 line
2.25.1
Acked-by on v2 1/1
#1 lore raw
Quoted 10 lines · 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")

---
v2 change:
- rephrase to make it clear that the pin conf value and pin mux value are OR'd together with #pinctrl-cells = <2>

Quoted 41 lines
 .../bindings/pinctrl/pinctrl-single.txt       | 21 ++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)
Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt +14 -7
index e705acd3612c..f903eb4471f8 100644
@@ -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:
Signature · 1 line
2.25.1
maintainer Reviewed-by on v2 1/1
#2 lore raw
In reply to Drew Fustini
Quoted 6 lines · 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")
Quoted 9 lines

---
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(-)
#3 lore raw
In reply to Drew Fustini
Quoted 10 lines · 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")

---
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