linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] renesas, cmt: DT Binding Documentation and Minor Driver Updates
@ 2019-07-18 11:43 Magnus Damm
  2019-07-18 11:44 ` [PATCH 1/7] dt-bindings: timer: renesas, cmt: Add CMT0234 to sh73a0 and r8a7740 Magnus Damm
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Magnus Damm @ 2019-07-18 11:43 UTC (permalink / raw)
  To: linux-kernel
  Cc: mark.rutland, devicetree, geert+renesas, daniel.lezcano,
	linux-renesas-soc, robh+dt, Magnus Damm, tglx

renesas, cmt: DT Binding Documentation and Minor Driver Updates

[PATCH 1/7] dt-bindings: timer: renesas, cmt: Add CMT0234 to sh73a0 and r8a7740
[PATCH 2/7] dt-bindings: timer: renesas, cmt: Update CMT1 on sh73a0 and r8a7740
[PATCH 3/7] dt-bindings: timer: renesas, cmt: Add CMT0 and CMT1 to r8a7792
[PATCH 4/7] dt-bindings: timer: renesas, cmt: Add CMT0 and CMT1 to r8a77995
[PATCH 5/7] dt-bindings: timer: renesas, cmt: Update R-Car Gen3 CMT1 usage
[PATCH 6/7] clocksource/drivers/sh_cmt: r8a7740 and sh73a0 SoC-specific match
[PATCH 7/7] clocksource/drivers/sh_cmt: Document "cmt-48" as deprecated 

This series collect the following rather trivial changes for the CMT driver:
- Add 32-bit CMT0234 and convert CMT1 DT binding docs on sh73a0 and r8a7740.
- Add documentation for the CMT on the R-Car Gen2 V2H (r8a7792) SoC.
- Add missing R-Car Gen3 DT binding documentation for D3 (r8a77995).
- Update the R-Car Gen3 DT documentation to reflect current usage.
- Introduce SoC-specific matching in the driver for CMT1 on sh73a0 and sh73a0.
- Document old "cmt-48" binding as deprecated in the driver.

Please see each individual patch for more detailed information.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> [Patch 3-5]
Reviewed-by: Rob Herring <robh@kernel.org> [Patch 1-5]
---

Developed on top of "renesas-devel-2019-07-08-v5.2" which includes
CMT DT Documentation patches queued for v5.3-rc

Earlier posted as:
[PATCH 0/8] dt-bindings: timer: renesas, cmt: Various updates
[PATCH 0/3] clocksource/drivers/sh_cmt: Minor DT compat string update

 Documentation/devicetree/bindings/timer/renesas,cmt.txt |   42 ++++++++-------
 drivers/clocksource/sh_cmt.c                            |   14 ++++-
 2 files changed, 37 insertions(+), 19 deletions(-)



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

* [PATCH 1/7] dt-bindings: timer: renesas, cmt: Add CMT0234 to sh73a0 and r8a7740
  2019-07-18 11:43 [PATCH 0/7] renesas, cmt: DT Binding Documentation and Minor Driver Updates Magnus Damm
@ 2019-07-18 11:44 ` Magnus Damm
  2019-07-24 11:12   ` Simon Horman
  2019-07-18 11:44 ` [PATCH 2/7] dt-bindings: timer: renesas, cmt: Update CMT1 on " Magnus Damm
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 17+ messages in thread
From: Magnus Damm @ 2019-07-18 11:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: mark.rutland, devicetree, geert+renesas, daniel.lezcano,
	linux-renesas-soc, robh+dt, Magnus Damm, tglx

From: Magnus Damm <damm+renesas@opensource.se>

Document the on-chip CMT devices included in r8a7740 and sh73a0.

Included in this patch is DT binding documentation for 32-bit CMTs
CMT0, CMT2, CMT3 and CMT4. They all contain a single channel and are
quite similar however some minor differences still exist:
 - "Counter input clock" (clock input and on-device divider)
    One example is that RCLK 1/1 is supported by CMT2, CMT3 and CMT4.
 - "Wakeup request" (supported by CMT0 and CMT2)

Because of this one unique compat string per CMT device is selected.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Reviewed-by: Rob Herring <robh@kernel.org>
---

 Documentation/devicetree/bindings/timer/renesas,cmt.txt |    8 ++++++++
 1 file changed, 8 insertions(+)

--- 0001/Documentation/devicetree/bindings/timer/renesas,cmt.txt
+++ work/Documentation/devicetree/bindings/timer/renesas,cmt.txt	2019-07-18 18:19:43.196165331 +0900
@@ -22,6 +22,10 @@ Required Properties:
 
     - "renesas,r8a73a4-cmt0" for the 32-bit CMT0 device included in r8a73a4.
     - "renesas,r8a73a4-cmt1" for the 48-bit CMT1 device included in r8a73a4.
+    - "renesas,r8a7740-cmt0" for the 32-bit CMT0 device included in r8a7740.
+    - "renesas,r8a7740-cmt2" for the 32-bit CMT2 device included in r8a7740.
+    - "renesas,r8a7740-cmt3" for the 32-bit CMT3 device included in r8a7740.
+    - "renesas,r8a7740-cmt4" for the 32-bit CMT4 device included in r8a7740.
     - "renesas,r8a7743-cmt0" for the 32-bit CMT0 device included in r8a7743.
     - "renesas,r8a7743-cmt1" for the 48-bit CMT1 device included in r8a7743.
     - "renesas,r8a7744-cmt0" for the 32-bit CMT0 device included in r8a7744.
@@ -54,6 +58,10 @@ Required Properties:
     - "renesas,r8a77980-cmt1" for the 48-bit CMT1 device included in r8a77980.
     - "renesas,r8a77990-cmt0" for the 32-bit CMT0 device included in r8a77990.
     - "renesas,r8a77990-cmt1" for the 48-bit CMT1 device included in r8a77990.
+    - "renesas,sh73a0-cmt0" for the 32-bit CMT0 device included in sh73a0.
+    - "renesas,sh73a0-cmt2" for the 32-bit CMT2 device included in sh73a0.
+    - "renesas,sh73a0-cmt3" for the 32-bit CMT3 device included in sh73a0.
+    - "renesas,sh73a0-cmt4" for the 32-bit CMT4 device included in sh73a0.
 
     - "renesas,rcar-gen2-cmt0" for 32-bit CMT0 devices included in R-Car Gen2
 		and RZ/G1.

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

* [PATCH 2/7] dt-bindings: timer: renesas, cmt: Update CMT1 on sh73a0 and r8a7740
  2019-07-18 11:43 [PATCH 0/7] renesas, cmt: DT Binding Documentation and Minor Driver Updates Magnus Damm
  2019-07-18 11:44 ` [PATCH 1/7] dt-bindings: timer: renesas, cmt: Add CMT0234 to sh73a0 and r8a7740 Magnus Damm
@ 2019-07-18 11:44 ` Magnus Damm
  2019-07-24 11:12   ` Simon Horman
  2019-07-18 11:44 ` [PATCH 3/7] dt-bindings: timer: renesas, cmt: Add CMT0 and CMT1 to r8a7792 Magnus Damm
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 17+ messages in thread
From: Magnus Damm @ 2019-07-18 11:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: mark.rutland, devicetree, geert+renesas, daniel.lezcano,
	linux-renesas-soc, robh+dt, Magnus Damm, tglx

From: Magnus Damm <damm+renesas@opensource.se>

This patch reworks the DT binding documentation for the 6-channel
48-bit CMTs known as CMT1 on r8a7740 and sh73a0.

After the update the same style of DT binding as the rest of the upstream
SoCs will now also be used by r8a7740 and sh73a0. The DT binding "cmt-48"
is removed from the DT binding documentation, however software support for
this deprecated binding will still remain in the CMT driver for some time.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Reviewed-by: Rob Herring <robh@kernel.org>
---

 Documentation/devicetree/bindings/timer/renesas,cmt.txt |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

--- 0002/Documentation/devicetree/bindings/timer/renesas,cmt.txt
+++ work/Documentation/devicetree/bindings/timer/renesas,cmt.txt	2019-07-18 18:21:59.453309074 +0900
@@ -12,17 +12,10 @@ datasheets.
 Required Properties:
 
   - compatible: must contain one or more of the following:
-    - "renesas,cmt-48-sh73a0" for the sh73A0 48-bit CMT
-		(CMT1)
-    - "renesas,cmt-48-r8a7740" for the r8a7740 48-bit CMT
-		(CMT1)
-    - "renesas,cmt-48" for all non-second generation 48-bit CMT
-		(CMT1 on sh73a0 and r8a7740)
-		This is a fallback for the above renesas,cmt-48-* entries.
-
     - "renesas,r8a73a4-cmt0" for the 32-bit CMT0 device included in r8a73a4.
     - "renesas,r8a73a4-cmt1" for the 48-bit CMT1 device included in r8a73a4.
     - "renesas,r8a7740-cmt0" for the 32-bit CMT0 device included in r8a7740.
+    - "renesas,r8a7740-cmt1" for the 48-bit CMT1 device included in r8a7740.
     - "renesas,r8a7740-cmt2" for the 32-bit CMT2 device included in r8a7740.
     - "renesas,r8a7740-cmt3" for the 32-bit CMT3 device included in r8a7740.
     - "renesas,r8a7740-cmt4" for the 32-bit CMT4 device included in r8a7740.
@@ -59,6 +52,7 @@ Required Properties:
     - "renesas,r8a77990-cmt0" for the 32-bit CMT0 device included in r8a77990.
     - "renesas,r8a77990-cmt1" for the 48-bit CMT1 device included in r8a77990.
     - "renesas,sh73a0-cmt0" for the 32-bit CMT0 device included in sh73a0.
+    - "renesas,sh73a0-cmt1" for the 48-bit CMT1 device included in sh73a0.
     - "renesas,sh73a0-cmt2" for the 32-bit CMT2 device included in sh73a0.
     - "renesas,sh73a0-cmt3" for the 32-bit CMT3 device included in sh73a0.
     - "renesas,sh73a0-cmt4" for the 32-bit CMT4 device included in sh73a0.

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

* [PATCH 3/7] dt-bindings: timer: renesas, cmt: Add CMT0 and CMT1 to r8a7792
  2019-07-18 11:43 [PATCH 0/7] renesas, cmt: DT Binding Documentation and Minor Driver Updates Magnus Damm
  2019-07-18 11:44 ` [PATCH 1/7] dt-bindings: timer: renesas, cmt: Add CMT0234 to sh73a0 and r8a7740 Magnus Damm
  2019-07-18 11:44 ` [PATCH 2/7] dt-bindings: timer: renesas, cmt: Update CMT1 on " Magnus Damm
@ 2019-07-18 11:44 ` Magnus Damm
  2019-07-24 11:13   ` Simon Horman
  2019-07-18 11:44 ` [PATCH 4/7] dt-bindings: timer: renesas, cmt: Add CMT0 and CMT1 to r8a77995 Magnus Damm
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 17+ messages in thread
From: Magnus Damm @ 2019-07-18 11:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: mark.rutland, devicetree, geert+renesas, daniel.lezcano,
	linux-renesas-soc, robh+dt, Magnus Damm, tglx

From: Magnus Damm <damm+renesas@opensource.se>

This patch adds DT binding documentation for the CMT devices on
the R-Car Gen2 V2H (r8a7792) SoC.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Rob Herring <robh@kernel.org>
---

 Documentation/devicetree/bindings/timer/renesas,cmt.txt |    2 ++
 1 file changed, 2 insertions(+)

--- 0004/Documentation/devicetree/bindings/timer/renesas,cmt.txt
+++ work/Documentation/devicetree/bindings/timer/renesas,cmt.txt	2019-07-18 18:23:48.256013425 +0900
@@ -35,6 +35,8 @@ Required Properties:
     - "renesas,r8a7790-cmt1" for the 48-bit CMT1 device included in r8a7790.
     - "renesas,r8a7791-cmt0" for the 32-bit CMT0 device included in r8a7791.
     - "renesas,r8a7791-cmt1" for the 48-bit CMT1 device included in r8a7791.
+    - "renesas,r8a7792-cmt0" for the 32-bit CMT0 device included in r8a7792.
+    - "renesas,r8a7792-cmt1" for the 48-bit CMT1 device included in r8a7792.
     - "renesas,r8a7793-cmt0" for the 32-bit CMT0 device included in r8a7793.
     - "renesas,r8a7793-cmt1" for the 48-bit CMT1 device included in r8a7793.
     - "renesas,r8a7794-cmt0" for the 32-bit CMT0 device included in r8a7794.

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

* [PATCH 4/7] dt-bindings: timer: renesas, cmt: Add CMT0 and CMT1 to r8a77995
  2019-07-18 11:43 [PATCH 0/7] renesas, cmt: DT Binding Documentation and Minor Driver Updates Magnus Damm
                   ` (2 preceding siblings ...)
  2019-07-18 11:44 ` [PATCH 3/7] dt-bindings: timer: renesas, cmt: Add CMT0 and CMT1 to r8a7792 Magnus Damm
@ 2019-07-18 11:44 ` Magnus Damm
  2019-07-24 11:13   ` Simon Horman
  2019-07-18 11:45 ` [PATCH 5/7] dt-bindings: timer: renesas, cmt: Update R-Car Gen3 CMT1 usage Magnus Damm
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 17+ messages in thread
From: Magnus Damm @ 2019-07-18 11:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: mark.rutland, devicetree, geert+renesas, daniel.lezcano,
	linux-renesas-soc, robh+dt, Magnus Damm, tglx

From: Magnus Damm <damm+renesas@opensource.se>

This patch adds DT binding documentation for the CMT devices on
the R-Car Gen3 D3 (r8a77995) SoC.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Rob Herring <robh@kernel.org>
---

 Documentation/devicetree/bindings/timer/renesas,cmt.txt |    2 ++
 1 file changed, 2 insertions(+)

--- 0006/Documentation/devicetree/bindings/timer/renesas,cmt.txt
+++ work/Documentation/devicetree/bindings/timer/renesas,cmt.txt	2019-07-18 18:25:04.331001914 +0900
@@ -53,6 +53,8 @@ Required Properties:
     - "renesas,r8a77980-cmt1" for the 48-bit CMT1 device included in r8a77980.
     - "renesas,r8a77990-cmt0" for the 32-bit CMT0 device included in r8a77990.
     - "renesas,r8a77990-cmt1" for the 48-bit CMT1 device included in r8a77990.
+    - "renesas,r8a77995-cmt0" for the 32-bit CMT0 device included in r8a77995.
+    - "renesas,r8a77995-cmt1" for the 48-bit CMT1 device included in r8a77995.
     - "renesas,sh73a0-cmt0" for the 32-bit CMT0 device included in sh73a0.
     - "renesas,sh73a0-cmt1" for the 48-bit CMT1 device included in sh73a0.
     - "renesas,sh73a0-cmt2" for the 32-bit CMT2 device included in sh73a0.

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

* [PATCH 5/7] dt-bindings: timer: renesas, cmt: Update R-Car Gen3 CMT1 usage
  2019-07-18 11:43 [PATCH 0/7] renesas, cmt: DT Binding Documentation and Minor Driver Updates Magnus Damm
                   ` (3 preceding siblings ...)
  2019-07-18 11:44 ` [PATCH 4/7] dt-bindings: timer: renesas, cmt: Add CMT0 and CMT1 to r8a77995 Magnus Damm
@ 2019-07-18 11:45 ` Magnus Damm
  2019-07-24 11:13   ` Simon Horman
  2019-07-18 11:45 ` [PATCH 6/7] clocksource/drivers/sh_cmt: r8a7740 and sh73a0 SoC-specific match Magnus Damm
  2019-07-18 11:45 ` [PATCH 7/7] clocksource/drivers/sh_cmt: Document "cmt-48" as deprecated Magnus Damm
  6 siblings, 1 reply; 17+ messages in thread
From: Magnus Damm @ 2019-07-18 11:45 UTC (permalink / raw)
  To: linux-kernel
  Cc: mark.rutland, devicetree, geert+renesas, daniel.lezcano,
	linux-renesas-soc, robh+dt, Magnus Damm, tglx

From: Magnus Damm <damm+renesas@opensource.se>

The R-Car Gen3 SoCs so far come with a total for 4 on-chip CMT devices:
 - CMT0
 - CMT1
 - CMT2
 - CMT3

CMT0 includes two rather basic 32-bit timer channels. The rest of the on-chip
CMT devices support 48-bit counters and have 8 channels each.

Based on the data sheet information "CMT2/3 are exactly same as CMT1"
it seems that CMT2 and CMT3 now use the CMT1 compat string in the DTSI.

Clarify this in the DT binding documentation by describing R-Car Gen3 and
RZ/G2 CMT1 as "48-bit CMT devices".

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Rob Herring <robh@kernel.org>
---

 Changes since last version:
 - Use "devices" for fallback entry - thanks Geert!
 - Keen to Gen3 so removed out-of-scope Gen2 portions

 Documentation/devicetree/bindings/timer/renesas,cmt.txt |   20 +++++++--------
 1 file changed, 10 insertions(+), 10 deletions(-)

--- 0008/Documentation/devicetree/bindings/timer/renesas,cmt.txt
+++ work/Documentation/devicetree/bindings/timer/renesas,cmt.txt	2019-07-18 19:24:05.195643742 +0900
@@ -28,9 +28,9 @@ Required Properties:
     - "renesas,r8a77470-cmt0" for the 32-bit CMT0 device included in r8a77470.
     - "renesas,r8a77470-cmt1" for the 48-bit CMT1 device included in r8a77470.
     - "renesas,r8a774a1-cmt0" for the 32-bit CMT0 device included in r8a774a1.
-    - "renesas,r8a774a1-cmt1" for the 48-bit CMT1 device included in r8a774a1.
+    - "renesas,r8a774a1-cmt1" for the 48-bit CMT devices included in r8a774a1.
     - "renesas,r8a774c0-cmt0" for the 32-bit CMT0 device included in r8a774c0.
-    - "renesas,r8a774c0-cmt1" for the 48-bit CMT1 device included in r8a774c0.
+    - "renesas,r8a774c0-cmt1" for the 48-bit CMT devices included in r8a774c0.
     - "renesas,r8a7790-cmt0" for the 32-bit CMT0 device included in r8a7790.
     - "renesas,r8a7790-cmt1" for the 48-bit CMT1 device included in r8a7790.
     - "renesas,r8a7791-cmt0" for the 32-bit CMT0 device included in r8a7791.
@@ -42,19 +42,19 @@ Required Properties:
     - "renesas,r8a7794-cmt0" for the 32-bit CMT0 device included in r8a7794.
     - "renesas,r8a7794-cmt1" for the 48-bit CMT1 device included in r8a7794.
     - "renesas,r8a7795-cmt0" for the 32-bit CMT0 device included in r8a7795.
-    - "renesas,r8a7795-cmt1" for the 48-bit CMT1 device included in r8a7795.
+    - "renesas,r8a7795-cmt1" for the 48-bit CMT devices included in r8a7795.
     - "renesas,r8a7796-cmt0" for the 32-bit CMT0 device included in r8a7796.
-    - "renesas,r8a7796-cmt1" for the 48-bit CMT1 device included in r8a7796.
+    - "renesas,r8a7796-cmt1" for the 48-bit CMT devices included in r8a7796.
     - "renesas,r8a77965-cmt0" for the 32-bit CMT0 device included in r8a77965.
-    - "renesas,r8a77965-cmt1" for the 48-bit CMT1 device included in r8a77965.
+    - "renesas,r8a77965-cmt1" for the 48-bit CMT devices included in r8a77965.
     - "renesas,r8a77970-cmt0" for the 32-bit CMT0 device included in r8a77970.
-    - "renesas,r8a77970-cmt1" for the 48-bit CMT1 device included in r8a77970.
+    - "renesas,r8a77970-cmt1" for the 48-bit CMT devices included in r8a77970.
     - "renesas,r8a77980-cmt0" for the 32-bit CMT0 device included in r8a77980.
-    - "renesas,r8a77980-cmt1" for the 48-bit CMT1 device included in r8a77980.
+    - "renesas,r8a77980-cmt1" for the 48-bit CMT devices included in r8a77980.
     - "renesas,r8a77990-cmt0" for the 32-bit CMT0 device included in r8a77990.
-    - "renesas,r8a77990-cmt1" for the 48-bit CMT1 device included in r8a77990.
+    - "renesas,r8a77990-cmt1" for the 48-bit CMT devices included in r8a77990.
     - "renesas,r8a77995-cmt0" for the 32-bit CMT0 device included in r8a77995.
-    - "renesas,r8a77995-cmt1" for the 48-bit CMT1 device included in r8a77995.
+    - "renesas,r8a77995-cmt1" for the 48-bit CMT devices included in r8a77995.
     - "renesas,sh73a0-cmt0" for the 32-bit CMT0 device included in sh73a0.
     - "renesas,sh73a0-cmt1" for the 48-bit CMT1 device included in sh73a0.
     - "renesas,sh73a0-cmt2" for the 32-bit CMT2 device included in sh73a0.
@@ -69,7 +69,7 @@ Required Properties:
 		listed above.
     - "renesas,rcar-gen3-cmt0" for 32-bit CMT0 devices included in R-Car Gen3
 		and RZ/G2.
-    - "renesas,rcar-gen3-cmt1" for 48-bit CMT1 devices included in R-Car Gen3
+    - "renesas,rcar-gen3-cmt1" for 48-bit CMT devices included in R-Car Gen3
 		and RZ/G2.
 		These are fallbacks for R-Car Gen3 and RZ/G2 entries listed
 		above.

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

* [PATCH 6/7] clocksource/drivers/sh_cmt: r8a7740 and sh73a0 SoC-specific match
  2019-07-18 11:43 [PATCH 0/7] renesas, cmt: DT Binding Documentation and Minor Driver Updates Magnus Damm
                   ` (4 preceding siblings ...)
  2019-07-18 11:45 ` [PATCH 5/7] dt-bindings: timer: renesas, cmt: Update R-Car Gen3 CMT1 usage Magnus Damm
@ 2019-07-18 11:45 ` Magnus Damm
  2019-07-24 11:12   ` Simon Horman
  2019-07-18 11:45 ` [PATCH 7/7] clocksource/drivers/sh_cmt: Document "cmt-48" as deprecated Magnus Damm
  6 siblings, 1 reply; 17+ messages in thread
From: Magnus Damm @ 2019-07-18 11:45 UTC (permalink / raw)
  To: linux-kernel
  Cc: mark.rutland, devicetree, geert+renesas, daniel.lezcano,
	linux-renesas-soc, robh+dt, Magnus Damm, tglx

From: Magnus Damm <damm+renesas@opensource.se>

Add SoC-specific matching for CMT1 on r8a7740 and sh73a0.

This allows us to move away from the old DT bindings such as
 - "renesas,cmt-48-sh73a0"
 - "renesas,cmt-48-r8a7740"
 - "renesas,cmt-48"
in favour for the now commonly used format "renesas,<soc>-<device>"

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

 drivers/clocksource/sh_cmt.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- 0001/drivers/clocksource/sh_cmt.c
+++ work/drivers/clocksource/sh_cmt.c	2019-07-18 19:29:06.005414716 +0900
@@ -928,6 +928,14 @@ static const struct of_device_id sh_cmt_
 		.data = &sh_cmt_info[SH_CMT0_RCAR_GEN2]
 	},
 	{
+		.compatible = "renesas,r8a7740-cmt1",
+		.data = &sh_cmt_info[SH_CMT_48BIT]
+	},
+	{
+		.compatible = "renesas,sh73a0-cmt1",
+		.data = &sh_cmt_info[SH_CMT_48BIT]
+	},
+	{
 		.compatible = "renesas,rcar-gen2-cmt0",
 		.data = &sh_cmt_info[SH_CMT0_RCAR_GEN2]
 	},

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

* [PATCH 7/7] clocksource/drivers/sh_cmt: Document "cmt-48" as deprecated
  2019-07-18 11:43 [PATCH 0/7] renesas, cmt: DT Binding Documentation and Minor Driver Updates Magnus Damm
                   ` (5 preceding siblings ...)
  2019-07-18 11:45 ` [PATCH 6/7] clocksource/drivers/sh_cmt: r8a7740 and sh73a0 SoC-specific match Magnus Damm
@ 2019-07-18 11:45 ` Magnus Damm
  2019-07-24 11:13   ` Simon Horman
  6 siblings, 1 reply; 17+ messages in thread
From: Magnus Damm @ 2019-07-18 11:45 UTC (permalink / raw)
  To: linux-kernel
  Cc: mark.rutland, devicetree, geert+renesas, daniel.lezcano,
	linux-renesas-soc, robh+dt, Magnus Damm, tglx

From: Magnus Damm <damm+renesas@opensource.se>

Update the CMT driver to mark "renesas,cmt-48" as deprecated.

Instead of documenting a theoretical hardware device based on current software
support level, define DT bindings top-down based on available data sheet
information and make use of part numbers in the DT compat string.

In case of the only in-tree users r8a7740 and sh73a0 the compat strings
"renesas,r8a7740-cmt1" and "renesas,sh73a0-cmt1" may be used instead.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

 drivers/clocksource/sh_cmt.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- 0011/drivers/clocksource/sh_cmt.c
+++ work/drivers/clocksource/sh_cmt.c	2019-07-18 19:31:01.917491800 +0900
@@ -921,7 +921,11 @@ static const struct platform_device_id s
 MODULE_DEVICE_TABLE(platform, sh_cmt_id_table);
 
 static const struct of_device_id sh_cmt_of_table[] __maybe_unused = {
-	{ .compatible = "renesas,cmt-48", .data = &sh_cmt_info[SH_CMT_48BIT] },
+	{
+		/* deprecated, preserved for backward compatibility */
+		.compatible = "renesas,cmt-48",
+		.data = &sh_cmt_info[SH_CMT_48BIT]
+	},
 	{
 		/* deprecated, preserved for backward compatibility */
 		.compatible = "renesas,cmt-48-gen2",

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

* Re: [PATCH 6/7] clocksource/drivers/sh_cmt: r8a7740 and sh73a0 SoC-specific match
  2019-07-18 11:45 ` [PATCH 6/7] clocksource/drivers/sh_cmt: r8a7740 and sh73a0 SoC-specific match Magnus Damm
@ 2019-07-24 11:12   ` Simon Horman
  2019-08-20 12:34     ` Magnus Damm
  0 siblings, 1 reply; 17+ messages in thread
From: Simon Horman @ 2019-07-24 11:12 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-kernel, mark.rutland, devicetree, geert+renesas,
	daniel.lezcano, linux-renesas-soc, robh+dt, tglx

On Thu, Jul 18, 2019 at 08:45:24PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm+renesas@opensource.se>
> 
> Add SoC-specific matching for CMT1 on r8a7740 and sh73a0.
> 
> This allows us to move away from the old DT bindings such as
>  - "renesas,cmt-48-sh73a0"
>  - "renesas,cmt-48-r8a7740"
>  - "renesas,cmt-48"
> in favour for the now commonly used format "renesas,<soc>-<device>"
> 
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>

> ---
> 
>  drivers/clocksource/sh_cmt.c |    8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> --- 0001/drivers/clocksource/sh_cmt.c
> +++ work/drivers/clocksource/sh_cmt.c	2019-07-18 19:29:06.005414716 +0900
> @@ -928,6 +928,14 @@ static const struct of_device_id sh_cmt_
>  		.data = &sh_cmt_info[SH_CMT0_RCAR_GEN2]
>  	},
>  	{
> +		.compatible = "renesas,r8a7740-cmt1",
> +		.data = &sh_cmt_info[SH_CMT_48BIT]

Perhaps as a follow-up SH_CMT_48BIT could be renamed.

> +	},
> +	{
> +		.compatible = "renesas,sh73a0-cmt1",
> +		.data = &sh_cmt_info[SH_CMT_48BIT]
> +	},
> +	{
>  		.compatible = "renesas,rcar-gen2-cmt0",
>  		.data = &sh_cmt_info[SH_CMT0_RCAR_GEN2]
>  	},
> 

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

* Re: [PATCH 1/7] dt-bindings: timer: renesas, cmt: Add CMT0234 to sh73a0 and r8a7740
  2019-07-18 11:44 ` [PATCH 1/7] dt-bindings: timer: renesas, cmt: Add CMT0234 to sh73a0 and r8a7740 Magnus Damm
@ 2019-07-24 11:12   ` Simon Horman
  0 siblings, 0 replies; 17+ messages in thread
From: Simon Horman @ 2019-07-24 11:12 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-kernel, mark.rutland, devicetree, geert+renesas,
	daniel.lezcano, linux-renesas-soc, robh+dt, tglx

On Thu, Jul 18, 2019 at 08:44:12PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm+renesas@opensource.se>
> 
> Document the on-chip CMT devices included in r8a7740 and sh73a0.
> 
> Included in this patch is DT binding documentation for 32-bit CMTs
> CMT0, CMT2, CMT3 and CMT4. They all contain a single channel and are
> quite similar however some minor differences still exist:
>  - "Counter input clock" (clock input and on-device divider)
>     One example is that RCLK 1/1 is supported by CMT2, CMT3 and CMT4.
>  - "Wakeup request" (supported by CMT0 and CMT2)
> 
> Because of this one unique compat string per CMT device is selected.
> 
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
> Reviewed-by: Rob Herring <robh@kernel.org>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>


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

* Re: [PATCH 2/7] dt-bindings: timer: renesas, cmt: Update CMT1 on sh73a0 and r8a7740
  2019-07-18 11:44 ` [PATCH 2/7] dt-bindings: timer: renesas, cmt: Update CMT1 on " Magnus Damm
@ 2019-07-24 11:12   ` Simon Horman
  0 siblings, 0 replies; 17+ messages in thread
From: Simon Horman @ 2019-07-24 11:12 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-kernel, mark.rutland, devicetree, geert+renesas,
	daniel.lezcano, linux-renesas-soc, robh+dt, tglx

On Thu, Jul 18, 2019 at 08:44:25PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm+renesas@opensource.se>
> 
> This patch reworks the DT binding documentation for the 6-channel
> 48-bit CMTs known as CMT1 on r8a7740 and sh73a0.
> 
> After the update the same style of DT binding as the rest of the upstream
> SoCs will now also be used by r8a7740 and sh73a0. The DT binding "cmt-48"
> is removed from the DT binding documentation, however software support for
> this deprecated binding will still remain in the CMT driver for some time.
> 
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
> Reviewed-by: Rob Herring <robh@kernel.org>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>


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

* Re: [PATCH 3/7] dt-bindings: timer: renesas, cmt: Add CMT0 and CMT1 to r8a7792
  2019-07-18 11:44 ` [PATCH 3/7] dt-bindings: timer: renesas, cmt: Add CMT0 and CMT1 to r8a7792 Magnus Damm
@ 2019-07-24 11:13   ` Simon Horman
  0 siblings, 0 replies; 17+ messages in thread
From: Simon Horman @ 2019-07-24 11:13 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-kernel, mark.rutland, devicetree, geert+renesas,
	daniel.lezcano, linux-renesas-soc, robh+dt, tglx

On Thu, Jul 18, 2019 at 08:44:39PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm+renesas@opensource.se>
> 
> This patch adds DT binding documentation for the CMT devices on
> the R-Car Gen2 V2H (r8a7792) SoC.
> 
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Reviewed-by: Rob Herring <robh@kernel.org>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>


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

* Re: [PATCH 4/7] dt-bindings: timer: renesas, cmt: Add CMT0 and CMT1 to r8a77995
  2019-07-18 11:44 ` [PATCH 4/7] dt-bindings: timer: renesas, cmt: Add CMT0 and CMT1 to r8a77995 Magnus Damm
@ 2019-07-24 11:13   ` Simon Horman
  0 siblings, 0 replies; 17+ messages in thread
From: Simon Horman @ 2019-07-24 11:13 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-kernel, mark.rutland, devicetree, geert+renesas,
	daniel.lezcano, linux-renesas-soc, robh+dt, tglx

On Thu, Jul 18, 2019 at 08:44:53PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm+renesas@opensource.se>
> 
> This patch adds DT binding documentation for the CMT devices on
> the R-Car Gen3 D3 (r8a77995) SoC.
> 
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Reviewed-by: Rob Herring <robh@kernel.org>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>


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

* Re: [PATCH 5/7] dt-bindings: timer: renesas, cmt: Update R-Car Gen3 CMT1 usage
  2019-07-18 11:45 ` [PATCH 5/7] dt-bindings: timer: renesas, cmt: Update R-Car Gen3 CMT1 usage Magnus Damm
@ 2019-07-24 11:13   ` Simon Horman
  0 siblings, 0 replies; 17+ messages in thread
From: Simon Horman @ 2019-07-24 11:13 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-kernel, mark.rutland, devicetree, geert+renesas,
	daniel.lezcano, linux-renesas-soc, robh+dt, tglx

On Thu, Jul 18, 2019 at 08:45:11PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm+renesas@opensource.se>
> 
> The R-Car Gen3 SoCs so far come with a total for 4 on-chip CMT devices:
>  - CMT0
>  - CMT1
>  - CMT2
>  - CMT3
> 
> CMT0 includes two rather basic 32-bit timer channels. The rest of the on-chip
> CMT devices support 48-bit counters and have 8 channels each.
> 
> Based on the data sheet information "CMT2/3 are exactly same as CMT1"
> it seems that CMT2 and CMT3 now use the CMT1 compat string in the DTSI.
> 
> Clarify this in the DT binding documentation by describing R-Car Gen3 and
> RZ/G2 CMT1 as "48-bit CMT devices".
> 
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Reviewed-by: Rob Herring <robh@kernel.org>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>


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

* Re: [PATCH 7/7] clocksource/drivers/sh_cmt: Document "cmt-48" as deprecated
  2019-07-18 11:45 ` [PATCH 7/7] clocksource/drivers/sh_cmt: Document "cmt-48" as deprecated Magnus Damm
@ 2019-07-24 11:13   ` Simon Horman
  0 siblings, 0 replies; 17+ messages in thread
From: Simon Horman @ 2019-07-24 11:13 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-kernel, mark.rutland, devicetree, geert+renesas,
	daniel.lezcano, linux-renesas-soc, robh+dt, tglx

On Thu, Jul 18, 2019 at 08:45:38PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm+renesas@opensource.se>
> 
> Update the CMT driver to mark "renesas,cmt-48" as deprecated.
> 
> Instead of documenting a theoretical hardware device based on current software
> support level, define DT bindings top-down based on available data sheet
> information and make use of part numbers in the DT compat string.
> 
> In case of the only in-tree users r8a7740 and sh73a0 the compat strings
> "renesas,r8a7740-cmt1" and "renesas,sh73a0-cmt1" may be used instead.
> 
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>


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

* Re: [PATCH 6/7] clocksource/drivers/sh_cmt: r8a7740 and sh73a0 SoC-specific match
  2019-07-24 11:12   ` Simon Horman
@ 2019-08-20 12:34     ` Magnus Damm
  2019-08-20 15:22       ` Simon Horman
  0 siblings, 1 reply; 17+ messages in thread
From: Magnus Damm @ 2019-08-20 12:34 UTC (permalink / raw)
  To: Simon Horman
  Cc: linux-kernel, Mark Rutland, devicetree, Geert Uytterhoeven,
	Daniel Lezcano, Linux-Renesas, Rob Herring, Thomas Gleixner

Hi Simon,

On Wed, Jul 24, 2019 at 8:12 PM Simon Horman <horms@verge.net.au> wrote:
>
> On Thu, Jul 18, 2019 at 08:45:24PM +0900, Magnus Damm wrote:
> > From: Magnus Damm <damm+renesas@opensource.se>
> >
> > Add SoC-specific matching for CMT1 on r8a7740 and sh73a0.
> >
> > This allows us to move away from the old DT bindings such as
> >  - "renesas,cmt-48-sh73a0"
> >  - "renesas,cmt-48-r8a7740"
> >  - "renesas,cmt-48"
> > in favour for the now commonly used format "renesas,<soc>-<device>"
> >
> > Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
>
> Reviewed-by: Simon Horman <horms+renesas@verge.net.au>

Thanks!

> > ---
> >
> >  drivers/clocksource/sh_cmt.c |    8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > --- 0001/drivers/clocksource/sh_cmt.c
> > +++ work/drivers/clocksource/sh_cmt.c 2019-07-18 19:29:06.005414716 +0900
> > @@ -928,6 +928,14 @@ static const struct of_device_id sh_cmt_
> >               .data = &sh_cmt_info[SH_CMT0_RCAR_GEN2]
> >       },
> >       {
> > +             .compatible = "renesas,r8a7740-cmt1",
> > +             .data = &sh_cmt_info[SH_CMT_48BIT]
>
> Perhaps as a follow-up SH_CMT_48BIT could be renamed.

I was actually considering implementing proper 48-bit support, and
reworking those names might be a good idea at that point.

Cheers,

/ magnus

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

* Re: [PATCH 6/7] clocksource/drivers/sh_cmt: r8a7740 and sh73a0 SoC-specific match
  2019-08-20 12:34     ` Magnus Damm
@ 2019-08-20 15:22       ` Simon Horman
  0 siblings, 0 replies; 17+ messages in thread
From: Simon Horman @ 2019-08-20 15:22 UTC (permalink / raw)
  To: Magnus Damm
  Cc: linux-kernel, Mark Rutland, devicetree, Geert Uytterhoeven,
	Daniel Lezcano, Linux-Renesas, Rob Herring, Thomas Gleixner

On Tue, Aug 20, 2019 at 09:34:13PM +0900, Magnus Damm wrote:
> Hi Simon,
> 
> On Wed, Jul 24, 2019 at 8:12 PM Simon Horman <horms@verge.net.au> wrote:
> >
> > On Thu, Jul 18, 2019 at 08:45:24PM +0900, Magnus Damm wrote:
> > > From: Magnus Damm <damm+renesas@opensource.se>
> > >
> > > Add SoC-specific matching for CMT1 on r8a7740 and sh73a0.
> > >
> > > This allows us to move away from the old DT bindings such as
> > >  - "renesas,cmt-48-sh73a0"
> > >  - "renesas,cmt-48-r8a7740"
> > >  - "renesas,cmt-48"
> > > in favour for the now commonly used format "renesas,<soc>-<device>"
> > >
> > > Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
> >
> > Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
> 
> Thanks!
> 
> > > ---
> > >
> > >  drivers/clocksource/sh_cmt.c |    8 ++++++++
> > >  1 file changed, 8 insertions(+)
> > >
> > > --- 0001/drivers/clocksource/sh_cmt.c
> > > +++ work/drivers/clocksource/sh_cmt.c 2019-07-18 19:29:06.005414716 +0900
> > > @@ -928,6 +928,14 @@ static const struct of_device_id sh_cmt_
> > >               .data = &sh_cmt_info[SH_CMT0_RCAR_GEN2]
> > >       },
> > >       {
> > > +             .compatible = "renesas,r8a7740-cmt1",
> > > +             .data = &sh_cmt_info[SH_CMT_48BIT]
> >
> > Perhaps as a follow-up SH_CMT_48BIT could be renamed.
> 
> I was actually considering implementing proper 48-bit support, and
> reworking those names might be a good idea at that point.

Sure, I don't think there is any urgency on updating the name :)

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

end of thread, other threads:[~2019-08-20 15:22 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-18 11:43 [PATCH 0/7] renesas, cmt: DT Binding Documentation and Minor Driver Updates Magnus Damm
2019-07-18 11:44 ` [PATCH 1/7] dt-bindings: timer: renesas, cmt: Add CMT0234 to sh73a0 and r8a7740 Magnus Damm
2019-07-24 11:12   ` Simon Horman
2019-07-18 11:44 ` [PATCH 2/7] dt-bindings: timer: renesas, cmt: Update CMT1 on " Magnus Damm
2019-07-24 11:12   ` Simon Horman
2019-07-18 11:44 ` [PATCH 3/7] dt-bindings: timer: renesas, cmt: Add CMT0 and CMT1 to r8a7792 Magnus Damm
2019-07-24 11:13   ` Simon Horman
2019-07-18 11:44 ` [PATCH 4/7] dt-bindings: timer: renesas, cmt: Add CMT0 and CMT1 to r8a77995 Magnus Damm
2019-07-24 11:13   ` Simon Horman
2019-07-18 11:45 ` [PATCH 5/7] dt-bindings: timer: renesas, cmt: Update R-Car Gen3 CMT1 usage Magnus Damm
2019-07-24 11:13   ` Simon Horman
2019-07-18 11:45 ` [PATCH 6/7] clocksource/drivers/sh_cmt: r8a7740 and sh73a0 SoC-specific match Magnus Damm
2019-07-24 11:12   ` Simon Horman
2019-08-20 12:34     ` Magnus Damm
2019-08-20 15:22       ` Simon Horman
2019-07-18 11:45 ` [PATCH 7/7] clocksource/drivers/sh_cmt: Document "cmt-48" as deprecated Magnus Damm
2019-07-24 11:13   ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).