Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp580809lqh; Tue, 7 May 2024 08:01:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXo5VmLxSeBm3jAXGXhHE8STVEbHnCisZmf8cLpg0wLR0KhuloftlnCothg0E5dW1ylmYQGS/9yYCFYiClyny1G1gruQ47oCwi0vwIgiA== X-Google-Smtp-Source: AGHT+IFrYhB8inCdTZgonLx6ij/qbLWcEIa0RWaGCK4oMhavs7S2M3AsrOMtMYKtvgwZeeTbNlxb X-Received: by 2002:a05:6808:4288:b0:3c9:6d44:8210 with SMTP id dq8-20020a056808428800b003c96d448210mr5827205oib.17.1715094094354; Tue, 07 May 2024 08:01:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715094094; cv=pass; d=google.com; s=arc-20160816; b=e/mP7KJqrC2qqfxQE5NAlksUIUfIrRa/cgZtNatXfx8aamvGfdtNiTTPQbJAU8pj8M rWmi9Uzgn6f/xKBCXV1eidNbOzNDAWVo7xUMeaQ92Qh4MEgXODjnWNs5DRclzdIWbFlg mlOG1eqVc8zFffQfAQOyLQDnlr0+bu+mKG5XYcX0ve+AbCdEPBZM+2Tw2PXQn3P+L/2/ mmSt87Q4M/DTF4LP51IikWIvtzcYIOJLiPHvGA1ATa3NZLIhENvorqqVG7hI0+OTR5IT LIJrmQCkF2ilntpluTweB6zcoKlUhCRWw+D6lCcLlwldrKBlhd6jhXT4PyT4QfW27s65 Y6sw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fd7naGUVWR/aYUuxHgt1q+5u72z1aXhzSmC2vO8SJUo=; fh=Es9hHPW5dK3Loh+2q0euRVD0+yRYKXlwfwstMa5iqu0=; b=rbFwIyvPb6iHlJgHG0J50Kqm/bAqw8sSlO5jqQ8jlggVAtGPqgq/hO7YNOVV1VEwC4 r5qjmSIfm9Chkd0g9cVMFoH1jCyjchIA6gGq5DIkXY7XRhCnwRDfbP2hr/rrZ2txNAxh nOWJ49x4PZft8WRyYrDrwL/k1Z8JIeDle/nNtvvkv2QkrWQJ32oSWIp4CFILwlDCgDKD Qm13PvVYbvH/Ny4l9Gn1YkDWt1WEV8wg1UYVGWI9CxOpGWuynPF2MN6hNLEaoHAJU5fA FbHYHJpage/ELEj+uNo8pzC5fRc+gQtsboed3uXTjm/WB5jEe8eRGGMnTNwHE6kHkfq3 CppA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fKGgycyo; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171643-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171643-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id cg25-20020a056122311900b004df23c63dedsi2007078vkb.292.2024.05.07.08.01.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 08:01:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171643-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fKGgycyo; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171643-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171643-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 045D11C23A56 for ; Tue, 7 May 2024 15:01:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 787FD161308; Tue, 7 May 2024 15:01:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fKGgycyo" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9B4F115F311; Tue, 7 May 2024 15:01:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715094085; cv=none; b=t+2tcbHACeiDEHWcLJAkWxunU03KQpw0V2VvePF364yHxbJR4+OWP7Eo7VvRLyQoaqAOQFxNj6DwriTThrqs6orXeTy6igfiJ/BhRGIXLaY9sTY043NTn3XLQGnZCaJ7g02vfVW3Q/P56jPrVx/079LuObAHydPd48qTbEtaheY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715094085; c=relaxed/simple; bh=k/GIOzSRD0t9yd2KLhhqA2JOci2Tu6txRXl2CqfM/o4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=h1uc3ml2yxKvzJL59nMqpWvlHs0oVMirJCWxO7TugBmj9IOcuc79mhgLjxueiAPmlQNPgss3KdCvjFcCceq2tIza+uxgHcbwy3UIEQVdBpgphkNOZwzK//pu/DCUOkioipQGcObhacR39F/FQ806jS9zisBZ/SAsMPV6v4m+jqg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fKGgycyo; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02064C2BBFC; Tue, 7 May 2024 15:01:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715094085; bh=k/GIOzSRD0t9yd2KLhhqA2JOci2Tu6txRXl2CqfM/o4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fKGgycyoEVyXOCvU7yTlRs15Yg50Nh/0yYuCZYPyuyHfRFx+6u80SU1RA4OM7oXf/ 8njbtgcxYLEpEhwMJ7GPdW+ofcpsLI9erS9bpIoP63boRjizkxQNJTkph19MlTgPgH PyNJsfGfveY4CfztKiHMhQ+n9kk3mTApRDm2ZO+N2SMoDPFgMAdWDNe2jWSsDCX64F 0q2w3nohIT/rH+Rclfb3B8qjd47gmftOWLvlUAcL45eXgjeUSWlzXwzaTXDymh7RE7 cNf0aex6XMd1ceMpQnv1+9VUOwz/fS5SQEjwePrej7xL9BZT0QPmkra0VOqrgh/Zyv p6tVHPR91+VOQ== Date: Tue, 7 May 2024 10:01:23 -0500 From: Rob Herring To: Ravi Gunasekaran Cc: nm@ti.com, vigneshr@ti.com, kristo@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, srk@ti.com, rogerq@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] arm64: dts: ti: k3-j722s-evm: Update USB0 and USB1 configuration for EVM Message-ID: <20240507150123.GA471367-robh@kernel.org> References: <20240429120932.11456-1-r-gunasekaran@ti.com> <20240429120932.11456-4-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; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240429120932.11456-4-r-gunasekaran@ti.com> On Mon, Apr 29, 2024 at 05:39:32PM +0530, Ravi Gunasekaran wrote: > 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 > --- > arch/arm64/boot/dts/ti/k3-j722s-evm.dts | 58 +++++++++++++++++++++++++ > arch/arm64/boot/dts/ti/k3-serdes.h | 7 +++ > 2 files changed, 65 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..ddb4f1f0d92d 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"; > @@ -20,6 +22,8 @@ > serial2 = &main_uart0; > mmc0 = &sdhci0; > mmc1 = &sdhci1; > + usb0 = &usb0; > + usb1 = &usb1; Why is this needed? Doesn't look related? > }; > > chosen { > @@ -202,6 +206,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 +311,14 @@ > "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; > + line-name = "USB2.0_MUX_SEL"; > + }; > }; > }; > > @@ -384,3 +402,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-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 >