Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1226848 > unrolled thread
| Started by | Magnus Damm <magnus.damm@gmail.com> |
|---|---|
| First post | 2015-09-17 12:00 +0200 |
| Last post | 2015-09-21 21:00 +0200 |
| Articles | 8 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH v2 00/11] clocksource: sh_cmt: DT binding rework V2 Magnus Damm <magnus.damm@gmail.com> - 2015-09-17 12:00 +0200
[PATCH v2 10/11] clocksource: sh_cmt: Remove unused 32-bit CMT bindings Magnus Damm <magnus.damm@gmail.com> - 2015-09-17 12:00 +0200
[PATCH v2 07/11] devicetree: bindings: Deprecate property, update example Magnus Damm <magnus.damm@gmail.com> - 2015-09-17 12:00 +0200
[PATCH v2 09/11] devicetree: bindings: Remove unused 32-bit CMT bindings Magnus Damm <magnus.damm@gmail.com> - 2015-09-17 12:10 +0200
Re: [PATCH v2 09/11] devicetree: bindings: Remove unused 32-bit CMT bindings Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-09-17 14:20 +0200
Re: [PATCH v2 09/11] devicetree: bindings: Remove unused 32-bit CMT bindings Magnus Damm <magnus.damm@gmail.com> - 2015-09-17 14:50 +0200
[PATCH v2 08/11] ARM: shmobile: Remove CMT renesas,channels-mask from DTS Magnus Damm <magnus.damm@gmail.com> - 2015-09-17 12:10 +0200
Re: [PATCH v2 00/11] clocksource: sh_cmt: DT binding rework V2 Rob Herring <robh@kernel.org> - 2015-09-21 21:00 +0200
| From | Magnus Damm <magnus.damm@gmail.com> |
|---|---|
| Date | 2015-09-17 12:00 +0200 |
| Subject | [PATCH v2 00/11] clocksource: sh_cmt: DT binding rework V2 |
| Message-ID | <q9E8V-8lc-3@gated-at.bofh.it> |
clocksource: sh_cmt: DT binding rework V2 [PATCH v2 01/11] devicetree: bindings: Remove sh7372 CMT binding [PATCH v2 02/11] clocksource: sh_cmt: Use 0x3f mask for SH_CMT_48BIT case [PATCH v2 03/11] devicetree: bindings: R-Car Gen2 CMT0 and CMT1 bindings [PATCH v2 04/11] clocksource: sh_cmt: Support separate R-Car Gen2 CMT0/1 [PATCH v2 05/11] devicetree: bindings: r8a73a4 and R-Car Gen2 CMT bindings [PATCH v2 06/11] ARM: shmobile: Update CMT compat string users in DTS [PATCH v2 07/11] devicetree: bindings: Deprecate property, update example [PATCH v2 08/11] ARM: shmobile: Remove CMT renesas,channels-mask from DTS [PATCH v2 09/11] devicetree: bindings: Remove unused 32-bit CMT bindings [PATCH v2 10/11] clocksource: sh_cmt: Remove unused 32-bit CMT bindings [PATCH v2 11/11] devicetree: bindings: Remove deprecated properties This series reworks the CMT DT bindings to try to deal with the following: - R-Car Gen2 CMT0 and CMT1 hardware instances are not identical - The property renesas,channels-mask is not enough to describe the difference - DT should describe the hardware, not the software implementation - Not all documented DT bindings are actually used Without these patches the binding "renesas,cmt-48-gen2" is used for both CMT0 and CMT1 on R-Car Gen2 SoCs. CMT0 and CMT1 are currently seen by the Linux device driver as compatible hardware, and the device-specific property "renesas,channels-mask" is used to point out some of the hardware configuration differences. Since the driver is not feature complete only some differences are described and when diving into the data sheet we can see that: 1) CMT0 is not 48-bit at all, instead it only supports 32-bit counters. 2) Some channels of CMT1 are 48-bit, some 32-bit. 3) A couple of CMT1 channels have even more features. It turns out that none of the above differences are described in our current DT files. And since we use the same compat string for CMT0 and CMT1 the driver itself cannot enable features specific only to CMT1 without first updating the DTS. So this series is ground work for future feature patches. It seems that we have two choices if we want to support CMT1 features: A) Keep existing DT bindings, add more properties for CMT1 B) Rework the compatible strings and keep configuration in the driver Judging by above it seems that DT update is inevitable. In my mind it is rather painful to update the DT so I'd like to minimize the number of updates and let the majority of the changes only happen in the driver. And since we should really describe hardware in DT but driver features tend to be implemented incrementally then B) seems like a good fit to me. I wouldn't mind going with A) but to be honest I must say that the existing compat string "renesas,cmt-48-gen2" is just too confusing with "48" (when CMT0 is 32bit-only) and also "gen2" (used without product line R-Car). Because of that I've gone with B) and reworked the bindings to separate CMT0 from CMT1 and keep channel configuration in the device driver. While at it I've deprecated "renesas,channels-mask" and the old DT compat strings. Per-SoC compat strings have also been reworked, but are not left around documented as deprecated since they were never used by the driver. Comments are very welcome! If all are in favor then it would be good to merge patch 1-5 first and patch 6-8 later once 1-5 are in. Old DTBs are left working but treated as low-feature CMT0. New DTBs including patch 6 will not work on old kernels. V2 patch series fixes patch 1-2 and adds patches 9, 10, 11. Patch 9 and 10 cleans up r8a7740 and sh73a0 bindings. Patch 11 removes deprecated properties as proposed by Laurent. Many thanks to Geert and Laurent for feedback! Signed-off-by: Magnus Damm <damm+renesas@opensource.se> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> (For patch 1-8) Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> (For patch 1-8) Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> (For patch 1-7) --- Written against renesas-drivers-2015-09-15-v4.3-rc1 Documentation/devicetree/bindings/timer/renesas,cmt.txt | 85 ++++++--------- arch/arm/boot/dts/r8a73a4.dtsi | 5 arch/arm/boot/dts/r8a7740.dtsi | 3 arch/arm/boot/dts/r8a7790.dtsi | 10 - arch/arm/boot/dts/r8a7791.dtsi | 10 - arch/arm/boot/dts/r8a7793.dtsi | 10 - arch/arm/boot/dts/r8a7794.dtsi | 10 - arch/arm/boot/dts/sh73a0.dtsi | 3 drivers/clocksource/sh_cmt.c | 54 ++++++--- 9 files changed, 85 insertions(+), 105 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Magnus Damm <magnus.damm@gmail.com> |
|---|---|
| Date | 2015-09-17 12:00 +0200 |
| Subject | [PATCH v2 10/11] clocksource: sh_cmt: Remove unused 32-bit CMT bindings |
| Message-ID | <q9E8X-8lc-47@gated-at.bofh.it> |
| In reply to | #1226848 |
From: Magnus Damm <damm+renesas@opensource.se>
Remove the 32-bit CMT compat strings to reduce maintenance burden.
It should be fine to break DT compatibility because the 32-bit
32-bit CMT DT binding was never part of any upstream DTS file.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---
Changes since V1:
- New patch
drivers/clocksource/sh_cmt.c | 2 --
1 file changed, 2 deletions(-)
--- 0005/drivers/clocksource/sh_cmt.c
+++ work/drivers/clocksource/sh_cmt.c 2015-09-17 18:06:35.940513000 +0900
@@ -957,8 +957,6 @@ 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-32", .data = &sh_cmt_info[SH_CMT_32BIT] },
- { .compatible = "renesas,cmt-32-fast", .data = &sh_cmt_info[SH_CMT_32BIT_FAST] },
{ .compatible = "renesas,cmt-48", .data = &sh_cmt_info[SH_CMT_48BIT] },
{ .compatible = "renesas,cmt-48-gen2", .data = &sh_cmt_info[SH_CMT0_RCAR_GEN2] },
{ .compatible = "renesas,cmt0-rcar-gen2", .data = &sh_cmt_info[SH_CMT0_RCAR_GEN2] },
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Magnus Damm <magnus.damm@gmail.com> |
|---|---|
| Date | 2015-09-17 12:00 +0200 |
| Subject | [PATCH v2 07/11] devicetree: bindings: Deprecate property, update example |
| Message-ID | <q9E8Y-8lc-75@gated-at.bofh.it> |
| In reply to | #1226848 |
From: Magnus Damm <damm+renesas@opensource.se>
Deprecate "renesas,channels-mask" and update the r8a7790 CMT example.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Changes since V1:
- Added Acked-by and Tested-by from Geert
- Added Acked-by from Laurent
Documentation/devicetree/bindings/timer/renesas,cmt.txt | 24 ++++++++++-----
1 file changed, 17 insertions(+), 7 deletions(-)
--- 0009/Documentation/devicetree/bindings/timer/renesas,cmt.txt
+++ work/Documentation/devicetree/bindings/timer/renesas,cmt.txt 2015-09-17 17:39:47.080513000 +0900
@@ -60,21 +60,31 @@ Required Properties:
in clock-names.
- clock-names: must contain "fck" for the functional clock.
- - renesas,channels-mask: bitmask of the available channels.
+ - renesas,channels-mask: <deprecated>, information kept in device driver.
-Example: R8A7790 (R-Car H2) CMT0 node
-
- CMT0 on R8A7790 implements hardware channels 5 and 6 only and names
- them channels 0 and 1 in the documentation.
+Example: R8A7790 (R-Car H2) CMT0 and CMT1 nodes
cmt0: timer@ffca0000 {
- compatible = "renesas,cmt-48-r8a7790", "renesas,cmt-48-gen2";
+ compatible = "renesas,cmt0-r8a7790", "renesas,cmt0-rcar-gen2";
reg = <0 0xffca0000 0 0x1004>;
interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>,
<0 142 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&mstp1_clks R8A7790_CLK_CMT0>;
clock-names = "fck";
+ };
- renesas,channels-mask = <0x60>;
+ cmt1: timer@e6130000 {
+ compatible = "renesas,cmt1-r8a7790", "renesas,cmt1-rcar-gen2";
+ reg = <0 0xe6130000 0 0x1004>;
+ interrupts = <0 120 IRQ_TYPE_LEVEL_HIGH>,
+ <0 121 IRQ_TYPE_LEVEL_HIGH>,
+ <0 122 IRQ_TYPE_LEVEL_HIGH>,
+ <0 123 IRQ_TYPE_LEVEL_HIGH>,
+ <0 124 IRQ_TYPE_LEVEL_HIGH>,
+ <0 125 IRQ_TYPE_LEVEL_HIGH>,
+ <0 126 IRQ_TYPE_LEVEL_HIGH>,
+ <0 127 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp3_clks R8A7790_CLK_CMT1>;
+ clock-names = "fck";
};
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Magnus Damm <magnus.damm@gmail.com> |
|---|---|
| Date | 2015-09-17 12:10 +0200 |
| Subject | [PATCH v2 09/11] devicetree: bindings: Remove unused 32-bit CMT bindings |
| Message-ID | <q9E8X-8lc-55@gated-at.bofh.it> |
| In reply to | #1226848 |
From: Magnus Damm <damm+renesas@opensource.se>
Remove the 32-bit CMT compat strings to reduce maintenance burden.
It should be fine to break DT compatibility because the 32-bit
32-bit CMT DT binding was never part of any upstream DTS file.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---
Changes since V1:
- New patch
Documentation/devicetree/bindings/timer/renesas,cmt.txt | 16 ---------------
1 file changed, 16 deletions(-)
--- 0008/Documentation/devicetree/bindings/timer/renesas,cmt.txt
+++ work/Documentation/devicetree/bindings/timer/renesas,cmt.txt 2015-09-17 18:04:35.060513000 +0900
@@ -12,22 +12,6 @@ datasheets.
Required Properties:
- compatible: must contain one or more of the following:
- - "renesas,cmt-32-r8a7740" for the r8a7740 32-bit CMT
- (CMT0)
- - "renesas,cmt-32-sh73a0" for the sh73a0 32-bit CMT
- (CMT0)
- - "renesas,cmt-32" for all 32-bit CMT without fast clock support
- (CMT0 on sh73a0 and r8a7740)
- This is a fallback for the above renesas,cmt-32-* entries.
-
- - "renesas,cmt-32-fast-r8a7740" for the r8a7740 32-bit CMT with fast
- clock support (CMT[234])
- - "renesas,cmt-32-fast-sh73a0" for the sh73A0 32-bit CMT with fast
- clock support (CMT[234])
- - "renesas,cmt-32-fast" for all 32-bit CMT with fast clock support
- (CMT[234] on sh73a0 and r8a7740)
- This is a fallback for the above renesas,cmt-32-fast-* entries.
-
- "renesas,cmt-48-sh73a0" for the sh73A0 48-bit CMT
(CMT1)
- "renesas,cmt-48-r8a7740" for the r8a7740 48-bit CMT
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> |
|---|---|
| Date | 2015-09-17 14:20 +0200 |
| Subject | Re: [PATCH v2 09/11] devicetree: bindings: Remove unused 32-bit CMT bindings |
| Message-ID | <q9Gkq-3fX-5@gated-at.bofh.it> |
| In reply to | #1226856 |
Hello.
On 9/17/2015 12:54 PM, Magnus Damm wrote:
> From: Magnus Damm <damm+renesas@opensource.se>
>
> Remove the 32-bit CMT compat strings to reduce maintenance burden.
>
> It should be fine to break DT compatibility because the 32-bit
> 32-bit CMT DT binding was never part of any upstream DTS file.
Nit: "32-bit" repeated twice.
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
[...]
MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Magnus Damm <magnus.damm@gmail.com> |
|---|---|
| Date | 2015-09-17 14:50 +0200 |
| Subject | Re: [PATCH v2 09/11] devicetree: bindings: Remove unused 32-bit CMT bindings |
| Message-ID | <q9GNs-3OP-19@gated-at.bofh.it> |
| In reply to | #1226956 |
Hi Sergei, On Thu, Sep 17, 2015 at 9:14 PM, Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> wrote: > Hello. > > On 9/17/2015 12:54 PM, Magnus Damm wrote: > >> From: Magnus Damm <damm+renesas@opensource.se> >> >> Remove the 32-bit CMT compat strings to reduce maintenance burden. >> >> It should be fine to break DT compatibility because the 32-bit >> 32-bit CMT DT binding was never part of any upstream DTS file. > > > Nit: "32-bit" repeated twice. Oops, will fix, thanks for reporting! Cheers, / magnus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Magnus Damm <magnus.damm@gmail.com> |
|---|---|
| Date | 2015-09-17 12:10 +0200 |
| Subject | [PATCH v2 08/11] ARM: shmobile: Remove CMT renesas,channels-mask from DTS |
| Message-ID | <q9EiD-kL-47@gated-at.bofh.it> |
| In reply to | #1226848 |
From: Magnus Damm <damm+renesas@opensource.se> Update the DTS to remove the now deprecated "renesas,channels-mask" property. The channel information is now kept in the device driver and can easily be determined based on the compat string. Signed-off-by: Magnus Damm <damm+renesas@opensource.se> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> --- Changes since V1: - Rebased on top of power-domain changes - Added Acked-by and Tested-by from Geert arch/arm/boot/dts/r8a73a4.dtsi | 3 --- arch/arm/boot/dts/r8a7740.dtsi | 3 --- arch/arm/boot/dts/r8a7790.dtsi | 6 ------ arch/arm/boot/dts/r8a7791.dtsi | 6 ------ arch/arm/boot/dts/r8a7793.dtsi | 6 ------ arch/arm/boot/dts/r8a7794.dtsi | 6 ------ arch/arm/boot/dts/sh73a0.dtsi | 3 --- 7 files changed, 33 deletions(-) --- 0010/arch/arm/boot/dts/r8a73a4.dtsi +++ work/arch/arm/boot/dts/r8a73a4.dtsi 2015-09-17 17:41:05.250513000 +0900 @@ -120,9 +120,6 @@ clocks = <&mstp3_clks R8A73A4_CLK_CMT1>; clock-names = "fck"; power-domains = <&pd_c5>; - - renesas,channels-mask = <0xff>; - status = "disabled"; }; --- 0001/arch/arm/boot/dts/r8a7740.dtsi +++ work/arch/arm/boot/dts/r8a7740.dtsi 2015-09-17 17:41:05.250513000 +0900 @@ -60,9 +60,6 @@ clocks = <&mstp3_clks R8A7740_CLK_CMT1>; clock-names = "fck"; power-domains = <&pd_c5>; - - renesas,channels-mask = <0x3f>; - status = "disabled"; }; --- 0010/arch/arm/boot/dts/r8a7790.dtsi +++ work/arch/arm/boot/dts/r8a7790.dtsi 2015-09-17 17:45:02.110513000 +0900 @@ -226,9 +226,6 @@ clocks = <&mstp1_clks R8A7790_CLK_CMT0>; clock-names = "fck"; power-domains = <&cpg_clocks>; - - renesas,channels-mask = <0x60>; - status = "disabled"; }; @@ -246,9 +243,6 @@ clocks = <&mstp3_clks R8A7790_CLK_CMT1>; clock-names = "fck"; power-domains = <&cpg_clocks>; - - renesas,channels-mask = <0xff>; - status = "disabled"; }; --- 0010/arch/arm/boot/dts/r8a7791.dtsi +++ work/arch/arm/boot/dts/r8a7791.dtsi 2015-09-17 17:44:54.210513000 +0900 @@ -209,9 +209,6 @@ clocks = <&mstp1_clks R8A7791_CLK_CMT0>; clock-names = "fck"; power-domains = <&cpg_clocks>; - - renesas,channels-mask = <0x60>; - status = "disabled"; }; @@ -229,9 +226,6 @@ clocks = <&mstp3_clks R8A7791_CLK_CMT1>; clock-names = "fck"; power-domains = <&cpg_clocks>; - - renesas,channels-mask = <0xff>; - status = "disabled"; }; --- 0010/arch/arm/boot/dts/r8a7793.dtsi +++ work/arch/arm/boot/dts/r8a7793.dtsi 2015-09-17 17:44:48.400513000 +0900 @@ -69,9 +69,6 @@ clocks = <&mstp1_clks R8A7793_CLK_CMT0>; clock-names = "fck"; power-domains = <&cpg_clocks>; - - renesas,channels-mask = <0x60>; - status = "disabled"; }; @@ -89,9 +86,6 @@ clocks = <&mstp3_clks R8A7793_CLK_CMT1>; clock-names = "fck"; power-domains = <&cpg_clocks>; - - renesas,channels-mask = <0xff>; - status = "disabled"; }; --- 0010/arch/arm/boot/dts/r8a7794.dtsi +++ work/arch/arm/boot/dts/r8a7794.dtsi 2015-09-17 17:44:43.300513000 +0900 @@ -161,9 +161,6 @@ clocks = <&mstp1_clks R8A7794_CLK_CMT0>; clock-names = "fck"; power-domains = <&cpg_clocks>; - - renesas,channels-mask = <0x60>; - status = "disabled"; }; @@ -181,9 +178,6 @@ clocks = <&mstp3_clks R8A7794_CLK_CMT1>; clock-names = "fck"; power-domains = <&cpg_clocks>; - - renesas,channels-mask = <0xff>; - status = "disabled"; }; --- 0001/arch/arm/boot/dts/sh73a0.dtsi +++ work/arch/arm/boot/dts/sh73a0.dtsi 2015-09-17 17:44:32.950513000 +0900 @@ -84,9 +84,6 @@ clocks = <&mstp3_clks SH73A0_CLK_CMT1>; clock-names = "fck"; power-domains = <&pd_c5>; - - renesas,channels-mask = <0x3f>; - status = "disabled"; }; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2015-09-21 21:00 +0200 |
| Message-ID | <qbetH-6Kf-15@gated-at.bofh.it> |
| In reply to | #1226848 |
On 09/17/2015 04:53 AM, Magnus Damm wrote: > clocksource: sh_cmt: DT binding rework V2 > > [PATCH v2 01/11] devicetree: bindings: Remove sh7372 CMT binding > [PATCH v2 02/11] clocksource: sh_cmt: Use 0x3f mask for SH_CMT_48BIT case > [PATCH v2 03/11] devicetree: bindings: R-Car Gen2 CMT0 and CMT1 bindings > [PATCH v2 04/11] clocksource: sh_cmt: Support separate R-Car Gen2 CMT0/1 > [PATCH v2 05/11] devicetree: bindings: r8a73a4 and R-Car Gen2 CMT bindings > [PATCH v2 06/11] ARM: shmobile: Update CMT compat string users in DTS > [PATCH v2 07/11] devicetree: bindings: Deprecate property, update example > [PATCH v2 08/11] ARM: shmobile: Remove CMT renesas,channels-mask from DTS > [PATCH v2 09/11] devicetree: bindings: Remove unused 32-bit CMT bindings > [PATCH v2 10/11] clocksource: sh_cmt: Remove unused 32-bit CMT bindings > [PATCH v2 11/11] devicetree: bindings: Remove deprecated properties > > This series reworks the CMT DT bindings to try to deal with the following: > - R-Car Gen2 CMT0 and CMT1 hardware instances are not identical > - The property renesas,channels-mask is not enough to describe the difference > - DT should describe the hardware, not the software implementation > - Not all documented DT bindings are actually used > > Without these patches the binding "renesas,cmt-48-gen2" is used for both > CMT0 and CMT1 on R-Car Gen2 SoCs. CMT0 and CMT1 are currently seen by the > Linux device driver as compatible hardware, and the device-specific property > "renesas,channels-mask" is used to point out some of the hardware configuration > differences. Since the driver is not feature complete only some differences are > described and when diving into the data sheet we can see that: > > 1) CMT0 is not 48-bit at all, instead it only supports 32-bit counters. > 2) Some channels of CMT1 are 48-bit, some 32-bit. > 3) A couple of CMT1 channels have even more features. > > It turns out that none of the above differences are described in our current > DT files. And since we use the same compat string for CMT0 and CMT1 the driver > itself cannot enable features specific only to CMT1 without first updating > the DTS. So this series is ground work for future feature patches. > > It seems that we have two choices if we want to support CMT1 features: > A) Keep existing DT bindings, add more properties for CMT1 > B) Rework the compatible strings and keep configuration in the driver > > Judging by above it seems that DT update is inevitable. In my mind it is > rather painful to update the DT so I'd like to minimize the number of > updates and let the majority of the changes only happen in the driver. > And since we should really describe hardware in DT but driver features tend > to be implemented incrementally then B) seems like a good fit to me. Agreed. For 1, 3. 5, 7, 9, 11: Acked-by: Rob Herring <robh@kernel.org> > > I wouldn't mind going with A) but to be honest I must say that the existing > compat string "renesas,cmt-48-gen2" is just too confusing with "48" > (when CMT0 is 32bit-only) and also "gen2" (used without product line R-Car). > > Because of that I've gone with B) and reworked the bindings to separate > CMT0 from CMT1 and keep channel configuration in the device driver. > > While at it I've deprecated "renesas,channels-mask" and the old DT compat > strings. Per-SoC compat strings have also been reworked, but are not left > around documented as deprecated since they were never used by the driver. > > Comments are very welcome! If all are in favor then it would be good to > merge patch 1-5 first and patch 6-8 later once 1-5 are in. Old DTBs are > left working but treated as low-feature CMT0. New DTBs including patch 6 > will not work on old kernels. > > V2 patch series fixes patch 1-2 and adds patches 9, 10, 11. > Patch 9 and 10 cleans up r8a7740 and sh73a0 bindings. > Patch 11 removes deprecated properties as proposed by Laurent. > > Many thanks to Geert and Laurent for feedback! > > Signed-off-by: Magnus Damm <damm+renesas@opensource.se> > Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> (For patch 1-8) > Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> (For patch 1-8) > Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> (For patch 1-7) > --- > > Written against renesas-drivers-2015-09-15-v4.3-rc1 > > Documentation/devicetree/bindings/timer/renesas,cmt.txt | 85 ++++++--------- > arch/arm/boot/dts/r8a73a4.dtsi | 5 > arch/arm/boot/dts/r8a7740.dtsi | 3 > arch/arm/boot/dts/r8a7790.dtsi | 10 - > arch/arm/boot/dts/r8a7791.dtsi | 10 - > arch/arm/boot/dts/r8a7793.dtsi | 10 - > arch/arm/boot/dts/r8a7794.dtsi | 10 - > arch/arm/boot/dts/sh73a0.dtsi | 3 > drivers/clocksource/sh_cmt.c | 54 ++++++--- > 9 files changed, 85 insertions(+), 105 deletions(-) > -- > To unsubscribe from this list: send the line "unsubscribe devicetree" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web