From patchwork Tue May 21 11:58:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10953507 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 6AC0F16C1 for ; Tue, 21 May 2019 12:01:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B1DF2893F for ; Tue, 21 May 2019 12:01:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4DD4928942; Tue, 21 May 2019 12:01: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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3430289D0 for ; Tue, 21 May 2019 12:01:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728058AbfEUMBK (ORCPT ); Tue, 21 May 2019 08:01:10 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:56912 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728048AbfEUMBK (ORCPT ); Tue, 21 May 2019 08:01:10 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190521120109euoutp01e16fdbd6197e735b007f10e7539bab1f~gsPxyWdFG3027830278euoutp019 for ; Tue, 21 May 2019 12:01:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190521120109euoutp01e16fdbd6197e735b007f10e7539bab1f~gsPxyWdFG3027830278euoutp019 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1558440069; bh=6VLrRSqRy8rjxJcV9QOeKBQKOJLGDo2GyIqea/dqdoo=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=Mn3lTba5ZwfA4uRYqefIzC5uBAojO04OFOhCdW9uViSlbilTUeYY4Eeg7z4chYGgd POs1AGHvJmRiz3k/O+huFarncZ4dcmnRtz9KsKjQKJblpMJUYXraA867IU5smqZa5O JN60MUEhtkj5SHSVGg5RsXrtQn8ZR/BtXz4DRyCI= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190521120108eucas1p1b26384e5a73d0c198dd50b1331d73dc5~gsPxGnjvt0539705397eucas1p1v; Tue, 21 May 2019 12:01:08 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id FB.CA.04377.488E3EC5; Tue, 21 May 2019 13:01:08 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190521120107eucas1p1a56efaa0e7f2117063e70683276edc10~gsPwaBaJD0547705477eucas1p1n; Tue, 21 May 2019 12:01:07 +0000 (GMT) X-AuditID: cbfec7f4-12dff70000001119-93-5ce3e8846205 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id EC.22.04146.388E3EC5; Tue, 21 May 2019 13:01:07 +0100 (BST) MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset="UTF-8" Received: from AMDC2765.DIGITAL.local ([106.120.51.73]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PRU006F4RY90T20@eusync4.samsung.com>; Tue, 21 May 2019 13:01:07 +0100 (BST) From: Marek Szyprowski To: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Greg Kroah-Hartman , Marek Szyprowski , Bartlomiej Zolnierkiewicz , Markus Reichl , =?utf-8?b?TcOlbnMgUnVsbGfDpXJk?= , Krzysztof Kozlowski , Peter Chen , Alan Stern , Rob Herring Subject: [PATCH 1/5] dt-bindings: switch Exynos EHCI/OHCI bindings to use array of generic PHYs Date: Tue, 21 May 2019 13:58:45 +0200 Message-id: <20190521115849.9882-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190521115849.9882-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAKsWRmVeSWpSXmKPExsWy7djPc7otLx7HGEzYLGqxccZ6Vov5R86x WjQvXs9mcf78BnaLy7vmsFnMOL+PyWLRslZmi5dHfjBarD1yl93ix8PpTBZ/7t1htWjde4Td YsLvC2wOvB637tR7bFrVyeaxf+4ado83p0+xe2x8t4PJY/bdH4wefVtWMXp83iQXwBHFZZOS mpNZllqkb5fAldGw9hBTwUyZiknTDrA1MDaIdTFyckgImEgsO/mevYuRi0NIYAWjxMkf3UwQ zmdGieU7/7J2MXKAVS0+nQMRX8YocXnDF0aQbl4BQYkfk++xgNQwC8hLHLmUDRJmFtCU2Lp7 PTuILSTwn1Hi58UsEJtNwFCi620XG4gtIuAgsWTpHTaQmcwC55glFv/sYAJJCAskSux5NR2s iEVAVeLDkuXMELtsJDZdmskMcbW8xOoNB8BsTgFbiflNz5lBBkkINLNLPPzwhA2iyEViyY45 rBC2jERnx0EmqCJGiYfn1rJDOD1A7zTNYISospY4fPwiK8QPfBKTtk1nhnifV6KjTQiixEPi Tvs5VkhQTGCU2LuhgXECo/QspNCYhQiNWUihsYCReRWjeGppcW56arFRXmq5XnFibnFpXrpe cn7uJkZgOjn97/iXHYy7/iQdYhTgYFTi4bV4+DhGiDWxrLgy9xCjBAezkgjv6VOPYoR4UxIr q1KL8uOLSnNSiw8xSnOwKInzVjM8iBYSSE8sSc1OTS1ILYLJMnFwSjUwTj55JueL3rm1l1fM jy0zOTDxgy1fwKQbWxkn+OlsuLAiLfXXyXWLG7n7bVgmtG24wfPS9vZcHefvK28Zimt1cEv/ 2hTxOv3frsC2bab7Ax/J8PB67r87KfnpC4YdQbGhYacXTBM96vxheXmIEcvuvK8P3pwxLi+8 vDZGW3xJ2jvn5fc5+Ty2XFViKc5INNRiLipOBABB0zvzIwMAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrBLMWRmVeSWpSXmKPExsVy+t/xa7rNLx7HGNxfpG+xccZ6Vov5R86x WjQvXs9mcf78BnaLy7vmsFnMOL+PyWLRslZmi5dHfjBarD1yl93ix8PpTBZ/7t1htWjde4Td YsLvC2wOvB637tR7bFrVyeaxf+4ado83p0+xe2x8t4PJY/bdH4wefVtWMXp83iQXwBHFZZOS mpNZllqkb5fAldGw9hBTwUyZiknTDrA1MDaIdTFycEgImEgsPp3TxcjJISSwhFHiaVswiM0r ICjxY/I9FpASZgF5iSOXskHCzALqEpPmLWLuYuQCKm9kkrjQ8ZUJJMEmYCjR9baLDcQWEXCQ WLL0DhtIEbPABWaJzh1/2EESwgKJEi8a5jCD2CwCqhIflixnhlhmI7Hp0kwwWwJo2eoNB8Bs TgFbiflNz5khjrOReDWjg3kCI/8sJPfNQrhvFpL7FjAyr2IUSS0tzk3PLTbUK07MLS7NS9dL zs/dxAiMj23Hfm7ewXhpY/AhRgEORiUe3gf3HscIsSaWFVfmHmKU4GBWEuE9fepRjBBvSmJl VWpRfnxRaU5q8SFGaQ4WJXHeDoGDMUIC6YklqdmpqQWpRTBZJg5OqQZG0QfLON5OeZ1sdsHO JpYnPMSU+3nGrRfHp7B7fY8ImWX5o3bX8vnlHZ8TKnSeL43Zsu9v2BWd4j8PGf6+e/R8isj6 PclVnzQb7n0U6t8SYtW6VW6R58J89znLfp8I3CZ2nSdo/fL1q16evp69ZDnX/Fdfozafqe53 tTtVcLnUYsmfjzvM5s57Uq7EUpyRaKjFXFScCACXzUp1iwIAAA== X-CMS-MailID: 20190521120107eucas1p1a56efaa0e7f2117063e70683276edc10 CMS-TYPE: 201P X-CMS-RootMailID: 20190521120107eucas1p1a56efaa0e7f2117063e70683276edc10 References: <20190521115849.9882-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 69bec7259853 ("USB: core: let USB device know device node") added support for attaching devicetree node for USB devices. Those nodes are children of their USB host controller. However Exynos EHCI and OHCI driver bindings already define child-nodes for each physical root hub port and assigns respective PHY controller and parameters to them. This leads to the conflict. A workaround for it has been merged as commit 01d4071486fe ("usb: exynos: add workaround for the USB device bindings conflict"), but it disabled support for USB device binding for Exynos EHCI/OHCI controllers. To resolve it properly, lets move PHYs from the sub-nodes to a standard array under the 'phys' property. Suggested-by: Måns Rullgård Signed-off-by: Marek Szyprowski Reviewed-by: Rob Herring --- .../devicetree/bindings/usb/exynos-usb.txt | 41 +++++++------------ 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/exynos-usb.txt b/Documentation/devicetree/bindings/usb/exynos-usb.txt index b7111f43fa59..66c394f9e11f 100644 --- a/Documentation/devicetree/bindings/usb/exynos-usb.txt +++ b/Documentation/devicetree/bindings/usb/exynos-usb.txt @@ -12,13 +12,11 @@ Required properties: - interrupts: interrupt number to the cpu. - clocks: from common clock binding: handle to usb clock. - clock-names: from common clock binding: Shall be "usbhost". - - port: if in the SoC there are EHCI phys, they should be listed here. - One phy per port. Each port should have following entries: - - reg: port number on EHCI controller, e.g - On Exynos5250, port 0 is USB2.0 otg phy - port 1 is HSIC phy0 - port 2 is HSIC phy1 - - phys: from the *Generic PHY* bindings; specifying phy used by port. + - phys: from the *Generic PHY* bindings; array specifying phy(s) used + by the root port. + - phy-names: from the *Generic PHY* bindings; array of the names for + each phy for the root ports, must be a subset of the following: + "host", "hsic0", "hsic1". Optional properties: - samsung,vbus-gpio: if present, specifies the GPIO that @@ -35,12 +33,8 @@ Example: clocks = <&clock 285>; clock-names = "usbhost"; - #address-cells = <1>; - #size-cells = <0>; - port@0 { - reg = <0>; - phys = <&usb2phy 1>; - }; + phys = <&usb2phy 1>; + phy-names = "host"; }; OHCI @@ -52,13 +46,11 @@ Required properties: - interrupts: interrupt number to the cpu. - clocks: from common clock binding: handle to usb clock. - clock-names: from common clock binding: Shall be "usbhost". - - port: if in the SoC there are OHCI phys, they should be listed here. - One phy per port. Each port should have following entries: - - reg: port number on OHCI controller, e.g - On Exynos5250, port 0 is USB2.0 otg phy - port 1 is HSIC phy0 - port 2 is HSIC phy1 - - phys: from the *Generic PHY* bindings, specifying phy used by port. + - phys: from the *Generic PHY* bindings; array specifying phy(s) used + by the root port. + - phy-names: from the *Generic PHY* bindings; array of the names for + each phy for the root ports, must be a subset of the following: + "host", "hsic0", "hsic1". Example: usb@12120000 { @@ -69,13 +61,8 @@ Example: clocks = <&clock 285>; clock-names = "usbhost"; - #address-cells = <1>; - #size-cells = <0>; - port@0 { - reg = <0>; - phys = <&usb2phy 1>; - }; - + phys = <&usb2phy 1>; + phy-names = "host"; }; DWC3 From patchwork Tue May 21 11:58:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10953509 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 1C4D9912 for ; Tue, 21 May 2019 12:02:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0528B28942 for ; Tue, 21 May 2019 12:02:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC6D72893F; Tue, 21 May 2019 12:02:09 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 566A32893F for ; Tue, 21 May 2019 12:02:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728058AbfEUMCI (ORCPT ); Tue, 21 May 2019 08:02:08 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:46808 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726740AbfEUMCI (ORCPT ); Tue, 21 May 2019 08:02:08 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190521120207euoutp0207fbf28d408c2be11d2d4520df2d6f5f~gsQn5OCjC2163921639euoutp02n for ; Tue, 21 May 2019 12:02:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190521120207euoutp0207fbf28d408c2be11d2d4520df2d6f5f~gsQn5OCjC2163921639euoutp02n DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1558440127; bh=ifJpnpYKeGfoa9EI/dpaSOWkHwZALEyhwRZH/XL2H+0=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=R4Dlpcuw50sEBGnZTzTsNITZNAV0aTwyCZRCCeyLJ1BkAY9Pld9SRdbsitcbIvKup Xz0WNs/FQOUBuLpdaMlurJMNMckiGSTzNcvXi4vXifF390Dy3308fLO3LY19nzgCan R27VXhmzMErzHfOBKYLx99lCzCNUQNx5lwLSSQxs= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190521120206eucas1p223fc73eb2413a4d1cdd944f2e7f1e5d1~gsQnJUFcv0878708787eucas1p2i; Tue, 21 May 2019 12:02:06 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id F4.CF.04298.EB8E3EC5; Tue, 21 May 2019 13:02:06 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190521120205eucas1p27671f3b96e443da8b13bd10618a77636~gsQmQt4_Y0973209732eucas1p2G; Tue, 21 May 2019 12:02:05 +0000 (GMT) X-AuditID: cbfec7f2-3615e9c0000010ca-20-5ce3e8bebbdd Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 46.9E.04140.DB8E3EC5; Tue, 21 May 2019 13:02:05 +0100 (BST) MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset="UTF-8" Received: from AMDC2765.DIGITAL.local ([106.120.51.73]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PRU006F4RY90T20@eusync4.samsung.com>; Tue, 21 May 2019 13:02:05 +0100 (BST) From: Marek Szyprowski To: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Greg Kroah-Hartman , Marek Szyprowski , Bartlomiej Zolnierkiewicz , Markus Reichl , =?utf-8?b?TcOlbnMgUnVsbGfDpXJk?= , Krzysztof Kozlowski , Peter Chen , Alan Stern , Rob Herring Subject: [PATCH 2/5] ARM: dts: exynos: Add array of generic PHYs to EHCI/OHCI devices Date: Tue, 21 May 2019 13:58:46 +0200 Message-id: <20190521115849.9882-3-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190521115849.9882-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA02Se0hTURzHO7vbvXej1XUJHjQ0BkKFrgyJG2kZWNz+E4KKWtTKm+8Hm05N wxemmz2Wgg7zVb5iZnPzgeWzOZopOHNBplOaC8xnlBQbpuZ2lfzv+/t9P5xzvl8Ojgiecrzx mMQUWpooiReiPHbne+doYN93u/h4yZAnqVNrOWSNcZRD5tdpUdJsbsVIy9tKlFSb+1jki8YC hJw3OgDZYpzGSIetnEX+nbFyyIJeI0aq1sbQMD41ac2m9BoFSvVXvcKopZFhjNKtdLGoZ9MO QD1u1wBqVe8bgV/jhUTS8TFyWnrszC1edKO1FU0uOJxePLEIckDPISXg4pAIhitF5Wwl4OEC 4iWAhWPrCDOsAujU/QA7VI9hkcMYjQAuTmjYLoNPeEBH6cyWxnGE8IPG8TjXGiGOwI5uLcbw mwBO5ra5D0KJIKhcVqIu7UmEwfoGK+qCEGIUgXXOIpbLOEBcgatVBjfEJvzhhrMBYS4LgQpV Gca8yA82tw6491wiFNbkzSHMfhOFk6azjA6HuuUd/iC0lBa7c0IiH0DbaAvGDA8BtOSpt3Oe hoOmjxwmwz5Y0lmOuKJBgg+LHggYhILr3+a3q1AB2DX1DlUBn4pdbVT8b6NiVxu1ANEALzpV lhBFy4IS6TSRTJIgS02MEt1JStCDrY8ysmH61QV+j982AAIHwr180mYXCzgSuSwjwQAgjgg9 +SPDs2IBP1KScY+WJt2UpsbTMgPwwdlCL37mnq/XBUSUJIWOo+lkWrrjsnCudw4gxVTnqaY3 bYVXzdn2BeHQ5YCcDxeqFetPXnvMfFr7OdUvqm0+73/urujLc79CS2bxjedrdh7Znt+B6TWP fHuWLtV+5laWlZ7IVcoD/hhXwi/2hlZ3Z80MGgb2L8yq8fTsNFOc2hisvV+PyFsUhpgsiVd9 REdspM+c7WRTZWCskC2LlgQdRaQyyT+7e86EJAMAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJLMWRmVeSWpSXmKPExsVy+t/xa7p7XzyOMbgzQ9hi44z1rBbzj5xj tWhevJ7N4vz5DewWl3fNYbOYcX4fk8WiZa3MFi+P/GC0WHvkLrvFj4fTmSz+3LvDatG69wi7 xYTfF9gceD1u3an32LSqk81j/9w17B5vTp9i99j4bgeTx+y7Pxg9+rasYvT4vEkugCOKyyYl NSezLLVI3y6BK2PZnQ1sBa0aFd03XjM2MO5R6GLk5JAQMJHYc+g1axcjF4eQwBJGie9zZ7KA JHgFBCV+TL4HZHNwMAvISxy5lA0SZhZQl5g0bxEziC0k0MgkMe+5O4jNJmAo0fW2iw3EFhFw kFiy9A4byExmgQvMEp07/rCDJIQFwiXen30JZrMIqEr8+7mUGWKXjUTnhGnsEAfJS6zecAAs zilgKzG/6TnUMhuJVzM6mCcw8s9Cct4shPNmITlvASPzKkaR1NLi3PTcYiO94sTc4tK8dL3k /NxNjMAI2Xbs55YdjF3vgg8xCnAwKvHwPrj3OEaINbGsuDL3EKMEB7OSCO/pU49ihHhTEiur Uovy44tKc1KLDzFKc7AoifN2CByMERJITyxJzU5NLUgtgskycXBKNTB2ux47rmzh7G72+7Z3 SLRM512TXladteyN3wW8lM84XNx3fvXnmCn3tJbuT06N5D9qc/OU9hFxiVbnGd87Kjxian+m ahVe6+QIu+ZyfVqY8XODtGexN80XvTY/e1HpALOKz1OpE+y2zXlnv0VscFvg8a2dw9xo6bqN N++dFP6XXfvAhCfQyUSJpTgj0VCLuag4EQBVtN9BjAIAAA== X-CMS-MailID: 20190521120205eucas1p27671f3b96e443da8b13bd10618a77636 CMS-TYPE: 201P X-CMS-RootMailID: 20190521120205eucas1p27671f3b96e443da8b13bd10618a77636 References: <20190521115849.9882-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a standard array of PHYs to Exynos EHCI/OHCI devices. This is a first step in resolving the conflict between Exynos EHCI/OHCI sub-nodes and generic USB device bindings. Later the sub-nodes currently used for assigning PHYs to root ports of the controller will be removed making a place for the generic USB device bindings nodes. Suggested-by: Måns Rullgård Signed-off-by: Marek Szyprowski --- arch/arm/boot/dts/exynos4.dtsi | 4 ++++ arch/arm/boot/dts/exynos4210-universal_c210.dts | 2 ++ arch/arm/boot/dts/exynos4412-itop-elite.dts | 2 ++ arch/arm/boot/dts/exynos4412-odroidu3.dts | 2 ++ arch/arm/boot/dts/exynos4412-odroidx.dts | 2 ++ arch/arm/boot/dts/exynos4412-origen.dts | 2 ++ arch/arm/boot/dts/exynos5250.dtsi | 4 ++++ arch/arm/boot/dts/exynos54xx.dtsi | 4 ++++ 8 files changed, 22 insertions(+) diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index 36ccf227434d..7b94fbd9ed6c 100644 --- a/arch/arm/boot/dts/exynos4.dtsi +++ b/arch/arm/boot/dts/exynos4.dtsi @@ -380,6 +380,8 @@ clocks = <&clock CLK_USB_HOST>; clock-names = "usbhost"; status = "disabled"; + phys = <&exynos_usbphy 1>, <&exynos_usbphy 2>, <&exynos_usbphy 3>; + phy-names = "host", "hsic0", "hsic1"; #address-cells = <1>; #size-cells = <0>; port@0 { @@ -406,6 +408,8 @@ clocks = <&clock CLK_USB_HOST>; clock-names = "usbhost"; status = "disabled"; + phys = <&exynos_usbphy 1>; + phy-names = "host"; #address-cells = <1>; #size-cells = <0>; port@0 { diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts b/arch/arm/boot/dts/exynos4210-universal_c210.dts index bf092e97e14f..dbd6b43dbe52 100644 --- a/arch/arm/boot/dts/exynos4210-universal_c210.dts +++ b/arch/arm/boot/dts/exynos4210-universal_c210.dts @@ -204,6 +204,8 @@ &ehci { status = "okay"; + phys = <&exynos_usbphy 1>; + phy-names = "host"; port@0 { status = "okay"; }; diff --git a/arch/arm/boot/dts/exynos4412-itop-elite.dts b/arch/arm/boot/dts/exynos4412-itop-elite.dts index 0dedeba89b5f..1763b42c01cb 100644 --- a/arch/arm/boot/dts/exynos4412-itop-elite.dts +++ b/arch/arm/boot/dts/exynos4412-itop-elite.dts @@ -146,6 +146,8 @@ /* In order to reset USB ethernet */ samsung,vbus-gpio = <&gpc0 1 GPIO_ACTIVE_HIGH>; + phys = <&exynos_usbphy 1>, <&exynos_usbphy 3>; + phy-names = "host", "hsic1"; port@0 { status = "okay"; }; diff --git a/arch/arm/boot/dts/exynos4412-odroidu3.dts b/arch/arm/boot/dts/exynos4412-odroidu3.dts index 96d99887bceb..5bbaccffc9be 100644 --- a/arch/arm/boot/dts/exynos4412-odroidu3.dts +++ b/arch/arm/boot/dts/exynos4412-odroidu3.dts @@ -105,6 +105,8 @@ }; &ehci { + phys = <&exynos_usbphy 2>, <&exynos_usbphy 3>; + phy-names = "hsic0", "hsic1"; port@1 { status = "okay"; }; diff --git a/arch/arm/boot/dts/exynos4412-odroidx.dts b/arch/arm/boot/dts/exynos4412-odroidx.dts index a2251581f6b6..306dd9365a91 100644 --- a/arch/arm/boot/dts/exynos4412-odroidx.dts +++ b/arch/arm/boot/dts/exynos4412-odroidx.dts @@ -72,6 +72,8 @@ }; &ehci { + phys = <&exynos_usbphy 2>; + phy-names = "hsic0"; port@1 { status = "okay"; }; diff --git a/arch/arm/boot/dts/exynos4412-origen.dts b/arch/arm/boot/dts/exynos4412-origen.dts index 698de4345d16..e609e2af22d1 100644 --- a/arch/arm/boot/dts/exynos4412-origen.dts +++ b/arch/arm/boot/dts/exynos4412-origen.dts @@ -88,6 +88,8 @@ &ehci { samsung,vbus-gpio = <&gpx3 5 1>; status = "okay"; + phys = <&exynos_usbphy 2>, <&exynos_usbphy 3>; + phy-names = "hsic0", "hsic1"; port@1 { status = "okay"; diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index d5e0392b409e..2d23e99985e1 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -617,6 +617,8 @@ clocks = <&clock CLK_USB2>; clock-names = "usbhost"; + phys = <&usb2_phy_gen 1>; + phy-names = "host"; #address-cells = <1>; #size-cells = <0>; port@0 { @@ -632,6 +634,8 @@ clocks = <&clock CLK_USB2>; clock-names = "usbhost"; + phys = <&usb2_phy_gen 1>; + phy-names = "host"; #address-cells = <1>; #size-cells = <0>; port@0 { diff --git a/arch/arm/boot/dts/exynos54xx.dtsi b/arch/arm/boot/dts/exynos54xx.dtsi index ae866bcc30c4..ab1642cf0428 100644 --- a/arch/arm/boot/dts/exynos54xx.dtsi +++ b/arch/arm/boot/dts/exynos54xx.dtsi @@ -180,6 +180,8 @@ compatible = "samsung,exynos4210-ehci"; reg = <0x12110000 0x100>; interrupts = ; + phys = <&usb2_phy 1>; + phy-names = "host"; #address-cells = <1>; #size-cells = <0>; @@ -193,6 +195,8 @@ compatible = "samsung,exynos4210-ohci"; reg = <0x12120000 0x100>; interrupts = ; + phys = <&usb2_phy 1>; + phy-names = "host"; #address-cells = <1>; #size-cells = <0>; From patchwork Tue May 21 11:58:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10953515 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 745E5912 for ; Tue, 21 May 2019 12:02:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64DB0289D2 for ; Tue, 21 May 2019 12:02:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5919B289D4; Tue, 21 May 2019 12:02:58 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC2DB289D2 for ; Tue, 21 May 2019 12:02:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728153AbfEUMCx (ORCPT ); Tue, 21 May 2019 08:02:53 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:47092 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728148AbfEUMCx (ORCPT ); Tue, 21 May 2019 08:02:53 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190521120251euoutp020385cd7649ec83a28061ccca82d95959~gsRQ3XIK22151321513euoutp02g for ; Tue, 21 May 2019 12:02:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190521120251euoutp020385cd7649ec83a28061ccca82d95959~gsRQ3XIK22151321513euoutp02g DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1558440171; bh=LICT6p63z28m+QBvow/NtYuLWxdakRY3i+TlswUz6bc=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=G9NVtCSbhZzYqEVop3794RGRuL0A3NkxorqZULqyTH86ltmFYpFuZExyHNPb5sb65 NqsOgr2/ZAtLOKih99P3GkmQsoGq3GKmpt0QiEMl81cA3nm2NV+hraDDB9PzHbRSjo KeYYJgDrDLt99+ZjdRIGGiFQWbOYIZWdYj4UeJ/Q= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190521120250eucas1p1e0980b40c4b574111e72b1da9e5960cd~gsRQA9xsh0539705397eucas1p1w; Tue, 21 May 2019 12:02:50 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id B1.EF.04298.AE8E3EC5; Tue, 21 May 2019 13:02:50 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190521120249eucas1p2e4a8fec922fa78783d7d3fed785f3e3b~gsRPRCFfS0974209742eucas1p2m; Tue, 21 May 2019 12:02:49 +0000 (GMT) X-AuditID: cbfec7f2-3615e9c0000010ca-b0-5ce3e8ea7c4c Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 54.62.04146.9E8E3EC5; Tue, 21 May 2019 13:02:49 +0100 (BST) MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset="UTF-8" Received: from AMDC2765.DIGITAL.local ([106.120.51.73]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PRU006F4RY90T20@eusync4.samsung.com>; Tue, 21 May 2019 13:02:49 +0100 (BST) From: Marek Szyprowski To: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Greg Kroah-Hartman , Marek Szyprowski , Bartlomiej Zolnierkiewicz , Markus Reichl , =?utf-8?b?TcOlbnMgUnVsbGfDpXJk?= , Krzysztof Kozlowski , Peter Chen , Alan Stern , Rob Herring Subject: [PATCH 3/5] usb: exynos: add support for getting PHYs from the standard dt array Date: Tue, 21 May 2019 13:58:47 +0200 Message-id: <20190521115849.9882-4-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190521115849.9882-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprIKsWRmVeSWpSXmKPExsWy7djP87qvXjyOMXi1gcdi44z1rBbzj5xj tWhevJ7N4vz5DewWl3fNYbOYcX4fk8WiZa3MFi+P/GC0WHvkLrvFj4fTmSz+3LvDatG69wi7 xYTfF9gceD1u3an32LSqk81j/9w17B5vTp9i99j4bgeTx+y7Pxg9+rasYvT4vEkugCOKyyYl NSezLLVI3y6BK2PHiTVMBY0iFRNO32RtYDwk0MXIySEhYCJxdu1yxi5GLg4hgRWMEh83dTNB OJ8ZJS5PW88MU3Wo9wYzRGIZo8S3U13sIAleAUGJH5PvsXQxcnAwC8hLHLmUDRJmFtCU2Lp7 PViJkMB/RomnUyJAbDYBQ4mut11sILaIgIPEkqV32EBmMgucY5ZY/LODCSQhLBAtsefeZbBm FgFViS0tLxghdtlIrF98B+ogeYnVGw6A2ZwCthLzm56DHSch8JtNon/2MTaIIheJ0wu/s0PY MhKdHQeZIIqaGSUenlvLDuH0AP3ZNIMRospa4vDxi6wQP/BJTNo2nRnkNQkBXomONiGIEg+J xomPWCBBMYFR4tbijUwTGKVnIYXGLERozEIKjQWMzKsYxVNLi3PTU4sN81LL9YoTc4tL89L1 kvNzNzECE8rpf8c/7WD8einpEKMAB6MSD6/Fw8cxQqyJZcWVuYcYJTiYlUR4T596FCPEm5JY WZValB9fVJqTWnyIUZqDRUmct5rhQbSQQHpiSWp2ampBahFMlomDU6qBkS1jR7XURwfP13+n XLp7evMKuTsX676IGnyUlxK30PeMy6gQ9zD6cTSwc6b3zDNvjv7SvWpVPvGLpoOk5b8piW8v S1hMfloZqMC+XufUc48jX+2X+x/Uyw+53uBfIBbSv1HT5em0pTYdillGB59J/jpg7n9H8vnl w52dJaX9O7Q5TypJPld0VWIpzkg01GIuKk4EAFki0cUkAwAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFLMWRmVeSWpSXmKPExsVy+t/xa7ovXzyOMfi/T8pi44z1rBbzj5xj tWhevJ7N4vz5DewWl3fNYbOYcX4fk8WiZa3MFi+P/GC0WHvkLrvFj4fTmSz+3LvDatG69wi7 xYTfF9gceD1u3an32LSqk81j/9w17B5vTp9i99j4bgeTx+y7Pxg9+rasYvT4vEkugCOKyyYl NSezLLVI3y6BK2PHiTVMBY0iFRNO32RtYDwk0MXIySEhYCJxqPcGcxcjF4eQwBJGiQk/XrGC JHgFBCV+TL7H0sXIwcEsIC9x5FI2SJhZQF1i0rxFUPWNTBKzWhYygyTYBAwlut52sYHYIgIO EkuW3mEDKWIWuMAs0bnjDztIQlggWmLPvctgNouAqsSWlheMEMtsJNYvvsMMcZG8xOoNB8Bs TgFbiflNz8FsIaCaVzM6mCcw8s9Cct8shPtmIblvASPzKkaR1NLi3PTcYkO94sTc4tK8dL3k /NxNjMAY2Xbs5+YdjJc2Bh9iFOBgVOLhfXDvcYwQa2JZcWXuIUYJDmYlEd7Tpx7FCPGmJFZW pRblxxeV5qQWH2KU5mBREuftEDgYIySQnliSmp2aWpBaBJNl4uCUamA0LliY8Nwz6Hq0KFfx zbizc1lM1r7x5uUVcT9fEm+072tYrEW797Jn+1SmeU1Sr73jZSfhy1yqzcn6vNdZ9+O8Izpt qQlCQt69+msOyq4SmfFs8yv5oJcWi5/zhCfdfeRrevOPgcvLk9W/LMTig7NjVDZH/6z7ksHM GKDTFfOVo4LTxJWbVYmlOCPRUIu5qDgRABVdqLqNAgAA X-CMS-MailID: 20190521120249eucas1p2e4a8fec922fa78783d7d3fed785f3e3b CMS-TYPE: 201P X-CMS-RootMailID: 20190521120249eucas1p2e4a8fec922fa78783d7d3fed785f3e3b References: <20190521115849.9882-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the code for getting generic PHYs from standard device tree array from the main controller device node. This is a first step in resolving the conflict between Exynos EHCI/OHCI sub-nodes and generic USB device bindings. Later the sub-nodes currently used for assigning PHYs to root ports of the controller will be removed making a place for the generic USB device bindings nodes. Suggested-by: Måns Rullgård Signed-off-by: Marek Szyprowski --- drivers/usb/host/ehci-exynos.c | 14 +++++++++++++- drivers/usb/host/ohci-exynos.c | 14 +++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c index 3a29a1a8519c..2a551a807ec0 100644 --- a/drivers/usb/host/ehci-exynos.c +++ b/drivers/usb/host/ehci-exynos.c @@ -50,10 +50,22 @@ static int exynos_ehci_get_phy(struct device *dev, { struct device_node *child; struct phy *phy; - int phy_number; + int phy_number, num_phys; int ret; /* Get PHYs for the controller */ + num_phys = of_count_phandle_with_args(dev->of_node, "phys", + "#phy-cells"); + for (phy_number = 0; phy_number < num_phys; phy_number++) { + phy = devm_of_phy_get_by_index(dev, dev->of_node, phy_number); + if (IS_ERR(phy)) + return PTR_ERR(phy); + exynos_ehci->phy[phy_number] = phy; + } + if (num_phys) + return 0; + + /* Get PHYs using legacy bindings */ for_each_available_child_of_node(dev->of_node, child) { ret = of_property_read_u32(child, "reg", &phy_number); if (ret) { diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c index 905c6317e0c3..195ea5fa021e 100644 --- a/drivers/usb/host/ohci-exynos.c +++ b/drivers/usb/host/ohci-exynos.c @@ -39,10 +39,22 @@ static int exynos_ohci_get_phy(struct device *dev, { struct device_node *child; struct phy *phy; - int phy_number; + int phy_number, num_phys; int ret; /* Get PHYs for the controller */ + num_phys = of_count_phandle_with_args(dev->of_node, "phys", + "#phy-cells"); + for (phy_number = 0; phy_number < num_phys; phy_number++) { + phy = devm_of_phy_get_by_index(dev, dev->of_node, phy_number); + if (IS_ERR(phy)) + return PTR_ERR(phy); + exynos_ohci->phy[phy_number] = phy; + } + if (num_phys) + return 0; + + /* Get PHYs using legacy bindings */ for_each_available_child_of_node(dev->of_node, child) { ret = of_property_read_u32(child, "reg", &phy_number); if (ret) { From patchwork Tue May 21 11:58:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10953519 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 91CC316C1 for ; Tue, 21 May 2019 12:03:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82E102893F for ; Tue, 21 May 2019 12:03:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 767D528942; Tue, 21 May 2019 12:03:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6B15289D2 for ; Tue, 21 May 2019 12:03:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726953AbfEUMDe (ORCPT ); Tue, 21 May 2019 08:03:34 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:58003 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727841AbfEUMDe (ORCPT ); Tue, 21 May 2019 08:03:34 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190521120331euoutp018a3dc4aa666ff699d8e229d4910233d1~gsR2VHBzh3209732097euoutp01g for ; Tue, 21 May 2019 12:03:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190521120331euoutp018a3dc4aa666ff699d8e229d4910233d1~gsR2VHBzh3209732097euoutp01g DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1558440211; bh=7tDTcPVWFmS86CkqkusrjjX7zb8niTkVNSvXSIqdS6U=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=dOB7MgmLMIvXZS9TdLFIVeMvaHRkX733QhXm1n0C3gKUPZ2RO/ojjCDS+DDkPhgf4 4vUgWPojUttyWJi6BHycHB9fXAEhTP05ahucRMkAm16OvgwdUExNHmSy5upHogMVCe Hzi9qejK5A9q7NcD/A2Ty7H3FoWc3plAhJLoEZX8= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190521120330eucas1p2da95802eb79b05ada8097a202256a5f8~gsR1k3Myt2818228182eucas1p2X; Tue, 21 May 2019 12:03:30 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 0F.E0.04325.219E3EC5; Tue, 21 May 2019 13:03:30 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190521120330eucas1p21d9704bfd16f286ae764d20e456ef6b3~gsR066utZ2818228182eucas1p2U; Tue, 21 May 2019 12:03:30 +0000 (GMT) X-AuditID: cbfec7f5-b8fff700000010e5-d5-5ce3e91216af Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 2C.72.04146.219E3EC5; Tue, 21 May 2019 13:03:30 +0100 (BST) MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset="UTF-8" Received: from AMDC2765.DIGITAL.local ([106.120.51.73]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PRU006F4RY90T20@eusync4.samsung.com>; Tue, 21 May 2019 13:03:30 +0100 (BST) From: Marek Szyprowski To: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Greg Kroah-Hartman , Marek Szyprowski , Bartlomiej Zolnierkiewicz , Markus Reichl , =?utf-8?b?TcOlbnMgUnVsbGfDpXJk?= , Krzysztof Kozlowski , Peter Chen , Alan Stern , Rob Herring Subject: [PATCH 4/5] ARM: dts: exynos: Remove obsolete port sub-nodes from EHCI/OHCI devices Date: Tue, 21 May 2019 13:58:48 +0200 Message-id: <20190521115849.9882-5-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190521115849.9882-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprIKsWRmVeSWpSXmKPExsWy7djP87pCLx/HGMx7rmSxccZ6Vov5R86x WjQvXs9mcf78BnaLy7vmsFnMOL+PyWLRslZmi5dHfjBarD1yl93ix8PpTBZ/7t1htWjde4Td YsLvC2wOvB637tR7bFrVyeaxf+4ado83p0+xe2x8t4PJY/bdH4wefVtWMXp83iQXwBHFZZOS mpNZllqkb5fAlfGpfSlbwUSdihuXXzE3MB5S6mLk4JAQMJFoeJbRxcjFISSwglFi1q2XTBDO Z0aJ5l3L2LsYOcGKvnT3s0IkljFK/Jh/jhkkwSsgKPFj8j0WkEnMAvISRy5lg4SZBTQltu5e zw5R/59R4sb0VWCD2AQMJbredrGB2CICDhJLlt5hAyliFjjHLLH4ZwcTSEJYIE5i+d1JYAtY BFQlDk55xASxzEbi/fMTUBfJS6zecACshlPAVmJ+03NmkEESAv/ZJLpn9LJBFLlInNnSCGXL SHR2HGSCKGpmlHh4bi07hNPDKHG5aQYjRJW1xOHjF1khnuCTmLRtOjMklHglOtqEIEo8JBZe +MwM8dsERokPc1azTGCUnoUUHLMQwTELKTgWMDKvYhRPLS3OTU8tNs5LLdcrTswtLs1L10vO z93ECEwop/8d/7qDcd+fpEOMAhyMSjy8Fg8fxwixJpYVV+YeYpTgYFYS4T196lGMEG9KYmVV alF+fFFpTmrxIUZpDhYlcd5qhgfRQgLpiSWp2ampBalFMFkmDk6pBkbn4NW1n1SL1KW5xKNP Hvl5cKuDwkUxWy3zqzJtkUmbN7NsdVs4bconv0I+doEPnw8leVUUuvwWWXbjCnfMr7PcFXIs OvMSnUpbjDMWXE/oCp17mV//tfa6mkL5xLmsEiall62LNjxfOC3091vzSoPuaV7PVJ2aWHfr no6bv/OJ8/N7YRa175VYijMSDbWYi4oTASylQmUkAwAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJLMWRmVeSWpSXmKPExsVy+t/xa7pCLx/HGCy5yG6xccZ6Vov5R86x WjQvXs9mcf78BnaLy7vmsFnMOL+PyWLRslZmi5dHfjBarD1yl93ix8PpTBZ/7t1htWjde4Td YsLvC2wOvB637tR7bFrVyeaxf+4ado83p0+xe2x8t4PJY/bdH4wefVtWMXp83iQXwBHFZZOS mpNZllqkb5fAlfGpfSlbwUSdihuXXzE3MB5S6mLk5JAQMJH40t3P2sXIxSEksIRR4uLO3ewg CV4BQYkfk++xdDFycDALyEscuZQNEmYWUJeYNG8RM4gtJNDIJDHlvDSIzSZgKNH1tosNxBYR cJBYsvQOG8hMZoELzBKdO/6AzRQWiJNYfncSWDOLgKrEwSmPmCB22Ui8f36CHeIgeYnVGw6A 1XAK2ErMb3oOtcxG4tWMDuYJjPyzkJw3C+G8WUjOW8DIvIpRJLW0ODc9t9hQrzgxt7g0L10v OT93EyMwQrYd+7l5B+OljcGHGAU4GJV4eB/cexwjxJpYVlyZe4hRgoNZSYT39KlHMUK8KYmV ValF+fFFpTmpxYcYpTlYlMR5OwQOxggJpCeWpGanphakFsFkmTg4pRoYJ9+S2+7zTzJ96nTt RRmtgdMChZZOevprBfc6seMnT+V2TJiX9YSNuXbOl+7s3JXGaqUysU5xKZMCGbu8IxutHm69 v3R7qKpEOqfqVTmdDIH8Q/PsfD9O6psUvOCm0wefgAMXzWfsFWWSnBcxJXHPs8VSbv5vT4Uc /6K+J2zjRAtxjfmskWHXlFiKMxINtZiLihMBfxp30IwCAAA= X-CMS-MailID: 20190521120330eucas1p21d9704bfd16f286ae764d20e456ef6b3 CMS-TYPE: 201P X-CMS-RootMailID: 20190521120330eucas1p21d9704bfd16f286ae764d20e456ef6b3 References: <20190521115849.9882-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove custom port sub-nodes from EHCI/OHCI devices. This way boards can define sub-nodes for the USB devices using generic USB device bindings. Suggested-by: Måns Rullgård Signed-off-by: Marek Szyprowski --- arch/arm/boot/dts/exynos4.dtsi | 24 ------------------- .../boot/dts/exynos4210-universal_c210.dts | 6 ----- arch/arm/boot/dts/exynos4412-itop-elite.dts | 7 ------ arch/arm/boot/dts/exynos4412-odroidu3.dts | 6 ----- arch/arm/boot/dts/exynos4412-odroidx.dts | 3 --- arch/arm/boot/dts/exynos4412-origen.dts | 7 ------ arch/arm/boot/dts/exynos5250.dtsi | 12 ---------- arch/arm/boot/dts/exynos54xx.dtsi | 14 ----------- 8 files changed, 79 deletions(-) diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index 7b94fbd9ed6c..09cae6a0ca77 100644 --- a/arch/arm/boot/dts/exynos4.dtsi +++ b/arch/arm/boot/dts/exynos4.dtsi @@ -382,23 +382,6 @@ status = "disabled"; phys = <&exynos_usbphy 1>, <&exynos_usbphy 2>, <&exynos_usbphy 3>; phy-names = "host", "hsic0", "hsic1"; - #address-cells = <1>; - #size-cells = <0>; - port@0 { - reg = <0>; - phys = <&exynos_usbphy 1>; - status = "disabled"; - }; - port@1 { - reg = <1>; - phys = <&exynos_usbphy 2>; - status = "disabled"; - }; - port@2 { - reg = <2>; - phys = <&exynos_usbphy 3>; - status = "disabled"; - }; }; ohci: ohci@12590000 { @@ -410,13 +393,6 @@ status = "disabled"; phys = <&exynos_usbphy 1>; phy-names = "host"; - #address-cells = <1>; - #size-cells = <0>; - port@0 { - reg = <0>; - phys = <&exynos_usbphy 1>; - status = "disabled"; - }; }; i2s1: i2s@13960000 { diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts b/arch/arm/boot/dts/exynos4210-universal_c210.dts index dbd6b43dbe52..c1c2fd537333 100644 --- a/arch/arm/boot/dts/exynos4210-universal_c210.dts +++ b/arch/arm/boot/dts/exynos4210-universal_c210.dts @@ -206,9 +206,6 @@ status = "okay"; phys = <&exynos_usbphy 1>; phy-names = "host"; - port@0 { - status = "okay"; - }; }; &exynos_usbphy { @@ -517,9 +514,6 @@ &ohci { status = "okay"; - port@0 { - status = "okay"; - }; }; &pinctrl_1 { diff --git a/arch/arm/boot/dts/exynos4412-itop-elite.dts b/arch/arm/boot/dts/exynos4412-itop-elite.dts index 1763b42c01cb..f6d0a5f5d339 100644 --- a/arch/arm/boot/dts/exynos4412-itop-elite.dts +++ b/arch/arm/boot/dts/exynos4412-itop-elite.dts @@ -148,13 +148,6 @@ phys = <&exynos_usbphy 1>, <&exynos_usbphy 3>; phy-names = "host", "hsic1"; - port@0 { - status = "okay"; - }; - - port@2 { - status = "okay"; - }; }; &exynos_usbphy { diff --git a/arch/arm/boot/dts/exynos4412-odroidu3.dts b/arch/arm/boot/dts/exynos4412-odroidu3.dts index 5bbaccffc9be..8ff243ba4542 100644 --- a/arch/arm/boot/dts/exynos4412-odroidu3.dts +++ b/arch/arm/boot/dts/exynos4412-odroidu3.dts @@ -107,12 +107,6 @@ &ehci { phys = <&exynos_usbphy 2>, <&exynos_usbphy 3>; phy-names = "hsic0", "hsic1"; - port@1 { - status = "okay"; - }; - port@2 { - status = "okay"; - }; }; &sound { diff --git a/arch/arm/boot/dts/exynos4412-odroidx.dts b/arch/arm/boot/dts/exynos4412-odroidx.dts index 306dd9365a91..3ea2a0101e80 100644 --- a/arch/arm/boot/dts/exynos4412-odroidx.dts +++ b/arch/arm/boot/dts/exynos4412-odroidx.dts @@ -74,9 +74,6 @@ &ehci { phys = <&exynos_usbphy 2>; phy-names = "hsic0"; - port@1 { - status = "okay"; - }; }; &mshc_0 { diff --git a/arch/arm/boot/dts/exynos4412-origen.dts b/arch/arm/boot/dts/exynos4412-origen.dts index e609e2af22d1..ecd14b283a6b 100644 --- a/arch/arm/boot/dts/exynos4412-origen.dts +++ b/arch/arm/boot/dts/exynos4412-origen.dts @@ -90,13 +90,6 @@ status = "okay"; phys = <&exynos_usbphy 2>, <&exynos_usbphy 3>; phy-names = "hsic0", "hsic1"; - - port@1 { - status = "okay"; - }; - port@2 { - status = "okay"; - }; }; &fimd { diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 2d23e99985e1..c5584f40ebfb 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -619,12 +619,6 @@ clock-names = "usbhost"; phys = <&usb2_phy_gen 1>; phy-names = "host"; - #address-cells = <1>; - #size-cells = <0>; - port@0 { - reg = <0>; - phys = <&usb2_phy_gen 1>; - }; }; ohci: usb@12120000 { @@ -636,12 +630,6 @@ clock-names = "usbhost"; phys = <&usb2_phy_gen 1>; phy-names = "host"; - #address-cells = <1>; - #size-cells = <0>; - port@0 { - reg = <0>; - phys = <&usb2_phy_gen 1>; - }; }; usb2_phy_gen: phy@12130000 { diff --git a/arch/arm/boot/dts/exynos54xx.dtsi b/arch/arm/boot/dts/exynos54xx.dtsi index ab1642cf0428..97746a68791a 100644 --- a/arch/arm/boot/dts/exynos54xx.dtsi +++ b/arch/arm/boot/dts/exynos54xx.dtsi @@ -182,13 +182,6 @@ interrupts = ; phys = <&usb2_phy 1>; phy-names = "host"; - - #address-cells = <1>; - #size-cells = <0>; - port@0 { - reg = <0>; - phys = <&usb2_phy 1>; - }; }; usbhost1: usb@12120000 { @@ -197,13 +190,6 @@ interrupts = ; phys = <&usb2_phy 1>; phy-names = "host"; - - #address-cells = <1>; - #size-cells = <0>; - port@0 { - reg = <0>; - phys = <&usb2_phy 1>; - }; }; usb2_phy: phy@12130000 { From patchwork Tue May 21 11:58:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10953521 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 9FBAB16C1 for ; Tue, 21 May 2019 12:03:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D99C2893F for ; Tue, 21 May 2019 12:03:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7FF72289D2; Tue, 21 May 2019 12:03:58 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 D2FDA2893F for ; Tue, 21 May 2019 12:03:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728066AbfEUMD5 (ORCPT ); Tue, 21 May 2019 08:03:57 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:47511 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728045AbfEUMD5 (ORCPT ); Tue, 21 May 2019 08:03:57 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190521120356euoutp0298469af9d2e3ee1206467c16dd80ec52~gsSNMDAeU2274322743euoutp02T for ; Tue, 21 May 2019 12:03:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190521120356euoutp0298469af9d2e3ee1206467c16dd80ec52~gsSNMDAeU2274322743euoutp02T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1558440236; bh=CHPrUFU5Cx2/8C7het5Q6gacxBr3DSqd8aCWWckjr4k=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=ISx+VM17AcI/IWORtry6RQhOT6uer+KemjxtKKLtphzpDp8rrTn6b/2qQC+QbHr+N VCu3N+z1zfR7tY4qBDI520z6ex5KwvxhtVlR+583mOelCuhjDx2X9uePwmcl7LRp2k xocqK8VnDSQRSOakQ4Se5x30OiYfG9YPILfZoqLg= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190521120355eucas1p1cb595d69733fd52ed44f2893c2900090~gsSMRVO8F2855228552eucas1p1F; Tue, 21 May 2019 12:03:55 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 11.3B.04377.A29E3EC5; Tue, 21 May 2019 13:03:54 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190521120354eucas1p2a39ba06586ddd388a9c376a40327bb4c~gsSLeG_4H2602826028eucas1p2P; Tue, 21 May 2019 12:03:54 +0000 (GMT) X-AuditID: cbfec7f4-12dff70000001119-b5-5ce3e92afa46 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 5A.DE.04140.A29E3EC5; Tue, 21 May 2019 13:03:54 +0100 (BST) MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset="UTF-8" Received: from AMDC2765.DIGITAL.local ([106.120.51.73]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PRU006F4RY90T20@eusync4.samsung.com>; Tue, 21 May 2019 13:03:53 +0100 (BST) From: Marek Szyprowski To: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Greg Kroah-Hartman , Marek Szyprowski , Bartlomiej Zolnierkiewicz , Markus Reichl , =?utf-8?b?TcOlbnMgUnVsbGfDpXJk?= , Krzysztof Kozlowski , Peter Chen , Alan Stern , Rob Herring Subject: [PATCH 5/5] usb: exynos: Remove support for legacy PHY bindings Date: Tue, 21 May 2019 13:58:49 +0200 Message-id: <20190521115849.9882-6-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190521115849.9882-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA02SbUhTcRTG++/uvjha3KbhH7WkUYGSmiF5Kw2NwhsYGEmBGbnyouKctqum liSKZbeUlYK2fMM3bGW+pLKMzObQcOEsZdhwkhnITP3inK9pzavkt+ec5wfnnIdDIJKnqBuR oEhllAqZXIqJhJ19y0Yfb+tk9DHT+kmqtawZpar0gyiVV9uMUUZjC04Nd5VjVJmxW0DVNOQj lFW/BKgmvQWnliZKBdTa+BhK5X/Q45RqdQgLEdPmsft0m+YRRn+seI3TM4YBnG6d0wroF5Yl QBe1awA933YggogSBcUy8oR0Rul3JkYUb6jsRFLsfhm63xo0B1iOcMCJgGQAtFprEA6ICAnZ CGDvZzvKF/MAtpavC7apPlsb4I0GACfHexCHISb3wqXicSEHCAIhPaH+W6KjjZBesON9M87z GwB+minY5DHSH3KzHObQLmQIrKsfwxwQQg4isHa5YHOaM0nDLm0v7tBC8jAcLjKh/LAgWG9t wPmNPOGrFn4JJzIYVuVOIXx/A4ONjUd5fQ5qqzYArz3gcPFjoWMYJPMAnBhswvniCYDDuWVb 1GnY2/8V5W/YA591liKO0yAphgUPJDxCQ82Xgq2MVACOlMygKuCu3pGG+n8a6h1pVANEA1yZ NDYpjmGPK5g7vqwsiU1TxPneSk5qA/8exbDeb9OCrrWbOkASQLpbTE1MRktQWTqbmaQDkECk LmLDwM9oiThWlpnFKJNvKNPkDKsD7oRQ6iq+u+vHNQkZJ0tlEhkmhVFuuwLCyS0HvPwTxamd 5wYO3gs1rUVWms5fGJpu9+8NeFuR220byy6M+SWszFKFX4qwnIgaNe/zqXv30GUF2rNnibOr p7iV7yPyywvG51cXwm2HRi+GLUZUM4VYR0bCdZVfceB0iJeZ6Vg0mYFHGFfo59z3JvBKjJPh tr1kNXhKS4b27F+OlArZeJm/N6JkZX8BRYvEriQDAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFLMWRmVeSWpSXmKPExsVy+t/xa7paLx/HGHycwGSxccZ6Vov5R86x WjQvXs9mcf78BnaLy7vmsFnMOL+PyWLRslZmi5dHfjBarD1yl93ix8PpTBZ/7t1htWjde4Td YsLvC2wOvB637tR7bFrVyeaxf+4ado83p0+xe2x8t4PJY/bdH4wefVtWMXp83iQXwBHFZZOS mpNZllqkb5fAlXF63jbmgm/6FYder2JtYLyr1sXIySEhYCJx7Msmxi5GLg4hgSWMEsdfX2cE SfAKCEr8mHyPpYuRg4NZQF7iyKVskDCzgLrEpHmLmCHqG5kkrq5fyQaSYBMwlOh62wVmiwg4 SCxZeocNpIhZ4AKzROeOP+wgCWEBD4ldOw6D2SwCqhKX+66xQiyzkVj6chk7xEXyEqs3HGAG sTkFbCXmNz0Hs4WAal7N6GCewMg/C8l9sxDum4XkvgWMzKsYRVJLi3PTc4uN9IoTc4tL89L1 kvNzNzECY2TbsZ9bdjB2vQs+xCjAwajEw/vg3uMYIdbEsuLK3EOMEhzMSiK8p089ihHiTUms rEotyo8vKs1JLT7EKM3BoiTO2yFwMEZIID2xJDU7NbUgtQgmy8TBKdXAWLSpsmGFsZCpVccf Lh2RZXm2TZbl3duPt78T2nKN6YjLr0qOLo/r/bJ1QpIJk8M3vWfZcjRl+poLf6/uev1ghpfm pcIURttdXNvZvOs2z9F42WryOGpK6YX80lmLa14vtLs5nXN2xo7rth8vzu40maw3nduDv67j CZfjcfFbz0sO/RNVuPNOWImlOCPRUIu5qDgRANDy9seNAgAA X-CMS-MailID: 20190521120354eucas1p2a39ba06586ddd388a9c376a40327bb4c CMS-TYPE: 201P X-CMS-RootMailID: 20190521120354eucas1p2a39ba06586ddd388a9c376a40327bb4c References: <20190521115849.9882-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Exnyos EHCI/OHCI custom port device tree sub-nodes under EHCI/OHCI devices has been removed, so the code for handling them can be also removed. Once this has been done, we can also remove the workaround added by commit 01d4071486fe ("usb: exynos: add workaround for the USB device bindings conflict") and enable support for the generic USB device bindings. Suggested-by: Måns Rullgård Signed-off-by: Marek Szyprowski --- drivers/usb/host/ehci-exynos.c | 46 ---------------------------------- drivers/usb/host/ohci-exynos.c | 46 ---------------------------------- 2 files changed, 92 deletions(-) diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c index 2a551a807ec0..afde1ffa0824 100644 --- a/drivers/usb/host/ehci-exynos.c +++ b/drivers/usb/host/ehci-exynos.c @@ -39,7 +39,6 @@ static struct hc_driver __read_mostly exynos_ehci_hc_driver; struct exynos_ehci_hcd { struct clk *clk; - struct device_node *of_node; struct phy *phy[PHY_NUMBER]; }; @@ -48,10 +47,8 @@ struct exynos_ehci_hcd { static int exynos_ehci_get_phy(struct device *dev, struct exynos_ehci_hcd *exynos_ehci) { - struct device_node *child; struct phy *phy; int phy_number, num_phys; - int ret; /* Get PHYs for the controller */ num_phys = of_count_phandle_with_args(dev->of_node, "phys", @@ -62,39 +59,6 @@ static int exynos_ehci_get_phy(struct device *dev, return PTR_ERR(phy); exynos_ehci->phy[phy_number] = phy; } - if (num_phys) - return 0; - - /* Get PHYs using legacy bindings */ - for_each_available_child_of_node(dev->of_node, child) { - ret = of_property_read_u32(child, "reg", &phy_number); - if (ret) { - dev_err(dev, "Failed to parse device tree\n"); - of_node_put(child); - return ret; - } - - if (phy_number >= PHY_NUMBER) { - dev_err(dev, "Invalid number of PHYs\n"); - of_node_put(child); - return -EINVAL; - } - - phy = devm_of_phy_get(dev, child, NULL); - exynos_ehci->phy[phy_number] = phy; - if (IS_ERR(phy)) { - ret = PTR_ERR(phy); - if (ret == -EPROBE_DEFER) { - of_node_put(child); - return ret; - } else if (ret != -ENOSYS && ret != -ENODEV) { - dev_err(dev, - "Error retrieving usb2 phy: %d\n", ret); - of_node_put(child); - return ret; - } - } - } return 0; } @@ -216,13 +180,6 @@ static int exynos_ehci_probe(struct platform_device *pdev) ehci = hcd_to_ehci(hcd); ehci->caps = hcd->regs; - /* - * Workaround: reset of_node pointer to avoid conflict between Exynos - * EHCI port subnodes and generic USB device bindings - */ - exynos_ehci->of_node = pdev->dev.of_node; - pdev->dev.of_node = NULL; - /* DMA burst Enable */ writel(EHCI_INSNREG00_ENABLE_DMA_BURST, EHCI_INSNREG00(hcd->regs)); @@ -239,7 +196,6 @@ static int exynos_ehci_probe(struct platform_device *pdev) fail_add_hcd: exynos_ehci_phy_disable(&pdev->dev); - pdev->dev.of_node = exynos_ehci->of_node; fail_io: clk_disable_unprepare(exynos_ehci->clk); fail_clk: @@ -252,8 +208,6 @@ static int exynos_ehci_remove(struct platform_device *pdev) struct usb_hcd *hcd = platform_get_drvdata(pdev); struct exynos_ehci_hcd *exynos_ehci = to_exynos_ehci(hcd); - pdev->dev.of_node = exynos_ehci->of_node; - usb_remove_hcd(hcd); exynos_ehci_phy_disable(&pdev->dev); diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c index 195ea5fa021e..8e9f4ef4e397 100644 --- a/drivers/usb/host/ohci-exynos.c +++ b/drivers/usb/host/ohci-exynos.c @@ -30,17 +30,14 @@ static struct hc_driver __read_mostly exynos_ohci_hc_driver; struct exynos_ohci_hcd { struct clk *clk; - struct device_node *of_node; struct phy *phy[PHY_NUMBER]; }; static int exynos_ohci_get_phy(struct device *dev, struct exynos_ohci_hcd *exynos_ohci) { - struct device_node *child; struct phy *phy; int phy_number, num_phys; - int ret; /* Get PHYs for the controller */ num_phys = of_count_phandle_with_args(dev->of_node, "phys", @@ -51,39 +48,6 @@ static int exynos_ohci_get_phy(struct device *dev, return PTR_ERR(phy); exynos_ohci->phy[phy_number] = phy; } - if (num_phys) - return 0; - - /* Get PHYs using legacy bindings */ - for_each_available_child_of_node(dev->of_node, child) { - ret = of_property_read_u32(child, "reg", &phy_number); - if (ret) { - dev_err(dev, "Failed to parse device tree\n"); - of_node_put(child); - return ret; - } - - if (phy_number >= PHY_NUMBER) { - dev_err(dev, "Invalid number of PHYs\n"); - of_node_put(child); - return -EINVAL; - } - - phy = devm_of_phy_get(dev, child, NULL); - exynos_ohci->phy[phy_number] = phy; - if (IS_ERR(phy)) { - ret = PTR_ERR(phy); - if (ret == -EPROBE_DEFER) { - of_node_put(child); - return ret; - } else if (ret != -ENOSYS && ret != -ENODEV) { - dev_err(dev, - "Error retrieving usb2 phy: %d\n", ret); - of_node_put(child); - return ret; - } - } - } return 0; } @@ -183,13 +147,6 @@ static int exynos_ohci_probe(struct platform_device *pdev) goto fail_io; } - /* - * Workaround: reset of_node pointer to avoid conflict between Exynos - * OHCI port subnodes and generic USB device bindings - */ - exynos_ohci->of_node = pdev->dev.of_node; - pdev->dev.of_node = NULL; - err = usb_add_hcd(hcd, irq, IRQF_SHARED); if (err) { dev_err(&pdev->dev, "Failed to add USB HCD\n"); @@ -200,7 +157,6 @@ static int exynos_ohci_probe(struct platform_device *pdev) fail_add_hcd: exynos_ohci_phy_disable(&pdev->dev); - pdev->dev.of_node = exynos_ohci->of_node; fail_io: clk_disable_unprepare(exynos_ohci->clk); fail_clk: @@ -213,8 +169,6 @@ static int exynos_ohci_remove(struct platform_device *pdev) struct usb_hcd *hcd = platform_get_drvdata(pdev); struct exynos_ohci_hcd *exynos_ohci = to_exynos_ohci(hcd); - pdev->dev.of_node = exynos_ohci->of_node; - usb_remove_hcd(hcd); exynos_ohci_phy_disable(&pdev->dev);