summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>2026-06-08 22:44:24 +0200
committerLee Jones <lee@kernel.org>2026-07-30 14:32:31 +0100
commit39268dbd7bc7feecb684b7f84eb20efaf2241ff1 (patch)
tree2de63f095d55dba7fc5e15aab3b54c02f5d8d76a
parentf1f3afd19fca9e7f43cbcc1efaf60c365226c1ca (diff)
downloadlinux-39268dbd7bc7feecb684b7f84eb20efaf2241ff1.tar.gz
linux-39268dbd7bc7feecb684b7f84eb20efaf2241ff1.zip
dt-bindings: mfd: syscon: Disallow simple-bus with syscon
"syscon" is a system controller with registers having their own functions, thus not really a trivial MMIO simple bus. "simple-bus" on the other hand is just a bus on which multiple devices sit and the "simple" means no functions are allowed here. Combination of both "syscon" and "simple-bus" is abuse of DT for easier instantiating of Linux device drivers so add a schema to disallow that. Unfortunately there are a few old cases of that patterns, so add exceptions: 1. "cznic,turris1x-cpld" and "img,pistachio-cr-periph" are already used in upstream DTS. 2. TI has several DTSI with a child of SCM device (e.g. "ti,am3-scm") using "syscon" and "simple-bus" but without a dedicated compatible documented anywhere. Add new compatibles for such cases. Additionally, add comments around code enforcing two or three compatibles: it is similar safeguard detecting incorrect bindings. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20260608-n-dt-bindings-simple-bus-syscon-v3-1-4eba9ec1212a@oss.qualcomm.com Signed-off-by: Lee Jones <lee@kernel.org>
-rw-r--r--Documentation/devicetree/bindings/mfd/syscon-common.yaml34
1 files changed, 34 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/mfd/syscon-common.yaml b/Documentation/devicetree/bindings/mfd/syscon-common.yaml
index 14a08e7bc8bd..2d5eef5add54 100644
--- a/Documentation/devicetree/bindings/mfd/syscon-common.yaml
+++ b/Documentation/devicetree/bindings/mfd/syscon-common.yaml
@@ -32,6 +32,7 @@ properties:
compatible:
contains:
const: syscon
+ # Always require a specific compatible for syscon
minItems: 2
maxItems: 5 # Should be enough
@@ -52,11 +53,44 @@ allOf:
contains:
const: simple-mfd
then:
+ # Always require a specific compatible for syscon with simple-mfd
properties:
compatible:
minItems: 3
maxItems: 5
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: simple-bus
+ then:
+ # simple-bus conflicts with syscon - if a device is a system controller
+ # with miscellaneous registers, then it has at least one dedicated
+ # function thus it is not a simple bus. Allow existing exceptions.
+ if:
+ properties:
+ compatible:
+ not:
+ contains:
+ # This list CANNOT grow
+ enum:
+ - cznic,turris1x-cpld
+ - img,pistachio-cr-periph
+ - ti,am3352-scm-conf
+ - ti,am4372-scm-conf
+ - ti,dm814-scm-conf
+ - ti,dm8168-scm-conf
+ - ti,dra7-scm-conf
+ - ti,omap2-scm-conf
+ - ti,omap3-scm-conf
+ - ti,omap4-sysc-padconf-global
+ - ti,omap5-scm-wkup-conf
+ - ti,omap5-sysc-padconf-global
+ then:
+ required:
+ - incorrect-usage-of-simple-bus-and-syscon
+
additionalProperties: true
examples: