mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: mfd: syscon: Disallow simple-bus with syscon
@ 2026-05-31 11:04 Krzysztof Kozlowski
  2026-05-31 11:04 ` [PATCH 2/2] ARM: dts: ti: Add specific compatibles for SCM conf nodes Krzysztof Kozlowski
  2026-06-04 21:40 ` [PATCH 1/2] dt-bindings: mfd: syscon: Disallow simple-bus with syscon Rob Herring (Arm)
  0 siblings, 2 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2026-05-31 11:04 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros,
	Tony Lindgren, devicetree, linux-kernel, linux-omap
  Cc: Krzysztof Kozlowski

"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.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
 .../bindings/mfd/syscon-common.yaml           | 27 +++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/syscon-common.yaml b/Documentation/devicetree/bindings/mfd/syscon-common.yaml
index 602a511985cc..315357da146e 100644
--- a/Documentation/devicetree/bindings/mfd/syscon-common.yaml
+++ b/Documentation/devicetree/bindings/mfd/syscon-common.yaml
@@ -63,8 +63,31 @@ allOf:
           contains:
             const: simple-bus
     then:
-      required:
-        - incorrect-usage-of-simple-bus-and-syscon
+      # 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-conf
+                  - ti,omap5-scm-wkup-conf
+      then:
+        required:
+          - incorrect-usage-of-simple-bus-and-syscon
 
 additionalProperties: true
 
-- 
2.53.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-06-08 13:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-31 11:04 [PATCH 1/2] dt-bindings: mfd: syscon: Disallow simple-bus with syscon Krzysztof Kozlowski
2026-05-31 11:04 ` [PATCH 2/2] ARM: dts: ti: Add specific compatibles for SCM conf nodes Krzysztof Kozlowski
2026-06-03 15:10   ` Andreas Kemnade
2026-06-08 13:51     ` Krzysztof Kozlowski
2026-06-04 21:40 ` [PATCH 1/2] dt-bindings: mfd: syscon: Disallow simple-bus with syscon Rob Herring (Arm)
2026-06-08 12:25   ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®