Re: [PATCH 1/2] dt-bindings: hwinfo: Introduce board-id

From: Krzysztof Kozlowski
Date: Thu Jan 25 2024 - 05:41:04 EST


On 24/01/2024 13:42, Amrit Anand wrote:

>>> +select:
>>> + anyOf:
>>> + - required:
>>> + - 'board-id'
>>> + - required:
>>> + - 'board-id-types'
>>> + - required:
>>> + - '#board-id-cells'
>> I don't fully get why do you need this select. Isn't the schema selected
>> by nodename? Or maybe it is for the final required: but then this could
>> be just set of dependencies.
> The nodename here would be "/". So it will be applied to all the DTs, right?
> Here, we wanted this to apply only if the above mentioned properties are
> present.

The nodename will select it.

> Do you suggest moving this to qcom,board-id.yaml and the required: as well.
> So that vendor specific yaml could be applied?

I suggest dropping the select.

Different topic is that we cannot even test it because you did not
provide any user of this binding.

>>> +
>>> +properties:
>>> + $nodename:
>>> + const: "/"
>> Blank line.
> Will add it.
>>> + board-id:
>>> + $ref: /schemas/types.yaml#/definitions/uint32-matrix
>>> + description: |
>> Do not need '|' unless you need to preserve formatting.
> Ack
>>> + A list of identifiers that can be used to match with this devicetree.
>> s/devicetree/Devicetree/ ?
> Will update
>>> + The interpretatation of each cell can be matched with the
>> Typo: interpretation
> Will update
>>> + board-id-type at the same index.
>>> +
>>> + board-id-types:
>>> + $ref: /schemas/types.yaml#/definitions/non-unique-string-array
>>> + description:
>>> + Defines the type of each cell, indicating to the DeviceTree selection
>> s/DeviceTree/Devicetree/ ?
> Will update
>>
>>> + mechanism how to parse the board-id.
>>> +
>>> + '#board-id-cells':
>> What are the cells for?
> Bootloader will use this to check the number of entries in a tuple of
> board-id.

Doesn't the board-id-type define number of cells? How could you have the
same board-id-type with different number of elements on board A and board B?


Best regards,
Krzysztof