From patchwork Fri Jun 28 20:54: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: 13716594 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 51B2FC2BD09 for ; Fri, 28 Jun 2024 20:56:47 +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=wE/bRm64jQjzE/sMpIijTw+hI2QMwf2NsTMYZ1fLFxs=; b=foOD0JvA1GrOqBNqjIveAbjsWy iACHfMdYvDez6psRANNMyOb1K7LPhz5fFc81I0bJY61rr6f2LVwkSi1kXZ/ekMGRsUubhnIj/7n8A 6WhD5qLtih2hxB8Vc1eh2KeOukrI/+1/O5Yn76E5UQP49LbYWIL6q+pObbiHraqFm5ZqqTcQJRpAz d0q8oeZgxCFjGBoYnJCeC/GmusikjamcP16jIbC+yEzcBeaS8C7iUCOpUFCFn9BqEPlrJCT+WWw79 JNE9KlAY/Mp9JexaUNJYlfWCRrXzX2D7JuX2XNsHdVLGEyBN2dvr45zrmzzaLID4vGVhXANKu8Ibn RlbL2lPA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNIe3-0000000Evx5-0yzj; Fri, 28 Jun 2024 20:56:35 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNIca-0000000Ev9K-2PCb for linux-arm-kernel@lists.infradead.org; Fri, 28 Jun 2024 20:55:06 +0000 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1f9cd92b146so6630835ad.3 for ; Fri, 28 Jun 2024 13:55:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1719608102; x=1720212902; 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=wE/bRm64jQjzE/sMpIijTw+hI2QMwf2NsTMYZ1fLFxs=; b=FF2NkHL3CTOGt09BObrlZ17f7t5ERMUW7wRQtHciyQXFhigQRF989H0XFioWbfXzE7 3hR1eImURt+YXoG7/jlChmYSALLuVO3rN4RLTAwTtVLwUBdJ9dbVhnUps4iLNinmcvoo m1jc9gnATmonW+eEbYqwenxrhzEWlaWra6z1E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719608102; x=1720212902; 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=wE/bRm64jQjzE/sMpIijTw+hI2QMwf2NsTMYZ1fLFxs=; b=DL5qrg5JA8uT2OiDl5vJfQulIFjq5BtIZD88PcxbfgWGeyuVo4QlASGsf16Mzhfb+s BwkBQdn/o1/R2KvLzj3WWmYQQpol3d/DiQIub+Zpjlr1uF0vdL7ZwqcqC+aH/CC9+qkv dpS7AdAtCK+gOjwwApTccgeR1zsP1NN/tP3QYfKUXjlVvUCZQ0nXy86is2N6wt/X72gT k/xpWAQgvJKxScmig+KgaOO2qeMr6QFtitFNgBEylqykVCUD5u9eKAlOYEVlKbfh2b3i bF/hBdjyVRptzGkenHL/ZpvXl077P3KeoUnwk5D0/ry03vs/M9lbAcYs79E838xxJn+d 6yvA== X-Forwarded-Encrypted: i=1; AJvYcCX35053zVt9pLylbLrs1WX5DOltC3c4lntAgO026II90L4+YvqDJbQsQfY7LIFqJyqumrTc+3tXc4fcaKsiM0u9PUHKmaVh0yK4beKhEFKLTPNAdRo= X-Gm-Message-State: AOJu0Yyc2wo5+Om/z97C3b5ZwdeZIrmGvXF0mo3PYOqC4BG+QRjFg5Ua 0XLrvMvUMy0Vd92AfdrnDguJ8fnIYplnqqN2bzTjxOM5ZVkpVMMye/tIs9HUIg== X-Google-Smtp-Source: AGHT+IELxM8/f9oyyzic3Bqjj/l2RVlhs/69Q6AI9NPehfUpL0FZUx9C2EZ28TvHfLH4QsvhI16FWA== X-Received: by 2002:a17:902:ce82:b0:1fa:1ebb:eb79 with SMTP id d9443c01a7336-1fa1ebbeee9mr218666275ad.58.1719608101995; Fri, 28 Jun 2024 13:55:01 -0700 (PDT) Received: from stbsrv-and-01.and.broadcom.net ([192.19.144.250]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fac15393d1sm19695135ad.157.2024.06.28.13.54.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jun 2024 13:55:01 -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 v1 8/8] PCI: brcmstb: Enable 7712 SOCs Date: Fri, 28 Jun 2024 16:54:27 -0400 Message-Id: <20240628205430.24775-9-james.quinlan@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240628205430.24775-1-james.quinlan@broadcom.com> References: <20240628205430.24775-1-james.quinlan@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240628_135504_647324_3158C14D X-CRM114-Status: GOOD ( 12.66 ) 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 --- 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 9dab577dc1b4..418525c9d249 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -1209,7 +1209,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 { /* @@ -1616,6 +1618,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, @@ -1674,6 +1683,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 }, @@ -1683,6 +1699,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 }, {}, };