From patchwork Sun Jan 22 12:21:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Achal Verma X-Patchwork-Id: 46944 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1131776wrn; Sun, 22 Jan 2023 04:33:51 -0800 (PST) X-Google-Smtp-Source: AMrXdXvpDDQw5/FzvRv5n9J1A0s7i7Vh1ylyhPGEIqE1ql35LHQBvSNu/2x+Hox2HKmtWAhQ6y5K X-Received: by 2002:a17:906:3a4d:b0:873:393f:1bda with SMTP id a13-20020a1709063a4d00b00873393f1bdamr18838660ejf.47.1674390831694; Sun, 22 Jan 2023 04:33:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674390831; cv=none; d=google.com; s=arc-20160816; b=HKvA9YevfPcHRQp5lsgNNCB5Ll6mzfmAGZDiZUIoI+wodPZhdE5Jv3qSofjXXIIVG1 i9Gc6K2o75tNO//Rvoz79cbvcu969C2eaia6ojwD0zb11KAwQoqfdg8piltiWy61L3Rb f3N0qtomb5j5M/zGEmL0T6P2mPzTHJHyGRGmwY0pAqiMtwAYoac2PmDRRtXzLA04qzZ/ UYP4nmcatX8/z9YuHpesNYLD2tRm8h6L6KlwDQlHvSNJBCwxjfmxYkCf3UlWta6MIvN+ K1RKkO5y7lWbvY2nCTa2BRhArq+kllwOyOeDTPRwB0TH1kd6RejVEuym/6blSU3W72fW Dpew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GGrsVB2NuWgQ/IDsTg782FJLIK98IZjp/7pCe7Mspxs=; b=r0zVZANAoKsrXGJ+c1dW72RLnkAl8ZOr2wB4hUJYqOxvvD6BcsIJjynyGTZ9xKm2UL tKjdEMixA3th3JQ+/dsV23VZH20OFiVIwPFXJSOM1JsyKR0UA7RIDaoDDPsWZdXgvwoj UU8DAmfif2WbBBWrDQ2UveZDwHjX5CKA+L4mrwUdVqpt5O2sNTn0UFA3OWysABCrvz+2 dqHT4gDNJfMUjQdi2GskFMM7AyJi1iPnRi/6YEkTCykWjShB8s51giowTA28gw44W3Dv yKHPWaBEdhMHlHtutzSV1sLbzHl/4nvcVZfS1NP/KICx+XPxgo2DhF6aLotlC4qk73Rf 7AGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=f8nmQIrq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dr5-20020a170907720500b008327270a7ffsi19771234ejc.663.2023.01.22.04.33.28; Sun, 22 Jan 2023 04:33:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=f8nmQIrq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229644AbjAVMWD (ORCPT + 99 others); Sun, 22 Jan 2023 07:22:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229949AbjAVMWC (ORCPT ); Sun, 22 Jan 2023 07:22:02 -0500 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F7729EC9; Sun, 22 Jan 2023 04:21:49 -0800 (PST) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 30MCLU4M118101; Sun, 22 Jan 2023 06:21:30 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1674390090; bh=GGrsVB2NuWgQ/IDsTg782FJLIK98IZjp/7pCe7Mspxs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=f8nmQIrqBKxewIRmuG39303yaIZlvaG4IBCqtSupTJUVDW4zlzAuHK1OUtgHpa4XC UrkVBa+7eu28+hSU/uLOEvdR2gUmXAu1ia7smVQmxTgPWOUVZHhMBCJJUxe2lOzrfd IRPbwymuDn/DLl2BIPVhfsk0K32cyR6GAYCCu6eM= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 30MCLUUA102341 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 22 Jan 2023 06:21:30 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Sun, 22 Jan 2023 06:21:30 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Sun, 22 Jan 2023 06:21:30 -0600 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 30MCLTIJ008319; Sun, 22 Jan 2023 06:21:29 -0600 From: Achal Verma To: , , , , , , , , , , , CC: , , , Subject: [PATCH v9 5/5] PCI: j721e: add j784s4 PCIe configuration Date: Sun, 22 Jan 2023 17:51:21 +0530 Message-ID: <20230122122121.3552375-6-a-verma1@ti.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230122122121.3552375-1-a-verma1@ti.com> References: <20230122122121.3552375-1-a-verma1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755726041150974298?= X-GMAIL-MSGID: =?utf-8?q?1755726041150974298?= From: Matt Ranostay Add PCIe configuration for j784s4 platform which has 4x lane support. Tested-by: Achal Verma Signed-off-by: Matt Ranostay Reviewed-by: Roger Quadros Signed-off-by: Achal Verma --- drivers/pci/controller/cadence/pci-j721e.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/controller/cadence/pci-j721e.c index 58dcac9021e4..cce7b391f931 100644 --- a/drivers/pci/controller/cadence/pci-j721e.c +++ b/drivers/pci/controller/cadence/pci-j721e.c @@ -330,6 +330,20 @@ 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, + .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", @@ -355,6 +369,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, + }, {}, };