From patchwork Wed Jan 18 12:59:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Achal Verma X-Patchwork-Id: 45282 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2341069wrn; Wed, 18 Jan 2023 05:38:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXtpU0pCgy0xUzvaMfE1lgaNtUQ+ADqj3PliPYJzwTx4kc7QYzon73YrEE/44EQ4Cdz655+4 X-Received: by 2002:a17:907:d606:b0:86f:b541:cd02 with SMTP id wd6-20020a170907d60600b0086fb541cd02mr8182443ejc.28.1674049107119; Wed, 18 Jan 2023 05:38:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674049107; cv=none; d=google.com; s=arc-20160816; b=fhXXb1INub5uB62Mt+EnUHxveo3OHDXz4NZy8bDZ8LgfJBZw5jgycJopYMfHqflgFf OYr1pFPFb2ty7d5aIweNArjS8rJPCYod7xTxk0yzA4SgDkWbeJePANj/M2nTdMqXfFXp AYTLqAD+irRjEiEIzFDl512rLAG+xlVKkfUqIk3XvECEItxDt4lM4qx9eN3HVcCWO0JT az/q871JYlfmETpyc4U+3BbR9CJoDZlak8D6NmuxuJyjgH+YU7kChqmx8Ik9Z2tPF73S Q7d2b9a9L5WkDKkbSliw2Zr07Bd4kIuVEv0IHKQX8rJ7im+jQfUmrKL5Icz3X8rRTHVy qP2A== 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=HikkTogplLNoxciGnDpCA7y+uTGLjkDq+gkT3YAOSg202U9q7MvapdADmG1ZX7bqQv P5lNDzpzE6wlipXEQPRuT9iNv7UOG2GF3144ctQ6RLHufjlPtXY5HUGr7DRtepF02utD bQ7410HH2Ic6/7WbGirhUdrTxEkJ+sHt3XL8IAnebtGrFhCuO89QYCY+yC45iVaPzBhb ZDIv5sX/id21DM+DGVOJFH6KN6p6HmdqMFe+eeXaZxh2iagAn/mLcs+HqJUil/czGqD2 P7po3Q/XL76vUCI5prcA9mcMSFJ+a5Wd7aUlFfnqs1msJP64OBq+/uJ2bLBqodrT51Wa jSwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fyegISrH; 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 qf21-20020a1709077f1500b0087122fab4c0si10044368ejc.155.2023.01.18.05.38.03; Wed, 18 Jan 2023 05:38:27 -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=fyegISrH; 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 S229982AbjARNd4 (ORCPT + 99 others); Wed, 18 Jan 2023 08:33:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230174AbjARNdB (ORCPT ); Wed, 18 Jan 2023 08:33:01 -0500 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8287E58960; Wed, 18 Jan 2023 05:00:03 -0800 (PST) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 30ICxjJg079768; Wed, 18 Jan 2023 06:59:45 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1674046785; bh=GGrsVB2NuWgQ/IDsTg782FJLIK98IZjp/7pCe7Mspxs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=fyegISrHOR3VLzHGX4VOcPbatNpOqZXzkGjMvx1y9GCuZiLHPClz5NAJyevYEHomy QDC5oI9VBCqGbK2t4OHivYP+cEHS1QJkOwlqHxSLMm4pvkr+qzwKqyKO/KE/4GL/fN 57E0x5O/Q/CK1T/zuoBaU0a0tLU6Mf+ZE5UH+06c= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 30ICxjLn010120 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 18 Jan 2023 06:59:45 -0600 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Wed, 18 Jan 2023 06:59:45 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) 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.16 via Frontend Transport; Wed, 18 Jan 2023 06:59:45 -0600 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 30ICxi51003334; Wed, 18 Jan 2023 06:59:45 -0600 From: Achal Verma To: , , , , , , , , , , , CC: , , , Subject: [PATCH v8 5/5] PCI: j721e: add j784s4 PCIe configuration Date: Wed, 18 Jan 2023 18:29:36 +0530 Message-ID: <20230118125936.3456716-6-a-verma1@ti.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230118125936.3456716-1-a-verma1@ti.com> References: <20230118125936.3456716-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 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?1755367716640685002?= X-GMAIL-MSGID: =?utf-8?q?1755367716640685002?= 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, + }, {}, };