diff mbox series

[2/3] dt-bindings: sound: tegra: Update HDA resets

Message ID 1638858770-22594-3-git-send-email-spujar@nvidia.com
State Changes Requested
Headers show
Series Fix Tegra194 HDA regression | expand

Commit Message

Sameer Pujar Dec. 7, 2021, 6:32 a.m. UTC
Tegra194 HDA has only two resets unlike the previous generations of
Tegra SoCs. Hence update the reset list accordingly.

Fixes: 2d8f8955fe02 ("dt-bindings: tegra: Convert HDA doc to json-schema")
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
---
 .../devicetree/bindings/sound/nvidia,tegra30-hda.yaml       | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

Comments

Thierry Reding Dec. 7, 2021, 8:18 a.m. UTC | #1
On Tue, Dec 07, 2021 at 12:02:49PM +0530, Sameer Pujar wrote:
> Tegra194 HDA has only two resets unlike the previous generations of
> Tegra SoCs. Hence update the reset list accordingly.
> 
> Fixes: 2d8f8955fe02 ("dt-bindings: tegra: Convert HDA doc to json-schema")
> Signed-off-by: Sameer Pujar <spujar@nvidia.com>
> ---
>  .../devicetree/bindings/sound/nvidia,tegra30-hda.yaml       | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml
> index b55775e..70dbdff5 100644
> --- a/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml
> +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml
> @@ -50,13 +50,18 @@ properties:
>        - const: hda2codec_2x
>  
>    resets:
> +    minItems: 2
>      maxItems: 3
>  
>    reset-names:
> -    items:
> -      - const: hda
> -      - const: hda2hdmi
> -      - const: hda2codec_2x
> +    oneOf:
> +      - items:
> +          - const: hda
> +          - const: hda2hdmi
> +          - const: hda2codec_2x
> +      - items:
> +          - const: hda
> +          - const: hda2hdmi

We could make this more specific using an if: conditional and match on
nvidia,tegra194-hda, but this would work as well, especially since I
presume that Tegra194's successors will also not have the hda2codec_2x
reset.

Acked-by: Thierry Reding <treding@nvidia.com>
Sameer Pujar Dec. 7, 2021, 9:27 a.m. UTC | #2
On 12/7/2021 1:48 PM, Thierry Reding wrote:
> We could make this more specific using an if: conditional and match on
> nvidia,tegra194-hda, but this would work as well, especially since I
> presume that Tegra194's successors will also not have the hda2codec_2x
> reset.

Yes, reset hda2codec_2x is dropped from Tegra194 onward. So I believe 
this should be good enough.
Dmitry Osipenko Dec. 7, 2021, 10:14 a.m. UTC | #3
07.12.2021 09:32, Sameer Pujar пишет:
> Tegra194 HDA has only two resets unlike the previous generations of
> Tegra SoCs. Hence update the reset list accordingly.
> 
> Fixes: 2d8f8955fe02 ("dt-bindings: tegra: Convert HDA doc to json-schema")

The original txt binding was already wrong, this "fixes" tag is wrong.
Sameer Pujar Dec. 7, 2021, 11:04 a.m. UTC | #4
On 12/7/2021 3:44 PM, Dmitry Osipenko wrote:
> 07.12.2021 09:32, Sameer Pujar пишет:
>> Tegra194 HDA has only two resets unlike the previous generations of
>> Tegra SoCs. Hence update the reset list accordingly.
>>
>> Fixes: 2d8f8955fe02 ("dt-bindings: tegra: Convert HDA doc to json-schema")
> The original txt binding was already wrong, this "fixes" tag is wrong.

The text didn't document "nvidia,tegra194-hda" compatibile support until 
the json-schema conversion happened. Perhaps the text doc was not 
updated when Tegra194 support was added. So wouldn't this be right to 
use json-schema commit as a base for this?
Dmitry Osipenko Dec. 7, 2021, 12:02 p.m. UTC | #5
07.12.2021 14:04, Sameer Pujar пишет:
> 
> 
> On 12/7/2021 3:44 PM, Dmitry Osipenko wrote:
>> 07.12.2021 09:32, Sameer Pujar пишет:
>>> Tegra194 HDA has only two resets unlike the previous generations of
>>> Tegra SoCs. Hence update the reset list accordingly.
>>>
>>> Fixes: 2d8f8955fe02 ("dt-bindings: tegra: Convert HDA doc to
>>> json-schema")
>> The original txt binding was already wrong, this "fixes" tag is wrong.
> 
> The text didn't document "nvidia,tegra194-hda" compatibile support until
> the json-schema conversion happened. Perhaps the text doc was not
> updated when Tegra194 support was added. So wouldn't this be right to
> use json-schema commit as a base for this?

This problem didn't exist when the binding was converted. Should be
better to drop this tag since it doesn't add much value and creates
confusion, IMO.
Sameer Pujar Dec. 7, 2021, 12:22 p.m. UTC | #6
On 12/7/2021 5:32 PM, Dmitry Osipenko wrote:
> 07.12.2021 14:04, Sameer Pujar пишет:
>>
>> On 12/7/2021 3:44 PM, Dmitry Osipenko wrote:
>>> 07.12.2021 09:32, Sameer Pujar пишет:
>>>> Tegra194 HDA has only two resets unlike the previous generations of
>>>> Tegra SoCs. Hence update the reset list accordingly.
>>>>
>>>> Fixes: 2d8f8955fe02 ("dt-bindings: tegra: Convert HDA doc to
>>>> json-schema")
>>> The original txt binding was already wrong, this "fixes" tag is wrong.
>> The text didn't document "nvidia,tegra194-hda" compatibile support until
>> the json-schema conversion happened. Perhaps the text doc was not
>> updated when Tegra194 support was added. So wouldn't this be right to
>> use json-schema commit as a base for this?
> This problem didn't exist when the binding was converted. Should be
> better to drop this tag since it doesn't add much value and creates
> confusion, IMO.

It is true that the problem was introduced recently, but from the 
documentation point of view, given the HW never had this reset it should 
not have been included in the first place. If it is not useful, I can 
just drop this tag.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml
index b55775e..70dbdff5 100644
--- a/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml
+++ b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.yaml
@@ -50,13 +50,18 @@  properties:
       - const: hda2codec_2x
 
   resets:
+    minItems: 2
     maxItems: 3
 
   reset-names:
-    items:
-      - const: hda
-      - const: hda2hdmi
-      - const: hda2codec_2x
+    oneOf:
+      - items:
+          - const: hda
+          - const: hda2hdmi
+          - const: hda2codec_2x
+      - items:
+          - const: hda
+          - const: hda2hdmi
 
   power-domains:
     maxItems: 1