Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4554207pxv; Tue, 6 Jul 2021 03:54:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWujKs1OUHODlItGBbLmR5CsgOGmLwG5IhtyTsHr57d+WG4daQFZdi2/Ry1V/uKd7lSwGH X-Received: by 2002:a05:6402:3514:: with SMTP id b20mr3110108edd.187.1625568890949; Tue, 06 Jul 2021 03:54:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625568890; cv=none; d=google.com; s=arc-20160816; b=DbrrlYrr5Q4w66BuYj6q+Leb1UmxQls2K1I8EGQUqyTBV/X5jXEjnqq19KCX7l+4r/ tnCnjyWxzNIPX9PeMYWAHJVdATiP/k1gCM29TkFeTQZI2X+Mfs3BnPeab6wb9ls6oLvA 0ydy6eUCxVJ2VoZ83m+FHDtJpysJLjcp93sLcQ0vWvsSVqebjBvlHC7DLCX914XwC2AG NLi4Hy7105zyH4i+5saKlFB0+B95oQxdU35W/NhmR92siw1CHe2s3oNsVEvn+lqKKMJ9 H6EMn9OaeM6DZVdU4e8HGghUY2gdsWRRwYKAB4QLYvUBvGjyKt2etcj53o48/KgEYbLl XiTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=jgiitGNC5LzM3hjI9JoEksLaAazLepBQYg9dPLYRlpo=; b=MBMF+66XR6JrDst8bQ/2Zp1ycXyPqrqJXSJbVBXEt5mcvrJaTCd+jaMyam/4SCssw5 zkadXBfJUeBikGicyXAtCj9+U806pA7ErFAauHK6iVmq1+hRS88lH4EMEgOQVYR2pgqR Oj2XF8FpjaJkHQEXlyEbj5war7il1KUpfk0uy1IIV+f4c8GG9VmnZKOuXQ7O1UkHeZ6s Le9u4MbF6JDFSmO5xpvo+mMrcVKtpurzwl8LTX85cYgx2xRacOJ2Xt07QSh0sEfjWaVo lvUDcZroH4JkcAxqOLBJmyhm6FGAyVIItdKjZX1p9afKBjDYJTOvz+hU+KBLGLgkM9Ih vELw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=yIFV0W9m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jy12si14405667ejc.729.2021.07.06.03.54.27; Tue, 06 Jul 2021 03:54:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=yIFV0W9m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231766AbhGFKxp (ORCPT + 99 others); Tue, 6 Jul 2021 06:53:45 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:42022 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231702AbhGFKxn (ORCPT ); Tue, 6 Jul 2021 06:53:43 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 166AotDI059882; Tue, 6 Jul 2021 05:50:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1625568655; bh=jgiitGNC5LzM3hjI9JoEksLaAazLepBQYg9dPLYRlpo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=yIFV0W9mt6zZGYJrfezn5eym2qZF8Z/h5sOOtvUnnAyc+9SCVH8rTGQvCLa29bnLM pc0go3rtoXGITDQjCGwrTfNEfVkcqjfUx3kIKhpy4xkwrjZN0KEyc2AFJXVR0F5CMt iEIom2NBB+GeIt9X5TNr2ew/T5FuAt64d/QTVA/8= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 166AotUb126121 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 6 Jul 2021 05:50:55 -0500 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 6 Jul 2021 05:50:54 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Tue, 6 Jul 2021 05:50:54 -0500 Received: from a0393678-ssd.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 166Aoar4015822; Tue, 6 Jul 2021 05:50:51 -0500 From: Kishon Vijay Abraham I To: Lorenzo Pieralisi , Arnd Bergmann , Rob Herring , Bjorn Helgaas CC: Lokesh Vutla , Kishon Vijay Abraham I , Greg Kroah-Hartman , Tom Joseph , , , , , Nadeem Athani Subject: [PATCH 3/5] PCI: j721e: Add PCIe support for AM64 Date: Tue, 6 Jul 2021 16:20:33 +0530 Message-ID: <20210706105035.9915-4-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210706105035.9915-1-kishon@ti.com> References: <20210706105035.9915-1-kishon@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org AM64 has the same PCIe IP as in J7200 with certain erratas not applicable (quirk_detect_quiet_flag). Add support for "ti,am64-pcie-host" compatible and "ti,am64-pcie-ep" compatible that is specific to AM64. Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/controller/cadence/pci-j721e.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/controller/cadence/pci-j721e.c index 803da33b86d8..3156b28ae8ab 100644 --- a/drivers/pci/controller/cadence/pci-j721e.c +++ b/drivers/pci/controller/cadence/pci-j721e.c @@ -310,6 +310,17 @@ static const struct j721e_pcie_data j7200_pcie_ep_data = { .quirk_detect_quiet_flag = true, }; +static const struct j721e_pcie_data am64_pcie_rc_data = { + .mode = PCI_MODE_RC, + .link_irq_reg_field = J7200_LINK_DOWN, + .byte_access_allowed = true, +}; + +static const struct j721e_pcie_data am64_pcie_ep_data = { + .mode = PCI_MODE_EP, + .link_irq_reg_field = J7200_LINK_DOWN, +}; + static const struct of_device_id of_j721e_pcie_match[] = { { .compatible = "ti,j721e-pcie-host", @@ -327,6 +338,14 @@ static const struct of_device_id of_j721e_pcie_match[] = { .compatible = "ti,j7200-pcie-ep", .data = &j7200_pcie_ep_data, }, + { + .compatible = "ti,am64-pcie-host", + .data = &am64_pcie_rc_data, + }, + { + .compatible = "ti,am64-pcie-ep", + .data = &am64_pcie_ep_data, + }, {}, }; -- 2.17.1