Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1983313lqo; Mon, 13 May 2024 04:46:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXKeOnW1uojTguvR3lVML7LKzgX7Atpx76hGuZAFdXZJ//92eflTk7gT6lXuAo9qt8bkT+RjsF9MVPBCmrK57QWR/AJ/nzjUL3TnHsRWA== X-Google-Smtp-Source: AGHT+IHUmupkz0UGnchtXUC1i/NEf2v72a5JixUKfAgLesRA2fwa0UovqR3C77Wm7rG0jO1wg4/O X-Received: by 2002:a17:903:41c4:b0:1eb:50fd:7875 with SMTP id d9443c01a7336-1ef43e2323cmr121250445ad.33.1715600788870; Mon, 13 May 2024 04:46:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715600788; cv=pass; d=google.com; s=arc-20160816; b=U20+jiS/uRh77so/o/GE5Jc0BxnKa6z4X4QsW01eiCX60aOVD3f2p2X79y5FBJvb+g FvTk37iqpgeBlQGDLjkVezIFny/FhbVnNy67a2sAxiC0OY63S8CIvJLBh43Lg06Jd3FJ Pz6hiVFiwlrTYx0Vibvmhgbp3xFMFAcw8pajAiJm01UEz8ev1ONrMhoyPetN/31Jgl+p 5Qe1HJikypznyxWCYmLN07ano5FAIBf8gH9npsb6dJlfF+VdY1IRE6oX6wPKVV7C3K7D Io7Eh7QcvMniBlWGsXHLI2zOUvWxtBGrqJ/b4N7Bp4aKqwhErFLluN21WQiGox52b/5J uigg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yGYODzhRTKhI2Q5KMHiIKKScm+LSU/cb2USphFHGmcM=; fh=nq2KPgpbER4yJ8AFOltFbdhxySgtxELZfPeQ2DUlm28=; b=gmzYkf1Tr95CIRONiyLdvd85hCz4otdQBUTAfjg/+XXisbPxXQOD7wq6wK9GKNB6Ar B1g3rZyV7h8YrVoGyn8OWVOagQpQlB0C8T+6oZ8SoDSSaGwknQn0BS/+v8ZC5eZhvBPa VN4hDMQu/QAj7rMAr1O9qtlPlGlbmrXeSvlYH1Z4y3ygHVEmdHE7l3IRTr5SmQos87mN P927C2o/6sIcJJcFv013r+jjg5C9HuM3aPSM8GIDKkCAgG//HnT6HsT5wUT9pdCoo/Ni iGxnZxI8caOcP8d67TsGqquUILelMjqFk/Jpjs0nV3D4UiyuqvpMBsfoc+YJBVBQuiWv iAKQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=knWj2i3b; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-177517-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177517-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0c26951csi93100785ad.583.2024.05.13.04.46.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 04:46:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177517-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=knWj2i3b; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-177517-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177517-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B5CCF287985 for ; Mon, 13 May 2024 11:45:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 511A914EC74; Mon, 13 May 2024 11:45:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="knWj2i3b" Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED17B14F9E3; Mon, 13 May 2024 11:45:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715600709; cv=none; b=hNf2RHvJ5o/dEnfKWen92lIIh0cJEm2DZedEpafoeKeznyLDObegS0Kc3AQumf02SY8a2NAmZCkGg2JihQVPiuS7eZ+X1rPFdz7CZjSFdJtJnIgsPC9WXp8o8PviruxDHiIIaOIPqcEOWHGOxwxHvRaLo/nalK7TDlNnobFbDgU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715600709; c=relaxed/simple; bh=/2h4IWhyMKDvL3BsU0t9S0k874hGqIIbxVtf9NYmZ8M=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=UOtfHIuO9vE6Dtt2AlX4nr+RjzFMzdC/ic/ZMkG4kjA6A2aKWiHci/mCFUYGWp9u8tj2ZCiQOo6gcHFP8OAHbrjwPhP/HXgCppjE48QRJbGZDMc/CT7eG4uerJhbmPA9gwKDM41tf+5WXYWueFlyW13FWcuaLRCZCm4P/HD5V9o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=knWj2i3b; arc=none smtp.client-ip=198.47.23.248 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44DBj15C107614; Mon, 13 May 2024 06:45:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1715600701; bh=yGYODzhRTKhI2Q5KMHiIKKScm+LSU/cb2USphFHGmcM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=knWj2i3b8Hbx2QbaFP0ONDQwPOYPsektWCr2uBcFn+QlsgyVdyKmgNe+vnB23Osqy K800KCaIDyJrYMArhmlCD2yQAqiXfKVzg6RJY6ggPmqoFeJfi0/+yReF52Or0Ue5Hi aQkrZATTmPSuHrPtoZoYv30h8NyYt3ZQbuJwHcZE= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44DBj1wg020296 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 13 May 2024 06:45:01 -0500 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 13 May 2024 06:45:00 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE114.ent.ti.com (10.64.6.35) 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; Mon, 13 May 2024 06:45:00 -0500 Received: from uda0500640.dal.design.ti.com (uda0500640.dhcp.ti.com [172.24.227.88]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44DBiiZj086026; Mon, 13 May 2024 06:44:57 -0500 From: Ravi Gunasekaran To: , , , , CC: , , , , , , , , Subject: [PATCH v2 3/3] arm64: dts: ti: k3-j722s-evm: Update USB0 and USB1 Date: Mon, 13 May 2024 17:14:43 +0530 Message-ID: <20240513114443.16350-4-r-gunasekaran@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240513114443.16350-1-r-gunasekaran@ti.com> References: <20240513114443.16350-1-r-gunasekaran@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 The GPIO expander on the EVM allows the USB selection for Type-C port to either USB0 or USB1 via USB hub. By default, let the Type-C port select USB0 via the GPIO expander port P05. Enable super-speed on USB1 by updating SerDes0 lane configuration. Signed-off-by: Ravi Gunasekaran --- Changes since v1: ---------------- * Removed USB aliases, line-name property for p05 GPIO hog * Included k3-j722s-main.dtsi v1: https://lore.kernel.org/all/20240429120932.11456-1-r-gunasekaran@ti.com/ arch/arm64/boot/dts/ti/k3-j722s-evm.dts | 55 +++++++++++++++++++++++++ arch/arm64/boot/dts/ti/k3-j722s.dtsi | 5 +++ arch/arm64/boot/dts/ti/k3-serdes.h | 7 ++++ 3 files changed, 67 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-j722s-evm.dts b/arch/arm64/boot/dts/ti/k3-j722s-evm.dts index bf3c246d13d1..531912be97c9 100644 --- a/arch/arm64/boot/dts/ti/k3-j722s-evm.dts +++ b/arch/arm64/boot/dts/ti/k3-j722s-evm.dts @@ -9,7 +9,9 @@ /dts-v1/; #include +#include #include "k3-j722s.dtsi" +#include "k3-serdes.h" / { compatible = "ti,j722s-evm", "ti,j722s"; @@ -202,6 +204,12 @@ J722S_IOPAD(0x012c, PIN_OUTPUT, 0) /* (AF25) RGMII1_TX_CTL */ >; }; + + main_usb1_pins_default: main-usb1-default-pins { + pinctrl-single,pins = < + J722S_IOPAD(0x0258, PIN_INPUT, 0) /* (B27) USB1_DRVVBUS */ + >; + }; }; &cpsw3g { @@ -301,6 +309,13 @@ "PCIe0_1L_RC_RSTz", "PCIe0_1L_PRSNT#", "ENET1_EXP_SPARE2", "ENET1_EXP_PWRDN", "PD_I2ENET1_I2CMUX_SELC_IRQ", "ENET1_EXP_RESETZ"; + + p05-hog { + /* P05 - USB2.0_MUX_SEL */ + gpio-hog; + gpios = <5 GPIO_ACTIVE_LOW>; + output-high; + }; }; }; @@ -384,3 +399,43 @@ status = "okay"; bootph-all; }; + +&serdes0_ln_ctrl { + idle-states = , + ; +}; + +&serdes0 { + status = "okay"; + serdes0_usb_link: phy@0 { + reg = <0>; + cdns,num-lanes = <1>; + #phy-cells = <0>; + cdns,phy-type = ; + resets = <&serdes_wiz0 1>; + }; +}; + +&usbss0 { + ti,vbus-divider; + status = "okay"; +}; + +&usb0 { + dr_mode = "otg"; + usb-role-switch; +}; + +&usbss1 { + pinctrl-names = "default"; + pinctrl-0 = <&main_usb1_pins_default>; + ti,vbus-divider; + status = "okay"; +}; + +&usb1 { + dr_mode = "host"; + maximum-speed = "super-speed"; + phys = <&serdes0_usb_link>; + phy-names = "cdns3,usb3-phy"; +}; diff --git a/arch/arm64/boot/dts/ti/k3-j722s.dtsi b/arch/arm64/boot/dts/ti/k3-j722s.dtsi index c75744edb143..61b64fae1bf4 100644 --- a/arch/arm64/boot/dts/ti/k3-j722s.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j722s.dtsi @@ -87,3 +87,8 @@ reg = <0x00 0x70000000 0x00 0x40000>; ranges = <0x00 0x00 0x70000000 0x40000>; }; + +/* Include bus peripherals that are additionally + * present in J722S + */ + #include "k3-j722s-main.dtsi" diff --git a/arch/arm64/boot/dts/ti/k3-serdes.h b/arch/arm64/boot/dts/ti/k3-serdes.h index a011ad893b44..9082abeddcb1 100644 --- a/arch/arm64/boot/dts/ti/k3-serdes.h +++ b/arch/arm64/boot/dts/ti/k3-serdes.h @@ -201,4 +201,11 @@ #define J784S4_SERDES4_LANE3_USB 0x2 #define J784S4_SERDES4_LANE3_IP4_UNUSED 0x3 +/* J722S */ +#define J722S_SERDES0_LANE0_USB 0x0 +#define J722S_SERDES0_LANE0_QSGMII_LANE2 0x1 + +#define J722S_SERDES1_LANE0_PCIE0_LANE0 0x0 +#define J722S_SERDES1_LANE0_QSGMII_LANE1 0x1 + #endif /* DTS_ARM64_TI_K3_SERDES_H */ -- 2.17.1