Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936600AbdLSAJz (ORCPT ); Mon, 18 Dec 2017 19:09:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:47112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935504AbdLSAJx (ORCPT ); Mon, 18 Dec 2017 19:09:53 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A916C218CA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=robh@kernel.org X-Google-Smtp-Source: ACJfBotGZB7TMZVwm2V9mTb5lMso49U3lFXrSA6x2OhTMW8ss9DnIbbDDA5J512hs6iDTxdIvgzlO4qf8SXa8vB9PME= MIME-Version: 1.0 In-Reply-To: References: <1513316726-14387-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> <1513316726-14387-7-git-send-email-yoshihiro.shimoda.uh@renesas.com> <20171216180510.qh5uiu5kwz5mx7zi@rob-hp-laptop> From: Rob Herring Date: Mon, 18 Dec 2017 18:09:31 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 6/6] phy: renesas: rcar-gen3-usb2: add gpio handling To: Yoshihiro Shimoda Cc: "kishon@ti.com" , "mark.rutland@arm.com" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2261 Lines: 52 On Sun, Dec 17, 2017 at 11:16 PM, Yoshihiro Shimoda wrote: > Hi Rob, > > Thank you for your comments! > >> -----Original Message----- >> From: Rob Herring, Sent: Sunday, December 17, 2017 3:05 AM >> >> On Fri, Dec 15, 2017 at 02:45:26PM +0900, Yoshihiro Shimoda wrote: >> > Some R-Car SoCs (e.g. R-Car D3) doesn't have dedicated pins of VBUS >> > and ID. So, they may be connected to gpio pins. To handle the gpio >> > pins, this patch adds the handling of VBUS and ID pins instead of >> > dedicated pins. >> > >> > Signed-off-by: Yoshihiro Shimoda >> > --- >> > .../devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 2 + >> > drivers/phy/renesas/phy-rcar-gen3-usb2.c | 77 ++++++++++++++++++++-- >> > 2 files changed, 72 insertions(+), 7 deletions(-) >> > >> > diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt >> b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt >> > index 99b651b..999a6ef 100644 >> > --- a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt >> > +++ b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt >> > @@ -27,6 +27,8 @@ channel as USB OTG: >> > - interrupts: interrupt specifier for the PHY. >> > - vbus-supply: Phandle to a regulator that provides power to the VBUS. This >> > regulator will be managed during the PHY power on/off sequence. >> > +- vbus-gpios: use gpio to control vbus instead of dedicated pin. >> >> How does this relate to vbus-supply? A gpio-regulator doesn't work here? > > Thank you for the pointed out. You're correct. A gpio-regulator can work intead of "vbus-gpios". > So, I will drop this. > >> > +- id-gpios: use gpio to detect id instead of dedicated pin. >> >> These aren't part of the phy, but really belong in a connector node. > > I'm afraid but I don't understand "a connector node" mean. > Is it an extcon device for instance? > If so, I'll try to use extcon-usb-gpio.c instead of own gpio handling on the driver. No, extcon binding has a lot of Linuxisms in it. I mean something like hdmi-connector binding. There's been some attempts[1] for USB connectors, but nothing finalized. Rob [1] https://www.spinics.net/lists/linux-usb/msg161104.html