lkml.org 
[lkml]   [2022]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
From
Date
SubjectRe: [PATCH v5 02/15] dt-bindings: mmc: cdns: Add AMD Pensando Elba SoC binding
Hi Rob,

On Tue, Jun 14, 2022 at 2:22 PM Rob Herring <robh@kernel.org> wrote:
>
> On Mon, Jun 13, 2022 at 12:56:45PM -0700, Brad Larson wrote:
> > From: Brad Larson <blarson@amd.com>
> >
> > AMD Pensando Elba ARM 64-bit SoC is integrated with this IP and
> > explicitly controls byte-lane enables.
> >
> > Signed-off-by: Brad Larson <blarson@amd.com>
> > ---
> > .../devicetree/bindings/mmc/cdns,sdhci.yaml | 14 ++++++++++++++
> > 1 file changed, 14 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml b/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
> > index 4207fed62dfe..35bc4cf6f214 100644
> > --- a/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
> > +++ b/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
> > @@ -13,10 +13,24 @@ maintainers:
> > allOf:
> > - $ref: mmc-controller.yaml
> >
> > + - if:
> > + properties:
> > + compatible:
> > + enum:
> > + - amd,pensando-elba-sd4hc
> > + then:
> > + properties:
> > + reg:
> > + items:
> > + - description: Cadence host controller registers
> > + - description: Byte-lane control register
> > + minItems: 2
>
> This doesn't work. The if/then is additional constraints on the main
> section which says there is only 1 register region. The main section
> needs the above, but with 'minItems: 1'. Then the if/then should be:
>
> if:
> properties:
> compatible:
> const: amd,pensando-elba-sd4hc
> then:
> properties:
> reg:
> minItems: 2
> else:
> properties:
> reg:
> maxItems: 1
> ...

The proposed change to current version throws dtbs_check error below:

--- a/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
+++ b/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
@@ -13,19 +13,6 @@ maintainers:
allOf:
- $ref: mmc-controller.yaml

- - if:
- properties:
- compatible:
- enum:
- - amd,pensando-elba-sd4hc
- then:
- properties:
- reg:
- items:
- - description: Cadence host controller registers
- - description: Byte-lane control register
- minItems: 2
-
properties:
compatible:
items:
@@ -36,7 +23,7 @@ properties:
- const: cdns,sd4hc

reg:
- maxItems: 1
+ minItems: 1

interrupts:
maxItems: 1
@@ -132,6 +119,19 @@ required:
- interrupts
- clocks

+if:
+ properties:
+ compatible:
+ const: amd,pensando-elba-sd4hc
+then:
+ properties:
+ reg:
+ minItems: 2
+else:
+ properties:
+ reg:
+ maxItems: 1
+
unevaluatedProperties: false

results in

$ make ARCH=arm64 dtbs_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
LINT Documentation/devicetree/bindings
CHKDT Documentation/devicetree/bindings/processed-schema.json
SCHEMA Documentation/devicetree/bindings/processed-schema.json
/home/brad/linux-next/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml:
ignoring, error in schema:
/home/brad/linux-next/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml:
ignoring, error in schema:
DTC arch/arm64/boot/dts/amd/elba-asic.dtb
CHECK arch/arm64/boot/dts/amd/elba-asic.dtb
/home/brad/linux-next/arch/arm64/boot/dts/amd/elba-asic.dtb:
mmc@30440000: reg: [[0, 809762816, 0, 65536], [0, 810025028, 0, 4]] is
too long
From schema:
/home/brad/linux-next/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
/home/brad/linux-next/arch/arm64/boot/dts/amd/elba-asic.dtb:
mmc@30440000: reg: [[0, 809762816, 0, 65536], [0, 810025028, 0, 4]] is
too long
From schema:
/home/brad/linux-next/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
Below modification to proposed change passes dtbs_check:

--- a/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
+++ b/Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
@@ -13,19 +13,6 @@ maintainers:
allOf:
- $ref: mmc-controller.yaml

- - if:
- properties:
- compatible:
- enum:
- - amd,pensando-elba-sd4hc
- then:
- properties:
- reg:
- items:
- - description: Cadence host controller registers
- - description: Byte-lane control register
- minItems: 2
-
properties:
compatible:
items:
@@ -36,7 +23,8 @@ properties:
- const: cdns,sd4hc

reg:
- maxItems: 1
+ minItems: 1
+ maxItems: 2

interrupts:
maxItems: 1
@@ -132,6 +120,15 @@ required:
- interrupts
- clocks

+if:
+ properties:
+ compatible:
+ const: amd,pensando-elba-sd4hc
+then:
+ properties:
+ reg:
+ minItems: 2
+
unevaluatedProperties: false

Regards,
Brad
\
 
 \ /
  Last update: 2022-07-04 01:10    [W:0.361 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site