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


Groups > linux.kernel > #1673756

Re: [PATCH/RFC] phy: renesas: rcar-gen3-usb2-clksel: Add R-Car Gen3 USB 2.0 clock selector PHY

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Rob Herring <robh@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH/RFC] phy: renesas: rcar-gen3-usb2-clksel: Add R-Car Gen3 USB 2.0 clock selector PHY
Date Fri, 23 Jun 2017 20:30:02 +0200
Message-ID <tVBvc-5CD-1@gated-at.bofh.it> (permalink)
References <tVBvc-5CD-3@gated-at.bofh.it>
X-Original-To Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=hMLOu416enQVVD3RIEbVrD+yGGqbD7cgA4E4T908sEQ=; b=ZiZCYkCUy0Pn2X9kj2KNZKH9wZ3MtaLg1NGkH4DIsjSkJf1yM3lkwkNTvs/oO2KKnE A9unBJAqV9t/i1H29gbfbITdMNo5CB8jj+YbXiuuAUHGsyfqv/O4+xdnvLZRX0hF4wOP OIwrOjcET1dXRb1mREZwtxxjLquErjnaOaaqwFcO5fMXPlaXgb++Kdx+/jWmt48bZBv9 nAwiqNMO2ROmd893YiqBswk8XWH6Zct5uyd/iSpq0HY+lhQI46EADcA6/XeeBha61u34 7qj9jACFtJfLG77K30IartbBD17Nsw/EcuCwTRdbkVHc+XdWXGuRdVQaryDHfL7EsQ7f 0D0A==
X-Gm-Message-State AKS2vOwqAV4BJ1+bpTOdgSEJ36UP3Z9jn2d/7rHyBUSv1bGcmK8N2rpz kfg+ULOfcccG5w==
X-Received by 10.13.210.197 with SMTP id u188mr6650467ywd.231.1498242052792; Fri, 23 Jun 2017 11:20:52 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent NeoMutt/20170113 (1.7.2)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 55
Organization linux.* mail to news gateway
X-Original-Cc kishon@ti.com, mark.rutland@arm.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org
X-Original-Date Fri, 23 Jun 2017 13:20:51 -0500
X-Original-Message-ID <20170623182051.eznaqqyr6dcrdjdg@rob-hp-laptop>
X-Original-References <1497526462-9179-1-git-send-email-yoshihiro.shimoda.uh@renesas.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1673756

Show key headers only | View raw


On Thu, Jun 15, 2017 at 08:34:22PM +0900, Yoshihiro Shimoda wrote:
> USB 2.0 PHY of R-Car Gen3 can change the clock source from an oscillator
> to an external clock via a register. So, this patch adds support
> the clock source selector as a generic PHY driver.
> 
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> ---
>  This patch is based on the latest linux-phy.git / next branch
>  (commit id = 787f24543c4a599e5d9d311a3fce839ce87bbff0)
> 
>  I'm not sure this driver ss OK or not as a generic phy driver.
>  So, I send this patch as RFC.
> 
>  .../bindings/phy/rcar-gen3-phy-usb2-clksel.txt     |  58 +++++++++
>  drivers/phy/renesas/Kconfig                        |   8 ++
>  drivers/phy/renesas/Makefile                       |   1 +
>  drivers/phy/renesas/phy-rcar-gen3-usb2-clksel.c    | 129 +++++++++++++++++++++
>  4 files changed, 196 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2-clksel.txt
>  create mode 100644 drivers/phy/renesas/phy-rcar-gen3-usb2-clksel.c
> 
> diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2-clksel.txt b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2-clksel.txt
> new file mode 100644
> index 0000000..71b2f1b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2-clksel.txt
> @@ -0,0 +1,58 @@
> +* Renesas R-Car generation 3 USB 2.0 clock selector PHY
> +
> +This file provides information on what the device node for the R-Car generation
> +3 USB 2.0 clock selector PHY contains.

Is this a phy or just a clock selector and nothing else? It sounds more 
like the latter and you should use the clock binding. Whether this is a 
phy driver in the kernel is a separate question really.

> +
> +If you connect an external clock to the USB_EXTAL pin, you can use the
> +"renesas,usb_extal_only" property for it.
> +If you connect an oscillator to both the USB_XTAL and USB_EXTAL, this module
> +is not needed because this is default setting.
> +
> +Case 1: An external clock connects to R-Car SoC
> +	+----------+   +--- R-Car ---------------------+
> +	|External  |---|USB_EXTAL ---> all usb channels|
> +	|clock     |   |USB_XTAL                       |
> +	+----------+   +-------------------------------+
> +In this case, we need this driver with "usb-extal-only" property.
> +
> +Case 2: An oscillator connects to R-Car SoC
> +	+----------+   +--- R-Car ---------------------+
> +	|Oscillator|---|USB_EXTAL -+-> all usb channels|
> +	|          |---|USB_XTAL --+                   |
> +	+----------+   +-------------------------------+
> +In this case, we don't need this selector.

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH/RFC] phy: renesas: rcar-gen3-usb2-clksel: Add R-Car Gen3  USB 2.0 clock selector PHY Rob Herring <robh@kernel.org> - 2017-06-23 20:30 +0200
  RE: [PATCH/RFC] phy: renesas: rcar-gen3-usb2-clksel: Add R-Car Gen3  USB 2.0 clock selector PHY Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> - 2017-06-26 10:00 +0200

csiph-web