Skip to contentSkip to conversation

dt-bindings: Convert TI TPS65217 to DT schema

PATCH Applied Eduard Bostina 4 participants 13 messages Jul 18 – Jul 25

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

v2 cover dt-bindings: Convert TI TPS65217 to DT schema

This series converts the Texas Instruments TPS65217 PMIC bindings to DT schema.

Changes in v2:
- Set 'additionalProperties' to false and documented all child nodes ('regulators', 'charger', 'pwrbutton').
- Documented the 'interrupts', 'interrupt-controller', '#interrupt-cells' and 'ti,pmic-shutdown-controller' properties.
- Dropped 'isink-en' from the schema. It is not read by any driver, so it is now removed from am335x-guardian.dts instead.
- Added the power button conversion and referenced it from the leds schema.

Eduard Bostina (3):
ARM: dts: ti: am335x-guardian: Drop unused isink-en property
dt-bindings: input: Convert TI TPS65217 power button to DT schema
dt-bindings: leds: backlight: Convert TPS65217 to DT schema

 .../bindings/input/ti,tps65217-pwrbutton.yaml |  42 ++++++
 .../bindings/input/tps65218-pwrbutton.txt     |  30 -----
 .../bindings/leds/backlight/ti,tps65217.yaml  | 123 ++++++++++++++++++
 .../leds/backlight/tps65217-backlight.txt     |  27 ----
 arch/arm/boot/dts/ti/omap/am335x-guardian.dts |   3 -
 5 files changed, 165 insertions(+), 60 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/input/ti,tps65217-pwrbutton.yaml
 delete mode 100644 Documentation/devicetree/bindings/input/tps65218-pwrbutton.txt
 create mode 100644 Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml
 delete mode 100644 Documentation/devicetree/bindings/leds/backlight/tps65217-backlight.txt
Signature · 1 line
2.43.0
#1 lore raw

PATCH v2 1/3 ARM: dts: ti: am335x-guardian: Drop unused isink-en property

The 'isink-en' property is not read by any driver, so remove it from the TPS65217 backlight node.

---
 arch/arm/boot/dts/ti/omap/am335x-guardian.dts | 3 ---
 1 file changed, 3 deletions(-)
arch/arm/boot/dts/ti/omap/am335x-guardian.dts +0 -3
index 6ce3a2d029ee..d595e79d6b05 100644
@@ -320,9 +320,6 @@ backlight {
 		isel = <1>;  /* 1 - ISET1, 2 ISET2 */
 		fdim = <500>; /* TPS65217_BL_FDIM_500HZ */
 		default-brightness = <50>;
-		/* 1(on) - enable current sink, while initialization */
-		/* 0(off) - disable current sink, while initialization */
-		isink-en = <1>;
 	};
 
 	regulators {
Signature · 1 line
2.43.0
#2 lore raw

Re: [PATCH v2 1/3] ARM: dts: ti: am335x-guardian: Drop unused isink-en property

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 4 lines

The 'isink-en' property is not read by any driver, so remove it from the TPS65217 backlight node.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#4 lore raw

PATCH v2 2/3 dt-bindings: input: Convert TI TPS65217 power button to DT schema

In reply to Eduard Bostina

Convert the Texas Instruments TPS65217 and TPS65218 Power Button bindings to DT schema.

---
 .../bindings/input/ti,tps65217-pwrbutton.yaml | 42 +++++++++++++++++++
 .../bindings/input/tps65218-pwrbutton.txt     | 30 -------------
 2 files changed, 42 insertions(+), 30 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/input/ti,tps65217-pwrbutton.yaml
 delete mode 100644 Documentation/devicetree/bindings/input/tps65218-pwrbutton.txt
Documentation/devicetree/bindings/input/ti,tps65217-pwrbutton.yaml new file +42 -0
new file mode 100644
index 000000000000..3526d8b045fd
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/ti,tps65217-pwrbutton.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments TPS65217 and TPS65218 Power Button
+
+maintainers:
+  - Eduard Bostina <[email protected]>
+
+description:
+  This module is part of the TPS65217/TPS65218 PMIC. It provides a simple
+  power button event via an interrupt.
+
+properties:
+  compatible:
+    enum:
+      - ti,tps65217-pwrbutton
+      - ti,tps65218-pwrbutton
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    pmic {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        power-button {
+            compatible = "ti,tps65218-pwrbutton";
+            interrupts = <3 IRQ_TYPE_EDGE_BOTH>;
+        };
+    };
Documentation/devicetree/bindings/input/tps65218-pwrbutton.txt deleted +0 -30
deleted file mode 100644
index 8682ab6d4a50..000000000000
@@ -1,30 +0,0 @@
-Texas Instruments TPS65217 and TPS65218 power button
-
-This module is part of the TPS65217/TPS65218. For more details about the whole
-TPS65217 chip see Documentation/devicetree/bindings/regulator/tps65217.txt.
-
-This driver provides a simple power button event via an Interrupt.
-
-Required properties:
-- compatible: should be "ti,tps65217-pwrbutton" or "ti,tps65218-pwrbutton"
-
-Required properties:
-- interrupts: should be one of the following
-   - <2>: For controllers compatible with tps65217
-   - <3 IRQ_TYPE_EDGE_BOTH>: For controllers compatible with tps65218
-
-Examples:
-
-&tps {
-	tps65217-pwrbutton {
-		compatible = "ti,tps65217-pwrbutton";
-		interrupts = <2>;
-	};
-};
-
-&tps {
-	power-button {
-		compatible = "ti,tps65218-pwrbutton";
-		interrupts = <3 IRQ_TYPE_EDGE_BOTH>;
-	};
-};
Signature · 1 line
2.43.0
#5 lore raw

Re: [PATCH v2 2/3] dt-bindings: input: Convert TI TPS65217 power button to DT schema

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 4 lines

Convert the Texas Instruments TPS65217 and TPS65218 Power Button bindings to DT schema.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Reviewed-by on v2 2/3
#6 lore raw

Re: [PATCH v2 2/3] dt-bindings: input: Convert TI TPS65217 power button to DT schema

In reply to Eduard Bostina
Quoted 10 lines · Eduard Bostina

Convert the Texas Instruments TPS65217 and TPS65218 Power Button bindings to DT schema.

---
 .../bindings/input/ti,tps65217-pwrbutton.yaml | 42 +++++++++++++++++++
 .../bindings/input/tps65218-pwrbutton.txt     | 30 -------------
 2 files changed, 42 insertions(+), 30 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/input/ti,tps65217-pwrbutton.yaml
 delete mode 100644 Documentation/devicetree/bindings/input/tps65218-pwrbutton.txt

Best regards,
Krzysztof

maintainer
#8 lore raw

Re: [PATCH v2 2/3] dt-bindings: input: Convert TI TPS65217 power button to DT schema

Quoted 7 lines · Dmitry Torokhov
Quoted 4 lines · Eduard Bostina

Convert the Texas Instruments TPS65217 and TPS65218 Power Button bindings to DT schema.

Applied, thank you.

I actually picked up v4 of the patch.

Signature · 1 line
Dmitry
#9 lore raw

PATCH v2 3/3 dt-bindings: leds: backlight: Convert TPS65217 to DT schema

In reply to Eduard Bostina

Convert the Texas Instruments TPS65217 bindings to DT schema.

During the conversion, the following updates were made:
- Documented the 'regulators', 'charger' and 'pwrbutton' child nodes, which are used by the boards but were missing from the old txt binding.
- Documented the 'interrupts', 'interrupt-controller', '#interrupt-cells' and 'ti,pmic-shutdown-controller' properties, which are used by the am335x boards and read by the driver.
- Named the regulators 'regulator@[0-6]' to match what the boards use instead of the dcdc/ldo node names from the txt binding.

---
 .../bindings/leds/backlight/ti,tps65217.yaml  | 123 ++++++++++++++++++
 .../leds/backlight/tps65217-backlight.txt     |  27 ----
 2 files changed, 123 insertions(+), 27 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml
 delete mode 100644 Documentation/devicetree/bindings/leds/backlight/tps65217-backlight.txt
Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml new file +123 -0
new file mode 100644
index 000000000000..9586e08f1b1f
@@ -0,0 +1,123 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/backlight/ti,tps65217.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TPS65217 family of regulators
+
+maintainers:
+  - Eduard Bostina <[email protected]>
+
+description:
+  The TPS65217 chip contains a boost converter and current sinks which can be
+  used to drive LEDs for use as backlights.
+
+properties:
+  compatible:
+    const: ti,tps65217
+
+  reg:
+    maxItems: 1
+    description: I2C slave address
+
+  interrupts:
+    maxItems: 1
+
+  interrupt-controller: true
+
+  "#interrupt-cells":
+    const: 1
+
+  ti,pmic-shutdown-controller:
+    type: boolean
+    description:
+      Set the PMIC to shutdown on PWR_EN toggle.
+
+  backlight:
+    type: object
+    additionalProperties: false
+    description:
+      Node for specifying WLED1 and WLED2 lines in TPS65217.
+
+    properties:
+      isel:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        enum: [1, 2]
+        description: |
+          Selection bit. Valid values:
+            1 - ISEL1 (low-level)
+            2 - ISEL2 (high-level)
+
+      fdim:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        enum: [100, 200, 500, 1000]
+        description:
+          PWM dimming frequency in Hz.
+
+      default-brightness:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        minimum: 0
+        maximum: 100
+
+    required:
+      - isel
+      - fdim
+      - default-brightness
+
+  regulators:
+    type: object
+    additionalProperties: false
+    description:
+      List of child nodes that specify the regulator initialization data.
+      Not all regulators for the given device need to be present.
+
+    properties:
+      "#address-cells":
+        const: 1
+
+      "#size-cells":
+        const: 0
+
+    patternProperties:
+      "^regulator@[0-6]$":
+        type: object
+        $ref: /schemas/regulator/regulator.yaml#
+        unevaluatedProperties: false
+
+        properties:
+          reg:
+            maxItems: 1
+
+          regulator-compatible:
+            $ref: /schemas/types.yaml#/definitions/string
+
+  charger:
+    $ref: /schemas/power/supply/tps65217-charger.yaml#
+
+  pwrbutton:
+    $ref: /schemas/input/ti,tps65217-pwrbutton.yaml#
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        tps@24 {
+            reg = <0x24>;
+            compatible = "ti,tps65217";
+
+            backlight {
+                isel = <1>;   /* 1 - ISET1, 2 ISET2 */
+                fdim = <100>; /* TPS65217_BL_FDIM_100HZ */
+                default-brightness = <50>;
+            };
+        };
+    };
Documentation/devicetree/bindings/leds/backlight/tps65217-backlight.txt deleted +0 -27
deleted file mode 100644
index 5fb9279ac287..000000000000
@@ -1,27 +0,0 @@
-TPS65217 family of regulators
-
-The TPS65217 chip contains a boost converter and current sinks which can be
-used to drive LEDs for use as backlights.
-
-Required properties:
-- compatible: "ti,tps65217"
-- reg: I2C slave address
-- backlight: node for specifying WLED1 and WLED2 lines in TPS65217
-- isel: selection bit, valid values: 1 for ISEL1 (low-level) and 2 for ISEL2 (high-level)
-- fdim: PWM dimming frequency, valid values: 100, 200, 500, 1000
-- default-brightness: valid values: 0-100
-
-Each regulator is defined using the standard binding for regulators.
-
-Example:
-
-	tps: tps@24 {
-		reg = <0x24>;
-		compatible = "ti,tps65217";
-		backlight {
-			isel = <1>;  /* 1 - ISET1, 2 ISET2 */
-			fdim = <100>; /* TPS65217_BL_FDIM_100HZ */
-			default-brightness = <50>;
-		};
-	};
-
Signature · 1 line
2.43.0
#10 lore raw

Re: [PATCH v2 3/3] dt-bindings: leds: backlight: Convert TPS65217 to DT schema

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Medium] Stale and conflicting regulator text binding not deleted during schema conversion. - [Low]…

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] Stale and conflicting regulator text binding not deleted during schema conversion.
- [Low] Missing required constraint for reg property in regulator child nodes. --

--- Patch [3]: [PATCH v2 3/3] dt-bindings: leds: backlight: Convert TPS65217 to DT schema --- commit 0671f0f93114029deaa2c3fee6b27ad8abd2cb2d
Author: Eduard Bostina <[email protected]>

dt-bindings: leds: backlight: Convert TPS65217 to DT schema

This commit converts the Texas Instruments TPS65217 backlight binding to YAML schema. It also documents missing child nodes, interrupt properties, and updates regulator names to match what the boards use.

Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml line 7

Quoted 13 lines
Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml new file +7 -0
new file mode 100644
index 0000000000000..9586e08f1b1fc
@@ -0,0 +1,123 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/backlight/ti,tps65217.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TPS65217 family of regulators

[Severity: Medium]
Should Documentation/devicetree/bindings/regulator/tps65217.txt also be deleted in this patch?

The new YAML schema defines the full MFD device, but conflicts with the undeleted regulator text binding. The old regulator text binding expects regulator nodes to be named dcdc[1-3] and ldo[1-4], while the new schema expects regulator@[0-6], which could cause validation inconsistencies.

[ ... ]

Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml line 93

Quoted 12 lines
Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml new file +12 -0
+    patternProperties:
+      "^regulator@[0-6]$":
+        type: object
+        $ref: /schemas/regulator/regulator.yaml#
+        unevaluatedProperties: false
+
+        properties:
+          reg:
+            maxItems: 1
+
+          regulator-compatible:
+            $ref: /schemas/types.yaml#/definitions/string

[Severity: Low]
Does this schema need to specify the reg property as required?

Since these regulator child nodes have a unit address in the pattern (^regulator@[0-6]$), DT validation could incorrectly pass nodes that contain a unit address but lack the mandatory reg property without a required block.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
#11 lore raw

Re: [PATCH v2 3/3] dt-bindings: leds: backlight: Convert TPS65217 to DT schema

In reply to Eduard Bostina

On Sat, Jul 18, 2026 at 09:56:32PM +0000, Eduard Bostina wrote:
+

Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml line 93

Quoted 12 lines
Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml new file +12 -0
+    patternProperties:
+      "^regulator@[0-6]$":
+        type: object
+        $ref: /schemas/regulator/regulator.yaml#
+        unevaluatedProperties: false
+
+        properties:
+          reg:
+            maxItems: 1
+
+          regulator-compatible:
+            $ref: /schemas/types.yaml#/definitions/string

You should not need this property, it is already in regulator.yaml.

Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml line 96

Quoted 3 lines
Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml new file +3 -0
+
+  charger:
+    $ref: /schemas/power/supply/tps65217-charger.yaml#

unevaluatedProperties: false

Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml line 99

Quoted 3 lines
Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml new file +3 -0
+
+  pwrbutton:
+    $ref: /schemas/input/ti,tps65217-pwrbutton.yaml#

unevaluatedProperties: false

Quoted 5 lines
Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml new file +5 -0
+
+
+required:
+  - compatible
+  - reg

Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml line 113

Quoted 10 lines
Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml new file +10 -0
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        tps@24 {

pmic@24

Please make the example mostly complete - add rest of properties and nodes.

Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml line 122

Quoted 9 lines
Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml new file +9 -0
+            reg = <0x24>;
+            compatible = "ti,tps65217";
+
+            backlight {
+                isel = <1>;   /* 1 - ISET1, 2 ISET2 */
+                fdim = <100>; /* TPS65217_BL_FDIM_100HZ */
+                default-brightness = <50>;
+            };
+        };

Best regards,
Krzysztof

author
#12 lore raw

Re: [PATCH v2 3/3] dt-bindings: leds: backlight: Convert TPS65217 to DT schema

Quoted 7 lines · Krzysztof Kozlowski

On Sat, Jul 18, 2026 at 09:56:32PM +0000, Eduard Bostina wrote:
+

Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml line 93

Quoted 2 lines
Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml new file +2 -0
+          regulator-compatible:
+            $ref: /schemas/types.yaml#/definitions/string

You should not need this property, it is already in regulator.yaml.

I did not find it in regulator.yaml, or in any other schema, but I found out that it has been deprecated in 2012 by commit 13511def87b9 ("regulator: deprecate regulator-compatible DT property") and was never carried over during the conversion.

I agree it should not be in a new binding, so I will drop it.

It needs a dts change too, tps65217.dtsi names the children [email protected]@6, while the driver matches dcdc1, dcdc2, dcdc3, ldo1…ldo4. of_regulator_match() looks at regulator-compatible first and falls back to the node name, so without the property nothing matches and the regulators stop probing.

So I will rename the nodes to dcdc1..ldo4 and drop regulator-compatible, reg and the address cells.
I will send that as a separate patch in v3 along with the other fixes.

Thanks,
Eduard