Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clocksource: sh_cmt: Document SoC specific bindings

In general Renesas hardware is not documented to the extent
where the relationship between IP blocks on different SoCs can be assumed
although they may appear to operate the same way. Furthermore the
documentation typically does not specify a version for individual
IP blocks. For these reasons a convention of using the SoC name in place
of a version and providing SoC-specific compat strings has been adopted.

Although not universally liked this convention is used in the bindings for
a number of drivers for Renesas hardware. The purpose of this patch is to
update the Renesas R-Car Compare Match Timer (CMT) driver to follow this
convention.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

---
* I plan to follow up with patches to use these new bindings in the
dtsi files for the affected SoCs.

v2
* Reorder compat entries so more-specific entries and their fallbacks
are grouped with the fallback entry coming last.
* Explicitly document fallback

v3
* Avoid circular dependency in documentation of fallback
behaviour of renesas,cmt-48-gen2
* Use consistent case for SoC names in compat string descriptions

+38 -6
+38 -6
Documentation/devicetree/bindings/timer/renesas,cmt.txt
··· 11 11 12 12 Required Properties: 13 13 14 - - compatible: must contain one of the following. 15 - - "renesas,cmt-32" for the 32-bit CMT 14 + - compatible: must contain one or more of the following: 15 + - "renesas,cmt-32-r8a7740" for the r8a7740 32-bit CMT 16 + (CMT0) 17 + - "renesas,cmt-32-sh7372" for the sh7372 32-bit CMT 18 + (CMT0) 19 + - "renesas,cmt-32-sh73a0" for the sh73a0 32-bit CMT 20 + (CMT0) 21 + - "renesas,cmt-32" for all 32-bit CMT without fast clock support 16 22 (CMT0 on sh7372, sh73a0 and r8a7740) 17 - - "renesas,cmt-32-fast" for the 32-bit CMT with fast clock support 23 + This is a fallback for the above renesas,cmt-32-* entries. 24 + 25 + - "renesas,cmt-32-fast-r8a7740" for the r8a7740 32-bit CMT with fast 26 + clock support (CMT[234]) 27 + - "renesas,cmt-32-fast-sh7372" for the sh7372 32-bit CMT with fast 28 + clock support (CMT[234]) 29 + - "renesas,cmt-32-fast-sh73a0" for the sh73A0 32-bit CMT with fast 30 + clock support (CMT[234]) 31 + - "renesas,cmt-32-fast" for all 32-bit CMT with fast clock support 18 32 (CMT[234] on sh7372, sh73a0 and r8a7740) 19 - - "renesas,cmt-48" for the 48-bit CMT 33 + This is a fallback for the above renesas,cmt-32-fast-* entries. 34 + 35 + - "renesas,cmt-48-sh7372" for the sh7372 48-bit CMT 36 + (CMT1) 37 + - "renesas,cmt-48-sh73a0" for the sh73A0 48-bit CMT 38 + (CMT1) 39 + - "renesas,cmt-48-r8a7740" for the r8a7740 48-bit CMT 40 + (CMT1) 41 + - "renesas,cmt-48" for all non-second generation 48-bit CMT 20 42 (CMT1 on sh7372, sh73a0 and r8a7740) 21 - - "renesas,cmt-48-gen2" for the second generation 48-bit CMT 43 + This is a fallback for the above renesas,cmt-48-* entries. 44 + 45 + - "renesas,cmt-48-r8a73a4" for the r8a73a4 48-bit CMT 46 + (CMT[01]) 47 + - "renesas,cmt-48-r8a7790" for the r8a7790 48-bit CMT 48 + (CMT[01]) 49 + - "renesas,cmt-48-r8a7791" for the r8a7791 48-bit CMT 50 + (CMT[01]) 51 + - "renesas,cmt-48-gen2" for all second generation 48-bit CMT 22 52 (CMT[01] on r8a73a4, r8a7790 and r8a7791) 53 + This is a fallback for the renesas,cmt-48-r8a73a4, 54 + renesas,cmt-48-r8a7790 and renesas,cmt-48-r8a7791 entries. 23 55 24 56 - reg: base address and length of the registers block for the timer module. 25 57 - interrupts: interrupt-specifier for the timer, one per channel. ··· 68 36 them channels 0 and 1 in the documentation. 69 37 70 38 cmt0: timer@ffca0000 { 71 - compatible = "renesas,cmt-48-gen2"; 39 + compatible = "renesas,cmt-48-r8a7790", "renesas,cmt-48-gen2"; 72 40 reg = <0 0xffca0000 0 0x1004>; 73 41 interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>, 74 42 <0 142 IRQ_TYPE_LEVEL_HIGH>;