Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp996420lqh; Sat, 1 Jun 2024 05:17:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWwqnfInthYcBtdgKUN6ClXvtSFOWYGsr4SWZg1vwNy06fn/1xJCvPE4I2o6XYVdiSCz17F6p4QHeZm+5v1aDypQaG6DhO9j5VS6CIxfg== X-Google-Smtp-Source: AGHT+IGxF+pQf7Q02gV0tvIsJYj9FJvG6BI2BlFo1HJt2anxYkJFRK3rgJoz1YeXTlsCC60Ayihy X-Received: by 2002:a05:6214:3d0f:b0:6ab:8c77:d3e1 with SMTP id 6a1803df08f44-6aecd700330mr45894956d6.58.1717244276965; Sat, 01 Jun 2024 05:17:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717244276; cv=pass; d=google.com; s=arc-20160816; b=gTwVCIUF1eQ/9TuhXuNfGDnvprewPUSyEJFjqz8Db/DtETgt4N3ng3pP5RrcEztvFm w6z/USw5SuKDSMAJixfebJzqx4NHfnwYLm0n8MAYgfNhzSTifAKybVEdn0CXSx0agh7j ht7fNfQtyjplvtHoybXUnzXDLCSU9bab3Kf2yLh2bZCd6TyhySxBFxDjiNTXT3ph39HY BgnhUsgVKIT/4b0TJSfE21lTweEVVETXMwrWDrCBiG/6bngr3dI07veY8vK38G4ShUql FHSPjVIbsGsrx0MfKTwnRR4nM4rS8NNuzpv2HHWtlUiVo3owF98mG3fKP7SpyDwa53b4 5e8Q== 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=8B8UAkBYxOJZjWDsFXMi5T9OfURc8ZbfCGJJV5hjsLM=; fh=v0teqksL3xO+SLXxmXdn9hV0IgnSHmLX2R1lVYr4iek=; b=Qju4oK1TlTHm1UliUSfZGpzi03SIQM0f0sg9+Z/B+HhvRoDT3+0gWgsu5HaJo4kR45 Sdo1IxVdjo2UHZF7AJPXoT4R8vK2NdVxlcFx6oLl6n14xD1xt+AQi0jDY/7Cre96y6Ty GKVoOxC0uBhqGO0/eaOfp9Jb23NNqfRR+Pkvmt3jRDRF2th7VPd2u9Tey1hcLlx1ubRo qTXPPurUNyqfJ4f16Qs/3gmn8Kcr4KmX5oVUA5+tmamTwgn3O5ZXocyqCuEDYq1UEtJb hvmIGY6JXmTTW44yqgIXccYzK1k4xEL/h0Ytm6epcAYmmyQUNOPdY9cU84UFjp8ySqde R2/g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=d6BDR0Re; 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-197834-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197834-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4b42b85esi42582156d6.494.2024.06.01.05.17.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 05:17:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197834-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=d6BDR0Re; 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-197834-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197834-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D98071C217CC for ; Sat, 1 Jun 2024 12:17:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 762E2152DF7; Sat, 1 Jun 2024 12:16:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="d6BDR0Re" 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 1F19C14F9CA; Sat, 1 Jun 2024 12:16:36 +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=1717244198; cv=none; b=YIzONn0ryl/Wq//fF6v8RzJ1G/AC9Lg3B8W5n+dUT3zNyTW939uSwgFPOOnp7lwxI2uP/9rbKibH0/gi3Z6cGEgVVFws1VX9NG3eyCRlzZxvsP3vRK8thmbtrRW6D+Lz1kHn/5ukgMf9XwYaGCDahR+F+sNgjVfHyXFZtteZdHc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717244198; c=relaxed/simple; bh=13mmVT1PUQiOftL33hsOPpELQyZBLcyyM2rYl9byZjg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=M6M0n7zw+pfgu/gT599dcw0tdoYLFHn7NaHT+sn6bElwIM5TufvVBZWvsP5TsyRADMMckj8+y5ywoop4hr4myWIWqxZl3GkjlkOX9T0ycdtLr+FQRKX1ukVvo597VtBBnkPFzLixIZAvJez9DWyyCK2EF6TKvU0BoZUHN4iutIw= 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=d6BDR0Re; 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 451CGUO1120010; Sat, 1 Jun 2024 07:16:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717244190; bh=8B8UAkBYxOJZjWDsFXMi5T9OfURc8ZbfCGJJV5hjsLM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=d6BDR0RevKQIQ3oKPmKZvvBHVq6ZNGtpCb7C57SGGpHwZFrWb2SNKShGWwAbrssZ+ 3yRV2WfOmo5h5ILrFz1Hqhr5T4JjQBFVhbSPgAG+5C2jp3z4oRK/lrs1+wEdo9z+EI qQnPudTq9FZ+FuNKu3L0LNBxS4zC2wPJWb+DKa9U= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 451CGUWi019930 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 1 Jun 2024 07:16:30 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Sat, 1 Jun 2024 07:16:30 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE108.ent.ti.com (10.64.6.29) 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, 1 Jun 2024 07:16:30 -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 451CFtkL009323; Sat, 1 Jun 2024 07:16:26 -0500 From: Siddharth Vadapalli To: , , , , , , , CC: , , , , , , Subject: [PATCH v4 7/7] arm64: dts: ti: k3-j722s: Enable PCIe and USB support on J722S-EVM Date: Sat, 1 Jun 2024 17:45:54 +0530 Message-ID: <20240601121554.2860403-8-s-vadapalli@ti.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240601121554.2860403-1-s-vadapalli@ti.com> References: <20240601121554.2860403-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 --- v3: https://lore.kernel.org/r/20240524090514.152727-4-s-vadapalli@ti.com/ and https://lore.kernel.org/r/20240524090514.152727-8-s-vadapalli@ti.com/ Changes since v3: - Above patches have been squashed into this patch. arch/arm64/boot/dts/ti/k3-j722s-evm.dts | 72 +++++++++++++++++++++++++ 1 file changed, 72 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..3145e680e2d3 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,60 @@ &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 { + serdes1_pcie_link: phy@0 { + reg = <0>; + cdns,num-lanes = <1>; + #phy-cells = <0>; + cdns,phy-type = ; + resets = <&serdes_wiz1 1>; + }; +}; + +&pcie0_rc { + status = "okay"; + reset-gpios = <&exp1 18 GPIO_ACTIVE_HIGH>; + phys = <&serdes1_pcie_link>; + phy-names = "pcie-phy"; +}; + +&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