From patchwork Thu Oct 17 06:40:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddharth Vadapalli X-Patchwork-Id: 13839507 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 AE872D2F7F3 for ; Thu, 17 Oct 2024 06:45:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding: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=SXZs1tZeO5dv/QQF+M6mQqAm8Zl6lz5X0ZWRJcpLVxk=; b=JVYHYAOokkWnRu8CpIeRxCeiZN 5SVmCRZQ/PulJWvwTYj/Pp6ANKEysRsjyWIq7LW/7kGIUD9IVmtnH6QkuUKgutuKqICyqLwj68Ui4 gXc7UK4DGrKlwzWXYl+veyWsqb4CyXeIeQ/X49QBSlYT/6houZHXvyj95p90w9RLJb0tebdZOMYWw sWQngLTuVSmb6sIsTcFWYcyTBQHHcXu12PmRUm155qgstUZEvTlTVgm30JXoKmyLdgJlMYQ75++9g Dik9X1N1rwKWfEZuT28JbieF5httoUaSH34w/BooNMm2fjTiBOjQrfw9Ypm643pMn185jsMVMNsCo hI6Qw+3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1KFy-0000000Dtgu-0eRp; Thu, 17 Oct 2024 06:45:10 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1KBx-0000000Dt8D-3aSA for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2024 06:41:05 +0000 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 49H6ekfq002881; Thu, 17 Oct 2024 01:40:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1729147246; bh=SXZs1tZeO5dv/QQF+M6mQqAm8Zl6lz5X0ZWRJcpLVxk=; h=From:To:CC:Subject:Date; b=dBxVzCEs2VvkJCD2urQId1wklK1n+2wtc2w8ir0YWIIeBir1TETj4ycdYD6lZDbT5 qL9NsL/YbfwcGjiWn3r0gy/fqJu8AkSY2qkfPyxeyweKM7nawmsIV/gFR2+uxIdZTa TnePGIBG9H0/79a2SsGgq5DMnageGauCKI/olpyE= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 49H6ek3J030539 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 17 Oct 2024 01:40:46 -0500 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 17 Oct 2024 01:40:45 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 17 Oct 2024 01:40:45 -0500 Received: from uda0492258.dhcp.ti.com (uda0492258.dhcp.ti.com [10.24.72.81]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 49H6efL4009875; Thu, 17 Oct 2024 01:40:42 -0500 From: Siddharth Vadapalli To: , , , , , CC: , , , , Subject: [PATCH] arm64: dts: ti: k3-j784s4-evm: Add overlay for USB2.0 Type A functionality Date: Thu, 17 Oct 2024 12:10:41 +0530 Message-ID: <20241017064041.880119-1-s-vadapalli@ti.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241016_234102_026541_49C78DFA X-CRM114-Status: GOOD ( 13.58 ) 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 The USB0 instance of the USB controller on the J784S4 SoC supports a single USB interface with the possible choices being: 1. USB3.1 Gen1 Type C interface 2. Two USB2.0 Type A interfaces via an on-board USB Hub. Add overlay to enable USB2.0 Type A functionality by: 1. Configuring the "USB2.0_MUX_SEL" mux to enable the USB Hub connected to the two USB2.0 Type A interfaces on the J784S4-EVM. 2. Set the Dual-Role Mode to Host. Signed-off-by: Siddharth Vadapalli --- Hello, This patch is based on linux-next tagged next-20241016. Logs validating USB2.0 Type A interface on the J784S4-EVM: https://gist.github.com/Siddharth-Vadapalli-at-TI/41bbcb39f331aa3bb6fd4dd694015189 Regards, Siddharth. arch/arm64/boot/dts/ti/Makefile | 4 +++ .../arm64/boot/dts/ti/k3-j784s4-evm-usb2.dtso | 26 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 arch/arm64/boot/dts/ti/k3-j784s4-evm-usb2.dtso diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile index bcd392c3206e..fc75d0365558 100644 --- a/arch/arm64/boot/dts/ti/Makefile +++ b/arch/arm64/boot/dts/ti/Makefile @@ -124,6 +124,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am69-sk.dtb dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm.dtb dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm-pcie0-pcie1-ep.dtbo dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm-quad-port-eth-exp1.dtbo +dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm-usb2.dtbo dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm-usxgmii-exp1-exp2.dtbo # Build time test only, enabled by CONFIG_OF_ALL_DTBS @@ -200,6 +201,8 @@ k3-j784s4-evm-pcie0-pcie1-ep-dtbs := k3-j784s4-evm.dtb \ k3-j784s4-evm-pcie0-pcie1-ep.dtbo k3-j784s4-evm-quad-port-eth-exp1-dtbs := k3-j784s4-evm.dtb \ k3-j784s4-evm-quad-port-eth-exp1.dtbo +k3-j784s4-evm-usb2-dtbs := k3-j784s4-evm.dtb \ + k3-j784s4-evm-usb2.dtbo k3-j784s4-evm-usxgmii-exp1-exp2-dtbs := k3-j784s4-evm.dtb \ k3-j784s4-evm-usxgmii-exp1-exp2.dtbo dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \ @@ -227,6 +230,7 @@ dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \ k3-j721s2-evm-pcie1-ep.dtb \ k3-j784s4-evm-pcie0-pcie1-ep.dtb \ k3-j784s4-evm-quad-port-eth-exp1.dtb \ + k3-j784s4-evm-usb2.dtbo \ k3-j784s4-evm-usxgmii-exp1-exp2.dtb # Enable support for device-tree overlays diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-evm-usb2.dtso b/arch/arm64/boot/dts/ti/k3-j784s4-evm-usb2.dtso new file mode 100644 index 000000000000..02f97819aa82 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-j784s4-evm-usb2.dtso @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0-only OR MIT +/** + * DT overlay for USB2.0 Type A functionality on J784S4-EVM. + * + * J784S4 EVM Product Link: https://www.ti.com/tool/J784S4XEVM + * + * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/ + */ + +/dts-v1/; +/plugin/; + +#include + +&exp2 { + p12-hog { + /* P12 - USB2.0_MUX_SEL */ + gpio-hog; + gpios = <12 GPIO_ACTIVE_HIGH>; + output-high; + }; +}; + +&usb0 { + dr_mode = "host"; +};