From patchwork Wed Jun 28 06:28:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 9813547 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 86AB66020A for ; Wed, 28 Jun 2017 06:31:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 786C023794 for ; Wed, 28 Jun 2017 06:31:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C27C2684F; Wed, 28 Jun 2017 06:31:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C1F52621B for ; Wed, 28 Jun 2017 06:31:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751475AbdF1Gbc (ORCPT ); Wed, 28 Jun 2017 02:31:32 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:50639 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751010AbdF1Gb3 (ORCPT ); Wed, 28 Jun 2017 02:31:29 -0400 Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie3.idc.renesas.com with ESMTP; 28 Jun 2017 15:31:26 +0900 Received: from relmlii2.idc.renesas.com (relmlii2.idc.renesas.com [10.200.68.66]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id BF50972D01; Wed, 28 Jun 2017 15:31:26 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.40,274,1496070000"; d="scan'208";a="249163429" Received: from mail-sg2apc01lp0244.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.244]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 28 Jun 2017 15:31:25 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=YJ4+avagc3Azj2px3d3RlBCfk5lLzYs4Nldq819lvd4=; b=LmQTC/K/pGpFRe7blta3F8+iRlsscYuu/sTtL8odbBHQ2Jm31+QX1gcSYaERcztJzo1+oMRddCMugq6YYPtC4VxCu6uu/paQmSNHTuP0aqrvvM14UKp1Eq2yBJw7oudb3bPDsJ8tkwhkzup2nq5axh5r2WPQBCfB9yPx6ELJFqs= Authentication-Results: baylibre.com; dkim=none (message not signed) header.d=none; baylibre.com; dmarc=none action=none header.from=renesas.com; Received: from localhost.localdomain (211.11.155.144) by HK2PR06MB0978.apcprd06.prod.outlook.com (2a01:111:e400:589d::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15; Wed, 28 Jun 2017 06:31:22 +0000 From: Yoshihiro Shimoda To: , , , , , , CC: , Yoshihiro Shimoda Subject: [PATCH v2] clk: renesas: rcar-usb2-clock-sel: Add R-Car USB 2.0 clock selector PHY Date: Wed, 28 Jun 2017 15:28:35 +0900 Message-ID: <1498631315-15730-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: HK2PR02CA0123.apcprd02.prod.outlook.com (2a01:111:e400:79aa::49) To HK2PR06MB0978.apcprd06.prod.outlook.com (2a01:111:e400:589d::24) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b71ae7b0-a627-4584-e6b4-08d4bdef4bd5 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506082)(300135500095); SRVR:HK2PR06MB0978; X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0978; 3:N74qx706oA0NtSyxDYpk6iJzvZ2m4bTA+zrJP74n85hhnJKcnh2WK3MzTbUSEQhhPi9LGyD0OAa9tqfNuKJZTMgwpaZK4zRkHC4M20VvVKttdBRvkDZpKs7+f/GAn5ImrIFxNtcpC4mJwAUFTUxeVzH96SZGLEDFufDXklHngIP2oYSsA/+AAfgjqACvrpDFlW+GIZUEHnPSGUWMNbIQBQgPBtyOhj5tLs/gpHDGeT7V9A44ekOCjINxFHrotqZ3Q+II8LEAoG6B1W+IVwt/Lhbwyf5t4GXETnbHbWSledROGYC4Z5X2zLbuMN99xQQC1RBBX1YlFmcRmev257sycJbvEaE5o4H0+WAbB0VPixu0Y+/XiJcFdn5vXdZrCDkTQV4mYtDD1AQjjwAvBz7SH8OJzsXzX+t76385TqevdyQ1qa7PXizSIup3lc05bRunf4LYUpK9rGgrE1JAVWwllqFbHxgS1idaoSXg6lqWY5cPa+Wg+aDV7tSg7WHMXhpCVjbHALcM7srVyIaiT8hZRrnI4VSuR6sLDIiPkbtdjU0o/5aMmXhni1I6L0blxkjgHvUq5pF7szSH2X4rVaoRIEOdRuM4pSjm8QUZZSPEx70msCOpa/wv6IAzzHTlitR56RXLqPW4Gc4ayrrk0/ZVgEgdFKxYZpeOcEuuDLX9hpPAdngXeIW7/pSeBDTgJaKvHIWJbGJXweKfvX+Z+9PtRQLuofFBUnGeXWJMM1AMW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SoWikIvB5xZY3NPY1pQ2cJVvG/rtzzuCiQVBPfNQ7PbehPZ938TgQsbfUi9zNzM1kGm+FNEjQR8opnAbu9smddn2Se+QotwGYxhufTjcyEH7HYt5SZlL0DyQv1hjXSJiWU9fNn4T48KjjcUdLVzgdXDcC3J8ZEaCS+ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(133145235818549)(236129657087228)(148574349560750)(21532816269658); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(10201501046)(3002001)(100000703101)(100105400095)(6055026)(6041248)(20161123562025)(20161123555025)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061750153)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HK2PR06MB0978; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HK2PR06MB0978; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HK2PR06MB0978; 4:mdUbYGf8aHqYQ4ij+owgvXgT8sX5jyWlyLFqIZJ0vx?= =?us-ascii?Q?/MXyIELDO2Ow5DAlh4DPGFw+MfknVAKQLpxFPKBHaU9oOVZHYYO3eYh9PHlu?= =?us-ascii?Q?Bacb2dqAr7UT5D/OCxucuFFdBEkH8oQtxyjDvxYSjkiIoai9OWQiHAr4LMzj?= =?us-ascii?Q?FUSfRDmD6g5H31tZJPig/ZdfsPe4TWCyk+4gwfNOFMteMYG6Y1DP76aAEX9C?= =?us-ascii?Q?ljMSYM2R6dbE/bHOVk5VE7JmlIvLheG5V8S4U8eUMEG0G9kV0XAGYOdtHE/f?= =?us-ascii?Q?LasSR77mwYTs0VtgvOa+QItmQ+oI2W2oenduuo1O82IOWRV2zgot3K6FXsWG?= =?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7aCSdliZq9JXsJoAdKhtYual9Q00ZhmATE9Kt1v/e?= =?us-ascii?Q?DArbZxMA/BurAivpSxczZmTYbq9mwvoSQb0MXYVqpPqgkJDOc7iYqVsGUv1Q?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 03524FBD26 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(6069001)(39850400002)(39840400002)(39860400002)(39410400002)(39400400002)(39450400003)(6666003)(54906002)(189998001)(107886003)(33646002)(6306002)(53936002)(6486002)(42186005)(7736002)(6506006)(25786009)(6512007)(78352004)(5003940100001)(36756003)(230783001)(48376002)(50226002)(2906002)(50986999)(305945005)(966005)(498600001)(38730400002)(3846002)(8676002)(47776003)(66066001)(42882006)(5660300001)(6116002)(50466002)(4326008)(81166006)(68736007)(2004002)(309714004); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR06MB0978; H:localhost.localdomain; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HK2PR06MB0978; 23:HGBJYdheDNMD2LXs6E7EQe6OgnIfewdy0s1bnkEZ8?= =?us-ascii?Q?FKglt4WiT/7R1GRNiIku2CVufkW/x7/A2VrAkBGLmi7CBH9GiwLP1Ogv4+UA?= =?us-ascii?Q?UA6p2LQ/Uc/MqexwjLX0qOkYEUixhhzWE+QnIEn3ZVcbvMeyiWCuJMfXhIoe?= =?us-ascii?Q?MLdtepMkbqF3i5Qo/xIP+EUyQa/bn29FPCcuoqvt3M13U8Ecw4z41+xfvVRO?= =?us-ascii?Q?ad/0sKeVuGJ+oQuuVtY117kQ+UwI8Uyp1DZnMt0Z8MMgRhoxXJVx5IE8uJIb?= =?us-ascii?Q?95xL0JoZL06wdcfWhyGEuiDJ3Hu24+v6srUPczTd3/hu5TwlMsKfW0nwJTA8?= =?us-ascii?Q?gUJ6qi+hM86N6ry/oto6D17PuhHnfsYpnys/IQr/b4JQvWilQK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RZLjcUY4ue1NM0g?= =?us-ascii?Q?htzFnj8QHKxek54P0Hh2fiLYjTSDTtIz7bwTE2GGihsW2fqoPCPlP15SO/Ug?= =?us-ascii?Q?AsMNqPjOy8KMFFtiSe+A05?= X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0978; 5:t5brWWqki1A2iQXJqXQavK08rmS4mhNjLqLrpQ1WQ34XC9z2ZWyJdvPA+89aMPNWaYyPJ+iiT57kzAmA3XRNk8W7+Xnt8dDvl9jZMWo+uFbOc60cGYUZzjavf6FajPSqguZVXuKlnwNzdGIlmRObXTzKWHjluNx8EWZZu0CVDkOTjDLRY7ins6tdKTX2JCnDO2GERViJ2yJcQb2lRs8lRt1YNAutDQZSqVxpvSMtH4n8DjxsJp0X4WroFwdxJO2ziYyZb8VqzpohcWP5SNRJt29B/lPUMuct0gv+nsRBoI8+tKxCVZ9YFZq14rvK0Q4/Luk8lLD2tkXKyS9Tdnj6gHzTkVf3clL9nE+CclGjg9JFEp09ROcqsdnBM+DzxU/gyExPe13vroWHA1x/d00ii7Nn1HQWg9RVrow7zFzONdKilureglOCZybiCl312gix2qRtzLkJOLn7s+YwcJvBfYBNfkkSeSeRD3ORw+NtO72JXHJsuHDk+TDpmjCG/z97; 24:kEr2xlRI5GpziWhUetMDRrEy4yclp9LckNwdpFZzuB+/H3KdIzq1yRNROivhSVOyBhZlplIve8lw8EP03BXv8cdhaLuyMBuBTtkwWwh4m2M= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0978; 7:xNdvojNiiMT7GNV2sl169wIzJPNvrZcQP4khulPOiKZmWYFjb/f8sgZjfC5stj2E+zx97PK4NMLEnsrASVTp3xkVjb83mxOae6dsyv2jRW5TsaysaoB2wMBGO5u+1QuLWkwR2yTpaiH246RJHcVf5g3S56OyMtCUaXOnO1524WEeh42DlkLu/Tq5dFFhRZzIpNTa3GXq5+PbW9HlgbWHdjLbmSwsY/YuZf/Z1WK3kikGhjiNsnM9VPcMuXAvPxv/RK/BFCMy2AiFaXexgYB2jJvpgwPIPFJoyPIPeTuqMzwVord4onR2Y8tH2D/Bs92kiZc6PhN6alEgslhNEg18ATYR6OCyHYz77E13oz06sditKJfS5ImH3f8xJcIH2nCXqdp1mPzZmrlCOBloZfH4h+lwNXodqbyLmdF809uW+ZQH6BtZxnn2tUOpJNfJFwvBjDMNTIQsCPlvHZHtHGw2Z4LHdXboU2nIxjGHfgQCziKJ9NUxze/RKkZ8Yi1Dq/sWbxIolDQdcsM5R4Szdh9vxNHBU4LJeq8vjuAQxZBtG/HxH75J4DtZ0rfWmIJz8pAnpB0zaAgO9129vRGdTyNKZnKUoEeHf1b0N6hZTdaT/sgNJEybELuw/RKm/snCKNcaxlMw+MPEGH4RZglpeCTFgObmg7HOSPRWCnaVuBl7XjC4WOfaN0U6BD/wn5ZmJxRDOqwWgDDJWiKGJUO16Rz71vjhoQ+WIKw1k5AOKDt2mQWEqlpwWW5yPXg6rjkm+033y2TleTp2xJ5hdcNvdTBFqSSTTPrNaC8vgWRLir5oW9U= X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB0978; 20:DC0lV9eeeOoGCxFQeUKG8Wyr0AVwAV/TnIsSjVhvnNh0fa+YF39tIK8EAFCKDv4ov0RVb/xpo8j+ejQzlRmFNN0rnMezor+Z/26NM1Ikwx7tNZpPb0KkngUOxHSYOElOAnYwTAAuddBtSAsfx6qLw3HZ+Jl86Dxjqt3F+/q6QHI= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2017 06:31:22.4787 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR06MB0978 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP R-Car USB 2.0 controller 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 clock driver. Signed-off-by: Yoshihiro Shimoda Acked-by: Rob Herring --- This patch is based on the renesas-drivers.git / renesas-drivers-2017-06-27-v4.12-rc7 tag. Changes from v1: - Change this driver as a clock driver from a generic phy driver. https://patchwork.kernel.org/patch/9788697/ - Remove "RFC" tag. .../bindings/clock/renesas,rcar-usb2-clock-sel.txt | 54 ++++++ drivers/clk/renesas/Kconfig | 5 + drivers/clk/renesas/Makefile | 1 + drivers/clk/renesas/rcar-usb2-clock-sel.c | 205 +++++++++++++++++++++ 4 files changed, 265 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/renesas,rcar-usb2-clock-sel.txt create mode 100644 drivers/clk/renesas/rcar-usb2-clock-sel.c diff --git a/Documentation/devicetree/bindings/clock/renesas,rcar-usb2-clock-sel.txt b/Documentation/devicetree/bindings/clock/renesas,rcar-usb2-clock-sel.txt new file mode 100644 index 0000000..75ccafc --- /dev/null +++ b/Documentation/devicetree/bindings/clock/renesas,rcar-usb2-clock-sel.txt @@ -0,0 +1,54 @@ +* Renesas R-Car USB 2.0 clock selector + +This file provides information on what the device node for the R-Car USB 2.0 +clock selector. + +If you connect an external clock to the USB_EXTAL pin only, you should set +the clock rate to "usb_extal" node only. +If you connect an oscillator to both the USB_XTAL and USB_EXTAL, this module +is not needed because this is default setting. (Of course, you can set the +clock rates to both "usb_extal" and "usb_xtal" nodes. + +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" clock. + +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. + +Required properties: +- compatible: "renesas,r8a7795-rcar-usb2-clock-sel" if the device is a part of + an R8A7795 SoC. + "renesas,r8a7796-rcar-usb2-clock-sel" if the device if a part of + an R8A7796 SoC. + "renesas,rcar-gen3-usb2-clock-sel" for a generic R-Car Gen3 + compatible device. + + When compatible with the generic version, nodes must list the + SoC-specific version corresponding to the platform first + followed by the generic version. + +- reg: offset and length of the USB 2.0 clock selector register block. +- clocks: A list of phandles and specifier pairs. +- clock-names: Name of the clocks. + - The functional clock must be "ehci_ohci" + - The USB_EXTAL clock pin must be "usb_extal" + - The USB_XTAL clock pin must be "usb_xtal" +- #clock-cells: Must be 0 + +Exxample (R-Car H3): + + usb2_clksel: clock-controller@e6590630 { + compatible = "renesas,r8a77950-rcar-usb2-clock-sel", + "renesas,rcar-gen3-usb2-clock-sel"; + reg = <0 0xe6590630 0 0x02>; + clocks = <&cpg CPG_MOD 703>, <&usb_extal>, <&usb_xtal>; + clock-names = "ehci_ohci", "usb_extal", "usb_xtal"; + }; diff --git a/drivers/clk/renesas/Kconfig b/drivers/clk/renesas/Kconfig index 78d1df9..094df5c 100644 --- a/drivers/clk/renesas/Kconfig +++ b/drivers/clk/renesas/Kconfig @@ -114,6 +114,11 @@ config CLK_RCAR_GEN3_CPG bool select CLK_RENESAS_CPG_MSSR +config CLK_RCAR_USB2_CLOCK_SEL + bool "Renesas R-Car USB2 clock selector support" + depends on ARCH_RENESAS || COMPILE_TEST + help + This is a driver for R-Car USB2 clock selector # Generic config CLK_RENESAS_CPG_MSSR diff --git a/drivers/clk/renesas/Makefile b/drivers/clk/renesas/Makefile index 02d0412..4eec85b 100644 --- a/drivers/clk/renesas/Makefile +++ b/drivers/clk/renesas/Makefile @@ -19,6 +19,7 @@ obj-$(CONFIG_CLK_SH73A0) += clk-sh73a0.o obj-$(CONFIG_CLK_RCAR_GEN2) += clk-rcar-gen2.o obj-$(CONFIG_CLK_RCAR_GEN2_CPG) += rcar-gen2-cpg.o obj-$(CONFIG_CLK_RCAR_GEN3_CPG) += rcar-gen3-cpg.o +obj-$(CONFIG_CLK_RCAR_USB2_CLOCK_SEL) += rcar-usb2-clock-sel.o # Generic obj-$(CONFIG_CLK_RENESAS_CPG_MSSR) += renesas-cpg-mssr.o diff --git a/drivers/clk/renesas/rcar-usb2-clock-sel.c b/drivers/clk/renesas/rcar-usb2-clock-sel.c new file mode 100644 index 0000000..b48b2fc --- /dev/null +++ b/drivers/clk/renesas/rcar-usb2-clock-sel.c @@ -0,0 +1,205 @@ +/* + * Renesas R-Car USB2.0 clock selector + * + * Copyright (C) 2017 Renesas Electronics Corp. + * + * Based on renesas-cpg-mssr.c + * + * Copyright (C) 2015 Glider bvba + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define USB20_CLKSET0 0x00 +#define CLKSET0_INTCLK_EN BIT(11) +#define CLKSET0_PRIVATE BIT(0) +#define CLKSET0_EXTAL_ONLY (CLKSET0_INTCLK_EN | CLKSET0_PRIVATE) + +struct usb2_clock_sel_priv { + void __iomem *base; + struct clk_hw hw; + struct clk *ehci_clk; + bool extal; + bool xtal; +}; +#define to_priv(_hw) container_of(_hw, struct usb2_clock_sel_priv, hw) + +static void usb2_clock_sel_enable_extal_only(struct usb2_clock_sel_priv *priv) +{ + u16 val = readw(priv->base + USB20_CLKSET0); + + pr_debug("%s: enter %d %d %x\n", __func__, + priv->extal, priv->xtal, val); + + if (priv->extal && !priv->xtal && val != CLKSET0_EXTAL_ONLY) + writew(CLKSET0_EXTAL_ONLY, priv->base + USB20_CLKSET0); +} + +static void usb2_clock_sel_disable_extal_only(struct usb2_clock_sel_priv *priv) +{ + if (priv->extal && !priv->xtal) + writew(CLKSET0_PRIVATE, priv->base + USB20_CLKSET0); +} + +static int usb2_clock_sel_enable(struct clk_hw *hw) +{ + usb2_clock_sel_enable_extal_only(to_priv(hw)); + + return 0; +} + +static void usb2_clock_sel_disable(struct clk_hw *hw) +{ + usb2_clock_sel_disable_extal_only(to_priv(hw)); +} + +/* + * This module seems a mux, but this driver assumes a gate because + * ehci/ohci platform drivers don't support clk_set_parent() for now. + * If this driver acts as a gate, ehci/ohci-platform drivers don't need + * any modification. + */ +static const struct clk_ops usb2_clock_sel_clock_ops = { + .enable = usb2_clock_sel_enable, + .disable = usb2_clock_sel_disable, +}; + +static const struct of_device_id rcar_usb2_clock_sel_match[] = { + { .compatible = "renesas,rcar-gen3-usb2-clock-sel" }, + { } +}; + +static int rcar_usb2_clock_sel_suspend(struct device *dev) +{ + struct usb2_clock_sel_priv *priv = dev_get_drvdata(dev); + + usb2_clock_sel_disable_extal_only(priv); + clk_disable_unprepare(priv->ehci_clk); + + return 0; +} + +static int rcar_usb2_clock_sel_resume(struct device *dev) +{ + struct usb2_clock_sel_priv *priv = dev_get_drvdata(dev); + int error; + + error = clk_prepare_enable(priv->ehci_clk); + if (error) + return error; + usb2_clock_sel_enable_extal_only(priv); + + return 0; +} + +static int rcar_usb2_clock_sel_remove(struct platform_device *pdev) +{ + struct usb2_clock_sel_priv *priv = platform_get_drvdata(pdev); + + clk_disable_unprepare(priv->ehci_clk); + of_clk_del_provider(pdev->dev.of_node); + clk_hw_unregister(&priv->hw); + + return 0; +} + +static int __init rcar_usb2_clock_sel_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct device_node *np = dev->of_node; + struct usb2_clock_sel_priv *priv; + struct resource *res; + struct clk *clk; + struct clk_init_data init; + int error; + + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + priv->base = devm_ioremap_resource(dev, res); + if (IS_ERR(priv->base)) + return PTR_ERR(priv->base); + + priv->ehci_clk = devm_clk_get(dev, "ehci_ohci"); + if (!IS_ERR(priv->ehci_clk)) { + error = clk_prepare_enable(priv->ehci_clk); + if (error) + return error; + } + + clk = devm_clk_get(dev, "usb_extal"); + if (!IS_ERR(clk) && !clk_prepare_enable(clk)) { + priv->extal = !!clk_get_rate(clk); + clk_disable_unprepare(clk); + } + clk = devm_clk_get(dev, "usb_xtal"); + if (!IS_ERR(clk) && !clk_prepare_enable(clk)) { + priv->xtal = !!clk_get_rate(clk); + clk_disable_unprepare(clk); + } + + if (!priv->extal && !priv->extal) { + dev_err(dev, "This driver needs usb_extal or usb_xtal\n"); + return -ENOENT; + } + + platform_set_drvdata(pdev, priv); + dev_set_drvdata(dev, priv); + + init.name = "rcar_usb2_clock_sel"; + init.ops = &usb2_clock_sel_clock_ops; + init.flags = CLK_IS_BASIC; + init.parent_names = NULL; + init.num_parents = 0; + priv->hw.init = &init; + + clk = clk_register(NULL, &priv->hw); + if (IS_ERR(clk)) + return PTR_ERR(clk); + + error = of_clk_add_provider(np, of_clk_src_simple_get, clk); + if (error) + return error; + + return 0; +} + +static const struct dev_pm_ops rcar_usb2_clock_sel_pm_ops = { + .suspend = rcar_usb2_clock_sel_suspend, + .resume = rcar_usb2_clock_sel_resume, +}; + +static struct platform_driver rcar_usb2_clock_sel_driver = { + .driver = { + .name = "rcar-usb2-clock-sel", + .pm = &rcar_usb2_clock_sel_pm_ops, + .of_match_table = rcar_usb2_clock_sel_match, + }, + .remove = rcar_usb2_clock_sel_remove, +}; + +static int __init rcar_usb2_clock_sel_init(void) +{ + return platform_driver_probe(&rcar_usb2_clock_sel_driver, + rcar_usb2_clock_sel_probe); +} + +/* Since this driver needs other ccf drivers, this uses subsys_initcall_sync */ +subsys_initcall_sync(rcar_usb2_clock_sel_init); + +MODULE_DESCRIPTION("Renesas R-Car USB2 clock selector Driver"); +MODULE_LICENSE("GPL v2");