diff mbox series

[1/2] dt-bindings: memory-controllers: samsung,exynos4210-srom: Enforce child props

Message ID 20250306085849.32852-1-krzysztof.kozlowski@linaro.org
State New
Headers show
Series [1/2] dt-bindings: memory-controllers: samsung,exynos4210-srom: Enforce child props | expand

Commit Message

Krzysztof Kozlowski March 6, 2025, 8:58 a.m. UTC
Samsung Exynos SROM peripheral properties were moved from the device
schema to separate "peripheral-props" schema for child node, but the
device schema does not reference the new one.

Reference the peripheral-props schema so the child nodes will be
properly validated from the device schema.

Fixes: 67bf606fcf18 ("dt-bindings: memory-controllers: samsung,exynos4210-srom: Split out child node properties")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Fix for Rob's tree.
---
 .../devicetree/bindings/memory-controllers/exynos-srom.yaml      | 1 +
 1 file changed, 1 insertion(+)

Comments

Rob Herring March 6, 2025, 8:52 p.m. UTC | #1
On Thu, Mar 6, 2025 at 7:51 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 06/03/2025 14:39, Rob Herring wrote:
> > Why do we need this? Any child node should have a schema which needs
> > to include mc-peripheral-props.yaml if any properties from it can be
> > used.
>
> From correctness point of view, you are right, we don't need it. However:
>
> 1. Convention was so far to have in every controller. I think this also
> is easier to understand whenever one reads the bindings - clear
> documentation what children on this bus should look like.
>
> 2. To clearly document from where samsung,srom-timing comes in the
> required block:

I could be wrong, but I want to say that's pretty much an exception.
They are usually optional (other than reg). Though I guess we want to
enforce 'reg'...

> https://web.git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/tree/Documentation/devicetree/bindings/memory-controllers/exynos-srom.yaml?h=dt/next#n50
> Otherwise for me it is a bit confusing to require a property which is
> nowhere here defined.

It's a bit weird that non-exynos properties are allowed too, though
that's always the case for these properties.

I'll apply these.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/memory-controllers/exynos-srom.yaml b/Documentation/devicetree/bindings/memory-controllers/exynos-srom.yaml
index 2267c5107d60..1578514ec58d 100644
--- a/Documentation/devicetree/bindings/memory-controllers/exynos-srom.yaml
+++ b/Documentation/devicetree/bindings/memory-controllers/exynos-srom.yaml
@@ -38,6 +38,7 @@  properties:
 patternProperties:
   "^.*@[0-3],[a-f0-9]+$":
     type: object
+    $ref: mc-peripheral-props.yaml#
     additionalProperties: true
 
     properties: