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: 164712 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1509833ili; Tue, 21 May 2019 05:02:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqzcVRCvsXy6cbaCiH/9Pb0ZdD9ewXO+9opYt7bNTyzZFKZuNPhzza8VrtWKgtbwenfxLgSa X-Received: by 2002:a63:1701:: with SMTP id x1mr81593308pgl.153.1558440129362; Tue, 21 May 2019 05:02:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558440129; cv=none; d=google.com; s=arc-20160816; b=wkfR5Uxt7pgU/DPOK5PY0t+o7WVzkKwVSYKSuLBoJ3bphLW3EvUKXhwEggioB3bxE8 2TMfrdkZxgk4nyj4c37rN7OWM0cJTXZpJY4ZFOix1wQLXZnvDYGAQawF/2XNQWib6IKA pivnIzHc30iTDOxQO/4Z0Z65lIy1QexulpRTNQbiqIgVtiDrpZQEkeH4GPrT47c23UJt mgBbLeiPb/n2fvhqYXT9hysVnLsqqSNXaV9Xpt92j+lZmOqlXK1Hqbz5zwBZEUDCfOAG 8s2a/ZF0PQgEcPJW14xZSK5l/16NE2j3szaNzAP4mXRjVqzffdxJMiSyGylBUIGV9S63 6WjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:content-transfer-encoding :mime-version:dkim-signature:dkim-filter; bh=ifJpnpYKeGfoa9EI/dpaSOWkHwZALEyhwRZH/XL2H+0=; b=y8Ms/Yfk7ew6qy/VuNiUHiFLfghPiZ/cEQfnebahiPCO9c/FncnFbfnY1yVqLEKFrS C8uuPHC0KltBZ8YvCXgkC4U8ZiRijMmPnnzUhU6xulfFcpSwGYWuO9w71H5X/cc6dnNt R/qd51hKnTcEeLaGwY4HcJovLyuVpeNGu2XPYX818OG5SeOtFLJWAI96SM9vPPabn2Ho lo0UwQz8i46Ehv/sDJdBMsnDDUW2XmtxG3wiT6NhCgTY6vKmPqKaS7K6PLnx3F+PdteI NUKXXOTDqlivcWp0SPb1rg7sCRB2sNYonO49mMfjJE86O7n/4YJN7VNKeNC+RRUhRvig QNVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=R4Dlpcuw; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d197si19711883pga.110.2019.05.21.05.02.09; Tue, 21 May 2019 05:02:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=R4Dlpcuw; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728058AbfEUMCI (ORCPT + 3 others); 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 Gca8yA82tw6491wiFNbkzSHMfhOFk6az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gtgskycXBKNTB2ux47rmzh7G72+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 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(+) -- 2.17.1 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: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: 164715 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1512089ili; Tue, 21 May 2019 05:03:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqz9NVPT/9nry56kYIUkut9lVnb3hBwUuA2s7rdTSmx/bMpqGVXpO/iFETXff0SsvVSron6s X-Received: by 2002:a17:902:7591:: with SMTP id j17mr21983871pll.200.1558440238116; Tue, 21 May 2019 05:03:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558440238; cv=none; d=google.com; s=arc-20160816; b=NlyhcJXWvYU0NnQnZoFrjrhuI6JYOsZ4J5bVzMj0HxJ6uB8ylMgj4GGeJTWHPavUEL y9kMttsKQxveDOVBtMN5queURQ7P8CSCzxffpCfunmyG7CJcX+sSaU6XwFk+1xo0mNYk geyoefnpTLqPfVJXAknOiHL9rXykS0QVdOXgBLsb7Z+K/y5gLPN4fu4tlc5rERDZUCaP cq556epZy1slQSKm41m4TQ6fL9hgn8DEsA/jmlGdbc8RynP0ZbQhUj1emZhRJ6VJILHL kuvqob6f/SpJvsT+WbI77nS2UucfS+tNJ9MfXlLQmAiLM1BEtuvU/HAnmSo1o1YJZwIX 6hng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:content-transfer-encoding :mime-version:dkim-signature:dkim-filter; bh=CHPrUFU5Cx2/8C7het5Q6gacxBr3DSqd8aCWWckjr4k=; b=lCngL6iaIVA2zjbFA+5TJZs1uHuMdW8ulkjhGo90HKPwAG5Blj7Df2VWJwMbHQx0Sx ElLfc9SAy82Jj2PYuwFeIecDDbJ5W7LiO4GLekjxEztJ7zn6NzLvNdbhptmeH7bAokdo E0SnQL0X0hmIfCnW9NcsKrrtHP7KDh0opsra4nSnkA3XBtr8vKnDgnMzZQpwFSzf/QAv k379EQn9TTNS3Fvn1OZoygstl4c+Z7FItY/uPqmZ9etnL+PpUKYB3RBkjLfbJXQcUuaG trgAcpXjkK6mKDWOYjjhasCr2PCFOc0GD82Ue+vMJADVYXbw7b9xbKJ9uhVeW8hEqcfk AKNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ISx+VM17; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m189si23014061pfm.17.2019.05.21.05.03.57; Tue, 21 May 2019 05:03:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ISx+VM17; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728066AbfEUMD5 (ORCPT + 3 others); 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/YA591liKO0yAphgUPJDxCQ82Xgq2M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fZcjRl+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 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(-) -- 2.17.1 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);