Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751922AbdFZHxG (ORCPT ); Mon, 26 Jun 2017 03:53:06 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:23642 "EHLO relmlie4.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751367AbdFZHw5 (ORCPT ); Mon, 26 Jun 2017 03:52:57 -0400 X-IronPort-AV: E=Sophos;i="5.39,394,1493650800"; d="scan'208";a="247924612" From: Yoshihiro Shimoda To: Rob Herring CC: "kishon@ti.com" , "mark.rutland@arm.com" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" Subject: RE: [PATCH/RFC] phy: renesas: rcar-gen3-usb2-clksel: Add R-Car Gen3 USB 2.0 clock selector PHY Thread-Topic: [PATCH/RFC] phy: renesas: rcar-gen3-usb2-clksel: Add R-Car Gen3 USB 2.0 clock selector PHY Thread-Index: AQHS5cu3kdczopC4dEqgE9XQISUIqaIyz0uAgAQFrPA= Date: Mon, 26 Jun 2017 07:52:52 +0000 Message-ID: References: <1497526462-9179-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> <20170623182051.eznaqqyr6dcrdjdg@rob-hp-laptop> In-Reply-To: <20170623182051.eznaqqyr6dcrdjdg@rob-hp-laptop> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=renesas.com; x-originating-ip: [211.11.155.141] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;TY1PR06MB0991;20:evMRNc5XmSUZ6b+/fKrz9BnticArMvYI6GkE/l9DzbmPCxPWj3v1o+IZqRdzJelf1C8k/K14TnHEBp1oGjxfX6Z56krAcsSGs00VRpPEzUfQE3BFyaxQXzX2CAnWYmEsk+8VmzPBBxywyG5OjZiOPQf3fs5VpnVbDtRIF0sC1ys= x-ms-office365-filtering-correlation-id: eb23e781-a7a5-4a0a-ee84-08d4bc685933 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254075)(300000503095)(300135400095)(48565401081)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506067)(300135500095);SRVR:TY1PR06MB0991; x-ms-traffictypediagnostic: TY1PR06MB0991: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(133145235818549)(236129657087228)(148574349560750)(21532816269658)(209349559609743); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(3002001)(6055026)(6041248)(20161123558100)(20161123562025)(20161123555025)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:TY1PR06MB0991;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:TY1PR06MB0991; x-forefront-prvs: 0350D7A55D x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39410400002)(39450400003)(39850400002)(39860400002)(39840400002)(377454003)(24454002)(13464003)(66066001)(6116002)(102836003)(8936002)(74316002)(2950100002)(86362001)(33656002)(53936002)(6506006)(55016002)(54906002)(9686003)(99286003)(6916009)(2900100001)(305945005)(4326008)(5660300001)(6246003)(122556002)(110136004)(478600001)(345774005)(6436002)(14454004)(50986999)(76176999)(3280700002)(230783001)(54356999)(3660700001)(8676002)(25786009)(81166006)(7736002)(2906002)(229853002)(3846002)(189998001)(77096006)(7696004)(38730400002);DIR:OUT;SFP:1102;SCL:1;SRVR:TY1PR06MB0991;H:TY1PR06MB0992.apcprd06.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jun 2017 07:52:52.3403 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY1PR06MB0991 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v5Q7rAE7000973 Content-Length: 2990 Lines: 68 Hi, > -----Original Message----- > From: Rob Herring > Sent: Saturday, June 24, 2017 3:21 AM > > 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 > > --- > > 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. Thank you for the comment. This is just a clock selector. So, I will try to make a clock driver for this. Best regards, Yoshihiro Shimoda > > + > > +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.