RE: [PATCH v20 00/12] Add Renesas RZ/G3L SD/eMMC support
From: Biju Das
Date: Fri Jul 17 2026 - 04:26:48 EST
Hi All,
I got an update from hardware team for CLK divider bits for HS400 mode.
This change will incorporate in next version of hardware manual.
For HS400 mode:
00 0000 0000b: (SDxφ/2)/2
Other settings are prohibited.
Cheers,
Biju
> -----Original Message-----
> From: Biju <biju.das.au@xxxxxxxxx>
> Sent: 13 July 2026 18:52
> To: Ulf Hansson <ulfh@xxxxxxxxxx>; Rob Herring <robh@xxxxxxxxxx>; Krzysztof Kozlowski
> <krzk+dt@xxxxxxxxxx>; Conor Dooley <conor+dt@xxxxxxxxxx>; Geert Uytterhoeven <geert+renesas@xxxxxxxxx>;
> Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>; magnus.damm <magnus.damm@xxxxxxxxx>
> Cc: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>; wsa+renesas <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>; linux-
> mmc@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; linux-renesas-
> soc@xxxxxxxxxxxxxxx; Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>; biju.das.au
> <biju.das.au@xxxxxxxxx>
> Subject: [PATCH v20 00/12] Add Renesas RZ/G3L SD/eMMC support
>
> From: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
>
> Hi All,
>
> RZ/G3L SoC has:
>
> Channel 0 supports SD and eMMC (including HS400/HS400ES).
> Channel 1 supports SD and eMMC (except for HS400).
> Channel 2 supports SD.
>
> The SoC supports a maximum frequency of 150 MHz. The SD0 interface does not support IOVS and PWEN in the
> SDHI register (no internal regulator), unlike SD1 and SD2. It has an internal divider for all modes
> except HS400.
> It also has a 2048-bit divider compared to 512 on others. Moreover RZ/G3L supports HS400 enhanced strobe
> mode.
>
> v19->v20:
> * Replaced the check mmd->clk_mask with mmc_data->clk_mask and moved
> the code after assignment of variable mmd, this ensures assigning
> the default values for non-DT platforms and DT platforms with no
> device data.
> * Replaced the check mmd->max_divider with mmc_data->max_divider and
> moved the code after assignment of variable mmd, this ensures
> assigning the default values for non-DT platforms and DT platforms with
> no device data.
> * Fixed the ordering of resets in suspend/resume paths.
> * Added bitfield.h header file.
> * Reworked on renesas_sdhi_set_clock() to handle the 11-bit divider
> case and the 32-bit register write.
> * Updated resume() with scoped PM runtime call.
> * SD_CLK_CTRL clk enable turned off before updating SCC_CKSEL_DTSEL
> register.
> v18->v19:
> * Updated commit description for patch#1,#2,#6,#8,#11 and #12
> * Updated clock and reset description with AXI master and AXI slave
> * Added else condition for reset and reset-names.
> * Renamed aclk->aclkm and reordered the axi clocks similar to resets.
> * Retained the tag got binding patch as the changes are trivial.
> * Fixed the clk_mask for non-DT platforms.
> * Fixed max-divider setting for non-DT platforms.
> * Replaced the magic number '9' with ilog2 function in
> renesas_sdhi_clk_enable().
> * Dropped divider variable from struct renesas_sdhi.
> * Updated renesas_sdhi_clk_update() to return rate for HS400 mode
> and non HS400 mode(uses 1/2 internal divider).
> * Updated handling for clk divider.
> * Renamed TMIO_MMC_HWADJ2->TMIO_MMC_HWADJ to make it generic for
> hardware tuning delays
> * Dropped duplicate SH_MOBILE_SDHI_SCC_TMPPORT2 macro
> * Updated suspend/resume with scoped runtime calls in suspend.
> * Fixed extra space in HS400MODE2 comment block.
> * Updated the comment HS400mode2->HS400MODE2.
> * Dropped the updation of clk handling as it is taken care in
> previous patches.
> * HS400ES support is enabled based on of_data.
> * Fixed the space in HS400ES comment block.
>
> v17->v18:
> * Collected tag
> * Merged patch #4 and #5 and updated commit description
> * Annotated the empty sentinel entries in the OF match tables with a
> "Sentinel." comment for clarity.
> * Retained the tag as it is a trivial cleanup.
> * New patches drop struct renesas_sdhi_hw_info, instead using
> renesas_sdhi_of_data and tmio_mmc_data.
> * Dropped clk, pinctrl, SoC, and board dtsi from this patch series;
> will send later.
> v1->v17:
> * Collected tag for binding patch.
> * Resending the series as there is an issue with patch threading from
> patch #14.
>
> Biju Das (12):
> dt-bindings: mmc: renesas,sdhi: Document RZ/G3L (r9a08g046) SoC
> mmc: renesas_sdhi: Clean up whitespace and add OF table sentinels
> mmc: renesas_sdhi: Add clk_mask field to support flexible clock
> divider widths
> mmc: renesas_sdhi: Add max_divider field to support SoC-specific clock
> ranges
> mmc: renesas_sdhi: Add tuning delay support for RZ/G2L
> mmc: renesas_sdhi: Add TMIO_MMC_INTERNAL_DIVIDER flag
> mmc: renesas_sdhi: Add optional axis/axim reset controls
> mmc: renesas_sdhi: Add RZ/G3L SDHI support
> mmc: renesas_sdhi: Save and restore IOVS across suspend/resume
> mmc: renesas_sdhi: Make HS400 OSEL bit configurable per SoC
> mmc: renesas_sdhi: Add RZ/G3L HS400 support
> mmc: renesas_sdhi: Add HS400 enhanced strobe support for RZ/G3L
>
> .../devicetree/bindings/mmc/renesas,sdhi.yaml | 108 +++++--
> drivers/mmc/host/renesas_sdhi.h | 11 +-
> drivers/mmc/host/renesas_sdhi_core.c | 274 ++++++++++++++----
> drivers/mmc/host/renesas_sdhi_internal_dmac.c | 73 ++++-
> drivers/mmc/host/renesas_sdhi_sys_dmac.c | 12 +-
> include/linux/platform_data/tmio.h | 18 ++
> 6 files changed, 408 insertions(+), 88 deletions(-)
>
> --
> 2.43.0