The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: pwm: Convert TI PWM Subsystem to DT schema
@ 2026-08-11  9:22 Eduard Bostina
  2026-08-11 17:48 ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Eduard Bostina @ 2026-08-11  9:22 UTC (permalink / raw)
  To: Conor Dooley, devicetree, Eduard Bostina, Krzysztof Kozlowski,
	linux-kernel, linux-pwm, Rob Herring, Uwe Kleine-König
  Cc: daniel.baluta, simona.toaca, goledhruva, m-chawdhry

Convert the Texas Instruments SoC PWM Subsystem bindings
to DT schema.

During the conversion, the following updates were made:
- 'counter' node was added to the allowed child nodes
  list to resolve dtbs_check warnings. Some eqep nodes
  use 'counter' instead of 'eqep'.

Signed-off-by: Eduard Bostina <egbostina@gmail.com>
---
 .../devicetree/bindings/pwm/pwm-tipwmss.txt   | 58 --------------
 .../devicetree/bindings/pwm/ti,pwmss.yaml     | 77 +++++++++++++++++++
 2 files changed, 77 insertions(+), 58 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt
 create mode 100644 Documentation/devicetree/bindings/pwm/ti,pwmss.yaml

diff --git a/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt b/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt
deleted file mode 100644
index 4633697fbda1..000000000000
--- a/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-TI SOC based PWM Subsystem
-
-Required properties:
-- compatible: Must be "ti,<soc>-pwmss".
-  for am33xx  - compatible = "ti,am33xx-pwmss";
-  for am4372  - compatible = "ti,am4372-pwmss","ti,am33xx-pwmss";
-  for dra746 - compatible = "ti,dra746-pwmss", "ti,am33xx-pwmss"
-
-- reg: physical base address and size of the registers map.
-- address-cells: Specify the number of u32 entries needed in child nodes.
-		  Should set to 1.
-- size-cells: specify number of u32 entries needed to specify child nodes size
-		in reg property. Should set to 1.
-- ranges: describes the address mapping of a memory-mapped bus. Should set to
-	   physical address map of child's base address, physical address within
-	   parent's address  space and length of the address map. For am33xx,
-	   3 set of child register maps present, ECAP register space, EQEP
-	   register space, EHRPWM register space.
-
-Also child nodes should also populated under PWMSS DT node.
-
-Example:
-epwmss0: epwmss@48300000 { /* PWMSS for am33xx */
-	compatible = "ti,am33xx-pwmss";
-	reg = <0x48300000 0x10>;
-	ti,hwmods = "epwmss0";
-	#address-cells = <1>;
-	#size-cells = <1>;
-	ranges = <0x48300100 0x48300100 0x80   /* ECAP */
-		  0x48300180 0x48300180 0x80   /* EQEP */
-		  0x48300200 0x48300200 0x80>; /* EHRPWM */
-
-	/* child nodes go here */
-};
-
-epwmss0: epwmss@48300000 { /* PWMSS for am4372 */
-	compatible = "ti,am4372-pwmss","ti,am33xx-pwmss"
-	reg = <0x48300000 0x10>;
-	ti,hwmods = "epwmss0";
-	#address-cells = <1>;
-	#size-cells = <1>;
-	ranges = <0x48300100 0x48300100 0x80   /* ECAP */
-		  0x48300180 0x48300180 0x80   /* EQEP */
-		  0x48300200 0x48300200 0x80>; /* EHRPWM */
-
-	/* child nodes go here */
-};
-
-epwmss0: epwmss@4843e000 { /* PWMSS for DRA7xx */
-	compatible = "ti,dra746-pwmss", "ti,am33xx-pwmss";
-	reg = <0x4843e000 0x30>;
-	ti,hwmods = "epwmss0";
-	#address-cells = <1>;
-	#size-cells = <1>;
-	ranges;
-
-	/* child nodes go here */
-};
diff --git a/Documentation/devicetree/bindings/pwm/ti,pwmss.yaml b/Documentation/devicetree/bindings/pwm/ti,pwmss.yaml
new file mode 100644
index 000000000000..53f88139dcd4
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/ti,pwmss.yaml
@@ -0,0 +1,77 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/ti,pwmss.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments SoC PWM Subsystem
+
+maintainers:
+  - Eduard Bostina <egbostina@gmail.com>
+
+properties:
+  compatible:
+    oneOf:
+      - const: ti,am33xx-pwmss
+      - items:
+          - enum:
+              - ti,am4372-pwmss
+              - ti,dra746-pwmss
+          - const: ti,am33xx-pwmss
+
+  reg:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1
+
+  ranges: true
+
+patternProperties:
+  "^(ecap|eqep|pwm|counter)@[0-9a-f]+$":
+    type: object
+    description: Child nodes for ECAP, EQEP (counter), and EHRPWM
+
+required:
+  - compatible
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+  - ranges
+
+additionalProperties: false
+
+examples:
+  - |
+    pwm@48300000 { /* PWMSS for am33xx */
+        compatible = "ti,am33xx-pwmss";
+        reg = <0x48300000 0x10>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x48300100 0x48300100 0x80>,   /* ECAP */
+                 <0x48300180 0x48300180 0x80>,   /* EQEP */
+                 <0x48300200 0x48300200 0x80>;   /* EHRPWM */
+    };
+
+  - |
+    pwm@48300000 { /* PWMSS for am4372 */
+        compatible = "ti,am4372-pwmss", "ti,am33xx-pwmss";
+        reg = <0x48300000 0x10>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x48300100 0x48300100 0x80>,   /* ECAP */
+                 <0x48300180 0x48300180 0x80>,   /* EQEP */
+                 <0x48300200 0x48300200 0x80>;   /* EHRPWM */
+    };
+
+  - |
+    pwm@4843e000 { /* PWMSS for DRA7xx */
+        compatible = "ti,dra746-pwmss", "ti,am33xx-pwmss";
+        reg = <0x4843e000 0x30>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges;
+    };
-- 
2.43.0


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

* Re: [PATCH] dt-bindings: pwm: Convert TI PWM Subsystem to DT schema
  2026-08-11  9:22 [PATCH] dt-bindings: pwm: Convert TI PWM Subsystem to DT schema Eduard Bostina
@ 2026-08-11 17:48 ` Rob Herring
  2026-08-11 22:58   ` Uwe Kleine-König
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2026-08-11 17:48 UTC (permalink / raw)
  To: Eduard Bostina
  Cc: Conor Dooley, devicetree, Krzysztof Kozlowski, linux-kernel,
	linux-pwm, Uwe Kleine-König, daniel.baluta, simona.toaca,
	goledhruva, m-chawdhry

On Tue, Aug 11, 2026 at 09:22:08AM +0000, Eduard Bostina wrote:
> Convert the Texas Instruments SoC PWM Subsystem bindings
> to DT schema.
> 
> During the conversion, the following updates were made:
> - 'counter' node was added to the allowed child nodes
>   list to resolve dtbs_check warnings. Some eqep nodes
>   use 'counter' instead of 'eqep'.
> 
> Signed-off-by: Eduard Bostina <egbostina@gmail.com>
> ---
>  .../devicetree/bindings/pwm/pwm-tipwmss.txt   | 58 --------------
>  .../devicetree/bindings/pwm/ti,pwmss.yaml     | 77 +++++++++++++++++++
>  2 files changed, 77 insertions(+), 58 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt
>  create mode 100644 Documentation/devicetree/bindings/pwm/ti,pwmss.yaml
> 
> diff --git a/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt b/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt
> deleted file mode 100644
> index 4633697fbda1..000000000000
> --- a/Documentation/devicetree/bindings/pwm/pwm-tipwmss.txt
> +++ /dev/null
> @@ -1,58 +0,0 @@
> -TI SOC based PWM Subsystem
> -
> -Required properties:
> -- compatible: Must be "ti,<soc>-pwmss".
> -  for am33xx  - compatible = "ti,am33xx-pwmss";
> -  for am4372  - compatible = "ti,am4372-pwmss","ti,am33xx-pwmss";
> -  for dra746 - compatible = "ti,dra746-pwmss", "ti,am33xx-pwmss"
> -
> -- reg: physical base address and size of the registers map.
> -- address-cells: Specify the number of u32 entries needed in child nodes.
> -		  Should set to 1.
> -- size-cells: specify number of u32 entries needed to specify child nodes size
> -		in reg property. Should set to 1.
> -- ranges: describes the address mapping of a memory-mapped bus. Should set to
> -	   physical address map of child's base address, physical address within
> -	   parent's address  space and length of the address map. For am33xx,
> -	   3 set of child register maps present, ECAP register space, EQEP
> -	   register space, EHRPWM register space.
> -
> -Also child nodes should also populated under PWMSS DT node.
> -
> -Example:
> -epwmss0: epwmss@48300000 { /* PWMSS for am33xx */
> -	compatible = "ti,am33xx-pwmss";
> -	reg = <0x48300000 0x10>;
> -	ti,hwmods = "epwmss0";
> -	#address-cells = <1>;
> -	#size-cells = <1>;
> -	ranges = <0x48300100 0x48300100 0x80   /* ECAP */
> -		  0x48300180 0x48300180 0x80   /* EQEP */
> -		  0x48300200 0x48300200 0x80>; /* EHRPWM */
> -
> -	/* child nodes go here */
> -};
> -
> -epwmss0: epwmss@48300000 { /* PWMSS for am4372 */
> -	compatible = "ti,am4372-pwmss","ti,am33xx-pwmss"
> -	reg = <0x48300000 0x10>;
> -	ti,hwmods = "epwmss0";
> -	#address-cells = <1>;
> -	#size-cells = <1>;
> -	ranges = <0x48300100 0x48300100 0x80   /* ECAP */
> -		  0x48300180 0x48300180 0x80   /* EQEP */
> -		  0x48300200 0x48300200 0x80>; /* EHRPWM */
> -
> -	/* child nodes go here */
> -};
> -
> -epwmss0: epwmss@4843e000 { /* PWMSS for DRA7xx */
> -	compatible = "ti,dra746-pwmss", "ti,am33xx-pwmss";
> -	reg = <0x4843e000 0x30>;
> -	ti,hwmods = "epwmss0";
> -	#address-cells = <1>;
> -	#size-cells = <1>;
> -	ranges;
> -
> -	/* child nodes go here */
> -};
> diff --git a/Documentation/devicetree/bindings/pwm/ti,pwmss.yaml b/Documentation/devicetree/bindings/pwm/ti,pwmss.yaml
> new file mode 100644
> index 000000000000..53f88139dcd4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pwm/ti,pwmss.yaml
> @@ -0,0 +1,77 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pwm/ti,pwmss.yaml#

ti,am33xx-pwmss.yaml for the filename.

> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments SoC PWM Subsystem
> +
> +maintainers:
> +  - Eduard Bostina <egbostina@gmail.com>
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - const: ti,am33xx-pwmss
> +      - items:
> +          - enum:
> +              - ti,am4372-pwmss
> +              - ti,dra746-pwmss
> +          - const: ti,am33xx-pwmss
> +
> +  reg:
> +    maxItems: 1
> +
> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 1
> +
> +  ranges: true
> +
> +patternProperties:
> +  "^(ecap|eqep|pwm|counter)@[0-9a-f]+$":
> +    type: object
> +    description: Child nodes for ECAP, EQEP (counter), and EHRPWM

       required:
         - compatible

> +
> +required:
> +  - compatible
> +  - reg
> +  - "#address-cells"
> +  - "#size-cells"
> +  - ranges
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    pwm@48300000 { /* PWMSS for am33xx */
> +        compatible = "ti,am33xx-pwmss";
> +        reg = <0x48300000 0x10>;
> +        #address-cells = <1>;
> +        #size-cells = <1>;
> +        ranges = <0x48300100 0x48300100 0x80>,   /* ECAP */
> +                 <0x48300180 0x48300180 0x80>,   /* EQEP */
> +                 <0x48300200 0x48300200 0x80>;   /* EHRPWM */
> +    };
> +
> +  - |
> +    pwm@48300000 { /* PWMSS for am4372 */
> +        compatible = "ti,am4372-pwmss", "ti,am33xx-pwmss";
> +        reg = <0x48300000 0x10>;
> +        #address-cells = <1>;
> +        #size-cells = <1>;
> +        ranges = <0x48300100 0x48300100 0x80>,   /* ECAP */
> +                 <0x48300180 0x48300180 0x80>,   /* EQEP */
> +                 <0x48300200 0x48300200 0x80>;   /* EHRPWM */
> +    };
> +
> +  - |
> +    pwm@4843e000 { /* PWMSS for DRA7xx */
> +        compatible = "ti,dra746-pwmss", "ti,am33xx-pwmss";
> +        reg = <0x4843e000 0x30>;
> +        #address-cells = <1>;
> +        #size-cells = <1>;
> +        ranges;
> +    };

One example is enough.

Rob


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

* Re: [PATCH] dt-bindings: pwm: Convert TI PWM Subsystem to DT schema
  2026-08-11 17:48 ` Rob Herring
@ 2026-08-11 22:58   ` Uwe Kleine-König
  0 siblings, 0 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2026-08-11 22:58 UTC (permalink / raw)
  To: Rob Herring
  Cc: Eduard Bostina, Conor Dooley, devicetree, Krzysztof Kozlowski,
	linux-kernel, linux-pwm, daniel.baluta, simona.toaca, goledhruva,
	m-chawdhry

[-- Attachment #1: Type: text/plain, Size: 1400 bytes --]

On Tue, Aug 11, 2026 at 12:48:08PM -0500, Rob Herring wrote:
> On Tue, Aug 11, 2026 at 09:22:08AM +0000, Eduard Bostina wrote:
> > +examples:
> > +  - |
> > +    pwm@48300000 { /* PWMSS for am33xx */
> > +        compatible = "ti,am33xx-pwmss";
> > +        reg = <0x48300000 0x10>;
> > +        #address-cells = <1>;
> > +        #size-cells = <1>;
> > +        ranges = <0x48300100 0x48300100 0x80>,   /* ECAP */
> > +                 <0x48300180 0x48300180 0x80>,   /* EQEP */
> > +                 <0x48300200 0x48300200 0x80>;   /* EHRPWM */
> > +    };
> > +
> > +  - |
> > +    pwm@48300000 { /* PWMSS for am4372 */
> > +        compatible = "ti,am4372-pwmss", "ti,am33xx-pwmss";
> > +        reg = <0x48300000 0x10>;
> > +        #address-cells = <1>;
> > +        #size-cells = <1>;
> > +        ranges = <0x48300100 0x48300100 0x80>,   /* ECAP */
> > +                 <0x48300180 0x48300180 0x80>,   /* EQEP */
> > +                 <0x48300200 0x48300200 0x80>;   /* EHRPWM */
> > +    };
> > +
> > +  - |
> > +    pwm@4843e000 { /* PWMSS for DRA7xx */
> > +        compatible = "ti,dra746-pwmss", "ti,am33xx-pwmss";
> > +        reg = <0x4843e000 0x30>;
> > +        #address-cells = <1>;
> > +        #size-cells = <1>;
> > +        ranges;
> > +    };
> 
> One example is enough.

Also it would be nice if that one example included the actual PWM.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2026-08-11 22:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-11  9:22 [PATCH] dt-bindings: pwm: Convert TI PWM Subsystem to DT schema Eduard Bostina
2026-08-11 17:48 ` Rob Herring
2026-08-11 22:58   ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox