From patchwork Wed Jul 3 18:02:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Quinlan X-Patchwork-Id: 13722668 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 6CD42C2BD09 for ; Wed, 3 Jul 2024 18:06:02 +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=F1AnJJ+OdCX9b4yYoql8kQ+f1dgIsxleTBRmaDO9oKE=; b=BzJwI1m7Irdxx+SZr/LvRmsRdc jlI9chkIwLBbXLuL3ZaT2Jrh0kcrXAMAegCFl06fP+U97wVANPBcbdAj54jK+l+MpHscjKrtCAdsw tnEAVkUdcPcYXT/7eTgzEuo8lX15eI1ow497ygtjjQbjSG9uXAg+ffEgET9m5FdKyF4zXN4TjD2Qg 6XNidvTDjNWJJaDrTj0Z/Qpmed8utCmB53pCwKQI5PeCmQETGBMIH8UqvLkjf8WY3aGQLuZqYZyx0 zGaynkAZzCEffANyi+4DwRiJ02Ys3cM67hH4GBSbsz/z1M139z+cgui+ilYWg03tWA5/31+qMyK8o AsM1DKZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sP4Ma-0000000B6L3-08g4; Wed, 03 Jul 2024 18:05:52 +0000 Received: from mail-qv1-xf30.google.com ([2607:f8b0:4864:20::f30]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sP4KD-0000000B58y-1oMR for linux-arm-kernel@lists.infradead.org; Wed, 03 Jul 2024 18:03:27 +0000 Received: by mail-qv1-xf30.google.com with SMTP id 6a1803df08f44-6b590e36a8dso25649486d6.1 for ; Wed, 03 Jul 2024 11:03:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1720029804; x=1720634604; 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=F1AnJJ+OdCX9b4yYoql8kQ+f1dgIsxleTBRmaDO9oKE=; b=gvMZrVTekwyGePrQzPYlh5VpD7YpD6w4mMjiiTuHykHgex9NzfqgVrfE1pmPnjcJnu DtK/SFM3352OwK4wOQdSy7Nu3/M76HFjw8lL0tf9jqTx6+JD7A6g5uSijN+1Pw0rYhsd i1egMUEFUlFb7eEK75yOX7R7Dav7t4R1vUOqU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720029804; x=1720634604; 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=F1AnJJ+OdCX9b4yYoql8kQ+f1dgIsxleTBRmaDO9oKE=; b=FBJ+c7LzU/EbX81M1kUOxhqcFLkoY/3Ho3wH07n0Spl3XIWufLkCirDK3mVEC+SpJ2 5nWdrbnYUAM6/IEXTg1YJbHSABT5Ubam4mJZnY+j0LBVQA1v3ng9/tCfjRWL2VJ8/tnq QrEHSZ0an5Vwh5OepxV9HqrgIGN8rkfES+W/xqm4vJuaj+C/jKqFchjt41KhrwuJDb1e z/GZKpdKI9MnKDaVEZObO8ywiE/+7gbbuEVKm5q+GuNNLHke1LzM3VhbfBLvu7ibxMip Mrou42s9y600ivhxhYzNSDvV7WTSthspZ3Cm/vWZ2jNRUuXqnUwzHqtfODM/uwkPKYqi Bxig== X-Forwarded-Encrypted: i=1; AJvYcCVsP4xYDyXLFGUpjx/aNP6RzN75GEwqw0hQUwpqIV6ZbVJSwRH1yjQUk/m3Nwo7XKdIGT9GuCksPFGrEDEWr8sU5JcNV2+xzQwGkTGxkHw7M+N1p04= X-Gm-Message-State: AOJu0YzzrZAug5VQwclyVBKGrZ2USeBJxBhAIpZJe96PyHFpsXiq3pc3 QKVVgRBQ3A0adPeBnU7tdk8ZTT52vE9BXFHgu6MzFxiHaBdfTP+9n7K7kHd3jQ== X-Google-Smtp-Source: AGHT+IGcbdJR+kzkdQp9fuEs8Cq6Zz4UO5FZzDqjOmP16+1i6U0Wl0eZOq4U9Ekv/GBRdayvDQKkOg== X-Received: by 2002:a05:6214:ac7:b0:6b5:dcda:bae5 with SMTP id 6a1803df08f44-6b5dcdac1b6mr59876456d6.25.1720029804433; Wed, 03 Jul 2024 11:03:24 -0700 (PDT) Received: from stbsrv-and-01.and.broadcom.net ([192.19.144.250]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b59e5f1a6dsm55589626d6.83.2024.07.03.11.03.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 11:03:23 -0700 (PDT) From: Jim Quinlan To: linux-pci@vger.kernel.org, Nicolas Saenz Julienne , Bjorn Helgaas , Lorenzo Pieralisi , Cyril Brulebois , Stanimir Varbanov , 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 v2 11/12] PCI: brcmstb: Enable 7712 SOCs Date: Wed, 3 Jul 2024 14:02:55 -0400 Message-Id: <20240703180300.42959-12-james.quinlan@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240703180300.42959-1-james.quinlan@broadcom.com> References: <20240703180300.42959-1-james.quinlan@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240703_110325_499972_578BFD36 X-CRM114-Status: GOOD ( 12.80 ) 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 --- drivers/pci/controller/pcie-brcmstb.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c index 1c3ce0c182d1..39d7dea282ff 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -1216,7 +1216,9 @@ static void brcm_config_clkreq(struct brcm_pcie *pcie) * atypical and should happen only with older devices. */ clkreq_cntl |= PCIE_MISC_HARD_PCIE_HARD_DEBUG_L1SS_ENABLE_MASK; - brcm_extend_rbus_timeout(pcie); + /* 7712 does not have this (RGR1) timer */ + if (pcie->type != BCM7712) + brcm_extend_rbus_timeout(pcie); } else { /* @@ -1628,6 +1630,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, .type = GENERIC, @@ -1686,6 +1695,13 @@ static const struct pcie_cfg_data bcm7216_cfg = { .has_phy = true, }; +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, + .type = BCM7712, +}; + static const struct of_device_id brcm_pcie_match[] = { { .compatible = "brcm,bcm2711-pcie", .data = &bcm2711_cfg }, { .compatible = "brcm,bcm4908-pcie", .data = &bcm4908_cfg }, @@ -1695,6 +1711,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 }, {}, };