diff mbox series

[3/3] dt-bindings: mailbox: mediatek: Avoid clock-names on MT8188 GCE

Message ID 20240619085322.66716-3-angelogioacchino.delregno@collabora.com
State Changes Requested
Headers show
Series None | expand

Checks

Context Check Description
robh/checkpatch warning total: 0 errors, 1 warnings, 10 lines checked
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

AngeloGioacchino Del Regno June 19, 2024, 8:53 a.m. UTC
Add mediatek,mt8188-gce to the list of compatibles for which the
clock-names property is not required.

Fixes: f2b53c295620 ("dt-bindings: mailbox: mediatek,gce-mailbox: add mt8188 compatible name")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 .../devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Conor Dooley June 19, 2024, 5:49 p.m. UTC | #1
On Wed, Jun 19, 2024 at 10:53:22AM +0200, AngeloGioacchino Del Regno wrote:
> Add mediatek,mt8188-gce to the list of compatibles for which the
> clock-names property is not required.

Because, I assume, it has some internal clock? Why do either of these
things have no clock? Doesn't the internal logic require one?

> 
> Fixes: f2b53c295620 ("dt-bindings: mailbox: mediatek,gce-mailbox: add mt8188 compatible name")
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
>  .../devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml     | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
> index cef9d7601398..55d4c34aa4b4 100644
> --- a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
> +++ b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
> @@ -62,7 +62,9 @@ allOf:
>          properties:
>            compatible:
>              contains:
> -              const: mediatek,mt8195-gce
> +              enum:
> +                - mediatek,mt8188-gce
> +                - mediatek,mt8195-gce
>      then:
>        required:
>          - clock-names
> -- 
> 2.45.2
>
AngeloGioacchino Del Regno June 20, 2024, 8:01 a.m. UTC | #2
Il 19/06/24 19:49, Conor Dooley ha scritto:
> On Wed, Jun 19, 2024 at 10:53:22AM +0200, AngeloGioacchino Del Regno wrote:
>> Add mediatek,mt8188-gce to the list of compatibles for which the
>> clock-names property is not required.
> 
> Because, I assume, it has some internal clock? Why do either of these
> things have no clock? Doesn't the internal logic require one?
> 

Because there's no gce0/gce1 clock, there's only an infracfg_AO clock that is
for one GCE instance, hence there's no need to require clock-names.

I can't remove the clock-names requirement from the older compatibles though,
because the (sorry about this word) driver (eh..) gets the clock by name for
the single GCE SoCs...

...and here comes a self-NACK for this commit, I have to fix the driver and
then stop requiring clock-names on all compatibles, instead of having this
ugly nonsense.

Self-note: gce0/gce1 clocks lookup was implemented in the driver but never
used and never added to the binding - luckily.

Sorry Conor, I just acknowledged that there's a better way of doing that.

Thank you for making me re-read this stuff, I'll send the proper changes
later today, driver change + binding change in a separate series.

As for the other two commits in this series, completely unrelated to GCE,
those are still fine, and are fixing dtbs_check warnings.

Cheers,
Angelo

>>
>> Fixes: f2b53c295620 ("dt-bindings: mailbox: mediatek,gce-mailbox: add mt8188 compatible name")
>> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>> ---
>>   .../devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml     | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
>> index cef9d7601398..55d4c34aa4b4 100644
>> --- a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
>> +++ b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
>> @@ -62,7 +62,9 @@ allOf:
>>           properties:
>>             compatible:
>>               contains:
>> -              const: mediatek,mt8195-gce
>> +              enum:
>> +                - mediatek,mt8188-gce
>> +                - mediatek,mt8195-gce
>>       then:
>>         required:
>>           - clock-names
>> -- 
>> 2.45.2
>>
Conor Dooley June 20, 2024, 8:22 a.m. UTC | #3
On Thu, Jun 20, 2024 at 10:01:18AM +0200, AngeloGioacchino Del Regno wrote:
> Il 19/06/24 19:49, Conor Dooley ha scritto:
> > On Wed, Jun 19, 2024 at 10:53:22AM +0200, AngeloGioacchino Del Regno wrote:
> > > Add mediatek,mt8188-gce to the list of compatibles for which the
> > > clock-names property is not required.
> > 
> > Because, I assume, it has some internal clock? Why do either of these
> > things have no clock? Doesn't the internal logic require one?
> > 
> 
> Because there's no gce0/gce1 clock, there's only an infracfg_AO clock that is
> for one GCE instance, hence there's no need to require clock-names.

clock-names, d'oh. I misread that completely yesterday.

> I can't remove the clock-names requirement from the older compatibles though,
> because the (sorry about this word) driver (eh..) gets the clock by name for
> the single GCE SoCs...
> 
> ...and here comes a self-NACK for this commit, I have to fix the driver and
> then stop requiring clock-names on all compatibles, instead of having this
> ugly nonsense.

Is it not worth keeping the clock names, even if ugly or w/e, because
things have been done that way for a while?
Also, what does U-Boot do on these systems to get the clocks?

> Self-note: gce0/gce1 clocks lookup was implemented in the driver but never
> used and never added to the binding - luckily.
> 
> Sorry Conor, I just acknowledged that there's a better way of doing that.
> 
> Thank you for making me re-read this stuff, I'll send the proper changes
> later today, driver change + binding change in a separate series.
> 
> As for the other two commits in this series, completely unrelated to GCE,
> those are still fine, and are fixing dtbs_check warnings.
AngeloGioacchino Del Regno June 20, 2024, 8:32 a.m. UTC | #4
Il 20/06/24 10:22, Conor Dooley ha scritto:
> On Thu, Jun 20, 2024 at 10:01:18AM +0200, AngeloGioacchino Del Regno wrote:
>> Il 19/06/24 19:49, Conor Dooley ha scritto:
>>> On Wed, Jun 19, 2024 at 10:53:22AM +0200, AngeloGioacchino Del Regno wrote:
>>>> Add mediatek,mt8188-gce to the list of compatibles for which the
>>>> clock-names property is not required.
>>>
>>> Because, I assume, it has some internal clock? Why do either of these
>>> things have no clock? Doesn't the internal logic require one?
>>>
>>
>> Because there's no gce0/gce1 clock, there's only an infracfg_AO clock that is
>> for one GCE instance, hence there's no need to require clock-names.
> 
> clock-names, d'oh. I misread that completely yesterday.
> 
>> I can't remove the clock-names requirement from the older compatibles though,
>> because the (sorry about this word) driver (eh..) gets the clock by name for
>> the single GCE SoCs...
>>
>> ...and here comes a self-NACK for this commit, I have to fix the driver and
>> then stop requiring clock-names on all compatibles, instead of having this
>> ugly nonsense.
> 
> Is it not worth keeping the clock names, even if ugly or w/e, because
> things have been done that way for a while?

It's worth allowing clock-names, but *requiring* that is unnecessary because
there is, and there will always be, only one clock...!

> Also, what does U-Boot do on these systems to get the clocks?
> 

U-Boot doesn't support GCE at all (no driver - at least upstream)...!

>> Self-note: gce0/gce1 clocks lookup was implemented in the driver but never
>> used and never added to the binding - luckily.
>>
>> Sorry Conor, I just acknowledged that there's a better way of doing that.
>>
>> Thank you for making me re-read this stuff, I'll send the proper changes
>> later today, driver change + binding change in a separate series.
>>
>> As for the other two commits in this series, completely unrelated to GCE,
>> those are still fine, and are fixing dtbs_check warnings.
Conor Dooley June 20, 2024, 4:16 p.m. UTC | #5
On Thu, Jun 20, 2024 at 10:32:36AM +0200, AngeloGioacchino Del Regno wrote:
> Il 20/06/24 10:22, Conor Dooley ha scritto:
> > On Thu, Jun 20, 2024 at 10:01:18AM +0200, AngeloGioacchino Del Regno wrote:
> > > Il 19/06/24 19:49, Conor Dooley ha scritto:
> > > > On Wed, Jun 19, 2024 at 10:53:22AM +0200, AngeloGioacchino Del Regno wrote:
> > > > > Add mediatek,mt8188-gce to the list of compatibles for which the
> > > > > clock-names property is not required.
> > > > 
> > > > Because, I assume, it has some internal clock? Why do either of these
> > > > things have no clock? Doesn't the internal logic require one?
> > > > 
> > > 
> > > Because there's no gce0/gce1 clock, there's only an infracfg_AO clock that is
> > > for one GCE instance, hence there's no need to require clock-names.
> > 
> > clock-names, d'oh. I misread that completely yesterday.
> > 
> > > I can't remove the clock-names requirement from the older compatibles though,
> > > because the (sorry about this word) driver (eh..) gets the clock by name for
> > > the single GCE SoCs...
> > > 
> > > ...and here comes a self-NACK for this commit, I have to fix the driver and
> > > then stop requiring clock-names on all compatibles, instead of having this
> > > ugly nonsense.
> > 
> > Is it not worth keeping the clock names, even if ugly or w/e, because
> > things have been done that way for a while?
> 
> It's worth allowing clock-names, but *requiring* that is unnecessary because
> there is, and there will always be, only one clock...!

Right, dunno if I misread you earlier or misunderstood. Fighting fires
at work and replying to mails mid bisection is what I am going to blame
;)

> > Also, what does U-Boot do on these systems to get the clocks?
> > 
> 
> U-Boot doesn't support GCE at all (no driver - at least upstream)...!

Running LIFO through my mailbox today, seeing this after the other
mail..

> 
> > > Self-note: gce0/gce1 clocks lookup was implemented in the driver but never
> > > used and never added to the binding - luckily.
> > > 
> > > Sorry Conor, I just acknowledged that there's a better way of doing that.
> > > 
> > > Thank you for making me re-read this stuff, I'll send the proper changes
> > > later today, driver change + binding change in a separate series.
> > > 
> > > As for the other two commits in this series, completely unrelated to GCE,
> > > those are still fine, and are fixing dtbs_check warnings.
> 
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
index cef9d7601398..55d4c34aa4b4 100644
--- a/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
+++ b/Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml
@@ -62,7 +62,9 @@  allOf:
         properties:
           compatible:
             contains:
-              const: mediatek,mt8195-gce
+              enum:
+                - mediatek,mt8188-gce
+                - mediatek,mt8195-gce
     then:
       required:
         - clock-names