All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
	ijc+devicetree@hellion.org.uk, galak@codeaurora.org
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-sh@vger.kernel.org
Subject: Re: [PATCH] phy: rcar-gen3-usb2: Add R-Car Gen3 USB2 PHY driver
Date: Fri, 18 Sep 2015 06:20:13 +0000	[thread overview]
Message-ID: <55FBAA4D.3000704@ti.com> (raw)
In-Reply-To: <1440493835-6732-1-git-send-email-yoshihiro.shimoda.uh@renesas.com>

Hi,

On Tuesday 25 August 2015 02:40 PM, Yoshihiro Shimoda wrote:
> This patch adds support for R-Car generation 3 USB2 PHY driver.
> This SoC has 3 EHCI/OHCI channels, and the channel 0 is shared
> with the HSUSB (USB2.0 peripheral) device.

From the description it looks like it's a single PHY with multiple
channels. In that case you should have a singe dt node for the PHY
provider and each channel should be modelled as the child node of the
PHY provider dt node.
> 
> So, the purpose of this driver is:
>  1) initializes some registers of SoC specific to use the
>     {ehci,ohci}-platform driver.
> 
>  2) detects id pin to select host or peripheral on the channel 0.
> 
> For now, this driver only supports 1) above.
> 
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> ---
>  This patch is based on the latest linux-phy / next branch.
>  (commit id = cfd093bbb5fe84ec8c7bb069fe618159a8b601f5)
> 
>  Changes from v1:
>   - Revise some typos.
>   - Remove using clk API to enable/disable the clocks.
>     (In other words, this driver expects to enable/disable the clocks by
>      Runtime PM API by the phy-core driver.)
>   - Remove an unnecessary header file (asm/cmpxchg.h).
> 
>  .../devicetree/bindings/phy/rcar-gen3-phy-usb2.txt |  35 +++
>  drivers/phy/Kconfig                                |   6 +
>  drivers/phy/Makefile                               |   1 +
>  drivers/phy/phy-rcar-gen3-usb2.c                   | 240 +++++++++++++++++++++
>  4 files changed, 282 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
>  create mode 100644 drivers/phy/phy-rcar-gen3-usb2.c
> 
> diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> new file mode 100644
> index 0000000..1d57766
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> @@ -0,0 +1,35 @@
> +* Renesas R-Car generation 3 USB 2.0 PHY
> +
> +This file provides information on what the device node for the R-Car generation
> +3 USB 2.0 PHY contains.
> +
> +Required properties:
> +- compatible: "renesas,usb2-phy-r8a7795" if the device is a part of an R8A7795
> +	      SoC.
> +- reg: offset and length of the USB2.0 host register block.
> +- reg-names: must be "usb2".
> +- clocks: clock phandle and specifier pair(s).
> +- #phy-cells: see phy-bindings.txt in the same directory, must be <0>.
> +
> +Optional properties:
> +To use a USB channel where EHCI/OHCI and HSUSB are combined, the device tree
> +node should set HSUSB properties to reg and reg-names properties:
> +- reg: offset and length of the HSUSB register block.
> +- reg-names: must be "hsusb".
> +
> +Example (R-Car H3):
> +
> +	usb-phy@ee080200 {
> +		compatible = "renesas,usb2-phy-r8a7795";
> +		reg = <0 0xee080200 0 0x6ff>, <0 0xe6590100 0 0x100>;
> +		reg-names = "usb2", "hsusb";

hsusb is missing in Documentation.
> +		clocks = <&mstp7_clks R8A7795_CLK_EHCI0>,
> +			 <&mstp7_clks R8A7795_CLK_HSUSB>;
> +	};
> +
> +	usb-phy@ee0a0200 {
> +		compatible = "renesas,usb2-phy-r8a7795";
> +		reg = <0 0xee0a0200 0 0x6ff>;
> +		reg-names = "usb2";
> +		clocks = <&mstp7_clks R8A7795_CLK_EHCI0>;
> +	};
> diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
> index 0fe9bff..406dc43 100644
> --- a/drivers/phy/Kconfig
> +++ b/drivers/phy/Kconfig
> @@ -116,6 +116,12 @@ config PHY_RCAR_GEN2
>  	help
>  	  Support for USB PHY found on Renesas R-Car generation 2 SoCs.
>  
> +config PHY_RCAR_GEN3_USB2
> +	tristate "Renesas R-Car generation 3 USB 2.0 PHY driver"
> +	depends on GENERIC_PHY

depends on OF?

Thanks
Kishon

WARNING: multiple messages have this Message-ID (diff)
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
	ijc+devicetree@hellion.org.uk, galak@codeaurora.org
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-sh@vger.kernel.org
Subject: Re: [PATCH] phy: rcar-gen3-usb2: Add R-Car Gen3 USB2 PHY driver
Date: Fri, 18 Sep 2015 11:38:13 +0530	[thread overview]
Message-ID: <55FBAA4D.3000704@ti.com> (raw)
In-Reply-To: <1440493835-6732-1-git-send-email-yoshihiro.shimoda.uh@renesas.com>

Hi,

On Tuesday 25 August 2015 02:40 PM, Yoshihiro Shimoda wrote:
> This patch adds support for R-Car generation 3 USB2 PHY driver.
> This SoC has 3 EHCI/OHCI channels, and the channel 0 is shared
> with the HSUSB (USB2.0 peripheral) device.

>From the description it looks like it's a single PHY with multiple
channels. In that case you should have a singe dt node for the PHY
provider and each channel should be modelled as the child node of the
PHY provider dt node.
> 
> So, the purpose of this driver is:
>  1) initializes some registers of SoC specific to use the
>     {ehci,ohci}-platform driver.
> 
>  2) detects id pin to select host or peripheral on the channel 0.
> 
> For now, this driver only supports 1) above.
> 
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> ---
>  This patch is based on the latest linux-phy / next branch.
>  (commit id = cfd093bbb5fe84ec8c7bb069fe618159a8b601f5)
> 
>  Changes from v1:
>   - Revise some typos.
>   - Remove using clk API to enable/disable the clocks.
>     (In other words, this driver expects to enable/disable the clocks by
>      Runtime PM API by the phy-core driver.)
>   - Remove an unnecessary header file (asm/cmpxchg.h).
> 
>  .../devicetree/bindings/phy/rcar-gen3-phy-usb2.txt |  35 +++
>  drivers/phy/Kconfig                                |   6 +
>  drivers/phy/Makefile                               |   1 +
>  drivers/phy/phy-rcar-gen3-usb2.c                   | 240 +++++++++++++++++++++
>  4 files changed, 282 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
>  create mode 100644 drivers/phy/phy-rcar-gen3-usb2.c
> 
> diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> new file mode 100644
> index 0000000..1d57766
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> @@ -0,0 +1,35 @@
> +* Renesas R-Car generation 3 USB 2.0 PHY
> +
> +This file provides information on what the device node for the R-Car generation
> +3 USB 2.0 PHY contains.
> +
> +Required properties:
> +- compatible: "renesas,usb2-phy-r8a7795" if the device is a part of an R8A7795
> +	      SoC.
> +- reg: offset and length of the USB2.0 host register block.
> +- reg-names: must be "usb2".
> +- clocks: clock phandle and specifier pair(s).
> +- #phy-cells: see phy-bindings.txt in the same directory, must be <0>.
> +
> +Optional properties:
> +To use a USB channel where EHCI/OHCI and HSUSB are combined, the device tree
> +node should set HSUSB properties to reg and reg-names properties:
> +- reg: offset and length of the HSUSB register block.
> +- reg-names: must be "hsusb".
> +
> +Example (R-Car H3):
> +
> +	usb-phy@ee080200 {
> +		compatible = "renesas,usb2-phy-r8a7795";
> +		reg = <0 0xee080200 0 0x6ff>, <0 0xe6590100 0 0x100>;
> +		reg-names = "usb2", "hsusb";

hsusb is missing in Documentation.
> +		clocks = <&mstp7_clks R8A7795_CLK_EHCI0>,
> +			 <&mstp7_clks R8A7795_CLK_HSUSB>;
> +	};
> +
> +	usb-phy@ee0a0200 {
> +		compatible = "renesas,usb2-phy-r8a7795";
> +		reg = <0 0xee0a0200 0 0x6ff>;
> +		reg-names = "usb2";
> +		clocks = <&mstp7_clks R8A7795_CLK_EHCI0>;
> +	};
> diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
> index 0fe9bff..406dc43 100644
> --- a/drivers/phy/Kconfig
> +++ b/drivers/phy/Kconfig
> @@ -116,6 +116,12 @@ config PHY_RCAR_GEN2
>  	help
>  	  Support for USB PHY found on Renesas R-Car generation 2 SoCs.
>  
> +config PHY_RCAR_GEN3_USB2
> +	tristate "Renesas R-Car generation 3 USB 2.0 PHY driver"
> +	depends on GENERIC_PHY

depends on OF?

Thanks
Kishon

WARNING: multiple messages have this Message-ID (diff)
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	<robh+dt@kernel.org>, <pawel.moll@arm.com>,
	<mark.rutland@arm.com>, <ijc+devicetree@hellion.org.uk>,
	<galak@codeaurora.org>
Cc: <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-sh@vger.kernel.org>
Subject: Re: [PATCH] phy: rcar-gen3-usb2: Add R-Car Gen3 USB2 PHY driver
Date: Fri, 18 Sep 2015 11:38:13 +0530	[thread overview]
Message-ID: <55FBAA4D.3000704@ti.com> (raw)
In-Reply-To: <1440493835-6732-1-git-send-email-yoshihiro.shimoda.uh@renesas.com>

Hi,

On Tuesday 25 August 2015 02:40 PM, Yoshihiro Shimoda wrote:
> This patch adds support for R-Car generation 3 USB2 PHY driver.
> This SoC has 3 EHCI/OHCI channels, and the channel 0 is shared
> with the HSUSB (USB2.0 peripheral) device.

>From the description it looks like it's a single PHY with multiple
channels. In that case you should have a singe dt node for the PHY
provider and each channel should be modelled as the child node of the
PHY provider dt node.
> 
> So, the purpose of this driver is:
>  1) initializes some registers of SoC specific to use the
>     {ehci,ohci}-platform driver.
> 
>  2) detects id pin to select host or peripheral on the channel 0.
> 
> For now, this driver only supports 1) above.
> 
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> ---
>  This patch is based on the latest linux-phy / next branch.
>  (commit id = cfd093bbb5fe84ec8c7bb069fe618159a8b601f5)
> 
>  Changes from v1:
>   - Revise some typos.
>   - Remove using clk API to enable/disable the clocks.
>     (In other words, this driver expects to enable/disable the clocks by
>      Runtime PM API by the phy-core driver.)
>   - Remove an unnecessary header file (asm/cmpxchg.h).
> 
>  .../devicetree/bindings/phy/rcar-gen3-phy-usb2.txt |  35 +++
>  drivers/phy/Kconfig                                |   6 +
>  drivers/phy/Makefile                               |   1 +
>  drivers/phy/phy-rcar-gen3-usb2.c                   | 240 +++++++++++++++++++++
>  4 files changed, 282 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
>  create mode 100644 drivers/phy/phy-rcar-gen3-usb2.c
> 
> diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> new file mode 100644
> index 0000000..1d57766
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> @@ -0,0 +1,35 @@
> +* Renesas R-Car generation 3 USB 2.0 PHY
> +
> +This file provides information on what the device node for the R-Car generation
> +3 USB 2.0 PHY contains.
> +
> +Required properties:
> +- compatible: "renesas,usb2-phy-r8a7795" if the device is a part of an R8A7795
> +	      SoC.
> +- reg: offset and length of the USB2.0 host register block.
> +- reg-names: must be "usb2".
> +- clocks: clock phandle and specifier pair(s).
> +- #phy-cells: see phy-bindings.txt in the same directory, must be <0>.
> +
> +Optional properties:
> +To use a USB channel where EHCI/OHCI and HSUSB are combined, the device tree
> +node should set HSUSB properties to reg and reg-names properties:
> +- reg: offset and length of the HSUSB register block.
> +- reg-names: must be "hsusb".
> +
> +Example (R-Car H3):
> +
> +	usb-phy@ee080200 {
> +		compatible = "renesas,usb2-phy-r8a7795";
> +		reg = <0 0xee080200 0 0x6ff>, <0 0xe6590100 0 0x100>;
> +		reg-names = "usb2", "hsusb";

hsusb is missing in Documentation.
> +		clocks = <&mstp7_clks R8A7795_CLK_EHCI0>,
> +			 <&mstp7_clks R8A7795_CLK_HSUSB>;
> +	};
> +
> +	usb-phy@ee0a0200 {
> +		compatible = "renesas,usb2-phy-r8a7795";
> +		reg = <0 0xee0a0200 0 0x6ff>;
> +		reg-names = "usb2";
> +		clocks = <&mstp7_clks R8A7795_CLK_EHCI0>;
> +	};
> diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
> index 0fe9bff..406dc43 100644
> --- a/drivers/phy/Kconfig
> +++ b/drivers/phy/Kconfig
> @@ -116,6 +116,12 @@ config PHY_RCAR_GEN2
>  	help
>  	  Support for USB PHY found on Renesas R-Car generation 2 SoCs.
>  
> +config PHY_RCAR_GEN3_USB2
> +	tristate "Renesas R-Car generation 3 USB 2.0 PHY driver"
> +	depends on GENERIC_PHY

depends on OF?

Thanks
Kishon

  parent reply	other threads:[~2015-09-18  6:20 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-20  6:28 [PATCH] phy: rcar-gen3-usb2: Add R-Car Gen3 USB2 PHY driver Yoshihiro Shimoda
2015-08-20  6:28 ` Yoshihiro Shimoda
2015-08-20  6:28 ` Yoshihiro Shimoda
     [not found] ` <1440052098-4840-1-git-send-email-yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2015-08-24 12:13   ` Geert Uytterhoeven
2015-08-24 12:13     ` Geert Uytterhoeven
2015-08-24 12:13     ` Geert Uytterhoeven
     [not found]     ` <CAMuHMdXshUCWs=sbVA8pBmsdOm3GwkWJ5NN8YCDXYX_6W5QFAg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-25  5:48       ` Yoshihiro Shimoda
2015-08-25  5:48         ` Yoshihiro Shimoda
2015-08-25  5:48         ` Yoshihiro Shimoda
2015-08-25  9:10 ` Yoshihiro Shimoda
2015-08-25  9:10   ` Yoshihiro Shimoda
2015-08-25  9:10   ` Yoshihiro Shimoda
2015-09-18  4:29   ` Yoshihiro Shimoda
2015-09-18  6:08   ` Kishon Vijay Abraham I [this message]
2015-09-18  6:20     ` Kishon Vijay Abraham I
2015-09-18  6:08     ` Kishon Vijay Abraham I
2015-09-21 14:01     ` Rob Herring
2015-09-21 14:01       ` Rob Herring
2015-09-25 12:42       ` Yoshihiro Shimoda
2015-10-01 10:01       ` Yoshihiro Shimoda
2015-10-01 10:01         ` Yoshihiro Shimoda
     [not found]     ` <55FBAA4D.3000704-l0cyMroinI0@public.gmane.org>
2015-09-25 12:41       ` Yoshihiro Shimoda
2015-09-25 12:41         ` Yoshihiro Shimoda
2015-09-25 12:41         ` Yoshihiro Shimoda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55FBAA4D.3000704@ti.com \
    --to=kishon@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.