* [PATCH] dt-bindings: pinctrl: ti,dra7-iodelay: Convert to DT schema
@ 2026-07-13 12:42 Bhargav Joshi
2026-07-13 12:57 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Bhargav Joshi @ 2026-07-13 12:42 UTC (permalink / raw)
To: Linus Walleij, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-gpio, devicetree, linux-kernel, goledhruva, m-chawdhry,
daniel.baluta, simona.toaca, j.bhargav.u
Convert TI IODELAY controller from text to DT schema. Document child
properties missing from text bindings for proper validation.
Signed-off-by: Bhargav Joshi <j.bhargav.u@gmail.com>
---
.../bindings/pinctrl/ti,dra7-iodelay.yaml | 78 ++++++++++++++++++++++
.../devicetree/bindings/pinctrl/ti,iodelay.txt | 47 -------------
2 files changed, 78 insertions(+), 47 deletions(-)
diff --git a/Documentation/devicetree/bindings/pinctrl/ti,dra7-iodelay.yaml b/Documentation/devicetree/bindings/pinctrl/ti,dra7-iodelay.yaml
new file mode 100644
index 000000000000..a399946ae817
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/ti,dra7-iodelay.yaml
@@ -0,0 +1,78 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/ti,dra7-iodelay.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Pin configuration for TI IODELAY controller
+
+maintainers:
+ - Bhargav Joshi <j.bhargav.u@gmail.com>
+
+description:
+ TI dra7 based SoCs such as am57xx have a controller for setting the IO delay
+ for each pin. For most part the IO delay values are programmed by the
+ bootloader, but some pins need to be configured dynamically by the kernel such
+ as the MMC pins.
+
+properties:
+ compatible:
+ const: ti,dra7-iodelay
+
+ reg:
+ maxItems: 1
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+ '#pinctrl-cells':
+ const: 2
+
+patternProperties:
+ ^mmc.*_conf$:
+ type: object
+ additionalProperties: false
+ properties:
+ pinctrl-pin-array:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description: |
+ An array of 32-bit integers defining the pin delay configuration.
+
+required:
+ - compatible
+ - reg
+ - '#address-cells'
+ - '#size-cells'
+ - '#pinctrl-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/pinctrl/dra.h>
+
+ padconf@4844a000 {
+ compatible = "ti,dra7-iodelay";
+ reg = <0x4844a000 0x0d1c>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #pinctrl-cells = <2>;
+
+ mmc2_iodelay_3v3_conf {
+ pinctrl-pin-array = <
+ 0x18c A_DELAY_PS(0) G_DELAY_PS(120) /* CFG_GPMC_A19_IN */
+ 0x1a4 A_DELAY_PS(265) G_DELAY_PS(360) /* CFG_GPMC_A20_IN */
+ 0x1b0 A_DELAY_PS(0) G_DELAY_PS(120) /* CFG_GPMC_A21_IN */
+ 0x1bc A_DELAY_PS(0) G_DELAY_PS(120) /* CFG_GPMC_A22_IN */
+ 0x1c8 A_DELAY_PS(287) G_DELAY_PS(420) /* CFG_GPMC_A23_IN */
+ 0x1d4 A_DELAY_PS(144) G_DELAY_PS(240) /* CFG_GPMC_A24_IN */
+ 0x1e0 A_DELAY_PS(0) G_DELAY_PS(0) /* CFG_GPMC_A25_IN */
+ 0x1ec A_DELAY_PS(120) G_DELAY_PS(0) /* CFG_GPMC_A26_IN */
+ 0x1f8 A_DELAY_PS(120) G_DELAY_PS(180) /* CFG_GPMC_A27_IN */
+ 0x360 A_DELAY_PS(0) G_DELAY_PS(0) /* CFG_GPMC_CS1_IN */
+ >;
+ };
+ };
diff --git a/Documentation/devicetree/bindings/pinctrl/ti,iodelay.txt b/Documentation/devicetree/bindings/pinctrl/ti,iodelay.txt
deleted file mode 100644
index c3ed1232b6a3..000000000000
--- a/Documentation/devicetree/bindings/pinctrl/ti,iodelay.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-* Pin configuration for TI IODELAY controller
-
-TI dra7 based SoCs such as am57xx have a controller for setting the IO delay
-for each pin. For most part the IO delay values are programmed by the bootloader,
-but some pins need to be configured dynamically by the kernel such as the
-MMC pins.
-
-Required Properties:
-
- - compatible: Must be "ti,dra7-iodelay"
- - reg: Base address and length of the memory resource used
- - #address-cells: Number of address cells
- - #size-cells: Size of cells
- - #pinctrl-cells: Number of pinctrl cells, must be 2. See also
- Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
-
-Example
--------
-
-In the SoC specific dtsi file:
-
- dra7_iodelay_core: padconf@4844a000 {
- compatible = "ti,dra7-iodelay";
- reg = <0x4844a000 0x0d1c>;
- #address-cells = <1>;
- #size-cells = <0>;
- #pinctrl-cells = <2>;
- };
-
-In board-specific file:
-
-&dra7_iodelay_core {
- mmc2_iodelay_3v3_conf: mmc2_iodelay_3v3_conf {
- pinctrl-pin-array = <
- 0x18c A_DELAY_PS(0) G_DELAY_PS(120) /* CFG_GPMC_A19_IN */
- 0x1a4 A_DELAY_PS(265) G_DELAY_PS(360) /* CFG_GPMC_A20_IN */
- 0x1b0 A_DELAY_PS(0) G_DELAY_PS(120) /* CFG_GPMC_A21_IN */
- 0x1bc A_DELAY_PS(0) G_DELAY_PS(120) /* CFG_GPMC_A22_IN */
- 0x1c8 A_DELAY_PS(287) G_DELAY_PS(420) /* CFG_GPMC_A23_IN */
- 0x1d4 A_DELAY_PS(144) G_DELAY_PS(240) /* CFG_GPMC_A24_IN */
- 0x1e0 A_DELAY_PS(0) G_DELAY_PS(0) /* CFG_GPMC_A25_IN */
- 0x1ec A_DELAY_PS(120) G_DELAY_PS(0) /* CFG_GPMC_A26_IN */
- 0x1f8 A_DELAY_PS(120) G_DELAY_PS(180) /* CFG_GPMC_A27_IN */
- 0x360 A_DELAY_PS(0) G_DELAY_PS(0) /* CFG_GPMC_CS1_IN */
- >;
- };
-};
---
base-commit: 1e9cdc2ea15adf4a821eefedabf6c0c8cf0b6a55
change-id: 20260706-ti-iodelay-26f796fc4f6f
Best regards,
--
Bhargav
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] dt-bindings: pinctrl: ti,dra7-iodelay: Convert to DT schema
2026-07-13 12:42 [PATCH] dt-bindings: pinctrl: ti,dra7-iodelay: Convert to DT schema Bhargav Joshi
@ 2026-07-13 12:57 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-07-13 12:57 UTC (permalink / raw)
To: Bhargav Joshi; +Cc: robh, devicetree, conor+dt
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The child node regex `^mmc.*_conf$` arbitrarily restricts I/O delay configuration nodes to those starting with 'mmc', even though the controller is generic.
- [Medium] The `pinctrl-pin-array` property is not marked as required within the child node schema.
--
--- Patch [1]: [PATCH] dt-bindings: pinctrl: ti,dra7-iodelay: Convert to DT schema ---
commit 59d5959fa2ce86d89ce637daf5f846ce2bedcb0d
Author: Bhargav Joshi <j.bhargav.u@gmail.com>
dt-bindings: pinctrl: ti,dra7-iodelay: Convert to DT schema
This commit converts the TI IODELAY controller bindings from plain text
to DT schema. It also adds documentation for child properties missing
from the original text bindings.
> diff --git a/Documentation/devicetree/bindings/pinctrl/ti,dra7-iodelay.yaml b/Documentation/devicetree/bindings/pinctrl/ti,dra7-iodelay.yaml
> new file mode 100644
> index 0000000000000..a399946ae8172
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/ti,dra7-iodelay.yaml
[ ... ]
> +patternProperties:
> + ^mmc.*_conf$:
[Severity: Medium]
Looking at the patternProperties definition, does this regression arbitrarily
restrict delay configuration nodes to only those starting with mmc?
The commit message mentions that mmc pins are just an example of pins
needing dynamic configuration. If a device tree dynamically configures delay
for other pins, will this reject them as invalid?
Would it be better to use a more generic pattern?
> + type: object
> + additionalProperties: false
> + properties:
> + pinctrl-pin-array:
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + description: |
> + An array of 32-bit integers defining the pin delay configuration.
[Severity: Medium]
Could this regression allow incomplete configuration nodes to pass schema
validation?
Since pinctrl-pin-array is not marked as required, an empty child node would
pass dt_binding_check, but the driver expects this property to be present
to initialize the mapping. Should it be added to a required list within the
patternProperties block?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260713-ti-iodelay-v1-1-5f06d36c4aac@gmail.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-13 12:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-13 12:42 [PATCH] dt-bindings: pinctrl: ti,dra7-iodelay: Convert to DT schema Bhargav Joshi
2026-07-13 12:57 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox