ARM: dts: Minor CMT update for 32-bit ARM SoCs
cover ARM: dts: Minor CMT update for 32-bit ARM SoCs
ARM: dts: Minor CMT update for 32-bit ARM SoCs
[PATCH 1/3] ARM: dts: Update CMT1 DT compat strings on r8a7740 [PATCH 2/3] ARM: dts: Update CMT1 DT compat strings on sh73a0 [PATCH 3/3] ARM: dts: Add CMT0 and CMT1 to r8a7792
These patches modify CMT device support on r8a7740, sh73a0 and r8a7792. In particular r8a7740 and sh73a0 get their DT compat strings updated and r8a7792 gets a fresh set of CMT devices.
---
Patch 1 and Patch 2 depend on the following DT binding change:
[PATCH 2/8] dt-bindings: timer: renesas, cmt: Update CMT1 on sh73a0 and r8a7740
arch/arm/boot/dts/r8a7740.dtsi | 2 +- arch/arm/boot/dts/r8a7792.dtsi | 34 ++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/sh73a0.dtsi | 2 +- 3 files changed, 36 insertions(+), 2 deletions(-)
PATCH 1/3 ARM: dts: Update CMT1 DT compat strings on r8a7740
From: Magnus Damm <[email protected]>
Update the r8a7740 to use the CMT1 DT compat string documented in:
[PATCH 2/8] dt-bindings: timer: renesas, cmt: Update CMT1 on sh73a0 and r8a7740
The "renesas,cmt-48" portion is left as-is to avoid breakage until the CMT driver has been updated to make use of the new DT compat strings.
---
arch/arm/boot/dts/r8a7740.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/r8a7740.dtsi +1 -1
@@ -83,7 +83,7 @@ }; cmt1: timer@e6138000 { - compatible = "renesas,cmt-48-r8a7740", "renesas,cmt-48"; + compatible = "renesas,r8a7740-cmt1", "renesas,cmt-48"; reg = <0xe6138000 0x170>; interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp3_clks R8A7740_CLK_CMT1>;
Re: [PATCH 1/3] ARM: dts: Update CMT1 DT compat strings on r8a7740
Hi Magnus,
Quoted 7 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Update the r8a7740 to use the CMT1 DT compat string documented in:
[PATCH 2/8] dt-bindings: timer: renesas, cmt: Update CMT1 on sh73a0 and r8a7740The "renesas,cmt-48" portion is left as-is to avoid breakage until the CMT driver has been updated to make use of the new DT compat strings.
Hence wouldn't it be better to update the driver first, and the DTS in the next release, so you can remove the "renesas,cmt-48" portion with the single DTS update?
This is how it was done for R-Car Gen2:
v4.15 has commit 83c79a6d8d7f4821 ("clocksource/drivers/sh_cmt: Support separate R-Car Gen2 CMT0/1"),
v4.16 has commit bf50e0ab4f5062bb ("ARM: dts: r8a7791: Update CMT compat strings").
arch/arm/boot/dts/r8a7740.dtsi 2019-06-17 14:21:14.647792561 +0900 line 89
Quoted 11 lines
arch/arm/boot/dts/r8a7740.dtsi 2019-06-17 14:21:14.647792561 +0900 renamed from arch/arm/boot/dts/r8a7740.dtsi +1
-1@@ -83,7 +83,7 @@ }; cmt1: timer@e6138000 { - compatible = "renesas,cmt-48-r8a7740", "renesas,cmt-48"; + compatible = "renesas,r8a7740-cmt1", "renesas,cmt-48"; reg = <0xe6138000 0x170>; interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp3_clks R8A7740_CLK_CMT1>;
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH 1/3] ARM: dts: Update CMT1 DT compat strings on r8a7740
Hi Geert,
Quoted 9 lines · Geert Uytterhoeven
Hi Magnus,
Quoted 5 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Update the r8a7740 to use the CMT1 DT compat string documented in:
[PATCH 2/8] dt-bindings: timer: renesas, cmt: Update CMT1 on sh73a0 and r8a7740
Quoted 6 lines
Quoted 2 lines
The "renesas,cmt-48" portion is left as-is to avoid breakage until the CMT driver has been updated to make use of the new DT compat strings.
Hence wouldn't it be better to update the driver first, and the DTS in the next release, so you can remove the "renesas,cmt-48" portion with the single DTS update?
Changing the DTS once sounds nice indeed. I guess my current series are optimized for easy merge of DT Binding docs and DTS. The driver changes are considered slow path.
Regarding the driver itself, I was under the impression that introducing new DT compat strings is often disconnected from removing old DT compat strings. Do you agree?
This is how I understand your proposed order:
Step 1:
- Update DT binding document to include new compat strings, remove deprecated compat strings
- Add new DT compat string matching code to the driver
- Mark old DT compat strings in driver as deprecated
Step 2: (Any time after step 1 is complete)
- Convert DTS to use DT new compat strings
Step 3: (After N releases or years)
- Remove deprecated DT compat string matching code in driver
Quoted 6 lines
This is how it was done for R-Car Gen2:
v4.15 has commit
83c79a6d8d7f4821("clocksource/drivers/sh_cmt: Support separate R-Car Gen2 CMT0/1"),
v4.16 has commitbf50e0ab4f5062bb("ARM: dts: r8a7791: Update CMT compat strings").
Looking good!
Thanks for your help!
/ magnus
Re: [PATCH 1/3] ARM: dts: Update CMT1 DT compat strings on r8a7740
Hi Magnus,
Quoted 15 lines · Magnus Damm
Quoted 6 lines · Geert Uytterhoeven
Quoted 5 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Update the r8a7740 to use the CMT1 DT compat string documented in:
[PATCH 2/8] dt-bindings: timer: renesas, cmt: Update CMT1 on sh73a0 and r8a7740Quoted 6 lines
Quoted 2 lines
The "renesas,cmt-48" portion is left as-is to avoid breakage until the CMT driver has been updated to make use of the new DT compat strings.
Hence wouldn't it be better to update the driver first, and the DTS in the next release, so you can remove the "renesas,cmt-48" portion with the single DTS update?
Quoted 7 lines
Changing the DTS once sounds nice indeed. I guess my current series are optimized for easy merge of DT Binding docs and DTS. The driver changes are considered slow path.
Regarding the driver itself, I was under the impression that introducing new DT compat strings is often disconnected from removing old DT compat strings. Do you agree?
Yes, you have to add a safety period before removing them.
Quoted 8 lines
This is how I understand your proposed order:
Step 1:
- Update DT binding document to include new compat strings, remove deprecated compat strings
- Add new DT compat string matching code to the driver
- Mark old DT compat strings in driver as deprecated
Quoted 5 lines
Step 2: (Any time after step 1 is complete)
- Convert DTS to use DT new compat stringsStep 3: (After N releases or years)
- Remove deprecated DT compat string matching code in driver
Exactly.
Thanks!
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH 1/3] ARM: dts: Update CMT1 DT compat strings on r8a7740
Quoted 36 lines · Geert Uytterhoeven
Hi Magnus,
Quoted 15 lines · Magnus Damm
Quoted 6 lines · Geert Uytterhoeven
Quoted 5 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Update the r8a7740 to use the CMT1 DT compat string documented in:
[PATCH 2/8] dt-bindings: timer: renesas, cmt: Update CMT1 on sh73a0 and r8a7740Quoted 6 lines
Quoted 2 lines
The "renesas,cmt-48" portion is left as-is to avoid breakage until the CMT driver has been updated to make use of the new DT compat strings.
Hence wouldn't it be better to update the driver first, and the DTS in the next release, so you can remove the "renesas,cmt-48" portion with the single DTS update?
Quoted 7 lines
Changing the DTS once sounds nice indeed. I guess my current series are optimized for easy merge of DT Binding docs and DTS. The driver changes are considered slow path.
Regarding the driver itself, I was under the impression that introducing new DT compat strings is often disconnected from removing old DT compat strings. Do you agree?
Yes, you have to add a safety period before removing them.
Quoted 8 lines
This is how I understand your proposed order:
Step 1:
- Update DT binding document to include new compat strings, remove deprecated compat strings
- Add new DT compat string matching code to the driver
- Mark old DT compat strings in driver as deprecated
Quoted 8 lines
Quoted 5 lines
Step 2: (Any time after step 1 is complete)
- Convert DTS to use DT new compat stringsStep 3: (After N releases or years)
- Remove deprecated DT compat string matching code in driverExactly.
Thanks!
Likewise, thanks.
I am marking patches 1/3 and 2/3 as deferred pending the completion of step 1.
PATCH 2/3 ARM: dts: Update CMT1 DT compat strings on sh73a0
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Update the sh73a0 to use the CMT1 DT compat string documented in:
[PATCH 2/8] dt-bindings: timer: renesas, cmt: Update CMT1 on sh73a0 and r8a7740
The "renesas,cmt-48" portion is left as-is to avoid breakage until the CMT driver has been updated to make use of the new DT compat strings.
---
arch/arm/boot/dts/sh73a0.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sh73a0.dtsi +1 -1
@@ -92,7 +92,7 @@ }; cmt1: timer@e6138000 { - compatible = "renesas,cmt-48-sh73a0", "renesas,cmt-48"; + compatible = "renesas,sh73a0-cmt1", "renesas,cmt-48"; reg = <0xe6138000 0x200>; interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp3_clks SH73A0_CLK_CMT1>;
PATCH 3/3 ARM: dts: Add CMT0 and CMT1 to r8a7792
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Add CMT0 and CMT1 to the R-Car Gen2 V2H (r8a7792) SoC.
---
arch/arm/boot/dts/r8a7792.dtsi | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)
arch/arm/boot/dts/r8a7792.dtsi +34 -0
@@ -875,6 +875,40 @@ compatible = "renesas,prr"; reg = <0 0xff000044 0 4>; }; + + cmt0: timer@ffca0000 { + compatible = "renesas,r8a7792-cmt0", + "renesas,rcar-gen2-cmt0"; + reg = <0 0xffca0000 0 0x1004>; + interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 124>; + clock-names = "fck"; + power-domains = <&sysc R8A7792_PD_ALWAYS_ON>; + resets = <&cpg 124>; + + status = "disabled"; + }; + + cmt1: timer@e6130000 { + compatible = "renesas,r8a7792-cmt1", + "renesas,rcar-gen2-cmt1"; + reg = <0 0xe6130000 0 0x1004>; + interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 329>; + clock-names = "fck"; + power-domains = <&sysc R8A7792_PD_ALWAYS_ON>; + resets = <&cpg 329>; + + status = "disabled"; + }; }; timer {
Re: [PATCH 3/3] ARM: dts: Add CMT0 and CMT1 to r8a7792
Quoted 5 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Add CMT0 and CMT1 to the R-Car Gen2 V2H (r8a7792) SoC.
Signed-off-by Magnus Damm <[email protected]>
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Simon Horman
AppliedRe: [PATCH 3/3] ARM: dts: Add CMT0 and CMT1 to r8a7792
Quoted 8 lines · Geert Uytterhoeven
Quoted 5 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Add CMT0 and CMT1 to the R-Car Gen2 V2H (r8a7792) SoC.
Signed-off-by Magnus Damm <[email protected]>Reviewed-by Geert Uytterhoeven <[email protected]>
Thanks, applied for inclusion in v5.3.
Quoted 10 lines · Magnus Damm
ARM: dts: Minor CMT update for 32-bit ARM SoCs
[PATCH 1/3] ARM: dts: Update CMT1 DT compat strings on r8a7740 [PATCH 2/3] ARM: dts: Update CMT1 DT compat strings on sh73a0 [PATCH 3/3] ARM: dts: Add CMT0 and CMT1 to r8a7792
These patches modify CMT device support on r8a7740, sh73a0 and r8a7792. In particular r8a7740 and sh73a0 get their DT compat strings updated and r8a7792 gets a fresh set of CMT devices.
Quoted 5 lines
Signed-off-by Magnus Damm <[email protected]>---
Patch 1 and Patch 2 depend on the following DT binding change:
[PATCH 2/8] dt-bindings: timer: renesas, cmt: Update CMT1 on sh73a0 and r8a7740
Hi Magnus,
Do these also depend on a driver update to avoid a regression?
Quoted 15 lines · Simon Horman
Quoted 13 lines · Magnus Damm
ARM: dts: Minor CMT update for 32-bit ARM SoCs
[PATCH 1/3] ARM: dts: Update CMT1 DT compat strings on r8a7740 [PATCH 2/3] ARM: dts: Update CMT1 DT compat strings on sh73a0 [PATCH 3/3] ARM: dts: Add CMT0 and CMT1 to r8a7792
These patches modify CMT device support on r8a7740, sh73a0 and r8a7792. In particular r8a7740 and sh73a0 get their DT compat strings updated and r8a7792 gets a fresh set of CMT devices.
Signed-off-by Magnus Damm <[email protected]>---
Quoted 6 lines
Quoted 2 lines
Patch 1 and Patch 2 depend on the following DT binding change:
[PATCH 2/8] dt-bindings: timer: renesas, cmt: Update CMT1 on sh73a0 and r8a7740Hi Magnus,
Do these also depend on a driver update to avoid a regression?
Hi Simon,
Nope, there are no driver dependencies for this series!
Thanks for your help,
/ magnus