From patchwork Tue May 23 12:33:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 13252205 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 7BC8FC7EE23 for ; Tue, 23 May 2023 12:34: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:MIME-Version: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:In-Reply-To:References: List-Owner; bh=BoRsXI6enJMMmo7OhH7kHJC47dB0N94vKBiwdCWusLw=; b=3AMu7EwgPJlvJ2 hW9WeZm595FFMCnZgqq38Nzj5DsW5HRQIl3ZXXPC+fxXN1w0fZj74XpHzfnVPl6o/r2DeJt+udjaH +bg60E5MNcPk2YppMGQXQHFjvoO5saLtCCkQFNr+9NGnYqPA0+vb+bfZUqT7/Vr+PFYz+Vi9pwU9r 5sB+hyz/i6icL4uKuGCm5aCxzewy1IvLps/kjubcoXHTRbC4l7pPoqjaBiZ3NQ5FvDtJn4YEu9Gl3 V+5vM6cQYfnI/WnBNnt9U5Xg1L6/J37vD/iMvZ1HoCNWoqwEbNt294ho+baMLIR1AeL/+caO1dTxy rKq5DtOXYBIJevyzxKng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q1RDJ-00AFpf-2k; Tue, 23 May 2023 12:34:05 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q1RDI-00AFpL-17 for linux-arm-kernel@bombadil.infradead.org; Tue, 23 May 2023 12:34:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=Ph3gHe0uqwEtXUCDDr+9S0mKzzPwVhjRFqvXVL/4s0w=; b=FP+5zF7EqIBVQb+bvSLQ4IW8tN 8gxwBGqqAkwj7vIrucE2ukLkc+gb71sqAxah5Dz1ro/hLJTTkL0BjvW/pmjRtnuW+1yHPv3Q3UEBs aGJX5FKYWH29wONCusRoet8l+RwfFisPghGWLyiW5ztQ7vWAbcTGl3URb9l0n9lZri5/R6+WV6gwQ qzlVlpzDG5vUqQTewM0YANDWlPyZL8sxU9jvi3VzSh/hmtJ53+xFeewy+4u1vyd/6ByIScs8mQW02 nD2gurzLGDhzObfGnnqVD5Qu3arJihIDoA66hfVTg4uSs2dHe61Ozny2DesWNZb2QJWbU6mBiduJ1 lYgpIT2w==; Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q1RDE-003WGh-2K for linux-arm-kernel@lists.infradead.org; Tue, 23 May 2023 12:34:02 +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 54DAA631AF; Tue, 23 May 2023 12:33:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA986C433D2; Tue, 23 May 2023 12:33:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684845236; bh=WRj4PeCrYbzTNdM4RjmQBD++ByLrkDUJZxWRpjS/qaU=; h=From:To:Cc:Subject:Date:From; b=PDiIIwglFuz1jCbXPT1fjIZgWuuI17BF69AnME2jgM0uXebECRJOR/vfff2g3pNMY iFRmT8Z/1jxYkt906My8vYP5WZ8ohb8AdEnGgUGDj7LkaeINjst0gE1kY2r4a7Yte+ lroBmyVvSI3pciX3yk8b/W4RFiUnJpw6knvcWYU8tbnXjmojbXoIxGy1ygCDdByGl1 vwMSH7T74z+IwVW51zjLaQx2YeDMbu3wH3Np8C0oMPvKFC4jgnVd+/+WGtpBgWZcle tKBJr0WhTXm/k1LQivmxMqdqOmOVJV5eEv4aGPE9FDSnrJy6LzSSPTs4QawV2IU1nZ SSNKvvJP3cCJw== From: Roger Quadros To: nm@ti.com Cc: vigneshr@ti.com, r-gunasekaran@ti.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros Subject: [PATCH v4] arm64: dts: ti: k3-am625: Enable Type-C port for USB0 Date: Tue, 23 May 2023 15:33:48 +0300 Message-Id: <20230523123348.52850-1-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230523_133401_084287_16EB5784 X-CRM114-Status: GOOD ( 13.67 ) 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 --- Changelog: v4: - Rebase on v6.4-rc2 - Drop interrupt patch as it will break Type-C role switch on older boards. v3: - include Type-C support for am62-lp-sk - split interrupts properties for Type-C chip into am625-sk v2: - rebase off [1] - add fixes tag to patch 1 [1] - https://lore.kernel.org/all/20230321-am62-lp-sk-v2-0-0a56e1694804@ti.com/ 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 2a1adda9bff6..729f95e19042 100644 --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts @@ -161,7 +161,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 976f8303c84f..b6667c0ff826 100644 --- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi @@ -242,6 +242,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 { @@ -321,7 +345,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 {