From patchwork Tue Jul 16 21:31:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Quinlan X-Patchwork-Id: 13734984 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 BBBFAC3DA59 for ; Tue, 16 Jul 2024 21:37:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Reply-To:MIME-Version: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=V2u620+dzTFTeBGRAe4DWF2vSC/TRr+wMM00sSfbqO8=; b=UJpMvbtDMK3EkTsqxu4h9g9SD6 Kn4PAsrRfkYMIZTsiS3MX6VMHvZMzxWICDzc6yhbI3+KuLtm9KLd37lNgZygPCRAv+M/kbBBlCsoD WggOZ7WfgsQTR0XjjcyD1af7p8yeer9ljw3qMWt65vtGOC+nYcC4R3MijFbNhWW2yYLl8WNRbcYRz UUp/LpuHTNalkk3Vc3ZmTyafw0HL/atTmf2tCHeuTBe5tBq9w2BYTf56yBs/OekUwcGNKFvQ58LRa e4i5yjkrm9wvl+SiH7m8ltdWZjWN7u8JCmcA8Jd9agAu58ImW2NSSAaLi9fIXrmQ+YXsHOooyqL++ 3B6/L2Xw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTpqu-0000000Br6M-2oCs; Tue, 16 Jul 2024 21:36:52 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTpmY-0000000BpT9-3qVB for linux-arm-kernel@lists.infradead.org; Tue, 16 Jul 2024 21:32:25 +0000 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-70b7a528331so2370419b3a.1 for ; Tue, 16 Jul 2024 14:32:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1721165542; x=1721770342; darn=lists.infradead.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=V2u620+dzTFTeBGRAe4DWF2vSC/TRr+wMM00sSfbqO8=; b=AzfgEBlq5gvlzNLfVF75OTZx5SjqTwAi2ddmZu8wf/fOt4IbZmT8b4xg/EmAp8RbSD kWqY1TNT2CP3ZmItho66eY31w1VKKmCykV1wLchd/Bj9WCZg3egwBtMMdZpS3nbb4kEe ng2/B7Msz1TliUO0sGreEEJ2pNO76r2BmOEu0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721165542; x=1721770342; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=V2u620+dzTFTeBGRAe4DWF2vSC/TRr+wMM00sSfbqO8=; b=IGM6pSY6+6X4pjoBOnAhcmdtdurLpXmkvqL26GTES3aKpyfTuPUYsPMMWrJiz9oWsf +CIJdEl9tUWS4NazSHBMQ0vaLwyGXNgu5xt62rheYIpKVqupvlaQF1RaVUtAri0FHEFS kWsGAkc69DlgPPNp4rWfzZt4gvYs+uj4UPDUqti8G/RLzJelQMV3FwtZ9TbUtL1dUEjP LCQYNNgqF1z4MLXORMbqgYn8PFe2cBLmrbtIFeBNYoqwnWo9MY69obC+xAB6MRhJKyQr wOPHj/BUjE6qyU+ScH+K+aznw8cPyQyMooJMSmlOnwt6IdZVzl31prGlrMAFsOElHzw7 7QNA== X-Forwarded-Encrypted: i=1; AJvYcCUhJmSTONjsxYjnG7ww2MLT/qMseMBBWP3MIiU9MVNV3JuLzp0EQ2jW2G3IvVfsBbxuPcbbyTQ5XvuqRBQSxUUQsGSxW2kEKDiK9CL+fdKMO1JPDs0= X-Gm-Message-State: AOJu0YzfJgM2awypGDam26IbvKdGrhMqDm3KMvuafuo8pDMLgBkzkSWb 46Z+JO0mefcxFxTd1aTZqetrsna02ahLUQ7IS8MVnwG08BPeaJjITpMHacetmQ== X-Google-Smtp-Source: AGHT+IH0Y9+x+k35oeCTVD3LE8/SAcgucMDAoq8oz6zUhM4uRLOH0VIwFmwWNPm22oM56uujdUQQpA== X-Received: by 2002:a05:6a00:2e15:b0:70a:fa4c:4b28 with SMTP id d2e1a72fcca58-70c1fbe1812mr4531776b3a.15.1721165542191; Tue, 16 Jul 2024 14:32:22 -0700 (PDT) Received: from stbsrv-and-01.and.broadcom.net ([192.19.144.250]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70b7eb9e20fsm6812828b3a.31.2024.07.16.14.32.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jul 2024 14:32:21 -0700 (PDT) From: Jim Quinlan To: linux-pci@vger.kernel.org, Nicolas Saenz Julienne , Bjorn Helgaas , Lorenzo Pieralisi , Cyril Brulebois , Stanimir Varbanov , Krzysztof Kozlowski , bcm-kernel-feedback-list@broadcom.com, jim2101024@gmail.com, james.quinlan@broadcom.com Cc: Florian Fainelli , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , linux-rpi-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v4 12/12] PCI: brcmstb: Enable 7712 SOCs Date: Tue, 16 Jul 2024 17:31:27 -0400 Message-Id: <20240716213131.6036-13-james.quinlan@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240716213131.6036-1-james.quinlan@broadcom.com> References: <20240716213131.6036-1-james.quinlan@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240716_143223_046055_7ECD85C7 X-CRM114-Status: GOOD ( 12.49 ) 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 The Broadcom STB 7712 is the sibling chip of the RPi 5 (2712). Signed-off-by: Jim Quinlan Reviewed-by: Stanimir Varbanov Reviewed-by: Florian Fainelli Tested-by: Florian Fainelli --- drivers/pci/controller/pcie-brcmstb.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c index fa5616a56383..7debb3599789 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -1193,6 +1193,10 @@ static void brcm_extend_rbus_timeout(struct brcm_pcie *pcie) const unsigned int REG_OFFSET = PCIE_RGR1_SW_INIT_1(pcie) - 8; u32 timeout_us = 4000000; /* 4 seconds, our setting for L1SS */ + /* 7712 does not have this (RGR1) timer */ + if (pcie->model == BCM7712) + return; + /* Each unit in timeout register is 1/216,000,000 seconds */ writel(216 * timeout_us, pcie->base + REG_OFFSET); } @@ -1664,6 +1668,13 @@ static const int pcie_offsets_bmips_7425[] = { [PCIE_INTR2_CPU_BASE] = 0x4300, }; +static const int pcie_offset_bcm7712[] = { + [EXT_CFG_INDEX] = 0x9000, + [EXT_CFG_DATA] = 0x9004, + [PCIE_HARD_DEBUG] = 0x4304, + [PCIE_INTR2_CPU_BASE] = 0x4400, +}; + static const struct pcie_cfg_data generic_cfg = { .offsets = pcie_offsets, .model = GENERIC, @@ -1729,6 +1740,14 @@ static const struct pcie_cfg_data bcm7216_cfg = { .num_inbound = 3, }; +static const struct pcie_cfg_data bcm7712_cfg = { + .offsets = pcie_offset_bcm7712, + .perst_set = brcm_pcie_perst_set_7278, + .bridge_sw_init_set = brcm_pcie_bridge_sw_init_set_generic, + .model = BCM7712, + .num_inbound = 10, +}; + static const struct of_device_id brcm_pcie_match[] = { { .compatible = "brcm,bcm2711-pcie", .data = &bcm2711_cfg }, { .compatible = "brcm,bcm4908-pcie", .data = &bcm4908_cfg }, @@ -1738,6 +1757,7 @@ static const struct of_device_id brcm_pcie_match[] = { { .compatible = "brcm,bcm7445-pcie", .data = &generic_cfg }, { .compatible = "brcm,bcm7435-pcie", .data = &bcm7435_cfg }, { .compatible = "brcm,bcm7425-pcie", .data = &bcm7425_cfg }, + { .compatible = "brcm,bcm7712-pcie", .data = &bcm7712_cfg }, {}, };