dt-bindings: Convert TI TPS65217 to DT schema
Subsystems (7)
v3 cover dt-bindings: Convert TI TPS65217 to DT schema
This series converts the Texas Instruments TPS65217 PMIC bindings to DT schema.
Changes in v3:
- Added 'unevaluatedProperties' to the 'charger' and 'pwrbutton' nodes.
- Renamed the example node to 'pmic@24' and added the rest of the properties and nodes to it.
- Dropped 'regulator-compatible' from the schema. The property is deprecated, so the regulator nodes are now named after the strings the driver matches on and the DTS is updated accordingly.
Link to v2:
https://lore.kernel.org/all/[email protected]/
Eduard Bostina (4):
ARM: dts: ti: am335x-guardian: Drop unused isink-en property
ARM: dts: Rename the TPS65217 regulator nodes
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 | 170 ++++++++++++++++++ .../leds/backlight/tps65217-backlight.txt | 27 --- .../boot/dts/ti/omap/am335x-bone-common.dtsi | 14 +- .../arm/boot/dts/ti/omap/am335x-chilisom.dtsi | 14 +- arch/arm/boot/dts/ti/omap/am335x-guardian.dts | 17 +- arch/arm/boot/dts/ti/omap/am335x-nano.dts | 14 +- .../dts/ti/omap/am335x-osd335x-common.dtsi | 14 +- arch/arm/boot/dts/ti/omap/am335x-pepper.dts | 14 +- arch/arm/boot/dts/ti/omap/am335x-shc.dts | 31 +--- arch/arm/boot/dts/ti/omap/am335x-sl50.dts | 14 +- arch/arm/boot/dts/tps65217.dtsi | 31 +--- 13 files changed, 275 insertions(+), 157 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
PATCH v3 1/4 ARM: dts: ti: am335x-guardian: Drop unused isink-en property
The 'isink-en' property is not documented and 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
@@ -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
[email protected]
AI reviewRe: [PATCH v3 1/4] 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 documented and not read by any driver, so remove it from the TPS65217 backlight node.
Signed-off-by Eduard Bostina <[email protected]>
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
PATCH v3 2/4 ARM: dts: Rename the TPS65217 regulator nodes
In reply to Eduard BostinaThe TPS65217 regulator nodes are named regulator@0 to regulator@6 and rely on the deprecated 'regulator-compatible' property to be matched against the driver, which looks for "dcdc1" to "ldo4".
Documentation/devicetree/bindings/regulator/tps65217.txt states the regulators must be named dcdc[1-3] and ldo[1-4].
Rename the nodes accordingly and drop 'regulator-compatible' along with the unit addresses it made necessary.
--- .../boot/dts/ti/omap/am335x-bone-common.dtsi | 14 ++++----- .../arm/boot/dts/ti/omap/am335x-chilisom.dtsi | 14 ++++----- arch/arm/boot/dts/ti/omap/am335x-guardian.dts | 14 ++++----- arch/arm/boot/dts/ti/omap/am335x-nano.dts | 14 ++++----- .../dts/ti/omap/am335x-osd335x-common.dtsi | 14 ++++----- arch/arm/boot/dts/ti/omap/am335x-pepper.dts | 14 ++++----- arch/arm/boot/dts/ti/omap/am335x-shc.dts | 31 +++++-------------- arch/arm/boot/dts/ti/omap/am335x-sl50.dts | 14 ++++----- arch/arm/boot/dts/tps65217.dtsi | 31 +++++-------------- 9 files changed, 63 insertions(+), 97 deletions(-)
arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi +7 -7
@@ -337,12 +337,12 @@ pwrbutton { }; regulators { - dcdc1_reg: regulator@0 { + dcdc1_reg: dcdc1 { regulator-name = "vdds_dpr"; regulator-always-on; }; - dcdc2_reg: regulator@1 { + dcdc2_reg: dcdc2 { /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */ regulator-name = "vdd_mpu"; regulator-min-microvolt = <925000>;
@@ -351,7 +351,7 @@ dcdc2_reg: regulator@1 { regulator-always-on; }; - dcdc3_reg: regulator@2 { + dcdc3_reg: dcdc3 { /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */ regulator-name = "vdd_core"; regulator-min-microvolt = <925000>;
@@ -360,22 +360,22 @@ dcdc3_reg: regulator@2 { regulator-always-on; }; - ldo1_reg: regulator@3 { + ldo1_reg: ldo1 { regulator-name = "vio,vrtc,vdds"; regulator-always-on; }; - ldo2_reg: regulator@4 { + ldo2_reg: ldo2 { regulator-name = "vdd_3v3aux"; regulator-always-on; }; - ldo3_reg: regulator@5 { + ldo3_reg: ldo3 { regulator-name = "vdd_1v8"; regulator-always-on; }; - ldo4_reg: regulator@6 { + ldo4_reg: ldo4 { regulator-name = "vdd_3v3a"; regulator-always-on; };
arch/arm/boot/dts/ti/omap/am335x-chilisom.dtsi +7 -7
@@ -70,12 +70,12 @@ tps: tps@24 { &tps { regulators { - dcdc1_reg: regulator@0 { + dcdc1_reg: dcdc1 { regulator-name = "vdds_dpr"; regulator-always-on; }; - dcdc2_reg: regulator@1 { + dcdc2_reg: dcdc2 { /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */ regulator-name = "vdd_mpu"; regulator-min-microvolt = <925000>;
@@ -84,7 +84,7 @@ dcdc2_reg: regulator@1 { regulator-always-on; }; - dcdc3_reg: regulator@2 { + dcdc3_reg: dcdc3 { /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */ regulator-name = "vdd_core"; regulator-min-microvolt = <925000>;
@@ -93,25 +93,25 @@ dcdc3_reg: regulator@2 { regulator-always-on; }; - ldo1_reg: regulator@3 { + ldo1_reg: ldo1 { regulator-name = "vio,vrtc,vdds"; regulator-boot-on; regulator-always-on; }; - ldo2_reg: regulator@4 { + ldo2_reg: ldo2 { regulator-name = "vdd_3v3aux"; regulator-boot-on; regulator-always-on; }; - ldo3_reg: regulator@5 { + ldo3_reg: ldo3 { regulator-name = "vdd_1v8"; regulator-boot-on; regulator-always-on; }; - ldo4_reg: regulator@6 { + ldo4_reg: ldo4 { regulator-name = "vdd_3v3d"; regulator-boot-on; regulator-always-on;
arch/arm/boot/dts/ti/omap/am335x-guardian.dts +7 -7
@@ -323,12 +323,12 @@ backlight { }; regulators { - dcdc1_reg: regulator@0 { + dcdc1_reg: dcdc1 { regulator-name = "vdds_dpr"; regulator-always-on; }; - dcdc2_reg: regulator@1 { + dcdc2_reg: dcdc2 { /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */ regulator-name = "vdd_mpu"; regulator-min-microvolt = <925000>;
@@ -337,7 +337,7 @@ dcdc2_reg: regulator@1 { regulator-always-on; }; - dcdc3_reg: regulator@2 { + dcdc3_reg: dcdc3 { /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */ regulator-name = "vdd_core"; regulator-min-microvolt = <925000>;
@@ -346,24 +346,24 @@ dcdc3_reg: regulator@2 { regulator-always-on; }; - ldo1_reg: regulator@3 { + ldo1_reg: ldo1 { regulator-name = "vio,vrtc,vdds"; regulator-always-on; }; - ldo2_reg: regulator@4 { + ldo2_reg: ldo2 { regulator-name = "vdd_3v3aux"; regulator-always-on; }; - ldo3_reg: regulator@5 { + ldo3_reg: ldo3 { regulator-name = "vdd_1v8"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-always-on; }; - ldo4_reg: regulator@6 { + ldo4_reg: ldo4 { regulator-name = "vdd_3v3a"; regulator-always-on; };
arch/arm/boot/dts/ti/omap/am335x-nano.dts +7 -7
@@ -431,7 +431,7 @@ &usb0 { &tps { regulators { - dcdc1_reg: regulator@0 { + dcdc1_reg: dcdc1 { /* +1.5V voltage with ±4% tolerance */ regulator-min-microvolt = <1450000>; regulator-max-microvolt = <1550000>;
@@ -439,7 +439,7 @@ dcdc1_reg: regulator@0 { regulator-always-on; }; - dcdc2_reg: regulator@1 { + dcdc2_reg: dcdc2 { /* VDD_MPU voltage limits 0.95V - 1.1V with ±4% tolerance */ regulator-name = "vdd_mpu"; regulator-min-microvolt = <915000>;
@@ -448,7 +448,7 @@ dcdc2_reg: regulator@1 { regulator-always-on; }; - dcdc3_reg: regulator@2 { + dcdc3_reg: dcdc3 { /* VDD_CORE voltage limits 0.95V - 1.1V with ±4% tolerance */ regulator-name = "vdd_core"; regulator-min-microvolt = <915000>;
@@ -457,7 +457,7 @@ dcdc3_reg: regulator@2 { regulator-always-on; }; - ldo1_reg: regulator@3 { + ldo1_reg: ldo1 { /* +1.8V voltage with ±4% tolerance */ regulator-min-microvolt = <1750000>; regulator-max-microvolt = <1870000>;
@@ -465,7 +465,7 @@ ldo1_reg: regulator@3 { regulator-always-on; }; - ldo2_reg: regulator@4 { + ldo2_reg: ldo2 { /* +3.3V voltage with ±4% tolerance */ regulator-min-microvolt = <3175000>; regulator-max-microvolt = <3430000>;
@@ -473,7 +473,7 @@ ldo2_reg: regulator@4 { regulator-always-on; }; - ldo3_reg: regulator@5 { + ldo3_reg: ldo3 { /* +1.8V voltage with ±4% tolerance */ regulator-min-microvolt = <1750000>; regulator-max-microvolt = <1870000>;
@@ -481,7 +481,7 @@ ldo3_reg: regulator@5 { regulator-always-on; }; - ldo4_reg: regulator@6 { + ldo4_reg: ldo4 { /* +3.3V voltage with ±4% tolerance */ regulator-min-microvolt = <3175000>; regulator-max-microvolt = <3430000>;
arch/arm/boot/dts/ti/omap/am335x-osd335x-common.dtsi +7 -7
@@ -69,12 +69,12 @@ pwrbutton { }; regulators { - dcdc1_reg: regulator@0 { + dcdc1_reg: dcdc1 { regulator-name = "vdds_dpr"; regulator-always-on; }; - dcdc2_reg: regulator@1 { + dcdc2_reg: dcdc2 { /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */ regulator-name = "vdd_mpu"; regulator-min-microvolt = <925000>;
@@ -83,7 +83,7 @@ dcdc2_reg: regulator@1 { regulator-always-on; }; - dcdc3_reg: regulator@2 { + dcdc3_reg: dcdc3 { /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */ regulator-name = "vdd_core"; regulator-min-microvolt = <925000>;
@@ -92,24 +92,24 @@ dcdc3_reg: regulator@2 { regulator-always-on; }; - ldo1_reg: regulator@3 { + ldo1_reg: ldo1 { regulator-name = "vio,vrtc,vdds"; regulator-always-on; }; - ldo2_reg: regulator@4 { + ldo2_reg: ldo2 { regulator-name = "vdd_3v3aux"; regulator-always-on; }; - ldo3_reg: regulator@5 { + ldo3_reg: ldo3 { regulator-name = "vdd_1v8"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-always-on; }; - ldo4_reg: regulator@6 { + ldo4_reg: ldo4 { regulator-name = "vdd_3v3a"; regulator-always-on; };
arch/arm/boot/dts/ti/omap/am335x-pepper.dts +7 -7
@@ -433,12 +433,12 @@ backlight { }; regulators { - dcdc1_reg: regulator@0 { + dcdc1_reg: dcdc1 { /* VDD_1V8 system supply */ regulator-always-on; }; - dcdc2_reg: regulator@1 { + dcdc2_reg: dcdc2 { /* VDD_CORE voltage limits 0.95V - 1.26V with +/-4% tolerance */ regulator-name = "vdd_core"; regulator-min-microvolt = <925000>;
@@ -447,7 +447,7 @@ dcdc2_reg: regulator@1 { regulator-always-on; }; - dcdc3_reg: regulator@2 { + dcdc3_reg: dcdc3 { /* VDD_MPU voltage limits 0.95V - 1.1V with +/-4% tolerance */ regulator-name = "vdd_mpu"; regulator-min-microvolt = <925000>;
@@ -456,26 +456,26 @@ dcdc3_reg: regulator@2 { regulator-always-on; }; - ldo1_reg: regulator@3 { + ldo1_reg: ldo1 { /* VRTC 1.8V always-on supply */ regulator-name = "vrtc,vdds"; regulator-always-on; }; - ldo2_reg: regulator@4 { + ldo2_reg: ldo2 { /* 3.3V rail */ regulator-name = "vdd_3v3aux"; regulator-always-on; }; - ldo3_reg: regulator@5 { + ldo3_reg: ldo3 { /* VDD_3V3A 3.3V rail */ regulator-name = "vdd_3v3a"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; - ldo4_reg: regulator@6 { + ldo4_reg: ldo4 { /* VDD_3V3B 3.3V rail */ regulator-name = "vdd_3v3b"; regulator-always-on;
arch/arm/boot/dts/ti/omap/am335x-shc.dts +7 -24
@@ -254,26 +254,19 @@ &tps { ti,pmic-shutdown-controller; regulators { - #address-cells = <1>; - #size-cells = <0>; - - dcdc1_reg: regulator@0 { - reg = <0>; + dcdc1_reg: dcdc1 { regulator-name = "vdds_dpr"; - regulator-compatible = "dcdc1"; regulator-min-microvolt = <1300000>; regulator-max-microvolt = <1450000>; regulator-boot-on; regulator-always-on; }; - dcdc2_reg: regulator@1 { - reg = <1>; + dcdc2_reg: dcdc2 { /* * VDD_MPU voltage limits 0.95V - 1.26V with * +/-4% tolerance */ - regulator-compatible = "dcdc2"; regulator-name = "vdd_mpu"; regulator-min-microvolt = <925000>; regulator-max-microvolt = <1375000>;
@@ -282,51 +275,41 @@ dcdc2_reg: regulator@1 { regulator-ramp-delay = <70000>; }; - dcdc3_reg: regulator@2 { - reg = <2>; + dcdc3_reg: dcdc3 { /* * VDD_CORE voltage limits 0.95V - 1.1V with * +/-4% tolerance */ regulator-name = "vdd_core"; - regulator-compatible = "dcdc3"; regulator-min-microvolt = <925000>; regulator-max-microvolt = <1125000>; regulator-boot-on; regulator-always-on; }; - ldo1_reg: regulator@3 { - reg = <3>; + ldo1_reg: ldo1 { regulator-name = "vio,vrtc,vdds"; - regulator-compatible = "ldo1"; regulator-min-microvolt = <1000000>; regulator-max-microvolt = <1800000>; regulator-always-on; }; - ldo2_reg: regulator@4 { - reg = <4>; + ldo2_reg: ldo2 { regulator-name = "vdd_3v3aux"; - regulator-compatible = "ldo2"; regulator-min-microvolt = <900000>; regulator-max-microvolt = <3300000>; regulator-always-on; }; - ldo3_reg: regulator@5 { - reg = <5>; + ldo3_reg: ldo3 { regulator-name = "vdd_1v8"; - regulator-compatible = "ldo3"; regulator-min-microvolt = <900000>; regulator-max-microvolt = <1800000>; regulator-always-on; }; - ldo4_reg: regulator@6 { - reg = <6>; + ldo4_reg: ldo4 { regulator-name = "vdd_3v3a"; - regulator-compatible = "ldo4"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; regulator-always-on;
arch/arm/boot/dts/ti/omap/am335x-sl50.dts +7 -7
@@ -607,14 +607,14 @@ &tps { interrupts = <7>; /* NNMI */ regulators { - dcdc1_reg: regulator@0 { + dcdc1_reg: dcdc1 { /* VDDS_DDR */ regulator-min-microvolt = <1500000>; regulator-max-microvolt = <1500000>; regulator-always-on; }; - dcdc2_reg: regulator@1 { + dcdc2_reg: dcdc2 { /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */ regulator-name = "vdd_mpu"; regulator-min-microvolt = <925000>;
@@ -623,7 +623,7 @@ dcdc2_reg: regulator@1 { regulator-always-on; }; - dcdc3_reg: regulator@2 { + dcdc3_reg: dcdc3 { /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */ regulator-name = "vdd_core"; regulator-min-microvolt = <925000>;
@@ -632,28 +632,28 @@ dcdc3_reg: regulator@2 { regulator-always-on; }; - ldo1_reg: regulator@3 { + ldo1_reg: ldo1 { /* VRTC / VIO / VDDS*/ regulator-always-on; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; }; - ldo2_reg: regulator@4 { + ldo2_reg: ldo2 { /* VDD_3V3AUX */ regulator-always-on; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; - ldo3_reg: regulator@5 { + ldo3_reg: ldo3 { /* VDD_1V8 */ regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-always-on; }; - ldo4_reg: regulator@6 { + ldo4_reg: ldo4 { /* VDD_3V3A */ regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>;
arch/arm/boot/dts/tps65217.dtsi +7 -24
@@ -27,42 +27,25 @@ pwrbutton { }; regulators { - #address-cells = <1>; - #size-cells = <0>; - - dcdc1_reg: regulator@0 { - reg = <0>; - regulator-compatible = "dcdc1"; + dcdc1_reg: dcdc1 { }; - dcdc2_reg: regulator@1 { - reg = <1>; - regulator-compatible = "dcdc2"; + dcdc2_reg: dcdc2 { }; - dcdc3_reg: regulator@2 { - reg = <2>; - regulator-compatible = "dcdc3"; + dcdc3_reg: dcdc3 { }; - ldo1_reg: regulator@3 { - reg = <3>; - regulator-compatible = "ldo1"; + ldo1_reg: ldo1 { }; - ldo2_reg: regulator@4 { - reg = <4>; - regulator-compatible = "ldo2"; + ldo2_reg: ldo2 { }; - ldo3_reg: regulator@5 { - reg = <5>; - regulator-compatible = "ldo3"; + ldo3_reg: ldo3 { }; - ldo4_reg: regulator@6 { - reg = <6>; - regulator-compatible = "ldo4"; + ldo4_reg: ldo4 { }; }; };
Signature · 1 line
2.43.0
[email protected]
AI reviewRe: [PATCH v3 2/4] ARM: dts: Rename the TPS65217 regulator nodes
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 11 lines
The TPS65217 regulator nodes are named regulator@0 to regulator@6 and rely on the deprecated 'regulator-compatible' property to be matched against the driver, which looks for "dcdc1" to "ldo4".
Documentation/devicetree/bindings/regulator/tps65217.txtstates the regulators must be named dcdc[1-3] and ldo[1-4].Rename the nodes accordingly and drop 'regulator-compatible' along with the unit addresses it made necessary.
Signed-off-by Eduard Bostina <[email protected]>
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
PATCH v3 3/4 dt-bindings: input: Convert TI TPS65217 power button to DT schema
In reply to Eduard BostinaConvert 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
@@ -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
@@ -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
[email protected]
AI reviewRe: [PATCH v3 3/4] dt-bindings: input: Convert TI TPS65217 power button to DT schema
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Pre-existing issues:
- [High] Missing NULL check on dev_get_regmap can lead to a kernel panic in the IRQ handler.
- [High] The driver incorrectly masks platform_get_irq() error codes with -EINVAL, breaking probe deferral. --
--- Patch [3]: [PATCH v3 3/4] dt-bindings: input: Convert TI TPS65217 power button to DT schema --- commit 7ffa82f06e0d099b257abd8ec45ed224af6ff3c6
Author: Eduard Bostina <[email protected]>
dt-bindings: input: Convert TI TPS65217 power button to DT schema
Convert the Texas Instruments TPS65217 and TPS65218 Power Button bindings to DT schema.
drivers/input/misc/tps65218-pwrbutton.c:tps6521x_pb_probe() {
...
pwr->regmap = dev_get_regmap(dev->parent, NULL);
...
}[Severity: High]
This isn't a bug introduced by this patch, but does this code need to check if pwr->regmap is NULL?
If dev_get_regmap() returns NULL due to an incomplete device tree, it seems this could lead to a kernel panic during an interrupt when tps6521x_pb_irq() dereferences it:
drivers/input/misc/tps65218-pwrbutton.c:tps6521x_pb_irq() {
...
error = regmap_read(pwr->regmap, tps_data->reg_status, ®);
...
}drivers/input/misc/tps65218-pwrbutton.c:tps6521x_pb_probe() {
...
irq = platform_get_irq(pdev, 0);
if (irq < 0)
return -EINVAL;
...
}[Severity: High]
This is also a pre-existing issue, but does masking the return value of platform_get_irq() break probe deferral?
If platform_get_irq() returns -EPROBE_DEFER, converting the error to -EINVAL prevents the driver core from handling the deferral and retrying later.
Quoted 5 lines
Documentation/devicetree/bindings/input/ti,tps65217-pwrbutton.yaml new file +0
-0
[ ... ]
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
Rob Herring
maintainerRe: [PATCH v3 3/4] dt-bindings: input: Convert TI TPS65217 power button to DT schema
Quoted 6 lines · On Tue, Jul 21, 2026 at 11:34:07AM +0000, [email protected] wrote:
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Pre-existing issues:
- [High] Missing NULL check ondev_get_regmapcan lead to a kernel panic in the IRQ handler.
- [High] The driver incorrectly masksplatform_get_irq()error codes with-EINVAL, breaking probe deferral. --
Why is sashiko pointing out driver issues on a DT binding patch? This series doesn't even touch the driver. This seems to be a re-occurring problem.
Rob
PATCH v3 4/4 dt-bindings: leds: backlight: Convert TPS65217 to DT schema
In reply to Eduard BostinaConvert 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.
--- .../bindings/leds/backlight/ti,tps65217.yaml | 170 ++++++++++++++++++ .../leds/backlight/tps65217-backlight.txt | 27 --- 2 files changed, 170 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 +170 -0
@@ -0,0 +1,170 @@ +# 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. + + patternProperties: + "^(dcdc[1-3]|ldo[1-4])$": + type: object + $ref: /schemas/regulator/regulator.yaml# + unevaluatedProperties: false + + charger: + $ref: /schemas/power/supply/tps65217-charger.yaml# + unevaluatedProperties: false + + pwrbutton: + $ref: /schemas/input/ti,tps65217-pwrbutton.yaml# + unevaluatedProperties: false + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pmic@24 { + compatible = "ti,tps65217"; + reg = <0x24>; + interrupt-controller; + #interrupt-cells = <1>; + ti,pmic-shutdown-controller; + + backlight { + isel = <1>; /* 1 - ISET1, 2 ISET2 */ + fdim = <100>; /* TPS65217_BL_FDIM_100HZ */ + default-brightness = <50>; + }; + + charger { + compatible = "ti,tps65217-charger"; + interrupts = <0>, <1>; + interrupt-names = "USB", "AC"; + }; + + pwrbutton { + compatible = "ti,tps65217-pwrbutton"; + interrupts = <2>; + }; + + regulators { + dcdc1 { + regulator-name = "vdds_dpr"; + regulator-always-on; + }; + + dcdc2 { + regulator-name = "vdd_mpu"; + regulator-min-microvolt = <925000>; + regulator-max-microvolt = <1351500>; + regulator-boot-on; + regulator-always-on; + }; + + dcdc3 { + regulator-name = "vdd_core"; + regulator-min-microvolt = <925000>; + regulator-max-microvolt = <1150000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo1 { + regulator-name = "vio,vrtc,vdds"; + regulator-always-on; + }; + + ldo2 { + regulator-name = "vdd_3v3aux"; + regulator-always-on; + }; + + ldo3 { + regulator-name = "vdd_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + + ldo4 { + regulator-name = "vdd_3v3a"; + regulator-always-on; + }; + }; + }; + };
Documentation/devicetree/bindings/leds/backlight/tps65217-backlight.txt deleted +0 -27
@@ -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
[email protected]
AI reviewRe: [PATCH v3 4/4] 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] The patch converts the TPS65217 backlight binding to a comprehensive PMIC schema but fails to…
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The patch converts the TPS65217 backlight binding to a comprehensive PMIC schema but fails to delete the existing regulator/tps65217.txt binding, resulting in duplicate bindings.
- [Medium] The binding adds interrupt controller capabilities but omits interrupt-controller and #interrupt-cells from the required list.
--
--- Patch [4]: [PATCH v3 4/4] dt-bindings: leds: backlight: Convert TPS65217 to DT schema --- commit 280c44c9d977e107c7e28a27785e5c9c3dbde99e
Author: Eduard Bostina <[email protected]>
dt-bindings: leds: backlight: Convert TPS65217 to DT schema
This commit converts the Texas Instruments TPS65217 backlight binding to DT schema, adding child nodes for regulators, charger, and pwrbutton, as well as documenting interrupt and shutdown controller properties.
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@@ -0,0 +1,170 @@ +# 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]
This schema defines a comprehensive PMIC with regulators and chargers rather than just a backlight, but it is placed in the leds/backlight directory. Should this be moved to a more central MFD or regulator schema location?
Additionally, it appears the existing regulator binding documentation at Documentation/devicetree/bindings/regulator/tps65217.txt was not deleted in this patch, leaving duplicate bindings for the ti,tps65217 compatible string. Should that file be removed as part of this conversion so schema validation is not split and inconsistent?
[ ... ]
Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml line 91
Quoted 7 lines
Documentation/devicetree/bindings/leds/backlight/ti,tps65217.yaml new file +7
-0+ pwrbutton: + $ref: /schemas/input/ti,tps65217-pwrbutton.yaml# + unevaluatedProperties: false + +required: + - compatible + - reg
[Severity: Medium]
Because this binding allows the device to act as an interrupt controller, do interrupt-controller and #interrupt-cells need to be included in this required list?
The device tree binding guidelines indicate that when hardware provides these capabilities, the corresponding properties must be required so incomplete device tree nodes don't silently pass validation.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
Re: [PATCH v3 4/4] dt-bindings: leds: backlight: Convert TPS65217 to DT schema
In reply to Eduard BostinaQuoted 10 lines · 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.
Quoted 4 lines
Signed-off-by Eduard Bostina <[email protected]>--- .../bindings/leds/backlight/ti,tps65217.yaml | 170 ++++++++++++++++++ .../leds/backlight/tps65217-backlight.txt | 27 ---
Biinding looks fine to me, but as pointed out you missed to remove old TXT binding.
Best regards,
Krzysztof
Re: [PATCH v3 4/4] dt-bindings: leds: backlight: Convert TPS65217 to DT schema
Quoted 17 lines · Krzysztof Kozlowski
Quoted 10 lines · 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.Quoted 4 lines
Signed-off-by Eduard Bostina <[email protected]>--- .../bindings/leds/backlight/ti,tps65217.yaml | 170 ++++++++++++++++++ .../leds/backlight/tps65217-backlight.txt | 27 ---
Quoted 6 lines
Biinding looks fine to me, but as pointed out you missed to remove old TXT binding.
Best regards,
Krzysztof
Thanks. Will send v4 that removes regulator/tps65217.txt as well. Should I move the binding to another place (mfd/ or regulator/ as suggested)? leds/backlight/ is arguably wrong now that the schema describes the whole pmic.
Eduard