Skip to contentSkip to conversation

dt-bindings: mfd: twl: Add missing sub-nodes for TWL4030 & TWL603x

PATCH Superseded Jihed Chaibi 2 participants 2 messages Aug 30, 2025 – Sep 1, 2025

Subsystems (3)

v4 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 dt-bindings: mfd: twl: Add missing sub-nodes for TWL4030 & TWL603x

Update the main TI TWL-family binding to be self-contained and to fix pre-existing validation errors.

Following maintainer feedback, the simple power and PWM bindings are now defined directly within this file, and their legacy .txt files are removed.

To ensure future patches are bisectable, child nodes whose bindings are in other patches (audio, keypad, usb, etc.) are now defined using a flexible 'additionalProperties: true' pattern. This removes hard dependencies between the MFD and subsystem bindings.

The complete dtbs_check for this binding is clean except for two warnings originating from pre-existing bugs in the OMAP DTS files, for which fixes have already been submitted separately [1][2].

---
Changes in v4:
- Reworked binding to be independent and bisectable per maintainer feedback by using 'additionalProperties: true' for child nodes.
- Added board-specific compatibles to the 'power' node enum.
- Added definitions for 'clocks' and 'clock-names' properties.
- Renamed 'twl6030-usb' child node to 'usb-comparator' to match existing Device Tree usage (twl6030.dtsi).
- Fixed some spelling/grammar erros in the description.

Changes in v3:
- New patch to consolidate simple bindings (power, pwm) and add definitions for all child nodes to fix dtbs_check validation errors found in v2.

Changes in v2:
- This patch is split from larger series [3] per maintainer feedback.
- Added missing sub-node definitions, resolving dtbs_check errors.

[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/
[3] https://lore.kernel.org/all/[email protected]/

---
 .../devicetree/bindings/mfd/ti,twl.yaml       | 208 +++++++++++++++++-
 .../devicetree/bindings/mfd/twl4030-power.txt |  48 ----
 .../devicetree/bindings/pwm/ti,twl-pwm.txt    |  17 --
 .../devicetree/bindings/pwm/ti,twl-pwmled.txt |  17 --
 4 files changed, 206 insertions(+), 84 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mfd/twl4030-power.txt
 delete mode 100644 Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt
 delete mode 100644 Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt
Documentation/devicetree/bindings/mfd/ti,twl.yaml +206 -2
index f162ab60c..444e2b2b5 100644
@@ -11,9 +11,9 @@ maintainers:
 
 description: |
   The TWLs are Integrated Power Management Chips.
-  Some version might contain much more analog function like
+  Some versions might contain much more analog functionality like
   USB transceiver or Audio amplifier.
-  These chips are connected to an i2c bus.
+  These chips are connected to an I2C bus.
 
 allOf:
   - if:
@@ -76,6 +76,107 @@ allOf:
           properties:
             compatible:
               const: ti,twl4030-wdt
+
+        audio:
+          type: object
+          properties:
+            compatible: true
+          additionalProperties: true
+
+        keypad:
+          type: object
+          properties:
+            compatible: true
+          additionalProperties: true
+
+        pwm:
+          type: object
+          $ref: /schemas/pwm/pwm.yaml#
+          description: PWM1 and PWM2
+          properties:
+            compatible:
+              enum:
+                - ti,twl4030-pwm
+            '#pwm-cells':
+              const: 2
+          required:
+            - compatible
+            - '#pwm-cells'
+          additionalProperties: true
+
+        pwmled:
+          type: object
+          $ref: /schemas/pwm/pwm.yaml#
+          description: PWMA and PWMB (connected to LEDA & LEDB terminals)
+          properties:
+            compatible:
+              enum:
+                - ti,twl4030-pwmled
+            '#pwm-cells':
+              const: 2
+          required:
+            - compatible
+            - '#pwm-cells'
+          additionalProperties: true
+
+        twl4030-usb:
+          type: object
+          properties:
+            compatible: true
+          additionalProperties: true
+
+        gpio:
+          type: object
+          properties:
+            compatible: true
+          additionalProperties: true
+
+        power:
+          type: object
+          additionalProperties: false
+          description:
+            The power management module inside the TWL4030 provides several facilities
+            to control the power resources, including power scripts. For now, the
+            binding only supports the complete shutdown of the system after poweroff.
+          properties:
+            compatible:
+              description: |
+                The compatible string determines the specific power configuration.
+                Multiple compatible strings may be used to specify fallback configurations.
+                "ti,twl4030-power": Standard power control.
+                "ti,twl4030-power-reset": Recommended for OMAP3530 and similar SoCs
+                  that require a special configuration for warm reset to work correctly.
+                "ti,twl4030-power-idle": Loads the TI-recommended configuration for
+                  idle modes into the PMIC.
+                "ti,twl4030-power-idle-osc-off": Uses the recommended idle configuration
+                  but also shuts down the external oscillator. This may not work on all
+                  boards depending on the oscillator wiring.
+                Board-specific compatible strings may also be used.
+              maxItems: 2
+              items:
+                enum:
+                  - ti,twl4030-power
+                  - ti,twl4030-power-reset
+                  - ti,twl4030-power-idle
+                  - ti,twl4030-power-idle-osc-off
+                  - ti,twl4030-power-beagleboard-xm
+                  - ti,twl4030-power-omap3-evm
+                  - ti,twl4030-power-n900
+
+            ti,system-power-controller:
+              type: boolean
+              deprecated: true
+              description: |
+                DEPRECATED. The standard 'system-power-controller' property
+                on the parent node should be used instead.
+
+            ti,use_poweroff:
+              type: boolean
+              deprecated: true
+
+          required:
+            - compatible
+
   - if:
       properties:
         compatible:
@@ -115,6 +216,43 @@ allOf:
           properties:
             compatible:
               const: ti,twl6030-gpadc
+
+        pwm:
+          type: object
+          $ref: /schemas/pwm/pwm.yaml#
+          description: PWM0 and PWM1
+          properties:
+            compatible:
+              enum:
+                - ti,twl6030-pwm
+            '#pwm-cells':
+              const: 2
+          required:
+            - compatible
+            - '#pwm-cells'
+          additionalProperties: true
+
+        pwmled:
+          type: object
+          $ref: /schemas/pwm/pwm.yaml#
+          description: LED PWM (mainly used as charging indicator LED)
+          properties:
+            compatible:
+              enum:
+                - ti,twl6030-pwmled
+            '#pwm-cells':
+              const: 2
+          required:
+            - compatible
+            - '#pwm-cells'
+          additionalProperties: true
+
+        usb-comparator:
+          type: object
+          properties:
+            compatible: true
+          additionalProperties: true
+
   - if:
       properties:
         compatible:
@@ -154,6 +292,42 @@ allOf:
             compatible:
               const: ti,twl6032-gpadc
 
+        pwm:
+          type: object
+          $ref: /schemas/pwm/pwm.yaml#
+          description: PWM0 and PWM1
+          properties:
+            compatible:
+              enum:
+                - ti,twl6030-pwm
+            '#pwm-cells':
+              const: 2
+          required:
+            - compatible
+            - '#pwm-cells'
+          additionalProperties: true
+
+        pwmled:
+          type: object
+          $ref: /schemas/pwm/pwm.yaml#
+          description: LED PWM (mainly used as charging indicator LED)
+          properties:
+            compatible:
+              enum:
+                - ti,twl6030-pwmled
+            '#pwm-cells':
+              const: 2
+          required:
+            - compatible
+            - '#pwm-cells'
+          additionalProperties: true
+
+        usb-comparator:
+          type: object
+          properties:
+            compatible: true
+          additionalProperties: true
+
 properties:
   compatible:
     description:
@@ -181,6 +355,12 @@ properties:
   "#clock-cells":
     const: 1
 
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: fck
+
   charger:
     type: object
     additionalProperties: true
@@ -271,6 +451,16 @@ examples:
           compatible = "ti,twl6030-vmmc";
           ti,retain-on-reset;
         };
+
+        pwm {
+          compatible = "ti,twl6030-pwm";
+          #pwm-cells = <2>;
+        };
+
+        pwmled {
+          compatible = "ti,twl6030-pwmled";
+          #pwm-cells = <2>;
+        };
       };
     };
 
@@ -325,6 +515,20 @@ examples:
         watchdog {
           compatible = "ti,twl4030-wdt";
         };
+
+        power {
+          compatible = "ti,twl4030-power";
+        };
+
+        pwm {
+          compatible = "ti,twl4030-pwm";
+          #pwm-cells = <2>;
+        };
+
+        pwmled {
+          compatible = "ti,twl4030-pwmled";
+          #pwm-cells = <2>;
+        };
       };
     };
 ...
Documentation/devicetree/bindings/mfd/twl4030-power.txt deleted +0 -48

48 lines not on this page · raw message

Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt deleted +0 -17
deleted file mode 100644
index d97ca1964..000000000
@@ -1,17 +0,0 @@
-Texas Instruments TWL series PWM drivers
-
-Supported PWMs:
-On TWL4030 series: PWM1 and PWM2
-On TWL6030 series: PWM0 and PWM1
-
-Required properties:
-- compatible: "ti,twl4030-pwm" or "ti,twl6030-pwm"
-- #pwm-cells: should be 2. See pwm.yaml in this directory for a description of
-  the cells format.
-
-Example:
-
-twl_pwm: pwm {
-	compatible = "ti,twl6030-pwm";
-	#pwm-cells = <2>;
-};
Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt deleted +0 -17
deleted file mode 100644
index 31ca1b032..000000000
@@ -1,17 +0,0 @@
-Texas Instruments TWL series PWM drivers connected to LED terminals
-
-Supported PWMs:
-On TWL4030 series: PWMA and PWMB (connected to LEDA and LEDB terminals)
-On TWL6030 series: LED PWM (mainly used as charging indicator LED)
-
-Required properties:
-- compatible: "ti,twl4030-pwmled" or "ti,twl6030-pwmled"
-- #pwm-cells: should be 2. See pwm.yaml in this directory for a description of
-  the cells format.
-
-Example:
-
-twl_pwmled: pwmled {
-	compatible = "ti,twl6030-pwmled";
-	#pwm-cells = <2>;
-};
Signature · 1 line
2.39.5
#1 lore raw
Quoted 68 lines · Jihed Chaibi

Update the main TI TWL-family binding to be self-contained and to fix pre-existing validation errors.

Following maintainer feedback, the simple power and PWM bindings are now defined directly within this file, and their legacy .txt files are removed.

To ensure future patches are bisectable, child nodes whose bindings are in other patches (audio, keypad, usb, etc.) are now defined using a flexible 'additionalProperties: true' pattern. This removes hard dependencies between the MFD and subsystem bindings.

The complete dtbs_check for this binding is clean except for two warnings originating from pre-existing bugs in the OMAP DTS files, for which fixes have already been submitted separately [1][2].

---
Changes in v4:
- Reworked binding to be independent and bisectable per maintainer feedback by using 'additionalProperties: true' for child nodes.
- Added board-specific compatibles to the 'power' node enum.
- Added definitions for 'clocks' and 'clock-names' properties.
- Renamed 'twl6030-usb' child node to 'usb-comparator' to match existing Device Tree usage (twl6030.dtsi).
- Fixed some spelling/grammar erros in the description.

Changes in v3:
- New patch to consolidate simple bindings (power, pwm) and add definitions for all child nodes to fix dtbs_check validation errors found in v2.

Changes in v2:
- This patch is split from larger series [3] per maintainer feedback.
- Added missing sub-node definitions, resolving dtbs_check errors.

[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/
[3] https://lore.kernel.org/all/[email protected]/

---
 .../devicetree/bindings/mfd/ti,twl.yaml       | 208 +++++++++++++++++-
 .../devicetree/bindings/mfd/twl4030-power.txt |  48 ----
 .../devicetree/bindings/pwm/ti,twl-pwm.txt    |  17 --
 .../devicetree/bindings/pwm/ti,twl-pwmled.txt |  17 --
 4 files changed, 206 insertions(+), 84 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mfd/twl4030-power.txt
 delete mode 100644 Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt
 delete mode 100644 Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt
Documentation/devicetree/bindings/mfd/ti,twl.yaml +2 -2
index f162ab60c..444e2b2b5 100644
@@ -11,9 +11,9 @@ maintainers:
 
 description: |
   The TWLs are Integrated Power Management Chips.
-  Some version might contain much more analog function like
+  Some versions might contain much more analog functionality like
   USB transceiver or Audio amplifier.
-  These chips are connected to an i2c bus.
+  These chips are connected to an I2C bus.
 
 allOf:
   - if:

Documentation/devicetree/bindings/mfd/ti,twl.yaml allOf: · line 83

Quoted 8 lines
Documentation/devicetree/bindings/mfd/ti,twl.yaml +5 -0
@@ -76,6 +76,107 @@ allOf:
           properties:
             compatible:
               const: ti,twl4030-wdt
+
+        audio:
+          type: object
+          properties:
+            compatible: true

This should list the compatibles.

Quoted 12 lines
Documentation/devicetree/bindings/mfd/ti,twl.yaml +12 -0
+          additionalProperties: true
+
+        keypad:
+          type: object
+          properties:
+            compatible: true
+          additionalProperties: true
+
+        pwm:
+          type: object
+          $ref: /schemas/pwm/pwm.yaml#
+          description: PWM1 and PWM2

Documentation/devicetree/bindings/mfd/ti,twl.yaml allOf: · line 105

Quoted 10 lines
Documentation/devicetree/bindings/mfd/ti,twl.yaml +10 -0
+          properties:
+            compatible:
+              enum:
+                - ti,twl4030-pwm
+            '#pwm-cells':
+              const: 2
+          required:
+            - compatible
+            - '#pwm-cells'
+          additionalProperties: true

This cannot be true.

Quoted 5 lines
Documentation/devicetree/bindings/mfd/ti,twl.yaml +5 -0
+
+        pwmled:
+          type: object
+          $ref: /schemas/pwm/pwm.yaml#
+          description: PWMA and PWMB (connected to LEDA & LEDB terminals)

Documentation/devicetree/bindings/mfd/ti,twl.yaml allOf: · line 120

Quoted 10 lines
Documentation/devicetree/bindings/mfd/ti,twl.yaml +10 -0
+          properties:
+            compatible:
+              enum:
+                - ti,twl4030-pwmled
+            '#pwm-cells':
+              const: 2
+          required:
+            - compatible
+            - '#pwm-cells'
+          additionalProperties: true

Cannot be true.

Documentation/devicetree/bindings/mfd/ti,twl.yaml allOf: · line 125

Quoted 5 lines
Documentation/devicetree/bindings/mfd/ti,twl.yaml +5 -0
+
+        twl4030-usb:
+          type: object
+          properties:
+            compatible: true

Missing compatibles.

Quoted 19 lines
Documentation/devicetree/bindings/mfd/ti,twl.yaml +19 -0
+          additionalProperties: true
+
+        gpio:
+          type: object
+          properties:
+            compatible: true
+          additionalProperties: true
+
+        power:
+          type: object
+          additionalProperties: false
+          description:
+            The power management module inside the TWL4030 provides several facilities
+            to control the power resources, including power scripts. For now, the
+            binding only supports the complete shutdown of the system after poweroff.
+          properties:
+            compatible:
+              description: |
+                The compatible string determines the specific power configuration.

Documentation/devicetree/bindings/mfd/ti,twl.yaml allOf: · line 154

Quoted 10 lines
Documentation/devicetree/bindings/mfd/ti,twl.yaml +10 -0
+                Multiple compatible strings may be used to specify fallback configurations.
+                "ti,twl4030-power": Standard power control.
+                "ti,twl4030-power-reset": Recommended for OMAP3530 and similar SoCs
+                  that require a special configuration for warm reset to work correctly.
+                "ti,twl4030-power-idle": Loads the TI-recommended configuration for
+                  idle modes into the PMIC.
+                "ti,twl4030-power-idle-osc-off": Uses the recommended idle configuration
+                  but also shuts down the external oscillator. This may not work on all
+                  boards depending on the oscillator wiring.
+                Board-specific compatible strings may also be used.

Do not add descriptioons to compatible. You are just duplicating the names. Look at other examples if you want to add description to actual compatible for some reason.

Documentation/devicetree/bindings/mfd/ti,twl.yaml allOf: · line 157

Quoted 3 lines
Documentation/devicetree/bindings/mfd/ti,twl.yaml +3 -0
+              maxItems: 2
+              items:
+                enum:

I really do not know what you want to express here. This is not a correct syntax.

Documentation/devicetree/bindings/mfd/ti,twl.yaml allOf: · line 162

Quoted 5 lines
Documentation/devicetree/bindings/mfd/ti,twl.yaml +5 -0
+                  - ti,twl4030-power
+                  - ti,twl4030-power-reset
+                  - ti,twl4030-power-idle
+                  - ti,twl4030-power-idle-osc-off
+                  - ti,twl4030-power-beagleboard-xm

This wasn't in original binding and I did not see explanation of changes in the commit msg.

Quoted 21 lines
Documentation/devicetree/bindings/mfd/ti,twl.yaml +17 -0
+                  - ti,twl4030-power-omap3-evm
+                  - ti,twl4030-power-n900
+
+            ti,system-power-controller:
+              type: boolean
+              deprecated: true
+              description: |
+                DEPRECATED. The standard 'system-power-controller' property
+                on the parent node should be used instead.
+
+            ti,use_poweroff:
+              type: boolean
+              deprecated: true
+
+          required:
+            - compatible
+
   - if:
       properties:
         compatible:

Documentation/devicetree/bindings/mfd/ti,twl.yaml allOf: · line 220

Quoted 5 lines
Documentation/devicetree/bindings/mfd/ti,twl.yaml +2 -0
@@ -115,6 +216,43 @@ allOf:
           properties:
             compatible:
               const: ti,twl6030-gpadc
+
+        pwm:

Do not define properties in if: block, but in top level.

Best regards,
Krzysztof