[PATCH v2 06/17] dt-bindings: mtd: qcom: Prevent NAND chip unevaluated properties
Chris Packham
Chris.Packham at alliedtelesis.co.nz
Wed Jun 7 13:47:35 PDT 2023
On 7/06/23 19:53, Miquel Raynal wrote:
> Hi Chris,
>
> Chris.Packham at alliedtelesis.co.nz wrote on Tue, 6 Jun 2023 22:27:23
> +0000:
>
>> On 7/06/23 05:52, Miquel Raynal wrote:
>>> List all the possible properties in the NAND chip as per the example and
>>> set unevaluatedProperties to false in the NAND chip section.
>>>
>>> Cc: Manivannan Sadhasivam <mani at kernel.org>
>>> Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
>>> ---
>>> Documentation/devicetree/bindings/mtd/qcom,nandc.yaml | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
>>> index 7217d8a64d14..581973f452ff 100644
>>> --- a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
>>> +++ b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
>>> @@ -34,7 +34,9 @@ properties:
>>> patternProperties:
>>> "^nand@[a-f0-9]$":
>>> type: object
>>> + $ref: raw-nand-chip.yaml
>>> properties:
>>> +
>>> nand-bus-width:
>>> const: 8
>>>
>>> @@ -61,6 +63,8 @@ patternProperties:
>>>
>>> Refer to the ipq8064 example on how to use this special binding.
>>>
>>> + unevaluatedProperties: false
>>> +
>>> allOf:
>>> - $ref: "nand-controller.yaml#"
>>>
>> This doesn't appear to be working as intended. If I add the following
>>
>> diff --git a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
>> b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
>> index 581973f452ff..7a910a62c7b8 100644
>> --- a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
>> +++ b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
>> @@ -220,6 +220,7 @@ examples:
>> partition at 0 {
>> label = "boot-nand";
>> reg = <0 0x58a0000>;
>> + nonsense;
>> };
>>
>> partition at 58a0000 {
>>
>>
>> Then I'd expect to get a complaint from `make mrproper; make
>> DT_CHECKER_FLAGS=-m dt_binding_check DT_SCHEMA_FILES=qcom,nandc.yaml`
>> but it seems to let this through.
> I am just fixing the NAND chip node while this is a partition node. We
> need to constrain more all the schemas, let's start with the beginning
> :)
Ah OK. I just wasn't sure whether to wait for this to land or pile my
conversion on top.
What I really want to get to is the driver changes for the AC5 SoC.
Converting the schema started as "I should be able to knock that out in
30 mins on a Friday afternoon" but has snowballed significantly.
>
> Thanks,
> Miquèl
More information about the linux-mtd
mailing list