From patchwork Tue Nov 3 14:02:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 320412 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp4610631ilc; Tue, 3 Nov 2020 06:05:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJwiArmbThYDk7d3SCTuMocy53Q/FcROaghSthyrJCilNext8FD58ycyx9ts70D4LywKJXRS X-Received: by 2002:a17:906:b841:: with SMTP id ga1mr20058901ejb.29.1604412311788; Tue, 03 Nov 2020 06:05:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604412311; cv=none; d=google.com; s=arc-20160816; b=CNfR0nisMeiEDai+WeBonqOMAfdZgs8UpxmcmzoM9Thxo92vhbycWWyBE8Qv2AXfXF RCSiWhR4EdUeltEUKhqBcNwS6wIvvDryyD5Xs8aQbI0SH1YQU2F4x7QoELb5Zad4cBU7 kchdVdaL1nIF3jh2zzY9owpwlNdNUmu0qY/uSt7Sa3+gTxE0XU6Xm3jJt411plvYr7CE unPpMBRsbu6WL9ZluQ46xEJ19VHoV4ysifypg3ZplIRri7sYEl8PYzgW3Fcwh/30Awz+ NPuxfdawe4K3Zx/b1Zl9nOVjW6OSI0GCLeKp0OtstOUOQAVqhax56UQyOWvAWgUZmlQW hTUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:message-id:date:subject:cc :to:from:dkim-signature:dkim-filter; bh=tJfgu1SkaVfjsc886pjn1u73kdx29LwbGBpYZWEiaws=; b=Oy6HDQbKkNdM+GufYPOwELUR/0/z5k66UdV+oJpy5Wl4h1Nin6O+BH8YWDP5VqvLh7 hcGa+83PmrnDRyhStAUTll8FNlq8Tnj2dlzAVJJhDp4V+YoRJBqw0gnssAOWswmBhdkR 2EktjYj8WdFzJQJFOrkDQE+hi0O9p78JXJsHrhm/JLJVbuWMze9Lnt+YsGkIc4YYTKyR KdXslFWSKD95o+AmXoi8Yf5TCjV+vzB39TLyJgLNshYRrdiFMk/YCADZFF5AGn2MYe3k gqOjuaoanJNdXGR70GSy6Pd95tLiH6/fy68qyjepJ/3XtFv9b0tZZZtmfbmJqaGrM/TG 52Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=P1oSSwQ4; spf=pass (google.com: domain of linux-samsung-soc-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id us5si904800ejb.394.2020.11.03.06.05.11; Tue, 03 Nov 2020 06:05:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-samsung-soc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=P1oSSwQ4; spf=pass (google.com: domain of linux-samsung-soc-owner@vger.kernel.org designates 23.128.96.18 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 S1729391AbgKCODH (ORCPT + 4 others); Tue, 3 Nov 2020 09:03:07 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:58573 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729375AbgKCOCj (ORCPT ); Tue, 3 Nov 2020 09:02:39 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20201103140227euoutp025f30d9e7dcafffa7759744b1a8b2285a~EBFkQG1zh2844228442euoutp02b for ; Tue, 3 Nov 2020 14:02:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201103140227euoutp025f30d9e7dcafffa7759744b1a8b2285a~EBFkQG1zh2844228442euoutp02b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1604412147; bh=tJfgu1SkaVfjsc886pjn1u73kdx29LwbGBpYZWEiaws=; h=From:To:Cc:Subject:Date:References:From; b=P1oSSwQ43sOK7ho0pw9yL6HDenY3OgUcm+RF8Hy3V+n8w7D5QO2egJdBvVo8XBnQ7 LlwuAroRS8I+ddSQexvoBsO+bGEobvWy3uK8vwI2IrGoV0JAdFLVI7ZxfnVJChdr8s lmxL+z0mdYue2HW6l0ecDnNrsYfg6sG7EFtLJgY4= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20201103140222eucas1p20f873e6a3fd8c02bd8f3b54c1be04c8d~EBFfW99Hz0816408164eucas1p2P; Tue, 3 Nov 2020 14:02:22 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 78.EC.05997.EE261AF5; Tue, 3 Nov 2020 14:02:22 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201103140221eucas1p1c4479a8a89e7e9a05c7582462d79e5c7~EBFeow0qP3147931479eucas1p14; Tue, 3 Nov 2020 14:02:21 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201103140221eusmtrp27fda68fe12ab16ca40f956678baf4655~EBFeoPmJE2587725877eusmtrp2g; Tue, 3 Nov 2020 14:02:21 +0000 (GMT) X-AuditID: cbfec7f4-677ff7000000176d-aa-5fa162ee5d72 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 1B.6E.06314.DE261AF5; Tue, 3 Nov 2020 14:02:21 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201103140221eusmtip11eaf3924f4e782b03034b62498c53143~EBFeT8mwY0957909579eusmtip17; Tue, 3 Nov 2020 14:02:21 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz Subject: [PATCH] ARM: dts: exynos: Enable DWC2 dual-role support on OdroidU3+ boards Date: Tue, 3 Nov 2020 15:02:14 +0100 Message-Id: <20201103140214.21690-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBIsWRmVeSWpSXmKPExsWy7djP87rvkhbGG1xaImOxccZ6Vovz5zew W8w4v4/JYu2Ru+wOLB6bVnWyefRtWcXo8XmTXABzFJdNSmpOZllqkb5dAlfGglPfmAtOC1U8 2P6euYFxN38XIyeHhICJxNzeCexdjFwcQgIrGCUOb2hjhXC+MErs/7GfBcL5zChxcOsjdpiW 3p+zmCESyxklZtzZyATX8uZXBwtIFZuAoUTX2y42EFtEQFXic9sCsCXMAn2MEtf3zmUGSQgL hElsXDCDEcRmASo6e246E4jNK2ArcfTLPhaIdfISqzccAFsnIbCBTeLglu9QCReJXU9hbGGJ V8e3QN0nI/F/53wmiIZmRomH59ayQzg9jBKXmyDWSQhYS9w59wvoPg6gmzQl1u/Shwg7Spxf dQIsLCHAJ3HjrSBImBnInLRtOjNEmFeio00IolpNYtbxdXBrD164xAxhe0g873gFdpqQQKzE tzONbBMY5WYh7FrAyLiKUTy1tDg3PbXYKC+1XK84Mbe4NC9dLzk/dxMjML5P/zv+ZQfjrj9J hxgFOBiVeHgdUhfEC7EmlhVX5h5ilOBgVhLhdTp7Ok6INyWxsiq1KD++qDQntfgQoz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msg-Generator: CA X-RootMTR: 20201103140221eucas1p1c4479a8a89e7e9a05c7582462d79e5c7 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201103140221eucas1p1c4479a8a89e7e9a05c7582462d79e5c7 References: Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org MicroUSB port on OdroidU3+ boards can operate both as peripheral or as host port. Till now it was configured as pheriperal only port, but it turned out that the DWC2 driver code already handles everything needed to support USB role-switch, so switch it to dual-role (OTG) mode. This has no effect on OdroidU3 (with 'plus') and OdroidX2, which doesn't have USB needed ID pin and VBUS wiring. Those will still operate correctly in pheriperal mode only. Signed-off-by: Marek Szyprowski --- arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 1 - arch/arm/boot/dts/exynos4412-odroidu3.dts | 14 ++++++++++++++ arch/arm/boot/dts/exynos4412-odroidx.dts | 4 ++++ 3 files changed, 18 insertions(+), 1 deletion(-) -- 2.17.1 Tested-by: Anand Moon diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi index 2a6f5b1d7645..2b20d9095d9f 100644 --- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi +++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi @@ -255,7 +255,6 @@ }; &hsotg { - dr_mode = "peripheral"; status = "okay"; vusb_d-supply = <&ldo15_reg>; vusb_a-supply = <&ldo12_reg>; diff --git a/arch/arm/boot/dts/exynos4412-odroidu3.dts b/arch/arm/boot/dts/exynos4412-odroidu3.dts index b8549d846f86..746c2a99a83c 100644 --- a/arch/arm/boot/dts/exynos4412-odroidu3.dts +++ b/arch/arm/boot/dts/exynos4412-odroidu3.dts @@ -21,6 +21,15 @@ reg = <0x40000000 0x7FF00000>; }; + vbus_otg_reg: voltage-regulator-1 { + compatible = "regulator-fixed"; + regulator-name = "VBUS_VDD_5.0V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpl2 0 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + leds { compatible = "gpio-leds"; led1 { @@ -105,6 +114,11 @@ phy-names = "hsic0", "hsic1"; }; +&hsotg { + dr_mode = "otg"; + vbus-supply = <&vbus_otg_reg>; +}; + &sound { model = "Odroid-U3"; samsung,audio-widgets = diff --git a/arch/arm/boot/dts/exynos4412-odroidx.dts b/arch/arm/boot/dts/exynos4412-odroidx.dts index 46381e9097f4..d6ee62bf336c 100644 --- a/arch/arm/boot/dts/exynos4412-odroidx.dts +++ b/arch/arm/boot/dts/exynos4412-odroidx.dts @@ -76,6 +76,10 @@ }; }; +&hsotg { + dr_mode = "peripheral"; +}; + &mshc_0 { vqmmc-supply = <&buck8_reg>; };