From patchwork Tue Jul 16 21:31:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Quinlan X-Patchwork-Id: 1961327 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=broadcom.com header.i=@broadcom.com header.a=rsa-sha256 header.s=google header.b=eDSiHmco; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:4601:e00::3; helo=am.mirrors.kernel.org; envelope-from=devicetree+bounces-86232-incoming-dt=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [IPv6:2604:1380:4601:e00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WNshj4JLtz1ySl for ; Wed, 17 Jul 2024 07:31:49 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D64B21F242EE for ; Tue, 16 Jul 2024 21:31:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 72B288121B; Tue, 16 Jul 2024 21:31:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="eDSiHmco" X-Original-To: devicetree@vger.kernel.org Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2DE02AE6A for ; Tue, 16 Jul 2024 21:31:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721165501; cv=none; b=iyhUDpyAT4PR7XpuV63fIntrHsV+6OOyHSUpUi9zqU8xLZPNofx2XI63ga+Fa83G8q66ybpUUJCBfwIe+e3xFlOul+nBpiiMQCRW4QJ1EfvKr/4CmzhbYgFzJrPdfU2nQK9EaB6JSsg/cgH+36tjjxucFhTrigCAMsBlEyzdJ3c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721165501; c=relaxed/simple; bh=TdNpRDdpvoyoARSUd29Lz6b5DrKqqV7RX8oFs7jDK/8=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type; b=J7QfTzjjcNHTYKT0gdhaz2lepPrOXs+pEpCpNVsTgjHBsooQgX9dVDSgCHrFduc3+YGLmy/8HUpheTJpMXqhXLTpU300jRgBk8/l4bUosmij1tqIRf3APJZXL1eTMLph7sV2cLbHz8wQ1LQF4ITNkKQy8TTc3C+P/Ao37fZEaJ0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=eDSiHmco; arc=none smtp.client-ip=209.85.210.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-70b42250526so4565727b3a.1 for ; Tue, 16 Jul 2024 14:31:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1721165498; x=1721770298; darn=vger.kernel.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tRVme3i7iRCzNR0f60VTTTtj8Y4ifcjppUcbjbE8468=; b=eDSiHmcozZSZ1852KgPGhaZs3bWARhnqKYpw4TYyKAvTfjRp78UNAsQVN58Ep8v6DB fpsw01NpeD1k3QCJ5ahKDPV3hU0Xd6dK84izPKQLhDm313U+E3OAXc4iHXQswFbYgDhU v7Hyyrz0hfJlnFdjWNrJr6qIFZvZflW+c57wQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721165498; x=1721770298; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tRVme3i7iRCzNR0f60VTTTtj8Y4ifcjppUcbjbE8468=; b=Xda0ZcZySPSczB0tSpNF4ScHeybNBBfw5DQDeS1HzgfUQgkr4zXW5S2CNFjbp3x7w5 cil0nx6ftezDzD5k0IzfhAvYo9tLP994gm9UpWx9H6+3830aKZd4lPRg1tmKdaTH9pCu YZJ56qvUXmr9Qsvue2TJcrxaCxeahM70vM6dQqN30bMzakTAHnuRdDAZhoK2crD4vUsl 0issbn4fSvOHjac52Oi20t07MK7KMQw+Oyn7rVHj5YXJL1V43yATyYvREGDu8ZgNWt5I pguTOdUwen87F5bSSIaRVdZhweLvjbP9MJpzv7pr/tX0CdelJcC2ObdIj+zhlgaTUwRm n1kg== X-Gm-Message-State: AOJu0YwiAG8Y5mcaWp0CFuUSFFGJngRfLWGaLtnSs6+aUoQ//RexIRWN uKG90MReRBvUBXiBScmomcTwaM8Hi0rQ4UgyCzo8M1W9n0rqmP0dqxFuQuWeOA== X-Google-Smtp-Source: AGHT+IG9HYpepCxv2KZOShWkFuwZ+7DZXo2ArHdag9+jBKbfi2yX5HXeXJfYEwjq7wrq1Qem3RU7Mg== X-Received: by 2002:a05:6a00:2304:b0:706:251d:d98 with SMTP id d2e1a72fcca58-70c1fb673fbmr3948563b3a.4.1721165497815; Tue, 16 Jul 2024 14:31:37 -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.31.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jul 2024 14:31:36 -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: devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), linux-kernel@vger.kernel.org (open list), linux-rpi-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), Rob Herring Subject: [PATCH v4 00/12] PCI: brcnstb: Enable STB 7712 SOC Date: Tue, 16 Jul 2024 17:31:15 -0400 Message-Id: <20240716213131.6036-1-james.quinlan@broadcom.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: V4 Changes: o Commit "Check return value of all reset_control_xxx calls" -- Blank line before "return" (Stan) o Commit "Use common error handling code in brcmstb_probe()" -- Drop the "Fixes" tag (Stan) o Commit "dt-bindings: PCI ..." -- Separate the main commit into two: cleanup and adding the 7712 SoC (Krzysztof) -- Fold maintainer change commit into cleanup change (Krzysztof) -- Use minItems/maxItems where appropriate (Krzysztof) -- Consistent order of resets/reset-names in decl and usage (Krzysztof) V3 Changes: o Commit "Enable 7712 SOCs" -- Move "model" check from outside to inside func (Stan) o Commit "Check return value of all reset_control_xxx calls" -- Propagate errors up the chain instead of ignoring them (Stan) o Commit "Refactor for chips with many regular inbound BARs" -- Nine suggestions given, nine implemented (Stan) o Commit "Make HARD_DEBUG, INTR2_CPU_BASE offsets SoC-specific" -- Drop tab, add parens around macro params in expression (Stan) o Commit "Use swinit reset if available" -- Treat swinit the same as other reset controllers (Stan) Stan suggested to use dev_err_probe() for getting resources but I will defer that to future series (if that's okay). o Commit "Get resource before we start asserting resets" -- Squash this with previous commit (Stan) o Commit "Use "clk_out" error path label" -- Move clk_prepare_enable() after getting resouurces (Stan) -- Change subject to "Use more common error handling code in brcm_pcie_probe()" (Markus) -- Use imperative commit description (Markus) -- "Fixes:" tag added for missing error return. (Markus) o Commit "dt-bindings: PCI ..." -- Split off maintainer change in separate commit. -- Tried to accomodate Krzysztof's requests, I'm not sure I have succeeded. Krzysztof, please see [1] below. [1] Wrt the YAML of brcmstb PCIe resets, here is what I am trying to describe: CHIP NUM_RESETS NAMES ==== ========== ===== 4908 1 perst 7216 1 rescal 7712 3 rescal, bridge, swinit Others 0 - V2 Changes (note: four new commits): o Commit "dt-bindings: PCI ..." -- s/Adds/Add/, fix spelling error (Bjorn) -- Order compatible strings alphabetically (Krzysztof) -- Give definitions first then rules (Krzysztof) -- Add reason for change in maintainer (Krzysztof) o Commit "Use swinit reset if available" -- no need for "else" clause (Philipp) -- fix improper use of dev_err_probe() (Philipp) o Commit "Use "clk_out" error path label" -- Improve commit message (Bjorn) o Commit "PCI: brcmstb: Make HARD_DEBUG, INTR2_CPU_BASE offsets SoC-specific" -- Improve commit subject line (Bjorn) o Commit (NEW) -- Change field name from 'type' to 'model' -- Added as requested (Stanimir) o Commit (NEW) -- Check return value of all reset_control_xxx calls -- Added as requested (Stanimir) o Commit (NEW) "Get resource before we start asserting reset controllers" -- Added as requested (Stanimir) o Commit (NEW) -- "Remove two unused constants from driver" V1: This submission is for the Broadcom STB 7712, sibling SOC of the RPi5 chip. Stanimir has already submitted a patch "Add PCIe support for bcm2712" for the RPi version of the SOC. It is hoped that Stanimir will allow us to submit this series first and subsequently rebase his patch(es). The largest commit, "Refactor for chips with many regular inbound BARs" affects both the STB and RPi SOCs. It allows for multiple inbound ranges where previously only one was effectively used. This feature will also be present in future STB chips, as well as Broadcom's Cable Modem group. Jim Quinlan (12): dt-bindings: PCI: Cleanup of brcmstb YAML and add 7712 SoC dt-bindings: PCI: brcmstb: Add 7712 SoC description PCI: brcmstb: Use common error handling code in brcm_pcie_probe() PCI: brcmstb: Use bridge reset if available PCI: brcmstb: Use swinit reset if available PCI: brcmstb: PCI: brcmstb: Make HARD_DEBUG, INTR2_CPU_BASE offsets SoC-specific PCI: brcmstb: Remove two unused constants from driver PCI: brcmstb: Don't conflate the reset rescal with phy ctrl PCI: brcmstb: Refactor for chips with many regular inbound BARs PCI: brcmstb: Check return value of all reset_control_xxx calls PCI: brcmstb: Change field name from 'type' to 'model' PCI: brcmstb: Enable 7712 SOCs .../bindings/pci/brcm,stb-pcie.yaml | 50 +- drivers/pci/controller/pcie-brcmstb.c | 485 +++++++++++++----- 2 files changed, 400 insertions(+), 135 deletions(-) base-commit: 55027e689933ba2e64f3d245fb1ff185b3e7fc81