All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] meson6_timer: dt-bindings updates
@ 2018-10-28 12:35 Martin Blumenstingl
  2018-10-28 12:35 ` [PATCH 1/2] dt-bindings: timer: meson6_timer: document all interrupts Martin Blumenstingl
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Martin Blumenstingl @ 2018-10-28 12:35 UTC (permalink / raw)
  To: linus-amlogic

The dt-bindings don't match the actual IP block implementation:
- each timer has four IRQ lines (Timer A, B, C and D)
- the IP block has internal dividers which use XTAL as parent clock.
  the result can then be used as timebase for Timers A, B, C, D and E.
  internal dividers are (XTAL is running at 24MHz): 24 for 1us, 240 for
  10us, 2400 for 100us and 24000 for 1ms.
- Timer E can use the "system clock" (clk81) as timebase

I'm not sure whether these patches will go through tip.git or Kevin's
linux-amlogic tree. Daniel, Thomas: please let Kevin know if he should
take these through his drivers branch


Martin Blumenstingl (2):
  dt-bindings: timer: meson6_timer: document all interrupts
  dt-bindings: timer: meson6_timer: document the clock inputs

 .../bindings/timer/amlogic,meson6-timer.txt           | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

-- 
2.19.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] dt-bindings: timer: meson6_timer: document all interrupts
  2018-10-28 12:35 [PATCH 0/2] meson6_timer: dt-bindings updates Martin Blumenstingl
@ 2018-10-28 12:35 ` Martin Blumenstingl
  2018-10-28 12:35 ` [PATCH 2/2] dt-bindings: timer: meson6_timer: document the clock inputs Martin Blumenstingl
  2018-10-29 20:09 ` [PATCH 0/2] meson6_timer: dt-bindings updates Rob Herring
  2 siblings, 0 replies; 7+ messages in thread
From: Martin Blumenstingl @ 2018-10-28 12:35 UTC (permalink / raw)
  To: linus-amlogic

The meson6_timer IP block supports four timers - each of them has it's
own interrupt line. Update the documentation to reflect that all four
interrupts should be passed.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 .../devicetree/bindings/timer/amlogic,meson6-timer.txt     | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/timer/amlogic,meson6-timer.txt b/Documentation/devicetree/bindings/timer/amlogic,meson6-timer.txt
index a092053f7902..dbdda92cffb7 100644
--- a/Documentation/devicetree/bindings/timer/amlogic,meson6-timer.txt
+++ b/Documentation/devicetree/bindings/timer/amlogic,meson6-timer.txt
@@ -4,12 +4,15 @@ Required properties:
 
 - compatible : should be "amlogic,meson6-timer"
 - reg : Specifies base physical address and size of the registers.
-- interrupts : The interrupt of the first timer
+- interrupts : The four interrupts, one for each timer event
 
 Example:
 
 timer at c1109940 {
 	compatible = "amlogic,meson6-timer";
 	reg = <0xc1109940 0x14>;
-	interrupts = <0 10 1>;
+	interrupts = <GIC_SPI 10 IRQ_TYPE_EDGE_RISING>,
+		     <GIC_SPI 11 IRQ_TYPE_EDGE_RISING>,
+		     <GIC_SPI 6 IRQ_TYPE_EDGE_RISING>,
+		     <GIC_SPI 29 IRQ_TYPE_EDGE_RISING>;
 };
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] dt-bindings: timer: meson6_timer: document the clock inputs
  2018-10-28 12:35 [PATCH 0/2] meson6_timer: dt-bindings updates Martin Blumenstingl
  2018-10-28 12:35 ` [PATCH 1/2] dt-bindings: timer: meson6_timer: document all interrupts Martin Blumenstingl
@ 2018-10-28 12:35 ` Martin Blumenstingl
  2018-10-29 20:09 ` [PATCH 0/2] meson6_timer: dt-bindings updates Rob Herring
  2 siblings, 0 replies; 7+ messages in thread
From: Martin Blumenstingl @ 2018-10-28 12:35 UTC (permalink / raw)
  To: linus-amlogic

The Meson Timer IP has two clock inputs:
- pclk which is used as "system clock" timebase of Timer E
- xtal which is used for the 1us, 10us, 100us and 1ms timebases of Timer
  A, B, C, D and E

The IP block has four internal dividers (XTAL is running at 24MHz):
- "xtal div 24" for 1us resolution
- "xtal div 240" for 10us resolution
- "xtal div 2400" for 100us resolution
- "xtal div 24000" for 1ms resolution

Suggested-by: Jianxin Pan <jianxin.pan@amlogic.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 .../devicetree/bindings/timer/amlogic,meson6-timer.txt        | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/timer/amlogic,meson6-timer.txt b/Documentation/devicetree/bindings/timer/amlogic,meson6-timer.txt
index dbdda92cffb7..a9da22bda912 100644
--- a/Documentation/devicetree/bindings/timer/amlogic,meson6-timer.txt
+++ b/Documentation/devicetree/bindings/timer/amlogic,meson6-timer.txt
@@ -5,6 +5,8 @@ Required properties:
 - compatible : should be "amlogic,meson6-timer"
 - reg : Specifies base physical address and size of the registers.
 - interrupts : The four interrupts, one for each timer event
+- clocks : phandles to the pclk (system clock) and XTAL clocks
+- clock-names : must contain "pclk" and "xtal"
 
 Example:
 
@@ -15,4 +17,6 @@ timer at c1109940 {
 		     <GIC_SPI 11 IRQ_TYPE_EDGE_RISING>,
 		     <GIC_SPI 6 IRQ_TYPE_EDGE_RISING>,
 		     <GIC_SPI 29 IRQ_TYPE_EDGE_RISING>;
+	clocks = <&xtal>, <&clk81>;
+	clock-names = "xtal", "pclk";
 };
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 0/2] meson6_timer: dt-bindings updates
  2018-10-28 12:35 [PATCH 0/2] meson6_timer: dt-bindings updates Martin Blumenstingl
  2018-10-28 12:35 ` [PATCH 1/2] dt-bindings: timer: meson6_timer: document all interrupts Martin Blumenstingl
  2018-10-28 12:35 ` [PATCH 2/2] dt-bindings: timer: meson6_timer: document the clock inputs Martin Blumenstingl
@ 2018-10-29 20:09 ` Rob Herring
  2018-10-29 21:23   ` Martin Blumenstingl
  2 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2018-10-29 20:09 UTC (permalink / raw)
  To: linus-amlogic

On Sun, Oct 28, 2018 at 7:35 AM Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
>
> The dt-bindings don't match the actual IP block implementation:
> - each timer has four IRQ lines (Timer A, B, C and D)
> - the IP block has internal dividers which use XTAL as parent clock.
>   the result can then be used as timebase for Timers A, B, C, D and E.
>   internal dividers are (XTAL is running at 24MHz): 24 for 1us, 240 for
>   10us, 2400 for 100us and 24000 for 1ms.
> - Timer E can use the "system clock" (clk81) as timebase
>
> I'm not sure whether these patches will go through tip.git or Kevin's
> linux-amlogic tree. Daniel, Thomas: please let Kevin know if he should
> take these through his drivers branch

Normally would be the subsystem tree, but I'm happy to take binding
only changes thru the DT tree. We just can't have them go thru a
mixture of trees if you have further changes.

Are these fixes to reflect what the dts files and timers already
expect? If so, they should be applied for 4.20. If not, you should
have one series with all the updates.

> Martin Blumenstingl (2):
>   dt-bindings: timer: meson6_timer: document all interrupts
>   dt-bindings: timer: meson6_timer: document the clock inputs

Resend to the DT list if you want me to apply. Otherwise,

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 0/2] meson6_timer: dt-bindings updates
  2018-10-29 20:09 ` [PATCH 0/2] meson6_timer: dt-bindings updates Rob Herring
@ 2018-10-29 21:23   ` Martin Blumenstingl
  2018-10-29 23:26     ` Rob Herring
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Blumenstingl @ 2018-10-29 21:23 UTC (permalink / raw)
  To: linus-amlogic

Hi Rob,

On Mon, Oct 29, 2018 at 9:09 PM Rob Herring <robh+dt@kernel.org> wrote:
>
> On Sun, Oct 28, 2018 at 7:35 AM Martin Blumenstingl
> <martin.blumenstingl@googlemail.com> wrote:
> >
> > The dt-bindings don't match the actual IP block implementation:
> > - each timer has four IRQ lines (Timer A, B, C and D)
> > - the IP block has internal dividers which use XTAL as parent clock.
> >   the result can then be used as timebase for Timers A, B, C, D and E.
> >   internal dividers are (XTAL is running at 24MHz): 24 for 1us, 240 for
> >   10us, 2400 for 100us and 24000 for 1ms.
> > - Timer E can use the "system clock" (clk81) as timebase
> >
> > I'm not sure whether these patches will go through tip.git or Kevin's
> > linux-amlogic tree. Daniel, Thomas: please let Kevin know if he should
> > take these through his drivers branch
>
> Normally would be the subsystem tree, but I'm happy to take binding
> only changes thru the DT tree. We just can't have them go thru a
> mixture of trees if you have further changes.
>
> Are these fixes to reflect what the dts files and timers already
> expect? If so, they should be applied for 4.20. If not, you should
> have one series with all the updates.
both the meson6_timer driver and the .dts currently only specify one
interrupt and nothing else

I have .dts patches in my tree which add the missing interrupts and the clocks
however, I prefer to send the .dts patches later as I have two other
pending patch series which are modifying the same .dts files
thus I'd like to re-send the two patches from this series (with your
Reviewed-by) together with the .dts changes

can you please confirm that Kevin can take everything through his
linux-amlogic tree (dt-bindings patches probably in his drivers
branch, .dts patches in his dt branch) if the clocksource maintainers
don't care either?


Regards
Martin

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 0/2] meson6_timer: dt-bindings updates
  2018-10-29 21:23   ` Martin Blumenstingl
@ 2018-10-29 23:26     ` Rob Herring
  2018-11-15  1:20       ` Kevin Hilman
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2018-10-29 23:26 UTC (permalink / raw)
  To: linus-amlogic

On Mon, Oct 29, 2018 at 4:23 PM Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
>
> Hi Rob,
>
> On Mon, Oct 29, 2018 at 9:09 PM Rob Herring <robh+dt@kernel.org> wrote:
> >
> > On Sun, Oct 28, 2018 at 7:35 AM Martin Blumenstingl
> > <martin.blumenstingl@googlemail.com> wrote:
> > >
> > > The dt-bindings don't match the actual IP block implementation:
> > > - each timer has four IRQ lines (Timer A, B, C and D)
> > > - the IP block has internal dividers which use XTAL as parent clock.
> > >   the result can then be used as timebase for Timers A, B, C, D and E.
> > >   internal dividers are (XTAL is running at 24MHz): 24 for 1us, 240 for
> > >   10us, 2400 for 100us and 24000 for 1ms.
> > > - Timer E can use the "system clock" (clk81) as timebase
> > >
> > > I'm not sure whether these patches will go through tip.git or Kevin's
> > > linux-amlogic tree. Daniel, Thomas: please let Kevin know if he should
> > > take these through his drivers branch
> >
> > Normally would be the subsystem tree, but I'm happy to take binding
> > only changes thru the DT tree. We just can't have them go thru a
> > mixture of trees if you have further changes.
> >
> > Are these fixes to reflect what the dts files and timers already
> > expect? If so, they should be applied for 4.20. If not, you should
> > have one series with all the updates.
> both the meson6_timer driver and the .dts currently only specify one
> interrupt and nothing else
>
> I have .dts patches in my tree which add the missing interrupts and the clocks
> however, I prefer to send the .dts patches later as I have two other
> pending patch series which are modifying the same .dts files
> thus I'd like to re-send the two patches from this series (with your
> Reviewed-by) together with the .dts changes
>
> can you please confirm that Kevin can take everything through his
> linux-amlogic tree (dt-bindings patches probably in his drivers
> branch, .dts patches in his dt branch) if the clocksource maintainers
> don't care either?

Yeah, that should be fine.

Rob

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 0/2] meson6_timer: dt-bindings updates
  2018-10-29 23:26     ` Rob Herring
@ 2018-11-15  1:20       ` Kevin Hilman
  0 siblings, 0 replies; 7+ messages in thread
From: Kevin Hilman @ 2018-11-15  1:20 UTC (permalink / raw)
  To: linus-amlogic

Rob Herring <robh+dt@kernel.org> writes:

> On Mon, Oct 29, 2018 at 4:23 PM Martin Blumenstingl
> <martin.blumenstingl@googlemail.com> wrote:
>>
>> Hi Rob,
>>
>> On Mon, Oct 29, 2018 at 9:09 PM Rob Herring <robh+dt@kernel.org> wrote:
>> >
>> > On Sun, Oct 28, 2018 at 7:35 AM Martin Blumenstingl
>> > <martin.blumenstingl@googlemail.com> wrote:
>> > >
>> > > The dt-bindings don't match the actual IP block implementation:
>> > > - each timer has four IRQ lines (Timer A, B, C and D)
>> > > - the IP block has internal dividers which use XTAL as parent clock.
>> > >   the result can then be used as timebase for Timers A, B, C, D and E.
>> > >   internal dividers are (XTAL is running at 24MHz): 24 for 1us, 240 for
>> > >   10us, 2400 for 100us and 24000 for 1ms.
>> > > - Timer E can use the "system clock" (clk81) as timebase
>> > >
>> > > I'm not sure whether these patches will go through tip.git or Kevin's
>> > > linux-amlogic tree. Daniel, Thomas: please let Kevin know if he should
>> > > take these through his drivers branch
>> >
>> > Normally would be the subsystem tree, but I'm happy to take binding
>> > only changes thru the DT tree. We just can't have them go thru a
>> > mixture of trees if you have further changes.
>> >
>> > Are these fixes to reflect what the dts files and timers already
>> > expect? If so, they should be applied for 4.20. If not, you should
>> > have one series with all the updates.
>> both the meson6_timer driver and the .dts currently only specify one
>> interrupt and nothing else
>>
>> I have .dts patches in my tree which add the missing interrupts and the clocks
>> however, I prefer to send the .dts patches later as I have two other
>> pending patch series which are modifying the same .dts files
>> thus I'd like to re-send the two patches from this series (with your
>> Reviewed-by) together with the .dts changes
>>
>> can you please confirm that Kevin can take everything through his
>> linux-amlogic tree (dt-bindings patches probably in his drivers
>> branch, .dts patches in his dt branch) if the clocksource maintainers
>> don't care either?
>
> Yeah, that should be fine.

Queued for v4.21 (in branch v4.21/dt)

Kevin

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-11-15  1:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-28 12:35 [PATCH 0/2] meson6_timer: dt-bindings updates Martin Blumenstingl
2018-10-28 12:35 ` [PATCH 1/2] dt-bindings: timer: meson6_timer: document all interrupts Martin Blumenstingl
2018-10-28 12:35 ` [PATCH 2/2] dt-bindings: timer: meson6_timer: document the clock inputs Martin Blumenstingl
2018-10-29 20:09 ` [PATCH 0/2] meson6_timer: dt-bindings updates Rob Herring
2018-10-29 21:23   ` Martin Blumenstingl
2018-10-29 23:26     ` Rob Herring
2018-11-15  1:20       ` Kevin Hilman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.