diff mbox series

[2/6] mmc: renesas_sdhi: R-Car D3 also has no HS400

Message ID 20220320123016.57991-3-wsa+renesas@sang-engineering.com
State New
Headers show
Series mmc: renesas_sdhi: internal_dmac: updates after refactoring | expand

Commit Message

Wolfram Sang March 20, 2022, 12:30 p.m. UTC
It is not explicitly expressed in the docs, but the needed data strobe
pin is indeed missing for D3. The BSP disables HS400 as well. This means
a little refactoring to reuse an already existing setup.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/mmc/host/renesas_sdhi_internal_dmac.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

Comments

Geert Uytterhoeven April 1, 2022, 1:01 p.m. UTC | #1
Hi Wolfram,

On Mon, Mar 21, 2022 at 11:50 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> It is not explicitly expressed in the docs, but the needed data strobe
> pin is indeed missing for D3. The BSP disables HS400 as well. This means
> a little refactoring to reuse an already existing setup.

You mean the DS signal?  That also doesn't exist on R-Car V3M, so
shouldn't of_r8a77970_compatible.quirks be set to &sdhi_quirks_nohs400,
too?

> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

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
Wolfram Sang April 1, 2022, 2:59 p.m. UTC | #2
> You mean the DS signal?  That also doesn't exist on R-Car V3M, so
> shouldn't of_r8a77970_compatible.quirks be set to &sdhi_quirks_nohs400,
> too?

Probably. The BSP contains the DTS of a function board addon for the
Eagle board which also enables HS200 only. But I think we should try to
ask the Renesas HW team for confirmation. D'accord?
Geert Uytterhoeven April 1, 2022, 3:08 p.m. UTC | #3
Hi Wolfram,

On Fri, Apr 1, 2022 at 4:59 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> > You mean the DS signal?  That also doesn't exist on R-Car V3M, so
> > shouldn't of_r8a77970_compatible.quirks be set to &sdhi_quirks_nohs400,
> > too?
>
> Probably. The BSP contains the DTS of a function board addon for the
> Eagle board which also enables HS200 only. But I think we should try to
> ask the Renesas HW team for confirmation. D'accord?

Sure.

BTW, SDHI0 and SDHI1 don't have the DS signal neither.
Does that mean we never support HS400 on these?
We do have SD0H and SD1H clocks.
Upstream DTS uses at most sd-uhs-sdr104 on SDHI[01].

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
Wolfram Sang April 1, 2022, 3:20 p.m. UTC | #4
> BTW, SDHI0 and SDHI1 don't have the DS signal neither.
> Does that mean we never support HS400 on these?

Yes, those don't even support eMMC.

> We do have SD0H and SD1H clocks.
> Upstream DTS uses at most sd-uhs-sdr104 on SDHI[01].

Yes, SDnH (and SCC) is also needed for SDR104.
diff mbox series

Patch

diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
index 1685df00863b..1c9217f99a0b 100644
--- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
@@ -234,11 +234,6 @@  static const struct renesas_sdhi_of_data_with_quirks of_r8a77970_compatible = {
 	.of_data = &of_data_rcar_gen3_no_fallback,
 };
 
-static const struct renesas_sdhi_of_data_with_quirks of_r8a77980_compatible = {
-	.of_data = &of_data_rcar_gen3,
-	.quirks = &sdhi_quirks_nohs400,
-};
-
 static const struct renesas_sdhi_of_data_with_quirks of_r8a77990_compatible = {
 	.of_data = &of_data_rcar_gen3,
 	.quirks = &sdhi_quirks_r8a77990,
@@ -248,6 +243,11 @@  static const struct renesas_sdhi_of_data_with_quirks of_rcar_gen3_compatible = {
 	.of_data = &of_data_rcar_gen3,
 };
 
+static const struct renesas_sdhi_of_data_with_quirks of_rcar_gen3_nohs400_compatible = {
+	.of_data = &of_data_rcar_gen3,
+	.quirks = &sdhi_quirks_nohs400,
+};
+
 static const struct of_device_id renesas_sdhi_internal_dmac_of_match[] = {
 	{ .compatible = "renesas,sdhi-r7s9210", .data = &of_rza2_compatible, },
 	{ .compatible = "renesas,sdhi-mmc-r8a77470", .data = &of_rcar_gen3_compatible, },
@@ -256,8 +256,9 @@  static const struct of_device_id renesas_sdhi_internal_dmac_of_match[] = {
 	{ .compatible = "renesas,sdhi-r8a77961", .data = &of_r8a77961_compatible, },
 	{ .compatible = "renesas,sdhi-r8a77965", .data = &of_r8a77965_compatible, },
 	{ .compatible = "renesas,sdhi-r8a77970", .data = &of_r8a77970_compatible, },
-	{ .compatible = "renesas,sdhi-r8a77980", .data = &of_r8a77980_compatible, },
+	{ .compatible = "renesas,sdhi-r8a77980", .data = &of_rcar_gen3_nohs400_compatible, },
 	{ .compatible = "renesas,sdhi-r8a77990", .data = &of_r8a77990_compatible, },
+	{ .compatible = "renesas,sdhi-r8a77995", .data = &of_rcar_gen3_nohs400_compatible, },
 	{ .compatible = "renesas,rcar-gen3-sdhi", .data = &of_rcar_gen3_compatible, },
 	{},
 };