dt-bindings: pinctrl: Update pinctrl-single to use yaml
Subsystems (3)
PATCH v6 1/1 dt-bindings: pinctrl: Update pinctrl-single to use yaml
Update binding for yaml and remove the old related txt bindings. Note that we are also adding the undocumented pinctrl-single,slew-rate property. And we only use the first example from the old binding.
---
Changes since v5:
- Fix issues noted by Krzysztof
Changes since v4:
- Removed legacy matching for pin group node names, let's fix the dts files instead to use "pins" naming with dashes. This also fixed the new warnings introduced for "not of type 'object'" for anything named pin
Changes since v3:
- Fix issues noted by Rob for v2 version that I had missed
- Categorize patternProperties a bit to make fixing dts files easier
Changes since v2:
- Drop old ti,omap-pinctrl.txt in addition to old pinctrl-single.txt
- Replace reference to pinctrl-single.txt to point to the yaml in ctrl.txt
Changes since v1:
- The v1 version was a WIP patch posted as an example in thread "dt binding check error with hash and comma"
--- .../devicetree/bindings/arm/omap/ctrl.txt | 2 +- .../bindings/pinctrl/pinctrl-single.txt | 262 ------------------ .../bindings/pinctrl/pinctrl-single.yaml | 206 ++++++++++++++ .../bindings/pinctrl/ti,omap-pinctrl.txt | 13 - 4 files changed, 207 insertions(+), 276 deletions(-) delete mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt create mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml delete mode 100644 Documentation/devicetree/bindings/pinctrl/ti,omap-pinctrl.txt
Documentation/devicetree/bindings/arm/omap/ctrl.txt +1 -1
@@ -8,7 +8,7 @@ control module driver itself. See [2] for documentation about clock/clockdomain nodes. -[1] Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt +[1] Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml [2] Documentation/devicetree/bindings/clock/ti/* Required properties:
Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt deleted +0 -262
262 lines not on this page · raw message
Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml new file +206 -0
206 lines not on this page · raw message
Documentation/devicetree/bindings/pinctrl/ti,omap-pinctrl.txt deleted +0 -13
@@ -1,13 +0,0 @@ -OMAP Pinctrl definitions - -Required properties: -- compatible : Should be one of: - "ti,omap2420-padconf" - OMAP2420 compatible pinctrl - "ti,omap2430-padconf" - OMAP2430 compatible pinctrl - "ti,omap3-padconf" - OMAP3 compatible pinctrl - "ti,omap4-padconf" - OMAP4 compatible pinctrl - "ti,omap5-padconf" - OMAP5 compatible pinctrl - "ti,dra7-padconf" - DRA7 compatible pinctrl - "ti,am437-padconf" - AM437x compatible pinctrl - -See Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt for further details.
Signature · 1 line
2.41.0
Quoted 19 lines · Tony Lindgren
Update binding for yaml and remove the old related txt bindings. Note that we are also adding the undocumented pinctrl-single,slew-rate property. And we only use the first example from the old binding.
Cc Nishanth Menon <[email protected]>Cc Vignesh Raghavendra <[email protected]>Signed-off-by Tony Lindgren <[email protected]>---
Changes since v5:
- Fix issues noted by KrzysztofDocumentation/devicetree/bindings/pinctrl/pinctrl-single.yaml new file +0
-0
Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml line 7
Quoted 7 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml new file +7
-0@@ -0,0 +1,206 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/pinctrl-single.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Pinctrl driver for hardware with a single register for one or more pins
I asked to drop the driver references but it is still here. Bindings are not describing drivers.
"Generic Pin Controller with a Single Register for One or More Pins"
Quoted 81 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml new file +81
-0+ +maintainers: + - Tony Lindgren <[email protected]> + +description: + Some pin controller devices use a single register for one or more pins. The + range of pin control registers can vary from one to many for each controller + instance. Some SoCs from Altera, Broadcom, HiSilicon, Ralink, and TI have this + kind of pin controller instances. + +properties: + compatible: + oneOf: + - enum: + - pinctrl-single + - pinconf-single + - items: + - enum: + - ti,am437-padconf + - ti,dra7-padconf + - ti,omap2420-padconf + - ti,omap2430-padconf + - ti,omap3-padconf + - ti,omap4-padconf + - ti,omap5-padconf + - const: pinctrl-single + + reg: + maxItems: 1 + + interrupt-controller: true + + '#interrupt-cells': + const: 1 + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + '#pinctrl-cells': + description: + Number of cells. Usually 2, consisting of register offset, pin configuration + value, and pinmux mode. Some controllers may use 1 for just offset and value. + enum: [ 1, 2 ] + + pinctrl-single,bit-per-mux: + description: Optional flag to indicate register controls more than one pin + type: boolean + + pinctrl-single,function-mask: + description: Mask of the allowed register bits + $ref: /schemas/types.yaml#/definitions/uint32 + + pinctrl-single,function-off: + description: Optional function off mode for disabled state + $ref: /schemas/types.yaml#/definitions/uint32 + + pinctrl-single,register-width: + description: Width of pin specific bits in the register + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 8, 16, 32 ] + + pinctrl-single,gpio-range: + description: Optional list of pin base, nr pins & gpio function + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + - items: + - description: phandle of a gpio-range node + - description: pin base + - description: number of pins + - description: gpio function + + '#gpio-range-cells': + description: No longer needed, may exist in older files for gpio-ranges + deprecated: true + const: 3 + + gpio-range: + description: Optional node for gpio range cells
Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml line 98
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml new file +10
-0+ type: object + additionalProperties: false + properties: + '#pinctrl-single,gpio-range-cells': + description: Number of gpio range cells + const: 3 + $ref: /schemas/types.yaml#/definitions/uint32 + +patternProperties: + '-pins$|-pin':
you did not implement my comments fully, probably we misunderstood each other. Why do you allow anything after '-pin'? Let's make it pure suffix for both cases: '-pins?$'
Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml line 104
Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml new file +6
-0+ description: + Pin group node name using naming ending in -pins, or having -pin + in the node name + type: object + additionalProperties: false +
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 7 lines · Krzysztof Kozlowski
Quoted 1 line · Tony Lindgren
+title: Pinctrl driver for hardware with a single register for one or more pins
I asked to drop the driver references but it is still here. Bindings are not describing drivers.
"Generic Pin Controller with a Single Register for One or More Pins"
Oh right it's supposed to describe hardware, will update thanks.
Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml line 98
Quoted 2 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml new file +2
-0+patternProperties: + '-pins$|-pin':you did not implement my comments fully, probably we misunderstood each other. Why do you allow anything after '-pin'? Let's make it pure suffix for both cases: '-pins?$'
I'll check what kind of node renaming that would cause. At least TI arm64 SoCs use naming like -pins-default and -pins-wakeup. Is your preference to rename all those nodes to -default-pins and -wakeup-pins?
Regards,
Tony
Quoted 14 lines · Tony Lindgren
Quoted 7 lines · Krzysztof Kozlowski
Quoted 1 line · Tony Lindgren
+title: Pinctrl driver for hardware with a single register for one or more pins
I asked to drop the driver references but it is still here. Bindings are not describing drivers.
"Generic Pin Controller with a Single Register for One or More Pins"
Oh right it's supposed to describe hardware, will update thanks.
Quoted 3 lines
Quoted 2 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml new file +2
-0+patternProperties: + '-pins$|-pin':
Quoted 7 lines
Quoted 3 lines
you did not implement my comments fully, probably we misunderstood each other. Why do you allow anything after '-pin'? Let's make it pure suffix for both cases: '-pins?$'
I'll check what kind of node renaming that would cause. At least TI arm64 SoCs use naming like -pins-default and -pins-wakeup. Is your preference to rename all those nodes to -default-pins and -wakeup-pins?
No, pattern matching TI SoC is fine, but your current also doesn't. Or rather - matches by mistake. You do not allow anything after -pins.
Best regards,
Krzysztof
Quoted 10 lines · Krzysztof Kozlowski
Quoted 9 lines · Tony Lindgren
Quoted 7 lines · Krzysztof Kozlowski
Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml line 98
Quoted 2 lines · Tony Lindgren
Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml new file +2
-0+patternProperties: + '-pins$|-pin':you did not implement my comments fully, probably we misunderstood each other. Why do you allow anything after '-pin'? Let's make it pure suffix for both cases: '-pins?$'
Quoted 6 lines
Quoted 3 lines
I'll check what kind of node renaming that would cause. At least TI arm64 SoCs use naming like -pins-default and -pins-wakeup. Is your preference to rename all those nodes to -default-pins and -wakeup-pins?
No, pattern matching TI SoC is fine, but your current also doesn't. Or rather - matches by mistake. You do not allow anything after -pins.
So after the earlier dts node name clean-up, looks like it's only few hundred TI pins to rename. Not sure I want to add SoC specific handling for TI. Folks will try to use -pins-default, -pins-sleep, -pins-idle etc..
How about let's just fix the remaining dts files and then we can only allow -pin or -pins suffix? The match would be just '-pins$|-pin$ with a preference for -pins as it's a group that might get more pins added to it later on.
Regards,
Tony