Add CMT and TMU support to RZ/G2E
cover Add CMT and TMU support to RZ/G2E
Dear All,
this series backports what's necessary to support CMT and TMU on the RZ/G2E.
This series depends on:
https://patchwork.kernel.org/project/cip-dev/list/?series=98481
Thanks,
Fab
Biju Das (5):
dt-bindings: timer: renesas, cmt: Document r8a774a1 CMT support
dt-bindings: timer: renesas, cmt: Document r8a774c0 CMT support
arm64: dts: renesas: r8a774c0: Add CMT device nodes
clk: renesas: r8a774c0: Add TMU clock
dt-bindings: timer: renesas: tmu: Document r8a774c0 bindings
Fabrizio Castro (3):
clk: renesas: r8a774c0: Add missing CANFD clock
clk: renesas: r8a774c0: Fix LAST_DT_CORE_CLK
arm64: dts: renesas: r8a774c0: Add TMU device nodes
Geert Uytterhoeven (1):
clk: renesas: r8a774c0: Correct parent clock of DU
Kuninori Morimoto (2):
clocksource/drivers/sh_cmt: Convert to SPDX identifiers clocksource/drivers/sh_tmu: Convert to SPDX identifiers
Sergei Shtylyov (6):
clocksource/drivers/sh_cmt: Fixup for 64-bit machines clocksource/drivers/sh_cmt: Fix clocksource width for 32-bit machines clocksource/drivers/sh_cmt: Properly line-wrap sh_cmt_of_table[]
initializer
dt-bindings: timer: renesas: cmt: document R-Car gen3 support clocksource/drivers/sh_cmt: Add R-Car gen3 support
arm64: enable CMT/TMU support for Renesas SoC
.../devicetree/bindings/timer/renesas,cmt.txt | 14 +++ .../devicetree/bindings/timer/renesas,tmu.txt | 1 + arch/arm64/Kconfig.platforms | 2 + arch/arm64/boot/dts/renesas/r8a774c0.dtsi | 135 +++++++++++++++++++++ drivers/clk/renesas/r8a774c0-cpg-mssr.c | 15 ++- drivers/clocksource/sh_cmt.c | 106 ++++++++-------- drivers/clocksource/sh_tmu.c | 10 +- include/dt-bindings/clock/r8a774c0-cpg-mssr.h | 1 + 8 files changed, 219 insertions(+), 65 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/17 clocksource/drivers/sh_cmt: Convert to SPDX identifiers
From: Kuninori Morimoto <[email protected]>
commit efad01173717b0d0ad8a7dc91cc447f19d8447f3 upstream.
This patch updates license to use SPDX-License-Identifier instead of verbose license text.
--- drivers/clocksource/sh_cmt.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/clocksource/sh_cmt.c +1 -9
@@ -1,16 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0 /* * SuperH Timer Support - CMT * * Copyright (C) 2008 Magnus Damm -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. */ #include <linux/clk.h>
Signature · 1 line
2.7.4
PATCH 1/17 clocksource/drivers/sh_cmt: Convert to SPDX identifiers
Quoted 6 lines · Fabrizio Castro
From: Kuninori Morimoto <[email protected]>
commit
efad01173717b0d0ad8a7dc91cc447f19d8447f3upstream.This patch updates license to use SPDX-License-Identifier instead of verbose license text.
Thanks, I applied the series.
Strictly speaking patches 1, 4, 16 only alter whitespace, so they would not be welcome under -stable rules. OTOH they clearly do not break anything, and ammount of surrounding changes means taking them is easier than not taking them... so I took them.
Best regards,
Pavel
Signature · 9 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <http://lists.cip-project.org/pipermail/cip-dev/attachments/20190412/247b3868/attachment.sig>
PATCH 2/17 clocksource/drivers/sh_cmt: Fixup for 64-bit machines
In reply to Fabrizio CastroFrom: Sergei Shtylyov <[email protected]>
commit 22627c6f3ed3d9d0df13eec3c831b08f8186c38e upstream.
When trying to use CMT for clockevents on R-Car gen3 SoCs, I noticed that 'max_delta_ns' for the broadcast timer (CMT) was shown as 1000 in /proc/timer_list. It turned out that when calculating it, the driver did 1 << 32 (causing what I think was undefined behavior) resulting in a zero delta, later clamped to 1000 by cev_delta2ns(). The root cause turned out to be that the driver abused *unsigned long* for the CMT register values (which are 16/32-bit), so that the calculation of 'ch->max_match_value' in sh_cmt_setup_channel() used the wrong branch. Using more proper 'u32' instead fixed 'max_delta_ns' and even fixed the switching an active clocksource to CMT (which caused the system to turn non-interactive before).
--- drivers/clocksource/sh_cmt.c | 72 ++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 39 deletions(-)
drivers/clocksource/sh_cmt.c +33 -39
@@ -70,18 +70,17 @@ struct sh_cmt_info {unsigned int channels_mask;unsigned long width;/* 16 or 32 bit version of hardware block */ -unsigned long overflow_bit; -unsigned long clear_bits; +u32 overflow_bit; +u32 clear_bits;/* callbacks for CMSTR and CMCSR access */ -unsigned long (*read_control)(void __iomem *base,unsigned long offs); +u32 (*read_control)(void __iomem *base,unsigned long offs);void (*write_control)(void __iomem *base,unsigned long offs, -unsigned long value); +u32 value);/* callbacks for CMCNT and CMCOR access */ -unsigned long (*read_count)(void __iomem *base,unsigned long offs); -void (*write_count)(void __iomem *base,unsigned long offs, -unsigned long value); +u32 (*read_count)(void __iomem *base,unsigned long offs); +void (*write_count)(void __iomem *base,unsigned long offs,u32 value); };struct sh_cmt_channel {
@@ -95,9 +94,9 @@ struct sh_cmt_channel {unsigned int timer_bit;unsigned long flags; -unsigned long match_value; -unsigned long next_match_value; -unsigned long max_match_value; +u32 match_value; +u32 next_match_value; +u32 max_match_value;raw_spinlock_t lock;struct clock_event_device ced;struct clocksource cs;
@@ -152,24 +151,22 @@ struct sh_cmt_device {#define SH_CMT32_CMCSR_CKS_RCLK1 (7 << 0)#define SH_CMT32_CMCSR_CKS_MASK (7 << 0) -static unsigned long sh_cmt_read16 (void __iomem *base,unsigned long offs) +static u32 sh_cmt_read16 (void __iomem *base,unsigned long offs) {return ioread16 (base + (offs <<1 )); } -static unsigned long sh_cmt_read32 (void __iomem *base,unsigned long offs) +static u32 sh_cmt_read32 (void __iomem *base,unsigned long offs) {return ioread32 (base + (offs <<2 )); } -static void sh_cmt_write16 (void __iomem *base,unsigned long offs, -unsigned long value) +static void sh_cmt_write16 (void __iomem *base,unsigned long offs,u32 value) {iowrite16 (value, base + (offs <<1 )); } -static void sh_cmt_write32 (void __iomem *base,unsigned long offs, -unsigned long value) +static void sh_cmt_write32 (void __iomem *base,unsigned long offs,u32 value) {iowrite32 (value, base + (offs <<2 )); }
@@ -234,7 +231,7 @@ static const struct sh_cmt_info sh_cmt_info[] = {#define CMCNT 1/* channel register */ #define CMCOR 2/* channel register */ -static inline unsigned long sh_cmt_read_cmstr (struct sh_cmt_channel *ch) +static inline u32 sh_cmt_read_cmstr (struct sh_cmt_channel *ch) {if (ch->iostart)return ch->cmt->info->read_control (ch->iostart,0 );
@@ -242,8 +239,7 @@ static inline unsigned long sh_cmt_read_cmstr(struct sh_cmt_channel *ch)return ch->cmt->info->read_control (ch->cmt->mapbase,0 ); } -static inline void sh_cmt_write_cmstr (struct sh_cmt_channel *ch, -unsigned long value) +static inline void sh_cmt_write_cmstr (struct sh_cmt_channel *ch,u32 value) {if (ch->iostart) ch->cmt->info->write_control (ch->iostart,0 , value);
@@ -251,39 +247,35 @@ static inline void sh_cmt_write_cmstr(struct sh_cmt_channel *ch, ch->cmt->info->write_control (ch->cmt->mapbase,0 , value); } -static inline unsigned long sh_cmt_read_cmcsr (struct sh_cmt_channel *ch) +static inline u32 sh_cmt_read_cmcsr (struct sh_cmt_channel *ch) {return ch->cmt->info->read_control (ch->ioctrl,CMCSR ); } -static inline void sh_cmt_write_cmcsr (struct sh_cmt_channel *ch, -unsigned long value) +static inline void sh_cmt_write_cmcsr (struct sh_cmt_channel *ch,u32 value) { ch->cmt->info->write_control (ch->ioctrl,CMCSR , value); } -static inline unsigned long sh_cmt_read_cmcnt (struct sh_cmt_channel *ch) +static inline u32 sh_cmt_read_cmcnt (struct sh_cmt_channel *ch) {return ch->cmt->info->read_count (ch->ioctrl,CMCNT ); } -static inline void sh_cmt_write_cmcnt (struct sh_cmt_channel *ch, -unsigned long value) +static inline void sh_cmt_write_cmcnt (struct sh_cmt_channel *ch,u32 value) { ch->cmt->info->write_count (ch->ioctrl,CMCNT , value); } -static inline void sh_cmt_write_cmcor (struct sh_cmt_channel *ch, -unsigned long value) +static inline void sh_cmt_write_cmcor (struct sh_cmt_channel *ch,u32 value) { ch->cmt->info->write_count (ch->ioctrl,CMCOR , value); } -static unsigned long sh_cmt_get_counter (struct sh_cmt_channel *ch, -int *has_wrapped) +static u32 sh_cmt_get_counter (struct sh_cmt_channel *ch,u32 *has_wrapped) { -unsigned long v1, v2, v3; -int o1, o2; +u32 v1, v2, v3; +u32 o1, o2; o1 =sh_cmt_read_cmcsr (ch) & ch->cmt->info->overflow_bit;
@@ -303,7 +295,8 @@ static unsigned long sh_cmt_get_counter(struct sh_cmt_channel *ch,static void sh_cmt_start_stop_ch (struct sh_cmt_channel *ch,int start) { -unsigned long flags, value; +unsigned long flags; +u32 value;/* start stop register shared by multiple timer channels */ raw_spin_lock_irqsave (&ch->cmt->lock, flags);
@@ -410,11 +403,11 @@ static void sh_cmt_disable(struct sh_cmt_channel *ch)static void sh_cmt_clock_event_program_verify (struct sh_cmt_channel *ch,int absolute) { -unsigned long new_match; -unsigned long value = ch->next_match_value; -unsigned long delay =0 ; -unsigned long now =0 ; -int has_wrapped; +u32 value = ch->next_match_value; +u32 new_match; +u32 delay =0 ; +u32 now =0 ; +u32 has_wrapped; now =sh_cmt_get_counter (ch, &has_wrapped); ch->flags |=FLAG_REPROGRAM ;/* force reprogram */
@@ -611,9 +604,10 @@ static struct sh_cmt_channel *cs_to_sh_cmt(struct clocksource *cs)static u64 sh_cmt_clocksource_read (struct clocksource *cs) {struct sh_cmt_channel *ch =cs_to_sh_cmt (cs); -unsigned long flags, raw; +unsigned long flags;unsigned long value; -int has_wrapped; +u32 has_wrapped; +u32 raw;raw_spin_lock_irqsave (&ch->lock, flags); value = ch->total_cycles;
Signature · 1 line
2.7.4
PATCH 3/17 clocksource/drivers/sh_cmt: Fix clocksource width for 32-bit machines
In reply to Fabrizio CastroFrom: Sergei Shtylyov <[email protected]>
commit 37e7742c55ba856eaec7e35673ee370f36eb17f3 upstream.
The driver seems to abuse *unsigned long* not only for the (32-bit) register values but also for the 'sh_cmt_channel::total_cycles' which needs to always be 64-bit -- as a result, the clocksource's mask is needlessly clamped down to 32-bits on the 32-bit machines...
--- drivers/clocksource/sh_cmt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/clocksource/sh_cmt.c +3 -3
@@ -100,7 +100,7 @@ struct sh_cmt_channel {raw_spinlock_t lock;struct clock_event_device ced;struct clocksource cs; -unsigned long total_cycles; +u64 total_cycles;bool cs_enabled; };
@@ -605,8 +605,8 @@ static u64 sh_cmt_clocksource_read(struct clocksource *cs) {struct sh_cmt_channel *ch =cs_to_sh_cmt (cs);unsigned long flags; -unsigned long value;u32 has_wrapped; +u64 value;u32 raw;raw_spin_lock_irqsave (&ch->lock, flags);
@@ -680,7 +680,7 @@ static int sh_cmt_register_clocksource(struct sh_cmt_channel *ch, cs->disable = sh_cmt_clocksource_disable; cs->suspend = sh_cmt_clocksource_suspend; cs->resume = sh_cmt_clocksource_resume; - cs->mask =CLOCKSOURCE_MASK (sizeof (unsigned long ) *8 ); + cs->mask =CLOCKSOURCE_MASK (sizeof (u64) *8 ); cs->flags =CLOCK_SOURCE_IS_CONTINUOUS ; dev_info(&ch->cmt->pdev->dev, "ch%u: used as clock source\n",
Signature · 1 line
2.7.4
PATCH 4/17 clocksource/drivers/sh_cmt: Properly line-wrap sh_cmt_of_table[] initializer
In reply to Fabrizio CastroFrom: Sergei Shtylyov <[email protected]>
commit eceb4c49aed0fafbc4967e788231b1eba42b7606 upstream.
There's no good reason for the sh_cmt_of_table[] initializer to violate the 80-column limit, especially after the commit 8d50e9476bb4 ("clocksource/drivers/sh_cmt: Mark "renesas,cmt-48-gen2" deprecated") partially fixed it -- fix the R-Car gen2 related entries as well.
--- drivers/clocksource/sh_cmt.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/clocksource/sh_cmt.c +8 -2
@@ -927,8 +927,14 @@ static const struct of_device_id sh_cmt_of_table[] __maybe_unused = { .compatible = "renesas,cmt-48-gen2", .data = &sh_cmt_info[SH_CMT0_RCAR_GEN2] }, - { .compatible = "renesas,rcar-gen2-cmt0", .data = &sh_cmt_info[SH_CMT0_RCAR_GEN2] }, - { .compatible = "renesas,rcar-gen2-cmt1", .data = &sh_cmt_info[SH_CMT1_RCAR_GEN2] }, + { + .compatible = "renesas,rcar-gen2-cmt0", + .data = &sh_cmt_info[SH_CMT0_RCAR_GEN2] + }, + { + .compatible = "renesas,rcar-gen2-cmt1", + .data = &sh_cmt_info[SH_CMT1_RCAR_GEN2] + }, { } };MODULE_DEVICE_TABLE (of, sh_cmt_of_table);
Signature · 1 line
2.7.4
PATCH 5/17 dt-bindings: timer: renesas: cmt: document R-Car gen3 support
In reply to Fabrizio CastroFrom: Sergei Shtylyov <[email protected]>
commit 9a199422b0d08efaaef2df006c34b0653591a4bf upstream.
Document support for the R-Car gen3 CMT types 0/1 bindings -- they seem to be the same CMT types 0/1 as in the R-Car gen2 SoCs.
Also document R8A779{7|8}0 bindings as these are the R-Car gen3 SoCs for which the initial support was done.
--- Documentation/devicetree/bindings/timer/renesas,cmt.txt | 7 +++++++ 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/timer/renesas,cmt.txt +7 -0
@@ -34,6 +34,10 @@ Required Properties: - "renesas,r8a7793-cmt1" for the 48-bit CMT1 device included in r8a7793. - "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,r8a77970-cmt0" for the 32-bit CMT0 device included in r8a77970. + - "renesas,r8a77970-cmt1" for the 48-bit CMT1 device 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,rcar-gen2-cmt0" for 32-bit CMT0 devices included in R-Car Gen2 and RZ/G1.
@@ -41,6 +45,9 @@ Required Properties: and RZ/G1. These are fallbacks for r8a73a4, R-Car Gen2 and RZ/G1 entries listed above. + - "renesas,rcar-gen3-cmt0" for 32-bit CMT0 devices included in R-Car Gen3. + - "renesas,rcar-gen3-cmt1" for 48-bit CMT1 devices included in R-Car Gen3. + These are fallbacks for R-Car Gen3 entries listed above. - reg: base address and length of the registers block for the timer module. - interrupts: interrupt-specifier for the timer, one per channel.
Signature · 1 line
2.7.4
PATCH 6/17 clocksource/drivers/sh_cmt: Add R-Car gen3 support
In reply to Fabrizio CastroFrom: Sergei Shtylyov <[email protected]>
commit ac142a7fd291f4230923f221a594ce0281a96a72 upstream.
Add support for the R-Car gen3 CMT types 0/1 -- they seem to be the same CMT types 0/1 as in R-Car gen2 SoCs.
--- drivers/clocksource/sh_cmt.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/clocksource/sh_cmt.c +8 -0
@@ -935,6 +935,14 @@ static const struct of_device_id sh_cmt_of_table[] __maybe_unused = { .compatible = "renesas,rcar-gen2-cmt1", .data = &sh_cmt_info[SH_CMT1_RCAR_GEN2] }, + { + .compatible = "renesas,rcar-gen3-cmt0", + .data = &sh_cmt_info[SH_CMT0_RCAR_GEN2] + }, + { + .compatible = "renesas,rcar-gen3-cmt1", + .data = &sh_cmt_info[SH_CMT1_RCAR_GEN2] + }, { } };MODULE_DEVICE_TABLE (of, sh_cmt_of_table);
Signature · 1 line
2.7.4
PATCH 7/17 dt-bindings: timer: renesas, cmt: Document r8a774a1 CMT support
In reply to Fabrizio CastroFrom: Biju Das <[email protected]>
commit e5a805202c8ebb3b27cd8ad1b227158ae9cb9464 upstream.
Document SoC specific bindings for RZ/G2M (r8a774a1) SoC.
--- Documentation/devicetree/bindings/timer/renesas,cmt.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/timer/renesas,cmt.txt +8 -3
@@ -26,6 +26,8 @@ Required Properties: - "renesas,r8a7743-cmt1" for the 48-bit CMT1 device included in r8a7743. - "renesas,r8a7745-cmt0" for the 32-bit CMT0 device included in r8a7745. - "renesas,r8a7745-cmt1" for the 48-bit CMT1 device included in r8a7745. + - "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,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.
@@ -45,9 +47,12 @@ Required Properties: and RZ/G1. These are fallbacks for r8a73a4, R-Car Gen2 and RZ/G1 entries listed above. - - "renesas,rcar-gen3-cmt0" for 32-bit CMT0 devices included in R-Car Gen3. - - "renesas,rcar-gen3-cmt1" for 48-bit CMT1 devices included in R-Car Gen3. - These are fallbacks for R-Car Gen3 entries 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 + and RZ/G2. + These are fallbacks for R-Car Gen3 and RZ/G2 entries listed + above. - reg: base address and length of the registers block for the timer module. - interrupts: interrupt-specifier for the timer, one per channel.
Signature · 1 line
2.7.4
PATCH 8/17 dt-bindings: timer: renesas, cmt: Document r8a774c0 CMT support
In reply to Fabrizio CastroFrom: Biju Das <[email protected]>
commit 8743dcf66981ad6b6457356f723f7048ddff6ac8 upstream.
Document SoC specific bindings for RZ/G2E (r8a774c0) SoC.
--- Documentation/devicetree/bindings/timer/renesas,cmt.txt | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/timer/renesas,cmt.txt +2 -0
@@ -28,6 +28,8 @@ Required Properties: - "renesas,r8a7745-cmt1" for the 48-bit CMT1 device included in r8a7745. - "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,r8a774c0-cmt0" for the 32-bit CMT0 device included in r8a774c0. + - "renesas,r8a774c0-cmt1" for the 48-bit CMT1 device 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.
Signature · 1 line
2.7.4
PATCH 9/17 arm64: dts: renesas: r8a774c0: Add CMT device nodes
In reply to Fabrizio CastroFrom: Biju Das <[email protected]>
commit fa930bb65cf930c48efc01cc90f928a8db99fa94 upstream.
This patch adds CMT{0|1|2|3} device nodes for r8a774c0 SoC.
--- arch/arm64/boot/dts/renesas/r8a774c0.dtsi | 70 +++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+)
arch/arm64/boot/dts/renesas/r8a774c0.dtsi +70 -0
@@ -234,6 +234,76 @@ reg = <0 0xe6060000 0 0x508>; }; + cmt0: timer at e60f0000 { + compatible = "renesas,r8a774c0-cmt0", + "renesas,rcar-gen3-cmt0"; + reg = <0 0xe60f0000 0 0x1004>; + interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 303>; + clock-names = "fck"; + power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>; + resets = <&cpg 303>; + status = "disabled"; + }; + + cmt1: timer at e6130000 { + compatible = "renesas,r8a774c0-cmt1", + "renesas,rcar-gen3-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 302>; + clock-names = "fck"; + power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>; + resets = <&cpg 302>; + status = "disabled"; + }; + + cmt2: timer at e6140000 { + compatible = "renesas,r8a774c0-cmt1", + "renesas,rcar-gen3-cmt1"; + reg = <0 0xe6140000 0 0x1004>; + interrupts = <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 301>; + clock-names = "fck"; + power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>; + resets = <&cpg 301>; + status = "disabled"; + }; + + cmt3: timer at e6148000 { + compatible = "renesas,r8a774c0-cmt1", + "renesas,rcar-gen3-cmt1"; + reg = <0 0xe6148000 0 0x1004>; + interrupts = <GIC_SPI 470 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 471 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 472 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 473 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 474 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 475 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 476 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 477 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 300>; + clock-names = "fck"; + power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>; + resets = <&cpg 300>; + status = "disabled"; + }; + cpg: clock-controller at e6150000 { compatible = "renesas,r8a774c0-cpg-mssr"; reg = <0 0xe6150000 0 0x1000>;
Signature · 1 line
2.7.4
PATCH 9/17 arm64: dts: renesas: r8a774c0: Add CMT device nodes
Hi!
Quoted 5 lines
From: Biju Das <[email protected]>
commit
fa930bb65cf930c48efc01cc90f928a8db99fa94upstream.This patch adds CMT{0|1|2|3} device nodes for r8a774c0 SoC.
I could not apply this, as arch/arm64/boot/dts/renesas/r8a774c0.dtsi does not exist in my tree.
Plus, you are pushing spdx comment changes. I guess it is ok if it makes your life easier, but...
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 9/17 arm64: dts: renesas: r8a774c0: Add CMT device nodes
Hi, all.
Quoted 8 lines
Quoted 5 lines
From: Biju Das <[email protected]>
commit
fa930bb65cf930c48efc01cc90f928a8db99fa94upstream.This patch adds CMT{0|1|2|3} device nodes for r8a774c0 SoC.
I could not apply this, as
arch/arm64/boot/dts/renesas/r8a774c0.dtsidoes not exist in my tree.
This was depended patch in charge.
I already applied and push to linux-4.19.y-cip branch.
Best regards,
Nobuhiro
________________________________________
???: cip-dev-bounces at lists.cip-project.org <[email protected]> ? Pavel Machek <[email protected]> ?????? ????: 2019?4?10? 5:55
??: Fabrizio Castro
CC: cip-dev at lists.cip-project.org; Biju Das
??: Re: [cip-dev] [PATCH 4.19.y 09/17] arm64: dts: renesas: r8a774c0: Add CMT device nodes
Hi!
Quoted 5 lines
From: Biju Das <[email protected]>
commit
fa930bb65cf930c48efc01cc90f928a8db99fa94upstream.This patch adds CMT{0|1|2|3} device nodes for r8a774c0 SoC.
I could not apply this, as arch/arm64/boot/dts/renesas/r8a774c0.dtsi does not exist in my tree.
Plus, you are pushing spdx comment changes. I guess it is ok if it makes your life easier, but...
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
_______________________________________________
cip-dev mailing list
cip-dev at lists.cip-project.org
https://lists.cip-project.org/mailman/listinfo/cip-dev
PATCH 10/17 clk: renesas: r8a774c0: Add missing CANFD clock
In reply to Fabrizio Castrocommit 2a6efbc6da5d248c4fbe7fdb7de7f3eff1de95a4 upstream.
This patch adds the missing CANFD clock to the r8a774c0 specific clock driver.
--- drivers/clk/renesas/r8a774c0-cpg-mssr.c | 4 ++++ include/dt-bindings/clock/r8a774c0-cpg-mssr.h | 1 + 2 files changed, 5 insertions(+)
drivers/clk/renesas/r8a774c0-cpg-mssr.c +4 -0
@@ -33,6 +33,7 @@ enum clk_ids {CLK_PLL1 ,CLK_PLL3 ,CLK_PLL0D4 , +CLK_PLL0D6 ,CLK_PLL0D8 ,CLK_PLL0D20 , CLK_PLL0D24,
@@ -61,6 +62,7 @@ static const struct cpg_core_clk r8a774c0_core_clks[] __initconst = {DEF_FIXED (".pll0" ,CLK_PLL0 ,CLK_MAIN ,1 ,100 ),DEF_FIXED (".pll0d4" ,CLK_PLL0D4 ,CLK_PLL0 ,4 ,1 ), +DEF_FIXED (".pll0d6" ,CLK_PLL0D6 ,CLK_PLL0 ,6 ,1 ),DEF_FIXED (".pll0d8" ,CLK_PLL0D8 ,CLK_PLL0 ,8 ,1 ),DEF_FIXED (".pll0d20" ,CLK_PLL0D20 ,CLK_PLL0 ,20 ,1 ), DEF_FIXED(".pll0d24", CLK_PLL0D24, CLK_PLL0, 24, 1),
@@ -112,6 +114,7 @@ static const struct cpg_core_clk r8a774c0_core_clks[] __initconst = {DEF_GEN3_PE ("s3d2c" ,R8A774C0_CLK_S3D2C ,CLK_S3 ,2 ,CLK_PE ,2 ),DEF_GEN3_PE ("s3d4c" ,R8A774C0_CLK_S3D4C ,CLK_S3 ,4 ,CLK_PE ,4 ), +DEF_DIV6P1 ("canfd" ,R8A774C0_CLK_CANFD ,CLK_PLL0D6 ,0x244 ),DEF_DIV6P1 ("csi0" ,R8A774C0_CLK_CSI0 ,CLK_PLL1D2 ,0x00c ), DEF_DIV6P1("mso", R8A774C0_CLK_MSO, CLK_PLL1D2, 0x014),
@@ -187,6 +190,7 @@ static const struct mssr_mod_clk r8a774c0_mod_clks[] __initconst = {DEF_MOD ("gpio2" ,910 ,R8A774C0_CLK_S3D4 ),DEF_MOD ("gpio1" ,911 ,R8A774C0_CLK_S3D4 ),DEF_MOD ("gpio0" ,912 ,R8A774C0_CLK_S3D4 ), +DEF_MOD ("can-fd" ,914 ,R8A774C0_CLK_S3D2 ),DEF_MOD ("can-if1" ,915 ,R8A774C0_CLK_S3D4 ),DEF_MOD ("can-if0" ,916 ,R8A774C0_CLK_S3D4 ), DEF_MOD("i2c6", 918, R8A774C0_CLK_S3D2),
include/dt-bindings/clock/r8a774c0-cpg-mssr.h +1 -0
@@ -56,5 +56,6 @@#define R8A774C0_CLK_CSI0 45#define R8A774C0_CLK_CP 46#define R8A774C0_CLK_CPEX 47 +#define R8A774C0_CLK_CANFD 48#endif /* __DT_BINDINGS_CLOCK_R8A774C0_CPG_MSSR_H__ */
Signature · 1 line
2.7.4
PATCH 11/17 clk: renesas: r8a774c0: Correct parent clock of DU
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit d9286d9743b6e8cfbf1a13f8db84e9c65c0b09c7 upstream.
According to the RZ/G Series, 2nd Generation Hardware Manual Rev 0.61, the parent clock of the DU module clocks on RZ/G2E is S1D1.
--- drivers/clk/renesas/r8a774c0-cpg-mssr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/renesas/r8a774c0-cpg-mssr.c +2 -2
@@ -175,8 +175,8 @@ static const struct mssr_mod_clk r8a774c0_mod_clks[] __initconst = {DEF_MOD ("ehci0" ,703 ,R8A774C0_CLK_S3D4 ),DEF_MOD ("hsusb" ,704 ,R8A774C0_CLK_S3D4 ),DEF_MOD ("csi40" ,716 ,R8A774C0_CLK_CSI0 ), -DEF_MOD ("du1" ,723 ,R8A774C0_CLK_S2D1 ), -DEF_MOD ("du0" ,724 ,R8A774C0_CLK_S2D1 ), +DEF_MOD ("du1" ,723 ,R8A774C0_CLK_S1D1 ), +DEF_MOD ("du0" ,724 ,R8A774C0_CLK_S1D1 ),DEF_MOD ("lvds" ,727 ,R8A774C0_CLK_S2D1 ), DEF_MOD("vin5", 806, R8A774C0_CLK_S1D2),
Signature · 1 line
2.7.4
PATCH 12/17 clk: renesas: r8a774c0: Add TMU clock
In reply to Fabrizio CastroFrom: Biju Das <[email protected]>
commit d1de227de8145e661e940377e050286098197eeb upstream.
This patch adds the TMU clocks to the R8A774C0 SoC.
--- drivers/clk/renesas/r8a774c0-cpg-mssr.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/clk/renesas/r8a774c0-cpg-mssr.c +5 -0
@@ -122,6 +122,11 @@ static const struct cpg_core_clk r8a774c0_core_clks[] __initconst = { };static const struct mssr_mod_clk r8a774c0_mod_clks[]__initconst = { +DEF_MOD ("tmu4" ,121 ,R8A774C0_CLK_S0D6C ), +DEF_MOD ("tmu3" ,122 ,R8A774C0_CLK_S3D2C ), +DEF_MOD ("tmu2" ,123 ,R8A774C0_CLK_S3D2C ), +DEF_MOD ("tmu1" ,124 ,R8A774C0_CLK_S3D2C ), +DEF_MOD ("tmu0" ,125 ,R8A774C0_CLK_CP ),DEF_MOD ("scif5" ,202 ,R8A774C0_CLK_S3D4C ),DEF_MOD ("scif4" ,203 ,R8A774C0_CLK_S3D4C ),DEF_MOD ("scif3" ,204 ,R8A774C0_CLK_S3D4C ),
Signature · 1 line
2.7.4
PATCH 13/17 clk: renesas: r8a774c0: Fix LAST_DT_CORE_CLK
In reply to Fabrizio Castrocommit e61b30bb34b6206f76e623269a41b65cd3989fff upstream.
Enum LAST_DT_CORE_CLK needs updating as R8A774C0_CLK_CANFD was recently added and it's the core clock with the highest index.
--- drivers/clk/renesas/r8a774c0-cpg-mssr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/renesas/r8a774c0-cpg-mssr.c +1 -1
@@ -22,7 +22,7 @@enum clk_ids {/* Core Clock Outputs exported to DT */ -LAST_DT_CORE_CLK =R8A774C0_CLK_CPEX , +LAST_DT_CORE_CLK =R8A774C0_CLK_CANFD ,/* External Input Clocks */ CLK_EXTAL ,
Signature · 1 line
2.7.4
PATCH 14/17 dt-bindings: timer: renesas: tmu: Document r8a774c0 bindings
In reply to Fabrizio CastroFrom: Biju Das <[email protected]>
commit 29f970cf670f12d72580662b2f291cf2dc86aaf5 upstream.
Document RZ/G2E (R8A774C0) SoC in the Renesas TMU bindings.
--- Documentation/devicetree/bindings/timer/renesas,tmu.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/timer/renesas,tmu.txt +1 -0
@@ -10,6 +10,7 @@ Required Properties: - compatible: must contain one or more of the following: - "renesas,tmu-r8a7740" for the r8a7740 TMU + - "renesas,tmu-r8a774c0" for the r8a774C0 TMU - "renesas,tmu-r8a7778" for the r8a7778 TMU - "renesas,tmu-r8a7779" for the r8a7779 TMU - "renesas,tmu" for any TMU.
Signature · 1 line
2.7.4
PATCH 15/17 arm64: dts: renesas: r8a774c0: Add TMU device nodes
In reply to Fabrizio Castrocommit 2262798c002f9d106d7903a067c59474c59850d1 upstream.
This patch adds TMU{0|1|2|3|4} device nodes for r8a774c0 SoC.
--- arch/arm64/boot/dts/renesas/r8a774c0.dtsi | 65 +++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+)
arch/arm64/boot/dts/renesas/r8a774c0.dtsi +65 -0
@@ -484,6 +484,71 @@ status = "disabled"; }; + tmu0: timer at e61e0000 { + compatible = "renesas,tmu-r8a774c0", "renesas,tmu"; + reg = <0 0xe61e0000 0 0x30>; + interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 125>; + clock-names = "fck"; + power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>; + resets = <&cpg 125>; + status = "disabled"; + }; + + tmu1: timer at e6fc0000 { + compatible = "renesas,tmu-r8a774c0", "renesas,tmu"; + reg = <0 0xe6fc0000 0 0x30>; + interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 124>; + clock-names = "fck"; + power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>; + resets = <&cpg 124>; + status = "disabled"; + }; + + tmu2: timer at e6fd0000 { + compatible = "renesas,tmu-r8a774c0", "renesas,tmu"; + reg = <0 0xe6fd0000 0 0x30>; + interrupts = <GIC_SPI 303 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 304 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 123>; + clock-names = "fck"; + power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>; + resets = <&cpg 123>; + status = "disabled"; + }; + + tmu3: timer at e6fe0000 { + compatible = "renesas,tmu-r8a774c0", "renesas,tmu"; + reg = <0 0xe6fe0000 0 0x30>; + interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 122>; + clock-names = "fck"; + power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>; + resets = <&cpg 122>; + status = "disabled"; + }; + + tmu4: timer at ffc00000 { + compatible = "renesas,tmu-r8a774c0", "renesas,tmu"; + reg = <0 0xffc00000 0 0x30>; + interrupts = <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 121>; + clock-names = "fck"; + power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>; + resets = <&cpg 121>; + status = "disabled"; + }; + hscif0: serial at e6540000 { compatible = "renesas,hscif-r8a774c0", "renesas,rcar-gen3-hscif",
Signature · 1 line
2.7.4
PATCH 16/17 clocksource/drivers/sh_tmu: Convert to SPDX identifiers
In reply to Fabrizio CastroFrom: Kuninori Morimoto <[email protected]>
commit 0b9294fe8dca4ab500e955cf06445134d228e493 upstream.
This patch updates license to use SPDX-License-Identifier instead of verbose license text.
--- drivers/clocksource/sh_tmu.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/clocksource/sh_tmu.c +1 -9
@@ -1,16 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0 /* * SuperH Timer Support - TMU * * Copyright (C) 2009 Magnus Damm -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. */ #include <linux/clk.h>
Signature · 1 line
2.7.4
PATCH 17/17 arm64: enable CMT/TMU support for Renesas SoC
In reply to Fabrizio CastroFrom: Sergei Shtylyov <[email protected]>
commit c1801ad028456267dde2111e470ac43f7882debf upstream.
Renesas R-Car gen3 SoCs have both CMT and TMU timers, so we have to enable building them in Kconfig.platforms (as they don't normally have the prompts in Kconfig).
--- arch/arm64/Kconfig.platforms | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/Kconfig.platforms +2 -0
@@ -183,6 +183,8 @@ config ARCH_RENESAS select PM_GENERIC_DOMAINS select RENESAS_IRQC select SOC_BUS + select SYS_SUPPORTS_SH_CMT + select SYS_SUPPORTS_SH_TMU help This enables support for the ARMv8 based Renesas SoCs.
Signature · 1 line
2.7.4