Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1723947 > unrolled thread

Re: [PATCH 3/4] phy: rcar-gen3-usb2: add SoC-specific parameter for dedicated pins

Started byGeert Uytterhoeven <geert@linux-m68k.org>
First post2017-08-31 10:00 +0200
Last post2017-08-31 11:00 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 3/4] phy: rcar-gen3-usb2: add SoC-specific parameter for  dedicated pins Geert Uytterhoeven <geert@linux-m68k.org> - 2017-08-31 10:00 +0200
    RE: [PATCH 3/4] phy: rcar-gen3-usb2: add SoC-specific parameter for  dedicated pins Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> - 2017-08-31 10:20 +0200
      Re: [PATCH 3/4] phy: rcar-gen3-usb2: add SoC-specific parameter for  dedicated pins Geert Uytterhoeven <geert@linux-m68k.org> - 2017-08-31 10:30 +0200
        RE: [PATCH 3/4] phy: rcar-gen3-usb2: add SoC-specific parameter for  dedicated pins Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> - 2017-08-31 11:00 +0200

#1723947 — Re: [PATCH 3/4] phy: rcar-gen3-usb2: add SoC-specific parameter for dedicated pins

FromGeert Uytterhoeven <geert@linux-m68k.org>
Date2017-08-31 10:00 +0200
SubjectRe: [PATCH 3/4] phy: rcar-gen3-usb2: add SoC-specific parameter for dedicated pins
Message-ID<uksym-2Q9-19@gated-at.bofh.it>
Hi Shimoda-san,

On Thu, Aug 31, 2017 at 9:31 AM, Yoshihiro Shimoda
<yoshihiro.shimoda.uh@renesas.com> wrote:
> This patch adds SoC-specific parameter to avoid reading/writing
> specific registers wronly if this driver runs on a SoC which doesn't
> have dedicated pins (e.g. R-Car D3).
>
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> ---
>  drivers/phy/renesas/phy-rcar-gen3-usb2.c | 25 ++++++++++++++++++++-----
>  1 file changed, 20 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> index 4ea9902..28ebc98 100644
> --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c

> @@ -400,9 +403,18 @@ static irqreturn_t rcar_gen3_phy_usb2_irq(int irq, void *_ch)
>  }
>
>  static const struct of_device_id rcar_gen3_phy_usb2_match_table[] = {
> -       { .compatible = "renesas,usb2-phy-r8a7795" },
> -       { .compatible = "renesas,usb2-phy-r8a7796" },
> -       { .compatible = "renesas,rcar-gen3-usb2-phy" },
> +       {
> +               .compatible = "renesas,usb2-phy-r8a7795",
> +               .data = (void *)RCAR_GEN3_PHY_HAS_DEDICATED_PINS,
> +       },
> +       {
> +               .compatible = "renesas,usb2-phy-r8a7796",
> +               .data = (void *)RCAR_GEN3_PHY_HAS_DEDICATED_PINS,
> +       },
> +       {
> +               .compatible = "renesas,rcar-gen3-usb2-phy",
> +               .data = (void *)RCAR_GEN3_PHY_HAS_DEDICATED_PINS,
> +       },
>         { }
>  };

Given the generic R-Car Gen3 entry sets RCAR_GEN3_PHY_HAS_DEDICATED_PINS, you
cannot specify the fallback compatible value of "renesas,rcar-gen3-usb2-phy"
in the R-Car D3 .dtsi.

So I'm wondering, does the USB2 PHY still work (with limitations) on R-Car H3
and M3-W if you drop RCAR_GEN3_PHY_HAS_DEDICATED_PINS?
If yes, you can drop the flag from the generic entry, and R-Car D3 can specify
the generic fallback compatible value in its .dtsi, like H3 and M3-W.

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

[toc] | [next] | [standalone]


#1723967

FromYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Date2017-08-31 10:20 +0200
Message-ID<uksRH-3bX-3@gated-at.bofh.it>
In reply to#1723947
Hi Geert-san,

Thank you for the comments!

> From: Geert Uytterhoeven
> Sent: Thursday, August 31, 2017 4:51 PM
> 
> Hi Shimoda-san,
> 
> On Thu, Aug 31, 2017 at 9:31 AM, Yoshihiro Shimoda
> <yoshihiro.shimoda.uh@renesas.com> wrote:
> > This patch adds SoC-specific parameter to avoid reading/writing
> > specific registers wronly if this driver runs on a SoC which doesn't
> > have dedicated pins (e.g. R-Car D3).
> >
> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> > ---
> >  drivers/phy/renesas/phy-rcar-gen3-usb2.c | 25 ++++++++++++++++++++-----
> >  1 file changed, 20 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> > index 4ea9902..28ebc98 100644
> > --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> > +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
> 
> > @@ -400,9 +403,18 @@ static irqreturn_t rcar_gen3_phy_usb2_irq(int irq, void *_ch)
> >  }
> >
> >  static const struct of_device_id rcar_gen3_phy_usb2_match_table[] = {
> > -       { .compatible = "renesas,usb2-phy-r8a7795" },
> > -       { .compatible = "renesas,usb2-phy-r8a7796" },
> > -       { .compatible = "renesas,rcar-gen3-usb2-phy" },
> > +       {
> > +               .compatible = "renesas,usb2-phy-r8a7795",
> > +               .data = (void *)RCAR_GEN3_PHY_HAS_DEDICATED_PINS,
> > +       },
> > +       {
> > +               .compatible = "renesas,usb2-phy-r8a7796",
> > +               .data = (void *)RCAR_GEN3_PHY_HAS_DEDICATED_PINS,
> > +       },
> > +       {
> > +               .compatible = "renesas,rcar-gen3-usb2-phy",
> > +               .data = (void *)RCAR_GEN3_PHY_HAS_DEDICATED_PINS,
> > +       },
> >         { }
> >  };
> 
> Given the generic R-Car Gen3 entry sets RCAR_GEN3_PHY_HAS_DEDICATED_PINS, you
> cannot specify the fallback compatible value of "renesas,rcar-gen3-usb2-phy"
> in the R-Car D3 .dtsi.

I understood it.

> So I'm wondering, does the USB2 PHY still work (with limitations) on R-Car H3
> and M3-W if you drop RCAR_GEN3_PHY_HAS_DEDICATED_PINS?

Yes, the USB PHY still work with limitation (otg capability channel works as
peripheral mode only. Other channels are no limitation).

> If yes, you can drop the flag from the generic entry, and R-Car D3 can specify
> the generic fallback compatible value in its .dtsi, like H3 and M3-W.

I got it. I will fix this patch set.

Best regards,
Yoshihiro Shimoda

> 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

[toc] | [prev] | [next] | [standalone]


#1723993

FromGeert Uytterhoeven <geert@linux-m68k.org>
Date2017-08-31 10:30 +0200
Message-ID<ukt1n-3fk-15@gated-at.bofh.it>
In reply to#1723967
Hi Shimoda-san,

On Thu, Aug 31, 2017 at 10:15 AM, Yoshihiro Shimoda
<yoshihiro.shimoda.uh@renesas.com> wrote:
>> From: Geert Uytterhoeven
>> Sent: Thursday, August 31, 2017 4:51 PM
>> On Thu, Aug 31, 2017 at 9:31 AM, Yoshihiro Shimoda
>> <yoshihiro.shimoda.uh@renesas.com> wrote:
>> > This patch adds SoC-specific parameter to avoid reading/writing
>> > specific registers wronly if this driver runs on a SoC which doesn't
>> > have dedicated pins (e.g. R-Car D3).
>> >
>> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
>> > ---
>> >  drivers/phy/renesas/phy-rcar-gen3-usb2.c | 25 ++++++++++++++++++++-----
>> >  1 file changed, 20 insertions(+), 5 deletions(-)
>> >
>> > diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
>> > index 4ea9902..28ebc98 100644
>> > --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
>> > +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
>>
>> > @@ -400,9 +403,18 @@ static irqreturn_t rcar_gen3_phy_usb2_irq(int irq, void *_ch)
>> >  }
>> >
>> >  static const struct of_device_id rcar_gen3_phy_usb2_match_table[] = {
>> > -       { .compatible = "renesas,usb2-phy-r8a7795" },
>> > -       { .compatible = "renesas,usb2-phy-r8a7796" },
>> > -       { .compatible = "renesas,rcar-gen3-usb2-phy" },
>> > +       {
>> > +               .compatible = "renesas,usb2-phy-r8a7795",
>> > +               .data = (void *)RCAR_GEN3_PHY_HAS_DEDICATED_PINS,
>> > +       },
>> > +       {
>> > +               .compatible = "renesas,usb2-phy-r8a7796",
>> > +               .data = (void *)RCAR_GEN3_PHY_HAS_DEDICATED_PINS,
>> > +       },
>> > +       {
>> > +               .compatible = "renesas,rcar-gen3-usb2-phy",
>> > +               .data = (void *)RCAR_GEN3_PHY_HAS_DEDICATED_PINS,
>> > +       },
>> >         { }
>> >  };
>>
>> Given the generic R-Car Gen3 entry sets RCAR_GEN3_PHY_HAS_DEDICATED_PINS, you
>> cannot specify the fallback compatible value of "renesas,rcar-gen3-usb2-phy"
>> in the R-Car D3 .dtsi.
>
> I understood it.
>
>> So I'm wondering, does the USB2 PHY still work (with limitations) on R-Car H3
>> and M3-W if you drop RCAR_GEN3_PHY_HAS_DEDICATED_PINS?
>
> Yes, the USB PHY still work with limitation (otg capability channel works as
> peripheral mode only. Other channels are no limitation).

That's good to hear.

>> If yes, you can drop the flag from the generic entry, and R-Car D3 can specify
>> the generic fallback compatible value in its .dtsi, like H3 and M3-W.
>
> I got it. I will fix this patch set.

And you can drop the driver change from "[PATCH 4/4] phy: rcar-gen3-usb2: add
binding for r8a77995", as it will match against the generic fallback on D3.

Thanks.

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

[toc] | [prev] | [next] | [standalone]


#1724011

FromYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Date2017-08-31 11:00 +0200
Message-ID<uktup-3oH-1@gated-at.bofh.it>
In reply to#1723993
Hi Geert-san,

> From: Geert Uytterhoeven
> Sent: Thursday, August 31, 2017 5:27 PM
> 
> Hi Shimoda-san,
> 
> On Thu, Aug 31, 2017 at 10:15 AM, Yoshihiro Shimoda
> <yoshihiro.shimoda.uh@renesas.com> wrote:
> >> From: Geert Uytterhoeven
> >> Sent: Thursday, August 31, 2017 4:51 PM
> >> On Thu, Aug 31, 2017 at 9:31 AM, Yoshihiro Shimoda
> >> <yoshihiro.shimoda.uh@renesas.com> wrote:
< snip >
> >> Given the generic R-Car Gen3 entry sets RCAR_GEN3_PHY_HAS_DEDICATED_PINS, you
> >> cannot specify the fallback compatible value of "renesas,rcar-gen3-usb2-phy"
> >> in the R-Car D3 .dtsi.
> >
> > I understood it.
> >
> >> So I'm wondering, does the USB2 PHY still work (with limitations) on R-Car H3
> >> and M3-W if you drop RCAR_GEN3_PHY_HAS_DEDICATED_PINS?
> >
> > Yes, the USB PHY still work with limitation (otg capability channel works as
> > peripheral mode only. Other channels are no limitation).
> 
> That's good to hear.
> 
> >> If yes, you can drop the flag from the generic entry, and R-Car D3 can specify
> >> the generic fallback compatible value in its .dtsi, like H3 and M3-W.
> >
> > I got it. I will fix this patch set.
> 
> And you can drop the driver change from "[PATCH 4/4] phy: rcar-gen3-usb2: add
> binding for r8a77995", as it will match against the generic fallback on D3.

I got it. I will submit v2 patches soon.

Best regards,
Yoshihiro Shimoda

> Thanks.
> 
> 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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web