From patchwork Wed May 29 08:22:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddharth Vadapalli X-Patchwork-Id: 13678316 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7AF30C25B75 for ; Wed, 29 May 2024 08:24:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EIiZqdu5ShcyBHb3FiLt4ePFIH+omHMooZ+oH7Qw8k4=; b=msVHzASu8bWG7r 9aeXzbSKKD2AVgfHLUKxS5CbfgR+QuFji5lhj9J6b5qVf6BGbMoG6+6XHzwDuV4yLasr5N/YSw8eE jV6EmmLmb5varGc0V+83DrfVd4s57TqNfwiOo6kQh6MyX5ooKgYlMgpAPwyJE5Skrm2MtFkjVY6G/ mLxkaHa9OF7CCcnpzj8yVfKzRvRHZxdKyaC9/i/yIRgo4gXNmTF0M4SHcf5I+X7H0KltHHJzC5MTr DkutAwCovyVfh2dsOnv/Dq2eaQrw3z9zwvMmTPAcUH8DrSNvxb0gqmJmWVlZ0Li85urDop05rpEwq dJ6aduUrb7si0lxUqDHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCEbI-00000003Mpz-280h; Wed, 29 May 2024 08:24:00 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCEal-00000003MZ4-3dFd for linux-arm-kernel@lists.infradead.org; Wed, 29 May 2024 08:23:30 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44T8NNQ1028215; Wed, 29 May 2024 03:23:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1716971003; bh=rFJvQzV8kqV3Z6+ZhkYla/WZjye7srpWKlW2xEYN7Qo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=D/NZDMyhhSJ3tgw4sy/+yBO1P3gGeEumdVMXLivRjTa2GN2jQF9M8ATi3SCB1nnSw 5mBzq5+VUi95IkryojrQSdNQWh8bGu3nzxpE5Q6XthwBEZSRQrYbA1XbRGHB1g7WjF f+E3fSrqjbVpK3bcVRN4rKhwW1HfA7sq0nwKWPHY= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44T8NN7s002842 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 29 May 2024 03:23:23 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 29 May 2024 03:23:22 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) 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 via Frontend Transport; Wed, 29 May 2024 03:23:22 -0500 Received: from uda0492258.dhcp.ti.com (uda0492258.dhcp.ti.com [172.24.227.9]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44T8N0dA084708; Wed, 29 May 2024 03:23:18 -0500 From: Siddharth Vadapalli To: , , , , , , CC: , , , , , , , Subject: [PATCH v4 4/4] arm64: dts: ti: k3-am69-sk: Add PCIe support Date: Wed, 29 May 2024 13:52:59 +0530 Message-ID: <20240529082259.1619695-5-s-vadapalli@ti.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240529082259.1619695-1-s-vadapalli@ti.com> References: <20240529082259.1619695-1-s-vadapalli@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240529_012328_025696_F6D81EB3 X-CRM114-Status: GOOD ( 11.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Dasnavis Sabiya The AM69-SK board has 3 instances of PCIe namely PCIe0, PCIe1 and PCIe3. The x4 PCIe0 instance is connected to a Card Edge connector via SERDES1. The x2 PCIe1 instance is connected to an M.2 M Key connector via SERDES0. The x1 PCIe3 instance is connected to an M.2 E Key connector via SERDES0. Add device-tree support for enabling all 3 PCIe instances in Root-Complex mode of operation. Signed-off-by: Dasnavis Sabiya Signed-off-by: Siddharth Vadapalli --- This patch has been added newly in this series. arch/arm64/boot/dts/ti/k3-am69-sk.dts | 60 +++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am69-sk.dts b/arch/arm64/boot/dts/ti/k3-am69-sk.dts index d88651c297a2..14c359d810d7 100644 --- a/arch/arm64/boot/dts/ti/k3-am69-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am69-sk.dts @@ -1203,3 +1203,63 @@ partition@3fc0000 { }; }; }; + +&serdes_ln_ctrl { + idle-states = , , + , , + , , + , ; +}; + +&serdes_wiz0 { + status = "okay"; +}; + +&serdes0 { + status = "okay"; + serdes0_pcie_link: phy@0 { + reg = <0>; + cdns,num-lanes = <3>; + #phy-cells = <0>; + cdns,phy-type = ; + resets = <&serdes_wiz0 1>, <&serdes_wiz0 2>, <&serdes_wiz0 3>; + }; +}; + +&serdes_wiz1 { + status = "okay"; +}; + +&serdes1 { + status = "okay"; + serdes1_pcie_link: phy@0 { + reg = <0>; + cdns,num-lanes = <4>; + #phy-cells = <0>; + cdns,phy-type = ; + resets = <&serdes_wiz1 1>, <&serdes_wiz1 2>, <&serdes_wiz1 3>, <&serdes_wiz1 4>; + }; +}; + +&pcie0_rc { + status = "okay"; + reset-gpios = <&exp1 4 GPIO_ACTIVE_HIGH>; + phys = <&serdes1_pcie_link>; + phy-names = "pcie-phy"; +}; + +&pcie1_rc { + status = "okay"; + reset-gpios = <&exp1 5 GPIO_ACTIVE_HIGH>; + phys = <&serdes0_pcie_link>; + phy-names = "pcie-phy"; + num-lanes = <2>; +}; + +&pcie3_rc { + status = "okay"; + reset-gpios = <&exp1 6 GPIO_ACTIVE_HIGH>; + phys = <&serdes0_pcie_link>; + phy-names = "pcie-phy"; + num-lanes = <1>; +};