From patchwork Wed Jan 11 13:23:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sjoerd Simons X-Patchwork-Id: 13096673 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 6E85AC46467 for ; Wed, 11 Jan 2023 13:25:03 +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=QNxUIqANBtHpjGu9/GjPZCXCLHIR4s3mmjUMudUZukQ=; b=J6MzCQzJguGCjN UsKjGxTVmE2N9bhP75kVuX10CQel2q0D4VYPlbfbIZ0VV3J/wuRfN9b7Ochi2vYKUAAvRR9qKTgmf MrODk0Lp4qyOTgvrTuwO5vFeW8K0aBCNEGkwM2caNbmoEI5FZEzIgcAUKSZia2yrXCYbeiGju4Ax7 tN1mscBCXcB2yztOiCJwSPugM3LrKSRp8MX5LMnjh1DIDe1TMUI4sRPy7otAabikZYHwzUCvUWVhl krsJYGvWCOxuSg7XvN9VRWbO2LKA8Yd4ygQFiiSVJ00cF+kolaUnAAok8tAAc6/5KrAC90nPCI4qt dXf+bL5K4p0ZAW3wvAlw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFb5F-00BX3U-Og; Wed, 11 Jan 2023 13:24:02 +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 1pFb5B-00BWvY-Mi for linux-arm-kernel@lists.infradead.org; Wed, 11 Jan 2023 13:24:00 +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 B1A896602DA0; Wed, 11 Jan 2023 13:23:51 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1673443431; bh=LFTN9teDna8hPSGoSa4Zf5XgtwtjA6FViA3w18oZMyU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J/qwKz1xiRNRjg87joiIBD68PQgf8S8jA1L0o/5PKTENHKp9ThwwIG/iPImachD0j ex3oRi8A2RWfj3K8IS689yqj47fYg6O5dBzZ75ffcTglIhZam9cAYtF7lQN08TwAl3 qeF6oZfqF2mEjKEYLw+92V+DewvZqb58RTldp5EsG3AEj7MnW9pcq98Jzj/0ETw3VM VPWCUdwnegn8QS2foyiBNi/ivOjOk35zkwWodv5bDFI2s27TrN8c9K7O56jhgOhUVX EQMh0C+vOzMAQEGhb2dv7kV6NvKwfQyKbtBli65tVJLFatAWVmBtniILJtZXLtZRVa Ydsx/+YLiVU8Q== Received: by beast.luon.net (Postfix, from userid 1000) id 6874B60ABD65; Wed, 11 Jan 2023 14:23:49 +0100 (CET) From: Sjoerd Simons To: Nishanth Menon Cc: kernel@collabora.com, Nitin Yadav , martyn.welch@collabora.com, 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 v3 1/3] arm64: dts: ti: k3-am62-main: Update OTAP and ITAP delay select Date: Wed, 11 Jan 2023 14:23:45 +0100 Message-Id: <20230111132348.553061-2-sjoerd@collabora.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230111132348.553061-1-sjoerd@collabora.com> References: <20230111132348.553061-1-sjoerd@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230111_052358_036537_7438EFF3 X-CRM114-Status: GOOD ( 10.57 ) 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 Tested-by: Martyn Welch --- Changes in v3: - Rebased against current ti-next aka 6.2-rc1 - Add Martyn's tested-by Changes in v2: - Rebase against linux-next 20221220 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 072903649d6e..466b94d1cee9 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi @@ -501,8 +501,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>; status = "disabled"; }; @@ -514,17 +516,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>; status = "disabled"; @@ -538,17 +540,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>; status = "disabled"; }; From patchwork Wed Jan 11 13:23:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sjoerd Simons X-Patchwork-Id: 13096676 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 039EDC46467 for ; Wed, 11 Jan 2023 13:25:39 +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=ovzS3FHeCNwVR+qEhK+TNqyGoTiJ4LbY/Y5zsAm2bCU=; b=H34UuUERnfBRmv 67ciatB6xgEyKDjHgvjN+697DiJ0iI1WwCh4azVFwERFLiAV0tQnrQ65nURxCxDIunMdB2uDm/GXs B8Se2oajyIqpk+4mCZIIiEtQ7DgXYeRndnJlLyIMVQKdtUq8KyUzjGRGqpKHDiaGMu6IRV9tRu2hy iaXpXFZgAtmfcdFlS0GHUZjoUeeQWyqTut3ftMMEsQRpXJRHAFlEG49DGdPdZgbfBuXV8SQpSNCQE JfMt+qAcET9xXsJvnbCKHBSm+uzFxj9x7uyNv2OACTOyZ91miStwgFlABhM4PmgIlAeWNpYtHIiV5 0d3z6vMehZbw/ZuMr6cg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFb5r-00BXPD-6I; Wed, 11 Jan 2023 13:24:39 +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 1pFb5D-00BWvy-8v for linux-arm-kernel@lists.infradead.org; Wed, 11 Jan 2023 13:24:01 +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 EA9A76602DA4; Wed, 11 Jan 2023 13:23:52 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1673443433; bh=vrExRKWn1yvyb41DuKIVLLzWMKJ/c2ehX7FeN9vg274=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OYPBdiBMqBf+bvUXUzC1r/CJ38awKGXG9VDCLyw0SqEv+cFbz+Ure96EQ9cn609eg Gnj8a6b8e4qptgUSF0KxL85z7zSUk9jX/Lqj6L2A/9n+ED3CmUwmnB3959nWmXwdpU 3Z7grVI0v1lE76yLHgN5quVzy8sD0YKe/JVLZJvi04bFkkjJkV/V63FelZa7wQJ+LY psvcaScd4+daIwBmCGRmNG9nFn9yyVrep53ogTn6zkmkPpTaHbnaGFawxBcjxqN2BP F23ypkI3fnF896BCfVNWjqK8JjlQslmBIOUxlLMomV5C1mjbWcQvUwvffLXGhLY6N7 IIa3Sm8/+naFw== Received: by beast.luon.net (Postfix, from userid 1000) id 318DF60ABD67; Wed, 11 Jan 2023 14:23:50 +0100 (CET) From: Sjoerd Simons To: Nishanth Menon Cc: kernel@collabora.com, Nitin Yadav , martyn.welch@collabora.com, 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 v3 2/3] arm64: dts: ti: k3-am62-main: Add support for USB Date: Wed, 11 Jan 2023 14:23:46 +0100 Message-Id: <20230111132348.553061-3-sjoerd@collabora.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230111132348.553061-1-sjoerd@collabora.com> References: <20230111132348.553061-1-sjoerd@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230111_052359_560472_9AC08BC5 X-CRM114-Status: GOOD ( 12.48 ) 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 Tested-by: Martyn Welch --- Changes in v3: - Rebased against current ti-next aka 6.2-rc1 - Add Martyn's tested-by Changes in v2: - Rebase against linux-next 20221220 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 466b94d1cee9..4da15e8c956f 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi @@ -555,6 +555,50 @@ sdhci2: mmc@fa20000 { status = "disabled"; }; + 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 Wed Jan 11 13:23:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sjoerd Simons X-Patchwork-Id: 13096675 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 D1A34C5479D for ; Wed, 11 Jan 2023 13:25:31 +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=U/g/ECbTOAdqySWjI5CdLf3uJ/7r9qGAXMtuHRF1UcQ=; b=AnZZGcs8oMuNiF D4mG/MbSkAQ/K44W8sPlHfGx2y3SUDvIRspZhHEFX6z8JdZVbRSw4KC4EwBERAfbAK9Pf1tHDYbYl FQb6Sfqp6sKnGoJfZIZP1P/lMmWdrC9L1Z16Rc4M5H7zQn1n3d0S/1Jk8e1FNchSfJZ0K9GChjdng qoxbIsPgtxBGoObZXja/dELY3cNKUMm6hDB0HiZBPrRBmi6N1f7FPJbbMwKHoyARpZvp+w/gXfJNS SfuZnrZfLFxzlJ2lRROydULuqyxamVHFV9HicaN0Q+99B/2Vy9bvTIJEcTADAxZp4RjMtw2hRyPui 9jgG/9Id+FpWdKTVJAfw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pFb5i-00BXLq-By; Wed, 11 Jan 2023 13:24:30 +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 1pFb5D-00BWwX-96 for linux-arm-kernel@lists.infradead.org; Wed, 11 Jan 2023 13:24:01 +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 7CB776602D9F; Wed, 11 Jan 2023 13:23:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1673443433; bh=DGP5YuVVDTyIVeZ0yDO/PVajPfpgEyPnpUshoX7OQnI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MRQVLbOcltUepPFACmX/jGEKiXD2E1NRQePGat8BZalA1nMJcj6/vyrZCOJ5LD41C ePRCPtZe1Xr0fvkfIt+gKHLA2ghiTKxkvL4lAOXlAod5VcORcfWxpYYkCty2dmP0Py 610e7ehB4PqY/yYkiOQOzDdI1EEaKcN+W+RiVZbw1dsfIKLXXLK+B3BdDmuJ7C7Fjt U455v/vRLqgmtaV/LsO0sm8b8sy72wQ3mY2Ld0Daxz/h2IZ7osXLL6iB9Ms76t7DUJ TzIF5du52JimwgQS3bAxDZ2VlnBZ+hW37bVX7pi4sF81fhHiCNI3KcCBCLIRXtGTii wQNEFmnxz9Zog== Received: by beast.luon.net (Postfix, from userid 1000) id EB14660ABD69; Wed, 11 Jan 2023 14:23:50 +0100 (CET) From: Sjoerd Simons To: Nishanth Menon Cc: kernel@collabora.com, Nitin Yadav , martyn.welch@collabora.com, 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 v3 3/3] arm64: dts: ti: k3-am625-sk: Add support for USB Date: Wed, 11 Jan 2023 14:23:47 +0100 Message-Id: <20230111132348.553061-4-sjoerd@collabora.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230111132348.553061-1-sjoerd@collabora.com> References: <20230111132348.553061-1-sjoerd@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230111_052359_582899_533B72D7 X-CRM114-Status: GOOD ( 16.26 ) 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 Tested-by: Martyn Welch --- Changes in v3: - Rebased against current ti-next aka 6.2-rc1 - Add Martyn's tested-by Changes in v2: - Rebase against linux-next 20221220 arch/arm64/boot/dts/ti/k3-am625-sk.dts | 50 ++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts index 4f179b146cab..c82a0ebf6772 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 { @@ -284,6 +286,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 { @@ -464,3 +472,45 @@ partition@3fc0000 { }; }; }; + +&ecap0 { + status = "disabled"; +}; + +&ecap1 { + status = "disabled"; +}; + +&ecap2 { + status = "disabled"; +}; + +&main_mcan0 { + status = "disabled"; +}; + +&epwm0 { + status = "disabled"; +}; + +&epwm1 { + status = "disabled"; +}; + +&epwm2 { + status = "disabled"; +}; + +&usbss0 { + ti,vbus-divider; +}; + +&usb0 { + dr_mode = "peripheral"; +}; + +&usb1 { + dr_mode = "host"; + pinctrl-names = "default"; + pinctrl-0 = <&main_usb1_pins_default>; +};