* [PATCH v7 0/3] dt-bindings: mfd: twl: Consolidate and fix TI TWL family bindings
@ 2025-09-10 16:07 Jihed Chaibi
2025-09-10 16:07 ` [PATCH v7 1/3] dt-bindings: mfd: twl: Add missing sub-nodes for TWL4030 & TWL603x Jihed Chaibi
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Jihed Chaibi @ 2025-09-10 16:07 UTC (permalink / raw)
To: andreas
Cc: lee, krzk+dt, tony, robh, conor+dt, ukleinek, devicetree,
linux-kernel, linux-pwm, linux-omap, jihed.chaibi.dev
This version addresses a final piece of feedback from Andreas to make
the twl4030/twl6030-specific child nodes (audio, usb, keypad etc.)
conditional by moving them out of the common block, which now only
contains common properties (rtc, charger, pwm, pwmled..) ensuring
the schema is fully accurate.
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].
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Uwe Kleine-König <ukleinek@kernel.org>
---
Changes in v7:
- (1/3): Moved twl4030/twl6030-specific child node definitions (audio,
usb etc.) into the conditional 'if/then' block to improve schema
accuracy.
- (2/3 & 3/3): No changes.
Changes in v6:
- Refactored the ti,twl4030-power compatible schema to be much stricter,
removing obsolete board-specific compatibles (-n900, -beagleboard-xm),
that were added in v5. The schema now only permits specific, valid
fallback combinations.
- This series presents two new patches (2/3) & (3/3), which update the
affected DTS files by removing obsolete entries.
- Enforced the presence of the compatible property on all relevant
sub-nodes by adding 'required: - compatible', closing a key validation
loophole.
- Applied various formatting cleanups for readability and correctness.
Changes in v5:
- Restructured the entire binding to define properties at the top
level instead of if/then blocks, per maintainer feedback.
- Added specific compatible enums for new child nodes instead of a
generic 'compatible: true'.
- Set 'unevaluatedProperties: false' for 'pwm' and 'pwmled' nodes to
enforce strict validation.
- Expanded 'power' node compatible enum to include all board-specific
compatible strings (used in existing device trees, e.g. OMAP3-based
boards) for more complete coverage.
- Corrected the schema for the 'power' node compatible to properly
handle single and fallback entries.
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/20250822222530.113520-1-jihed.chaibi.dev@gmail.com/
[2] https://lore.kernel.org/all/20250822225052.136919-1-jihed.chaibi.dev@gmail.com/
[3] https://lore.kernel.org/all/20250816021523.167049-1-jihed.chaibi.dev@gmail.com/
Jihed Chaibi (3):
dt-bindings: mfd: twl: Add missing sub-nodes for TWL4030 & TWL603x
ARM: dts: omap3: beagle-xm: Correct obsolete TWL4030 power compatible
ARM: dts: omap3: n900: Correct obsolete TWL4030 power compatible
.../devicetree/bindings/mfd/ti,twl.yaml | 232 +++++++++++++++++-
.../devicetree/bindings/mfd/twl4030-power.txt | 48 ----
.../devicetree/bindings/pwm/ti,twl-pwm.txt | 17 --
.../devicetree/bindings/pwm/ti,twl-pwmled.txt | 17 --
arch/arm/boot/dts/ti/omap/omap3-beagle-xm.dts | 2 +-
arch/arm/boot/dts/ti/omap/omap3-n900.dts | 2 +-
6 files changed, 223 insertions(+), 95 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
--
2.39.5
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v7 1/3] dt-bindings: mfd: twl: Add missing sub-nodes for TWL4030 & TWL603x
2025-09-10 16:07 [PATCH v7 0/3] dt-bindings: mfd: twl: Consolidate and fix TI TWL family bindings Jihed Chaibi
@ 2025-09-10 16:07 ` Jihed Chaibi
2025-09-11 6:36 ` Krzysztof Kozlowski
2025-09-10 16:07 ` [PATCH v7 2/3] ARM: dts: omap3: beagle-xm: Correct obsolete TWL4030 power compatible Jihed Chaibi
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Jihed Chaibi @ 2025-09-10 16:07 UTC (permalink / raw)
To: andreas
Cc: lee, krzk+dt, tony, robh, conor+dt, ukleinek, devicetree,
linux-kernel, linux-pwm, linux-omap, jihed.chaibi.dev
Update the main TI TWL-family binding to be self-contained and to fix
pre-existing validation errors.
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].
Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
---
Changes in v7:
- Moved twl4030/twl6030-specific child node definitions (audio, usb..)
into the conditional 'if/then' block to improve schema accuracy.
Changes in v6:
- Refactored the ti,twl4030-power compatible schema to be much stricter,
removing obsolete board-specific compatibles (-n900, -beagleboard-xm),
that were added in v5. The schema now only permits specific, valid
fallback combinations. This change is supported by subsequent patches
in the same series (2/3) & (3/3), which update the affected DTS files.
- Enforced the presence of the compatible property on all relevant
sub-nodes by adding 'required: - compatible', closing a key validation
loophole.
- Applied various formatting cleanups for readability and correctness.
Changes in v5:
- Restructured the entire binding to define properties at the top
level instead of if/then blocks, per maintainer feedback.
- Added specific compatible enums for new child nodes instead of a
generic 'compatible: true'.
- Set 'unevaluatedProperties: false' for 'pwm' and 'pwmled' nodes to
enforce strict validation.
- Expanded 'power' node compatible enum to include all board-specific
compatible strings (used in existing device trees, e.g. OMAP3-based
boards) for more complete coverage.
- Corrected the schema for the 'power' node compatible to properly
handle single and fallback entries.
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/20250822222530.113520-1-jihed.chaibi.dev@gmail.com/
[2] https://lore.kernel.org/all/20250822225052.136919-1-jihed.chaibi.dev@gmail.com/
[3] https://lore.kernel.org/all/20250816021523.167049-1-jihed.chaibi.dev@gmail.com/
---
.../devicetree/bindings/mfd/ti,twl.yaml | 232 +++++++++++++++++-
.../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, 221 insertions(+), 93 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
diff --git a/Documentation/devicetree/bindings/mfd/ti,twl.yaml b/Documentation/devicetree/bindings/mfd/ti,twl.yaml
index f162ab60c09b..95238a10ecda 100644
--- a/Documentation/devicetree/bindings/mfd/ti,twl.yaml
+++ b/Documentation/devicetree/bindings/mfd/ti,twl.yaml
@@ -9,11 +9,13 @@ title: Texas Instruments TWL family
maintainers:
- Andreas Kemnade <andreas@kemnade.info>
-description: |
+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:
@@ -62,6 +64,7 @@ allOf:
pwrbutton:
type: object
additionalProperties: false
+
properties:
compatible:
const: ti,twl4030-pwrbutton
@@ -73,9 +76,109 @@ allOf:
watchdog:
type: object
additionalProperties: false
+
properties:
compatible:
const: ti,twl4030-wdt
+
+ audio:
+ type: object
+ additionalProperties: true
+
+ properties:
+ compatible:
+ const: ti,twl4030-audio
+
+ required:
+ - compatible
+
+ keypad:
+ type: object
+ additionalProperties: true
+
+ properties:
+ compatible:
+ const: ti,twl4030-keypad
+
+ required:
+ - compatible
+
+ twl4030-usb:
+ type: object
+ additionalProperties: true
+
+ properties:
+ compatible:
+ const: ti,twl4030-usb
+
+ required:
+ - compatible
+
+ gpio:
+ type: object
+ additionalProperties: true
+
+ properties:
+ compatible:
+ const: ti,twl4030-gpio
+
+ required:
+ - compatible
+
+ 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.
+
+ Board-specific compatible strings may be used for platform-specific
+ power configurations.
+
+ A board-specific compatible string (e.g., ti,twl4030-power-omap3-evm)
+ may be paired with a generic fallback (generally for power saving mode).
+
+ properties:
+ compatible:
+ oneOf:
+ # Case 1: A single compatible string is provided.
+ - enum:
+ - ti,twl4030-power
+ - ti,twl4030-power-reset
+ - ti,twl4030-power-idle
+ - ti,twl4030-power-idle-osc-off
+ - ti,twl4030-power-omap3-sdp
+ - ti,twl4030-power-omap3-ldp
+ - ti,twl4030-power-omap3-evm
+
+ # Case 2: The specific, valid fallback for 'idle-osc-off'.
+ - items:
+ - const: ti,twl4030-power-idle-osc-off
+ - const: ti,twl4030-power-idle
+
+ # Case 3: The specific, valid fallback for 'omap3-evm'.
+ - items:
+ - const: ti,twl4030-power-omap3-evm
+ - const: ti,twl4030-power-idle
+
+ 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
+ description: DEPRECATED, to be removed.
+
+ required:
+ - compatible
+
- if:
properties:
compatible:
@@ -107,14 +210,29 @@ allOf:
properties:
charger:
type: object
+
properties:
compatible:
const: ti,twl6030-charger
+
gpadc:
type: object
+
properties:
compatible:
const: ti,twl6030-gpadc
+
+ usb-comparator:
+ type: object
+ additionalProperties: true
+
+ properties:
+ compatible:
+ const: ti,twl6030-usb
+
+ required:
+ - compatible
+
- if:
properties:
compatible:
@@ -143,22 +261,37 @@ allOf:
properties:
charger:
type: object
+
properties:
compatible:
items:
- const: ti,twl6032-charger
- const: ti,twl6030-charger
+
gpadc:
type: object
+
properties:
compatible:
const: ti,twl6032-gpadc
+ usb-comparator:
+ type: object
+ additionalProperties: true
+
+ properties:
+ compatible:
+ const: ti,twl6030-usb
+
+ required:
+ - compatible
+
properties:
compatible:
- description:
- TWL4030 for integrated power-management/audio CODEC device used in OMAP3
- based boards
+ description: >
+ TWL4030 for integrated power-management/audio CODEC device used in
+ OMAP3 based boards.
+
TWL6030/32 for integrated power-management used in OMAP4 based boards
enum:
- ti,twl4030
@@ -181,28 +314,80 @@ properties:
"#clock-cells":
const: 1
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ const: fck
+
charger:
type: object
additionalProperties: true
+
properties:
compatible: true
+
required:
- compatible
rtc:
type: object
additionalProperties: false
+
properties:
compatible:
const: ti,twl4030-rtc
interrupts:
maxItems: 1
+ pwm:
+ type: object
+ $ref: /schemas/pwm/pwm.yaml#
+ unevaluatedProperties: false
+ description:
+ PWM controllers (PWM1 and PWM2 on TWL4030, PWM0 and PWM1 on TWL6030/32).
+
+ properties:
+ compatible:
+ enum:
+ - ti,twl4030-pwm
+ - ti,twl6030-pwm
+
+ '#pwm-cells':
+ const: 2
+
+ required:
+ - compatible
+ - '#pwm-cells'
+
+ pwmled:
+ type: object
+ $ref: /schemas/pwm/pwm.yaml#
+ unevaluatedProperties: false
+ description: >
+ PWM controllers connected to LED terminals (PWMA and PWMB on TWL4030.
+
+ LED PWM on TWL6030/32, mainly used as charging indicator LED).
+
+ properties:
+ compatible:
+ enum:
+ - ti,twl4030-pwmled
+ - ti,twl6030-pwmled
+
+ '#pwm-cells':
+ const: 2
+
+ required:
+ - compatible
+ - '#pwm-cells'
+
patternProperties:
"^regulator-":
type: object
unevaluatedProperties: false
$ref: /schemas/regulator/regulator.yaml
+
properties:
compatible: true
regulator-initial-mode:
@@ -211,12 +396,13 @@ patternProperties:
# with low power consumption with low load current capability
- 0x0e # Active mode, the regulator can deliver its nominal output
# voltage with full-load current capability
+
ti,retain-on-reset:
- description:
- Does not turn off the supplies during warm
- reset. Could be needed for VMMC, as TWL6030
- reset sequence for this signal does not comply
- with the SD specification.
+ description: >
+ Does not turn off the supplies during warm reset.
+
+ Could be needed for VMMC, as TWL6030 reset sequence for
+ this signal does not comply with the SD specification.
type: boolean
unevaluatedProperties: false
@@ -271,6 +457,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 +521,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>;
+ };
};
};
...
diff --git a/Documentation/devicetree/bindings/mfd/twl4030-power.txt b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
deleted file mode 100644
index 3d19963312ce..000000000000
--- a/Documentation/devicetree/bindings/mfd/twl4030-power.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-Texas Instruments TWL family (twl4030) reset and power management module
-
-The power management module inside the TWL family 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.
-
-Required properties:
-- compatible : must be one of the following
- "ti,twl4030-power"
- "ti,twl4030-power-reset"
- "ti,twl4030-power-idle"
- "ti,twl4030-power-idle-osc-off"
-
-The use of ti,twl4030-power-reset is recommended at least on
-3530 that needs a special configuration for warm reset to work.
-
-When using ti,twl4030-power-idle, the TI recommended configuration
-for idle modes is loaded to the tlw4030 PMIC.
-
-When using ti,twl4030-power-idle-osc-off, the TI recommended
-configuration is used with the external oscillator being shut
-down during off-idle. Note that this does not work on all boards
-depending on how the external oscillator is wired.
-
-Optional properties:
-
-- ti,system-power-controller: This indicates that TWL4030 is the
- power supply master of the system. With this flag, the chip will
- initiate an ACTIVE-to-OFF or SLEEP-to-OFF transition when the
- system poweroffs.
-
-- ti,use_poweroff: Deprecated name for ti,system-power-controller
-
-Example:
-&i2c1 {
- clock-frequency = <2600000>;
-
- twl: twl@48 {
- reg = <0x48>;
- interrupts = <7>; /* SYS_NIRQ cascaded to intc */
- interrupt-parent = <&intc>;
-
- twl_power: power {
- compatible = "ti,twl4030-power";
- ti,use_poweroff;
- };
- };
-};
diff --git a/Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt b/Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt
deleted file mode 100644
index d97ca1964e94..000000000000
--- a/Documentation/devicetree/bindings/pwm/ti,twl-pwm.txt
+++ /dev/null
@@ -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>;
-};
diff --git a/Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt b/Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt
deleted file mode 100644
index 31ca1b032ef0..000000000000
--- a/Documentation/devicetree/bindings/pwm/ti,twl-pwmled.txt
+++ /dev/null
@@ -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>;
-};
--
2.39.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v7 2/3] ARM: dts: omap3: beagle-xm: Correct obsolete TWL4030 power compatible
2025-09-10 16:07 [PATCH v7 0/3] dt-bindings: mfd: twl: Consolidate and fix TI TWL family bindings Jihed Chaibi
2025-09-10 16:07 ` [PATCH v7 1/3] dt-bindings: mfd: twl: Add missing sub-nodes for TWL4030 & TWL603x Jihed Chaibi
@ 2025-09-10 16:07 ` Jihed Chaibi
2025-09-10 16:07 ` [PATCH v7 3/3] ARM: dts: omap3: n900: " Jihed Chaibi
2025-09-11 6:35 ` [PATCH v7 0/3] dt-bindings: mfd: twl: Consolidate and fix TI TWL family bindings Krzysztof Kozlowski
3 siblings, 0 replies; 10+ messages in thread
From: Jihed Chaibi @ 2025-09-10 16:07 UTC (permalink / raw)
To: andreas
Cc: lee, krzk+dt, tony, robh, conor+dt, ukleinek, devicetree,
linux-kernel, linux-pwm, linux-omap, jihed.chaibi.dev
The "ti,twl4030-power-beagleboard-xm" compatible string is obsolete and
is not supported by any in-kernel driver. Currently, the kernel falls
back to the second entry, "ti,twl4030-power-idle-osc-off", to bind a
driver to this node.
Make this fallback explicit by removing the obsolete board-specific
compatible. This preserves the existing functionality while making the
DTS compliant with the new, stricter 'ti,twl.yaml' binding.
Fixes: 9188883fd66e9 ("ARM: dts: Enable twl4030 off-idle configuration for selected omaps")
Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
---
Changes in v7:
- No changes.
Changes in v6:
- This patch was added in this version
---
arch/arm/boot/dts/ti/omap/omap3-beagle-xm.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/ti/omap/omap3-beagle-xm.dts b/arch/arm/boot/dts/ti/omap/omap3-beagle-xm.dts
index 08ee0f8ea68f..71b39a923d37 100644
--- a/arch/arm/boot/dts/ti/omap/omap3-beagle-xm.dts
+++ b/arch/arm/boot/dts/ti/omap/omap3-beagle-xm.dts
@@ -291,7 +291,7 @@ codec {
};
twl_power: power {
- compatible = "ti,twl4030-power-beagleboard-xm", "ti,twl4030-power-idle-osc-off";
+ compatible = "ti,twl4030-power-idle-osc-off";
ti,use_poweroff;
};
};
--
2.39.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v7 3/3] ARM: dts: omap3: n900: Correct obsolete TWL4030 power compatible
2025-09-10 16:07 [PATCH v7 0/3] dt-bindings: mfd: twl: Consolidate and fix TI TWL family bindings Jihed Chaibi
2025-09-10 16:07 ` [PATCH v7 1/3] dt-bindings: mfd: twl: Add missing sub-nodes for TWL4030 & TWL603x Jihed Chaibi
2025-09-10 16:07 ` [PATCH v7 2/3] ARM: dts: omap3: beagle-xm: Correct obsolete TWL4030 power compatible Jihed Chaibi
@ 2025-09-10 16:07 ` Jihed Chaibi
2025-09-11 6:35 ` [PATCH v7 0/3] dt-bindings: mfd: twl: Consolidate and fix TI TWL family bindings Krzysztof Kozlowski
3 siblings, 0 replies; 10+ messages in thread
From: Jihed Chaibi @ 2025-09-10 16:07 UTC (permalink / raw)
To: andreas
Cc: lee, krzk+dt, tony, robh, conor+dt, ukleinek, devicetree,
linux-kernel, linux-pwm, linux-omap, jihed.chaibi.dev
The "ti,twl4030-power-n900" compatible string is obsolete and is not
supported by any in-kernel driver. Currently, the kernel falls back to
the second entry, "ti,twl4030-power-idle-osc-off", to bind a driver to
this node.
Make this fallback explicit by removing the obsolete board-specific
compatible. This preserves the existing functionality while making the
DTS compliant with the new, stricter 'ti,twl.yaml' binding.
Fixes: daebabd578647 ("mfd: twl4030-power: Fix PM idle pin configuration to not conflict with regulators")
Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
---
Changes in v7:
- No changes.
Changes in v6:
- This patch was added in this version
---
arch/arm/boot/dts/ti/omap/omap3-n900.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/ti/omap/omap3-n900.dts b/arch/arm/boot/dts/ti/omap/omap3-n900.dts
index c50ca572d1b9..7db73d9bed9e 100644
--- a/arch/arm/boot/dts/ti/omap/omap3-n900.dts
+++ b/arch/arm/boot/dts/ti/omap/omap3-n900.dts
@@ -508,7 +508,7 @@ twl_audio: audio {
};
twl_power: power {
- compatible = "ti,twl4030-power-n900", "ti,twl4030-power-idle-osc-off";
+ compatible = "ti,twl4030-power-idle-osc-off";
ti,use_poweroff;
};
};
--
2.39.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v7 0/3] dt-bindings: mfd: twl: Consolidate and fix TI TWL family bindings
2025-09-10 16:07 [PATCH v7 0/3] dt-bindings: mfd: twl: Consolidate and fix TI TWL family bindings Jihed Chaibi
` (2 preceding siblings ...)
2025-09-10 16:07 ` [PATCH v7 3/3] ARM: dts: omap3: n900: " Jihed Chaibi
@ 2025-09-11 6:35 ` Krzysztof Kozlowski
2025-09-11 6:43 ` Andreas Kemnade
3 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2025-09-11 6:35 UTC (permalink / raw)
To: Jihed Chaibi
Cc: andreas, lee, krzk+dt, tony, robh, conor+dt, ukleinek, devicetree,
linux-kernel, linux-pwm, linux-omap
On Wed, Sep 10, 2025 at 06:07:01PM +0200, Jihed Chaibi wrote:
> This version addresses a final piece of feedback from Andreas to make
> the twl4030/twl6030-specific child nodes (audio, usb, keypad etc.)
> conditional by moving them out of the common block, which now only
> contains common properties (rtc, charger, pwm, pwmled..) ensuring
> the schema is fully accurate.
>
> 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].
>
> Reviewed-by: Rob Herring <robh@kernel.org>
> Acked-by: Uwe Kleine-König <ukleinek@kernel.org>
>
> ---
> Changes in v7:
> - (1/3): Moved twl4030/twl6030-specific child node definitions (audio,
> usb etc.) into the conditional 'if/then' block to improve schema
> accuracy.
Who asked for this? It's wrong code.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v7 1/3] dt-bindings: mfd: twl: Add missing sub-nodes for TWL4030 & TWL603x
2025-09-10 16:07 ` [PATCH v7 1/3] dt-bindings: mfd: twl: Add missing sub-nodes for TWL4030 & TWL603x Jihed Chaibi
@ 2025-09-11 6:36 ` Krzysztof Kozlowski
2025-09-11 6:38 ` Krzysztof Kozlowski
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2025-09-11 6:36 UTC (permalink / raw)
To: Jihed Chaibi
Cc: andreas, lee, krzk+dt, tony, robh, conor+dt, ukleinek, devicetree,
linux-kernel, linux-pwm, linux-omap
On Wed, Sep 10, 2025 at 06:07:02PM +0200, Jihed Chaibi wrote:
> Update the main TI TWL-family binding to be self-contained and to fix
> pre-existing validation errors.
>
> 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].
>
> Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
>
> ---
> Changes in v7:
> - Moved twl4030/twl6030-specific child node definitions (audio, usb..)
> into the conditional 'if/then' block to improve schema accuracy.
>
> Changes in v6:
> - Refactored the ti,twl4030-power compatible schema to be much stricter,
> removing obsolete board-specific compatibles (-n900, -beagleboard-xm),
> that were added in v5. The schema now only permits specific, valid
> fallback combinations. This change is supported by subsequent patches
> in the same series (2/3) & (3/3), which update the affected DTS files.
> - Enforced the presence of the compatible property on all relevant
> sub-nodes by adding 'required: - compatible', closing a key validation
> loophole.
> - Applied various formatting cleanups for readability and correctness.
>
> Changes in v5:
> - Restructured the entire binding to define properties at the top
> level instead of if/then blocks, per maintainer feedback.
> - Added specific compatible enums for new child nodes instead of a
> generic 'compatible: true'.
> - Set 'unevaluatedProperties: false' for 'pwm' and 'pwmled' nodes to
> enforce strict validation.
> - Expanded 'power' node compatible enum to include all board-specific
> compatible strings (used in existing device trees, e.g. OMAP3-based
> boards) for more complete coverage.
> - Corrected the schema for the 'power' node compatible to properly
> handle single and fallback entries.
>
> 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/20250822222530.113520-1-jihed.chaibi.dev@gmail.com/
> [2] https://lore.kernel.org/all/20250822225052.136919-1-jihed.chaibi.dev@gmail.com/
> [3] https://lore.kernel.org/all/20250816021523.167049-1-jihed.chaibi.dev@gmail.com/
> ---
> .../devicetree/bindings/mfd/ti,twl.yaml | 232 +++++++++++++++++-
> .../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, 221 insertions(+), 93 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
>
> diff --git a/Documentation/devicetree/bindings/mfd/ti,twl.yaml b/Documentation/devicetree/bindings/mfd/ti,twl.yaml
> index f162ab60c09b..95238a10ecda 100644
> --- a/Documentation/devicetree/bindings/mfd/ti,twl.yaml
> +++ b/Documentation/devicetree/bindings/mfd/ti,twl.yaml
> @@ -9,11 +9,13 @@ title: Texas Instruments TWL family
> maintainers:
> - Andreas Kemnade <andreas@kemnade.info>
>
> -description: |
> +description: >
Why?
> 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:
> @@ -62,6 +64,7 @@ allOf:
> pwrbutton:
> type: object
> additionalProperties: false
> +
> properties:
> compatible:
> const: ti,twl4030-pwrbutton
> @@ -73,9 +76,109 @@ allOf:
> watchdog:
> type: object
> additionalProperties: false
> +
> properties:
> compatible:
> const: ti,twl4030-wdt
> +
> + audio:
Don't define properties in conditional block.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v7 1/3] dt-bindings: mfd: twl: Add missing sub-nodes for TWL4030 & TWL603x
2025-09-11 6:36 ` Krzysztof Kozlowski
@ 2025-09-11 6:38 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2025-09-11 6:38 UTC (permalink / raw)
To: Jihed Chaibi
Cc: andreas, lee, krzk+dt, tony, robh, conor+dt, ukleinek, devicetree,
linux-kernel, linux-pwm, linux-omap
On 11/09/2025 08:36, Krzysztof Kozlowski wrote:
> On Wed, Sep 10, 2025 at 06:07:02PM +0200, Jihed Chaibi wrote:
>> Update the main TI TWL-family binding to be self-contained and to fix
>> pre-existing validation errors.
>>
>> 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].
>>
>> Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
>>
>> ---
>> Changes in v7:
>> - Moved twl4030/twl6030-specific child node definitions (audio, usb..)
>> into the conditional 'if/then' block to improve schema accuracy.
>>
>> Changes in v6:
>> - Refactored the ti,twl4030-power compatible schema to be much stricter,
>> removing obsolete board-specific compatibles (-n900, -beagleboard-xm),
>> that were added in v5. The schema now only permits specific, valid
>> fallback combinations. This change is supported by subsequent patches
>> in the same series (2/3) & (3/3), which update the affected DTS files.
>> - Enforced the presence of the compatible property on all relevant
>> sub-nodes by adding 'required: - compatible', closing a key validation
>> loophole.
>> - Applied various formatting cleanups for readability and correctness.
>>
>> Changes in v5:
>> - Restructured the entire binding to define properties at the top
>> level instead of if/then blocks, per maintainer feedback.
>> - Added specific compatible enums for new child nodes instead of a
>> generic 'compatible: true'.
>> - Set 'unevaluatedProperties: false' for 'pwm' and 'pwmled' nodes to
>> enforce strict validation.
>> - Expanded 'power' node compatible enum to include all board-specific
>> compatible strings (used in existing device trees, e.g. OMAP3-based
>> boards) for more complete coverage.
>> - Corrected the schema for the 'power' node compatible to properly
>> handle single and fallback entries.
>>
>> 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/20250822222530.113520-1-jihed.chaibi.dev@gmail.com/
>> [2] https://lore.kernel.org/all/20250822225052.136919-1-jihed.chaibi.dev@gmail.com/
>> [3] https://lore.kernel.org/all/20250816021523.167049-1-jihed.chaibi.dev@gmail.com/
>> ---
>> .../devicetree/bindings/mfd/ti,twl.yaml | 232 +++++++++++++++++-
>> .../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, 221 insertions(+), 93 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
>>
>> diff --git a/Documentation/devicetree/bindings/mfd/ti,twl.yaml b/Documentation/devicetree/bindings/mfd/ti,twl.yaml
>> index f162ab60c09b..95238a10ecda 100644
>> --- a/Documentation/devicetree/bindings/mfd/ti,twl.yaml
>> +++ b/Documentation/devicetree/bindings/mfd/ti,twl.yaml
>> @@ -9,11 +9,13 @@ title: Texas Instruments TWL family
>> maintainers:
>> - Andreas Kemnade <andreas@kemnade.info>
>>
>> -description: |
>> +description: >
>
> Why?
>
>> 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:
>> @@ -62,6 +64,7 @@ allOf:
>> pwrbutton:
>> type: object
>> additionalProperties: false
>> +
>> properties:
>> compatible:
>> const: ti,twl4030-pwrbutton
>> @@ -73,9 +76,109 @@ allOf:
>> watchdog:
>> type: object
>> additionalProperties: false
>> +
>> properties:
>> compatible:
>> const: ti,twl4030-wdt
>> +
>> + audio:
>
> Don't define properties in conditional block.
Really, I don't understand. You got review from the DT maintainer, you
got other ack and you drop both and introduce a completely odd change
(it's even documented in writing bindings not to do that change).
No, revert to v6 and re-apply all the tags you received.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v7 0/3] dt-bindings: mfd: twl: Consolidate and fix TI TWL family bindings
2025-09-11 6:35 ` [PATCH v7 0/3] dt-bindings: mfd: twl: Consolidate and fix TI TWL family bindings Krzysztof Kozlowski
@ 2025-09-11 6:43 ` Andreas Kemnade
2025-09-11 7:07 ` Krzysztof Kozlowski
0 siblings, 1 reply; 10+ messages in thread
From: Andreas Kemnade @ 2025-09-11 6:43 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Jihed Chaibi, lee, krzk+dt, tony, robh, conor+dt, ukleinek,
devicetree, linux-kernel, linux-pwm, linux-omap
Am Thu, 11 Sep 2025 08:35:32 +0200
schrieb Krzysztof Kozlowski <krzk@kernel.org>:
> On Wed, Sep 10, 2025 at 06:07:01PM +0200, Jihed Chaibi wrote:
> > This version addresses a final piece of feedback from Andreas to make
> > the twl4030/twl6030-specific child nodes (audio, usb, keypad etc.)
> > conditional by moving them out of the common block, which now only
> > contains common properties (rtc, charger, pwm, pwmled..) ensuring
> > the schema is fully accurate.
> >
> > 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].
> >
> > Reviewed-by: Rob Herring <robh@kernel.org>
> > Acked-by: Uwe Kleine-König <ukleinek@kernel.org>
> >
> > ---
> > Changes in v7:
> > - (1/3): Moved twl4030/twl6030-specific child node definitions (audio,
> > usb etc.) into the conditional 'if/then' block to improve schema
> > accuracy.
>
> Who asked for this? It's wrong code.
>
maybe I was not clear there. That was not was I meant. As far as I
understand, the correct pattern is to define things outside of the
if/then block and
then disable it with property-name: false in the if/then block
Example: Handling of regulator-initial-mode property.
Sorry, for the confusion.
Regards,
Andreas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v7 0/3] dt-bindings: mfd: twl: Consolidate and fix TI TWL family bindings
2025-09-11 6:43 ` Andreas Kemnade
@ 2025-09-11 7:07 ` Krzysztof Kozlowski
2025-09-11 9:50 ` Jihed Chaibi
0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2025-09-11 7:07 UTC (permalink / raw)
To: Andreas Kemnade
Cc: Jihed Chaibi, lee, krzk+dt, tony, robh, conor+dt, ukleinek,
devicetree, linux-kernel, linux-pwm, linux-omap
On 11/09/2025 08:43, Andreas Kemnade wrote:
> Am Thu, 11 Sep 2025 08:35:32 +0200
> schrieb Krzysztof Kozlowski <krzk@kernel.org>:
>
>> On Wed, Sep 10, 2025 at 06:07:01PM +0200, Jihed Chaibi wrote:
>>> This version addresses a final piece of feedback from Andreas to make
>>> the twl4030/twl6030-specific child nodes (audio, usb, keypad etc.)
>>> conditional by moving them out of the common block, which now only
>>> contains common properties (rtc, charger, pwm, pwmled..) ensuring
>>> the schema is fully accurate.
>>>
>>> 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].
>>>
>>> Reviewed-by: Rob Herring <robh@kernel.org>
>>> Acked-by: Uwe Kleine-König <ukleinek@kernel.org>
>>>
>>> ---
>>> Changes in v7:
>>> - (1/3): Moved twl4030/twl6030-specific child node definitions (audio,
>>> usb etc.) into the conditional 'if/then' block to improve schema
>>> accuracy.
>>
>> Who asked for this? It's wrong code.
>>
> maybe I was not clear there. That was not was I meant. As far as I
> understand, the correct pattern is to define things outside of the
> if/then block and
> then disable it with property-name: false in the if/then block
> Example: Handling of regulator-initial-mode property.
Yes, I read your comment afterwards and that is how I would understand
it as well.
But the patch here is done differently.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v7 0/3] dt-bindings: mfd: twl: Consolidate and fix TI TWL family bindings
2025-09-11 7:07 ` Krzysztof Kozlowski
@ 2025-09-11 9:50 ` Jihed Chaibi
0 siblings, 0 replies; 10+ messages in thread
From: Jihed Chaibi @ 2025-09-11 9:50 UTC (permalink / raw)
To: Krzysztof Kozlowski, Andreas Kemnade
Cc: lee, krzk+dt, tony, robh, conor+dt, ukleinek, devicetree,
linux-kernel, linux-pwm, linux-omap
On Thu, Sep 11, 2025 at 9:07 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 11/09/2025 08:43, Andreas Kemnade wrote:
> > Am Thu, 11 Sep 2025 08:35:32 +0200
> > schrieb Krzysztof Kozlowski <krzk@kernel.org>:
> >
> >> On Wed, Sep 10, 2025 at 06:07:01PM +0200, Jihed Chaibi wrote:
> >>> This version addresses a final piece of feedback from Andreas to make
> >>> the twl4030/twl6030-specific child nodes (audio, usb, keypad etc.)
> >>> conditional by moving them out of the common block, which now only
> >>> contains common properties (rtc, charger, pwm, pwmled..) ensuring
> >>> the schema is fully accurate.
> >>>
> >>> 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].
> >>>
> >>> Reviewed-by: Rob Herring <robh@kernel.org>
> >>> Acked-by: Uwe Kleine-König <ukleinek@kernel.org>
> >>>
> >>> ---
> >>> Changes in v7:
> >>> - (1/3): Moved twl4030/twl6030-specific child node definitions (audio,
> >>> usb etc.) into the conditional 'if/then' block to improve schema
> >>> accuracy.
> >>
> >> Who asked for this? It's wrong code.
> >>
> > maybe I was not clear there. That was not was I meant. As far as I
> > understand, the correct pattern is to define things outside of the
> > if/then block and
> > then disable it with property-name: false in the if/then block
> > Example: Handling of regulator-initial-mode property.
>
> Yes, I read your comment afterwards and that is how I would understand
> it as well.
>
> But the patch here is done differently.
>
>
> Best regards,
> Krzysztof
Hi Krzysztof, Andreas,
Thank you for the clarification. my apologies, I
misunderstood the correct pattern.
I was following the existing structure in the original yaml
file, where several board-specific sub-nodes like 'madc',
'pwrbutton', and 'gpadc' etc. were already defined inside
the 'if/then' blocks. I assumed that was the correct
convention and that the main properties block was only
for shared nodes (like 'regulator' & 'pwm'..) which is
not the case.
I had (mis)interpreted Krzysztof's earlier feedback about
top-level definitions as applying only to properties
that were common to all variants (like 'pwm').
I will send a v8 implementing this "define then disable"
pattern for all sub-nodes. This will be a good
opportunity to clean up the pre-existing definitions
to make the entire binding fully consistent.
Thanks,
Jihed
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-09-11 9:50 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-10 16:07 [PATCH v7 0/3] dt-bindings: mfd: twl: Consolidate and fix TI TWL family bindings Jihed Chaibi
2025-09-10 16:07 ` [PATCH v7 1/3] dt-bindings: mfd: twl: Add missing sub-nodes for TWL4030 & TWL603x Jihed Chaibi
2025-09-11 6:36 ` Krzysztof Kozlowski
2025-09-11 6:38 ` Krzysztof Kozlowski
2025-09-10 16:07 ` [PATCH v7 2/3] ARM: dts: omap3: beagle-xm: Correct obsolete TWL4030 power compatible Jihed Chaibi
2025-09-10 16:07 ` [PATCH v7 3/3] ARM: dts: omap3: n900: " Jihed Chaibi
2025-09-11 6:35 ` [PATCH v7 0/3] dt-bindings: mfd: twl: Consolidate and fix TI TWL family bindings Krzysztof Kozlowski
2025-09-11 6:43 ` Andreas Kemnade
2025-09-11 7:07 ` Krzysztof Kozlowski
2025-09-11 9:50 ` Jihed Chaibi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).