From patchwork Tue Jul 25 06:26:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 9861255 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 E5927602B1 for ; Tue, 25 Jul 2017 06:29:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D42B328403 for ; Tue, 25 Jul 2017 06:29:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C67AF285E8; Tue, 25 Jul 2017 06:29:41 +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=ham 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 6D6C928403 for ; Tue, 25 Jul 2017 06:29:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750803AbdGYG3j (ORCPT ); Tue, 25 Jul 2017 02:29:39 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:21014 "EHLO relmlie4.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750757AbdGYG3g (ORCPT ); Tue, 25 Jul 2017 02:29:36 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie4.idc.renesas.com with ESMTP; 25 Jul 2017 15:29:34 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 47FF26B42B; Tue, 25 Jul 2017 15:29:34 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.40,410,1496070000"; d="scan'208";a="251202691" Received: from mail-os2jpn01lp0152.outbound.protection.outlook.com (HELO JPN01-OS2-obe.outbound.protection.outlook.com) ([23.103.139.152]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2017 15:29:33 +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=tlWpQr5JaFzTfT9jzZ/MelTYqrlSpBwh8zmJwUxSNjQ=; b=SFoUGfQNCBddYgJfefTPVaIxvCtH9r6q/ohMHp0SMK9hwx5Ph5QH9479NrmzYt3k4rUjxjkKl4OUuEtNA2Me5weS5mK4zJEsdjQrlAn02OZJgpPjnCH9cTSVknvQwDeC3RFA5+b1ZG7yII4h2DcXSXBfupXCgBPYuYU5KVd3qIY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.138) by TY1PR06MB0992.apcprd06.prod.outlook.com (10.164.99.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1282.10; Tue, 25 Jul 2017 06:29:30 +0000 From: Yoshihiro Shimoda To: , , , , , , CC: , Yoshihiro Shimoda Subject: [PATCH] clk: renesas: rcar-usb2-clock-sel: Add R-Car USB 2.0 clock selector PHY Date: Tue, 25 Jul 2017 15:26:27 +0900 Message-ID: <1500963987-4627-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.138] X-ClientProxiedBy: KAWPR01CA0050.jpnprd01.prod.outlook.com (10.165.48.160) To TY1PR06MB0992.apcprd06.prod.outlook.com (10.164.99.26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 44e6ff89-3597-4083-719b-08d4d32681e9 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(48565401081)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:TY1PR06MB0992; X-Microsoft-Exchange-Diagnostics: 1; TY1PR06MB0992; 3:zLSVumUkqtw01x5ysjvcKZDIXxEX2BwDJNEn7yYReb9+ukvZ1ZM1Oz7B8thRdBETzPdFgWFaeGSKVXiKOQVjax3gebzqhUo33Rl3gnNVwKV0sbc6s30FCixJSGWEGUJrtZDheE9QoHppSWT7FKhaKgsRb3YkuHbtqk8Wc9TiIe9emRKX5e73QoUkSXnHgXM+GquEXfBp4MprC4BzPcmcTdP/zEpK6sraKBO54kmS8JeQi2ETqpnycP1ytmK5p6GjgzSk40YR37DMq2ac2e99o/sQrW8h0UTpR1icZsWlOiQsz8LNHi4T8i4Nzu3G1zBk3C45gplgKljiLvWV4lxLaB4pZbnlPX1mqqkm7PjxnZrIu1wlYtRhctuDpx0T9KsH4D82nqvumaR37eBDrvq4YSfw4MG2qYAICQg5roxJT3cLXlAmQoAK+w6g3DhxM16ZvTCYz+cQGhgOg58b18JgGP9m+1+fgv0OgY9cLjJQoPUWRWjmVf+wGOzVIfQCIBREEweL8UtbtPIXNfI/vXyqiqsj721mQHdvMDd4vu3ajE+xNcD6Fit6W0bzQ5N1BvQ4fXjA6t6PKoIhmVCy2qpHb4T0QKE3BjLPQsyrHJQU/DUI414KJYeC4iNrM70ASdZ7xfIcsZXM414CubHwTgwL9PYSZkZ0wO0twS+swml908cg59IZrp6VLLv6UHeu6g0oHV2GiRMBo8jNKurc5SddraBs+31kou7n4OylBaERkhJN8FANCl592WkhgyASBjPz2u086SDN1976AZwTWe2+WA== X-MS-TrafficTypeDiagn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iio/frJrKsdW/3rbAk23Ptlt6nPwytx01SqBLSI36n7GWA57ik6c0679MnpkScp2tWS9Zuy58s9KOTxQ0oEeVPMjBvWI73hbCukuQJNfMl4tWEIgdH5HZzViBSv1FXh6HP X-Exchange-Antispam-Report-Test: UriScan:(788757137089)(21532816269658); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(100000703101)(100105400095)(10201501046)(3002001)(6055026)(6041248)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061750153)(20161123562025)(20161123560025)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:TY1PR06MB0992; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:TY1PR06MB0992; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; TY1PR06MB0992; 4:ccCU3xTAbiGDqvWfXw+ZU5KPy+4pIQxmB/V9rO85l2?= =?us-ascii?Q?VxjY4UoUyCVlcjJpcZjyEM/bf44pjfcGT6I4mbUS4HfFFXiJ2sbTFjUaS+oe?= =?us-ascii?Q?hNd4xRWM6BtzXXZN221RGyUx4/9uaQcxgtHT1yzNA4AR7g/5sow2O844PH1N?= =?us-ascii?Q?VEV1ER62NiezN+KGuNI/3fUtSqfYWpFxm9DeWsnW3et/JJGB1/WP8TCLe9zu?= =?us-ascii?Q?B/tBlptZt70vosP9m41Llhc5d+KqFTqJXl6wfMTXdlWj5+vsTrLea7bjYUAA?= =?us-ascii?Q?g04kZL6q/abJR1g1WWfLCW/3eUNKe1SBwAKjjtnUw0RTGIJorFV6JItqmP37?= =?us-ascii?Q?6Fu/5mvlGK74Y7fxC5TfKBNBvnywFbucek3IdS1Dq2snKK8wFYjcj+zY1ibb?= =?us-ascii?Q?FrH/QHjSnn+jVi5RHafUO3OkZVFuwKEE01KJ9yuwTmK+i0XWd9pH3VZVUiqL?= =?us-ascii?Q?TL0EOjsD7uejksdH5e+jEHw//SBClJ6jL/YTl4Up3sNfLjlN/QiK3aew6fGv?= =?us-ascii?Q?LYwkBX4t11xEYZipFUGnkq8na0T43uR+HnX84gndf0FY+jTRmkenedNwfw8N?= =?us-ascii?Q?boY7p3uWPZz0NVGV1lQIwHuUJa5Pvm7tgZbPeichDNjP6wjid20PfT49rgo6?= =?us-ascii?Q?Q7ipDG5Rsy827cmw4A02iUm9IbXV+9iXoe0un6qfekEn8/w9KKazdbWEWI+4?= =?us-ascii?Q?JQOOHA7owmgYghn25xAzfVP1ZQISEeCDRid7sxJcjMsiVO9QeUZT4vtk/mJY?= =?us-ascii?Q?gthyTM+8XyLhZ5T/mr/tCYw8Ry/d2TOlBHEsnwpbGxp9I4CHXn1L6kBroEU+?= =?us-ascii?Q?CZW66VXNOSmCxzjzvcyXSGhY/gHTHXS0QBcWf6udyeqWQS0AE5kWRiY/RKvB?= =?us-ascii?Q?9zpiUPLIlWNtj/U1w0anaVCTavobRphn8YXsMKSfNy4xxqWHKgYtAwi9EbuU?= =?us-ascii?Q?5x0XCRAZbeJVq5OFeGM3JzpKHKq6oDRNP1DA+QDWP8CABWToLcrwDAiJtsRv?= =?us-ascii?Q?WXovpoB+cDAH7GxMME5OEaS3hdM+Lb3OjMA1pyE/Va2qtAZy4Jb2/psBuYvx?= =?us-ascii?Q?rJacVz4SLlkwEgZK8RKdzhHD+WAtfLbqxrgO3K4dwQKZwANGA+nn4NEsxvrX?= =?us-ascii?Q?8k1S+TBl1dovRYOnb39C9+NxysQ7qDw3FKWSyHnV8NAleP+OMjs9wHnfnZDW?= =?us-ascii?Q?NMsbKehVKsPs6bUOMyldEL7dn7e4AD3mjCb/vOarvlDIKa78gbrHe70g=3D?= =?us-ascii?Q?=3D?= X-Forefront-PRVS: 03793408BA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(7370300001)(6009001)(6069001)(39850400002)(39840400002)(39860400002)(39400400002)(39410400002)(39450400003)(189002)(199003)(50226002)(42882006)(47776003)(6512007)(101416001)(498600001)(189998001)(2906002)(54906002)(53936002)(6666003)(50986999)(66066001)(6306002)(97736004)(5003940100001)(107886003)(33646002)(38730400002)(68736007)(25786009)(966005)(6486002)(106356001)(7736002)(5660300001)(42186005)(50466002)(3846002)(305945005)(6506006)(36756003)(4326008)(81166006)(7350300001)(81156014)(8676002)(105586002)(78352004)(48376002)(6116002)(230783001)(2004002)(3720700003)(309714004); DIR:OUT; SFP:1102; SCL:1; SRVR:TY1PR06MB0992; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:0; A:0; LANG:en; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; TY1PR06MB0992; 23:qiSaiKAETCA6QUKiMGtpbrDqoPBQjyhSwQuw2oU3y?= =?us-ascii?Q?b723WPjiY0DYhMbDhz4QyHAs1IWxFBEaoU0m+S8GwqP/PVKjNnMn2PNLEYbB?= =?us-ascii?Q?xSrbt42ms6CAgHZLRoyDD6UXpyipfLMQ4Di9OP63x9E3VQV0i6gsHno4fPGn?= =?us-ascii?Q?Xq90lMm0IZ16SAqqvTAAq+utnI2MO4mvqyLEf2avvQOCYGlr5GFhM3NXuOgJ?= =?us-ascii?Q?rkwM3rb3BDbuuZFhsfxl0ocFtpl6gpEHzMuufSRH1IDOBjLWClAywKP7ew2g?= =?us-ascii?Q?e8d/2rgFOAa+oUxAjfbQsMsdrMKotf4E5CPenky48ewOYYP75EeW3/HeURWk?= =?us-ascii?Q?dlr9Um/RzaWhxveiKpKPaCVtdwX/QN82t4nHF2vjijGTO/5hQt0g223N3qwX?= =?us-ascii?Q?DKWRcAheOJlh6StM+bNRRlU9dL/ySTCFa8tXLIOJnO8D2NVlzjun/q7TRGz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=?us-ascii?Q?R/Vxhv8WJxRS/bK0Kqgikd65Yg2OJNJX1Crub0CKdyOd0NeFA/EpM8Bb+De2?= =?us-ascii?Q?RfbQDp91dQinEAX9QubSW2HSf+yaQ7RtZba2bLDVQNOsoU/VxeVSlzaKjJ4V?= =?us-ascii?Q?IhqUTmXlgXi9dpfNFKCGQMirN3kaglQNRKQ7Hk60MiWv1862e901YCudf3ud?= =?us-ascii?Q?e1RMVL/9qgbUf1o7lcnHcTZ8enSiyTMMlTgms5yRNwmgC3GU3kk4wiC+1lzo?= =?us-ascii?Q?QQhYDQO1Fjfm1Fx/U4Bh5V?= X-Microsoft-Exchange-Diagnostics: 1; TY1PR06MB0992; 5:ONNMsSQBogqPyIBRHqtvTrZpT8oVtTd1Q7RDmCgd0EIjntquiVaAWqAoFczqsh1IilIcCSUncW94Hc5ar4ywXORlr3tWLOAg9s0cC6rF5ZDjd50JrL+WKRwKQKTrdX6urd18781VD3Ja/2gc2NOTzKEKbszBph36BUOP9Fy3uq4ObYG1+MYhW17FbgbDBFTx1a3//el9EbMCQ2ber0rW6UOxfjOVUjKT+desSnw2jVuOMhbTzff3MxHcFK3Ky4fZyak9t3GvDR9Re4KZZO2Wfn52zTl0emvAHpaHuhT9v2MJGO4GvdM02CoG0ycn0/WrJFULULFRuim1o6UghKvWzL11k8w+O4NCXoDalYn/m0sxXUlPMBsZt5Zuhb6DQIxcvHLG2HwvbUtTSUeV4ej5Zma7TDvqhJ5zn6tpPc4EQUTN16hK2cWnPcKIZ6VN2encS+DlzwCufn3/Ikf//ACSGrPpa6S6AH6u/RPaWeSRUFd2LR5iV1NPHs1P/9T99+4E; 24:lzQw+8yFmY+BZ6m42wUlmUiY5rhLeDKC2WxjhMCvT/JQaBlhy1RGpmTtNAlgWGi0DQWXqeA4cemDIBc9sMwyRCmSHqa68hW0b7314LVJ7i4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; TY1PR06MB0992; 7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25 Jul 2017 06:29:30.6297 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY1PR06MB0992 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-07-18-v4.13-rc1 tag. Changes from v2: - Fix the example of device tree doc. - Replace some 8 spaces to a tab in the device tree doc. - Add Rob's Acked-by for the doc. - Drop CLK_IS_BASIC on init.flag. - Use of_clk_add_hw_provider() instead of of_clk_add_provider(). - Use builtin_platform_driver() instead of syscall_init_sync(). - Use pm_runtime APIs instead of clk APIs for "ehci_ohci" clk. 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 | 55 ++++++ drivers/clk/renesas/Kconfig | 5 + drivers/clk/renesas/Makefile | 1 + drivers/clk/renesas/rcar-usb2-clock-sel.c | 188 +++++++++++++++++++++ 4 files changed, 249 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..e96e085 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/renesas,rcar-usb2-clock-sel.txt @@ -0,0 +1,55 @@ +* 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 + +Example (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"; + #clock-cells = <0>; + }; diff --git a/drivers/clk/renesas/Kconfig b/drivers/clk/renesas/Kconfig index 85526ca..6fb89fd 100644 --- a/drivers/clk/renesas/Kconfig +++ b/drivers/clk/renesas/Kconfig @@ -114,6 +114,11 @@ config CLK_RCAR_GEN3_CPG bool "R-Car Gen3 CPG clock support" if COMPILE_TEST 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..2fe7225 --- /dev/null +++ b/drivers/clk/renesas/rcar-usb2-clock-sel.c @@ -0,0 +1,188 @@ +/* + * 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 +#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; + 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); + pm_runtime_put(dev); + + return 0; +} + +static int rcar_usb2_clock_sel_resume(struct device *dev) +{ + struct usb2_clock_sel_priv *priv = dev_get_drvdata(dev); + + pm_runtime_get_sync(dev); + usb2_clock_sel_enable_extal_only(priv); + + return 0; +} + +static int rcar_usb2_clock_sel_remove(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct usb2_clock_sel_priv *priv = platform_get_drvdata(pdev); + + of_clk_del_provider(dev->of_node); + clk_hw_unregister(&priv->hw); + pm_runtime_put(dev); + pm_runtime_disable(dev); + + return 0; +} + +static int 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; + + 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); + + pm_runtime_enable(dev); + pm_runtime_get_sync(dev); + + 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 = 0; + 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); + + return of_clk_add_hw_provider(np, of_clk_hw_simple_get, &priv->hw); +} + +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", + .of_match_table = rcar_usb2_clock_sel_match, + .pm = &rcar_usb2_clock_sel_pm_ops, + }, + .probe = rcar_usb2_clock_sel_probe, + .remove = rcar_usb2_clock_sel_remove, +}; +builtin_platform_driver(rcar_usb2_clock_sel_driver); + +MODULE_DESCRIPTION("Renesas R-Car USB2 clock selector Driver"); +MODULE_LICENSE("GPL v2");