Thread (26 messages) 26 messages, 4 authors, 2022-09-28

Re: [PATCH v2 03/15] dt-bindings: memory: snps: Convert the schema to being generic

From: Rob Herring <robh@kernel.org>
Date: 2022-09-12 14:32:28
Also in: linux-devicetree, linux-edac, lkml

On Sat, Sep 10, 2022 at 10:56:47PM +0300, Serge Semin wrote:
At the current state the DW uMCTL2 DDRC DT-schema can't be used as the
common one for all the IP-core-based devices due to the compatible string
property constraining the list of the supported device names. In order to
fix that we suggest to update the compatible property constraints so one
would permit having any value aside with the generic device names. At the
same time the generic DT-schema selection must be restricted to the
denoted generic devices only so not to permit the generic fallback
compatibles. Finally since the generic schema will be referenced from the
vendor-specific DT-bindings with possibly non-standard properties defined
it must permit having additional properties specified.

Signed-off-by: Serge Semin <redacted>

---

Note alternatively we could drop the "additionalProperties" keyword
modification since currently there is no actual device available with the
properties not listed in the generic DT-schema.
Normally, this has required 2 schema files. However, I think you can 
do something like this:

if:
  compatible:
    enum:
      - snps,ddrc-3.80a
      - snps,dw-umctl2-ddrc
      - xlnx,zynqmp-ddrc-2.40a
then:
  unevaluatedProperties: false


But please make sure that actually catches undocumented properties 
because unevaluateProperties under 'then' is not something I've tried.

Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help