From patchwork Wed Nov 9 08:25:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Ranostay X-Patchwork-Id: 13037249 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 911CEC433FE for ; Wed, 9 Nov 2022 08:27:34 +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=2Ew4cIGcuLZ+3CW4mxJ/tcGWUmK9xh032+cAUtlvwqA=; b=4e+zDb2T7paluF eJ6uPI72qGR3J+CKvai2Tl/HLxAy0RSTY7i7DQRsxMFXVqGRW2uYxMwLelOPVd7KUej8obe7YGUp4 8yYunPfNq2eW1C1eqKfT0lbpfeK83anAnvoU/KYrRXdSdBfrtTLoU5b2ENohn1+5yeRQJwYwiv49W iO5Em4szzuRahcCZsFWGlShxwn7JeLa3QieNDVI1QQI8ioxggIUYgDYb3WdR1Nt+hgqmEIaHmjDPc beA//5Wg6tQpLx9T2U89JlFVrW2hEB2h4LgdH0dpDzDEawm8ZPYIfx4jy2ZFfb7ZgLmjsXTVGZqCN w4XK3bfNlUjcIggzvUoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1osgPs-00Bsmt-39; Wed, 09 Nov 2022 08:26:36 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1osgPd-00BsjD-Pj for linux-arm-kernel@lists.infradead.org; Wed, 09 Nov 2022 08:26:23 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2A98QFnK114737; Wed, 9 Nov 2022 02:26:15 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1667982375; bh=5ZlAY8ts28/UA0TeHdRhIaPWxIjinl+puEaqQc+L5Ho=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=OsDPme+dL4gPId7v6YNyNU4k+z03LmV8ugvsXqGobA+USVKWIU7p05mlJY/3F3gA4 Kah/xcoOuBxTO5OOkEn9F1Qzw8YULRu6WtMO3wyEbj2lWvFLExzkuUrrAy1L/c+YPc qiX9MBXZsXY0LEc+1mmB3nNmQPm7+V9qSTJrJEes= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2A98QF0U039216 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 9 Nov 2022 02:26:15 -0600 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6; Wed, 9 Nov 2022 02:26:15 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6 via Frontend Transport; Wed, 9 Nov 2022 02:26:15 -0600 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 2A98QCO7039374; Wed, 9 Nov 2022 02:26:14 -0600 From: Matt Ranostay To: , , , , CC: , , Matt Ranostay , Achal Verma Subject: [PATCH v5 3/4] PCI: j721e: add j784s4 PCIe configuration Date: Wed, 9 Nov 2022 00:25:55 -0800 Message-ID: <20221109082556.29265-4-mranostay@ti.com> X-Mailer: git-send-email 2.38.GIT In-Reply-To: <20221109082556.29265-1-mranostay@ti.com> References: <20221109082556.29265-1-mranostay@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-20221109_002621_941690_892613B6 X-CRM114-Status: GOOD ( 10.11 ) 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 Add PCIe configuration for j784s4 platform which has 4x lane support. Tested-by: Achal Verma Signed-off-by: Matt Ranostay --- drivers/pci/controller/cadence/pci-j721e.c | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/controller/cadence/pci-j721e.c index efd065bc0104..83b8100afaff 100644 --- a/drivers/pci/controller/cadence/pci-j721e.c +++ b/drivers/pci/controller/cadence/pci-j721e.c @@ -331,6 +331,21 @@ static const struct j721e_pcie_data am64_pcie_ep_data = { .max_lanes = 1, }; +static const struct j721e_pcie_data j784s4_pcie_rc_data = { + .mode = PCI_MODE_RC, + .quirk_retrain_flag = true, + .is_intc_v1 = true, + .byte_access_allowed = false, + .linkdown_irq_regfield = LINK_DOWN, + .max_lanes = 4, +}; + +static const struct j721e_pcie_data j784s4_pcie_ep_data = { + .mode = PCI_MODE_EP, + .linkdown_irq_regfield = LINK_DOWN, + .max_lanes = 4, +}; + static const struct of_device_id of_j721e_pcie_match[] = { { .compatible = "ti,j721e-pcie-host", @@ -356,6 +371,14 @@ static const struct of_device_id of_j721e_pcie_match[] = { .compatible = "ti,am64-pcie-ep", .data = &am64_pcie_ep_data, }, + { + .compatible = "ti,j784s4-pcie-host", + .data = &j784s4_pcie_rc_data, + }, + { + .compatible = "ti,j784s4-pcie-ep", + .data = &j784s4_pcie_ep_data, + }, {}, };