From patchwork Fri Sep 21 11:53:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10609935 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C8C7B6CB for ; Fri, 21 Sep 2018 11:56:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B91362CC66 for ; Fri, 21 Sep 2018 11:56:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADA6E2D9A0; Fri, 21 Sep 2018 11:56:22 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 2F73F2CC66 for ; Fri, 21 Sep 2018 11:56:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389944AbeIURnz (ORCPT ); Fri, 21 Sep 2018 13:43:55 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:28767 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389517AbeIURnz (ORCPT ); Fri, 21 Sep 2018 13:43:55 -0400 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie3.idc.renesas.com with ESMTP; 21 Sep 2018 20:55:21 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id A93AD7318B; Fri, 21 Sep 2018 20:55:21 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.54,284,1534777200"; d="scan'208";a="291574203" Received: from mail-ty1jpn01lp0177.outbound.protection.outlook.com (HELO JPN01-TY1-obe.outbound.protection.outlook.com) ([23.103.139.177]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-GCM-SHA384; 21 Sep 2018 20:55:21 +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:X-MS-Exchange-SenderADCheck; bh=7c5nVPTJygk3Jf7jILP/JEaXE2rxvKuCdWpU1cEPqSQ=; b=bTAEe87kqGslIiUdoJgc57dMYil/Qp1Qfk76o7HLoYdLEfnltAlUWHNRB3nuUGSYoq/iz97CNsB4FgBbvw2FNoSVQbXQ5B63jeHN8uohnKGIABIdIpEZ/jUzVHdnuFoyUvEaWv/SJWtgv9mPe0jb/yST1hPiH0eei4xOb/LOLQM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.144) by OSBPR01MB2296.jpnprd01.prod.outlook.com (2603:1096:603:26::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Fri, 21 Sep 2018 11:55:19 +0000 From: Yoshihiro Shimoda To: kishon@ti.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda Subject: [PATCH 1/8] dt-bindings: rcar-gen3-phy-usb2: add no-otg-pins property Date: Fri, 21 Sep 2018 20:53:17 +0900 Message-Id: <1537530804-19399-2-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1537530804-19399-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1537530804-19399-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TYXPR01CA0065.jpnprd01.prod.outlook.com (2603:1096:403:a::35) To OSBPR01MB2296.jpnprd01.prod.outlook.com (2603:1096:603:26::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: de87ead7-70a0-4629-2b0c-08d61fb91ae0 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(8559020)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:OSBPR01MB2296; X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;3:dfZ379iHr4LecaDq7eKHCilfmFluuQEbvslhfJIISVINwRRQ/bTc12DkvjMFZh3sYFO+l100dm42ssgvxbwp+lHBtaV/ZoGsnFXdbFJWMudH0g49uyLbqbSa7nCeo3n11bcsa2RMPIyES00HVwa8bMVqAtUZAO+rnGAnVtp/VfHShBqoJImvd0uaBuUs7I7m9SglPBdNSqZge4Qvaj6sTcBN+cds6PnK8rChNAlDcn5t9XmdBzZx2CvUMy+/QWeL;25:B2Ujk9DQoCyTJu9uFxsGfjqbFncyhRj05Az0azy31jwVAywy+JxZQdVymauXWr+iHW6naOQlVDTqYdCfZuWOJb0XDtXhmz3cwXLXyqfSrqQujX2L5mxTwB8rBL+7RiPi8qyAJ2m5++eN4GNz7ZebZopfEvYr0pN9Dh4B1mRGuyIAGdEWcoBBNqmcmE7ADRZmgS69MYGVY5iqhmnRliZ1ESiFGhsuqB/w0fgp2OoajF4Gqy0Lf4pfOxc57yK2BwciJgunWrvuiTRhAfwDStQ1cEnWkplFi5PpqNGIl/55OrUag65/2te+wXkgT0SG6ws/8USOg++PYus20pvnXEZVQA==;31:ydtN9OVYQHBGy1+0zyT/SV50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Y1DWKzw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201708071742011)(7699051);SRVR:OSBPR01MB2296;BCL:0;PCL:0;RULEID:;SRVR:OSBPR01MB2296; X-Forefront-PRVS: 0802ADD973 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(346002)(376002)(39860400002)(136003)(396003)(366004)(199004)(189003)(66066001)(4326008)(52116002)(107886003)(6512007)(486006)(6506007)(42882007)(51416003)(386003)(47776003)(78352004)(476003)(26005)(6486002)(105586002)(11346002)(956004)(2616005)(53936002)(446003)(36756003)(76176011)(69590400006)(16526019)(25786009)(97736004)(50466002)(81166006)(5660300001)(50226002)(16586007)(8676002)(6116002)(3846002)(81156014)(68736007)(316002)(48376002)(106356001)(498600001)(8936002)(305945005)(2906002)(7736002)(3720700003);DIR:OUT;SFP:1102;SCL:1;SRVR:OSBPR01MB2296;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:0;MX:0; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;23:saMcZ50Fuq0Gg21NCfpVhWb7fCSjpV9rDMFvSD5GEtXO2zWknS0AptFTZUxM4ROzFOH9Hs46uMDhLJi3PLxnIZqefFrQK4AxO1yIdDQiIQ7InsbYdp3b7zZ+XKtEnsO+hb38xVTdurbu+0xaseb8t8F8Oz5vEyyytX6pi9YixUN6jXDrG3/yYVk4wDxKyxWWJYjqYUs//oBwEqrm+2td/XXwUx7ypHZ0CAB/QxBhai2qLT7X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Tk+LoAMNdirLxcl6BttHQPdX7kTpJANU9Kgrd16ChPt0E2lh//LBu99SIxzfNyPjb4q9rBbYG8skll7RBo+1I6ClaoCwEi88ueAHngOIyecYdm2dMagxa66Xuw1Jbp0aU7TeSyoTGRDg5BDpBoPLNFE6/rSTTqvRJF6pNY SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;20:ByzVXywJ6iVJJDrjXfqd7PnsuKygHSbMp7KA/0ZyX/uCS2lgIt774cePUqvnTf9V4Iz1qY59X+89RNSQZxfGC6Ntu+OtH8Y6UvSU84wBBtiHmpFdiFVnIs4VQDhzoLloHcnCktHFWAVBdSE5hW0GVoLxiV1uVe5KuC/bGwPOeHg= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2018 11:55:19.8402 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: de87ead7-70a0-4629-2b0c-08d61fb91ae0 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB2296 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds a new optional property "renesas,no-otg-pins" which a board does not provide proper otg pins. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt index fb4a204..b90d692 100644 --- a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt +++ b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt @@ -31,6 +31,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. +- renesas,no-otg-pins: boolean, specify when a board does not provide proper + otg pins. Example (R-Car H3): From patchwork Fri Sep 21 11:53:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10609903 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B8FF26CB for ; Fri, 21 Sep 2018 11:55:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7FA52CC66 for ; Fri, 21 Sep 2018 11:55:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C1762D9A0; Fri, 21 Sep 2018 11:55:25 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 EC7092D22D for ; Fri, 21 Sep 2018 11:55:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389517AbeIURnz (ORCPT ); Fri, 21 Sep 2018 13:43:55 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:20694 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389879AbeIURnz (ORCPT ); Fri, 21 Sep 2018 13:43:55 -0400 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie3.idc.renesas.com with ESMTP; 21 Sep 2018 20:55:21 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id C25137318C; Fri, 21 Sep 2018 20:55:21 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.54,284,1534777200"; d="scan'208";a="291574204" Received: from mail-ty1jpn01lp0177.outbound.protection.outlook.com (HELO JPN01-TY1-obe.outbound.protection.outlook.com) ([23.103.139.177]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-GCM-SHA384; 21 Sep 2018 20:55:21 +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:X-MS-Exchange-SenderADCheck; bh=dtpVBrfDAxJ902LH1KDk8fPYNWagCzpqZnK/iNK9au8=; b=CMMnbPUJKgMGCVUHb1Vq+hJkT2WJnx/GKbOv9JAWef3I7RHNWILSPW9jnxJxAjvEQHviSe6WR3AARDaWJpqt4Ez93V7s7mmHoWNsTwP/eb/4IwfbNlryr9VDmi3gNyG4W1nQflEecI9kfJeVF7AsBZndEPmabWmDVbUV0tQ3b3Q= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.144) by OSBPR01MB2296.jpnprd01.prod.outlook.com (2603:1096:603:26::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Fri, 21 Sep 2018 11:55:20 +0000 From: Yoshihiro Shimoda To: kishon@ti.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda Subject: [PATCH 2/8] phy: renesas: rcar-gen3-usb2: fix vbus_ctrl for role sysfs Date: Fri, 21 Sep 2018 20:53:18 +0900 Message-Id: <1537530804-19399-3-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1537530804-19399-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1537530804-19399-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TYXPR01CA0065.jpnprd01.prod.outlook.com (2603:1096:403:a::35) To OSBPR01MB2296.jpnprd01.prod.outlook.com (2603:1096:603:26::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f286972a-c9a1-4977-027e-08d61fb91b1e X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(8559020)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:OSBPR01MB2296; X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;3:k7MfNr467H2hRx5EaL4Odpb6VNEELX9dOqdwEkvBCrPh7od6dqPA7JqW10MnmBDZ2ZiUCfF5HG3ydDyfKdQgxnaSMMn9uVID+k99WEQQiLIOAfo3KhuD9sH+VnwWrAMG0SVpb2s2aRjSAtzPshddgBZanKZWLODc8AxE0R48vsjW+7OiA2cEv+Hi75UMZmBYToFg08TV189f3+Crf8OHPO57tZqfxXAX+iT3ePew+RFSlu20+jeBPyLZkQ9IugiX;25:ePguMW65AUYBZggao/ONkw9+PXEUcZM4ai3jIOEXC5EMqwMngrXzbITmE/d6oxnAaf2lWzVC4ATzLNWdfLdwx4tZks07e5iyy1GT324rUS03PuM6H1LH7BEyzx3j+0PdbMZ+6egfilqu8GWOTCvXtIu/7Iz55KCxqMKA4pnjexEjA/q6tIh6NrnolIHtsLCYOouk+CNbgBenjC1VLiF/+C3iFQ9F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+HDJ7N58wHP1mH/22Nq15PtmmCuVkj3K+Mkj47DWQQs9n8Q2qPSHyMZOlCYseSgcmHeD+8mgYi8Ak6ZIH1cx1iSUBGspj6tAJSbxNU2oL3zbJRYU0MILL49S0CkOfW3FkT0bQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201708071742011)(7699051);SRVR:OSBPR01MB2296;BCL:0;PCL:0;RULEID:;SRVR:OSBPR01MB2296; X-Forefront-PRVS: 0802ADD973 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(346002)(376002)(39860400002)(136003)(396003)(366004)(199004)(189003)(66066001)(4326008)(52116002)(107886003)(6512007)(486006)(6506007)(42882007)(51416003)(386003)(47776003)(78352004)(476003)(26005)(6486002)(105586002)(11346002)(956004)(2616005)(53936002)(446003)(36756003)(76176011)(69590400006)(16526019)(25786009)(97736004)(50466002)(81166006)(5660300001)(50226002)(16586007)(8676002)(6116002)(3846002)(81156014)(68736007)(316002)(48376002)(14444005)(106356001)(498600001)(8936002)(305945005)(2906002)(7736002)(3720700003);DIR:OUT;SFP:1102;SCL:1;SRVR:OSBPR01MB2296;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:0;MX:0; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;23:37vZRJXc/H/ZSSmfNxtrv0dSAiiAKaBmW9dpdaPAK4G5DwGorng2jrHOZ7CRWbIbI/udwn05/uobXu+6tRT2kHKaPeAFAAQde35wAYGHOs5/1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9X1RQRvr8EHEDhaCGjNZTY3P0xIT++bs7re8Oe912P3CBcOK6NkC2NDz0Q=;7:BdFHJQ8BNbPvccK9WHfxrTOLgItBPid9IR6ib6sCuZbgj+cBsyo/TcJ06+vAF28wzeW/wemLQuz8nHcVpXOnIKesKE3s8oZE1VcR6+ot2aWjwebX+VnpjjX9HdMg5Tlq+5ayIP8+MDxRU2aJaLwqryYWa9LWG4hQgZE27QKN3tPLV1+J8G+rrCP+cA/Cznd0sjmR7NSUnteH42pTsaroWH7zpZcO1KSgm2k82IeVkFVKKXOId6VvrtiBC1UI15FN SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;20:zalyU4ku+UyuRdtsoE3QWH2IoWXQk26veypMNu5Aqvp/SqltaFby6MinQYqmqk+17V5sQA913MS7d3iwUb5L/CLsGTMltqkwdO7ewXvdHWpRZ2r/sTG5YHEHueRKFFOj46RKGNqMKhjmHgj5ojyM4CQ6Dq2jfy+e2cp0rbxcRuc= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2018 11:55:20.2485 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f286972a-c9a1-4977-027e-08d61fb91b1e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB2296 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes and issue that the vbus_ctrl is disabled by rcar_gen3_init_from_a_peri_to_a_host(), so a usb host cannot supply the vbus. Note that this condition will exit when the otg irq happens even if we don't apply this patch. Fixes: 9bb86777fb71 ("phy: rcar-gen3-usb2: add sysfs for usb role swap") Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman --- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c index 3d57ea1..a6db25c 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -195,7 +195,7 @@ static void rcar_gen3_init_from_a_peri_to_a_host(struct rcar_gen3_chan *ch) val = readl(usb2_base + USB2_OBINTEN); writel(val & ~USB2_OBINT_BITS, usb2_base + USB2_OBINTEN); - rcar_gen3_enable_vbus_ctrl(ch, 0); + rcar_gen3_enable_vbus_ctrl(ch, 1); rcar_gen3_init_for_host(ch); writel(val | USB2_OBINT_BITS, usb2_base + USB2_OBINTEN); From patchwork Fri Sep 21 11:53:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10609933 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3FB4C14BD for ; Fri, 21 Sep 2018 11:56:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FA4A2CC66 for ; Fri, 21 Sep 2018 11:56:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 23E732D9A0; Fri, 21 Sep 2018 11:56:12 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 9725D2CC66 for ; Fri, 21 Sep 2018 11:56:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390029AbeIURn5 (ORCPT ); Fri, 21 Sep 2018 13:43:57 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:23472 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389903AbeIURn4 (ORCPT ); Fri, 21 Sep 2018 13:43:56 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie2.idc.renesas.com with ESMTP; 21 Sep 2018 20:55:22 +0900 Received: from relmlii2.idc.renesas.com (relmlii2.idc.renesas.com [10.200.68.66]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id 2F77F7412B; Fri, 21 Sep 2018 20:55:22 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.54,284,1534777200"; d="scan'208";a="293141290" Received: from mail-ty1jpn01lp0179.outbound.protection.outlook.com (HELO JPN01-TY1-obe.outbound.protection.outlook.com) ([23.103.139.179]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-GCM-SHA384; 21 Sep 2018 20:55:21 +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:X-MS-Exchange-SenderADCheck; bh=HgxRHp4FYGWP0E6tlW/Of8AFfRo1i25w6H3z/ieCTO0=; b=mqX5SGT/JVRZUYtYwe7079CamZeyJtzg3NoQFZQ3iVxE/r1WUovQg88p0CKIdNUDmnvWtqGTfO4EIebqPFjqw3fx5mTayFKGRupl7tX37N0v3XqPkv8cj6U6s0gYCKFb2Wf+dykurA3oj+8OlVeou/NPMJ5GNWQPZRNNKF6Zcnc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.144) by OSBPR01MB2296.jpnprd01.prod.outlook.com (2603:1096:603:26::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Fri, 21 Sep 2018 11:55:20 +0000 From: Yoshihiro Shimoda To: kishon@ti.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda Subject: [PATCH 3/8] phy: renesas: rcar-gen3-usb2: Rename has_otg_pins to uses_otg_pins Date: Fri, 21 Sep 2018 20:53:19 +0900 Message-Id: <1537530804-19399-4-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1537530804-19399-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1537530804-19399-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TYXPR01CA0065.jpnprd01.prod.outlook.com (2603:1096:403:a::35) To OSBPR01MB2296.jpnprd01.prod.outlook.com (2603:1096:603:26::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c8054409-9ffe-4eba-2fd3-08d61fb91b58 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(8559020)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:OSBPR01MB2296; X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;3:X3nPuVSJshpYuWkKYACMcCA0b3EE1DdyJ+sOvYXG7wpvhTG0Jokps0MIJYahzEbYWN1kksWFsYvliwoc6kmRJMqgeJIfhzmtc+JNGdTni0kp65zfqNxApEpDcorxag8ilBqS8q4So92mzXue7YaPdqNaCR8TEpJV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Q1KvFwoZt34/ouq19P6rnRrQjxXmoxCxoIZppVZdxpd+Jl8iehb6X6RyFbWjjRNQsat0dRfxzCTjwWHq7jM1W4HV7gHj1/xGvunYbi27JoUqO88rb/zTl3pr2dCd6SaZr1qITeywyH/D6ndDRQK9I2QxcGzauQMfi16e1Z1BnMX+/WwkT5PNZ2ysomDHX3Z7djw+rsfi2;4:o30dO/REW0NX8UeIVc1J+zav95jUuCVc5bi+oOn7ajnL+0Wwkm6BS0YvLCtAtMUU9cXztgXrN1JHIW0jovgCSDLQVekYtGWvesmr3D216LG3+witeQrUPxYh0tRZpZPs6ojQXtH13CpXW1kKIsti+5xlZZ8nXY57uBdp2K5t4xD73ikiimcFh35ibFDHq4dbEHBwj4CZ9/a3gxot+i+4C4fJ79OVTqyhzYrSDcjXi281Iz8CzbkzT+zRMraLUcTJJTqEqJ95TvmkoTwaT/ep7Q== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201708071742011)(7699051);SRVR:OSBPR01MB2296;BCL:0;PCL:0;RULEID:;SRVR:OSBPR01MB2296; X-Forefront-PRVS: 0802ADD973 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(346002)(376002)(39860400002)(136003)(396003)(366004)(199004)(189003)(66066001)(4326008)(52116002)(107886003)(6512007)(486006)(6506007)(42882007)(51416003)(386003)(47776003)(78352004)(476003)(26005)(6486002)(105586002)(11346002)(956004)(2616005)(53936002)(446003)(36756003)(76176011)(69590400006)(16526019)(25786009)(97736004)(50466002)(81166006)(5660300001)(50226002)(16586007)(8676002)(6116002)(3846002)(81156014)(68736007)(316002)(48376002)(106356001)(498600001)(8936002)(305945005)(2906002)(7736002)(3720700003);DIR:OUT;SFP:1102;SCL:1;SRVR:OSBPR01MB2296;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:0;MX:0; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;23:yMFpz9PdrZ+URJwXWj+2WpPyLCGXNMX3HcWultdl9sXNl/5BIeNgBa1EO9cnJUx+Fn0KIIAA2QPrEi4sejDoZ3AVObQlGBZwqCif+97Edk+BUj3TcPtXtbaT0zZytOexKJFnLzorc0nnOIhUev6FsG9r+s/mAoUEZEAx0e3WLnVkDn9lPeJ9w19h9M5PA0liZTr84duYLGy1RmaPqL/loXreF9ubZIGTadK9NfA7GNoIp7iz6ud0RufNludKpdfJY6mlTWFfRzXB5hOJ7aP/EzAW2ezae/MqdQR1wSzUMmn4zaS3QPeVKog/BqBETd+EH3vQh4wh48w7r9Ew6W9l7NJfRft0beKc0zmrsQuFN3/N3w/SejWC7AQxX2ytcefNeQR18ycRHAgqn6vNSuYNmYIeOgKEy74awicTNioCaeiWIWSwOCTMXWGOovQYPL7L2SdW6aOQdLo3Ai/0HFUDmKxrmTZuUrMlK/gNXU/UpmFcKizjhVBfG4AEEAiHODYllLHq57J1SoAd6J7dPbsPQLXEr0lZQCPqAllo57h08tcIan4dq6GkGEdjINrLHq9lBwa6Up/RcBJZ3zIDK6JPHBhe9UhQWKMhlx85FekgkAslzSRIvOb1a8IJ8cmte4NpIlna30y3mNea4UquoZO3X9TsaYsu0IhsQHHxclqa6tKPKjRZQGJCMe3DCOLuDLlnBboCQBBsx7O/9O6vjbBz8DHblmWTkv52gaqlNRX7VdKhKeFlYVp5ALU213aUZvl90hl/mdfuOP98X3zgguKYA85aVFA9LNHvakILnytqo3GcaoGJIhXRUWZh+v+gDxQwVpcjRZ394VZcaehrIgt0bTP2gk1Qkueceiqj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GeNS0zmovChYYuuWdgmntJ649U+o2s7rx1B/ePaEWW3T9s/GUVzqdc3cUoBG3wLgyLfbZ740xK6pbub43JqHQAjy/Ht77Y/pkSSkuZmIGjdNiovMNFkWlm3azm4XrfCo6xYRrmmjkQ31aRlSkoRXVqUDdmYcTDUHOFKHfthWYyf7Q1bQU0HLwXWhQF0nyWH0Qg==;5:YVyBrEWldmsGO8NSMl6QO0etgA8YL9LIraSyitDe1tUkdsl60EgQ/Tl5sISrMdMxv/5hdu/5SkFeJtXbYx+6ARxwHCaQFyTql0VHM/5SJEg7lCIIc7Hh0FDPaMmKmkiUHZt/AzrUFWMRnRkfvfjVcKfZUq5H5RsICkAhFfIzGYU=;7:bIQ4WH9Mr6wv3T4jctagRClsGkNLi0A/uyhYbrhm9qYZBDMuQ1rFjj9FaxPGCuMxTI5gBoFfkDFcGIPg3am6/n836vOtqVNs8pBbzX2UNtGPq7hRsGt2CFhHN76M2h+sLC9QzXKhA2Y1hik6nnRi+MYOjs/tG7tHswu/h/dFr4S2xABPGwvJ18SQHCoDoxN5n6TwmMpmxRRXYpYZm3BkUvvDpfQbCmscXfxURYpCQC88t23vg51NjYlsQAJirQMj SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;20:xFt1qKMj8FpP0Y3r4mjtFZhNmSJ1OI+hE9l85QjbaemwATy5mV8oo42VHRCWQhGYmn33eZYF78Ot3MPmxuEkfrH3KfQbOp8j+VE4S9+0f7AanTaI4FzAZRHoEsaQZoR19fCRKgjPLDlmfGHj1NuthsIyRuri2EJOTOk1VncNJ1w= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2018 11:55:20.6307 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c8054409-9ffe-4eba-2fd3-08d61fb91b58 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB2296 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since R-Car E3 and D3 have dedicated otg pins actually, "has_otg_pins" is possible to misread in the future. So, this patch renames has_otg_pins to uses_otg_pins. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman --- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c index a6db25c..d69317e 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -87,7 +87,7 @@ struct rcar_gen3_chan { struct regulator *vbus; struct work_struct work; bool extcon_host; - bool has_otg_pins; + bool uses_otg_pins; }; static void rcar_gen3_phy_usb2_work(struct work_struct *work) @@ -234,7 +234,7 @@ static ssize_t role_store(struct device *dev, struct device_attribute *attr, bool is_b_device; enum phy_mode cur_mode, new_mode; - if (!ch->has_otg_pins || !ch->phy->init_count) + if (!ch->uses_otg_pins || !ch->phy->init_count) return -EIO; if (!strncmp(buf, "host", strlen("host"))) @@ -272,7 +272,7 @@ static ssize_t role_show(struct device *dev, struct device_attribute *attr, { struct rcar_gen3_chan *ch = dev_get_drvdata(dev); - if (!ch->has_otg_pins || !ch->phy->init_count) + if (!ch->uses_otg_pins || !ch->phy->init_count) return -EIO; return sprintf(buf, "%s\n", rcar_gen3_is_host(ch) ? "host" : @@ -311,7 +311,7 @@ static int rcar_gen3_phy_usb2_init(struct phy *p) writel(USB2_OC_TIMSET_INIT, usb2_base + USB2_OC_TIMSET); /* Initialize otg part */ - if (channel->has_otg_pins) + if (channel->uses_otg_pins) rcar_gen3_init_otg(channel); return 0; @@ -445,7 +445,7 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) if (of_usb_get_dr_mode_by_phy(dev->of_node, 0) == USB_DR_MODE_OTG) { int ret; - channel->has_otg_pins = (uintptr_t)of_device_get_match_data(dev); + channel->uses_otg_pins = (uintptr_t)of_device_get_match_data(dev); channel->extcon = devm_extcon_dev_allocate(dev, rcar_gen3_phy_cable); if (IS_ERR(channel->extcon)) @@ -487,7 +487,7 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) dev_err(dev, "Failed to register PHY provider\n"); ret = PTR_ERR(provider); goto error; - } else if (channel->has_otg_pins) { + } else if (channel->uses_otg_pins) { int ret; ret = device_create_file(dev, &dev_attr_role); @@ -507,7 +507,7 @@ static int rcar_gen3_phy_usb2_remove(struct platform_device *pdev) { struct rcar_gen3_chan *channel = platform_get_drvdata(pdev); - if (channel->has_otg_pins) + if (channel->uses_otg_pins) device_remove_file(&pdev->dev, &dev_attr_role); pm_runtime_disable(&pdev->dev); From patchwork Fri Sep 21 11:53:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10609925 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 183906CB for ; Fri, 21 Sep 2018 11:55:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0850A2CC66 for ; Fri, 21 Sep 2018 11:55:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F0D642D9A0; Fri, 21 Sep 2018 11:55:44 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 7EB562CC66 for ; Fri, 21 Sep 2018 11:55:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390096AbeIURn6 (ORCPT ); Fri, 21 Sep 2018 13:43:58 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:38762 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389914AbeIURn5 (ORCPT ); Fri, 21 Sep 2018 13:43:57 -0400 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie3.idc.renesas.com with ESMTP; 21 Sep 2018 20:55:22 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 920E67318E; Fri, 21 Sep 2018 20:55:22 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.54,284,1534777200"; d="scan'208";a="291574205" Received: from mail-ty1jpn01lp0182.outbound.protection.outlook.com (HELO JPN01-TY1-obe.outbound.protection.outlook.com) ([23.103.139.182]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-GCM-SHA384; 21 Sep 2018 20:55:22 +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:X-MS-Exchange-SenderADCheck; bh=k5nO3RxfLKtmucLdrZPX8kuokwzGPizW3J8pUBgJ2qQ=; b=oE2gqaDhUvYwI6yhVf4/RZgudG3zbW0OC4St3coRt0F7iQBeWOLm9erV9u4UvSYTSGMPB1ypfWAQjD4dqtdxAqTEVB9xG/n9vdM9B5sGcHCvAxAfvaVNW5w7m9CBeUbpO8PIbBzW4qgZmMC+cfD7g5Jeigy8UHWIjyI48RsEXmI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.144) by OSBPR01MB2296.jpnprd01.prod.outlook.com (2603:1096:603:26::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Fri, 21 Sep 2018 11:55:21 +0000 From: Yoshihiro Shimoda To: kishon@ti.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda Subject: [PATCH 4/8] phy: renesas: rcar-gen3-usb2: Check a property to use otg pins Date: Fri, 21 Sep 2018 20:53:20 +0900 Message-Id: <1537530804-19399-5-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1537530804-19399-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1537530804-19399-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TYXPR01CA0065.jpnprd01.prod.outlook.com (2603:1096:403:a::35) To OSBPR01MB2296.jpnprd01.prod.outlook.com (2603:1096:603:26::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bcae63b5-26c6-4c84-8e35-08d61fb91b97 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(8559020)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:OSBPR01MB2296; X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;3:SX0Ih9u8hDgFzXy/Kp5xSIiAqf4EtoWjqwylKQAhdmOMZ0TF6riUz1JWn8aGFxjDuiGzgbC1A+DUzSe2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dWl/vk8mSOGJp3km+HduZepHEUEJLS4a0kWlYDIUaLMiMEcJyKYieeqhiu6BNHBPKBCSuiZRKxIJJ3ENnF1PRSCM562p4oXMXfk//KGU26rolebR1xGy34/tlb7/IOKdvvoUZoQAXXjOzs2G3OmqYlP6DF2Bdg3GYcoHlwourIYhIcu8wleIsa7kEfKQvQwySSNJzgaN8ik3CTAjzfjwnqtO4OGs/hKmTTBDaw5ivyg2qRQXk3Fhcc8qgYPh5yrxMSAz;4:LUcbJ0ijR2D5xCH1LS2UgfCljaHKeBhsodaCu1A2399ap3P/mgj3y57XUHnfgJQwXPA7yZpqbm1Rvftwe/nNVV4dMjNtYzV4Tx6bPC5cBzUJ2gHr3YcggXQwpkITTUahzH6L7nyKJ89bQxVBJEu5zo1jKbrWE6GsV4a1yOlq6acqPtKaN0qVthPUT+6FPuFcpacKrMBVui7B6ArsY/i6fpf74V8Jdv+EpK41RD38UeHaWnQ9h1LubNsLnRlB8rh5FK+SWqqGThzqEMGWztbsHg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201708071742011)(7699051);SRVR:OSBPR01MB2296;BCL:0;PCL:0;RULEID:;SRVR:OSBPR01MB2296; X-Forefront-PRVS: 0802ADD973 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(346002)(376002)(39860400002)(136003)(396003)(366004)(199004)(189003)(66066001)(4326008)(52116002)(107886003)(6512007)(486006)(6506007)(42882007)(51416003)(386003)(47776003)(78352004)(476003)(26005)(6486002)(105586002)(11346002)(956004)(2616005)(53936002)(446003)(36756003)(76176011)(69590400006)(16526019)(25786009)(97736004)(50466002)(81166006)(5660300001)(50226002)(16586007)(8676002)(6116002)(3846002)(81156014)(68736007)(316002)(48376002)(106356001)(498600001)(8936002)(305945005)(2906002)(7736002)(3720700003);DIR:OUT;SFP:1102;SCL:1;SRVR:OSBPR01MB2296;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:0;MX:0; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;23:+uZAJ/rnDKrdKW43YOJVyB63LLTXStlXg6AGvzZtxGPfXpTB/3fscu+/Ckim2qN1tkuBpu4vLyyhdO+7V4L+zW5nbREIjOa/DGfh75sMBjpKhKDHFgVuvgUnzBDyc9J7sYSlQeVasvflrWZSUE/2dao97OcmYpMB7bhPaIC3e3YAzG/6ISQcFC7t4AD4Niw8cZVSNIIj4AZ5bMxpwY3ZZWA+jpfPBGdfSHSnTBZr0e10G0yz40sNB9eNJ8nd2LVHeQ5E/lCenqMHaOohmMvABiLIENTU964sLFCqxkHxt3RR1UjoRPZcekkZrrcEJkGLoyk807csJpRJX/jv8yFcEsr0jpk7rwzZh5kwxw4vi0dafBW9wfaoLG9NUAKLbwfrZIuZCCHm4+d+KToZrDApp+2T28zu1Ma+dTc5GXXOF50oeuFYvLNyqvnukcEye8FGy4WJCzZZdK6pA9uWNtwrZpna3cSf9tOKkrC7RITipWhGh4Aq1blUFbinIHx0tz+1R6LSit/OXv5NKlANl5/N5wxErVyVl/F9P0dxltWLY833VBe4dDHSZiz57FcHvgOoWLtxUoeUIztUEZC2V1bCC0ooFaQTVCH3QSCRgUi36P37iTHSGCQlf5M1NSPU94C/e9nftk2vNkmVlL/SdVarPaOLdqvuf5zY/HHhhA00lUdeRj18agFJP2hB9dWLp9roKtlKx108wVYMV+X+YszBIQuqDK0fqMZei3SIpjWMRJSfSydDiuLswEiI6ydYI99NuwDjlo8IcyVkQeqoqcKgbtzzMdJKmTI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TVyILusYrFgjSbeVdak7G8UAwxK5reSIXu6N+fkgk+Ai65pgADnPATC94Pp5Sa5jVhM0PSCEL/I4ApWJ5CqClega0JFEabrAq8HNrmJWSPOjvUSEhrSHjCgTaWQ+cTL/+4YjCPzgrIdoJ2fipxvWM+EgXEQbW6LbImwt2fh/WIDJDIUE38RtFYzjvuUFDdXAst0LbveSjYbkaRzqzJijFcbHM/1lIF4TUs7QXbFOQV4c/QH65XIp3wa4iZHScFzuYE8F7khcLADFmz6mS/cCZ5g==;5:bNW0nZKytutc1kMcRogi0/6athGppsxEKxEtCdxGZRC1qSIZBnEX2u7TDaw1WcUkgU0GxlxsJv1hQ9ofs5KNwvCs1AmvnDUqYjYwwGPjJIIwotbSCEa1GXN9gwwg2AglwcbzEnpCYBK2hkmCb+OyXBDTKOSigpPeL5Dzw1TWrm0=;7:GvimLyGH50RZ2dL2D3b2/wagrT8nO6LletmvNXgpwG4QPjQTVUcNGJ0YlqM9bPY+mgkbU/HBmD+fp/OqBQycK3oWTZeoRR4TAq7/ehtQzn14J/GEkKU8ziAef7dyVn6hncCGumxXJDMzMpQ+5vLznKHW5CyedjNGCohAgr1YtK6yEJqzx4M36JqG2T5Ex1Z0pLsMNaJzKBDB181NfXIHoDdRLmbeD5qK/ZArJy4jRCW5qWBGrU6lyfXEBKhaSN1Z SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;20:dxcSCH0SWjeQAOt2J6ZJisymyYO9ITF9JF/HS0RhLYH5YpCGqh5wCcZ1l4LRJDAioS/+Okg0kTXZAWvEk5/vcJylWB1ipzQrGQvP/awI1Gz592o8OEy2e2wPa83spgYGSUzePA9LtIw/g5eE6YSK6U3F8q4RyJ6vZj9YQlHuYTg= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2018 11:55:21.0460 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bcae63b5-26c6-4c84-8e35-08d61fb91b97 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB2296 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since All R-Car Gen3 SoCs have dedicated otg pins actually but some boards don't use the otg pins (e.g. R-Car D3 Draak and R-Car E3 Ebisu), the driver should not choose SoC model base by using rcar_gen3_phy_usb2_match_table's data. So, this patch checks a "renesas,no-otg-pins" property to set the "uses_otg_pins". Note that since r8a77995-draak.dts and r8a77990-ebisu.dts don't have 'dr_mode = "otg";' for now, if we apply this patch, no behavior changes (the value of "uses_otg_pins" is false). Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman --- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c index d69317e..856056e 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -78,8 +78,6 @@ #define USB2_ADPCTRL_IDPULLUP BIT(5) /* 1 = ID sampling is enabled */ #define USB2_ADPCTRL_DRVVBUS BIT(4) -#define RCAR_GEN3_PHY_HAS_DEDICATED_PINS 1 - struct rcar_gen3_chan { void __iomem *base; struct extcon_dev *extcon; @@ -385,21 +383,10 @@ static irqreturn_t rcar_gen3_phy_usb2_irq(int irq, void *_ch) } static const struct of_device_id rcar_gen3_phy_usb2_match_table[] = { - { - .compatible = "renesas,usb2-phy-r8a7795", - .data = (void *)RCAR_GEN3_PHY_HAS_DEDICATED_PINS, - }, - { - .compatible = "renesas,usb2-phy-r8a7796", - .data = (void *)RCAR_GEN3_PHY_HAS_DEDICATED_PINS, - }, - { - .compatible = "renesas,usb2-phy-r8a77965", - .data = (void *)RCAR_GEN3_PHY_HAS_DEDICATED_PINS, - }, - { - .compatible = "renesas,rcar-gen3-usb2-phy", - }, + { .compatible = "renesas,usb2-phy-r8a7795" }, + { .compatible = "renesas,usb2-phy-r8a7796" }, + { .compatible = "renesas,usb2-phy-r8a77965" }, + { .compatible = "renesas,rcar-gen3-usb2-phy" }, { } }; MODULE_DEVICE_TABLE(of, rcar_gen3_phy_usb2_match_table); @@ -445,7 +432,8 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) if (of_usb_get_dr_mode_by_phy(dev->of_node, 0) == USB_DR_MODE_OTG) { int ret; - channel->uses_otg_pins = (uintptr_t)of_device_get_match_data(dev); + channel->uses_otg_pins = !of_property_read_bool(dev->of_node, + "renesas,no-otg-pins"); channel->extcon = devm_extcon_dev_allocate(dev, rcar_gen3_phy_cable); if (IS_ERR(channel->extcon)) From patchwork Fri Sep 21 11:53:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10609921 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E5F526CB for ; Fri, 21 Sep 2018 11:55:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D65F82CC66 for ; Fri, 21 Sep 2018 11:55:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA05D2D9A3; Fri, 21 Sep 2018 11:55:43 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 554D72CC66 for ; Fri, 21 Sep 2018 11:55:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389914AbeIURn7 (ORCPT ); Fri, 21 Sep 2018 13:43:59 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:43153 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389981AbeIURn5 (ORCPT ); Fri, 21 Sep 2018 13:43:57 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie2.idc.renesas.com with ESMTP; 21 Sep 2018 20:55:22 +0900 Received: from relmlii2.idc.renesas.com (relmlii2.idc.renesas.com [10.200.68.66]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id E8FE97412C; Fri, 21 Sep 2018 20:55:22 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.54,284,1534777200"; d="scan'208";a="293141292" Received: from mail-ty1jpn01lp0179.outbound.protection.outlook.com (HELO JPN01-TY1-obe.outbound.protection.outlook.com) ([23.103.139.179]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-GCM-SHA384; 21 Sep 2018 20:55:22 +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:X-MS-Exchange-SenderADCheck; bh=vLD1HOx6HwspfHqwjm6K0fXvVhZ5DGJuUhmeZ+yhGmY=; b=N9YXyZ4+LDZsgzuO3E4ktXtiCpulywI7/9YMO1M4AicN16J8lFsar3JlqBJX9D5m/oSmWUFJvIzHNcYrRfO8DeA+6wo6ff8CO2fLeglO1TcfNq2NBHLSgTRreRRqyv16rgRpN6AOOQL3QmP+/hZxjztcmmnpwKjVWJnEuXr4lEI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.144) by OSBPR01MB2296.jpnprd01.prod.outlook.com (2603:1096:603:26::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Fri, 21 Sep 2018 11:55:21 +0000 From: Yoshihiro Shimoda To: kishon@ti.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda Subject: [PATCH 5/8] phy: renesas: rcar-gen3-usb2: unify OBINTEN handling Date: Fri, 21 Sep 2018 20:53:21 +0900 Message-Id: <1537530804-19399-6-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1537530804-19399-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1537530804-19399-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TYXPR01CA0065.jpnprd01.prod.outlook.com (2603:1096:403:a::35) To OSBPR01MB2296.jpnprd01.prod.outlook.com (2603:1096:603:26::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e8896231-da84-47f6-82d2-08d61fb91bd0 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(8559020)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:OSBPR01MB2296; X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;3:PcKxTgH5RhhOCIFQ87vpF7QfkGlf5fjXEmX3kJCo1q9MbP+CLLPyy69E5gCfLi+9P3XzHo1VhPJtwHnejNAUTbaFEijSi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hBQPLXRn459BIwdJztUkDqz1952JF3PeWDJVi4z2Au2LtnQXlKh3IU7naf/czZaa+ei1PCMZWdowsJIhTO3WNtyV1dwSYUKkUyR4JKAGI+I8f/gkw5jjv5IM5m5zy/y/iuTeTaSt3exgUsbzeyeg2DPFURLg0BcUd3IlXHtjEE6LbiB/Ot7A2tg+8bPGb1mQdY/dxfwuPUixPrIBoEfNVIWHIRafnCA9qzgeAKuCLkaNAb8hD2RP9n/V70NZv0;4:3CD0P5yK9YxURBqQj91zd/nXXx1N+j5pq2l9swGse4cDbbw2POMW02jDejfz5QQZ8UM35VRdf7fZab+e00ysecASQ6OHqUfXSrH2p+WdEU5/zI4iI4j8zHkq/iS8mxpZRjXk8Qaw+wHeKtvpHIBu7OYV/mAKNr0OAxqsifZORlqKyu4sNxlSFcahKxYbSmctWcX0G6tTEUHCpeKkoXKcIeSzvFS8szUjOmpIdLpgce4KYn+12MGMnuI1xMr9FmwgCwX8eCg9ieXCuDlCGoxivQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201708071742011)(7699051);SRVR:OSBPR01MB2296;BCL:0;PCL:0;RULEID:;SRVR:OSBPR01MB2296; X-Forefront-PRVS: 0802ADD973 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(346002)(376002)(39860400002)(136003)(396003)(366004)(199004)(189003)(66066001)(4326008)(52116002)(107886003)(6512007)(486006)(6506007)(42882007)(51416003)(386003)(47776003)(78352004)(476003)(26005)(6486002)(105586002)(11346002)(956004)(2616005)(53936002)(446003)(36756003)(76176011)(69590400006)(16526019)(25786009)(97736004)(50466002)(81166006)(5660300001)(50226002)(16586007)(8676002)(6116002)(3846002)(81156014)(68736007)(316002)(48376002)(106356001)(498600001)(8936002)(305945005)(2906002)(7736002)(3720700003);DIR:OUT;SFP:1102;SCL:1;SRVR:OSBPR01MB2296;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:0;MX:0; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;23:ufuDpBs7sYaaL2SYK5FkHHQr79680pXxIEhT2tRUj8cI2b3JuHajIQSlu5A3HSLw7UoccRfJX6jXsQr6V79GCckR7EWaQMncJQR+dx8AZIirn9sE0JUo06gpUtn8Wg9OH+bao3XZWUqbzPyGPNsrr6L9F3OfKtNzarWXY9Jjx9c8Qno8XZ5YOoMTHtywoMW294eHi9NujYGFg2qopOH8fH6xIT8/D2YyRj4SZXvXlRxsHDdC711cILlkRvtPaPUxwFtIfJ+Z3NoZOMjCVodKwSraN4USfQx20esfGfWRBLRKr3LQ+OyQPjKxrB0aoTKq0HsYbhrGJHngpyYNIV/T/NUIfJ6/5eHG+NYgVBTNCSnOWx04k/bTUCRswKdaSS5U7jSt57Cdmt+GDxKWGpThli8HFIBTxycNS5WY7BMH7tFzpJXwv1vVveyAOh+5q31YGacdhg+3bU6KmiHEzyrunmIyOaFRQjXpTPEqDg+VyXqxwZqPNaNomGjcp3qYMBy3/UUxuM2A0S1CK2WvWhArhdEhdTwhztreATdIMUjfszMIirJIIu41DaAxRGhdV5IaxiCrTQ32F0CuefE92X0RaVBkm/ikdJcv9ESnr7xoEnJCUXNBRF2s6xTB0+bu2zR+KC0s5UrsfAvWH73kfPPvs1N/NQcc8lVXNgnujm4Z7HztO6bfdPACbhVwB+EyKPkL60GeHPxSeicTrvNoW+T00iNIvht7HUczPcj1jWeZqOwwF83wDYM6Vu0rrnOBJdjNEEUatsnN2VEEEzejYznwXLxe6/QcMfzFOgma3KR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lWJFCpGQ6iU3iIcak/rZMVBTK9UhUByi+YFplA97qM7Q8TWOkoIF8/PoXLGqg59Qrj+ZkvqaeLKFNuw5KkhV08HXR0en1l3HN4sYxiGT0Ka8PCfx3gkLUrnFOoBxwnpwceAQsmAtnprbGVwywnaxirLt6bD3CPqhuQq+/sXmQbZCqqfcsQmwWaT7WqCIXRrrXD2JYgZhIKcXLp2DT2XFyNTtQKluG6q4hKLt4JL0Iyuww==;5:eBxf2b6N0p3WYxJNQQBioBgmt1rBsnErSicD1DkOs7GMtJErOzdA9ssXzF1wl09S5FsbBiK2hmqEuMayoG2W7b/QOPH89i8o4r89Vh8CELS6jc04pWiuenkI74U1uZ8UKcxRdcNgXVxmAOcGc42imFpAgEtEBT0Ifk1TaSBXml4=;7:3yErfCIt5mbUJMG1W4hY8Q+KsI09TJS4OC4YQtDuLzrjKQgEDFGORvAwoPKvzE9KhzhyCZGfspdgG5i6ZNkimFKDGDtqnJZyTiyXYHeAudVi1/MsuWFJdlmz2Qjc8M2Akth9I1RzuUsb7GUQ7/sgA3okUwQS5nb2qlWyCiBlF1n5ZCofLq4fXHzerft09PVTXkyOritibHZP4jSXlhArKpCloQyDe8SVKkRn4Gs2IDIuyNw/kJmzBbKgUnICLiB0 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;20:a6lSLR0na/RWerwjEZAhb93zIKO204ABsqPz5tKlT2vwxTJ5rEHeNdBoa4bPNQeqciGqBTod9g/E14AgiOWelEZKpkFMH5B+fnSDDvA84jiySWKaDncBqgtQZiJ7G28DCVRdlBfvnfOwTpkRn6k/e9iquzNJ2Uh5TXF2aSdpCEM= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2018 11:55:21.4203 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e8896231-da84-47f6-82d2-08d61fb91bd0 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB2296 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch unifies the OBINTEN handling to clean-up the code. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman --- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c index 856056e..e7eaed9 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -142,6 +142,18 @@ static void rcar_gen3_enable_vbus_ctrl(struct rcar_gen3_chan *ch, int vbus) writel(val, usb2_base + USB2_ADPCTRL); } +static void rcar_gen3_control_otg_irq(struct rcar_gen3_chan *ch, int enable) +{ + void __iomem *usb2_base = ch->base; + u32 val = readl(usb2_base + USB2_OBINTEN); + + if (enable) + val |= USB2_OBINT_BITS; + else + val &= ~USB2_OBINT_BITS; + writel(val, usb2_base + USB2_OBINTEN); +} + static void rcar_gen3_init_for_host(struct rcar_gen3_chan *ch) { rcar_gen3_set_linectrl(ch, 1, 1); @@ -187,16 +199,12 @@ static void rcar_gen3_init_for_a_peri(struct rcar_gen3_chan *ch) static void rcar_gen3_init_from_a_peri_to_a_host(struct rcar_gen3_chan *ch) { - void __iomem *usb2_base = ch->base; - u32 val; - - val = readl(usb2_base + USB2_OBINTEN); - writel(val & ~USB2_OBINT_BITS, usb2_base + USB2_OBINTEN); + rcar_gen3_control_otg_irq(ch, 0); rcar_gen3_enable_vbus_ctrl(ch, 1); rcar_gen3_init_for_host(ch); - writel(val | USB2_OBINT_BITS, usb2_base + USB2_OBINTEN); + rcar_gen3_control_otg_irq(ch, 1); } static bool rcar_gen3_check_id(struct rcar_gen3_chan *ch) @@ -286,8 +294,7 @@ static void rcar_gen3_init_otg(struct rcar_gen3_chan *ch) val = readl(usb2_base + USB2_VBCTRL); writel(val | USB2_VBCTRL_DRVVBUSSEL, usb2_base + USB2_VBCTRL); writel(USB2_OBINT_BITS, usb2_base + USB2_OBINTSTA); - val = readl(usb2_base + USB2_OBINTEN); - writel(val | USB2_OBINT_BITS, usb2_base + USB2_OBINTEN); + rcar_gen3_control_otg_irq(ch, 1); val = readl(usb2_base + USB2_ADPCTRL); writel(val | USB2_ADPCTRL_IDPULLUP, usb2_base + USB2_ADPCTRL); val = readl(usb2_base + USB2_LINECTRL1); From patchwork Fri Sep 21 11:53:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10609929 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0AD6514BD for ; Fri, 21 Sep 2018 11:56:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF0F92CC66 for ; Fri, 21 Sep 2018 11:56:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E31782D9A0; Fri, 21 Sep 2018 11:56:03 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 6CFB42CC66 for ; Fri, 21 Sep 2018 11:56:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389879AbeIURo2 (ORCPT ); Fri, 21 Sep 2018 13:44:28 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:20694 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389935AbeIURn5 (ORCPT ); Fri, 21 Sep 2018 13:43:57 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie3.idc.renesas.com with ESMTP; 21 Sep 2018 20:55:24 +0900 Received: from relmlii2.idc.renesas.com (relmlii2.idc.renesas.com [10.200.68.66]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id EB8BC7412F; Fri, 21 Sep 2018 20:55:23 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.54,284,1534777200"; d="scan'208";a="293141293" Received: from mail-ty1jpn01lp0184.outbound.protection.outlook.com (HELO JPN01-TY1-obe.outbound.protection.outlook.com) ([23.103.139.184]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-GCM-SHA384; 21 Sep 2018 20:55:23 +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:X-MS-Exchange-SenderADCheck; bh=cdukJd4V361FIUqxH4WVJQEkgQaJL12EJaMI4E4dxfw=; b=JnBxFWMjB8JoVFhAAOasEqMkONcdyybUE9iC7OnTuUGM50m2HLFmljzNCrKtU+WJ2ndTDZ5Cj8jZxItN/HSWTaYgrVOTC7eWA+0/8AD6oj5mPTb4UeN7urvCgnNtHW5KBgCcLQWjXgze0yajsrI/mv9ZDEdVrtvcFvV4e8DvuR4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.144) by OSBPR01MB2296.jpnprd01.prod.outlook.com (2603:1096:603:26::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Fri, 21 Sep 2018 11:55:21 +0000 From: Yoshihiro Shimoda To: kishon@ti.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda Subject: [PATCH 6/8] phy: renesas: rcar-gen3-usb2: change a condition "dr_mode" Date: Fri, 21 Sep 2018 20:53:22 +0900 Message-Id: <1537530804-19399-7-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1537530804-19399-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1537530804-19399-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TYXPR01CA0065.jpnprd01.prod.outlook.com (2603:1096:403:a::35) To OSBPR01MB2296.jpnprd01.prod.outlook.com (2603:1096:603:26::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2a074194-3c0c-4a1d-9309-08d61fb91c0f X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(8559020)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:OSBPR01MB2296; X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;3:j/4+9PLscpt4lGqMbMHJBanOajxDXq657N+9VDObzvC1TR2htRzT8UTBrmuUYpNqzniepWHtXVFcTGvyIyMSwuJiUjFzvGpy+lYyHrRvxvXfJcR8hZA72htl1nsgfR2T2/v+GgyHBDV+/6YWsD7x4gXudUVSbkmhxndnEZ48J2ZVaiXkZvHhwWisL0TE4jLByOr2hgwzOHfSx9D/E6q6AYsjlzkgTnaBqo3j272TU9L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649QcLVSAxblLzgxqVNsIWIoNRRf7uu7pehJUBHatbihJ/H4om9g9SLjAUC+xTBudNt5xgP1y91NjjX1OOhfY3NAL6VnV8lWUW6DKlS0TS2PfjULV62/q;4:BhGsn/BMQwbkkpVRXg7cNGvVCEQGgGqYquNKYkaflfHJ/vEVq8f/KvAVDa/jOZjQ7cSyowuJ7W+pNpWGw+A3kViVNFMYp1EFO1ePqEnpwvawgM/HLbrMwdrFz8wcElVX3aniz2Fpb4mztQElTnIAOxwLOZ9TUl2jjuar6c1Ib0qzuJ00VVFOEcwJ6rL89eUY1ZpO5UueNLgd8rRPKZgsn1ZAVa7v8We0AIkBfTeZFz5Kg5lvlTr/e/Gg1GXqAXJ/nzWtMzJRJ9bTMmW1jzCXuA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201708071742011)(7699051);SRVR:OSBPR01MB2296;BCL:0;PCL:0;RULEID:;SRVR:OSBPR01MB2296; X-Forefront-PRVS: 0802ADD973 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(346002)(376002)(39860400002)(136003)(396003)(366004)(199004)(189003)(66066001)(4326008)(52116002)(107886003)(6512007)(486006)(6506007)(42882007)(51416003)(386003)(47776003)(78352004)(476003)(26005)(6486002)(105586002)(11346002)(956004)(2616005)(53936002)(446003)(36756003)(76176011)(69590400006)(16526019)(25786009)(97736004)(50466002)(81166006)(5660300001)(50226002)(16586007)(8676002)(6116002)(3846002)(81156014)(68736007)(316002)(48376002)(14444005)(106356001)(498600001)(8936002)(305945005)(2906002)(7736002)(3720700003);DIR:OUT;SFP:1102;SCL:1;SRVR:OSBPR01MB2296;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:0;MX:0; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;23:bWfgLKQ3PpYaIM3/rqmKIo4dj//efVmqNe4GD/jegPSG9Ftn1E8zC5jsxrQnsZyI7wP+7InrpoTDAKmGfRGQZV8pTxLFPGG6h0eMt6uJRwY3Z/6EuZ1jtbDNH5Nbf5tqYMftIQVtMX0Ig84E6QiTEpDbXWikVbvCt3cBf24LHaKSmYT/OoBX2eBESSiNyvspt8m7RD67fAMGonz5GyArfGyV7IjvPCBvTZZUHI0HBlFgCNWn5hryySuEGyxML4M/wg18D8Gu9vnLVcw3NUcqQTMDDrLlGfHIiZi/fzPK02mrnGDrK7Hf5PgfLr0xhJK46HmcWBJXmolTdPTCheGpJ4nOxFQ6F9KiG/KDDH3v8YYkBMLf5J+tPxQBy3UPY1PRYRsmIUZFAp6jN8iMYRzepo0J+HVtG0PWD8Arn1Wi+PQhqETbyLtLxX5vCgNPe1ZFP/iBE0FehWjKk5yhP6WiMSKriIKVbyKL6JaDCSRE9C1BY3f15TqOqr+tIUWzEhR4kpXlbk2UbJLvH97X9ROFxl+C381bfl1MIJpnSUtmShYUHoJKthVcf9ZsKFaiRpjGBe2XZYmx1qwx3JKyGn4HN6bXAXWyTR2eQIWf2O/VTEOytb2jtJOKWZjiFRKZt0L5CDrHFhgYzTypV17PwsR95kCAVBGeBnRtRrUJbG/pzrR4vUcPvQnDGAWUrAHC8f+KVAbfPvUKmVmeC4sZfzPXENj4JwhLC1sA6B6GNLD0x+GaGjOeZjqgokZ+VEyJPvIShqomtkeAL42EglFg2+ElCePik8WwV3XbOeGgIX5HR6mmsj1IxHwymQUhp3YbhvfbvRqBQQRaL1YzcVzMp2ddzhUnjVq/eT7Zj6rWB4gQ8iC3sfBLec3RAfK3YYtlIfLqA5tz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ovcCjgpbI+HA2eNgkqx2LxRIzhDg+CmBxspauD98skuIFIlY34fb9ABoujZQ2aVG7G7v5KVU43lNLx9xazIsqvw77bONKfnpX7fwkUPUGcflL0KyTDTxEn57LnmM/rJ++w+MLtaVc7dHtrLxb2ZGb9VnrblCiiRBFWw==;5:ejiE3LUy6sa16Ubdy+T0jmLVic36VtDZucdCWhJM5XEpBqrpr5YeZ54dTnfiPXHtFSXkVBYM1paEiKeeJrBLF7w2FvIBVV5X+zj1tXKlppeNr5ERsFavOftgZRm8L2xysWi42utF++C6kui3yvVgYbNNWxFpNoC2ZaMdN083vbU=;7:ha/T24e9CmFk3CDXmAuDwnqcfDiEwsPVn5L1D0G2TSW7nj5N2vVHZIriGu8m5kb7I+xZrTLhBOor4Um4+OMWh9FQkjvBW70RAjXMJfOEIegPfooSWH+SbDD7okBo/r0a6/xTZIj0qAcVUT2GCTHisQBelc8i9YCkhgOqbsCAP5N0sWho8XwWTvcLCy0IPmTuwU3pUaL8cp7jYonopBjrndwndCO7JoRprrwX363NoyiA2spDhcmAMjvu1TAkURoU SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;20:1DZhdLoj4y+VmzeFWA1YlkxHQvgueoSBzja4RS696SGyJAB19lZ9iLMZk5GicKlNv0XBgEpyiF5buCTZilCaLyt+KYzDEKDYsyHrbzKa6JUYV76gTMw2g6Oqh0fmVQzvijvF2uImB+Mghk2rYM7TbRhuat1jghdcpZp1oh95yCQ= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2018 11:55:21.8326 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2a074194-3c0c-4a1d-9309-08d61fb91c0f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB2296 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch changes a condition about dr_mode. If a device node has any dr_mode ("host", "peripheral" or "otg"), this driver allows to set "is_otg_channel" to true. Also, this patch keeps the dr_mode value for future use. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman --- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c index e7eaed9..93ab860 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -84,6 +84,7 @@ struct rcar_gen3_chan { struct phy *phy; struct regulator *vbus; struct work_struct work; + enum usb_dr_mode dr_mode; bool extcon_host; bool uses_otg_pins; }; @@ -436,7 +437,8 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) dev_err(dev, "No irq handler (%d)\n", irq); } - if (of_usb_get_dr_mode_by_phy(dev->of_node, 0) == USB_DR_MODE_OTG) { + channel->dr_mode = of_usb_get_dr_mode_by_phy(dev->of_node, 0); + if (channel->dr_mode != USB_DR_MODE_UNKNOWN) { int ret; channel->uses_otg_pins = !of_property_read_bool(dev->of_node, From patchwork Fri Sep 21 11:53:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10609915 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 77C7D14BD for ; Fri, 21 Sep 2018 11:55:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67C522CC66 for ; Fri, 21 Sep 2018 11:55:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5BD672D9A0; Fri, 21 Sep 2018 11:55:37 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 E31B12CC66 for ; Fri, 21 Sep 2018 11:55:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390123AbeIURn7 (ORCPT ); Fri, 21 Sep 2018 13:43:59 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:28767 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389933AbeIURn6 (ORCPT ); Fri, 21 Sep 2018 13:43:58 -0400 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie3.idc.renesas.com with ESMTP; 21 Sep 2018 20:55:23 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id B2FA473191; Fri, 21 Sep 2018 20:55:23 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.54,284,1534777200"; d="scan'208";a="291574206" Received: from mail-ty1jpn01lp0182.outbound.protection.outlook.com (HELO JPN01-TY1-obe.outbound.protection.outlook.com) ([23.103.139.182]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-GCM-SHA384; 21 Sep 2018 20:55:23 +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:X-MS-Exchange-SenderADCheck; bh=XUbvDZYLb/kT8Eb0iW4DhZgbXf2vzyxLYkTo01MSDUc=; b=EgtsO7gKeKYcTIDNdtGOI4AjFHAZ8GJqB30Pi6ubPOh2Sp7SUcIrHu1hFjfgcm++OaIKQguWKEdCCG/a+2tMvVlT/uQ9iPd3vVCPXCFkNG10FmxDbcOtyiuXAsGbggCdFq9ekX846CyF/wPVYPdIW/aHnJsW7Oik2TplC98hvZE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.144) by OSBPR01MB2296.jpnprd01.prod.outlook.com (2603:1096:603:26::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Fri, 21 Sep 2018 11:55:22 +0000 From: Yoshihiro Shimoda To: kishon@ti.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda Subject: [PATCH 7/8] phy: renesas: rcar-gen3-usb2: add conditions for uses_otg_pins == false Date: Fri, 21 Sep 2018 20:53:23 +0900 Message-Id: <1537530804-19399-8-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1537530804-19399-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1537530804-19399-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TYXPR01CA0065.jpnprd01.prod.outlook.com (2603:1096:403:a::35) To OSBPR01MB2296.jpnprd01.prod.outlook.com (2603:1096:603:26::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9e3be216-c74c-44b4-9941-08d61fb91c49 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(8559020)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:OSBPR01MB2296; X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;3:dwrmM0JIbHkp4j7D1Zm1RE63ELb+Ok//MWBi+JW1osskU3c4kB7apTYGwAPYMKRSxlMwIwvgwrQWUGVA8jk3EFeXrR/NIrzE/aDhCl9tQyOGuN7/dClB3RKKq5KzDm/ZR2RVPk4HdQqcDiwGobkRk7g87HzRn4VPABZ9y9Nc2iGr2XBbvKYkkDnKl3AYkMcbbapfCTRgs28VDRY1Hp5z5TmO7Dl55VGkOtOzfsb/wW21gF/wnKFl1vO7SVrtU7tI;25:U4D3RhQmrApZCyzoObeDd4dJqam50mlioJgPGQPslMeVGRhr5VidZoOHdOBwjW7kgkxa33FYMYHxtRKg+xBrOinrWhIuR6SWNTuBYqAlO8r3CPVHVz8qYrqnLW3+7C60CeIeG0R3HE04MBO/KxDPyKZ1HOg46KND4hDLiJNlVo4WuQow87WB8vcbibIAxL+dKyUfCjmbh1l9ejNs+6K9nIODjKFkb+nAYgZ+qh6PIJUdXg8c1XbbOUSVoBihpboFiG35kopr0OqrNdpLdfAnNTVdcvXGAYbkPU1H1EpJK9VjlfTmvh1iDc4YpFV+C4ucyZD+5jLx9c8ZlBmMIA9aVQ==;31:FlcIbooL0B8aGJ2rv3uDMPUthOxZC/J9DtgkshKu3tlQUGjbUK+WNW68wxgsp8MXnme6ByXyyKqjYbRiElD/BrAjae5VZTFRSYbf4/8BYoJcfHNH3ybIDhb5CKe+4pp7gqBpQ2yUeLxsgp4zXud75mKP3oBgtQZ2ILHFOtSZH0Xb9RWsRZ2cPDIVn2dRZgEMGsUuT74tdGuFTdNDTNoAefmnRU74wvX1f1Jg6/VoW44= X-MS-TrafficTypeDiagnostic: OSBPR01MB2296: X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;20:jq2SxECgOhHHrfbISP74IGUY/dBYBSMdkSmAgr8zYknG4E/EUhrTg9t7VHLerFOhGd4qyjX2CS6QLL6TJj/9MRFfxjHT8JAJtlCkAwtwdOBmcwaXwgkvvogxY0/DDl9+bzcKNE6Q3yMX9mFsGAKBnKG6Nj878BuU5ItOyYPgJKX25GJHJQcI9CqrFLsRvhv0viG6U3MK6w1jIIyVo7caffOdkFIgour+khsHjOv/aaGcDg0x6xcaUPxKWXp2PBGFD4ulUAZ8Pxkmaup1Z0GdpQCPTZAHllC3yWzKWn5IcGF/pQmISGCVGWDCXiFNbGGJzRt2O+xXnIceFKSuTL1ipQFFUeyquH9t+S4zdzIV9L9Rvt+M2AbBHR1SInA9ho+KyzIOk0Xnq3VAnsfM9HREoDqMqIysQ2U61RTzHiU/mtnLY7X4eMQ+0r+mdvWr256oXASGCpAAz/F9n89TQ0MYqGxtuo0f/4y3gd9bCMi6PtvmtaXLvSDm3Q8skypRj0WY;4:ki3BH5Qg4h8JEhYGBxLdhfLrqBK4FYrdB/sF6NTdW3xPO93Yq0sJPhDTOrOpIZu17KHV8AJiurqCR2cZJtMgZnJhmefJKTNYNvCiFkiE3WYL0yKzm+XrvfsNgsCBItIN2Xqw/qJTVC/oL/XEPpIhYY7UozvcGIXdj1S9WpZvE7V0XISx1QBk+PdZoccBrBKV0EnaeXiYTbUUg2xMaEP7H8e9+GEgoCoE3DYxwGoEEHEbUuDRUShNwEqbDek3MttsAV7vc0IEJA8q7rJyEUECfA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201708071742011)(7699051);SRVR:OSBPR01MB2296;BCL:0;PCL:0;RULEID:;SRVR:OSBPR01MB2296; X-Forefront-PRVS: 0802ADD973 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(346002)(376002)(39860400002)(136003)(396003)(366004)(199004)(189003)(66066001)(4326008)(52116002)(107886003)(6512007)(486006)(6506007)(42882007)(51416003)(386003)(47776003)(78352004)(476003)(26005)(6486002)(105586002)(11346002)(956004)(2616005)(53936002)(446003)(36756003)(76176011)(69590400006)(16526019)(25786009)(97736004)(50466002)(81166006)(5660300001)(50226002)(16586007)(8676002)(6116002)(3846002)(81156014)(68736007)(316002)(48376002)(14444005)(106356001)(498600001)(8936002)(305945005)(2906002)(7736002)(3720700003);DIR:OUT;SFP:1102;SCL:1;SRVR:OSBPR01MB2296;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:0;MX:0; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;23:ERTng7U/UYeENj3jaGgyEnB0D5jljlcuUbAKYgqqUQL3jXOrjELRa0fJy/FvA1CkHN6vYoSDjiYfif8p3w5G/I5PNXZLqiAuSeyFbmqZvvtMYd6gaxK0Vu4OzUgYYYUwXeGpnY9Tm7aDVpSuiBssBgk0FSaclyOas8vzk4Scuv7oukXOcZCLM6X0e4A3XMgtWE47NGtAOlxKnzn0SGf9XZQa/p3DdGdbM/g9rJHeUAhO016bWeVNyjVzdfKaqzYossjR011tiA+zBriqC591AjAeHq/DxfHszBOLuuD0kCeACpGjQGPFZHx+qT8/r4+KOrCxJQNOES1YuoH3FdIF7szNErsqnfuAWnn2nQztsIppHW+etlZBOJGq2+kk5jjUFaYnBC3UTh+JaGFoQct7v+RlGICWstVlNr+Mw6PssIg1mulMi+umqw7qey9en5fceMMzYuPTbR3paL1Eb4RgydMw1Wd5Q1Z+OFNWuB9jGEoRd7pSJoggTIp85cQAISLxXh/RoJ2wZZGQuHI1qOIdfFY117mFj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aXzBmYLh+yzMUQbu/XeNGFxJZgDDL0NBhcQNySQYq7U80Ec7kZggKFDmWFHiSKmI2Yb7O54keybBVJPqloYc8o9HMdPvnJNeHxa7Yynm1Pw5ZL4aeWrKFNIKzmaI5bSPbys1oE93W8srhnrd3kAN072hM= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2018 11:55:22.2119 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9e3be216-c74c-44b4-9941-08d61fb91c49 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB2296 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If uses_otg_pins is set to false, this driver 1) should disable otg related interruptions, and 2) should not get ID pin signal, to avoid unexpected behaviors. So, this patch adds conditions for it. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman --- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c index 93ab860..3f2efe5 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -148,7 +148,7 @@ static void rcar_gen3_control_otg_irq(struct rcar_gen3_chan *ch, int enable) void __iomem *usb2_base = ch->base; u32 val = readl(usb2_base + USB2_OBINTEN); - if (enable) + if (ch->uses_otg_pins && enable) val |= USB2_OBINT_BITS; else val &= ~USB2_OBINT_BITS; @@ -210,6 +210,9 @@ static void rcar_gen3_init_from_a_peri_to_a_host(struct rcar_gen3_chan *ch) static bool rcar_gen3_check_id(struct rcar_gen3_chan *ch) { + if (!ch->uses_otg_pins) + return (ch->dr_mode == USB_DR_MODE_HOST) ? false : true; + return !!(readl(ch->base + USB2_ADPCTRL) & USB2_ADPCTRL_IDDIG); } From patchwork Fri Sep 21 11:53:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10609927 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A48D014BD for ; Fri, 21 Sep 2018 11:55:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 937AD2CC66 for ; Fri, 21 Sep 2018 11:55:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85A292D9A0; Fri, 21 Sep 2018 11:55:51 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 EE12C2CC66 for ; Fri, 21 Sep 2018 11:55:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389867AbeIURoP (ORCPT ); Fri, 21 Sep 2018 13:44:15 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:23472 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389879AbeIURn6 (ORCPT ); Fri, 21 Sep 2018 13:43:58 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie2.idc.renesas.com with ESMTP; 21 Sep 2018 20:55:24 +0900 Received: from relmlii2.idc.renesas.com (relmlii2.idc.renesas.com [10.200.68.66]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id 22AD974130; Fri, 21 Sep 2018 20:55:24 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.54,284,1534777200"; d="scan'208";a="293141294" Received: from mail-ty1jpn01lp0184.outbound.protection.outlook.com (HELO JPN01-TY1-obe.outbound.protection.outlook.com) ([23.103.139.184]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-GCM-SHA384; 21 Sep 2018 20:55:23 +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:X-MS-Exchange-SenderADCheck; bh=ZHnQvTZrTiHqNBH5gBdwfGvJ6i8eJmu52SiL7tv8w0o=; b=BdIzqttiZc3Ep+sAc37l4DTW1IWE9cb5qYZADOvtezktaVP+Re2tIxag8eFX9xCBZh1tOLfeRBa3UrcVW2hL3ngXuWJ6no3coD1m0WMQq6IpZZFKUwpq0uNpq4TZOLlfl3oWOhQSg+Q+Gm5Aw3F3ggKTOi6BqB8zXqkdjbZ3Pq8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.144) by OSBPR01MB2296.jpnprd01.prod.outlook.com (2603:1096:603:26::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Fri, 21 Sep 2018 11:55:22 +0000 From: Yoshihiro Shimoda To: kishon@ti.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda Subject: [PATCH 8/8] phy: renesas: rcar-gen3-usb2: add is_otg_channel to use "role" sysfs Date: Fri, 21 Sep 2018 20:53:24 +0900 Message-Id: <1537530804-19399-9-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1537530804-19399-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1537530804-19399-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TYXPR01CA0065.jpnprd01.prod.outlook.com (2603:1096:403:a::35) To OSBPR01MB2296.jpnprd01.prod.outlook.com (2603:1096:603:26::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 84b148fd-de51-4508-14c5-08d61fb91c84 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(8559020)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:OSBPR01MB2296; X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;3:kn4TmWQuWxJOn0w6vuY53pNXUlA0d9YL2m5dgDa2/NYYJtnPV3TKhcuHyatZ/a5jjqH6hrnoxr1DSkjCfRtcGi/YkgpY3H08tdLFIPqsCiOTw86tJj+ZBO3tHY7Nw1sBYW5MJV7jcNEH1KzGE5cCv8KmnpjBP6Qs+5rqhJqQPJF6181wQ3kLaS26eBN0xbjyth9K3N60I8125xQTwNkYdY8+qEZrH+tLN/WWIurVTq3hzAutdRv4p5s3V4y/BVAj;25:V3SvOiyNtTLSCpQrOuZ2Mgs4gnXg7EtfDDc1ivwBiv7v1a2raEPraZT/gmrAUdNKzNWm4XcDy7oLBgetdYAlGDtdmcbH7zQ1mQajhKCk/gj9U04SH7+jph6EL2NWnq8/C7IcG89b+rklV/x2KLesyGuJ18ah7DP6Cv5ebLVKE5itHESKplrKeJRGvPi8esej/oOT/J9ivvoCDd3dQ6OTofYARmOrVke66zaRnE0YEnh8v8YjrC5hPYsFWj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XucRIN1Pge2/rwD/siekmlTVvFkWz3pOdBb6VsFO4Sge0Z6paCBSUZVpoSZR74jYBjSkJLnWxmmOQi+DIINzwcef2+G0J4N+4V0ZdZi4pFbQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201708071742011)(7699051);SRVR:OSBPR01MB2296;BCL:0;PCL:0;RULEID:;SRVR:OSBPR01MB2296; X-Forefront-PRVS: 0802ADD973 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(346002)(376002)(39860400002)(136003)(396003)(366004)(199004)(189003)(66066001)(4326008)(52116002)(107886003)(6512007)(486006)(6506007)(42882007)(51416003)(386003)(47776003)(78352004)(476003)(26005)(6486002)(105586002)(11346002)(956004)(2616005)(53936002)(446003)(36756003)(76176011)(69590400006)(16526019)(25786009)(97736004)(50466002)(81166006)(5660300001)(50226002)(16586007)(8676002)(6116002)(3846002)(81156014)(68736007)(316002)(48376002)(14444005)(106356001)(498600001)(8936002)(305945005)(2906002)(7736002)(3720700003);DIR:OUT;SFP:1102;SCL:1;SRVR:OSBPR01MB2296;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:0;MX:0; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;23:14htaXDLNpKtuPO3b34tfIL/YfZBcFGStUSCWswcbiBzC+3PohIKQmH1ni+eZWnL49pcR8j2xx+Ruj3sN9sW5tUaFpLO1489UHtEvIqKZdHshnYv4watzFA5geydAwiDd5b4RkoacO2gtWBrR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pzFwgg6m9OzYWn1iI38=;7:vqPbmACRbxLFPIefio4+pU1Vorori0dL4O/J+bquNHEhvxDUAS3vQw9G0DyiFLCx6eo6D0gCogt43buJpLwgMLShRGNCAvDi8BmX4YHfztjdpzIVQFTGbUQNXY+jTwQ+nzfB/6pmY6tGLBPLcYOttejsm7H5rqJEWovbjB2FvUqWS0RDbpgM0sZyeqqYJx8Kv4DYoINW67p3DmJP3IawwsQ8zOCn6+ZNAEhJvHogNdLuiDHR6DeUc7y+HJL0rHEj SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2296;20:Y3PL55bnCjZQDCn8/XD8D2WblwUDKti5zgpQsoka5G8HFYWWtCR/cWysf3Lc7aDneBlvdw5rT+QIcRbhgBqkO96YG+ajqWUMavZb0euBqsI/U8YkAQYKX65WpRxYzpvmXevad1IOXGVs/sbnqBVCNEBmzPQ0SqwQTLsbvv3RWzU= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2018 11:55:22.5951 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 84b148fd-de51-4508-14c5-08d61fb91c84 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB2296 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Even if a board doesn't have otg pins connection, this hardware can change the role by a register setting. So, this patch adds "is_otg_channel" for it. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman --- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c index 3f2efe5..9903aef 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -86,8 +86,19 @@ struct rcar_gen3_chan { struct work_struct work; enum usb_dr_mode dr_mode; bool extcon_host; + bool is_otg_channel; bool uses_otg_pins; }; +/* + * Combination about is_otg_channel and uses_otg_pins: + * + * Parameters || Behaviors + * is_otg_channel | uses_otg_pins || irqs | role sysfs + * ---------------------+---------------++--------------+------------ + * true | true || enabled | enabled + * true | false || disabled | enabled + * false | any || disabled | disabled + */ static void rcar_gen3_phy_usb2_work(struct work_struct *work) { @@ -244,7 +255,7 @@ static ssize_t role_store(struct device *dev, struct device_attribute *attr, bool is_b_device; enum phy_mode cur_mode, new_mode; - if (!ch->uses_otg_pins || !ch->phy->init_count) + if (!ch->is_otg_channel || !ch->phy->init_count) return -EIO; if (!strncmp(buf, "host", strlen("host"))) @@ -282,7 +293,7 @@ static ssize_t role_show(struct device *dev, struct device_attribute *attr, { struct rcar_gen3_chan *ch = dev_get_drvdata(dev); - if (!ch->uses_otg_pins || !ch->phy->init_count) + if (!ch->is_otg_channel || !ch->phy->init_count) return -EIO; return sprintf(buf, "%s\n", rcar_gen3_is_host(ch) ? "host" : @@ -320,7 +331,7 @@ static int rcar_gen3_phy_usb2_init(struct phy *p) writel(USB2_OC_TIMSET_INIT, usb2_base + USB2_OC_TIMSET); /* Initialize otg part */ - if (channel->uses_otg_pins) + if (channel->is_otg_channel) rcar_gen3_init_otg(channel); return 0; @@ -444,6 +455,7 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) if (channel->dr_mode != USB_DR_MODE_UNKNOWN) { int ret; + channel->is_otg_channel = true; channel->uses_otg_pins = !of_property_read_bool(dev->of_node, "renesas,no-otg-pins"); channel->extcon = devm_extcon_dev_allocate(dev, @@ -487,7 +499,7 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) dev_err(dev, "Failed to register PHY provider\n"); ret = PTR_ERR(provider); goto error; - } else if (channel->uses_otg_pins) { + } else if (channel->is_otg_channel) { int ret; ret = device_create_file(dev, &dev_attr_role); @@ -507,7 +519,7 @@ static int rcar_gen3_phy_usb2_remove(struct platform_device *pdev) { struct rcar_gen3_chan *channel = platform_get_drvdata(pdev); - if (channel->uses_otg_pins) + if (channel->is_otg_channel) device_remove_file(&pdev->dev, &dev_attr_role); pm_runtime_disable(&pdev->dev);