From patchwork Fri Jul 26 08:14:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 169789 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp12703224ilk; Fri, 26 Jul 2019 01:15:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwO9xYFxPndZ7tU9QNOpIgSCAMTyiILx+tSdxO+6P5YPnA5qoPmdqV961tdrQownYC7c084 X-Received: by 2002:a17:902:4b:: with SMTP id 69mr94478194pla.89.1564128914126; Fri, 26 Jul 2019 01:15:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564128914; cv=none; d=google.com; s=arc-20160816; b=kkBTZNaqumiIfD0RgydAUzqJiOy1+QXG0izpFKBOUT2/hPOvpEKq9wsT1J2wUXvH+G 5qbbdrD1k1HAxPQuxce4+3RMq/85F2mB0T/5MLfMasNBqcL9DI6rV3qMmOSze8ZtWzAv wFDO2LmqJONl+U+kk+rpO9S8KfQdk4ZYLaNgU6mQsZvMGU6FMHvTB5UpViJdVrJm3Y+z Yq7LxtnjDSkU/MsKQDRsbBzbsqyZq8TuF6dLvdLgS5EWAJjfuQbo5GgfYJY/+ETqwgQG D3LUs6TRxbYXoqWmfzOkgyMsyM/hjT1tCWvUXSp5VoZgtWHM7PRhiEY0PzVdJCknaMhU BzcA== 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 :content-transfer-encoding:mime-version:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=hZ4MwfR13AaNPCdSDCn6Bz3onvIw3auhZCwCGXSUNnY=; b=jw8x5uCNAEtaO80C47/1V/XpxwsYzYTlGPHdzYsXftvmAWYy7UDiiVDAuEnY2vYIY9 8+Cbh/yI7TtGpr6PsrVmxBDG5u/PfUzHFgAe3PnsJonVf2Vjp9wrftqZLLeiX2Y23ghA l610LiT1MFRNNcYtVIecBGfLtGG4QFuJ7ViVS7NUX96e2822ZQ4ZUBIvCi29HNegJovu agN/ddjYw0+I5lixXaBhrasLHC62VE1FHO7e0TKH/BUYPJxgHZoBxEkrktRlbdJXVIaf Sk342OgIzBjZ3teXYRU+qRw43qar951EOYU354jolBodStDZQ5TCmYoliYmgHYxpZ7ew pkFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=TSLvqFpK; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-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 t13si19328731pfh.245.2019.07.26.01.15.13; Fri, 26 Jul 2019 01:15:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-usb-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=TSLvqFpK; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-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 S1726518AbfGZIPN (ORCPT + 5 others); Fri, 26 Jul 2019 04:15:13 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:40292 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726430AbfGZIPK (ORCPT ); Fri, 26 Jul 2019 04:15:10 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190726081507euoutp027e2c650f46fe2161e3a452e6baf53cf4~05vRG53o10303103031euoutp02N for ; Fri, 26 Jul 2019 08:15:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190726081507euoutp027e2c650f46fe2161e3a452e6baf53cf4~05vRG53o10303103031euoutp02N DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1564128907; bh=hZ4MwfR13AaNPCdSDCn6Bz3onvIw3auhZCwCGXSUNnY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TSLvqFpKJaK5hViqWUlAHLgVggZBQsZgwhNPi6ZAu7f5fCEGr3X7i0iW1NwtnDtc6 f83H0I9C+1og7rbJYE++bzwe+aNTMLBOVZVAtUetl2bp4pCGLsBZ2GoITZJdY2Cyib 6R7S5MNJmdo7Y0lB96aDA79haX2AkX6EvCOeLR5I= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190726081506eucas1p14600c7c986b96b8ee9421c77feffeb1d~05vQhNVwB2123721237eucas1p1n; Fri, 26 Jul 2019 08:15:06 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id FE.1B.04377.A86BA3D5; Fri, 26 Jul 2019 09:15:06 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190726081505eucas1p146c14eed320c57050aa968b7c97b227b~05vPw7Rex2124521245eucas1p1k; Fri, 26 Jul 2019 08:15:05 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190726081505eusmtrp2a16d4c68bde1588516aa8abab6f93049~05vPi0ebv3187231872eusmtrp2s; Fri, 26 Jul 2019 08:15:05 +0000 (GMT) X-AuditID: cbfec7f4-12dff70000001119-d1-5d3ab68a4a7d Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id CD.7C.04146.986BA3D5; Fri, 26 Jul 2019 09:15:05 +0100 (BST) Received: from AMDC2765.DIGITAL.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190726081505eusmtip2c82af7ba052a9d2ff106ab59d8600296~05vO8aiy43038030380eusmtip2t; Fri, 26 Jul 2019 08:15:05 +0000 (GMT) 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 v2 2/3] usb: exynos: add support for getting PHYs from the standard dt array Date: Fri, 26 Jul 2019 10:14:52 +0200 Message-Id: <20190726081453.9456-3-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190726081453.9456-1-m.szyprowski@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA01SfSyUcRz3u+eeF3L2ODY/uoWr9La8NGtPXE2rtWdrK72trYauPB3h2N0h WlxujJuk1sKpsSghzvs4k3AlbE6oybw2eltYWJ2dKXcP8t/n+/l+Pr/P57v9CITfjboQ4VIF I5OKI4WYDbfh7ZJhv7rBL8h7fk5AVedqUapA34tSqiItRhkMVTg1oHuMUbmGVxzq6fNUhPqu NwKqQj+KU8bJHA61PDaCUqktepzKNvVhATx6eCSZrinLwOjWJy9x+mdPN05XzzZy6PxRI6Cz 6soAvVCzLZC4ZCMKZSLD4xiZ15ErNmEfSkUx+dtvlowUo0pgEKiBNQFJX/imvxwxYz75AsDf s9fVwGYVLwJ4r2gaZ4cFAJUTtWDd8XClEGEXJQAudafhG5Y0432OWYWRPlA9o8bM2JEMgMXP RjCzC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dIQRUs//XbjaIekGJkzOfsICMYRZQl1g/ TwgkzAzU2rx1NvMERsFZSKpmIVTNQlK1gJF5FaNIamlxbnpusaFecWJucWleul5yfu4mRmBc bjv2c/MOxksbgw8xCnAwKvHwXlhuGSvEmlhWXJl7iFGCg1lJhHfrDqAQb0piZVVqUX58UWlO avEhRlOgzyYyS4km5wNTRl5JvKGpobmFpaG5sbmxmYWSOG+HwMEYIYH0xJLU7NTUgtQimD4m Dk6pBkb344lrr8zO3LY/VSTtcPfK9qdPc2LWZcyYmBV5aGV0ykbVR42200SZoroc15zgteQw D/5vayAQq/Dqc4L4tZrjR35y5UpvvKCxUfLhlXTBwyfyPynlBuipGXDPqytiDuBsC/JYGn25 yJuZ7+0xoXnXa0q3L9lv7GjZdnl3VZCuc8/NVVsL7ZVYijMSDbWYi4oTAe708dThAgAA X-CMS-MailID: 20190726081505eucas1p146c14eed320c57050aa968b7c97b227b X-Msg-Generator: CA X-RootMTR: 20190726081505eucas1p146c14eed320c57050aa968b7c97b227b X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190726081505eucas1p146c14eed320c57050aa968b7c97b227b References: <20190726081453.9456-1-m.szyprowski@samsung.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org 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 | 23 +++++++++++++++++++---- drivers/usb/host/ohci-exynos.c | 23 +++++++++++++++++++---- 2 files changed, 38 insertions(+), 8 deletions(-) -- 2.17.1 diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c index 3a29a1a8519c..01debfd03d4a 100644 --- a/drivers/usb/host/ehci-exynos.c +++ b/drivers/usb/host/ehci-exynos.c @@ -41,6 +41,7 @@ struct exynos_ehci_hcd { struct clk *clk; struct device_node *of_node; struct phy *phy[PHY_NUMBER]; + bool legacy_phy; }; #define to_exynos_ehci(hcd) (struct exynos_ehci_hcd *)(hcd_to_ehci(hcd)->priv) @@ -50,10 +51,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 > 0) + 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) { @@ -84,6 +97,7 @@ static int exynos_ehci_get_phy(struct device *dev, } } + exynos_ehci->legacy_phy = true; return 0; } @@ -205,11 +219,12 @@ static int exynos_ehci_probe(struct platform_device *pdev) ehci->caps = hcd->regs; /* - * Workaround: reset of_node pointer to avoid conflict between Exynos - * EHCI port subnodes and generic USB device bindings + * Workaround: reset of_node pointer to avoid conflict between legacy + * Exynos EHCI port subnodes and generic USB device bindings */ exynos_ehci->of_node = pdev->dev.of_node; - pdev->dev.of_node = NULL; + if (exynos_ehci->legacy_phy) + pdev->dev.of_node = NULL; /* DMA burst Enable */ writel(EHCI_INSNREG00_ENABLE_DMA_BURST, EHCI_INSNREG00(hcd->regs)); diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c index 905c6317e0c3..d5ce98e205c7 100644 --- a/drivers/usb/host/ohci-exynos.c +++ b/drivers/usb/host/ohci-exynos.c @@ -32,6 +32,7 @@ struct exynos_ohci_hcd { struct clk *clk; struct device_node *of_node; struct phy *phy[PHY_NUMBER]; + bool legacy_phy; }; static int exynos_ohci_get_phy(struct device *dev, @@ -39,10 +40,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 > 0) + 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) { @@ -73,6 +86,7 @@ static int exynos_ohci_get_phy(struct device *dev, } } + exynos_ohci->legacy_phy = true; return 0; } @@ -172,11 +186,12 @@ static int exynos_ohci_probe(struct platform_device *pdev) } /* - * Workaround: reset of_node pointer to avoid conflict between Exynos - * OHCI port subnodes and generic USB device bindings + * Workaround: reset of_node pointer to avoid conflict between legacy + * Exynos OHCI port subnodes and generic USB device bindings */ exynos_ohci->of_node = pdev->dev.of_node; - pdev->dev.of_node = NULL; + if (exynos_ohci->legacy_phy) + pdev->dev.of_node = NULL; err = usb_add_hcd(hcd, irq, IRQF_SHARED); if (err) { From patchwork Fri Jul 26 08:14:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 169790 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp12703227ilk; Fri, 26 Jul 2019 01:15:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqy6w+7wYt3B6e/8WeUpOH/F7fiicqzGCDog1+q1UIlGeybWYI6ox2CK2NP1ULWF6oQ5FRN5 X-Received: by 2002:a17:90a:ad86:: with SMTP id s6mr97410094pjq.42.1564128914490; Fri, 26 Jul 2019 01:15:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564128914; cv=none; d=google.com; s=arc-20160816; b=JUWz8dpZUhmIgm6O3ESZtUMSVIhcDxKpcQ4u61DvTKKZ55B1sfZh/5PiGI9wNR5Inr WEyZa3CiTAoz2ITZDFjFa29oBqNSBL3j3dKx74QLfL1zS/l9uXo4jMXfLRgjBfp6v8vE fn6Iyb9G5qd5VaE80/1Nhjw0cIkGD1vEvyJ0BPJXYg7hyti2jMXywG82msHUy1kE0rtC oGmbSKkD2CLe6ZwPA6MxfwUtDbE3ExQWuB4A43da0aMm9gvld1Me2WSEOUi7O9VqrJva TU+JIowQtA/9gmHN3de7qMLMCMECinKQVgu/p9gys3/IJ4A6gluflN7YMF2y229YUZpd XTmA== 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 :content-transfer-encoding:mime-version:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=nupSiFsT5yy8+L2dB5gm6N0NcU+S+TTvT8bj9kaAqE4=; b=qXiCe/TbDr7BLqmlsWcnhmmUE2Zb4NFEDPWpebaeaNl0ouWGqWq8DV3ENks/Iz51Bh VJubmtWfLjpVmSqayqbT917bhKlLsZVaO316vEOUqhW6JAKlvi0gCNMrevJPzV9TDvFY 8outFkuLXG739XCJmdGgE7GZOO5e2HtqLqFXtN2uMzfCoVmGczpzpnuwuK5ZBvn4pigp 5f9HIIr+4I6TrmcXGCsrk5TA+/3ahuQm/sjPO+QAXw9SfNXN35LtIVqd58WUS2RSuLLZ T5mLix4Ve6Wv5E15xtCqJex4gvSpHh/IQ1t42NSDUiRhjPRCtIxeybm3+fDoC1J2R4ya VrpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=TGH88jOQ; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-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 t13si19328731pfh.245.2019.07.26.01.15.14; Fri, 26 Jul 2019 01:15:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-usb-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=TGH88jOQ; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-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 S1725842AbfGZIPM (ORCPT + 5 others); Fri, 26 Jul 2019 04:15:12 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:50654 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726437AbfGZIPK (ORCPT ); Fri, 26 Jul 2019 04:15:10 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190726081508euoutp01c63871d36dff5ede3b033915cfe5768c~05vRz7-sh2569825698euoutp01R for ; Fri, 26 Jul 2019 08:15:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190726081508euoutp01c63871d36dff5ede3b033915cfe5768c~05vRz7-sh2569825698euoutp01R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1564128908; bh=nupSiFsT5yy8+L2dB5gm6N0NcU+S+TTvT8bj9kaAqE4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TGH88jOQiVeNBloV7MwYsZIVWReBDwb3kyAWjAEpGUmaq6VEWTD+tybwoWYrPzURP q2oNjEU5Gx1xsbTO3JCZMHKoaRP6dUMKAA+t0i/hqlTdnroFZDHvkv2G/nFUGGQX9h gSKJkdltkr1kOYztiEp8OqJl6YoiRvE0NLxmNCKc= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190726081507eucas1p11396e7b33a62f9047b080fd036027fcf~05vRC-CVR2125221252eucas1p1o; Fri, 26 Jul 2019 08:15:07 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id DA.C1.04325.B86BA3D5; Fri, 26 Jul 2019 09:15:07 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20190726081506eucas1p20e7e633e89529b862952fe9f783f72e5~05vQUUhY92724627246eucas1p20; Fri, 26 Jul 2019 08:15:06 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190726081506eusmtrp2bac053102a57f227f356df2b2ebc961c~05vQGNc_O3187231872eusmtrp2t; Fri, 26 Jul 2019 08:15:06 +0000 (GMT) X-AuditID: cbfec7f5-b8fff700000010e5-41-5d3ab68a8e78 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 1D.84.04140.A86BA3D5; Fri, 26 Jul 2019 09:15:06 +0100 (BST) Received: from AMDC2765.DIGITAL.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190726081505eusmtip25bfe43a5d6730b026b3327de952e0286~05vPfVDeR3050330503eusmtip2t; Fri, 26 Jul 2019 08:15:05 +0000 (GMT) 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 v2 3/3] ARM: dts: exynos: Use standard arrays of generic PHYs for EHCI/OHCI devices Date: Fri, 26 Jul 2019 10:14:53 +0200 Message-Id: <20190726081453.9456-4-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190726081453.9456-1-m.szyprowski@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA02SfyyUcRzH+z7P3T0PdfY4Nt8k1m2Jyq9+2JNoyB/Pwmb90xbG4QnLHd35 kUzMpelSo9mIonHJroQbwnZ+XDdHDFEJp3FZS/mxojmL6h6Pyn+v7+f7+nw/7+93XxwV9HHt 8URJKi2ViJKEPEtOa+/6kNvtVp9IT+NnhGwqa+CSVbohLimvaeCRw8ONGDnW8YBHlg13ImR1 bT5KzutMgKzXTWOkabYUITc+GLhkvkaHkUU/R3j+fGrSkEOpVbd4VNfDZxi1MPAKo5qW2hCq YtoEqLvNKkCtqB3D8IuWvnF0UmI6LfU4E22ZMD34FaT0eF2tKypBcoHRWQEscEicgN03tByG BUQdgN1z3iyvAlgxFasAlmZeAbBkasIs4VsN66azrPMEwMpCLuuY/fHRdpTZ4BFeULGo4DFs S/hD5WMDj5FQYgiFNesFCHOQDUHDigIR43CIg3C5bwYwzCd84WaxDmXDOcGnjd1bbEH4wTuf 6hHWsYb99+e2QqNmR95SgTLnQ8KIQWXX2nZzENRsargs28Av+maMZQf4u70KYRvkAM4O1WPs ohDAsbwywFqn4Uv9ay6TFCVcYUOHB1sOgMaP1Qj7Elbw/aI1G8IK3mstRdkyHxbcFLC2MyzX P/83tmdkdDsaBRe+9yBF4ED5juuU77hO+f+5jwCqAnZ0mkwcT8uOS+gMd5lILEuTxLvHJovV wPy/Bn7pf7SBzo0YLSBwINzDd1GdihRwRemyTLEWQBwV2vJb2swlfpwo8xotTY6SpiXRMi3Y h3OEdvysXTPh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c6jBsz5/k2+HBcNrb viop8J1P58Gp/zUZH0ZOfClfYnCPecbb7U0hZ1V6n4YrsRRnJBpqMRcVJwIAFnq9A+ICAAA= X-CMS-MailID: 20190726081506eucas1p20e7e633e89529b862952fe9f783f72e5 X-Msg-Generator: CA X-RootMTR: 20190726081506eucas1p20e7e633e89529b862952fe9f783f72e5 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190726081506eucas1p20e7e633e89529b862952fe9f783f72e5 References: <20190726081453.9456-1-m.szyprowski@samsung.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Move USB PHYs to a standard arrays for Exynos EHCI/OHCI devices. This resolves the conflict between Exynos EHCI/OHCI sub-nodes and generic USB device bindings. Once the Exynos EHCI/OHCI sub-nodes are removed, the boards can finally provide 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 | 28 +++---------------- .../boot/dts/exynos4210-universal_c210.dts | 8 ++---- arch/arm/boot/dts/exynos4412-itop-elite.dts | 9 ++---- arch/arm/boot/dts/exynos4412-odroidu3.dts | 8 ++---- arch/arm/boot/dts/exynos4412-odroidx.dts | 5 ++-- arch/arm/boot/dts/exynos4412-origen.dts | 9 ++---- arch/arm/boot/dts/exynos5250.dtsi | 16 +++-------- arch/arm/boot/dts/exynos54xx.dtsi | 18 +++--------- 8 files changed, 22 insertions(+), 79 deletions(-) -- 2.17.1 diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index 1264cc431ff6..433f109d97ca 100644 --- a/arch/arm/boot/dts/exynos4.dtsi +++ b/arch/arm/boot/dts/exynos4.dtsi @@ -380,23 +380,8 @@ clocks = <&clock CLK_USB_HOST>; clock-names = "usbhost"; status = "disabled"; - #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"; - }; + phys = <&exynos_usbphy 1>, <&exynos_usbphy 2>, <&exynos_usbphy 3>; + phy-names = "host", "hsic0", "hsic1"; }; ohci: ohci@12590000 { @@ -406,13 +391,8 @@ clocks = <&clock CLK_USB_HOST>; clock-names = "usbhost"; status = "disabled"; - #address-cells = <1>; - #size-cells = <0>; - port@0 { - reg = <0>; - phys = <&exynos_usbphy 1>; - status = "disabled"; - }; + phys = <&exynos_usbphy 1>; + phy-names = "host"; }; gpu: gpu@13000000 { diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts b/arch/arm/boot/dts/exynos4210-universal_c210.dts index 82a8b5449978..09d3d54d09ff 100644 --- a/arch/arm/boot/dts/exynos4210-universal_c210.dts +++ b/arch/arm/boot/dts/exynos4210-universal_c210.dts @@ -204,9 +204,8 @@ &ehci { status = "okay"; - port@0 { - status = "okay"; - }; + phys = <&exynos_usbphy 1>; + phy-names = "host"; }; &exynos_usbphy { @@ -520,9 +519,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 0dedeba89b5f..f6d0a5f5d339 100644 --- a/arch/arm/boot/dts/exynos4412-itop-elite.dts +++ b/arch/arm/boot/dts/exynos4412-itop-elite.dts @@ -146,13 +146,8 @@ /* In order to reset USB ethernet */ samsung,vbus-gpio = <&gpc0 1 GPIO_ACTIVE_HIGH>; - port@0 { - status = "okay"; - }; - - port@2 { - status = "okay"; - }; + phys = <&exynos_usbphy 1>, <&exynos_usbphy 3>; + phy-names = "host", "hsic1"; }; &exynos_usbphy { diff --git a/arch/arm/boot/dts/exynos4412-odroidu3.dts b/arch/arm/boot/dts/exynos4412-odroidu3.dts index 96d99887bceb..8ff243ba4542 100644 --- a/arch/arm/boot/dts/exynos4412-odroidu3.dts +++ b/arch/arm/boot/dts/exynos4412-odroidu3.dts @@ -105,12 +105,8 @@ }; &ehci { - port@1 { - status = "okay"; - }; - port@2 { - status = "okay"; - }; + phys = <&exynos_usbphy 2>, <&exynos_usbphy 3>; + phy-names = "hsic0", "hsic1"; }; &sound { diff --git a/arch/arm/boot/dts/exynos4412-odroidx.dts b/arch/arm/boot/dts/exynos4412-odroidx.dts index a2251581f6b6..3ea2a0101e80 100644 --- a/arch/arm/boot/dts/exynos4412-odroidx.dts +++ b/arch/arm/boot/dts/exynos4412-odroidx.dts @@ -72,9 +72,8 @@ }; &ehci { - port@1 { - status = "okay"; - }; + phys = <&exynos_usbphy 2>; + phy-names = "hsic0"; }; &mshc_0 { diff --git a/arch/arm/boot/dts/exynos4412-origen.dts b/arch/arm/boot/dts/exynos4412-origen.dts index 698de4345d16..ecd14b283a6b 100644 --- a/arch/arm/boot/dts/exynos4412-origen.dts +++ b/arch/arm/boot/dts/exynos4412-origen.dts @@ -88,13 +88,8 @@ &ehci { samsung,vbus-gpio = <&gpx3 5 1>; status = "okay"; - - port@1 { - status = "okay"; - }; - port@2 { - status = "okay"; - }; + phys = <&exynos_usbphy 2>, <&exynos_usbphy 3>; + phy-names = "hsic0", "hsic1"; }; &fimd { diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index d5e0392b409e..c5584f40ebfb 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -617,12 +617,8 @@ clocks = <&clock CLK_USB2>; clock-names = "usbhost"; - #address-cells = <1>; - #size-cells = <0>; - port@0 { - reg = <0>; - phys = <&usb2_phy_gen 1>; - }; + phys = <&usb2_phy_gen 1>; + phy-names = "host"; }; ohci: usb@12120000 { @@ -632,12 +628,8 @@ clocks = <&clock CLK_USB2>; clock-names = "usbhost"; - #address-cells = <1>; - #size-cells = <0>; - port@0 { - reg = <0>; - phys = <&usb2_phy_gen 1>; - }; + phys = <&usb2_phy_gen 1>; + phy-names = "host"; }; usb2_phy_gen: phy@12130000 { diff --git a/arch/arm/boot/dts/exynos54xx.dtsi b/arch/arm/boot/dts/exynos54xx.dtsi index 0b27bebf9528..9c3b63b7cac6 100644 --- a/arch/arm/boot/dts/exynos54xx.dtsi +++ b/arch/arm/boot/dts/exynos54xx.dtsi @@ -189,26 +189,16 @@ compatible = "samsung,exynos4210-ehci"; reg = <0x12110000 0x100>; interrupts = ; - - #address-cells = <1>; - #size-cells = <0>; - port@0 { - reg = <0>; - phys = <&usb2_phy 1>; - }; + phys = <&usb2_phy 1>; + phy-names = "host"; }; usbhost1: usb@12120000 { compatible = "samsung,exynos4210-ohci"; reg = <0x12120000 0x100>; interrupts = ; - - #address-cells = <1>; - #size-cells = <0>; - port@0 { - reg = <0>; - phys = <&usb2_phy 1>; - }; + phys = <&usb2_phy 1>; + phy-names = "host"; }; usb2_phy: phy@12130000 {