From patchwork Fri Dec 16 14:36:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sjoerd Simons X-Patchwork-Id: 13075052 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 76BD2C4167B for ; Fri, 16 Dec 2022 14:37:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3IKsVcQYr6mgDn5yZQVGAfJXy4V3mfZcx3o5lgetYoA=; b=eOwfS1CjDwpaTN R/Ry37ayoHATejhdcX/8CH3C6UwqBaSahOwKrBC+On9qhP1Q5HbPnANozqQX9WGGQXqx91bnmKpYV /jdF1n5UWhZSzbsBWwwAPvHzNU3nRs5oCzjgkbkp5BsEbmfpm52AjtDi0OhtFcG6vcURWErrkrlM7 LzKTN5q9ar62iYjqQ6m9xrnaPTI4VXj36Y1zZXpH/OXYzIOOM0iisLDn/gShZr7iPimBz4USYw2zr 1KDkcpUPeg8mmXN2WB+lQUt50SIvKaqY8HbN+C99mRL+QExm3JvM6dAxS8svEjks/XfU7iNfzeOKO jCTGbRRAJPTyO2Y2xgeA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p6BpW-00Fhxw-Lq; Fri, 16 Dec 2022 14:36:54 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p6Bp9-00FhXx-JN for linux-arm-kernel@lists.infradead.org; Fri, 16 Dec 2022 14:36:34 +0000 Received: from beast.luon.net (simons.connected.by.freedominter.net [45.83.240.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sjoerd) by madras.collabora.co.uk (Postfix) with ESMTPSA id 8B6896602C95; Fri, 16 Dec 2022 14:36:27 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1671201387; bh=r7ISVIMrUOeq1YUcc/heo4+dqRfH9+l09wOKOWMWi60=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qx6UC8ITR8ptql3nhJFJP4FsXa3Mm/v0EmU6ZSvDAVHQ2YBhDu1fTuan1NCqZNA/f SEMgQaX7+hh+EgTuUqtFPeKUz9+okmxYD0PooSjtc1QYwSWTdZv0GTzerqeCFWjytR RgctgCpGbgiCNkm6GcaWg/OVOQBGJ1h+7jqJsBH1g0j2hu4MFgs1A7wRvhn8nUMQeT UdhlOkc2PetG2tzgoGZOMFk01tt03oijDBHmjt9BZhGR9X3VOZrP9rt/AOUovS8qXK l5xs0VJakyrJwp2MYN31ZYoBnfofsigl37db7WW4iKNJv8u3geVlr1gzSrz270tbI1 k7qyBYPGl1EYA== Received: by beast.luon.net (Postfix, from userid 1000) id 3C3695E33156; Fri, 16 Dec 2022 15:36:25 +0100 (CET) From: Sjoerd Simons To: Nishanth Menon Cc: martyn.welch@collabora.com, Nitin Yadav , Aswath Govindraju , Krzysztof Kozlowski , Rob Herring , Tero Kristo , Vignesh Raghavendra , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] arm64: dts: ti: k3-am62-main: Update OTAP and ITAP delay select Date: Fri, 16 Dec 2022 15:36:21 +0100 Message-Id: <20221216143624.23708-2-sjoerd@collabora.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221216143624.23708-1-sjoerd@collabora.com> References: <20221216143624.23708-1-sjoerd@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221216_063631_823246_E35838A8 X-CRM114-Status: UNSURE ( 9.37 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Nitin Yadav UHS Class U1 sd-card are not getting detected due to incorrect OTAP/ITAP delay select values in linux. Update OTAP and ITAP delay select values for various speed modes. For sdhci0, update OTAP delay values for ddr52 & HS200 and add ITAP delay for legacy & mmc-hs. For sdhci1 & sdhci2, update OTAP & ITAP delay select recommended as in RIOT for various speed modes. Signed-off-by: Nitin Yadav [cherry-pick from vendor BSP] Signed-off-by: Sjoerd Simons --- arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 46 ++++++++++++------------ 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi index 03660476364f..28c250a8d1ec 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi @@ -391,8 +391,10 @@ sdhci0: mmc@fa10000 { ti,clkbuf-sel = <0x7>; ti,otap-del-sel-legacy = <0x0>; ti,otap-del-sel-mmc-hs = <0x0>; - ti,otap-del-sel-ddr52 = <0x9>; - ti,otap-del-sel-hs200 = <0x6>; + ti,otap-del-sel-ddr52 = <0x5>; + ti,otap-del-sel-hs200 = <0x5>; + ti,itap-del-sel-legacy = <0xa>; + ti,itap-del-sel-mmc-hs = <0x1>; }; sdhci1: mmc@fa00000 { @@ -403,17 +405,17 @@ sdhci1: mmc@fa00000 { clocks = <&k3_clks 58 5>, <&k3_clks 58 6>; clock-names = "clk_ahb", "clk_xin"; ti,trm-icp = <0x2>; - ti,otap-del-sel-legacy = <0x0>; + ti,otap-del-sel-legacy = <0x8>; ti,otap-del-sel-sd-hs = <0x0>; - ti,otap-del-sel-sdr12 = <0xf>; - ti,otap-del-sel-sdr25 = <0xf>; - ti,otap-del-sel-sdr50 = <0xc>; - ti,otap-del-sel-sdr104 = <0x6>; - ti,otap-del-sel-ddr50 = <0x9>; - ti,itap-del-sel-legacy = <0x0>; - ti,itap-del-sel-sd-hs = <0x0>; - ti,itap-del-sel-sdr12 = <0x0>; - ti,itap-del-sel-sdr25 = <0x0>; + ti,otap-del-sel-sdr12 = <0x0>; + ti,otap-del-sel-sdr25 = <0x0>; + ti,otap-del-sel-sdr50 = <0x8>; + ti,otap-del-sel-sdr104 = <0x7>; + ti,otap-del-sel-ddr50 = <0x4>; + ti,itap-del-sel-legacy = <0xa>; + ti,itap-del-sel-sd-hs = <0x1>; + ti,itap-del-sel-sdr12 = <0xa>; + ti,itap-del-sel-sdr25 = <0x1>; ti,clkbuf-sel = <0x7>; bus-width = <4>; }; @@ -426,17 +428,17 @@ sdhci2: mmc@fa20000 { clocks = <&k3_clks 184 5>, <&k3_clks 184 6>; clock-names = "clk_ahb", "clk_xin"; ti,trm-icp = <0x2>; - ti,otap-del-sel-legacy = <0x0>; + ti,otap-del-sel-legacy = <0x8>; ti,otap-del-sel-sd-hs = <0x0>; - ti,otap-del-sel-sdr12 = <0xf>; - ti,otap-del-sel-sdr25 = <0xf>; - ti,otap-del-sel-sdr50 = <0xc>; - ti,otap-del-sel-sdr104 = <0x6>; - ti,otap-del-sel-ddr50 = <0x9>; - ti,itap-del-sel-legacy = <0x0>; - ti,itap-del-sel-sd-hs = <0x0>; - ti,itap-del-sel-sdr12 = <0x0>; - ti,itap-del-sel-sdr25 = <0x0>; + ti,otap-del-sel-sdr12 = <0x0>; + ti,otap-del-sel-sdr25 = <0x0>; + ti,otap-del-sel-sdr50 = <0x8>; + ti,otap-del-sel-sdr104 = <0x7>; + ti,otap-del-sel-ddr50 = <0x8>; + ti,itap-del-sel-legacy = <0xa>; + ti,itap-del-sel-sd-hs = <0xa>; + ti,itap-del-sel-sdr12 = <0xa>; + ti,itap-del-sel-sdr25 = <0x1>; ti,clkbuf-sel = <0x7>; }; From patchwork Fri Dec 16 14:36:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sjoerd Simons X-Patchwork-Id: 13075051 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 941FBC001B2 for ; Fri, 16 Dec 2022 14:37:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=30/9Hs0EVkWadU6zp94Y/lg1pHv/5FdPKLOaYSMI1yE=; b=DzdZ+VCwjH8Ind Yylb4O4QLo/MYitHfawnMeiDQcQu40kzCNlg6MkSr2Yw96LHCX0sFTAssZG/l0QJbghXEhbO6SLiY Y/2ounM+K2GmZZdMmZvKqCVcC9PfFptERlw6ytuTEK/O42iak4MTXUvhHaGRj6g4ctyyshNcsi4u7 Xv4QPl43RTyf+5o/3z3phX9GZg2BmWyJ5borG+FdJmc9oyKqvAgnNWg+Jv/fsbHui3v6Q+jFnnaaB zFEBFAd3Be7dK3rpBCz4xQ5MqTa5Y0HSLrTZfsj7PRNz2mGOEFj4jRkFXoLNxZ9u+8nLkCBN6f42U dEMPLzuHL36jWkoSsbxg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p6BpN-00Fhpo-C0; Fri, 16 Dec 2022 14:36:45 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p6Bp9-00FhZU-Ij for linux-arm-kernel@lists.infradead.org; Fri, 16 Dec 2022 14:36:33 +0000 Received: from beast.luon.net (unknown [IPv6:2a10:3781:2531::8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sjoerd) by madras.collabora.co.uk (Postfix) with ESMTPSA id 20A1D6602C96; Fri, 16 Dec 2022 14:36:28 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1671201388; bh=BqgYz8Eogobh4whm0C4LEh90RF++fj19v2v//Dm1BHs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e7TI6E/JdKAOqWmlq2fDBy0HQipa3RX7Mq5AHFR6pdG+gKUl+BO60tLsLNzm1aZ0/ YWUgQtQNm6SvmswFMGIwljN6nbXcc/VeuLALy5d/O6KK/B+tUqLQeGsfUwkmIE79AL zdoGZt9hKFCT8fr9rjzFv2DVkDtpXSoJIPSaHij4zcQH3WKPM3+ZHxz7wN5lfa+Uth IlMMOWPXN2BkCe9dpwXt8jou4eNKBNFqKGiDs5q0OMMVlLAsKWanuI6pREWneBmvsz n7DGLG+kbzL5EaDEYZpImKVZoDYo4h1R155xHeOqiTLBtMyt3nJNL4XOy1zr0u5PHa oRUD0xpvKmEwQ== Received: by beast.luon.net (Postfix, from userid 1000) id F166F5E33158; Fri, 16 Dec 2022 15:36:25 +0100 (CET) From: Sjoerd Simons To: Nishanth Menon Cc: martyn.welch@collabora.com, Nitin Yadav , Aswath Govindraju , Vignesh Raghavendra , Krzysztof Kozlowski , Rob Herring , Tero Kristo , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] arm64: dts: ti: k3-am62-main: Add support for USB Date: Fri, 16 Dec 2022 15:36:22 +0100 Message-Id: <20221216143624.23708-3-sjoerd@collabora.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221216143624.23708-1-sjoerd@collabora.com> References: <20221216143624.23708-1-sjoerd@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221216_063631_779672_37911814 X-CRM114-Status: GOOD ( 11.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Aswath Govindraju AM62 SoC has two instances of USB on it. Therefore, add support for the same. Signed-off-by: Aswath Govindraju Signed-off-by: Vignesh Raghavendra [cherry-pick from vendor BSP]] Signed-off-by: Sjoerd Simons --- arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 44 ++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi index 28c250a8d1ec..105ffbf94a75 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi @@ -442,6 +442,50 @@ sdhci2: mmc@fa20000 { ti,clkbuf-sel = <0x7>; }; + usbss0: dwc3-usb@f900000 { + compatible = "ti,am62-usb"; + reg = <0x00 0x0f900000 0x00 0x800>; + clocks = <&k3_clks 161 3>; + clock-names = "ref"; + ti,syscon-phy-pll-refclk = <&wkup_conf 0x4008>; + #address-cells = <2>; + #size-cells = <2>; + power-domains = <&k3_pds 178 TI_SCI_PD_EXCLUSIVE>; + ranges; + + usb0: usb@31000000 { + compatible = "snps,dwc3"; + reg =<0x00 0x31000000 0x00 0x50000>; + interrupts = , /* irq.0 */ + ; /* irq.0 */ + interrupt-names = "host", "peripheral"; + maximum-speed = "high-speed"; + dr_mode = "otg"; + }; + }; + + usbss1: dwc3-usb@f910000 { + compatible = "ti,am62-usb"; + reg = <0x00 0x0f910000 0x00 0x800>; + clocks = <&k3_clks 162 3>; + clock-names = "ref"; + ti,syscon-phy-pll-refclk = <&wkup_conf 0x4018>; + #address-cells = <2>; + #size-cells = <2>; + power-domains = <&k3_pds 179 TI_SCI_PD_EXCLUSIVE>; + ranges; + + usb1: usb@31100000 { + compatible = "snps,dwc3"; + reg =<0x00 0x31100000 0x00 0x50000>; + interrupts = , /* irq.0 */ + ; /* irq.0 */ + interrupt-names = "host", "peripheral"; + maximum-speed = "high-speed"; + dr_mode = "otg"; + }; + }; + fss: bus@fc00000 { compatible = "simple-bus"; reg = <0x00 0x0fc00000 0x00 0x70000>; From patchwork Fri Dec 16 14:36:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sjoerd Simons X-Patchwork-Id: 13075053 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8E5FCC4332F for ; Fri, 16 Dec 2022 14:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qO5tD+bcwcX3mzCyYrB5p3R80KUMEx4fZV0qzUWdEP0=; b=BTpjb0ffEzRuwm AJnNIidScf9jCF3Ena+T1c11bz2pgp6474ejV702UqfLaWAMDFDeMt/QZVPWFn/SqBk4XD4q/X1b0 spXdFo6mJu/n3L+pHV/zJiU43lUJ1LJ/eYfy91JigsqYbs72noRicGfxpVkvyyft+iII/u5ZSN1Bd p/RcY2iKlr8Ql/978ApKONQpP3sA+x9QPDapm2D/4E13dm7iXxVzr99WnuFSjt4YeJVOEVOSd+miC p9vddELWLA6lGwI/qa680p5mHiijotUywXNOxwCLO97CMyGXWMCof9NoFa9+x/Amg2N7U+IN/+ctB lB4R11OqOhn/Y21tvJbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p6Bpf-00Fi61-UH; Fri, 16 Dec 2022 14:37:04 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p6Bp9-00FhZm-Mt for linux-arm-kernel@lists.infradead.org; Fri, 16 Dec 2022 14:36:34 +0000 Received: from beast.luon.net (simons.connected.by.freedominter.net [45.83.240.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sjoerd) by madras.collabora.co.uk (Postfix) with ESMTPSA id D7C956602C97; Fri, 16 Dec 2022 14:36:28 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1671201389; bh=gwg+FXKZU5KF0sKSHfukB4xVb0UPjDiYXwiEsS4bEsc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N32LXhPL5oNa5NdOonz6odUH/VoH3wd3dBTp39dg1ipLkBsCjHCy1BbzIImlPt5lK 2dIOj1RlpbCjnMoMU/gTrkuCbJpdk+PXJSVN15i/ZZ5zrMY5+YjrnvMNqdu9fXRZLK LFJzXP+qGvAslsAnWsM/L/P/QhViC8vbCV6L0bTX2e42mgCAFdkuJloNThtaEAhArN Vap6tKGIPLytrLAizqL0Ep3TK2AOx5w8eDQkM2DOTE6ajlNLd8HU0rWKZJ6YEDEPib cz8KJbDwM76QoD9wg4908499gxBkUX67C8I9U4rXQGxK+4rn3vrTJINR1vzjntJIgc bh1kn7mjFoLIA== Received: by beast.luon.net (Postfix, from userid 1000) id B31B75E3315A; Fri, 16 Dec 2022 15:36:26 +0100 (CET) From: Sjoerd Simons To: Nishanth Menon Cc: martyn.welch@collabora.com, Nitin Yadav , Aswath Govindraju , Vignesh Raghavendra , Krzysztof Kozlowski , Rob Herring , Tero Kristo , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] arm64: dts: ti: k3-am625-sk: Add support for USB Date: Fri, 16 Dec 2022 15:36:23 +0100 Message-Id: <20221216143624.23708-4-sjoerd@collabora.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221216143624.23708-1-sjoerd@collabora.com> References: <20221216143624.23708-1-sjoerd@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221216_063631_931528_009DA818 X-CRM114-Status: GOOD ( 15.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Aswath Govindraju AM62 SoC has two instances of USB and they are brought on to the board in the following way, -> USB0 instance - This is brought out to a USB TypeC connector on board through TPS6598 PD controller. The PD controller should decide the role based on CC pin in the connector. Unfortunately the irq line for the TPS isn't hooked up which is a mode not yet support by the driver (some patches were submitted earlier this year[0]). So for now the PD controller is left out and periphal mode chosen. -> USB1 instance - This is brought out to a USB TypeA connector on board. Therefore, add the required device tree support for the above in the board dts file. 0: https://lore.kernel.org/lkml/f714ee55-ef47-317d-81b9-57020dda064b@ti.com/T/ Signed-off-by: Aswath Govindraju Signed-off-by: Vignesh Raghavendra [merge from vendor bsp, drop TPS6598 support, reword commit message] Signed-off-by: Sjoerd Simons --- arch/arm64/boot/dts/ti/k3-am625-sk.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts index 93a5f0817efc..c165fa0a4109 100644 --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts @@ -24,6 +24,8 @@ aliases { spi0 = &ospi0; ethernet0 = &cpsw_port1; ethernet1 = &cpsw_port2; + usb0 = &usb0; + usb1 = &usb1; }; chosen { @@ -275,6 +277,12 @@ main_gpio1_ioexp_intr_pins_default: main-gpio1-ioexp-intr-pins-default { AM62X_IOPAD(0x01d4, PIN_INPUT, 7) /* (B15) UART0_RTSn.GPIO1_23 */ >; }; + + main_usb1_pins_default: main-usb1-pins-default { + pinctrl-single,pins = < + AM62X_IOPAD(0x0258, PIN_OUTPUT, 0) /* (F18) USB1_DRVVBUS */ + >; + }; }; &wkup_uart0 { @@ -514,3 +522,17 @@ &epwm1 { &epwm2 { status = "disabled"; }; + +&usbss0 { + ti,vbus-divider; +}; + +&usb0 { + dr_mode = "peripheral"; +}; + +&usb1 { + dr_mode = "host"; + pinctrl-names = "default"; + pinctrl-0 = <&main_usb1_pins_default>; +};