Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp442498lqp; Wed, 12 Jun 2024 06:29:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX+8tciR5hhNECLnLCl6e/lA7hP8rHKiG1pTDKETdTRYhwDW/+xfp0A8U2CarxzSr3PqMc/sFnRmSZWY/PQoOQLK0uJhSG4HFj7fk5yRA== X-Google-Smtp-Source: AGHT+IFnPSei0ujx2t/F9nDJ0Zqyl4iMnc74zrSsFEEJ36KYvrWL/umtbNgjuE9qV2wQ+AOgSEJc X-Received: by 2002:a05:6e02:1c8a:b0:375:a15e:d260 with SMTP id e9e14a558f8ab-375cd120e1dmr19958205ab.7.1718198949341; Wed, 12 Jun 2024 06:29:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718198949; cv=pass; d=google.com; s=arc-20160816; b=feA6nrl7MPSUInB3HjR94ppkGjuejckCmVYnVT4JLTIUm7szvY4NxG6DwFCNheevBF Our0UUdjhU7+2xoRZoc3VgqcBvp4IRwcHaz80larJbUqG9NM60brP6sUt0rlTOPkpf2q aUJF4rX+479PFCNtb44z24UFSry4w9ktS3infeOpYjhdVSLALitKFgjqtjhcvpQVyVil q04hiFoqw4pe/smGCqSaSbQH78v1YRIVLqSi7K0X+yzA93GbvvMVEIVVx6syaYAJJUfB YQjG/vnc9CD6qqbelWmFAbdz4HHdriO78sHRYqmxFcJstz9ioGpiPy1tnkTlXM8OqiuW 3GpA== 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=w9gp9P44R9xsyv4UKTJqmc7QxN/dMZhqt9ukCqRVI7A=; fh=v0teqksL3xO+SLXxmXdn9hV0IgnSHmLX2R1lVYr4iek=; b=LxyTGhLzOrancpiMNeLNCc+iT24fEkD2GDIQswrjq5YG9ZOiZZhw+dVpX6fXjKo7Z7 BxbYZEbp63Ux29G4BA6v7beOTZv6eHeoDPiu8DsYmWCGygyL/zeZ1jifCGx/lCtR+zO6 BohJrx9JiF4aRWpY6YLPG3/PDlqilhWjifGyOoUa6SjZs4T3h6uTtKTEOc+RuuU1zbRF gbljyvUjjP2MlUH9rnmzOeHMpsCpuh6gUc7C0r/LDBlFpZEKxY0QhECvdYu6gQHup5u9 LPcD6iQ4Cy0lhCYFarfNU3LhX1W8PZOteYP9uIoAseMY9X01b4fiViqtUHX2sG6ScHkf ydyw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=qqpxEutQ; 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-211562-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211562-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de27606410si7511880a12.543.2024.06.12.06.29.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 06:29:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211562-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=qqpxEutQ; 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-211562-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211562-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 4EF89B220FA for ; Wed, 12 Jun 2024 13:26:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8E11617D894; Wed, 12 Jun 2024 13:25:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="qqpxEutQ" 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 291DC17D37E; Wed, 12 Jun 2024 13:24:57 +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=1718198699; cv=none; b=UewIw9NzYiCZNIui6D2sr3Rm7cz+Q/fIhOha0O/LomXhlkjwxHLrOrKEXW4FBlyWKE7ldfe3pyGVcqTKFJDgo7vV+YXQTwoKh2jzXAUJ6hrV0AdRnixVUT95twc9m4EUbd65TIjubF2+kGSEWE8acB8ZMuOJZJTJDhx7LePPysE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718198699; c=relaxed/simple; bh=u7cOhAUlcCLOtHvuKlvu2uyBSo9uHR1KkshWdVt+35g=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=B4nzqtohDVfaT0+WGcqRNylX8lUDYyaVZSPR5LH5T49yqSxGOoos+CXJGw/FzO/GPoyeZtgyle4bj9ZjqeEMp1deliQcfJcTzlNXaVBH91jangCAQ/v0xxnIiuuaajx5163TavU33fFtEBjw64DYmBsqx5lN/J9uBu1CJ12GVj0= 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=qqpxEutQ; 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 lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 45CDOoVb058171; Wed, 12 Jun 2024 08:24:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1718198690; bh=w9gp9P44R9xsyv4UKTJqmc7QxN/dMZhqt9ukCqRVI7A=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=qqpxEutQPFnbXY/odu7WQ+03wWbpmiA9XEQ4PoVsrfVZItENIYrWMEdoeCS6ERI97 UJFKUVVSsbSMiV2aX80nmZO4HfVnNeIHmLjmtgI/Il6DILbFIeMEKDubhsB6jcvV5U zDSlqbmijaEg2LmiL+dyqeHAziyBc6OV/lR20orI= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 45CDOo4E094739 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Jun 2024 08:24:50 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 12 Jun 2024 08:24:50 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE101.ent.ti.com (157.170.170.31) 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; Wed, 12 Jun 2024 08:24:49 -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 45CDOAn0046478; Wed, 12 Jun 2024 08:24:46 -0500 From: Siddharth Vadapalli To: , , , , , , , CC: , , , , , , Subject: [PATCH v6 8/8] arm64: dts: ti: k3-j722s: Enable PCIe and USB support on J722S-EVM Date: Wed, 12 Jun 2024 18:54:09 +0530 Message-ID: <20240612132409.2477888-9-s-vadapalli@ti.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240612132409.2477888-1-s-vadapalli@ti.com> References: <20240612132409.2477888-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 --- v5: https://lore.kernel.org/r/20240604085252.3686037-7-s-vadapalli@ti.com/ Changes since v5: - Collected Acked-by tag from Roger Quadros 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