From patchwork Fri Feb 23 13:12:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 13569070 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 4813BC54798 for ; Fri, 23 Feb 2024 13:13:47 +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=VLmqHijjbnQIHx/DQHDdbJX4yY2XIj6FzhtUIPVJ9hQ=; b=GMPib4Q7teWG4O dfXkIupuFqrB1wwM9+vD64bQpImeKYqFaTYEhTUuN49fkgfqi1hbaN8aZizee1zub2T4qOc9uGUMs Sh09So8HqUr2+YSboH/aIBjuXLQaQQEimhr5tYaBlkp6fJCU7uLBPjW3l+i12simPPePd0yELHk63 p3FLE/8RUA5WTyho2xo+3SC1s29r1Y1RwLHgSwi6alviffjemFT9LJK3siY8rKpeCmtI5p07kNW7v 70fUSDNkG4Vhgl6KLI72wPxDxbLtJCWsV9DJUjNHni/DAGOAoRfz0YhGmWLWnMjKv0beMP6ZEkxqz cZCkAVwqgz4DQVQhpO9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdVMg-00000009U5o-3MgN; Fri, 23 Feb 2024 13:13:22 +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 1rdVMJ-00000009TvD-1K94 for linux-arm-kernel@lists.infradead.org; Fri, 23 Feb 2024 13:13:03 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 0EFBE6349E; Fri, 23 Feb 2024 13:12:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 742E0C43399; Fri, 23 Feb 2024 13:12:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708693975; bh=3f1saNFjDV9lQ3ymMMHFoFlIVWzDM7u63mKq3O12V7U=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=fbZbHu4ElA3MhmADUy1GBfRaGcSPu/m2bFBd0t/SK+39nTPbqJIugNOdgL51cn4TD +lTuIxeZXWPkyvj3wkLw2QkpT0TiQRYz2/9VWz6AE6UVV2wzB79xGGaWgYf9F4Jly3 fVvB8VBymFLgOHF5nL973gKoFVq6opBm/z0W0wwItGwQtqK5NCFiGc9yaXVoLaibkP BuIYYTzQJKYMwKtmmRl6uX06BH5FEZMt5eNfd6t8AY6gMn/xzoJqfy65wK1Hx7nG3i hGaPROGhu4KCvtGgqo9cruczGfLGWwWad6/UYxe1n/va4QfzfsP4Mj8F4D+delantY 1S6+e3PwFU6AQ== From: Roger Quadros Date: Fri, 23 Feb 2024 15:12:38 +0200 Subject: [PATCH v5 1/4] dt-bindings: mfd: syscon: Add ti,am62-usb-phy-ctrl compatible MIME-Version: 1.0 Message-Id: <20240223-b4-for-v6-5-am62-usb-typec-dt-v5-1-4b5854d17d18@kernel.org> References: <20240223-b4-for-v6-5-am62-usb-typec-dt-v5-0-4b5854d17d18@kernel.org> In-Reply-To: <20240223-b4-for-v6-5-am62-usb-typec-dt-v5-0-4b5854d17d18@kernel.org> To: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: Andrew Davis , b-liu@ti.com, srk@ti.com, r-gunasekaran@ti.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Roger Quadros , Rob Herring X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1325; i=rogerq@kernel.org; h=from:subject:message-id; bh=3f1saNFjDV9lQ3ymMMHFoFlIVWzDM7u63mKq3O12V7U=; b=owEBbQKS/ZANAwAIAdJaa9O+djCTAcsmYgBl2JnPku8a3cYMUjIUwnqIaokWxMKNBx3z9XuZO vLQj5Vl/g2JAjMEAAEIAB0WIQRBIWXUTJ9SeA+rEFjSWmvTvnYwkwUCZdiZzwAKCRDSWmvTvnYw k9lqEACr6m1xDqxQ1wAd7kJ25jhK/NdyIpsUTYjjRrW0jE8neukTLJX4hoyrAiWDc9zhqtpH/tG 7UYDYW3lvFTiPtGlLQmxTXXX1QGcAPwsAPsT2cxd5FI8ijXv8ZXSAlFwN6Yct8uQN+RwGwtHeI+ 8nvg0IHXbkuMEbPI5ipIYfXnxnUXhHn6t90vzHHVPzi2ND/JSOWsAf0aL+LMTdeL9qVVhogAEp4 4AQjz28E146Rk0TDpr9TbhT2yvGcF0geuswEq/6uTot+Ty5qwutd5U5VusROqyDMUU/+Tb7pppE F+c9qBoyCPc1sTyTyzBBx8MoWef9W//3wo4u9I0elAgbVK/XJqrOBkkR5dq4IJGvvGbheAWYpWy b3wcJ1ZKrBdie8OMhCtYHr84QqvN/3rlpg+ghz4wZcYcBwSHD+dxV26YlsN0Ve5m8MIvHCjoFOF 8vi+4Hmbu6QYm7rW7foc5c1pb5nn0vU/iJvlSWzdLTcotIjz2eHEvTrwLS9FNHOQuqo/zEsY40A s38WImwT8557p1Oqg9qaNKsTQiqqvVZEKnl6/qOczBAqTC2vDiQwWMKoi6iNdRhg/3uYORRM4HO oKS4h2lzxHvXS21v+sjdPfaBUHUEAo7b/p3IUg1Mc+4+55hbWZfT0JUAh4lj8yyBPi1wb7zSw4y TqMqOZllKYp6MlA== 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-20240223_051301_492210_4DE2A2D6 X-CRM114-Status: UNSURE ( 9.40 ) 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 Add the compatible for TI AM62 USB PHY Control register. This register is found in the TI AM62 WKUP_CTRL_MMR0 space [1]. It is used to indicate the USB PHY PLL reference clock rate and core voltage level to the USB controller. [1] - https://www.ti.com/lit/pdf/spruiv7 Signed-off-by: Roger Quadros Acked-by: Rob Herring --- Changelog: v5 - no change. Added Lee Jones in To list v4 - no change. Added Rob's Acked-by https://lore.kernel.org/all/20240205135908.54656-2-rogerq@kernel.org/ v3 - add compatibles in alphabetical order https://lore.kernel.org/all/20240201120332.4811-2-rogerq@kernel.org/ v2 - New patch --- Documentation/devicetree/bindings/mfd/syscon.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml index 084b5c2a2a3c..9437705af92f 100644 --- a/Documentation/devicetree/bindings/mfd/syscon.yaml +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml @@ -72,6 +72,7 @@ properties: - rockchip,rk3588-qos - rockchip,rv1126-qos - starfive,jh7100-sysmain + - ti,am62-usb-phy-ctrl - ti,am654-dss-oldi-io-ctrl - const: syscon From patchwork Fri Feb 23 13:12:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 13569069 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 1E947C5478C for ; Fri, 23 Feb 2024 13:13:32 +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=H+jFhFoTMoCHI/Gl6Bef+URwLHjuft/cXzhNR8jIqpg=; b=cPmK6+TC5Ts0J2 OHQD1WOga62bmTSfSVXcOs1jJtV4XgEq605h2CqrWOKzhYv/B4fS9mvyJsB/Hn0SOGnVVGeXFiRdg R1ME/GxlR/N0jWcy2yakiXgVM3cJE42pGwYt/Ygq8Oy91y32AHluzY6R79VA8itvNEaw2CBwThXm/ fYReBkVeYOuBPG7hR1/xCAr6mBYC7V+xDbM7F3MKY2Q0WsHspqU6JdkqMhS7Dtjrbwi3VXDbr4ut9 o5YU7yliOymfi6VzW9cY6jtmmJcx8UukGEN+lrxAT2mqlO1bEjqkAa15UVoKZrzZyyrHQ8Wi4odKT IS9T6VqNVxHtB/mqKBzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdVMf-00000009U4n-1oId; Fri, 23 Feb 2024 13:13:21 +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 1rdVMK-00000009Tvu-1hgQ for linux-arm-kernel@lists.infradead.org; Fri, 23 Feb 2024 13:13:02 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E260B634A2; Fri, 23 Feb 2024 13:12:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 58DFCC433C7; Fri, 23 Feb 2024 13:12:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708693979; bh=9/umIRpdXlG5SfG097Yi8FxF5FUuSmeX78auq29VC6s=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Iygg0o1fKewwBsg9oMeP6m9MzDG4F+Gcw4yXck2AHLiQ8cEbVuuuYmJtE/pulu+uq HZyh0+SqnLpLKw4fea1FnVT4ZPDyVDiARD+0n6m76oNwiNDgQIHeOmAAlHESeLRsmz 0ZMvs5sLvoPjvt6na2rChGyhIibxBKWt2WkDNxNeDEgjNzKVe86DD+hlc76K7O4E4O F/5bdAAKxEfpB4IU8l9b9tNBLub7O71EWF/qnKnBJ1CgUZkRZlwwGdee2xQot35iCW YVzL3TWGaw0JjuWNefOj5usNg5V1pW8tyRdsyl3HpGWyxmCVGsoWtbBFfefinBbh74 apnsf+dRBTrDg== From: Roger Quadros Date: Fri, 23 Feb 2024 15:12:39 +0200 Subject: [PATCH v5 2/4] arm64: dts: ti: k3-am62/a: use sub-node for USB_PHY_CTRL registers MIME-Version: 1.0 Message-Id: <20240223-b4-for-v6-5-am62-usb-typec-dt-v5-2-4b5854d17d18@kernel.org> References: <20240223-b4-for-v6-5-am62-usb-typec-dt-v5-0-4b5854d17d18@kernel.org> In-Reply-To: <20240223-b4-for-v6-5-am62-usb-typec-dt-v5-0-4b5854d17d18@kernel.org> To: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: Andrew Davis , b-liu@ti.com, srk@ti.com, r-gunasekaran@ti.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Roger Quadros X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=4037; i=rogerq@kernel.org; h=from:subject:message-id; bh=9/umIRpdXlG5SfG097Yi8FxF5FUuSmeX78auq29VC6s=; b=owEBbQKS/ZANAwAIAdJaa9O+djCTAcsmYgBl2JnPgphjTmCrw2sNzlIfzskpDbFqcUs5ho35z YQEAHGenxWJAjMEAAEIAB0WIQRBIWXUTJ9SeA+rEFjSWmvTvnYwkwUCZdiZzwAKCRDSWmvTvnYw k+2bD/9goNbVSPedqCc+1q/k1RwmivrxqlpCAtbDlBqu2UJzZai8aE9IgSDO0T0mfYr1pTVMtv2 ziq/osow5gACwwDVJnnx1Rt/ei8KxTXvBRKS08a7JU7PtejW+YbMrX1gE5mcnjGPamJQO+Piv9q YrGGvooh1krVTGMBu0yNZrU7BeIyt8/QsbutPWOybOzXeWjyLrt7N4UHSbG8TmCrhSGy7NfrG1Q SYTxggebbF+wi7Aa/XuEgn9aAhhP9YUqcthU+2sqneudA+NT3CaXdzMig5IBFJ3r3SavKkxvutK pbc4xxc2yFedgyEflX0REF+yq1slH7zyOCXfGKmWlXGS7Z6x2iyzpCfYke1TGd3YbmJg3fi1HDS lKXjFb3pRhfPuQ6T1ZkBnNWa4A7cVPZEMhfF3/abNaKIngutBi7JT858pPfBGMxpmO6auN57IYe 93ADhu31p9i9i7tJ3HuRWHS2+DmNxkkAmtMT0ITnEv5tWtSB6kYTKnEug7GTjqQCOMXH6lbe7cP T6OeDOB8A4o/voq9GUVFt4N1M23+lSKeinzsOqebyQV7If/dDhmYro3CvYQ4nNZ/zF432KSURF/ fCytQzN9TWe8Hc4d92zT+1dlzP2fIwVAgL9kkCb787hooRCacnczJL4IB3m6pZ74X/rsMWPx2d4 NJuffzuE/0p9rBw== 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-20240223_051300_568323_2DCD77EB X-CRM114-Status: GOOD ( 10.50 ) 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: v5 - no change. v4 - no change. Added Andrew's Reviewed-by https://lore.kernel.org/all/20240205135908.54656-3-rogerq@kernel.org/ v3 - no change https://lore.kernel.org/all/20240201120332.4811-3-rogerq@kernel.org/ 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 Feb 23 13:12:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 13569144 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 0B156C54798 for ; Fri, 23 Feb 2024 14:20:54 +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=HNIip9Ir8di2CPkVXHnuPWiVEmrw0EFmGWcXkj/iE90=; b=O3PhQJb6MwdGiO bbNrsTtG+wlxcrN0i3JJ5xkvLkZZtRS1414Xf+GQItPKE1+mQ5IffgOwswFH6zrNlj7LyJYmO7ttz JoKHn38OMj88nIffOePYyy36cqRS69XTp2z+ySZF8wRA+ZH6YuIshg22QlKVQNpmgYEtO4/6F4C9d Pf0m/BBs3vNLVs8jSo/Uj/HUjN1LmGim7R2isoQdK5zbeJFsPGMznAlKwPI7LcmIWLWUhwGZyFs5r JgW05S6BmYHdJb6f0UKDuv08Bduiokd8gcFw9F2xQvgAhFRim67Oia9xi/8GQnVrxr9773FtSO8jj 3x906vd9OzvErD2fDcPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdWPs-00000009jqv-01UR; Fri, 23 Feb 2024 14:20:44 +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 1rdVMU-00000009Tx7-038n for linux-arm-kernel@lists.infradead.org; Fri, 23 Feb 2024 13:13:14 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id CABFE634A4; Fri, 23 Feb 2024 13:13:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C3A8C433F1; Fri, 23 Feb 2024 13:12:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708693983; bh=7MMdY/AqShvbBezEAI37o47xKqwsWMIXgoQhIliELQk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=JGYbyLuJYbTp4sugEtSzIl+JvPmSdLZl7N5NWMVJQipthfFMyfTj7SP4QscKT7mVM 3SpxXk4RxW+reWZnvzHbFId9p4KFZPYaYibQfgE8IIbMonpgZVEakRPEBEYc5jsakQ 3hpM2aDi5YBbazhgWWIIMF53pNLCqHI0Kyf2Qw5FLxwtVWMG2aFnLsLnSlDxWlHi9K Z9ui+YauTmmvGXkl6a+kUeENoJbWOmTVxOCXH1mH+s0/cv8vrcG4KAbY/FH4SPauVK yOIeYMEpbhZxr9YzDI59vAzAL1Vi+yphwNKolnH8jJttVToUrOjrZhW9StPJup1vU3 ivu8xmHYMRT2w== From: Roger Quadros Date: Fri, 23 Feb 2024 15:12:40 +0200 Subject: [PATCH v5 3/4] arm64: dts: ti: k3-am62p: add the USB sub-system MIME-Version: 1.0 Message-Id: <20240223-b4-for-v6-5-am62-usb-typec-dt-v5-3-4b5854d17d18@kernel.org> References: <20240223-b4-for-v6-5-am62-usb-typec-dt-v5-0-4b5854d17d18@kernel.org> In-Reply-To: <20240223-b4-for-v6-5-am62-usb-typec-dt-v5-0-4b5854d17d18@kernel.org> To: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: Andrew Davis , b-liu@ti.com, srk@ti.com, r-gunasekaran@ti.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Roger Quadros X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=5619; i=rogerq@kernel.org; h=from:subject:message-id; bh=7MMdY/AqShvbBezEAI37o47xKqwsWMIXgoQhIliELQk=; b=owEBbQKS/ZANAwAIAdJaa9O+djCTAcsmYgBl2JnQbmlQDDjuOLxFgbE8kMU9W3vZDXW0B9I1W V7GmcKg/NaJAjMEAAEIAB0WIQRBIWXUTJ9SeA+rEFjSWmvTvnYwkwUCZdiZ0AAKCRDSWmvTvnYw k888EADEZo1hAzIazNKb8EFwPXTwn/D1wP4RpybRKj5uj/Nzxo18Cwz01Akd0oNcEokjYJ5qWqy igtbYu+VLDTYY3gYR042IJ+lhzXkzkWYnQn3PRZUFVqsyawMhifGjgKLlWtj8vG+6W7EL0m1VxP 47h9Jc7P3/xJWVRSPG1uw+AvuG4q2oN2u1U4TrEBNswnF4AwZU7gFQic4trxIQ4TYx815uWkEz4 IOUhyrxBBJvtxnc13OleMBkD70AxCeVq93nugMwItWKfj3bW1IlrCf3aFep5OZPGtv1fjww6Y3r OHVDjhZDa31SZhLYSlcz/j7hoxTlCA3CsNxofnKqFSLFimUdc/yHAQVoDd77FEOgQ05yYxr4jIu zfkoKxqMPvhO9s/slWivuG6ouY1R0Ngeu4Fkahn/Na1EZunkEO2SKEinM5PbbDjtfYZDw82kpuB I3PnZPbN5g3TWkMGpCoCG1Vyu6Q8KFY+W52Sjlb35tnb4R3yPNUIq1EE1BU1BIwise8zkjeKB2I evodkjOXqtVlrtoeIY/j+7WrqvcmFH5jTNBHDQlwDWnjRhiU2zMZQ5cZs11191QQexGw8W36apK 3zutj6Kja/DUJjfixyy4bLWBwXQhzdrk6MsQacDdseNfh40PXpi9MGrFQKP5NgMlrO6v5neA8P6 OzfFWxZDdK+8dvw== 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-20240223_051310_984972_E10919ED X-CRM114-Status: GOOD ( 12.50 ) 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: v5 - disabled USB LPM feature as it is not supported. v4 - no change. Added Andrew's Reviewed-by https://lore.kernel.org/all/20240205135908.54656-4-rogerq@kernel.org/ v3 - no change https://lore.kernel.org/all/20240201120332.4811-3-rogerq@kernel.org/ v2: - moved am62p changes to next patch - use new compatible for USB PHY CTRL node --- arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 50 +++++++++++++++++++++ arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi | 10 +++++ arch/arm64/boot/dts/ti/k3-am62p5-sk.dts | 67 +++++++++++++++++++++++++++++ 3 files changed, 127 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi index 7337a9e13535..46d35036d2d5 100644 --- a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi @@ -635,6 +635,56 @@ sdhci2: mmc@fa20000 { status = "disabled"; }; + usbss0: usb@f900000 { + compatible = "ti,am62-usb"; + reg = <0x00 0x0f900000 0x00 0x800>; + 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>; + 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 e86f34e835c1..b63888a4842d 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"; @@ -463,6 +501,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 Feb 23 13:12:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 13569143 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 15D43C5478C for ; Fri, 23 Feb 2024 14:20:46 +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=y8fN5WzPbfbTyMP+/QYG4NRcdi40WGJxVJY8GShxqn8=; b=ZVtZdIuUThq0Kh wMoAmDTavG8BxcdEDPwtRyclTV6jbZU/CTc33Ba4RyFIla9yV7nfgaN7VNl3kkvZQhwgjTZ3NBvzg lVYXkKHxxZklSq6GVtL4tuL0ZCmALyPrK7r1aslszPa5OUp4LBQ21Vd+B/xdxu86bSk2xlxmq6kJs cJtvpUkTMEqv5HDMVo1tS/ea9EbRbCjANZG1r5mBf8FpQ8r3fVB7H14AKXPK5xnWNtP+zHT2VptcF i8IgwVqToP1sgHGXyEUjQkLnWYbXbs6jR29maN2dq7TSO/qMYVndIyk54To0INcw38APE+aul3V28 Ic6HtlN/hYxH2FQr0ZfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdWPt-00000009jrd-1rMN; Fri, 23 Feb 2024 14:20:45 +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 1rdVMU-00000009TxH-25f9 for linux-arm-kernel@lists.infradead.org; Fri, 23 Feb 2024 13:13:14 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 99686634AC; Fri, 23 Feb 2024 13:13:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03E29C433F1; Fri, 23 Feb 2024 13:13:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708693987; bh=Ia7B/FTNmnvsDKGGZT1idUgrWrwpUdfNfZY24Zv7oDU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=a6aJ29r6nAdNSOo01176zFTLT14uB9a8Hzs4cH7RkF5ocw1z80qpCd15z9vBXrjV5 UpNPBi0k9ZIOWQ4pR1VeFEbIIA/bSAE4CmWSLvC4kTgJkMwL2qxCnwAnVxfdF/2NYc f6fTaCpEiDOV1fmgf+EPvNYTEXPdkPcR9Fq5920hGvHeqT+022mQSiD62gwgrpFk7H kjFt80mBLystV/B/iAUDUkjLpxEoRaGbey4QEddOzzt7zRw+iPGdPFmSr1cdyhw1Kj NdIXTDUBWbOPlm5jA9dSUlxWdwVzQbvS+bT12cCRsxZGvpt61tXfoxv6OCCg+ipRG0 u+m+h/1yhqm/w== From: Roger Quadros Date: Fri, 23 Feb 2024 15:12:41 +0200 Subject: [PATCH v5 4/4] arm64: dts: ti: k3-am62a: Disable USB LPM MIME-Version: 1.0 Message-Id: <20240223-b4-for-v6-5-am62-usb-typec-dt-v5-4-4b5854d17d18@kernel.org> References: <20240223-b4-for-v6-5-am62-usb-typec-dt-v5-0-4b5854d17d18@kernel.org> In-Reply-To: <20240223-b4-for-v6-5-am62-usb-typec-dt-v5-0-4b5854d17d18@kernel.org> To: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: Andrew Davis , b-liu@ti.com, srk@ti.com, r-gunasekaran@ti.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Roger Quadros X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1242; i=rogerq@kernel.org; h=from:subject:message-id; bh=Ia7B/FTNmnvsDKGGZT1idUgrWrwpUdfNfZY24Zv7oDU=; b=owEBbQKS/ZANAwAIAdJaa9O+djCTAcsmYgBl2JnQic6W1dmFUnWohl3Du6PlUiOwrkRvkqRwX hoBvVdq5GmJAjMEAAEIAB0WIQRBIWXUTJ9SeA+rEFjSWmvTvnYwkwUCZdiZ0AAKCRDSWmvTvnYw kz9UD/0cevH5+QTgEEpTt9ewCR0vTKFFEpHjrEpAWuD6h+dlLH0g7ZLvkprg9yPtl3W/KJF1L7+ xPuFFIqaY8VDYKi8jM1LLFoPFOozrC8lxDizkvZXN13pdJPoOUevQ5ecjO8vwIRFg6CsiJWJNlp FBhD3k4c3kNhg52YUcENxbxG+00TXztjko2tAEw5WWEqThWAAy3KoStSP5y2SjYybfWR7VSqwmg rrS2s3A9eO+eYOm7rBwW6FdF2R7nnDSwR99BKfOhT1Am81o5iJn1pZQAcCfqHIgrA+qAOeNv5Ls NVLWsAm4g7WuSx+MJpRS891IBPMNkNfeGrvGqoX+tVV4UYPbRf1RS5UF5eprNvijk9MWP/lY4zD xMtp4Y+FPz5rgIo0oY7wclqRRqq+D++xtKHYybkqtovXNvTZTa7eBLgi8mwucxwaG0g1vTw7Qic B0QtybIkP44LRmQ+I2prRvep9JNQPK1ndlimk072UaUHqyqx2ATYuo45qBDXIe/l8O1G8bmwB2R BQetzd6xFHV83QQvldm1DvdhHaCs4ph3HUmfpHieIfU7S9OODP42OSOpAYcsG3Vmb62ZzDuQ+f1 SL+6HGALxrYuUk3LfQ2Nzfzrw0UkRHo1/8FXWIqv/PXvXV1KWa0PiJgO/DTztwCVZ0aub5l3mQl vqGHwhI088ZKRxg== 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-20240223_051311_028923_E407F40F X-CRM114-Status: GOOD ( 10.04 ) 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 --- Changelog: 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; }; };