[PATCH v4 2/4] dt-bindings: mfd: sprd,sc2731: Include SC2730 regulator bindings

From: Otto Pflüger

Date: Thu May 21 2026 - 12:37:10 EST


The SC2730 PMIC provides a different set of regulators from SC2731 and
thus requires separate regulator bindings. Allow using them for the
"regulators" node.

Add a conditional to make this depend on the top-level compatible of the
PMIC so that wrong combinations do not pass device tree binding
validation, e.g. if the SC2730 regulators are mistakenly added to an
SC2731 node.

Signed-off-by: Otto Pflüger <otto.pflueger@xxxxxxxxx>
---
Regarding Krzysztof's earlier suggestion to split the MFD bindings, I
would currently prefer not to make such a large change that duplicates
a large part of this binding. I am not planning to additionally restrict
the compatible properties for nodes that still have them, only the
regulators are affected by this.
---
.../devicetree/bindings/mfd/sprd,sc2731.yaml | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml b/Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml
index b023e1ef8d3c..39d26b6ab477 100644
--- a/Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml
+++ b/Documentation/devicetree/bindings/mfd/sprd,sc2731.yaml
@@ -54,7 +54,6 @@ properties:

regulators:
type: object
- $ref: /schemas/regulator/sprd,sc2731-regulator.yaml#

patternProperties:
"^adc@[0-9a-f]+$":
@@ -101,6 +100,26 @@ required:

additionalProperties: false

+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: sprd,sc2730
+ then:
+ properties:
+ regulators:
+ $ref: /schemas/regulator/sprd,sc2730-regulator.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: sprd,sc2731
+ then:
+ properties:
+ regulators:
+ $ref: /schemas/regulator/sprd,sc2731-regulator.yaml#
+
examples:
- |
#include <dt-bindings/gpio/gpio.h>

--
2.51.0