dt-bindings: memory-controllers: tegra: Fix type references
Rob Herring
maintainerPATCH 1/1 dt-bindings: memory-controllers: tegra: Fix type references
Json-schema requires a $ref to be under an 'allOf' if there are additional constraints otherwise the additional constraints are ignored. (Note that this behavior will be changed in draft8.)
---
I'll take this via the DT tree for rc2.
.../bindings/memory-controllers/nvidia,tegra124-mc.yaml | 3 ++- .../bindings/memory-controllers/nvidia,tegra30-emc.yaml | 9 ++++++--- .../bindings/memory-controllers/nvidia,tegra30-mc.yaml | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/memory-controllers/nvidia,tegra124-mc.yaml +2 -1
@@ -60,7 +60,8 @@ patternProperties: maximum: 1066000000 nvidia,emem-configuration: - $ref: /schemas/types.yaml#/definitions/uint32-array + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array description: | Values to be written to the EMEM register block. See section "15.6.1 MC Registers" in the TRM.
Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-emc.yaml +6 -3
@@ -56,7 +56,8 @@ patternProperties: maximum: 900000000 nvidia,emc-auto-cal-interval: - $ref: /schemas/types.yaml#/definitions/uint32 + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 description: Pad calibration interval in microseconds. minimum: 0
@@ -78,7 +79,8 @@ patternProperties: Mode Register 0. nvidia,emc-zcal-cnt-long: - $ref: /schemas/types.yaml#/definitions/uint32 + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 description: Number of EMC clocks to wait before issuing any commands after sending ZCAL_MRW_CMD.
@@ -96,7 +98,8 @@ patternProperties: FBIO "read" FIFO periodic resetting enabled. nvidia,emc-configuration: - $ref: /schemas/types.yaml#/definitions/uint32-array + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array description: EMC timing characterization data. These are the registers (see section "18.13.2 EMC Registers" in the TRM) whose values
Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-mc.yaml +2 -1
@@ -77,7 +77,8 @@ patternProperties: maximum: 900000000 nvidia,emem-configuration: - $ref: /schemas/types.yaml#/definitions/uint32-array + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array description: | Values to be written to the EMEM register block. See section "18.13.1 MC Registers" in the TRM.
Signature · 1 line
2.20.1
11.12.2019 19:32, Rob Herring пишет:
Quoted 74 lines
Json-schema requires a $ref to be under an 'allOf' if there are additional constraints otherwise the additional constraints are ignored. (Note that this behavior will be changed in draft8.)
Fixes 641262f5e1ed ("dt-bindings: memory: Add binding for NVIDIA Tegra30 External Memory Controller")Fixes 785685b7a106 ("dt-bindings: memory: Add binding for NVIDIA Tegra30 Memory Controller")Fixes 8da65c377b21 ("dt-bindings: memory: tegra30: Convert to Tegra124 YAML")Cc Dmitry Osipenko <[email protected]>Cc Thierry Reding <[email protected]>Cc Jonathan Hunter <[email protected]>Signed-off-by Rob Herring <[email protected]>---
I'll take this via the DT tree for rc2..../bindings/memory-controllers/nvidia,tegra124-mc.yaml | 3 ++- .../bindings/memory-controllers/nvidia,tegra30-emc.yaml | 9 ++++++--- .../bindings/memory-controllers/nvidia,tegra30-mc.yaml | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-)Documentation/devicetree/bindings/memory-controllers/nvidia,tegra124-mc.yaml +2
-1@@ -60,7 +60,8 @@ patternProperties: maximum: 1066000000 nvidia,emem-configuration: - $ref: /schemas/types.yaml#/definitions/uint32-array + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array description: | Values to be written to the EMEM register block. See section "15.6.1 MC Registers" in the TRM.Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-emc.yaml +6
-3@@ -56,7 +56,8 @@ patternProperties: maximum: 900000000 nvidia,emc-auto-cal-interval: - $ref: /schemas/types.yaml#/definitions/uint32 + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 description: Pad calibration interval in microseconds. minimum: 0@@ -78,7 +79,8 @@ patternProperties: Mode Register 0. nvidia,emc-zcal-cnt-long: - $ref: /schemas/types.yaml#/definitions/uint32 + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 description: Number of EMC clocks to wait before issuing any commands after sending ZCAL_MRW_CMD.@@ -96,7 +98,8 @@ patternProperties: FBIO "read" FIFO periodic resetting enabled. nvidia,emc-configuration: - $ref: /schemas/types.yaml#/definitions/uint32-array + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array description: EMC timing characterization data. These are the registers (see section "18.13.2 EMC Registers" in the TRM) whose valuesDocumentation/devicetree/bindings/memory-controllers/nvidia,tegra30-mc.yaml +0
-0
Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-mc.yaml patternProperties: · line 84
Quoted 9 lines
Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-mc.yaml +2
-1@@ -77,7 +77,8 @@ patternProperties: maximum: 900000000 nvidia,emem-configuration: - $ref: /schemas/types.yaml#/definitions/uint32-array + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array description: | Values to be written to the EMEM register block. See section "18.13.1 MC Registers" in the TRM.
But the "nvidia,emem-configuration" doesn't have any extra constraints. Or you just added the "allOf" for consistency to avoid possible future copy-paste bugs?
Otherwise LGTM, thanks!
Rob Herring
maintainerQuoted 77 lines · Dmitry Osipenko
11.12.2019 19:32, Rob Herring пишет:
Quoted 75 lines
Json-schema requires a $ref to be under an 'allOf' if there are additional constraints otherwise the additional constraints are ignored. (Note that this behavior will be changed in draft8.)
Fixes 641262f5e1ed ("dt-bindings: memory: Add binding for NVIDIA Tegra30 External Memory Controller")Fixes 785685b7a106 ("dt-bindings: memory: Add binding for NVIDIA Tegra30 Memory Controller")Fixes 8da65c377b21 ("dt-bindings: memory: tegra30: Convert to Tegra124 YAML")Cc Dmitry Osipenko <[email protected]>Cc Thierry Reding <[email protected]>Cc Jonathan Hunter <[email protected]>Signed-off-by Rob Herring <[email protected]>---
I'll take this via the DT tree for rc2..../bindings/memory-controllers/nvidia,tegra124-mc.yaml | 3 ++- .../bindings/memory-controllers/nvidia,tegra30-emc.yaml | 9 ++++++--- .../bindings/memory-controllers/nvidia,tegra30-mc.yaml | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-)Documentation/devicetree/bindings/memory-controllers/nvidia,tegra124-mc.yaml +2
-1@@ -60,7 +60,8 @@ patternProperties: maximum: 1066000000 nvidia,emem-configuration: - $ref: /schemas/types.yaml#/definitions/uint32-array + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array description: | Values to be written to the EMEM register block. See section "15.6.1 MC Registers" in the TRM.Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-emc.yaml +6
-3@@ -56,7 +56,8 @@ patternProperties: maximum: 900000000 nvidia,emc-auto-cal-interval: - $ref: /schemas/types.yaml#/definitions/uint32 + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 description: Pad calibration interval in microseconds. minimum: 0@@ -78,7 +79,8 @@ patternProperties: Mode Register 0. nvidia,emc-zcal-cnt-long: - $ref: /schemas/types.yaml#/definitions/uint32 + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 description: Number of EMC clocks to wait before issuing any commands after sending ZCAL_MRW_CMD.@@ -96,7 +98,8 @@ patternProperties: FBIO "read" FIFO periodic resetting enabled. nvidia,emc-configuration: - $ref: /schemas/types.yaml#/definitions/uint32-array + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array description: EMC timing characterization data. These are the registers (see section "18.13.2 EMC Registers" in the TRM) whose valuesDocumentation/devicetree/bindings/memory-controllers/nvidia,tegra30-mc.yaml +0
-0@@ -77,7 +77,8 @@ patternProperties: maximum: 900000000
Quoted 12 lines
Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-mc.yaml patternProperties: · line 84
Quoted 8 lines
Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-mc.yaml +2
-1nvidia,emem-configuration: - $ref: /schemas/types.yaml#/definitions/uint32-array + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array description: | Values to be written to the EMEM register block. See section "18.13.1 MC Registers" in the TRM.But the "nvidia,emem-configuration" doesn't have any extra constraints. Or you just added the "allOf" for consistency to avoid possible future copy-paste bugs?
It does have constraints. It has the 'items' list.
Note that fixing it introduces an error which I'm in the process of fixing in the schema tool.
Quoted 3 lines
Otherwise LGTM, thanks!
Reviewed-by Dmitry Osipenko <[email protected]>
Thanks.
Rob
12.12.2019 17:05, Rob Herring пишет:
Quoted 91 lines · Dmitry Osipenko
Quoted 77 lines
11.12.2019 19:32, Rob Herring пишет:
Quoted 75 lines
Json-schema requires a $ref to be under an 'allOf' if there are additional constraints otherwise the additional constraints are ignored. (Note that this behavior will be changed in draft8.)
Fixes 641262f5e1ed ("dt-bindings: memory: Add binding for NVIDIA Tegra30 External Memory Controller")Fixes 785685b7a106 ("dt-bindings: memory: Add binding for NVIDIA Tegra30 Memory Controller")Fixes 8da65c377b21 ("dt-bindings: memory: tegra30: Convert to Tegra124 YAML")Cc Dmitry Osipenko <[email protected]>Cc Thierry Reding <[email protected]>Cc Jonathan Hunter <[email protected]>Signed-off-by Rob Herring <[email protected]>---
I'll take this via the DT tree for rc2..../bindings/memory-controllers/nvidia,tegra124-mc.yaml | 3 ++- .../bindings/memory-controllers/nvidia,tegra30-emc.yaml | 9 ++++++--- .../bindings/memory-controllers/nvidia,tegra30-mc.yaml | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-)Documentation/devicetree/bindings/memory-controllers/nvidia,tegra124-mc.yaml +2
-1@@ -60,7 +60,8 @@ patternProperties: maximum: 1066000000 nvidia,emem-configuration: - $ref: /schemas/types.yaml#/definitions/uint32-array + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array description: | Values to be written to the EMEM register block. See section "15.6.1 MC Registers" in the TRM.Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-emc.yaml +6
-3@@ -56,7 +56,8 @@ patternProperties: maximum: 900000000 nvidia,emc-auto-cal-interval: - $ref: /schemas/types.yaml#/definitions/uint32 + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 description: Pad calibration interval in microseconds. minimum: 0@@ -78,7 +79,8 @@ patternProperties: Mode Register 0. nvidia,emc-zcal-cnt-long: - $ref: /schemas/types.yaml#/definitions/uint32 + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 description: Number of EMC clocks to wait before issuing any commands after sending ZCAL_MRW_CMD.@@ -96,7 +98,8 @@ patternProperties: FBIO "read" FIFO periodic resetting enabled. nvidia,emc-configuration: - $ref: /schemas/types.yaml#/definitions/uint32-array + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array description: EMC timing characterization data. These are the registers (see section "18.13.2 EMC Registers" in the TRM) whose valuesDocumentation/devicetree/bindings/memory-controllers/nvidia,tegra30-mc.yaml +0
-0@@ -77,7 +77,8 @@ patternProperties: maximum: 900000000Quoted 12 lines
Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-mc.yaml patternProperties: · line 84
Quoted 8 lines
Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-mc.yaml +2
-1nvidia,emem-configuration: - $ref: /schemas/types.yaml#/definitions/uint32-array + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array description: | Values to be written to the EMEM register block. See section "18.13.1 MC Registers" in the TRM.But the "nvidia,emem-configuration" doesn't have any extra constraints. Or you just added the "allOf" for consistency to avoid possible future copy-paste bugs?
Quoted 1 line
It does have constraints. It has the 'items' list.
Right, I missed that array-size is also a constraint.
Quoted 2 lines
Note that fixing it introduces an error which I'm in the process of fixing in the schema tool.
Okay!
Quoted 8 lines
Quoted 3 lines
Otherwise LGTM, thanks!
Reviewed-by Dmitry Osipenko <[email protected]>Thanks.
Rob