From patchwork Fri Apr 12 12:01:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 13627674 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 002DBC4345F for ; Fri, 12 Apr 2024 12:02:38 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=z9LKMPRFp6YQ4fqEDC526QBllWgxcqyx4txv4QMscz8=; b=4QlBEaEfU/05pF pM8OleRYhaS//9SK7fPzQrfgG0pMYx8TQ2x5Vv1sjqZVYGT4Cy7x/5DvO8oA1R5FokpFy+Jpt6veD 9tuupemY/GHyio47OYfKbgytD6LXw/YRLwjPN4fo/AI5sY6wz8oY637SMcpOKzvkXIPyCFNsKe37t mscajdfnVRbertxzPrc9agnxelphG4j8MXwGLkjk0J5lqXfQia5SLr16zJ5NqinFS1MM1ht6ZAkDE PO5Vwxeqf/mkTQCTespJJxoZMq4F+bNz2rxFeZA7yHuEQkpdFD3hMo36W+e5FbwBaroDZDASTThvJ XOm4lwDXhG8v6ipd/mlw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvFbn-0000000H2hA-0HxQ; Fri, 12 Apr 2024 12:02:19 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvFbg-0000000H2eL-0obF for linux-arm-kernel@lists.infradead.org; Fri, 12 Apr 2024 12:02:14 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 38E33CE38D4; Fri, 12 Apr 2024 12:02:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66224C2BD11; Fri, 12 Apr 2024 12:02:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712923329; bh=XT08XF8MuQA87EqyAeoT70AUc6HJXFssKGXXnObeqOc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Wgeo3mP/4gdzlTiSfK7v6/QVYcZBk7j3SIKOIJMTz6FRx7jJzXGY/dafuwSaY8X2H KyqaXHxiW1e/ad1sQxGU7pZ7MeFFRnBnHREx9LKKy4CNzPtYFkEpNVzHjRll01L5Y5 iCR10+BEyLZ6VaylkPZXhB7DlC1H6aNE6HIod/Eu1A3zFc6qDZvxx6YIFW9V5Fr8nX bLU7kGmQZBG8iQzJozt4M2QamdrMqAaJdsyUdo34opjk4RSYWAIjUZPDwD6y4rkGfE 4kCMag6qAo+37FHK8zWkib3T3TqLHhINUd9UboS2E5Pr8j6dFImKOC9aKrSci5FGnC BPBS2I0xH+65w== From: Roger Quadros Date: Fri, 12 Apr 2024 15:01:58 +0300 Subject: [PATCH v7 1/3] arm64: dts: ti: k3-am62/a: use sub-node for USB_PHY_CTRL registers MIME-Version: 1.0 Message-Id: <20240412-for-v6-10-am62-usb-typec-dt-v7-1-93b827adf97e@kernel.org> References: <20240412-for-v6-10-am62-usb-typec-dt-v7-0-93b827adf97e@kernel.org> In-Reply-To: <20240412-for-v6-10-am62-usb-typec-dt-v7-0-93b827adf97e@kernel.org> To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Andrew Davis , b-liu@ti.com, srk@ti.com, r-gunasekaran@ti.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=3943; i=rogerq@kernel.org; h=from:subject:message-id; bh=XT08XF8MuQA87EqyAeoT70AUc6HJXFssKGXXnObeqOc=; b=owEBbQKS/ZANAwAIAdJaa9O+djCTAcsmYgBmGSK6I8Q7u7c7JQSk12Dy+Ryt69J7vjRPFtN+4 fzctXWkzYWJAjMEAAEIAB0WIQRBIWXUTJ9SeA+rEFjSWmvTvnYwkwUCZhkiugAKCRDSWmvTvnYw kwIED/9wBE43QVVPYiMid8E/rZtuDgcFIPNLGZbMD2im02pOS8uTHm2MWu+/M+Al5VEU7BndiUH YSnv/yTdlqTM/9vx4YLqdDA7FpJ8GSYNaNM6cPau9Bz/NQtrUTOHm5VCBRSiW4dOJLb26qVxXtH lKr7T1sIsZxDf6sdc8xyWtlnTTam717X+AjNVwnB8uI1woe91/1fcnbZAswigbVKTCFzkila1Fz E8HNmozaLMTyAfcBlVczFXqoqcBN4QiskTrX7N31rXBqRm/IonNeAsEta9ymNiQAwpW9F9k9uF3 liKmnnkL1vq4Jd+cQo3GkjMMZiHVEmPMSYHx52+/kLxod4nykN0O+gB5dp4kUUTWZlsElDTO/nd TrN4vYpZhioDnJtvSoQSxJxvy+9GtC9+L8vCDLqgsu7KR6tI0hmKwGCHlN7utPLftAr5IHl62aU 3eTgIKuhXbVUX2ptU8BNxoRMjRj6Jet9Qw7fJbbMIM0jsw0ZpdfydQMxrVn2wjmDqvpoDOQgZXm u6Rdt86yr35sAG73x3PcOFrA74cxZaFKUoZCM50auwuX8KN2UmFE8zaobKMGXR6qrVdHvZJg26u aIO9iGOT3nN9Up5J9OcpHfDQdes/lVQAa/uV2VpA+ClGgNVxPv5PS5Oj33CrJY62nVt78oXxCeP XykPV1bbL9TnMzA== X-Developer-Key: i=rogerq@kernel.org; a=openpgp; fpr=412165D44C9F52780FAB1058D25A6BD3BE763093 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240412_050212_643227_5EF6AE36 X-CRM114-Status: GOOD ( 10.63 ) 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 Exposing the entire CTRL_MMR space to syscon is not a good idea. Add sub-nodes for USB0_PHY_CTRL and USB1_PHY_CTRL and use them in the USB0/USB1 nodes. Signed-off-by: Roger Quadros Reviewed-by: Andrew Davis --- Changelog: v7 - Rebased to v6.9-rc1 v6 - Rebased on next-20240226 v5 - no change. v4 - no change. Added Andrew's Reviewed-by v3 - no change v2: - moved am62p changes to next patch - use new compatible for USB PHY CTRL node --- arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 4 ++-- arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 10 ++++++++++ arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 4 ++-- arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 10 ++++++++++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi index e9cffca073ef..23f1464b26ed 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi @@ -622,7 +622,7 @@ usbss0: dwc3-usb@f900000 { reg = <0x00 0x0f900000 0x00 0x800>; clocks = <&k3_clks 161 3>; clock-names = "ref"; - ti,syscon-phy-pll-refclk = <&wkup_conf 0x4008>; + ti,syscon-phy-pll-refclk = <&usb0_phy_ctrl 0x0>; #address-cells = <2>; #size-cells = <2>; power-domains = <&k3_pds 178 TI_SCI_PD_EXCLUSIVE>; @@ -647,7 +647,7 @@ usbss1: dwc3-usb@f910000 { reg = <0x00 0x0f910000 0x00 0x800>; clocks = <&k3_clks 162 3>; clock-names = "ref"; - ti,syscon-phy-pll-refclk = <&wkup_conf 0x4018>; + ti,syscon-phy-pll-refclk = <&usb1_phy_ctrl 0x0>; #address-cells = <2>; #size-cells = <2>; power-domains = <&k3_pds 179 TI_SCI_PD_EXCLUSIVE>; diff --git a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi index 23ce1bfda8d6..66ddf2dc51af 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi @@ -21,6 +21,16 @@ chipid: chipid@14 { compatible = "ti,am654-chipid"; reg = <0x14 0x4>; }; + + usb0_phy_ctrl: syscon@4008 { + compatible = "ti,am62-usb-phy-ctrl", "syscon"; + reg = <0x4008 0x4>; + }; + + usb1_phy_ctrl: syscon@4018 { + compatible = "ti,am62-usb-phy-ctrl", "syscon"; + reg = <0x4018 0x4>; + }; }; target-module@2b300050 { diff --git a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi index aa1e057082f0..a158df0d0ba6 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi @@ -606,7 +606,7 @@ usbss0: dwc3-usb@f900000 { reg = <0x00 0x0f900000 0x00 0x800>; clocks = <&k3_clks 161 3>; clock-names = "ref"; - ti,syscon-phy-pll-refclk = <&wkup_conf 0x4008>; + ti,syscon-phy-pll-refclk = <&usb0_phy_ctrl 0x0>; #address-cells = <2>; #size-cells = <2>; power-domains = <&k3_pds 178 TI_SCI_PD_EXCLUSIVE>; @@ -629,7 +629,7 @@ usbss1: dwc3-usb@f910000 { reg = <0x00 0x0f910000 0x00 0x800>; clocks = <&k3_clks 162 3>; clock-names = "ref"; - ti,syscon-phy-pll-refclk = <&wkup_conf 0x4018>; + ti,syscon-phy-pll-refclk = <&usb1_phy_ctrl 0x0>; #address-cells = <2>; #size-cells = <2>; power-domains = <&k3_pds 179 TI_SCI_PD_EXCLUSIVE>; diff --git a/arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi index f7bec484705a..98043e9aa316 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi @@ -17,6 +17,16 @@ chipid: chipid@14 { compatible = "ti,am654-chipid"; reg = <0x14 0x4>; }; + + usb0_phy_ctrl: syscon@4008 { + compatible = "ti,am62-usb-phy-ctrl", "syscon"; + reg = <0x4008 0x4>; + }; + + usb1_phy_ctrl: syscon@4018 { + compatible = "ti,am62-usb-phy-ctrl", "syscon"; + reg = <0x4018 0x4>; + }; }; wkup_uart0: serial@2b300000 { From patchwork Fri Apr 12 12:01:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 13627675 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 9CA7DC00A94 for ; Fri, 12 Apr 2024 12:02:42 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dTZFONSypIenSrSlLgIzWFkG4/2uyTyQV5BTUHg5/MU=; b=4dfU3U+uqaGKI8 WAg/yV1nXY3llUr+mgvmDPGUMK8WB8MKa33T+fdwbKeVgkeJUtb+7ttffhBHkQOqEUxuPt/Z2pUgV b02bx7H+EeaioJvYdDAaaHFC/Lowgqi9TYnDzu+OJo88SyJtzG3NRxhDMJEj/LyEZN92M8Woz+Xg/ HM7s6Xhay0OeCXBD66rvmcbTav5nbsbv8r0/dqzmtld7MPUTDLJpYPnn/PoZasb1B82R9SKaC637M 8q9cvHL1HMIm0O5fUtnS2F9L9wlKxbZZNEUvU2khyc8Z5kPZ0/diIeemBHmN8ATiZCuGHrQo7oxxa 5yPfS6TbmcXbCexpJNUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvFbs-0000000H2jA-0Nn2; Fri, 12 Apr 2024 12:02:24 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvFbh-0000000H2ev-3cdk for linux-arm-kernel@lists.infradead.org; Fri, 12 Apr 2024 12:02:18 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 5FAD56218D; Fri, 12 Apr 2024 12:02:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8F98C113CC; Fri, 12 Apr 2024 12:02:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712923333; bh=kO5nMsXBO83eu+1bHylB8+WAgyYY3ZCW/zZsQSoVYt0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=nV5xh5sCKzD4QLygTuLVP1Mmt+oCc0d5Oz1KkSSdpch0HeiKw3PkKTR8Fj063O2D5 iR7/DfzMPmGvOJ9zLoWY0tY9zB1Wfcj4cULNZg71XZSLVCOSM4ZpxR2ACzsP6IXkr2 JtluuACIPf2oDjqQwC/qup8Cgz8Upe++AWvdDVLyTHTUiQCSMng8FdRX6Oycg+Kwnv 57/BhLf9j+xDpEoBuQwuChFJ1KNhc41e3e7eNoVENGc1diKfJv3ItTYnFZs/lCdIzZ TXsCDJ2hK73RP66mjO0TBbIpShqnTa6gIvkKpzXAEETxqN1s2Imbaf1BskPyFjoDkj rYMgdNsq/gFsQ== From: Roger Quadros Date: Fri, 12 Apr 2024 15:01:59 +0300 Subject: [PATCH v7 2/3] arm64: dts: ti: k3-am62p: add the USB sub-system MIME-Version: 1.0 Message-Id: <20240412-for-v6-10-am62-usb-typec-dt-v7-2-93b827adf97e@kernel.org> References: <20240412-for-v6-10-am62-usb-typec-dt-v7-0-93b827adf97e@kernel.org> In-Reply-To: <20240412-for-v6-10-am62-usb-typec-dt-v7-0-93b827adf97e@kernel.org> To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Andrew Davis , b-liu@ti.com, srk@ti.com, r-gunasekaran@ti.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=5735; i=rogerq@kernel.org; h=from:subject:message-id; bh=kO5nMsXBO83eu+1bHylB8+WAgyYY3ZCW/zZsQSoVYt0=; b=owEBbQKS/ZANAwAIAdJaa9O+djCTAcsmYgBmGSK6UCKHwh5eGWDSQtygP0XlcI9PNcPQU/PFz +Zjy/EShp+JAjMEAAEIAB0WIQRBIWXUTJ9SeA+rEFjSWmvTvnYwkwUCZhkiugAKCRDSWmvTvnYw kz4RD/0X1/ryGPqHinE7ygEa1vNKumgL3jwmSPUF6DEt9rzuhbr6CTuqyTgV0zM06THYbiPSbhR paJRg2Dwx5cMiA8D/LdNngosdnbMF0V091+AZfD9042CyybYVe+WjbJt+WQFWfVmrSkbiKZ9orA asvy6XbSBkaK0jSuMTnvDWZn6oPhKI3EU+IYxSiwISurFhpzfPhDTalxoS/Dax/+X7+Hym3ubIe 5dt6F/w+ct/CK4C+dmFlCYeiJdD1cd+5tjya+ocG5wA0VzwePdX5DatjCH9GwsNgeyAV+6iLF+M gYjGsG/dUKdEZyyfErIm7elEDbyroYiMOiR/kbAttzPi4HO6wRi23IwXouBtcIfkHjhyH/7yZ95 iNvHKU2jfSVCntunkKlOPkYLZCSrxwt4mWq+RWRvn6+DPnd7GwOnQZfdWGR7jpNiPXPolxuK+OQ eUYHt7P2eYwI1iv+rufCpvQcaDJdFajDL7I+sOa1LlDMXNcb0/o/wFRfsVY8YQWNllBJLsRS0p/ 3QTux1eiLpz5QIm1mbNEWr1jLhymea9rvQPRWlGT/hPmIqupCDxqm9z0wEhm2/FjQrdZYIVVDf0 Q3bk5vZVQZE2lzzb+t2BjVy9KOJDZTHEEjrY0on7qOPGqJyIgByMTIGz+G2nEEAQkciQmllpdkR wPo4QGVQdCN3L1w== X-Developer-Key: i=rogerq@kernel.org; a=openpgp; fpr=412165D44C9F52780FAB1058D25A6BD3BE763093 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240412_050214_040716_AC93F747 X-CRM114-Status: GOOD ( 12.42 ) 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 There are two USB instances available on the am62p5 starter kit. Include and enable them for use on the board. USB LPM feature is kept disabled as it is not supported. Signed-off-by: Vignesh Raghavendra Signed-off-by: Roger Quadros Reviewed-by: Andrew Davis --- Changelog: v7 - Rebased to v6.9-rc1. Added USB PHY2 region for Errata i2409. v6 - Rebased on next-20240226 v5 - disabled USB LPM feature as it is not supported. v4 - no change. Added Andrew's Reviewed-by v3 - no change v2: - moved am62p changes to next patch - use new compatible for USB PHY CTRL node merge: am62p add USB PHY2 region Signed-off-by: Roger Quadros --- arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 52 ++++++++++++++++++++++ arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi | 10 +++++ arch/arm64/boot/dts/ti/k3-am62p5-sk.dts | 67 +++++++++++++++++++++++++++++ 3 files changed, 129 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi index 88bc64111234..900d1f9530a2 100644 --- a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi @@ -635,6 +635,58 @@ sdhci2: mmc@fa20000 { status = "disabled"; }; + usbss0: usb@f900000 { + compatible = "ti,am62-usb"; + reg = <0x00 0x0f900000 0x00 0x800>, + <0x00 0x0f908000 0x00 0x400>; + clocks = <&k3_clks 161 3>; + clock-names = "ref"; + ti,syscon-phy-pll-refclk = <&usb0_phy_ctrl 0x0>; + #address-cells = <2>; + #size-cells = <2>; + power-domains = <&k3_pds 178 TI_SCI_PD_EXCLUSIVE>; + ranges; + status = "disabled"; + + 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"; + snps,usb2-gadget-lpm-disable; + snps,usb2-lpm-disable; + }; + }; + + usbss1: usb@f910000 { + compatible = "ti,am62-usb"; + reg = <0x00 0x0f910000 0x00 0x800>, + <0x00 0x0f918000 0x00 0x400>; + clocks = <&k3_clks 162 3>; + clock-names = "ref"; + ti,syscon-phy-pll-refclk = <&usb1_phy_ctrl 0x0>; + #address-cells = <2>; + #size-cells = <2>; + power-domains = <&k3_pds 179 TI_SCI_PD_EXCLUSIVE>; + ranges; + status = "disabled"; + + 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"; + snps,usb2-gadget-lpm-disable; + snps,usb2-lpm-disable; + }; + }; + fss: bus@fc00000 { compatible = "simple-bus"; reg = <0x00 0x0fc00000 0x00 0x70000>; diff --git a/arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi index a84756c336d0..c71d9624ea27 100644 --- a/arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi @@ -18,6 +18,16 @@ chipid: chipid@14 { reg = <0x14 0x4>; bootph-all; }; + + usb0_phy_ctrl: syscon@4008 { + compatible = "ti,am62-usb-phy-ctrl", "syscon"; + reg = <0x4008 0x4>; + }; + + usb1_phy_ctrl: syscon@4018 { + compatible = "ti,am62-usb-phy-ctrl", "syscon"; + reg = <0x4018 0x4>; + }; }; wkup_uart0: serial@2b300000 { diff --git a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts b/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts index 6a9c99c5fb2a..6e7234659111 100644 --- a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts @@ -27,6 +27,8 @@ aliases { spi0 = &ospi0; ethernet0 = &cpsw_port1; ethernet1 = &cpsw_port2; + usb0 = &usb0; + usb1 = &usb1; }; chosen { @@ -297,6 +299,12 @@ AM62PX_IOPAD(0x01b0, PIN_OUTPUT, 2) /* (G20) MCASP0_ACLKR.UART1_TXD */ bootph-all; }; + main_usb1_pins_default: main-usb1-default-pins { + pinctrl-single,pins = < + AM62PX_IOPAD(0x0258, PIN_INPUT, 0) /* (G21) USB1_DRVVBUS */ + >; + }; + main_wlirq_pins_default: main-wlirq-default-pins { pinctrl-single,pins = < AM62PX_IOPAD(0x0128, PIN_INPUT, 7) /* (K25) MMC2_SDWP.GPIO0_72 */ @@ -340,6 +348,36 @@ AM62PX_IOPAD(0x0124, PIN_INPUT, 7) /* (J25) MMC2_SDCD.GPIO0_71 */ }; }; +&main_i2c0 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&main_i2c0_pins_default>; + clock-frequency = <400000>; + + typec_pd0: usb-power-controller@3f { + compatible = "ti,tps6598x"; + reg = <0x3f>; + + connector { + compatible = "usb-c-connector"; + label = "USB-C"; + self-powered; + data-role = "dual"; + power-role = "sink"; + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + usb_con_hs: endpoint { + remote-endpoint = <&usb0_hs_ep>; + }; + }; + }; + }; + }; +}; + &main_i2c1 { status = "okay"; pinctrl-names = "default"; @@ -466,6 +504,35 @@ cpsw3g_phy1: ethernet-phy@1 { }; }; +&usbss0 { + status = "okay"; + ti,vbus-divider; +}; + +&usbss1 { + status = "okay"; + ti,vbus-divider; +}; + +&usb0 { + usb-role-switch; + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + usb0_hs_ep: endpoint { + remote-endpoint = <&usb_con_hs>; + }; + }; +}; + +&usb1 { + dr_mode = "host"; + pinctrl-names = "default"; + pinctrl-0 = <&main_usb1_pins_default>; +}; + &mcasp1 { status = "okay"; #sound-dai-cells = <0>; From patchwork Fri Apr 12 12:02:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 13627676 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 72433C4345F for ; Fri, 12 Apr 2024 12:02: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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vLFIunn25obEa0TLKEfeUzXLums4CQ24+zBBNdAVnyc=; b=ZIiafc0O1W3Kmz T09edihvkA7oiJEVlvKsjkNzL7PNoYPlncQxt4KvMMxvZUKgzxW0huNq7J7b7teB/ocTZ8kUDhPGr F5Vlelr6Yh8Z/E3Y8U+HPN4+Gx3kdyNftAlj15pImIB99+piFNiOnntucwczqbVgEeTFcPxVz0ysZ 9r+eV2dVkINm5WshFToatmOyzsFwJ/3Rs6rbYLjpyQIuZHWn9xLMA4Cz/7Z0itAuWcbmwRB8+ABOE uemcCfa9Muy3wwrnh6jmKkBp4qMV6Q69X5p5rjV9t4iFZZbyPqwppzZyIimERto3y0Hb/KA72LCmQ Gpq4gvAL9i+HgAxmx56g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvFby-0000000H2mb-1GHs; Fri, 12 Apr 2024 12:02:30 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvFbl-0000000H2gg-1q5X for linux-arm-kernel@lists.infradead.org; Fri, 12 Apr 2024 12:02:25 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id BAD99621F2; Fri, 12 Apr 2024 12:02:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C99FC113CD; Fri, 12 Apr 2024 12:02:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712923336; bh=3y8NvuBpN3GpgOBuBXKVR4zS66qIFVgEMZeU4j3UftM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=PaiTwZtq9AlP3mLK3Jr6OGT4piCSor4fdGvafBJo80qXDOHv2BZGITA5XolZ2Xp9b q0TTnz6hB3tn9ChJzZVtYOjcDXQHkerYJLXgt+C7ilufqdak4pHNyJAlXP1vvlug2C jvnZ2eGvoEfEHzxSzbrc/FVpq7LqD9CntHjrj3b11JeRtQi5sS6sl5qan0+Im5Q1vO 9taklG3Zuvc1jh9AKJX/EXs48jOtgU5eLTVrVMpcaId6UivZrS+UPiBmswzGP8KLtH s8NB//xcl1XQvzDgrFNgQ+VcSYdt8WsvOuX/VOMQSiWBEUVVtofysCeKcNVrvsIWD+ 1+Sgl/YRF24sA== From: Roger Quadros Date: Fri, 12 Apr 2024 15:02:00 +0300 Subject: [PATCH v7 3/3] arm64: dts: ti: k3-am62a: Disable USB LPM MIME-Version: 1.0 Message-Id: <20240412-for-v6-10-am62-usb-typec-dt-v7-3-93b827adf97e@kernel.org> References: <20240412-for-v6-10-am62-usb-typec-dt-v7-0-93b827adf97e@kernel.org> In-Reply-To: <20240412-for-v6-10-am62-usb-typec-dt-v7-0-93b827adf97e@kernel.org> To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Andrew Davis , b-liu@ti.com, srk@ti.com, r-gunasekaran@ti.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1300; i=rogerq@kernel.org; h=from:subject:message-id; bh=3y8NvuBpN3GpgOBuBXKVR4zS66qIFVgEMZeU4j3UftM=; b=owEBbQKS/ZANAwAIAdJaa9O+djCTAcsmYgBmGSK6md56hUKdg+S6qCjHbbACODTJaVIUfD96o y34Kc4rE/GJAjMEAAEIAB0WIQRBIWXUTJ9SeA+rEFjSWmvTvnYwkwUCZhkiugAKCRDSWmvTvnYw k7dBEACxOUAiK+miJJPF39Z+KYGn7jWgNCb4uU9cEYH61MYdsfRpGQqAt6lCo+SdtciQ5j833oX Q/mXBbQq8j0/itQHzyJRwQRMRv5SDjeeKjYUMQiP2PePUPo1/lWHBp9QQFgpxHkUyGjVM9pzgp6 nejEYc8YcrH9AwRpTCuTyIg8RoTUVNoz1IDaM+gH2gozlzwsPiEI9P1QHwd8jIlvX+xg4vFxEt7 +fOpKcRG/ss59ZLK4P7jQY4B5F5RUZT+9QcKbDe750eT6W+By+rGNcm6Kgc3opyqtKm77tpB9/t I+aSJXLLGw+W9sd1s4uxpQxOSPblBIe241MiH/BGCI6YE+TP+Vp3ADz9BvXYI+CzIJE3WNqzLJo ofMiqBNDi/ZeJFeyHXoDk4INvTiW/kZgtO/UxQO2DmPQv7zGb9poziiJ5P00W7jTYX6d86LPZCX +xU5Jf+7133QvACKcsZKfHRYCr/8RADxm7HnJuoajv4IdIyHydMrGcksIc6UM53c9hu+S6+LUc1 lOUtZLYrnnZXyPB4zVgaRqH+LyMRhu9BABs0LEa+70l1xBrAwccrE8z3p34Xqnuax4AUYUDgslN /lSWERiWZoPywtL1v6gTpgsdunoUO4RlOK/8W0gyKHb+MpJEdW4cy5wll8MuDYbLTyzOfbec3se QLA1m0yEU2Kqjdw== X-Developer-Key: i=rogerq@kernel.org; a=openpgp; fpr=412165D44C9F52780FAB1058D25A6BD3BE763093 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240412_050217_665868_0AA889E3 X-CRM114-Status: GOOD ( 10.00 ) 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 As per AM62A TRM [1] USB Link Power Management (LPM) feature is not supported. Disable it else it may cause enumeration failure on some devices. > 4.9.2.1 USB2SS Unsupported Features > The following features are not supported on this family of devices: > ... > - USB 2.0 ECN: Link Power Management (LPM) > ... [1] - https://www.ti.com/lit/pdf/spruj16 Signed-off-by: Roger Quadros Reviewed-by: Ravi Gunasekaran --- Changelog: v7 - Rebased to v6.9-rc1 v6 - Rebased on next-20240226 v5 - new patch --- arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi index a158df0d0ba6..adaf578280f9 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi @@ -621,6 +621,8 @@ usb0: usb@31000000 { interrupt-names = "host", "peripheral"; maximum-speed = "high-speed"; dr_mode = "otg"; + snps,usb2-gadget-lpm-disable; + snps,usb2-lpm-disable; }; }; @@ -644,6 +646,8 @@ usb1: usb@31100000 { interrupt-names = "host", "peripheral"; maximum-speed = "high-speed"; dr_mode = "otg"; + snps,usb2-gadget-lpm-disable; + snps,usb2-lpm-disable; }; };