From patchwork Thu Mar 30 08:49:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 13193671 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 DCE71C761AF for ; Thu, 30 Mar 2023 08:51:05 +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=BsyUhwyoTDG0nPEOuGdUrrDOiqQDi0swcYRMxXcRmo4=; b=jnJ4MbmbdH9PTS 9yfiz8+jjrTyUhTyAapMr0bZFnp8B4BDCZkZet8bGNuq8MYe7AMmzR59ThM8y52qimAdVenjOXwR2 zWT0IO9T6j1iz5DNIP2ULCa4Xo5ZWeicv+whWZK1f4VcZoYDu6PMWuKFUVOl6dNWvEoZduEVucQL9 9W0KQj82IuVkuZYrFTluYwdRKpAYQX+//1udPwFz8iSMkx+jkjFNuFuK3rjkB8yUVaxG3vBcm8UFm KpcirkvMa2+JFxuo1xizymDeGtVTimI6cumIrEcg/ON8BN7D9TDF6tt+ZfKNSpRZ6xUTqTbFnWbys Qd9ABVldCfML0fxQIbFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1phnz8-0039Ts-10; Thu, 30 Mar 2023 08:50:18 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1phnyw-0039QE-1D for linux-arm-kernel@lists.infradead.org; Thu, 30 Mar 2023 08:50:07 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0003DB82689; Thu, 30 Mar 2023 08:50:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19038C4339B; Thu, 30 Mar 2023 08:50:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680166203; bh=PbVK8hEsU/pH2vkw9lfbR9b5VjLWZjOk4C9N4xsA4JA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oLJD8jmbeJyUA5IVZwuOF1Cw5OrJfMSUqcNwtRgBHLO2pcEv/OmeKdtaCOnoY/38y kzLDj8su8nwnI0dWhZvZd/gNRFPoiUQDnNNHZ4aj8p8rlyF/rr+MAWRt6RmolLJMtT tDf/QgN1HsKcKaM5+hEmTxiw0tJVr85VqxwxwGtSyn4f38zAHEZ6Gr63q9UF4FzpkS yfqAXCh3jHBripssF3tmiFkELcinzb0LnqLB5PTD+LmFHqqquH8cNG+2yj5LbeK/hR KOBSBuTfSiCNEvk7d0kRW2cSEBJu6yKvQDZND7JSRoaoWOxiSbVyeaJRMvrenDMrJ3 t2bRpQR6HwDog== From: Roger Quadros To: nm@ti.com, vigneshr@ti.com Cc: kristo@kernel.org, srk@ti.com, r-gunasekaran@ti.com, linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Dhruva Gole , Roger Quadros Subject: [PATCH v3 1/3] arm64: dts: ti: k3-am625-sk: Add ti,vbus-divider property to usbss1 Date: Thu, 30 Mar 2023 11:49:52 +0300 Message-Id: <20230330084954.49763-2-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230330084954.49763-1-rogerq@kernel.org> References: <20230330084954.49763-1-rogerq@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230330_015006_570273_9A83208A X-CRM114-Status: GOOD ( 11.02 ) 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: Dhruva Gole The property "ti,vbus-divider" is needed for both usbss0 and usbss1 as both USB0 and USB1 have the same external voltage divider circuit. Fixes: 2d94dfc43885 ("arm64: dts: ti: k3-am625-sk: Add support for USB") Signed-off-by: Dhruva Gole Signed-off-by: Roger Quadros --- arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi index 54318a07d50c..80e8b9b9a5f5 100644 --- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi @@ -261,6 +261,7 @@ &usbss0 { &usbss1 { status = "okay"; + ti,vbus-divider; }; &usb0 { From patchwork Thu Mar 30 08:49:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 13193669 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 8ACB6C6FD1D for ; Thu, 30 Mar 2023 08:51: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=ffxq+5xTfaBz1gBaYus9QieFa9PPPRe7ayK57OEgC84=; b=HHIIKT6ndjrP3j f+cINxkqj6yQb0f+JLPiL8bP4AN0zDi30MTLRgWLan27+1lvJ5xtzGpNxE9G57laiBVcF5E7fiPaE rNu/s9Lz2brVZ8N0BJ9gWYJH+Vc4eZJB9O7bMpqTy1BVIacWq+rEMgVF5/pAQUbmip8nqNCBHo7TE kqKlzuM1xaj8TUYlc/hALZrzjN0W9Syc0sXXq+5+k223HTKMzBvWsnSArH8FuqeAkyW6+h1IMkPSc u6qU/0qekyvf+KySoaxbvorXe/Vs8hZdhuFV400YZZqwmB6kUTGsmLnGuti0R0lohesql54FzRopz Ljb2+Sj576T426iAlBNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1phnzA-0039VC-1b; Thu, 30 Mar 2023 08:50:20 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1phnz1-0039RS-2M for linux-arm-kernel@lists.infradead.org; Thu, 30 Mar 2023 08:50:13 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DD42BB82652; Thu, 30 Mar 2023 08:50:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26A1AC433EF; Thu, 30 Mar 2023 08:50:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680166206; bh=KEK5moVX0SHU97cua/KWwyNRaSV84QY94bnoxXMtLwM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PaC7ibN4tH6VpjOuLAvrGigDLPSOAB8W8LMtNMsXBPSk1ZCWPYcW+6x5gniNjvwFt WOH7b51Q4/xpuJ90NpL4FofFmTYXiRiEYkQQKe1XK/Rm8g9eCrEYefep/Z903kHspk KkmfIxgi8FlB5b5TiMG3gx+/tWUrVqiV29GOrua8TiZoKCLYj37h+daENcrUXPi4Re 666CrAxy7HTg9l7ziGyn3h3kNyYSxfCBl8cCgENAczNfxq2HLf21Qb4/AeSueJtsEz 7qVpeMabXNcXpp9obcMxceAIwfpLiQfWsnptrsDARXgFKCn1lzMlAOPJrLzmIPS0PD xSTieu1G8QF4A== From: Roger Quadros To: nm@ti.com, vigneshr@ti.com Cc: kristo@kernel.org, srk@ti.com, r-gunasekaran@ti.com, linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Roger Quadros Subject: [PATCH v3 2/3] arm64: dts: ti: k3-am625: Enable Type-C port for USB0 Date: Thu, 30 Mar 2023 11:49:53 +0300 Message-Id: <20230330084954.49763-3-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230330084954.49763-1-rogerq@kernel.org> References: <20230330084954.49763-1-rogerq@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230330_015011_915224_D4A694DF X-CRM114-Status: GOOD ( 12.92 ) 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 USB0 is a Type-C port with dual data role and power sink. Signed-off-by: Roger Quadros --- arch/arm64/boot/dts/ti/k3-am625-sk.dts | 2 +- .../arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 35 ++++++++++++++++++- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts index cdc0858dd1b2..467e17e28916 100644 --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts @@ -150,7 +150,7 @@ exp1: gpio@22 { "UART1_FET_BUF_EN", "WL_LT_EN", "GPIO_HDMI_RSTn", "CSI_GPIO1", "CSI_GPIO2", "PRU_3V3_EN", - "HDMI_INTn", "TEST_GPIO2", + "HDMI_INTn", "PD_I2C_IRQ", "MCASP1_FET_EN", "MCASP1_BUF_BT_EN", "MCASP1_FET_SEL", "UART1_FET_SEL", "TSINT#", "IO_EXP_TEST_LED"; diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi index 80e8b9b9a5f5..db7fa20e8fe2 100644 --- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi @@ -198,6 +198,30 @@ &main_i2c0 { pinctrl-names = "default"; pinctrl-0 = <&main_i2c0_pins_default>; clock-frequency = <400000>; + + typec_pd0: tps6598x@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 { @@ -265,7 +289,16 @@ &usbss1 { }; &usb0 { - dr_mode = "peripheral"; + #address-cells = <1>; + #size-cells = <0>; + usb-role-switch; + + port@0 { + reg = <0>; + usb0_hs_ep: endpoint { + remote-endpoint = <&usb_con_hs>; + }; + }; }; &usb1 { From patchwork Thu Mar 30 08:49:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 13193670 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 453A7C77B61 for ; Thu, 30 Mar 2023 08:51:05 +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=z/aj4TOjvz2dnS2a5QXqXhdTGQOWJpKS/SdG2ZMCpjg=; b=lxDXXLLTFnbXDJ dDo3z2ioFIKb/FxbNSaxRIv1m2gRuiN+YmaP+yWLV/2w104G4gpVJ7U6o2zWWNs+bWFCFOZCon58v FyDl2HJnk0JaFgpzVQqu/aOXjyYm/tuFjfN4ijJYVTPLCfyiMZRHUsxeQ6YJpep13N44T3kqJ4t8C bSAlVmdq953oJLKlzP4KhMnJf8orKmVY/tPGAVxrQTKPQDK12ck4zVbNww2xNuPyGV8RPfITutQou 2lDH5K6lPOtKblPhBkO04MdhglB2JrIfB4YlyMiwuEgws51ljbqKsWyjWNY+uIj89px1YsJ8inpFj ipf3EIW2kwYmxnRHjkrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1phnz9-0039UK-17; Thu, 30 Mar 2023 08:50:19 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1phnz0-0039S1-1W for linux-arm-kernel@lists.infradead.org; Thu, 30 Mar 2023 08:50:11 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EA6B561F88; Thu, 30 Mar 2023 08:50:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 026D9C433D2; Thu, 30 Mar 2023 08:50:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680166209; bh=torgI06B/J0R66UMOhGDjGUeyg08LmEJEdr+FuzGCms=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z36FJkPvEKhY9/yZVCZlogoD6cMdcQ+fOGHaZohYd9pjXv/MjH3pFtRzdKVI5PQHA na+I8m8bw+IEfzNKObO3BBNE4LZ+w3pBvTaKqYpqgQoMmUl40Xzhpn+pgfEzi2m2Hk Z2XPV95NyiWRXRe8k0mU+pFva4YURdf5NmGU+NYJyuANtnz3TkTwt+v7xwuE9JV6xF X8J8scGiX++7CNXJ6DVFM7hU3DcOoT7ZZ+YN8bMiJ1W4r4K0MRleapyPL1lthZdOfJ Zi3Hn8KoGrKVBOStzzCMWEgXfW1fpDKYiOepiy3IztVwdA5pSq0ELQhl0DoOSzc2mg Leq6ng5ip5euA== From: Roger Quadros To: nm@ti.com, vigneshr@ti.com Cc: kristo@kernel.org, srk@ti.com, r-gunasekaran@ti.com, linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Roger Quadros Subject: [PATCH v3 3/3] arm64: dts: ti: k3-am625: Use interrupt line for Type-C chip Date: Thu, 30 Mar 2023 11:49:54 +0300 Message-Id: <20230330084954.49763-4-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230330084954.49763-1-rogerq@kernel.org> References: <20230330084954.49763-1-rogerq@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230330_015010_549616_4ADCFF15 X-CRM114-Status: GOOD ( 11.01 ) 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 Since revision 1.3 the Type-C chip's interrupt line is available. This will break Type-C role swap on older boards, and it will remain in Peripheral mode. Signed-off-by: Roger Quadros --- arch/arm64/boot/dts/ti/k3-am625-sk.dts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts index 467e17e28916..5d899b56aed6 100644 --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts @@ -256,3 +256,9 @@ partition@3fc0000 { }; }; }; + +&typec_pd0 { + interrupt-parent = <&exp1>; + interrupts = <17 IRQ_TYPE_EDGE_FALLING>; + interrupt-names = "irq"; +};