* [PATCH v4 01/13] spi: rzv2h-rspi: make resets optional
2025-11-19 16:14 [PATCH v4 00/13] Add RSPI support for RZ/T2H and RZ/N2H Cosmin Tanislav
@ 2025-11-19 16:14 ` Cosmin Tanislav
2025-11-19 16:14 ` [PATCH v4 02/13] spi: rzv2h-rspi: make FIFO size chip-specific Cosmin Tanislav
` (13 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Cosmin Tanislav @ 2025-11-19 16:14 UTC (permalink / raw)
To: Fabrizio Castro, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Magnus Damm, Philipp Zabel
Cc: linux-spi, linux-renesas-soc, devicetree, linux-kernel, Cosmin Tanislav
The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs don't have
reset lines for the SPI peripheral, make them optional to prepare for
adding support for them.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
V4:
* no changes
V3:
* no changes
V2:
* no changes
drivers/spi/spi-rzv2h-rspi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-rzv2h-rspi.c b/drivers/spi/spi-rzv2h-rspi.c
index dcc431ba60a9..09b9362e9b1f 100644
--- a/drivers/spi/spi-rzv2h-rspi.c
+++ b/drivers/spi/spi-rzv2h-rspi.c
@@ -384,8 +384,8 @@ static int rzv2h_rspi_probe(struct platform_device *pdev)
rspi->resets[0].id = "presetn";
rspi->resets[1].id = "tresetn";
- ret = devm_reset_control_bulk_get_exclusive(dev, RSPI_RESET_NUM,
- rspi->resets);
+ ret = devm_reset_control_bulk_get_optional_exclusive(dev, RSPI_RESET_NUM,
+ rspi->resets);
if (ret)
return dev_err_probe(dev, ret, "cannot get resets\n");
--
2.52.0
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH v4 02/13] spi: rzv2h-rspi: make FIFO size chip-specific
2025-11-19 16:14 [PATCH v4 00/13] Add RSPI support for RZ/T2H and RZ/N2H Cosmin Tanislav
2025-11-19 16:14 ` [PATCH v4 01/13] spi: rzv2h-rspi: make resets optional Cosmin Tanislav
@ 2025-11-19 16:14 ` Cosmin Tanislav
2025-11-19 16:14 ` [PATCH v4 03/13] spi: rzv2h-rspi: make clocks chip-specific Cosmin Tanislav
` (12 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Cosmin Tanislav @ 2025-11-19 16:14 UTC (permalink / raw)
To: Fabrizio Castro, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Magnus Damm, Philipp Zabel
Cc: linux-spi, linux-renesas-soc, devicetree, linux-kernel, Cosmin Tanislav
The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs have a
different FIFO size compared to RZ/V2H. Add a chip-specific structure,
and set the FIFO size inside it, to prepare for adding support for them.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
V4:
* no changes
V3:
* no changes
V2:
* no changes
drivers/spi/spi-rzv2h-rspi.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/spi/spi-rzv2h-rspi.c b/drivers/spi/spi-rzv2h-rspi.c
index 09b9362e9b1f..7a7a576c17dd 100644
--- a/drivers/spi/spi-rzv2h-rspi.c
+++ b/drivers/spi/spi-rzv2h-rspi.c
@@ -58,7 +58,6 @@
/* Register SPDCR2 */
#define RSPI_SPDCR2_TTRG GENMASK(11, 8)
#define RSPI_SPDCR2_RTRG GENMASK(3, 0)
-#define RSPI_FIFO_SIZE 16
/* Register SPSR */
#define RSPI_SPSR_SPRF BIT(15)
@@ -69,9 +68,14 @@
#define RSPI_RESET_NUM 2
#define RSPI_CLK_NUM 3
+struct rzv2h_rspi_info {
+ unsigned int fifo_size;
+};
+
struct rzv2h_rspi_priv {
struct reset_control_bulk_data resets[RSPI_RESET_NUM];
struct spi_controller *controller;
+ const struct rzv2h_rspi_info *info;
void __iomem *base;
struct clk *tclk;
wait_queue_head_t wait;
@@ -305,7 +309,7 @@ static int rzv2h_rspi_prepare_message(struct spi_controller *ctlr,
writeb(0, rspi->base + RSPI_SSLP);
/* Setup FIFO thresholds */
- conf16 = FIELD_PREP(RSPI_SPDCR2_TTRG, RSPI_FIFO_SIZE - 1);
+ conf16 = FIELD_PREP(RSPI_SPDCR2_TTRG, rspi->info->fifo_size - 1);
conf16 |= FIELD_PREP(RSPI_SPDCR2_RTRG, 0);
writew(conf16, rspi->base + RSPI_SPDCR2);
@@ -362,6 +366,8 @@ static int rzv2h_rspi_probe(struct platform_device *pdev)
rspi->controller = controller;
+ rspi->info = device_get_match_data(dev);
+
rspi->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(rspi->base))
return PTR_ERR(rspi->base);
@@ -445,8 +451,12 @@ static void rzv2h_rspi_remove(struct platform_device *pdev)
reset_control_bulk_assert(RSPI_RESET_NUM, rspi->resets);
}
+static const struct rzv2h_rspi_info rzv2h_info = {
+ .fifo_size = 16,
+};
+
static const struct of_device_id rzv2h_rspi_match[] = {
- { .compatible = "renesas,r9a09g057-rspi" },
+ { .compatible = "renesas,r9a09g057-rspi", &rzv2h_info },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, rzv2h_rspi_match);
--
2.52.0
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH v4 03/13] spi: rzv2h-rspi: make clocks chip-specific
2025-11-19 16:14 [PATCH v4 00/13] Add RSPI support for RZ/T2H and RZ/N2H Cosmin Tanislav
2025-11-19 16:14 ` [PATCH v4 01/13] spi: rzv2h-rspi: make resets optional Cosmin Tanislav
2025-11-19 16:14 ` [PATCH v4 02/13] spi: rzv2h-rspi: make FIFO size chip-specific Cosmin Tanislav
@ 2025-11-19 16:14 ` Cosmin Tanislav
2025-11-19 16:14 ` [PATCH v4 04/13] spi: rzv2h-rspi: move register writes out of rzv2h_rspi_setup_clock() Cosmin Tanislav
` (11 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Cosmin Tanislav @ 2025-11-19 16:14 UTC (permalink / raw)
To: Fabrizio Castro, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Magnus Damm, Philipp Zabel
Cc: linux-spi, linux-renesas-soc, devicetree, linux-kernel, Cosmin Tanislav
The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs have
different clocks compared to RZ/V2H. Set the number of clocks and the
name of the transfer clock in the chip-specific structure to prepare for
adding support for them.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
V4:
* no changes
V3:
* no changes
V2:
* no changes
drivers/spi/spi-rzv2h-rspi.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/spi/spi-rzv2h-rspi.c b/drivers/spi/spi-rzv2h-rspi.c
index 7a7a576c17dd..a1f17ec8727b 100644
--- a/drivers/spi/spi-rzv2h-rspi.c
+++ b/drivers/spi/spi-rzv2h-rspi.c
@@ -66,10 +66,11 @@
#define RSPI_SPSRC_CLEAR 0xfd80
#define RSPI_RESET_NUM 2
-#define RSPI_CLK_NUM 3
struct rzv2h_rspi_info {
+ const char *tclk_name;
unsigned int fifo_size;
+ unsigned int num_clks;
};
struct rzv2h_rspi_priv {
@@ -373,11 +374,11 @@ static int rzv2h_rspi_probe(struct platform_device *pdev)
return PTR_ERR(rspi->base);
ret = devm_clk_bulk_get_all_enabled(dev, &clks);
- if (ret != RSPI_CLK_NUM)
+ if (ret != rspi->info->num_clks)
return dev_err_probe(dev, ret >= 0 ? -EINVAL : ret,
"cannot get clocks\n");
- for (i = 0; i < RSPI_CLK_NUM; i++) {
- if (!strcmp(clks[i].id, "tclk")) {
+ for (i = 0; i < rspi->info->num_clks; i++) {
+ if (!strcmp(clks[i].id, rspi->info->tclk_name)) {
rspi->tclk = clks[i].clk;
break;
}
@@ -452,7 +453,9 @@ static void rzv2h_rspi_remove(struct platform_device *pdev)
}
static const struct rzv2h_rspi_info rzv2h_info = {
+ .tclk_name = "tclk",
.fifo_size = 16,
+ .num_clks = 3,
};
static const struct of_device_id rzv2h_rspi_match[] = {
--
2.52.0
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH v4 04/13] spi: rzv2h-rspi: move register writes out of rzv2h_rspi_setup_clock()
2025-11-19 16:14 [PATCH v4 00/13] Add RSPI support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (2 preceding siblings ...)
2025-11-19 16:14 ` [PATCH v4 03/13] spi: rzv2h-rspi: make clocks chip-specific Cosmin Tanislav
@ 2025-11-19 16:14 ` Cosmin Tanislav
2025-11-19 16:14 ` [PATCH v4 05/13] spi: rzv2h-rspi: avoid recomputing transfer frequency Cosmin Tanislav
` (10 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Cosmin Tanislav @ 2025-11-19 16:14 UTC (permalink / raw)
To: Fabrizio Castro, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Magnus Damm, Philipp Zabel
Cc: linux-spi, linux-renesas-soc, devicetree, linux-kernel, Cosmin Tanislav
In preparation for caching the last requested transfer frequency, move
register writes outside of rzv2h_rspi_setup_clock().
The transfer list is iterated to determine the speed of the transfer
and the bits per word.
The speed of the transfer is used to compute SPR and BRDV inside
rzv2h_rspi_setup_clock().
BRDV and SPB are stored in the SPCMD register.
Move the transfer iteration earlier, move the SPR and BRDV writing out
of rzv2h_rspi_setup_clock(), consolidate writing BRDV and SPB into the
initial write to the SPCMD register.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
V4:
* no changes
V3:
* no changes
V2:
* no changes
drivers/spi/spi-rzv2h-rspi.c | 45 ++++++++++++++++++++----------------
1 file changed, 25 insertions(+), 20 deletions(-)
diff --git a/drivers/spi/spi-rzv2h-rspi.c b/drivers/spi/spi-rzv2h-rspi.c
index a1f17ec8727b..f02f25b98ec6 100644
--- a/drivers/spi/spi-rzv2h-rspi.c
+++ b/drivers/spi/spi-rzv2h-rspi.c
@@ -83,6 +83,8 @@ struct rzv2h_rspi_priv {
unsigned int bytes_per_word;
u32 freq;
u16 status;
+ u8 spr;
+ u8 brdv;
};
#define RZV2H_RSPI_TX(func, type) \
@@ -263,8 +265,8 @@ static u32 rzv2h_rspi_setup_clock(struct rzv2h_rspi_priv *rspi, u32 hz)
return 0;
clock_found:
- rzv2h_rspi_reg_rmw(rspi, RSPI_SPCMD, RSPI_SPCMD_BRDV, brdv);
- writeb(spr, rspi->base + RSPI_SPBR);
+ rspi->spr = spr;
+ rspi->brdv = brdv;
return rzv2h_rspi_calc_bitrate(tclk_rate, spr, brdv);
}
@@ -283,6 +285,25 @@ static int rzv2h_rspi_prepare_message(struct spi_controller *ctlr,
/* Make sure SPCR.SPE is 0 before amending the configuration */
rzv2h_rspi_spe_disable(rspi);
+ list_for_each_entry(xfer, &message->transfers, transfer_list) {
+ if (!xfer->speed_hz)
+ continue;
+
+ speed_hz = min(xfer->speed_hz, speed_hz);
+ bits_per_word = xfer->bits_per_word;
+ }
+
+ if (speed_hz == U32_MAX)
+ return -EINVAL;
+
+ rspi->bytes_per_word = roundup_pow_of_two(BITS_TO_BYTES(bits_per_word));
+
+ rspi->freq = rzv2h_rspi_setup_clock(rspi, speed_hz);
+ if (!rspi->freq)
+ return -EINVAL;
+
+ writeb(rspi->spr, rspi->base + RSPI_SPBR);
+
/* Configure the device to work in "host" mode */
conf32 = RSPI_SPCR_MSTR;
@@ -301,6 +322,8 @@ static int rzv2h_rspi_prepare_message(struct spi_controller *ctlr,
conf32 = FIELD_PREP(RSPI_SPCMD_CPOL, !!(spi->mode & SPI_CPOL));
conf32 |= FIELD_PREP(RSPI_SPCMD_CPHA, !!(spi->mode & SPI_CPHA));
conf32 |= FIELD_PREP(RSPI_SPCMD_LSBF, !!(spi->mode & SPI_LSB_FIRST));
+ conf32 |= FIELD_PREP(RSPI_SPCMD_SPB, bits_per_word - 1);
+ conf32 |= FIELD_PREP(RSPI_SPCMD_BRDV, rspi->brdv);
conf32 |= FIELD_PREP(RSPI_SPCMD_SSLKP, 1);
conf32 |= FIELD_PREP(RSPI_SPCMD_SSLA, spi_get_chipselect(spi, 0));
writel(conf32, rspi->base + RSPI_SPCMD);
@@ -316,24 +339,6 @@ static int rzv2h_rspi_prepare_message(struct spi_controller *ctlr,
rzv2h_rspi_clear_fifos(rspi);
- list_for_each_entry(xfer, &message->transfers, transfer_list) {
- if (!xfer->speed_hz)
- continue;
-
- speed_hz = min(xfer->speed_hz, speed_hz);
- bits_per_word = xfer->bits_per_word;
- }
-
- if (speed_hz == U32_MAX)
- return -EINVAL;
-
- rspi->bytes_per_word = roundup_pow_of_two(BITS_TO_BYTES(bits_per_word));
- rzv2h_rspi_reg_rmw(rspi, RSPI_SPCMD, RSPI_SPCMD_SPB, bits_per_word - 1);
-
- rspi->freq = rzv2h_rspi_setup_clock(rspi, speed_hz);
- if (!rspi->freq)
- return -EINVAL;
-
rzv2h_rspi_spe_enable(rspi);
return 0;
--
2.52.0
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH v4 05/13] spi: rzv2h-rspi: avoid recomputing transfer frequency
2025-11-19 16:14 [PATCH v4 00/13] Add RSPI support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (3 preceding siblings ...)
2025-11-19 16:14 ` [PATCH v4 04/13] spi: rzv2h-rspi: move register writes out of rzv2h_rspi_setup_clock() Cosmin Tanislav
@ 2025-11-19 16:14 ` Cosmin Tanislav
2025-11-19 16:14 ` [PATCH v4 06/13] spi: rzv2h-rspi: make transfer clock rate finding chip-specific Cosmin Tanislav
` (9 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Cosmin Tanislav @ 2025-11-19 16:14 UTC (permalink / raw)
To: Fabrizio Castro, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Magnus Damm, Philipp Zabel
Cc: linux-spi, linux-renesas-soc, devicetree, linux-kernel, Cosmin Tanislav
Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs have a more
complicated algorithm for calculating the optimal SPI transfer frequency
compared to RZ/V2H, as the clock from which the SPI frequency is
generated supports multiple dividers.
Cache the requested transfer frequency and skip calling
rzv2h_rspi_setup_clock() if it matches the last used one to prepare for
adding support for variable clock frequency handling.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
V4:
* no changes
V3:
* no changes
V2:
* no changes
drivers/spi/spi-rzv2h-rspi.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/spi/spi-rzv2h-rspi.c b/drivers/spi/spi-rzv2h-rspi.c
index f02f25b98ec6..d7719f3c7b13 100644
--- a/drivers/spi/spi-rzv2h-rspi.c
+++ b/drivers/spi/spi-rzv2h-rspi.c
@@ -81,6 +81,7 @@ struct rzv2h_rspi_priv {
struct clk *tclk;
wait_queue_head_t wait;
unsigned int bytes_per_word;
+ u32 last_speed_hz;
u32 freq;
u16 status;
u8 spr;
@@ -298,9 +299,13 @@ static int rzv2h_rspi_prepare_message(struct spi_controller *ctlr,
rspi->bytes_per_word = roundup_pow_of_two(BITS_TO_BYTES(bits_per_word));
- rspi->freq = rzv2h_rspi_setup_clock(rspi, speed_hz);
- if (!rspi->freq)
- return -EINVAL;
+ if (speed_hz != rspi->last_speed_hz) {
+ rspi->freq = rzv2h_rspi_setup_clock(rspi, speed_hz);
+ if (!rspi->freq)
+ return -EINVAL;
+
+ rspi->last_speed_hz = speed_hz;
+ }
writeb(rspi->spr, rspi->base + RSPI_SPBR);
--
2.52.0
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH v4 06/13] spi: rzv2h-rspi: make transfer clock rate finding chip-specific
2025-11-19 16:14 [PATCH v4 00/13] Add RSPI support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (4 preceding siblings ...)
2025-11-19 16:14 ` [PATCH v4 05/13] spi: rzv2h-rspi: avoid recomputing transfer frequency Cosmin Tanislav
@ 2025-11-19 16:14 ` Cosmin Tanislav
2025-11-19 16:14 ` [PATCH v4 07/13] spi: rzv2h-rspi: add support for using PCLK for transfer clock Cosmin Tanislav
` (8 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Cosmin Tanislav @ 2025-11-19 16:14 UTC (permalink / raw)
To: Fabrizio Castro, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Magnus Damm, Philipp Zabel
Cc: linux-spi, linux-renesas-soc, devicetree, linux-kernel, Cosmin Tanislav
The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs have a more
complicated clocking setup for the SPI transfer clock than RZ/V2H, as
the clock from which it is generated supports multiple dividers.
To prepare for adding support for these SoCs, split out the logic for
finding the SPR and BRDV for a fixed clock into
rzv2h_rspi_find_rate_fixed(), and add and use a .find_tclk_rate()
callback into the chip-specific structure.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
V4:
* no changes
V3:
* no changes
V2:
* no changes
drivers/spi/spi-rzv2h-rspi.c | 62 ++++++++++++++++++++++++++++++------
1 file changed, 53 insertions(+), 9 deletions(-)
diff --git a/drivers/spi/spi-rzv2h-rspi.c b/drivers/spi/spi-rzv2h-rspi.c
index d7719f3c7b13..f59bcadf5e38 100644
--- a/drivers/spi/spi-rzv2h-rspi.c
+++ b/drivers/spi/spi-rzv2h-rspi.c
@@ -67,7 +67,18 @@
#define RSPI_RESET_NUM 2
+struct rzv2h_rspi_best_clock {
+ struct clk *clk;
+ unsigned long clk_rate;
+ unsigned long error;
+ u32 actual_hz;
+ u8 brdv;
+ u8 spr;
+};
+
struct rzv2h_rspi_info {
+ void (*find_tclk_rate)(struct clk *clk, u32 hz, u8 spr_min, u8 spr_max,
+ struct rzv2h_rspi_best_clock *best_clk);
const char *tclk_name;
unsigned int fifo_size;
unsigned int num_clks;
@@ -240,9 +251,13 @@ static inline u32 rzv2h_rspi_calc_bitrate(unsigned long tclk_rate, u8 spr,
return DIV_ROUND_UP(tclk_rate, (2 * (spr + 1) * (1 << brdv)));
}
-static u32 rzv2h_rspi_setup_clock(struct rzv2h_rspi_priv *rspi, u32 hz)
+static void rzv2h_rspi_find_rate_fixed(struct clk *clk, u32 hz,
+ u8 spr_min, u8 spr_max,
+ struct rzv2h_rspi_best_clock *best)
{
- unsigned long tclk_rate;
+ unsigned long clk_rate;
+ unsigned long error;
+ u32 actual_hz;
int spr;
u8 brdv;
@@ -255,21 +270,49 @@ static u32 rzv2h_rspi_setup_clock(struct rzv2h_rspi_priv *rspi, u32 hz)
* * n = SPR - is RSPI_SPBR.SPR (from 0 to 255)
* * N = BRDV - is RSPI_SPCMD.BRDV (from 0 to 3)
*/
- tclk_rate = clk_get_rate(rspi->tclk);
+ clk_rate = clk_get_rate(clk);
for (brdv = RSPI_SPCMD_BRDV_MIN; brdv <= RSPI_SPCMD_BRDV_MAX; brdv++) {
- spr = DIV_ROUND_UP(tclk_rate, hz * (1 << (brdv + 1)));
+ spr = DIV_ROUND_UP(clk_rate, hz * (1 << (brdv + 1)));
spr--;
- if (spr >= RSPI_SPBR_SPR_MIN && spr <= RSPI_SPBR_SPR_MAX)
+ if (spr >= spr_min && spr <= spr_max)
goto clock_found;
}
- return 0;
+ return;
clock_found:
- rspi->spr = spr;
- rspi->brdv = brdv;
+ actual_hz = rzv2h_rspi_calc_bitrate(clk_rate, spr, brdv);
+ error = abs((long)hz - (long)actual_hz);
- return rzv2h_rspi_calc_bitrate(tclk_rate, spr, brdv);
+ if (error >= best->error)
+ return;
+
+ *best = (struct rzv2h_rspi_best_clock) {
+ .clk = clk,
+ .clk_rate = clk_rate,
+ .error = error,
+ .actual_hz = actual_hz,
+ .brdv = brdv,
+ .spr = spr,
+ };
+}
+
+static u32 rzv2h_rspi_setup_clock(struct rzv2h_rspi_priv *rspi, u32 hz)
+{
+ struct rzv2h_rspi_best_clock best_clock = {
+ .error = ULONG_MAX,
+ };
+
+ rspi->info->find_tclk_rate(rspi->tclk, hz, RSPI_SPBR_SPR_MIN,
+ RSPI_SPBR_SPR_MAX, &best_clock);
+
+ if (!best_clock.clk_rate)
+ return -EINVAL;
+
+ rspi->spr = best_clock.spr;
+ rspi->brdv = best_clock.brdv;
+
+ return best_clock.actual_hz;
}
static int rzv2h_rspi_prepare_message(struct spi_controller *ctlr,
@@ -463,6 +506,7 @@ static void rzv2h_rspi_remove(struct platform_device *pdev)
}
static const struct rzv2h_rspi_info rzv2h_info = {
+ .find_tclk_rate = rzv2h_rspi_find_rate_fixed,
.tclk_name = "tclk",
.fifo_size = 16,
.num_clks = 3,
--
2.52.0
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH v4 07/13] spi: rzv2h-rspi: add support for using PCLK for transfer clock
2025-11-19 16:14 [PATCH v4 00/13] Add RSPI support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (5 preceding siblings ...)
2025-11-19 16:14 ` [PATCH v4 06/13] spi: rzv2h-rspi: make transfer clock rate finding chip-specific Cosmin Tanislav
@ 2025-11-19 16:14 ` Cosmin Tanislav
2025-11-19 16:14 ` [PATCH v4 08/13] spi: rzv2h-rspi: add support for variable " Cosmin Tanislav
` (7 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Cosmin Tanislav @ 2025-11-19 16:14 UTC (permalink / raw)
To: Fabrizio Castro, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Magnus Damm, Philipp Zabel
Cc: linux-spi, linux-renesas-soc, devicetree, linux-kernel, Cosmin Tanislav
The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs support
generating the SPI transfer clock from PCLK, with the quirk that SPR 0
is not supported, causing the highest achievable SPI transfer frequency
to be 31.25MHz.
Add support for generating the SPI transfer clock from PCLK.
Renesas RZ/V2H (R9A09G057) also has the BPEN bit used to enable this
option in the datasheet, but it is not explicitly documented and there's
no details about its limitations as there are on RZ/T2H.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
V4:
* no changes
V3:
* no changes
V2:
* no changes
drivers/spi/spi-rzv2h-rspi.c | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-rzv2h-rspi.c b/drivers/spi/spi-rzv2h-rspi.c
index f59bcadf5e38..e9d8ee919261 100644
--- a/drivers/spi/spi-rzv2h-rspi.c
+++ b/drivers/spi/spi-rzv2h-rspi.c
@@ -34,6 +34,7 @@
#define RSPI_SPFCR 0x6c
/* Register SPCR */
+#define RSPI_SPCR_BPEN BIT(31)
#define RSPI_SPCR_MSTR BIT(30)
#define RSPI_SPCR_SPRIE BIT(17)
#define RSPI_SPCR_SCKASE BIT(12)
@@ -41,6 +42,7 @@
/* Register SPBR */
#define RSPI_SPBR_SPR_MIN 0
+#define RSPI_SPBR_SPR_PCLK_MIN 1
#define RSPI_SPBR_SPR_MAX 255
/* Register SPCMD */
@@ -79,6 +81,8 @@ struct rzv2h_rspi_best_clock {
struct rzv2h_rspi_info {
void (*find_tclk_rate)(struct clk *clk, u32 hz, u8 spr_min, u8 spr_max,
struct rzv2h_rspi_best_clock *best_clk);
+ void (*find_pclk_rate)(struct clk *clk, u32 hz, u8 spr_low, u8 spr_high,
+ struct rzv2h_rspi_best_clock *best_clk);
const char *tclk_name;
unsigned int fifo_size;
unsigned int num_clks;
@@ -90,6 +94,7 @@ struct rzv2h_rspi_priv {
const struct rzv2h_rspi_info *info;
void __iomem *base;
struct clk *tclk;
+ struct clk *pclk;
wait_queue_head_t wait;
unsigned int bytes_per_word;
u32 last_speed_hz;
@@ -97,6 +102,7 @@ struct rzv2h_rspi_priv {
u16 status;
u8 spr;
u8 brdv;
+ bool use_pclk;
};
#define RZV2H_RSPI_TX(func, type) \
@@ -306,9 +312,18 @@ static u32 rzv2h_rspi_setup_clock(struct rzv2h_rspi_priv *rspi, u32 hz)
rspi->info->find_tclk_rate(rspi->tclk, hz, RSPI_SPBR_SPR_MIN,
RSPI_SPBR_SPR_MAX, &best_clock);
+ /*
+ * T2H and N2H can also use PCLK as a source, which is 125MHz, but not
+ * when both SPR and BRDV are 0.
+ */
+ if (best_clock.error && rspi->info->find_pclk_rate)
+ rspi->info->find_pclk_rate(rspi->pclk, hz, RSPI_SPBR_SPR_PCLK_MIN,
+ RSPI_SPBR_SPR_MAX, &best_clock);
+
if (!best_clock.clk_rate)
return -EINVAL;
+ rspi->use_pclk = best_clock.clk == rspi->pclk;
rspi->spr = best_clock.spr;
rspi->brdv = best_clock.brdv;
@@ -361,6 +376,9 @@ static int rzv2h_rspi_prepare_message(struct spi_controller *ctlr,
/* SPI receive buffer full interrupt enable */
conf32 |= RSPI_SPCR_SPRIE;
+ /* Bypass synchronization circuit */
+ conf32 |= FIELD_PREP(RSPI_SPCR_BPEN, rspi->use_pclk);
+
writel(conf32, rspi->base + RSPI_SPCR);
/* Use SPCMD0 only */
@@ -433,7 +451,9 @@ static int rzv2h_rspi_probe(struct platform_device *pdev)
for (i = 0; i < rspi->info->num_clks; i++) {
if (!strcmp(clks[i].id, rspi->info->tclk_name)) {
rspi->tclk = clks[i].clk;
- break;
+ } else if (rspi->info->find_pclk_rate &&
+ !strcmp(clks[i].id, "pclk")) {
+ rspi->pclk = clks[i].clk;
}
}
--
2.52.0
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH v4 08/13] spi: rzv2h-rspi: add support for variable transfer clock
2025-11-19 16:14 [PATCH v4 00/13] Add RSPI support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (6 preceding siblings ...)
2025-11-19 16:14 ` [PATCH v4 07/13] spi: rzv2h-rspi: add support for using PCLK for transfer clock Cosmin Tanislav
@ 2025-11-19 16:14 ` Cosmin Tanislav
2025-11-19 16:14 ` [PATCH v4 09/13] spi: rzv2h-rspi: add support for loopback mode Cosmin Tanislav
` (6 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Cosmin Tanislav @ 2025-11-19 16:14 UTC (permalink / raw)
To: Fabrizio Castro, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Magnus Damm, Philipp Zabel
Cc: linux-spi, linux-renesas-soc, devicetree, linux-kernel, Cosmin Tanislav
The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs have a more
complicated clocking setup for the SPI transfer clock than RZ/V2H, as
the clock from which it is generated supports multiple dividers.
To prepare for adding support for these SoCs, do the following changes.
Use the minimum frequency of SPI clock to calculate the SPI
controller's min_speed_hz, and the maximum frequency to calculate
max_speed_hz.
Apply the clock rate found by the .find_tclk_rate() to the found clock.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
V4:
* no changes
V3:
* no changes
V2:
* fix missing unwind goto quit_resets
drivers/spi/spi-rzv2h-rspi.c | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/drivers/spi/spi-rzv2h-rspi.c b/drivers/spi/spi-rzv2h-rspi.c
index e9d8ee919261..be45269e8853 100644
--- a/drivers/spi/spi-rzv2h-rspi.c
+++ b/drivers/spi/spi-rzv2h-rspi.c
@@ -308,6 +308,7 @@ static u32 rzv2h_rspi_setup_clock(struct rzv2h_rspi_priv *rspi, u32 hz)
struct rzv2h_rspi_best_clock best_clock = {
.error = ULONG_MAX,
};
+ int ret;
rspi->info->find_tclk_rate(rspi->tclk, hz, RSPI_SPBR_SPR_MIN,
RSPI_SPBR_SPR_MAX, &best_clock);
@@ -323,6 +324,10 @@ static u32 rzv2h_rspi_setup_clock(struct rzv2h_rspi_priv *rspi, u32 hz)
if (!best_clock.clk_rate)
return -EINVAL;
+ ret = clk_set_rate(best_clock.clk, best_clock.clk_rate);
+ if (ret)
+ return 0;
+
rspi->use_pclk = best_clock.clk == rspi->pclk;
rspi->spr = best_clock.spr;
rspi->brdv = best_clock.brdv;
@@ -426,8 +431,8 @@ static int rzv2h_rspi_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct rzv2h_rspi_priv *rspi;
struct clk_bulk_data *clks;
- unsigned long tclk_rate;
int irq_rx, ret, i;
+ long tclk_rate;
controller = devm_spi_alloc_host(dev, sizeof(*rspi));
if (!controller)
@@ -460,8 +465,6 @@ static int rzv2h_rspi_probe(struct platform_device *pdev)
if (!rspi->tclk)
return dev_err_probe(dev, -EINVAL, "Failed to get tclk\n");
- tclk_rate = clk_get_rate(rspi->tclk);
-
rspi->resets[0].id = "presetn";
rspi->resets[1].id = "tresetn";
ret = devm_reset_control_bulk_get_optional_exclusive(dev, RSPI_RESET_NUM,
@@ -493,9 +496,23 @@ static int rzv2h_rspi_probe(struct platform_device *pdev)
controller->unprepare_message = rzv2h_rspi_unprepare_message;
controller->num_chipselect = 4;
controller->transfer_one = rzv2h_rspi_transfer_one;
+
+ tclk_rate = clk_round_rate(rspi->tclk, 0);
+ if (tclk_rate < 0) {
+ ret = tclk_rate;
+ goto quit_resets;
+ }
+
controller->min_speed_hz = rzv2h_rspi_calc_bitrate(tclk_rate,
RSPI_SPBR_SPR_MAX,
RSPI_SPCMD_BRDV_MAX);
+
+ tclk_rate = clk_round_rate(rspi->tclk, ULONG_MAX);
+ if (tclk_rate < 0) {
+ ret = tclk_rate;
+ goto quit_resets;
+ }
+
controller->max_speed_hz = rzv2h_rspi_calc_bitrate(tclk_rate,
RSPI_SPBR_SPR_MIN,
RSPI_SPCMD_BRDV_MIN);
--
2.52.0
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH v4 09/13] spi: rzv2h-rspi: add support for loopback mode
2025-11-19 16:14 [PATCH v4 00/13] Add RSPI support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (7 preceding siblings ...)
2025-11-19 16:14 ` [PATCH v4 08/13] spi: rzv2h-rspi: add support for variable " Cosmin Tanislav
@ 2025-11-19 16:14 ` Cosmin Tanislav
2025-11-19 16:14 ` [PATCH v4 10/13] dt-bindings: spi: renesas,rzv2h-rspi: document RZ/T2H and RZ/N2H Cosmin Tanislav
` (5 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Cosmin Tanislav @ 2025-11-19 16:14 UTC (permalink / raw)
To: Fabrizio Castro, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Magnus Damm, Philipp Zabel
Cc: linux-spi, linux-renesas-soc, devicetree, linux-kernel, Cosmin Tanislav
Add support for loopback mode for debugging purposes, allowing us to
test the SPI controller at the maximum SPI transfer clock without being
limited by external wiring.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
V4:
* no changes
V3:
* no changes
V2:
* no changes
drivers/spi/spi-rzv2h-rspi.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-rzv2h-rspi.c b/drivers/spi/spi-rzv2h-rspi.c
index be45269e8853..da110efba971 100644
--- a/drivers/spi/spi-rzv2h-rspi.c
+++ b/drivers/spi/spi-rzv2h-rspi.c
@@ -24,6 +24,7 @@
/* Registers */
#define RSPI_SPDR 0x00
#define RSPI_SPCR 0x08
+#define RSPI_SPPCR 0x0e
#define RSPI_SSLP 0x10
#define RSPI_SPBR 0x11
#define RSPI_SPSCR 0x13
@@ -40,6 +41,9 @@
#define RSPI_SPCR_SCKASE BIT(12)
#define RSPI_SPCR_SPE BIT(0)
+/* Register SPPCR */
+#define RSPI_SPPCR_SPLP2 BIT(1)
+
/* Register SPBR */
#define RSPI_SPBR_SPR_MIN 0
#define RSPI_SPBR_SPR_PCLK_MIN 1
@@ -345,6 +349,7 @@ static int rzv2h_rspi_prepare_message(struct spi_controller *ctlr,
u8 bits_per_word;
u32 conf32;
u16 conf16;
+ u8 conf8;
/* Make sure SPCR.SPE is 0 before amending the configuration */
rzv2h_rspi_spe_disable(rspi);
@@ -389,6 +394,10 @@ static int rzv2h_rspi_prepare_message(struct spi_controller *ctlr,
/* Use SPCMD0 only */
writeb(0x0, rspi->base + RSPI_SPSCR);
+ /* Setup loopback */
+ conf8 = FIELD_PREP(RSPI_SPPCR_SPLP2, !!(spi->mode & SPI_LOOP));
+ writeb(conf8, rspi->base + RSPI_SPPCR);
+
/* Setup mode */
conf32 = FIELD_PREP(RSPI_SPCMD_CPOL, !!(spi->mode & SPI_CPOL));
conf32 |= FIELD_PREP(RSPI_SPCMD_CPHA, !!(spi->mode & SPI_CPHA));
@@ -490,7 +499,7 @@ static int rzv2h_rspi_probe(struct platform_device *pdev)
}
controller->mode_bits = SPI_CPHA | SPI_CPOL | SPI_CS_HIGH |
- SPI_LSB_FIRST;
+ SPI_LSB_FIRST | SPI_LOOP;
controller->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 32);
controller->prepare_message = rzv2h_rspi_prepare_message;
controller->unprepare_message = rzv2h_rspi_unprepare_message;
--
2.52.0
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH v4 10/13] dt-bindings: spi: renesas,rzv2h-rspi: document RZ/T2H and RZ/N2H
2025-11-19 16:14 [PATCH v4 00/13] Add RSPI support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (8 preceding siblings ...)
2025-11-19 16:14 ` [PATCH v4 09/13] spi: rzv2h-rspi: add support for loopback mode Cosmin Tanislav
@ 2025-11-19 16:14 ` Cosmin Tanislav
2025-11-19 16:14 ` [PATCH v4 11/13] spi: rzv2h-rspi: add support for " Cosmin Tanislav
` (4 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Cosmin Tanislav @ 2025-11-19 16:14 UTC (permalink / raw)
To: Fabrizio Castro, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Magnus Damm, Philipp Zabel
Cc: linux-spi, linux-renesas-soc, devicetree, linux-kernel,
Cosmin Tanislav, Conor Dooley
The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs have four SPI
peripherals.
Compared to the previously supported RZ/V2H, these SoCs have a smaller
FIFO, no resets, and only two clocks: PCLKSPIn and PCLK. PCLKSPIn,
being the clock from which the SPI transfer clock is generated, is the
equivalent of the TCLK from V2H.
Document them, and use RZ/T2H as a fallback for RZ/N2H as the SPIs are
entirely compatible.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
---
V4:
* remove conditional minItems: 2 and maxItems: 3 for clocks property
since it is already set to that
* remove renesas,r9a09g087-rspi check since it implies
renesas,r9a09g077-rspi
* replace contains: enum: with contains: const: since there's only one
compatible to be checked against
V3:
* no changes
V2:
* add resets: false and reset-names: false
.../bindings/spi/renesas,rzv2h-rspi.yaml | 62 ++++++++++++++++---
1 file changed, 52 insertions(+), 10 deletions(-)
diff --git a/Documentation/devicetree/bindings/spi/renesas,rzv2h-rspi.yaml b/Documentation/devicetree/bindings/spi/renesas,rzv2h-rspi.yaml
index ab27fefc3c3a..4331df3e3d47 100644
--- a/Documentation/devicetree/bindings/spi/renesas,rzv2h-rspi.yaml
+++ b/Documentation/devicetree/bindings/spi/renesas,rzv2h-rspi.yaml
@@ -9,12 +9,15 @@ title: Renesas RZ/V2H(P) Renesas Serial Peripheral Interface (RSPI)
maintainers:
- Fabrizio Castro <fabrizio.castro.jz@renesas.com>
-allOf:
- - $ref: spi-controller.yaml#
-
properties:
compatible:
- const: renesas,r9a09g057-rspi # RZ/V2H(P)
+ oneOf:
+ - enum:
+ - renesas,r9a09g057-rspi # RZ/V2H(P)
+ - renesas,r9a09g077-rspi # RZ/T2H
+ - items:
+ - const: renesas,r9a09g087-rspi # RZ/N2H
+ - const: renesas,r9a09g077-rspi # RZ/T2H
reg:
maxItems: 1
@@ -36,13 +39,12 @@ properties:
- const: tx
clocks:
+ minItems: 2
maxItems: 3
clock-names:
- items:
- - const: pclk
- - const: pclk_sfr
- - const: tclk
+ minItems: 2
+ maxItems: 3
resets:
maxItems: 2
@@ -62,12 +64,52 @@ required:
- interrupt-names
- clocks
- clock-names
- - resets
- - reset-names
- power-domains
- '#address-cells'
- '#size-cells'
+allOf:
+ - $ref: spi-controller.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - renesas,r9a09g057-rspi
+ then:
+ properties:
+ clocks:
+ minItems: 3
+
+ clock-names:
+ items:
+ - const: pclk
+ - const: pclk_sfr
+ - const: tclk
+
+ required:
+ - resets
+ - reset-names
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - renesas,r9a09g077-rspi
+ then:
+ properties:
+ clocks:
+ maxItems: 2
+
+ clock-names:
+ items:
+ - const: pclk
+ - const: pclkspi
+
+ resets: false
+ reset-names: false
+
unevaluatedProperties: false
examples:
--
2.52.0
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH v4 11/13] spi: rzv2h-rspi: add support for RZ/T2H and RZ/N2H
2025-11-19 16:14 [PATCH v4 00/13] Add RSPI support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (9 preceding siblings ...)
2025-11-19 16:14 ` [PATCH v4 10/13] dt-bindings: spi: renesas,rzv2h-rspi: document RZ/T2H and RZ/N2H Cosmin Tanislav
@ 2025-11-19 16:14 ` Cosmin Tanislav
2025-11-19 16:14 ` [PATCH v4 12/13] arm64: dts: renesas: r9a09g077: Add SPIs support Cosmin Tanislav
` (3 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Cosmin Tanislav @ 2025-11-19 16:14 UTC (permalink / raw)
To: Fabrizio Castro, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Magnus Damm, Philipp Zabel
Cc: linux-spi, linux-renesas-soc, devicetree, linux-kernel, Cosmin Tanislav
Compared to the previously supported RZ/V2H, the Renesas RZ/T2H
(R9A09G077) and RZ/N2H (R9A09G087) SoCs have a smaller FIFO, no resets,
and only two clocks: PCLKSPIn and PCLK. PCLKSPIn, being the clock from
which the SPI transfer clock is generated, is the equivalent of the TCLK
clock from RZ/V2H. They also support generating the SPI transfer clock
from PCLK.
PCLKSPIn supports multiple dividers, generating multiple possible
frequencies from its parent. To handle this, do the following changes.
Use the minimum frequency of SPI clock to calculate the SPI controller's
min_speed_hz, and the maximum frequency to calculate max_speed_hz.
Add a new function, rzv2h_rspi_find_rate_variable(), which is used for
the .find_tclk_rate() callback, and which supports handling clocks with
a variable rate, with the following overall logic.
Iterate through all possible BRDV values.
For each BRDV, calculate two different SPRs, one for the clock's minimum
frequency, and one for the maxmimum, and iterate through each SPR
between them.
If the minimum SPR is higher than the upper SPR limit, the minimum rate
is too high to achieve the requested SPI frequency, skip to the next
BRDV.
For each SPR, calculate a rate and let the clock framework round it to
the closest supported rate of the clock.
The rate and SPR that generate a transfer frequency closest to the
requested SPI transfer frequency will be picked.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
V4:
* no changes
V3:
* no changes
V2:
* no changes
drivers/spi/spi-rzv2h-rspi.c | 108 +++++++++++++++++++++++++++++++++++
1 file changed, 108 insertions(+)
diff --git a/drivers/spi/spi-rzv2h-rspi.c b/drivers/spi/spi-rzv2h-rspi.c
index da110efba971..1db7e4e5d64e 100644
--- a/drivers/spi/spi-rzv2h-rspi.c
+++ b/drivers/spi/spi-rzv2h-rspi.c
@@ -261,6 +261,105 @@ static inline u32 rzv2h_rspi_calc_bitrate(unsigned long tclk_rate, u8 spr,
return DIV_ROUND_UP(tclk_rate, (2 * (spr + 1) * (1 << brdv)));
}
+static void rzv2h_rspi_find_rate_variable(struct clk *clk, u32 hz,
+ u8 spr_min, u8 spr_max,
+ struct rzv2h_rspi_best_clock *best)
+{
+ long clk_rate, clk_min_rate, clk_max_rate;
+ int min_rate_spr, max_rate_spr;
+ unsigned long error;
+ u32 actual_hz;
+ u8 brdv;
+ int spr;
+
+ /*
+ * On T2H / N2H, the source for the SPI clock is PCLKSPIn, which is a
+ * 1/32, 1/30, 1/25 or 1/24 divider of PLL4, which is 2400MHz,
+ * resulting in either 75MHz, 80MHz, 96MHz or 100MHz.
+ */
+ clk_min_rate = clk_round_rate(clk, 0);
+ if (clk_min_rate < 0)
+ return;
+
+ clk_max_rate = clk_round_rate(clk, ULONG_MAX);
+ if (clk_max_rate < 0)
+ return;
+
+ /*
+ * From the manual:
+ * Bit rate = f(PCLKSPIn) / (2 * (n + 1) * 2^N)
+ *
+ * If we adapt it to the current context, we get the following:
+ * hz = rate / ((spr + 1) * (1 << (brdv + 1)))
+ *
+ * This can be written in multiple forms depending on what we want to
+ * determine.
+ *
+ * To find the rate, having hz, spr and brdv:
+ * rate = hz * (spr + 1) * (1 << (brdv + 1)
+ *
+ * To find the spr, having rate, hz, and spr:
+ * spr = rate / (hz * (1 << (brdv + 1)) - 1
+ */
+
+ for (brdv = RSPI_SPCMD_BRDV_MIN; brdv <= RSPI_SPCMD_BRDV_MAX; brdv++) {
+ /* Calculate the divisor needed to find the SPR from a rate. */
+ u32 rate_div = hz * (1 << (brdv + 1));
+
+ /*
+ * If the SPR for the minimum rate is greater than the maximum
+ * allowed value skip this BRDV. The divisor increases with each
+ * BRDV iteration, so the following BRDV might result in a
+ * minimum SPR that is in the valid range.
+ */
+ min_rate_spr = DIV_ROUND_CLOSEST(clk_min_rate, rate_div) - 1;
+ if (min_rate_spr > spr_max)
+ continue;
+
+ /*
+ * If the SPR for the maximum rate is less than the minimum
+ * allowed value, exit. The divisor only increases with each
+ * BRDV iteration, so the following BRDV cannot result in a
+ * maximum SPR that is in the valid range.
+ */
+ max_rate_spr = DIV_ROUND_CLOSEST(clk_max_rate, rate_div) - 1;
+ if (max_rate_spr < spr_min)
+ break;
+
+ if (min_rate_spr < spr_min)
+ min_rate_spr = spr_min;
+
+ if (max_rate_spr > spr_max)
+ max_rate_spr = spr_max;
+
+ for (spr = min_rate_spr; spr <= max_rate_spr; spr++) {
+ clk_rate = (spr + 1) * rate_div;
+
+ clk_rate = clk_round_rate(clk, clk_rate);
+ if (clk_rate <= 0)
+ continue;
+
+ actual_hz = rzv2h_rspi_calc_bitrate(clk_rate, spr, brdv);
+ error = abs((long)hz - (long)actual_hz);
+
+ if (error >= best->error)
+ continue;
+
+ *best = (struct rzv2h_rspi_best_clock) {
+ .clk = clk,
+ .clk_rate = clk_rate,
+ .error = error,
+ .actual_hz = actual_hz,
+ .brdv = brdv,
+ .spr = spr,
+ };
+
+ if (!error)
+ return;
+ }
+ }
+}
+
static void rzv2h_rspi_find_rate_fixed(struct clk *clk, u32 hz,
u8 spr_min, u8 spr_max,
struct rzv2h_rspi_best_clock *best)
@@ -558,8 +657,17 @@ static const struct rzv2h_rspi_info rzv2h_info = {
.num_clks = 3,
};
+static const struct rzv2h_rspi_info rzt2h_info = {
+ .find_tclk_rate = rzv2h_rspi_find_rate_variable,
+ .find_pclk_rate = rzv2h_rspi_find_rate_fixed,
+ .tclk_name = "pclkspi",
+ .fifo_size = 4,
+ .num_clks = 2,
+};
+
static const struct of_device_id rzv2h_rspi_match[] = {
{ .compatible = "renesas,r9a09g057-rspi", &rzv2h_info },
+ { .compatible = "renesas,r9a09g077-rspi", &rzt2h_info },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, rzv2h_rspi_match);
--
2.52.0
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH v4 12/13] arm64: dts: renesas: r9a09g077: Add SPIs support
2025-11-19 16:14 [PATCH v4 00/13] Add RSPI support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (10 preceding siblings ...)
2025-11-19 16:14 ` [PATCH v4 11/13] spi: rzv2h-rspi: add support for " Cosmin Tanislav
@ 2025-11-19 16:14 ` Cosmin Tanislav
2025-11-28 15:22 ` Geert Uytterhoeven
2025-11-19 16:14 ` [PATCH v4 13/13] arm64: dts: renesas: r9a09g087: " Cosmin Tanislav
` (2 subsequent siblings)
14 siblings, 1 reply; 18+ messages in thread
From: Cosmin Tanislav @ 2025-11-19 16:14 UTC (permalink / raw)
To: Fabrizio Castro, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Magnus Damm, Philipp Zabel
Cc: linux-spi, linux-renesas-soc, devicetree, linux-kernel, Cosmin Tanislav
Add support for the four SPI peripherals on the Renesas RZ/T2H Soc.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
V4:
* no changes
V3:
* no changes
V2:
* no changes
arch/arm64/boot/dts/renesas/r9a09g077.dtsi | 72 ++++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a09g077.dtsi b/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
index d59f70d9f8a9..f80c6d603eea 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g077.dtsi
@@ -188,6 +188,78 @@ sci5: serial@81005000 {
status = "disabled";
};
+ rspi0: spi@80007000 {
+ compatible = "renesas,r9a09g077-rspi";
+ reg = <0x0 0x80007000 0x0 0x400>;
+ interrupts = <GIC_SPI 636 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 637 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 638 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 634 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 635 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "idle", "error", "end", "rx", "tx";
+ clocks = <&cpg CPG_CORE R9A09G077_CLK_PCLKM>,
+ <&cpg CPG_MOD 104>;
+ clock-names = "pclk", "pclkspi";
+ power-domains = <&cpg>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ rspi1: spi@80007400 {
+ compatible = "renesas,r9a09g077-rspi";
+ reg = <0x0 0x80007400 0x0 0x400>;
+ interrupts = <GIC_SPI 641 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 642 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 643 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 639 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 640 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "idle", "error", "end", "rx", "tx";
+ clocks = <&cpg CPG_CORE R9A09G077_CLK_PCLKM>,
+ <&cpg CPG_MOD 105>;
+ clock-names = "pclk", "pclkspi";
+ power-domains = <&cpg>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ rspi2: spi@80007800 {
+ compatible = "renesas,r9a09g077-rspi";
+ reg = <0x0 0x80007800 0x0 0x400>;
+ interrupts = <GIC_SPI 646 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 647 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 648 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 644 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 645 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "idle", "error", "end", "rx", "tx";
+ clocks = <&cpg CPG_CORE R9A09G077_CLK_PCLKM>,
+ <&cpg CPG_MOD 106>;
+ clock-names = "pclk", "pclkspi";
+ power-domains = <&cpg>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ rspi3: spi@81007000 {
+ compatible = "renesas,r9a09g077-rspi";
+ reg = <0x0 0x81007000 0x0 0x400>;
+ interrupts = <GIC_SPI 651 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 652 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 653 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 649 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 650 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "idle", "error", "end", "rx", "tx";
+ clocks = <&cpg CPG_CORE R9A09G077_CLK_PCLKM>,
+ <&cpg CPG_MOD 602>;
+ clock-names = "pclk", "pclkspi";
+ power-domains = <&cpg>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
wdt0: watchdog@80082000 {
compatible = "renesas,r9a09g077-wdt";
reg = <0 0x80082000 0 0x400>,
--
2.52.0
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH v4 12/13] arm64: dts: renesas: r9a09g077: Add SPIs support
2025-11-19 16:14 ` [PATCH v4 12/13] arm64: dts: renesas: r9a09g077: Add SPIs support Cosmin Tanislav
@ 2025-11-28 15:22 ` Geert Uytterhoeven
0 siblings, 0 replies; 18+ messages in thread
From: Geert Uytterhoeven @ 2025-11-28 15:22 UTC (permalink / raw)
To: Cosmin Tanislav
Cc: Fabrizio Castro, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Magnus Damm, Philipp Zabel, linux-spi,
linux-renesas-soc, devicetree, linux-kernel
On Wed, 19 Nov 2025 at 17:16, Cosmin Tanislav
<cosmin-gabriel.tanislav.xa@renesas.com> wrote:
> Add support for the four SPI peripherals on the Renesas RZ/T2H Soc.
>
> Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v6.20.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH v4 13/13] arm64: dts: renesas: r9a09g087: Add SPIs support
2025-11-19 16:14 [PATCH v4 00/13] Add RSPI support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (11 preceding siblings ...)
2025-11-19 16:14 ` [PATCH v4 12/13] arm64: dts: renesas: r9a09g077: Add SPIs support Cosmin Tanislav
@ 2025-11-19 16:14 ` Cosmin Tanislav
2025-11-28 15:22 ` Geert Uytterhoeven
2025-11-19 16:21 ` [PATCH v4 00/13] Add RSPI support for RZ/T2H and RZ/N2H Cosmin-Gabriel Tanislav
2025-11-25 15:38 ` (subset) " Mark Brown
14 siblings, 1 reply; 18+ messages in thread
From: Cosmin Tanislav @ 2025-11-19 16:14 UTC (permalink / raw)
To: Fabrizio Castro, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Geert Uytterhoeven, Magnus Damm, Philipp Zabel
Cc: linux-spi, linux-renesas-soc, devicetree, linux-kernel, Cosmin Tanislav
Add support for the four SPI peripherals on the Renesas RZ/N2H Soc.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
V4:
* no changes
V3:
* no changes
V2:
* no changes
arch/arm64/boot/dts/renesas/r9a09g087.dtsi | 72 ++++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r9a09g087.dtsi b/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
index c742a67663cc..f9f49bd3e8b0 100644
--- a/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
+++ b/arch/arm64/boot/dts/renesas/r9a09g087.dtsi
@@ -188,6 +188,78 @@ sci5: serial@81005000 {
status = "disabled";
};
+ rspi0: spi@80007000 {
+ compatible = "renesas,r9a09g087-rspi", "renesas,r9a09g077-rspi";
+ reg = <0x0 0x80007000 0x0 0x400>;
+ interrupts = <GIC_SPI 636 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 637 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 638 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 634 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 635 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "idle", "error", "end", "rx", "tx";
+ clocks = <&cpg CPG_CORE R9A09G087_CLK_PCLKM>,
+ <&cpg CPG_MOD 104>;
+ clock-names = "pclk", "pclkspi";
+ power-domains = <&cpg>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ rspi1: spi@80007400 {
+ compatible = "renesas,r9a09g087-rspi", "renesas,r9a09g077-rspi";
+ reg = <0x0 0x80007400 0x0 0x400>;
+ interrupts = <GIC_SPI 641 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 642 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 643 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 639 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 640 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "idle", "error", "end", "rx", "tx";
+ clocks = <&cpg CPG_CORE R9A09G087_CLK_PCLKM>,
+ <&cpg CPG_MOD 105>;
+ clock-names = "pclk", "pclkspi";
+ power-domains = <&cpg>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ rspi2: spi@80007800 {
+ compatible = "renesas,r9a09g087-rspi", "renesas,r9a09g077-rspi";
+ reg = <0x0 0x80007800 0x0 0x400>;
+ interrupts = <GIC_SPI 646 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 647 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 648 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 644 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 645 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "idle", "error", "end", "rx", "tx";
+ clocks = <&cpg CPG_CORE R9A09G087_CLK_PCLKM>,
+ <&cpg CPG_MOD 106>;
+ clock-names = "pclk", "pclkspi";
+ power-domains = <&cpg>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ rspi3: spi@81007000 {
+ compatible = "renesas,r9a09g087-rspi", "renesas,r9a09g077-rspi";
+ reg = <0x0 0x81007000 0x0 0x400>;
+ interrupts = <GIC_SPI 651 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 652 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 653 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 649 IRQ_TYPE_EDGE_RISING>,
+ <GIC_SPI 650 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "idle", "error", "end", "rx", "tx";
+ clocks = <&cpg CPG_CORE R9A09G087_CLK_PCLKM>,
+ <&cpg CPG_MOD 602>;
+ clock-names = "pclk", "pclkspi";
+ power-domains = <&cpg>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
wdt0: watchdog@80082000 {
compatible = "renesas,r9a09g087-wdt", "renesas,r9a09g077-wdt";
reg = <0 0x80082000 0 0x400>,
--
2.52.0
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH v4 13/13] arm64: dts: renesas: r9a09g087: Add SPIs support
2025-11-19 16:14 ` [PATCH v4 13/13] arm64: dts: renesas: r9a09g087: " Cosmin Tanislav
@ 2025-11-28 15:22 ` Geert Uytterhoeven
0 siblings, 0 replies; 18+ messages in thread
From: Geert Uytterhoeven @ 2025-11-28 15:22 UTC (permalink / raw)
To: Cosmin Tanislav
Cc: Fabrizio Castro, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Magnus Damm, Philipp Zabel, linux-spi,
linux-renesas-soc, devicetree, linux-kernel
On Wed, 19 Nov 2025 at 17:16, Cosmin Tanislav
<cosmin-gabriel.tanislav.xa@renesas.com> wrote:
> Add support for the four SPI peripherals on the Renesas RZ/N2H Soc.
>
> Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v6.20.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: [PATCH v4 00/13] Add RSPI support for RZ/T2H and RZ/N2H
2025-11-19 16:14 [PATCH v4 00/13] Add RSPI support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (12 preceding siblings ...)
2025-11-19 16:14 ` [PATCH v4 13/13] arm64: dts: renesas: r9a09g087: " Cosmin Tanislav
@ 2025-11-19 16:21 ` Cosmin-Gabriel Tanislav
2025-11-25 15:38 ` (subset) " Mark Brown
14 siblings, 0 replies; 18+ messages in thread
From: Cosmin-Gabriel Tanislav @ 2025-11-19 16:21 UTC (permalink / raw)
To: Cosmin-Gabriel Tanislav, Fabrizio Castro, Mark Brown,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, magnus.damm, Philipp Zabel
Cc: linux-spi, linux-renesas-soc, devicetree, linux-kernel
> -----Original Message-----
> From: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
> Sent: Wednesday, November 19, 2025 6:14 PM
> To: Fabrizio Castro <fabrizio.castro.jz@renesas.com>; Mark Brown <broonie@kernel.org>; Rob Herring
> <robh@kernel.org>; Krzysztof Kozlowski <krzk+dt@kernel.org>; Conor Dooley <conor+dt@kernel.org>; Geert
> Uytterhoeven <geert+renesas@glider.be>; magnus.damm <magnus.damm@gmail.com>; Philipp Zabel
> <p.zabel@pengutronix.de>
> Cc: linux-spi@vger.kernel.org; linux-renesas-soc@vger.kernel.org; devicetree@vger.kernel.org; linux-
> kernel@vger.kernel.org; Cosmin-Gabriel Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
> Subject: [PATCH v4 00/13] Add RSPI support for RZ/T2H and RZ/N2H
>
> V4:
> * remove conditional minItems: 2 and maxItems: 3 for clocks property
> since it is already set to that
> * remove renesas,r9a09g087-rspi check since it implies
> renesas,r9a09g077-rspi
> * replace contains: enum: with contains: const: since there's only one
> compatible to be checked against
>
Forgot to mention that I dropped the clk patch since Geert queued it up.
> V3:
> * no changes
>
> V2:
> * fix missing unwind goto quit_resets
> * add resets: false and reset-names: false
>
> Cosmin Tanislav (13):
> spi: rzv2h-rspi: make resets optional
> spi: rzv2h-rspi: make FIFO size chip-specific
> spi: rzv2h-rspi: make clocks chip-specific
> spi: rzv2h-rspi: move register writes out of rzv2h_rspi_setup_clock()
> spi: rzv2h-rspi: avoid recomputing transfer frequency
> spi: rzv2h-rspi: make transfer clock rate finding chip-specific
> spi: rzv2h-rspi: add support for using PCLK for transfer clock
> spi: rzv2h-rspi: add support for variable transfer clock
> spi: rzv2h-rspi: add support for loopback mode
> dt-bindings: spi: renesas,rzv2h-rspi: document RZ/T2H and RZ/N2H
> spi: rzv2h-rspi: add support for RZ/T2H and RZ/N2H
> arm64: dts: renesas: r9a09g077: Add SPIs support
> arm64: dts: renesas: r9a09g087: Add SPIs support
>
> .../bindings/spi/renesas,rzv2h-rspi.yaml | 62 +++-
> arch/arm64/boot/dts/renesas/r9a09g077.dtsi | 72 ++++
> arch/arm64/boot/dts/renesas/r9a09g087.dtsi | 72 ++++
> drivers/spi/spi-rzv2h-rspi.c | 339 +++++++++++++++---
> 4 files changed, 476 insertions(+), 69 deletions(-)
>
> --
> 2.52.0
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: (subset) [PATCH v4 00/13] Add RSPI support for RZ/T2H and RZ/N2H
2025-11-19 16:14 [PATCH v4 00/13] Add RSPI support for RZ/T2H and RZ/N2H Cosmin Tanislav
` (13 preceding siblings ...)
2025-11-19 16:21 ` [PATCH v4 00/13] Add RSPI support for RZ/T2H and RZ/N2H Cosmin-Gabriel Tanislav
@ 2025-11-25 15:38 ` Mark Brown
14 siblings, 0 replies; 18+ messages in thread
From: Mark Brown @ 2025-11-25 15:38 UTC (permalink / raw)
To: Fabrizio Castro, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Philipp Zabel, Cosmin Tanislav
Cc: linux-spi, linux-renesas-soc, devicetree, linux-kernel
On Wed, 19 Nov 2025 18:14:21 +0200, Cosmin Tanislav wrote:
> V4:
> * remove conditional minItems: 2 and maxItems: 3 for clocks property
> since it is already set to that
> * remove renesas,r9a09g087-rspi check since it implies
> renesas,r9a09g077-rspi
> * replace contains: enum: with contains: const: since there's only one
> compatible to be checked against
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[01/13] spi: rzv2h-rspi: make resets optional
commit: aead5ae91e4cbadac817d15737eca3b531237448
[02/13] spi: rzv2h-rspi: make FIFO size chip-specific
commit: 8e89ee6cd2b928a8431bef61e8b851ce5df1ecb0
[03/13] spi: rzv2h-rspi: make clocks chip-specific
commit: ebd7d6ae0dc7d65e21460c928519f40ccf95f3b9
[04/13] spi: rzv2h-rspi: move register writes out of rzv2h_rspi_setup_clock()
commit: 1b7ce968ab2579702ea9dbc2fb599e540bbd8c88
[05/13] spi: rzv2h-rspi: avoid recomputing transfer frequency
commit: 88782493204512fcf4e020e2385bca3e3c5bd4c0
[06/13] spi: rzv2h-rspi: make transfer clock rate finding chip-specific
commit: 77d931584dd38916b66c65320c80a65cbef4b122
[07/13] spi: rzv2h-rspi: add support for using PCLK for transfer clock
commit: 1ce3e8adc7d0038e59a7c9f5c9e5f399ba0db5d6
[08/13] spi: rzv2h-rspi: add support for variable transfer clock
commit: 9c9bf4fdc5e5d09d5f4280ed2c582df6e1f837d9
[09/13] spi: rzv2h-rspi: add support for loopback mode
commit: bc4f0b1e39035b9bb3d5d9692074702110f5e2b1
[10/13] dt-bindings: spi: renesas,rzv2h-rspi: document RZ/T2H and RZ/N2H
commit: e93d7b2d8b349f659fa9456048ee86e10eb422f9
[11/13] spi: rzv2h-rspi: add support for RZ/T2H and RZ/N2H
commit: 0cc8cd824b9fb7fb087a2ec6b0c80d812cc4fde7
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 18+ messages in thread