From mboxrd@z Thu Jan 1 00:00:00 1970 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 52F7EC52D71 for ; Wed, 7 Aug 2024 14:14:23 +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:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lRFsgP8Y1c32TT9S5zwl+bMoEl7yvNRAJ5VeQ46re5I=; b=gV8LJeL53rktpeqT0b8VEfV+8v V03QM1yfBIdKo5fHYU4RMAVvAbXxB0w/S5Q387OTfIcgTG2Q3AO3VAyHJGcMtpauEIW7sgxJhUhC5 Q1QcKiqKp76eLwnSjw0/ByoBnDYDuBzS5KSLQUS1ZWZHqCyNQ12aejxTEAILJ6Djt3zwpc5jHy14O QyQLjnAAAnwSbFVXKz8EsqY1r6V4dhsDolxcyfEjMYDwOtlF6PuF3rzXyz0/qp5FxchvY53R0VCpd KAaAdBJv5zARCRIxcJheReZdi7nItcsmLWC7NBGWQY4HdPYka6weAnlbTaE73yP0QTepNaJqt6H8o KH3xWVGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbhQV-00000005Hk2-459O; Wed, 07 Aug 2024 14:14:07 +0000 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbhPU-00000005HP8-0KRT for linux-arm-kernel@lists.infradead.org; Wed, 07 Aug 2024 14:13:06 +0000 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-70d2b921c48so1480816b3a.1 for ; Wed, 07 Aug 2024 07:13:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723039983; x=1723644783; darn=lists.infradead.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=lRFsgP8Y1c32TT9S5zwl+bMoEl7yvNRAJ5VeQ46re5I=; b=N86tar2OS3cKClyuhYLbW/mWmCyPKqDVW5uvx3XyRrnD42tAgKR9jNT7Alup79hV38 4szRKntzZTBG5YlpmfPt/Ed5wNGhd5CN1bfz8uIphmZk1GReWyK74BQOhjV3gWKlkwxG 14bB6tUQfxpIYj9h5rC8OubkZgOJdrYjocsMoI+WZ2KFr0nySaJ8jIaGg9Q5xiRkRokh A9kHDGuEqyBn2vcd3o5eoSnmeonoi7szW46Ae2pLYA9WZpBHBjHsY91UQ59PLvjH6lY3 0WEL7P07MuZ1Mghr9Zcs4AQnADLJxoSjCSsIRu3+R3k4fKbmtYdCZpfMo3jEaoaJGYxd nRcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723039983; x=1723644783; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lRFsgP8Y1c32TT9S5zwl+bMoEl7yvNRAJ5VeQ46re5I=; b=KZiFos5Xyy97UPUGe+lTx2SxBz67Zf36PFCSW6bQhIaBY/BunA8L64JWSKKnIjmBKe FnFayNjWvaezpI/PMdmdUQSYMIep1K0GaHwpCkK5o3jN33TB3VVtcZVMI45Nzn+hFa2H LjfSCF6lquhxk1EZ6MJW/EsVmSJ7wEadf39UDDF6X+iVWCYz0SxIE0MaOuh0Cu0phY80 VxjlhosxjuHP4Y+2aLBo3ZLbhYf1fl8NkQD9BIIjLUCDlbb/u5jRnfZxgmQEVAXWkmva PrB9wNR1TubG2zj6ZfK0VDMWhPmv5evHltrv5gJMAWHuj4NzP25d82PunyJRww9ZeJ0A A9lw== X-Forwarded-Encrypted: i=1; AJvYcCUv2BsoMy0F3FSpLm+jnwuKWkWihbYRfO6hK/LJ7kPEFDNa7gtMa0WSdbyWQ2fe9aq429kr/7avpDPl3R5V0R/VY1J8fhH68vb0acp3lLy2jgEWRlQ= X-Gm-Message-State: AOJu0YwjGfNUw9aMlPyFLiTjbS2i0P1bEqHR/zrDaJmxz9LEfpYD1T6M q/cU8FDjob3JhI+BlMZItSEzcs5bpr3nF8amQ2q1Q8pQV1D1LicoibPal9UYLw== X-Google-Smtp-Source: AGHT+IE+2bxt0RWYDzoa/0717PVsVp/VC5L53fxD/frfjlYdSeFOHQvtM70NjBfd+Nz1QbuAWz1Ktg== X-Received: by 2002:a05:6a00:6f0f:b0:706:67c9:16d0 with SMTP id d2e1a72fcca58-7106d0812eemr17260571b3a.26.1723039982533; Wed, 07 Aug 2024 07:13:02 -0700 (PDT) Received: from thinkpad ([120.60.60.211]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7106ec06a25sm8462024b3a.33.2024.08.07.07.12.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Aug 2024 07:13:02 -0700 (PDT) Date: Wed, 7 Aug 2024 19:42:48 +0530 From: Manivannan Sadhasivam To: Jim Quinlan Cc: 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, Florian Fainelli , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , open list Subject: Re: [PATCH v5 12/12] PCI: brcmstb: Enable 7712 SOCs Message-ID: <20240807141248.GL3412@thinkpad> References: <20240731222831.14895-1-james.quinlan@broadcom.com> <20240731222831.14895-13-james.quinlan@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240731222831.14895-13-james.quinlan@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240807_071304_151923_B92DC625 X-CRM114-Status: GOOD ( 22.75 ) 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 On Wed, Jul 31, 2024 at 06:28:26PM -0400, Jim Quinlan wrote: > The Broadcom STB 7712 is the sibling chip of the RPi 5 (2712). > It has one PCIe controller with a single port, supports gen2 > and one lane only. The current revision of the chip is "C0" > or "C1". > > Signed-off-by: Jim Quinlan Reviewed-by: Manivannan Sadhasivam - Mani > Reviewed-by: Stanimir Varbanov > Reviewed-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 4623b70f9ad8..44b323a13357 100644 > --- a/drivers/pci/controller/pcie-brcmstb.c > +++ b/drivers/pci/controller/pcie-brcmstb.c > @@ -1202,6 +1202,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->soc_base == BCM7712) > + return; > + > /* Each unit in timeout register is 1/216,000,000 seconds */ > writel(216 * timeout_us, pcie->base + REG_OFFSET); > } > @@ -1673,6 +1677,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, > .soc_base = GENERIC, > @@ -1738,6 +1749,14 @@ static const struct pcie_cfg_data bcm7216_cfg = { > .num_inbound_wins = 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, > + .soc_base = BCM7712, > + .num_inbound_wins = 10, > +}; > + > static const struct of_device_id brcm_pcie_match[] = { > { .compatible = "brcm,bcm2711-pcie", .data = &bcm2711_cfg }, > { .compatible = "brcm,bcm4908-pcie", .data = &bcm4908_cfg }, > @@ -1747,6 +1766,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 }, > {}, > }; > > -- > 2.17.1 > -- மணிவண்ணன் சதாசிவம்