2022-04-07 19:51:25

by Nishanth Menon

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer

On 10:10-20220407, Tony Lindgren wrote:
> Document the dual-mode timers available on am6.
>
> Cc: [email protected]
> Cc: Keerthy <[email protected]>
> Cc: Krzysztof Kozlowski <[email protected]>
> Cc: Nishanth Menon <[email protected]>
> Cc: Rob Herring <[email protected]>
> Cc: Vignesh Raghavendra <[email protected]>
> Signed-off-by: Tony Lindgren <[email protected]>
> ---
> Documentation/devicetree/bindings/timer/ti,timer.txt | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/timer/ti,timer.txt b/Documentation/devicetree/bindings/timer/ti,timer.txt
> --- a/Documentation/devicetree/bindings/timer/ti,timer.txt
> +++ b/Documentation/devicetree/bindings/timer/ti,timer.txt
> @@ -14,6 +14,7 @@ Required properties:
> ti,omap5430-timer (applicable to OMAP543x devices)
> ti,am335x-timer (applicable to AM335x devices)
> ti,am335x-timer-1ms (applicable to AM335x devices)
> + ti,am6-timer (applicable to AM6 devices)

Suggestion:

Could we call this ti,am65-timer instead? AM6 is a bit nuanced and spans
a couple of sub SoC architectures.

>
> - reg: Contains timer register address range (base address and
> length).
> --
> 2.35.1

--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D


2022-04-08 05:12:36

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer

Hi,

* Nishanth Menon <[email protected]> [220407 13:31]:
> On 10:10-20220407, Tony Lindgren wrote:
> > diff --git a/Documentation/devicetree/bindings/timer/ti,timer.txt b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > --- a/Documentation/devicetree/bindings/timer/ti,timer.txt
> > +++ b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > @@ -14,6 +14,7 @@ Required properties:
> > ti,omap5430-timer (applicable to OMAP543x devices)
> > ti,am335x-timer (applicable to AM335x devices)
> > ti,am335x-timer-1ms (applicable to AM335x devices)
> > + ti,am6-timer (applicable to AM6 devices)
>
> Suggestion:
>
> Could we call this ti,am65-timer instead? AM6 is a bit nuanced and spans
> a couple of sub SoC architectures.

I think the timer hardware is the same across am64, am65 and j7. So we
should pick something to represent the am6 timers as it would allow using
shared dtsi files for the 16 - 30 timers there are.

Using shared timer dtsi files should work as long as the clocks are
defined in include/dt-bindings/clock for each SoC, and assuming we can use
the same compatible property for the timers.

Of course if the timers are really different across am64, am65 and j72
then multiple compatible properties are neeeded.

If the timer hardware is the same, then I guess we should just pick the
earliest version, so how about using ti,am64-timer?

Regards,

Tony

2022-04-08 08:04:36

by Nishanth Menon

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer

On 07:38-20220408, Tony Lindgren wrote:
> Hi,
>
> * Nishanth Menon <[email protected]> [220407 13:31]:
> > On 10:10-20220407, Tony Lindgren wrote:
> > > diff --git a/Documentation/devicetree/bindings/timer/ti,timer.txt b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > > --- a/Documentation/devicetree/bindings/timer/ti,timer.txt
> > > +++ b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > > @@ -14,6 +14,7 @@ Required properties:
> > > ti,omap5430-timer (applicable to OMAP543x devices)
> > > ti,am335x-timer (applicable to AM335x devices)
> > > ti,am335x-timer-1ms (applicable to AM335x devices)
> > > + ti,am6-timer (applicable to AM6 devices)
> >
> > Suggestion:
> >
> > Could we call this ti,am65-timer instead? AM6 is a bit nuanced and spans
> > a couple of sub SoC architectures.
>
> I think the timer hardware is the same across am64, am65 and j7. So we
> should pick something to represent the am6 timers as it would allow using
> shared dtsi files for the 16 - 30 timers there are.
>
> Using shared timer dtsi files should work as long as the clocks are
> defined in include/dt-bindings/clock for each SoC, and assuming we can use
> the same compatible property for the timers.

Compatible should work fine, Though I doubt clock and other indices
(base address etc will scale appropriately), but we could give it a
shot, but we can discuss that in the context of the dts patches.

>
> Of course if the timers are really different across am64, am65 and j72
> then multiple compatible properties are neeeded.
>
> If the timer hardware is the same, then I guess we should just pick the
> earliest version, so how about using ti,am64-timer?

yep - the oldest version will be ti,am654-timer ( AM65 was the first
K3 device. Unfortunately, the numbering does'nt follow a chronological
order)

--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D

2022-04-08 08:11:24

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: timer: Add am6 compatible for ti-timer

* Nishanth Menon <[email protected]> [220408 07:31]:
> On 07:38-20220408, Tony Lindgren wrote:
> > Hi,
> >
> > * Nishanth Menon <[email protected]> [220407 13:31]:
> > > On 10:10-20220407, Tony Lindgren wrote:
> > > > diff --git a/Documentation/devicetree/bindings/timer/ti,timer.txt b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > > > --- a/Documentation/devicetree/bindings/timer/ti,timer.txt
> > > > +++ b/Documentation/devicetree/bindings/timer/ti,timer.txt
> > > > @@ -14,6 +14,7 @@ Required properties:
> > > > ti,omap5430-timer (applicable to OMAP543x devices)
> > > > ti,am335x-timer (applicable to AM335x devices)
> > > > ti,am335x-timer-1ms (applicable to AM335x devices)
> > > > + ti,am6-timer (applicable to AM6 devices)
> > >
> > > Suggestion:
> > >
> > > Could we call this ti,am65-timer instead? AM6 is a bit nuanced and spans
> > > a couple of sub SoC architectures.
> >
> > I think the timer hardware is the same across am64, am65 and j7. So we
> > should pick something to represent the am6 timers as it would allow using
> > shared dtsi files for the 16 - 30 timers there are.
> >
> > Using shared timer dtsi files should work as long as the clocks are
> > defined in include/dt-bindings/clock for each SoC, and assuming we can use
> > the same compatible property for the timers.
>
> Compatible should work fine, Though I doubt clock and other indices
> (base address etc will scale appropriately), but we could give it a
> shot, but we can discuss that in the context of the dts patches.

Yeah that's a separate series for sure and can be done later on after we
have am6 timers working first.

> > Of course if the timers are really different across am64, am65 and j72
> > then multiple compatible properties are neeeded.
> >
> > If the timer hardware is the same, then I guess we should just pick the
> > earliest version, so how about using ti,am64-timer?
>
> yep - the oldest version will be ti,am654-timer ( AM65 was the first
> K3 device. Unfortunately, the numbering does'nt follow a chronological
> order)

OK great, I will use ti,am654-timer then.

Regards,

Tony