linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] reset: uniphier-glue: Add Pro5 USB3 support
@ 2019-09-10  1:55 Kunihiko Hayashi
  2019-09-10  7:48 ` Philipp Zabel
  2019-09-13 14:36 ` Rob Herring
  0 siblings, 2 replies; 5+ messages in thread
From: Kunihiko Hayashi @ 2019-09-10  1:55 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Masahiro Yamada
  Cc: devicetree, linux-arm-kernel, linux-kernel, Masami Hiramatsu,
	Jassi Brar, Kunihiko Hayashi

Pro5 SoC has same scheme of USB3 reset as Pro4, so the data for Pro5 is
equivalent to Pro4.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
---
 Documentation/devicetree/bindings/reset/uniphier-reset.txt | 5 +++--
 drivers/reset/reset-uniphier-glue.c                        | 4 ++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/reset/uniphier-reset.txt b/Documentation/devicetree/bindings/reset/uniphier-reset.txt
index ea00517..e320a8c 100644
--- a/Documentation/devicetree/bindings/reset/uniphier-reset.txt
+++ b/Documentation/devicetree/bindings/reset/uniphier-reset.txt
@@ -130,6 +130,7 @@ this layer. These clocks and resets should be described in each property.
 Required properties:
 - compatible: Should be
     "socionext,uniphier-pro4-usb3-reset" - for Pro4 SoC USB3
+    "socionext,uniphier-pro5-usb3-reset" - for Pro5 SoC USB3
     "socionext,uniphier-pxs2-usb3-reset" - for PXs2 SoC USB3
     "socionext,uniphier-ld20-usb3-reset" - for LD20 SoC USB3
     "socionext,uniphier-pxs3-usb3-reset" - for PXs3 SoC USB3
@@ -141,12 +142,12 @@ Required properties:
 - clocks: A list of phandles to the clock gate for the glue layer.
 	According to the clock-names, appropriate clocks are required.
 - clock-names: Should contain
-    "gio", "link" - for Pro4 SoC
+    "gio", "link" - for Pro4 and Pro5 SoCs
     "link"        - for others
 - resets: A list of phandles to the reset control for the glue layer.
 	According to the reset-names, appropriate resets are required.
 - reset-names: Should contain
-    "gio", "link" - for Pro4 SoC
+    "gio", "link" - for Pro4 and Pro5 SoCs
     "link"        - for others
 
 Example:
diff --git a/drivers/reset/reset-uniphier-glue.c b/drivers/reset/reset-uniphier-glue.c
index a45923f..2b188b3bb 100644
--- a/drivers/reset/reset-uniphier-glue.c
+++ b/drivers/reset/reset-uniphier-glue.c
@@ -141,6 +141,10 @@ static const struct of_device_id uniphier_glue_reset_match[] = {
 		.data = &uniphier_pro4_data,
 	},
 	{
+		.compatible = "socionext,uniphier-pro5-usb3-reset",
+		.data = &uniphier_pro4_data,
+	},
+	{
 		.compatible = "socionext,uniphier-pxs2-usb3-reset",
 		.data = &uniphier_pxs2_data,
 	},
-- 
2.7.4


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

* Re: [PATCH] reset: uniphier-glue: Add Pro5 USB3 support
  2019-09-10  1:55 [PATCH] reset: uniphier-glue: Add Pro5 USB3 support Kunihiko Hayashi
@ 2019-09-10  7:48 ` Philipp Zabel
  2019-09-10 11:56   ` Kunihiko Hayashi
  2019-09-13 14:36 ` Rob Herring
  1 sibling, 1 reply; 5+ messages in thread
From: Philipp Zabel @ 2019-09-10  7:48 UTC (permalink / raw)
  To: Kunihiko Hayashi, Rob Herring, Mark Rutland, Masahiro Yamada
  Cc: devicetree, linux-arm-kernel, linux-kernel, Masami Hiramatsu, Jassi Brar

Hi Kunihiko,

On Tue, 2019-09-10 at 10:55 +0900, Kunihiko Hayashi wrote:
> Pro5 SoC has same scheme of USB3 reset as Pro4, so the data for Pro5 is
> equivalent to Pro4.
> 
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>

If it is exactly the same, you could keep using the same compatible:

> ---
>  Documentation/devicetree/bindings/reset/uniphier-reset.txt | 5 +++--
>  drivers/reset/reset-uniphier-glue.c                        | 4 ++++
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/reset/uniphier-reset.txt b/Documentation/devicetree/bindings/reset/uniphier-reset.txt
> index ea00517..e320a8c 100644
> --- a/Documentation/devicetree/bindings/reset/uniphier-reset.txt
> +++ b/Documentation/devicetree/bindings/reset/uniphier-reset.txt
> @@ -130,6 +130,7 @@ this layer. These clocks and resets should be described in each property.
>  Required properties:
>  - compatible: Should be
>      "socionext,uniphier-pro4-usb3-reset" - for Pro4 SoC USB3
> +    "socionext,uniphier-pro5-usb3-reset" - for Pro5 SoC USB3

+    "socionext,uniphier-pro5-usb3-reset", "socionext,uniphier-pro4-usb3-reset" - for Pro5 SoC USB3

[...]
> diff --git a/drivers/reset/reset-uniphier-glue.c b/drivers/reset/reset-uniphier-glue.c
> index a45923f..2b188b3bb 100644
> --- a/drivers/reset/reset-uniphier-glue.c
> +++ b/drivers/reset/reset-uniphier-glue.c
> @@ -141,6 +141,10 @@ static const struct of_device_id uniphier_glue_reset_match[] = {
>  		.data = &uniphier_pro4_data,
>  	},
>  	{
> +		.compatible = "socionext,uniphier-pro5-usb3-reset",
> +		.data = &uniphier_pro4_data,
> +	},
> +	{
>  		.compatible = "socionext,uniphier-pxs2-usb3-reset",
>  		.data = &uniphier_pxs2_data,
>  	},

And this change would not be necessary.

regards
Philipp

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

* Re: [PATCH] reset: uniphier-glue: Add Pro5 USB3 support
  2019-09-10  7:48 ` Philipp Zabel
@ 2019-09-10 11:56   ` Kunihiko Hayashi
  2019-09-10 11:59     ` Philipp Zabel
  0 siblings, 1 reply; 5+ messages in thread
From: Kunihiko Hayashi @ 2019-09-10 11:56 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: Rob Herring, Mark Rutland, Masahiro Yamada, devicetree,
	linux-arm-kernel, linux-kernel, Masami Hiramatsu, Jassi Brar

Hi Philipp,

On Tue, 10 Sep 2019 09:48:15 +0200 <p.zabel@pengutronix.de> wrote:

> Hi Kunihiko,
> 
> On Tue, 2019-09-10 at 10:55 +0900, Kunihiko Hayashi wrote:
> > Pro5 SoC has same scheme of USB3 reset as Pro4, so the data for Pro5 is
> > equivalent to Pro4.
> > 
> > Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
> 
> If it is exactly the same, you could keep using the same compatible:

This driver is derived from reset-simple, so the method to control reset
in the glue block is the same for each SoC.

And both Pro4 and Pro5 need same parent clock and reset, so the data for
these SoCs refer same parent clock names and parent reset names.

However, since the glue block itself can be different, I think that
compatible string should be distinguished for each SoC.

For example, "pxs2-usb3-reset", "ld20-usb3-reset" and "pxs3-usb-reset"
in this driver are distinguished for the same reason.

Thank you,

> 
> > ---
> >  Documentation/devicetree/bindings/reset/uniphier-reset.txt | 5 +++--
> >  drivers/reset/reset-uniphier-glue.c                        | 4 ++++
> >  2 files changed, 7 insertions(+), 2 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/reset/uniphier-reset.txt b/Documentation/devicetree/bindings/reset/uniphier-reset.txt
> > index ea00517..e320a8c 100644
> > --- a/Documentation/devicetree/bindings/reset/uniphier-reset.txt
> > +++ b/Documentation/devicetree/bindings/reset/uniphier-reset.txt
> > @@ -130,6 +130,7 @@ this layer. These clocks and resets should be described in each property.
> >  Required properties:
> >  - compatible: Should be
> >      "socionext,uniphier-pro4-usb3-reset" - for Pro4 SoC USB3
> > +    "socionext,uniphier-pro5-usb3-reset" - for Pro5 SoC USB3
> 
> +    "socionext,uniphier-pro5-usb3-reset", "socionext,uniphier-pro4-usb3-reset" - for Pro5 SoC USB3
> 
> [...]
> > diff --git a/drivers/reset/reset-uniphier-glue.c b/drivers/reset/reset-uniphier-glue.c
> > index a45923f..2b188b3bb 100644
> > --- a/drivers/reset/reset-uniphier-glue.c
> > +++ b/drivers/reset/reset-uniphier-glue.c
> > @@ -141,6 +141,10 @@ static const struct of_device_id uniphier_glue_reset_match[] = {
> >  		.data = &uniphier_pro4_data,
> >  	},
> >  	{
> > +		.compatible = "socionext,uniphier-pro5-usb3-reset",
> > +		.data = &uniphier_pro4_data,
> > +	},
> > +	{
> >  		.compatible = "socionext,uniphier-pxs2-usb3-reset",
> >  		.data = &uniphier_pxs2_data,
> >  	},
> 
> And this change would not be necessary.
> 
> regards
> Philipp

---
Best Regards,
Kunihiko Hayashi



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

* Re: [PATCH] reset: uniphier-glue: Add Pro5 USB3 support
  2019-09-10 11:56   ` Kunihiko Hayashi
@ 2019-09-10 11:59     ` Philipp Zabel
  0 siblings, 0 replies; 5+ messages in thread
From: Philipp Zabel @ 2019-09-10 11:59 UTC (permalink / raw)
  To: Kunihiko Hayashi
  Cc: Rob Herring, Mark Rutland, Masahiro Yamada, devicetree,
	linux-arm-kernel, linux-kernel, Masami Hiramatsu, Jassi Brar

Hi Kunihiko,

On Tue, 2019-09-10 at 20:56 +0900, Kunihiko Hayashi wrote:
[...]
> This driver is derived from reset-simple, so the method to control reset
> in the glue block is the same for each SoC.
> 
> And both Pro4 and Pro5 need same parent clock and reset, so the data for
> these SoCs refer same parent clock names and parent reset names.
> 
> However, since the glue block itself can be different, I think that
> compatible string should be distinguished for each SoC.

Ok, in that case I'll apply the patch as-is. Thank you for clarifying.

regards
Philipp

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

* Re: [PATCH] reset: uniphier-glue: Add Pro5 USB3 support
  2019-09-10  1:55 [PATCH] reset: uniphier-glue: Add Pro5 USB3 support Kunihiko Hayashi
  2019-09-10  7:48 ` Philipp Zabel
@ 2019-09-13 14:36 ` Rob Herring
  1 sibling, 0 replies; 5+ messages in thread
From: Rob Herring @ 2019-09-13 14:36 UTC (permalink / raw)
  To: Kunihiko Hayashi
  Cc: Philipp Zabel, Mark Rutland, Masahiro Yamada, devicetree,
	linux-arm-kernel, linux-kernel, Masami Hiramatsu, Jassi Brar,
	Kunihiko Hayashi

On Tue, 10 Sep 2019 10:55:27 +0900, Kunihiko Hayashi wrote:
> Pro5 SoC has same scheme of USB3 reset as Pro4, so the data for Pro5 is
> equivalent to Pro4.
> 
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
> ---
>  Documentation/devicetree/bindings/reset/uniphier-reset.txt | 5 +++--
>  drivers/reset/reset-uniphier-glue.c                        | 4 ++++
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>


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

end of thread, other threads:[~2019-09-13 14:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-10  1:55 [PATCH] reset: uniphier-glue: Add Pro5 USB3 support Kunihiko Hayashi
2019-09-10  7:48 ` Philipp Zabel
2019-09-10 11:56   ` Kunihiko Hayashi
2019-09-10 11:59     ` Philipp Zabel
2019-09-13 14:36 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).