Re: [PATCH 1/2] dt-bindings: tegra: pmc: Update aotag as an optional aperture

Jon Hunter
2025-11-18T10:09:01Z

On 15/11/2025 12:25, Krzysztof Kozlowski wrote:
> On Fri, Nov 14, 2025 at 04:17:10PM +0000, Jon Hunter wrote:
>> Not all Tegra SoCs or all versions of a particular Tegra SoC may include
>> the AOTAG aperture. This change makes "aotag" as an optional aperture for
>> Tegra234 and Tegra264.
>>
>> Co-developed-by: Prathamesh Shete <pshete@nvidia.com>
>> Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
>> ---
>> Admittedly I don't know if there is a better way to handle this,
>> but if there is please let me know!
>>
>> .../arm/tegra/nvidia,tegra186-pmc.yaml | 57 ++++++++++++-------
>> 1 file changed, 38 insertions(+), 19 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.yaml b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.yaml
>> index be70819020c5..defd9000eed2 100644
>> --- a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.yaml
>> +++ b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.yaml
>> @@ -19,17 +19,12 @@ properties:
>> - nvidia,tegra264-pmc
>>
>> reg:
>> - minItems: 4
>> + minItems: 3
>> maxItems: 5
>>
>> reg-names:
>> - minItems: 4
>> - items:
>> - - const: pmc
>> - - const: wake
>> - - const: aotag
>> - - enum: [ scratch, misc ]
>> - - const: misc
>> + minItems: 3
>> + maxItems: 5
>
> minItems: 3
> items:
> - const: pmc
> - const: wake
> - enum: [ aotag, cratch, misc ]
> - enum: [ scratch, misc ]
> - const: misc
>
> Should work, no?

I was thinking about that, but with the above, and if I am understanding
you correctly, it would permit someone to make the following mistake ...

reg-names = "pmc", "wake", "scratch", "scratch", "misc";

Hence, I thought that I need to be more explicit and list out all the
combinations that are supported for a given device. Let me know if I am
misunderstanding you here.

>> interrupt-controller: true
>>
>> @@ -50,12 +45,12 @@ allOf:
>> const: nvidia,tegra186-pmc
>> then:
>> properties:
>> - reg:
>> - maxItems: 4
>
> You need to keep reg here. Each variant needs matching constraints
> between xxx and xxx-names.

ACK! I will correct this.

Thanks
Jon

--
nvpublic