[PATCH v2 9/9] dt-bindings: mfd: twl: Add missing sub-nodes for TWL4030 & TWL603x

Jihed Chaibi posted 9 patches 1 month, 3 weeks ago
There is a newer version of this series
[PATCH v2 9/9] dt-bindings: mfd: twl: Add missing sub-nodes for TWL4030 & TWL603x
Posted by Jihed Chaibi 1 month, 3 weeks ago
Update the TI TWL family Device Tree binding to include additional
subnodes for TWL4030, TWL6030, and TWL6032 devices.

This patch enhances the schema by adding support for audio, GPIO, power,
keypad, PWM, PWM LED, and USB subnodes, referencing their respective YAML
schemas where applicable. These additions improve the schema's
completeness, enabling better validation and documentation of the
TWL multi-function device's capabilities.

The changes ensure proper handling of TWL4030-specific features (audio,
keypad, PWM, PWM LED, USB, GPIO, and power) and TWL6030/TWL6032-specific
features (PWM, PWM LED, and USB), with appropriate schema references to
prevent unevaluated properties.

Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
---
 .../devicetree/bindings/mfd/ti,twl.yaml       | 63 +++++++++++++++++++
 1 file changed, 63 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/ti,twl.yaml b/Documentation/devicetree/bindings/mfd/ti,twl.yaml
index f162ab60c..81f9d8f72 100644
--- a/Documentation/devicetree/bindings/mfd/ti,twl.yaml
+++ b/Documentation/devicetree/bindings/mfd/ti,twl.yaml
@@ -76,6 +76,38 @@ allOf:
           properties:
             compatible:
               const: ti,twl4030-wdt
+
+        audio:
+          type: object
+          $ref: /schemas/sound/ti,twl4030-audio.yaml#
+          unevaluatedProperties: false
+
+        keypad:
+          type: object
+          $ref: /schemas/input/ti,twl4030-keypad.yaml#
+          unevaluatedProperties: false
+
+        pwm:
+          type: object
+          $ref: /schemas/pwm/ti,twl-pwm.yaml#
+          unevaluatedProperties: false
+
+        pwmled:
+          type: object
+          $ref: /schemas/pwm/ti,twl-pwmled.yaml#
+          unevaluatedProperties: false
+
+        'twl4030-usb':
+          type: object
+          $ref: /schemas/usb/ti,twlxxxx-usb.yaml#
+          unevaluatedProperties: false
+
+        gpio:
+          type: object
+
+        power:
+          type: object
+
   - if:
       properties:
         compatible:
@@ -115,6 +147,22 @@ allOf:
           properties:
             compatible:
               const: ti,twl6030-gpadc
+
+        pwm:
+          type: object
+          $ref: /schemas/pwm/ti,twl-pwm.yaml#
+          unevaluatedProperties: false
+
+        pwmled:
+          type: object
+          $ref: /schemas/pwm/ti,twl-pwmled.yaml#
+          unevaluatedProperties: false
+
+        'twl6030-usb':
+          type: object
+          $ref: /schemas/usb/ti,twlxxxx-usb.yaml#
+          unevaluatedProperties: false
+
   - if:
       properties:
         compatible:
@@ -154,6 +202,21 @@ allOf:
             compatible:
               const: ti,twl6032-gpadc
 
+        pwm:
+          type: object
+          $ref: /schemas/pwm/ti,twl-pwm.yaml#
+          unevaluatedProperties: false
+
+        pwmled:
+          type: object
+          $ref: /schemas/pwm/ti,twl-pwmled.yaml#
+          unevaluatedProperties: false
+
+        'twl6030-usb':
+          type: object
+          $ref: /schemas/usb/ti,twlxxxx-usb.yaml
+          unevaluatedProperties: false
+
 properties:
   compatible:
     description:
-- 
2.39.5
Re: [PATCH v2 9/9] dt-bindings: mfd: twl: Add missing sub-nodes for TWL4030 & TWL603x
Posted by Andreas Kemnade 1 month, 3 weeks ago
Am Thu, 14 Aug 2025 15:21:29 +0200
schrieb Jihed Chaibi <jihed.chaibi.dev@gmail.com>:

> Update the TI TWL family Device Tree binding to include additional
> subnodes for TWL4030, TWL6030, and TWL6032 devices.
> 
> This patch enhances the schema by adding support for audio, GPIO, power,
> keypad, PWM, PWM LED, and USB subnodes, referencing their respective YAML
> schemas where applicable. These additions improve the schema's
> completeness, enabling better validation and documentation of the
> TWL multi-function device's capabilities.
> 
> The changes ensure proper handling of TWL4030-specific features (audio,
> keypad, PWM, PWM LED, USB, GPIO, and power) and TWL6030/TWL6032-specific
> features (PWM, PWM LED, and USB), with appropriate schema references to
> prevent unevaluated properties.
> 
> Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
> ---
>  .../devicetree/bindings/mfd/ti,twl.yaml       | 63 +++++++++++++++++++
>  1 file changed, 63 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/ti,twl.yaml b/Documentation/devicetree/bindings/mfd/ti,twl.yaml
> index f162ab60c..81f9d8f72 100644
> --- a/Documentation/devicetree/bindings/mfd/ti,twl.yaml
> +++ b/Documentation/devicetree/bindings/mfd/ti,twl.yaml
> @@ -76,6 +76,38 @@ allOf:
>            properties:
>              compatible:
>                const: ti,twl4030-wdt
> +
> +        audio:
> +          type: object
> +          $ref: /schemas/sound/ti,twl4030-audio.yaml#
> +          unevaluatedProperties: false
> +
> +        keypad:
> +          type: object
> +          $ref: /schemas/input/ti,twl4030-keypad.yaml#
> +          unevaluatedProperties: false
> +
> +        pwm:
> +          type: object
> +          $ref: /schemas/pwm/ti,twl-pwm.yaml#
> +          unevaluatedProperties: false
> +
> +        pwmled:
> +          type: object
> +          $ref: /schemas/pwm/ti,twl-pwmled.yaml#
> +          unevaluatedProperties: false
> +
I think the pwm stuff is so simple, that it can go in here directly.

> +        'twl4030-usb':
> +          type: object
> +          $ref: /schemas/usb/ti,twlxxxx-usb.yaml#
> +          unevaluatedProperties: false
> +
> +        gpio:
> +          type: object
> +
$ref it to restrict compatibles.

> +        power:
> +          type: object
> +
just list the compatibles allowed here.


Regards,
Andreas