2022-12-13 23:23:06

by Fabrizio Castro

[permalink] [raw]
Subject: [PATCH 3/4] mmc: renesas_sdhi: Add RZ/V2M compatible string

The SDHI/eMMC IPs found with the RZ/V2M (a.k.a. r9a09g011), are
very similar to the ones found in R-Car Gen3, but they are not
exactly the same, and as a result need an SoC specific compatible
string for fine tuning driver support.

Signed-off-by: Fabrizio Castro <[email protected]>
---
drivers/mmc/host/renesas_sdhi_internal_dmac.c | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
index 29f562115c66..f38003f6b1ca 100644
--- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
@@ -210,6 +210,11 @@ static const struct renesas_sdhi_quirks sdhi_quirks_r8a77990 = {
.manual_tap_correction = true,
};

+static const struct renesas_sdhi_quirks sdhi_quirks_r9a09g011 = {
+ .fixed_addr_mode = true,
+ .hs400_disabled = true,
+};
+
/*
* Note for r8a7796 / r8a774a1: we can't distinguish ES1.1 and 1.2 as of now.
* So, we want to treat them equally and only have a match for ES1.2 to enforce
@@ -251,6 +256,11 @@ static const struct renesas_sdhi_of_data_with_quirks of_r8a77990_compatible = {
.quirks = &sdhi_quirks_r8a77990,
};

+static const struct renesas_sdhi_of_data_with_quirks of_r9a09g011_compatible = {
+ .of_data = &of_data_rcar_gen3,
+ .quirks = &sdhi_quirks_r9a09g011,
+};
+
static const struct renesas_sdhi_of_data_with_quirks of_rcar_gen3_compatible = {
.of_data = &of_data_rcar_gen3,
};
@@ -274,6 +284,7 @@ static const struct of_device_id renesas_sdhi_internal_dmac_of_match[] = {
{ .compatible = "renesas,sdhi-r8a77970", .data = &of_r8a77970_compatible, },
{ .compatible = "renesas,sdhi-r8a77990", .data = &of_r8a77990_compatible, },
{ .compatible = "renesas,sdhi-r8a77995", .data = &of_rcar_gen3_nohs400_compatible, },
+ { .compatible = "renesas,sdhi-r9a09g011", .data = &of_r9a09g011_compatible, },
{ .compatible = "renesas,rcar-gen3-sdhi", .data = &of_rcar_gen3_compatible, },
{ .compatible = "renesas,rcar-gen4-sdhi", .data = &of_rcar_gen3_compatible, },
{},
--
2.34.1


2022-12-15 08:05:46

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH 3/4] mmc: renesas_sdhi: Add RZ/V2M compatible string

On Tue, Dec 13, 2022 at 11:01:28PM +0000, Fabrizio Castro wrote:
> The SDHI/eMMC IPs found with the RZ/V2M (a.k.a. r9a09g011), are
> very similar to the ones found in R-Car Gen3, but they are not
> exactly the same, and as a result need an SoC specific compatible
> string for fine tuning driver support.
>
> Signed-off-by: Fabrizio Castro <[email protected]>

Reviewed-by: Wolfram Sang <[email protected]>

> +static const struct renesas_sdhi_quirks sdhi_quirks_r9a09g011 = {
> + .fixed_addr_mode = true,
> + .hs400_disabled = true,
> +};

Cool, seems like our quirk abstraction works reasonably well :)


Attachments:
(No filename) (652.00 B)
signature.asc (849.00 B)
Download all attachments

2023-01-02 16:08:19

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH 3/4] mmc: renesas_sdhi: Add RZ/V2M compatible string

On Wed, 14 Dec 2022 at 00:01, Fabrizio Castro
<[email protected]> wrote:
>
> The SDHI/eMMC IPs found with the RZ/V2M (a.k.a. r9a09g011), are
> very similar to the ones found in R-Car Gen3, but they are not
> exactly the same, and as a result need an SoC specific compatible
> string for fine tuning driver support.
>
> Signed-off-by: Fabrizio Castro <[email protected]>

Applied for next, thanks!

Kind regards
Uffe


> ---
> drivers/mmc/host/renesas_sdhi_internal_dmac.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> index 29f562115c66..f38003f6b1ca 100644
> --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> @@ -210,6 +210,11 @@ static const struct renesas_sdhi_quirks sdhi_quirks_r8a77990 = {
> .manual_tap_correction = true,
> };
>
> +static const struct renesas_sdhi_quirks sdhi_quirks_r9a09g011 = {
> + .fixed_addr_mode = true,
> + .hs400_disabled = true,
> +};
> +
> /*
> * Note for r8a7796 / r8a774a1: we can't distinguish ES1.1 and 1.2 as of now.
> * So, we want to treat them equally and only have a match for ES1.2 to enforce
> @@ -251,6 +256,11 @@ static const struct renesas_sdhi_of_data_with_quirks of_r8a77990_compatible = {
> .quirks = &sdhi_quirks_r8a77990,
> };
>
> +static const struct renesas_sdhi_of_data_with_quirks of_r9a09g011_compatible = {
> + .of_data = &of_data_rcar_gen3,
> + .quirks = &sdhi_quirks_r9a09g011,
> +};
> +
> static const struct renesas_sdhi_of_data_with_quirks of_rcar_gen3_compatible = {
> .of_data = &of_data_rcar_gen3,
> };
> @@ -274,6 +284,7 @@ static const struct of_device_id renesas_sdhi_internal_dmac_of_match[] = {
> { .compatible = "renesas,sdhi-r8a77970", .data = &of_r8a77970_compatible, },
> { .compatible = "renesas,sdhi-r8a77990", .data = &of_r8a77990_compatible, },
> { .compatible = "renesas,sdhi-r8a77995", .data = &of_rcar_gen3_nohs400_compatible, },
> + { .compatible = "renesas,sdhi-r9a09g011", .data = &of_r9a09g011_compatible, },
> { .compatible = "renesas,rcar-gen3-sdhi", .data = &of_rcar_gen3_compatible, },
> { .compatible = "renesas,rcar-gen4-sdhi", .data = &of_rcar_gen3_compatible, },
> {},
> --
> 2.34.1
>