All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: renesas_rpc_spi: Fix fallback compatibility string
@ 2021-01-04 17:38 Adam Ford
  2021-01-05 12:08 ` Biju Das
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Ford @ 2021-01-04 17:38 UTC (permalink / raw)
  To: u-boot

A generic compatibility string was added, but it doesn't match the
name used by Linux or the device tree bindings from any of the SoC's.
Fix it to read "renesas,rcar-gen3-rpc-if"

Fixes: 2f220c639a2a ("spi: renesas_rpc_spi: Add R-Car Gen3 and RZ/G2 fallback compatibility string")
Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/drivers/spi/renesas_rpc_spi.c b/drivers/spi/renesas_rpc_spi.c
index d0ff918af8..0724a03a34 100644
--- a/drivers/spi/renesas_rpc_spi.c
+++ b/drivers/spi/renesas_rpc_spi.c
@@ -454,7 +454,7 @@ static const struct udevice_id rpc_spi_ids[] = {
 	{ .compatible = "renesas,rpc-r8a77965" },
 	{ .compatible = "renesas,rpc-r8a77970" },
 	{ .compatible = "renesas,rpc-r8a77995" },
-	{ .compatible = "renesas,rcar-gen3-rpc" },
+	{ .compatible = "renesas,rcar-gen3-rpc-if" },
 	{ }
 };
 
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] spi: renesas_rpc_spi: Fix fallback compatibility string
  2021-01-04 17:38 [PATCH] spi: renesas_rpc_spi: Fix fallback compatibility string Adam Ford
@ 2021-01-05 12:08 ` Biju Das
  2021-01-12 21:53   ` Adam Ford
  0 siblings, 1 reply; 4+ messages in thread
From: Biju Das @ 2021-01-05 12:08 UTC (permalink / raw)
  To: u-boot

Hi Adam,

Thanks for the patch.

> -----Original Message-----
> From: Adam Ford <aford173@gmail.com>
> Sent: 04 January 2021 17:38
> To: u-boot at lists.denx.de
> Cc: jagan at amarulasolutions.com; Biju Das <biju.das.jz@bp.renesas.com>;
> Adam Ford <aford173@gmail.com>
> Subject: [PATCH] spi: renesas_rpc_spi: Fix fallback compatibility string
> 
> A generic compatibility string was added, but it doesn't match the name
> used by Linux or the device tree bindings from any of the SoC's.
> Fix it to read "renesas,rcar-gen3-rpc-if"

The framework used in Linux and u-boot are different. On Linux there is Core RPC-IF driver which has the above compatible string, with support for both spi flash and hyperflash support.

Where as in u-boot, it is supporting only rpc spi flash. Since the driver is not supporting hyperflash in u-boot, may be we could reuse "renesas,rcar-gen3-rpc-if" just for rpc spi flash.

Marek, What do you think?

Cheers,
Biju

> 
> Fixes: 2f220c639a2a ("spi: renesas_rpc_spi: Add R-Car Gen3 and RZ/G2
> fallback compatibility string")
> Signed-off-by: Adam Ford <aford173@gmail.com>
> 
> diff --git a/drivers/spi/renesas_rpc_spi.c b/drivers/spi/renesas_rpc_spi.c
> index d0ff918af8..0724a03a34 100644
> --- a/drivers/spi/renesas_rpc_spi.c
> +++ b/drivers/spi/renesas_rpc_spi.c
> @@ -454,7 +454,7 @@ static const struct udevice_id rpc_spi_ids[] = {
>  	{ .compatible = "renesas,rpc-r8a77965" },
>  	{ .compatible = "renesas,rpc-r8a77970" },
>  	{ .compatible = "renesas,rpc-r8a77995" },
> -	{ .compatible = "renesas,rcar-gen3-rpc" },
> +	{ .compatible = "renesas,rcar-gen3-rpc-if" },
>  	{ }
>  };
> 
> --
> 2.25.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] spi: renesas_rpc_spi: Fix fallback compatibility string
  2021-01-05 12:08 ` Biju Das
@ 2021-01-12 21:53   ` Adam Ford
  2021-01-13  7:05     ` Biju Das
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Ford @ 2021-01-12 21:53 UTC (permalink / raw)
  To: u-boot

On Tue, Jan 5, 2021 at 6:08 AM Biju Das <biju.das.jz@bp.renesas.com> wrote:
>
> Hi Adam,
>
> Thanks for the patch.
>
> > -----Original Message-----
> > From: Adam Ford <aford173@gmail.com>
> > Sent: 04 January 2021 17:38
> > To: u-boot at lists.denx.de
> > Cc: jagan at amarulasolutions.com; Biju Das <biju.das.jz@bp.renesas.com>;
> > Adam Ford <aford173@gmail.com>
> > Subject: [PATCH] spi: renesas_rpc_spi: Fix fallback compatibility string
> >
> > A generic compatibility string was added, but it doesn't match the name
> > used by Linux or the device tree bindings from any of the SoC's.
> > Fix it to read "renesas,rcar-gen3-rpc-if"
>
> The framework used in Linux and u-boot are different. On Linux there is Core RPC-IF driver which has the above compatible string, with support for both spi flash and hyperflash support.

Does the hyperflash have a separate .compatible entry?

> Where as in u-boot, it is supporting only rpc spi flash. Since the driver is not supporting hyperflash in u-boot, may be we could reuse "renesas,rcar-gen3-rpc-if" just for rpc spi flash.

It seems like we should make the driver compatible flag match,
otherwise, we'll be needing to add additional -u-boot.dtsi files with
these compatibility flags.

>
> Marek, What do you think?

Gentle nudge.


adam
>
> Cheers,
> Biju
>
> >
> > Fixes: 2f220c639a2a ("spi: renesas_rpc_spi: Add R-Car Gen3 and RZ/G2
> > fallback compatibility string")
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> >
> > diff --git a/drivers/spi/renesas_rpc_spi.c b/drivers/spi/renesas_rpc_spi.c
> > index d0ff918af8..0724a03a34 100644
> > --- a/drivers/spi/renesas_rpc_spi.c
> > +++ b/drivers/spi/renesas_rpc_spi.c
> > @@ -454,7 +454,7 @@ static const struct udevice_id rpc_spi_ids[] = {
> >       { .compatible = "renesas,rpc-r8a77965" },
> >       { .compatible = "renesas,rpc-r8a77970" },
> >       { .compatible = "renesas,rpc-r8a77995" },
> > -     { .compatible = "renesas,rcar-gen3-rpc" },
> > +     { .compatible = "renesas,rcar-gen3-rpc-if" },
> >       { }
> >  };
> >
> > --
> > 2.25.1
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] spi: renesas_rpc_spi: Fix fallback compatibility string
  2021-01-12 21:53   ` Adam Ford
@ 2021-01-13  7:05     ` Biju Das
  0 siblings, 0 replies; 4+ messages in thread
From: Biju Das @ 2021-01-13  7:05 UTC (permalink / raw)
  To: u-boot

Hi Adam,

Thanks for the reply.

> -----Original Message-----
> Subject: Re: [PATCH] spi: renesas_rpc_spi: Fix fallback compatibility
> string
> 
> On Tue, Jan 5, 2021 at 6:08 AM Biju Das <biju.das.jz@bp.renesas.com>
> wrote:
> >
> > Hi Adam,
> >
> > Thanks for the patch.
> >
> > > -----Original Message-----
> > > From: Adam Ford <aford173@gmail.com>
> > > Sent: 04 January 2021 17:38
> > > To: u-boot at lists.denx.de
> > > Cc: jagan at amarulasolutions.com; Biju Das
> > > <biju.das.jz@bp.renesas.com>; Adam Ford <aford173@gmail.com>
> > > Subject: [PATCH] spi: renesas_rpc_spi: Fix fallback compatibility
> > > string
> > >
> > > A generic compatibility string was added, but it doesn't match the
> > > name used by Linux or the device tree bindings from any of the SoC's.
> > > Fix it to read "renesas,rcar-gen3-rpc-if"
> >
> > The framework used in Linux and u-boot are different. On Linux there is
> Core RPC-IF driver which has the above compatible string, with support for
> both spi flash and hyperflash support.
> 
> Does the hyperflash have a separate .compatible entry?

Core driver [1] and documentation[2] is  here
[1]https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/memory/renesas-rpc-if.c?h=next-20210113
[2]https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/Documentation/devicetree/bindings/memory-controllers/renesas,rpc-if.yaml?h=next-20210113

As per [2], hyperflash uses same compatible string and there is no compatible stuff defined in hyperflash driver[3]
[3] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/mtd/hyperbus/rpc-if.c?h=next-20210113

> 
> > Where as in u-boot, it is supporting only rpc spi flash. Since the
> driver is not supporting hyperflash in u-boot, may be we could reuse
> "renesas,rcar-gen3-rpc-if" just for rpc spi flash.

Sorry , just found that U-boot have hyperflash support[4] and it uses compatible string "renesas,rpc".
[4] https://elixir.bootlin.com/u-boot/v2021.01-rc5/source/drivers/mtd/renesas_rpc_hf.c

Thanks,
Biju


> >
> > >
> > > Fixes: 2f220c639a2a ("spi: renesas_rpc_spi: Add R-Car Gen3 and RZ/G2
> > > fallback compatibility string")
> > > Signed-off-by: Adam Ford <aford173@gmail.com>
> > >
> > > diff --git a/drivers/spi/renesas_rpc_spi.c
> > > b/drivers/spi/renesas_rpc_spi.c index d0ff918af8..0724a03a34 100644
> > > --- a/drivers/spi/renesas_rpc_spi.c
> > > +++ b/drivers/spi/renesas_rpc_spi.c
> > > @@ -454,7 +454,7 @@ static const struct udevice_id rpc_spi_ids[] = {
> > >       { .compatible = "renesas,rpc-r8a77965" },
> > >       { .compatible = "renesas,rpc-r8a77970" },
> > >       { .compatible = "renesas,rpc-r8a77995" },
> > > -     { .compatible = "renesas,rcar-gen3-rpc" },
> > > +     { .compatible = "renesas,rcar-gen3-rpc-if" },
> > >       { }
> > >  };
> > >
> > > --
> > > 2.25.1
> >

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-13  7:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04 17:38 [PATCH] spi: renesas_rpc_spi: Fix fallback compatibility string Adam Ford
2021-01-05 12:08 ` Biju Das
2021-01-12 21:53   ` Adam Ford
2021-01-13  7:05     ` Biju Das

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.