Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp447774lqo; Wed, 8 May 2024 05:03:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWyoHoz0LnfYYrmWcwq38fGg1lCwNZl3k/evVWEheAnTXa8NLYxY85B1lGd7s4zrF/uwjz3TkBFEBTdJWrzcg1C5qJcCLXDOCcoMhF2bQ== X-Google-Smtp-Source: AGHT+IEfcwnVFal8vSFuLIrD+ksfHcTjPAYzv2LgXO0yQJfyaHgNDoCx3BQ87a8vH8XinCgHoAMd X-Received: by 2002:a62:a519:0:b0:6ec:fe26:4ec1 with SMTP id d2e1a72fcca58-6f49c2a38c9mr2735330b3a.22.1715169820837; Wed, 08 May 2024 05:03:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715169820; cv=pass; d=google.com; s=arc-20160816; b=pq8xr0aLScp3ALy9lZOzN7C7j8QWO7P8SeYHrJuLJTMm230kxi1v24nx5gCHOnH5d+ UvKqXdJMxuU5mR4Akk0S2fqXNDnLE4A9vUDOf2F0S6DLzk6uGnpHs2EzyjIQQ1yFyz1d 3JhCCkjdgIM5W7vmPMQeuzQog/eJg5tPNEuP5IV4VPXa52IXAxH1f7+D3Ux46t/2G1R8 T/teWV4eTvdcefJYtmZsGuR09uElrjvEZwnZ4XkFSUeV29BO4JUVZK5QRfieA8BJqkYH FuYQxWPlKb/BLB4fjyFXzdlqa/f58RRNxi3vH3ghtxhAMmXSKhDQGmhCygCry6bk/WXd cXQg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=JP+YS6ejRWlD2Krsjn2TbLGBEkb2OTC4oV4N+BBFkik=; fh=w1XT2Uxmr9KBDx/GKV+mqUrcmMJZpLeeqrDbZBbHG1o=; b=FLCfCIs0O9o4gKEFfIqSSjfQHbp62wBWJjXKJYGPmusQ2dhMMGCMID0E7qljdoZSes zN230GBNa0fTrPQrqrMQpRKXXtuRuD9tLsTR9qWnL/1RU42FlNnT9NvM94Ejw6hR+6FY WPk2qC2mxs2IlKRxkPMAUpx6jpBgc5ckR31jMwbOVxrSz5WZnTENVXHYbJhbHCrMyzWR NA2j3LGx3AZnLvqkoUr9gfTL4Y8nWvdBAc6qWt98HGuA1eFx/VcYW3B5/t0GMAOyzWyH pXsPu3o3YMCuDtlF6phveOID929R+bKx6LJdVBMNMN0wT/LT4gv9vG+oGZIPtbdgp0aT svog==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BZWx2BDN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-173194-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173194-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id hu21-20020a056a00699500b006f44bf08609si10673781pfb.251.2024.05.08.05.03.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 05:03:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173194-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=@kernel.org header.s=k20201202 header.b=BZWx2BDN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-173194-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173194-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 790DB280C69 for ; Wed, 8 May 2024 12:03:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DD09E839E4; Wed, 8 May 2024 12:03:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BZWx2BDN" 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 0E776763EE; Wed, 8 May 2024 12:03:31 +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=1715169812; cv=none; b=oiOyXpCQ9nMoatRHR95rVrQqf9hSxC3gbOpFN2GEZ61f0MBb0pVlR8saTHWUjIohgO7jqwK7fhnxTZJ00fANwe+lkU5WPVeHSuN2hipYEtmiXy+1v8BwvMqSbjgIrI1SMaMNqJyq4HX9Ou5IKAfNLd2EnBBX1ypKuWZls3w0gA0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715169812; c=relaxed/simple; bh=G9vm+y/3FxBulEcuUPrj6ofZoJWbJ5SV0hHmxRZA87U=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=J95JzmAW4BbrBNDdhbX1bv9lHEkgfBifNIlK9Gd3mpvuU+J1dfwG9/wbOArok49nmBGbCjLX5HVrYKwsW1tjiCJM0H2FquTdCQrcIRjUvnG9P5A+HpX+Bjc+PY5DWJXgjdxbGqAVa8HEfmpIOTEj8x+3pABcnzy9pQqAqY0T1F8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BZWx2BDN; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA8F5C113CC; Wed, 8 May 2024 12:03:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715169811; bh=G9vm+y/3FxBulEcuUPrj6ofZoJWbJ5SV0hHmxRZA87U=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=BZWx2BDNuhSR9OsO+3SJcTV7pV9P1fO+kinZHWICmTNRtmAYWq73ovjdA4bIb21NH s5GySs2J0tEgS3Wf439eEtu1p6eFNdiOO6Hp8OcYPhlf2ZkGyOBxRxLzGwNPj404Se S8Uq9Rd2XcsVwYKcOJ06zaGuCQDvK6x+m/BApNJ0+c/7hrksq3ic7e7Hs4qO9pPLeX LOsePl2BZLvArEHnBf45Kooh2eI4+y4Y750ZgSUYzm3Pz2uNDtwxvj8bjVnC+A1OsU tWZiQgkRFqL/2UwRKrDHF1AVCoo1paaogKzAeeL+vuOsmxUFwtoyHUmBsqQF5bYoHZ 81NKfvs7GfP3Q== Message-ID: <2e19a254-58d2-4c27-9c34-2662827ea505@kernel.org> Date: Wed, 8 May 2024 15:03:26 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/3] arm64: dts: ti: k3-j722s-evm: Update USB0 and USB1 configuration for EVM To: Ravi Gunasekaran , nm@ti.com, vigneshr@ti.com Cc: kristo@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, srk@ti.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240429120932.11456-1-r-gunasekaran@ti.com> <20240429120932.11456-4-r-gunasekaran@ti.com> Content-Language: en-US From: Roger Quadros In-Reply-To: <20240429120932.11456-4-r-gunasekaran@ti.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 29/04/2024 15:09, 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; > }; > > 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"; This line-name is already added in gpio-line-names property above. Do we really need to add it again? > + }; > }; > }; > > @@ -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 */ -- cheers, -roger