Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1267297lqs; Sat, 15 Jun 2024 01:28:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWrvrv2ikqbNqJI1K3LmqzMOq0yuRyr4w5MU9IAd7mP9tNbIT6U/K6LVbNM/e1+LRVM6LeVsNGCxoIMJXk2NdoKQ4J4tz6D5UlRqpjuAA== X-Google-Smtp-Source: AGHT+IEYTgbPu4JVYCg8wGth6MfTeOF1PO5OOBSmfUkuyQNY8QO0b0/9DNJPAf1cAfz6HcC4mWFE X-Received: by 2002:a17:906:2544:b0:a6e:f91f:672c with SMTP id a640c23a62f3a-a6f60d20eedmr276532666b.25.1718440096589; Sat, 15 Jun 2024 01:28:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718440096; cv=pass; d=google.com; s=arc-20160816; b=RmBTFQfnAoJSge83gWy4UkpjOUIWBjhRhFhqBk0qPDAbKW/wDQ1aTd5aE7Rr50u//X cqFAaTocnmKNa++jAkoV1rNZ4W74iqCtsLrCOyj9b4VbVWMDqW2H+J1EKJ3uFcqxGrgj saqzfi3iDZPcWQVv4EC/2p/iXdLK6cYc2hBHrenvtdygj236cUbapQOgD9sOnUQYWgp0 QgcL9LpFIKRcyEv41yjuU6ULXiEeG/eAb1jMtvj2Y5c8iTnF18yrE8PwcNcfnw2gvSm5 3b9614P4aFEvDXtq4ngCqTI+XZimLaYPvJ6zeaPUQdtE7/6OWySctOR5f8puYF4Oilyh XDJw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=0ziaYmVur7op8ucU8cI+8HtuOL9QhJ+JrBtiZA7l/Tc=; fh=v0teqksL3xO+SLXxmXdn9hV0IgnSHmLX2R1lVYr4iek=; b=ixB+lZn+iBbAudxcuKKsbPWHEh+t6xG90wPdrQAD4FFLrZ+AQuPCFMFur6J2sUrNbF a2tg72xWwJwZj2ZRWRfsu8HF9gtuTDA7IrOU9YcSFEOg1a9edf5/cIa46qAzFYdrWbbc tbaiVBD4sZsCvEjVntXanugSvXiq027mMb3eqHyzMFuL2x57HhlArO+lD3zHxSSkCD6i oj1mUqGCD6a29jtNy13fjsIgBkONPvUa8AmdJo+AI/QZg4HSgp0vMCICrets0lOdo25E Sv715jYnIEk7l8LhxKv1maVBxAUI7qGIM2etRMv08XlNf6s2Ipf7MOgPmFprWLUASdae Y91Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=LnfcB8dD; 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-215776-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215776-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56e3c9e7si254264066b.876.2024.06.15.01.28.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jun 2024 01:28:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215776-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=LnfcB8dD; 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-215776-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215776-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 30C2F1F24C8F for ; Sat, 15 Jun 2024 08:18:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 30E943BBE1; Sat, 15 Jun 2024 08:16:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="LnfcB8dD" Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (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 B0A3E38FA6; Sat, 15 Jun 2024 08:16:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.142 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718439404; cv=none; b=mI74GdWBk5vMJE1jm9pxvfM3+NdyhNgHDNLwvcjxPhgP0+afklZRvzdY1yh+rvYUssoHGXL7ngP0OT3ChEKJv7BksU0808EapoqMzP7cEqyKpKTnDsI01HxSQMW6JeCqGOz3yEsldu5YOKKyskxIS6dXcSIvdlic5GEIDegxUfE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718439404; c=relaxed/simple; bh=GqCy1N7LPlfYFJC+vQSN8ssTCTCSuhS/hzfY8qUe+hs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nOAWvj2/Tfxfb9YytKtqBdEsYctwRfpMhy1OvnplhwdWg1sr8pv/u9+veHiWRHFW/d/apr7RBFjsDgq/Al8j4i/h1oDZvlibsBQbqisk8FYRjr3gYYEJbRgsSrBYZxupBhNjyjY+eo9j8BFv9S6vx/HriqDqufnZ4/FDiJcNJxw= 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=LnfcB8dD; arc=none smtp.client-ip=198.47.19.142 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 fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 45F8Gan8102762; Sat, 15 Jun 2024 03:16:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1718439396; bh=0ziaYmVur7op8ucU8cI+8HtuOL9QhJ+JrBtiZA7l/Tc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=LnfcB8dDm4KcFjS4NxnGDHaC92gT7yGH9msHSQAIFItTJXX4AxggZmpgKC3tS5CET ZoSyk/R8fW4ORwC01z4jGHrwSC+OObF6sA2fxJBfthj5pdFsr4aYdd5watXNvjrGhs dKUi+dlelScwLuW2sjnwG2BMJGMUgadELh8ufBfA= Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 45F8Gamt032382 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 15 Jun 2024 03:16:36 -0500 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Sat, 15 Jun 2024 03:16:36 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE110.ent.ti.com (157.170.170.21) 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; Sat, 15 Jun 2024 03:16:36 -0500 Received: from uda0492258.dhcp.ti.com (uda0492258.dhcp.ti.com [172.24.227.9]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 45F8G1Qb024463; Sat, 15 Jun 2024 03:16:32 -0500 From: Siddharth Vadapalli To: , , , , , , , CC: , , , , , , Subject: [PATCH v7 7/8] arm64: dts: ti: k3-j722s: Enable PCIe and USB support on J722S-EVM Date: Sat, 15 Jun 2024 13:45:59 +0530 Message-ID: <20240615081600.3602462-8-s-vadapalli@ti.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240615081600.3602462-1-s-vadapalli@ti.com> References: <20240615081600.3602462-1-s-vadapalli@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Enable PCIe0 instance of PCIe in Root Complex mode of operation with Lane 0 of the SERDES1 instance of SERDES. Also enable USB0 instance of USB to interface with the Type-C port via the USB hub, by configuring the pin P05 of the GPIO expander on the EVM. Enable USB1 instance of USB in SuperSpeed mode of operation with Lane 0 of the SERDES0 instance of SERDES. Co-developed-by: Ravi Gunasekaran Signed-off-by: Ravi Gunasekaran Signed-off-by: Siddharth Vadapalli Acked-by: Roger Quadros --- v6: https://lore.kernel.org/r/20240612132409.2477888-9-s-vadapalli@ti.com/ No changes since v6. arch/arm64/boot/dts/ti/k3-j722s-evm.dts | 73 +++++++++++++++++++++++++ 1 file changed, 73 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..253b02f0437d 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(0x0130, PIN_OUTPUT, 0) /* (AG26) RGMII1_TXC */ 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 @@ exp1: gpio@23 { "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_HIGH>; + output-high; + }; }; }; @@ -384,3 +399,61 @@ &sdhci1 { status = "okay"; bootph-all; }; + +&serdes_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>; + }; +}; + +&serdes1 { + status = "okay"; + serdes1_pcie_link: phy@0 { + reg = <0>; + cdns,num-lanes = <1>; + #phy-cells = <0>; + cdns,phy-type = ; + resets = <&serdes_wiz1 1>; + }; +}; + +&pcie0_rc { + reset-gpios = <&exp1 18 GPIO_ACTIVE_HIGH>; + phys = <&serdes1_pcie_link>; + phy-names = "pcie-phy"; + status = "okay"; +}; + +&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"; +}; -- 2.40.1