From patchwork Mon Oct 14 13:06:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 13835123 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 3A9E7D16268 for ; Mon, 14 Oct 2024 14:32:00 +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-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=dnazj/SBO1aQxEa66dJTvC8ksemBo5idWIChnf144/w=; b=XWGBOAnTkOC5y9vWfJ3xL/98lD 1YcG0tIatJxTX9Kxm0eIlZo8N0ayaGYrEOOYtu/bouOJm0Sb/EdhEhwuZnfNNikEAdbZEJH94Sq35 ZL0HclB0YfmR3u2FxweekyiOiV2wBVkIha4VxaNBfXfvTitQM75VfaArWrh4c31RjtGVqTqrI4WVw WJUjxDsT12q4IL/g5FxtEApW1TKPZEBCWL6HAiDYCl3NQh4r4xUw1KRTY7bhQDxdbc5JyHiubxEIT mBkJhU/2RFtMnqZalggeuMh6ygFnk0JzTl/+rmh/E7vKHN3ewJ7kHrQjg/7vYWVVbi70qxxPhTRFs sm5hTPOQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t0M6v-00000005TkN-1eCb; Mon, 14 Oct 2024 14:31:49 +0000 Received: from smtp-out1.suse.de ([2a07:de40:b251:101:10:150:64:1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t0KnR-00000005Bww-0jRj; Mon, 14 Oct 2024 13:07:45 +0000 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 64AA321D3F; Mon, 14 Oct 2024 13:07:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728911252; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=dnazj/SBO1aQxEa66dJTvC8ksemBo5idWIChnf144/w=; b=rllpg817fNVE+ltyDyG88s4d+O2XIc1VwTNoWUkGH4L4fslTQHJRVyi5SM5cqJTgSYIrVv dFMIj3iofkFJqJO8luXZ5rXknTyolijj5IATQMUv5ybEeAOcJ39awvkHN7dCjLR+kHvoeu khcrcqLng9yplh5jrzl2FAJy5OI+PhI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728911252; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=dnazj/SBO1aQxEa66dJTvC8ksemBo5idWIChnf144/w=; b=YcW8KmYnf3YJX9Jw+b5s2D9gcgTEAr3Xyh1xAQ3yoBP9dFb4Knds7LWIvSVQaoKznYZfTr 4sbut5o5wqHfBjBw== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=rllpg817; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=YcW8KmYn DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728911252; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=dnazj/SBO1aQxEa66dJTvC8ksemBo5idWIChnf144/w=; b=rllpg817fNVE+ltyDyG88s4d+O2XIc1VwTNoWUkGH4L4fslTQHJRVyi5SM5cqJTgSYIrVv dFMIj3iofkFJqJO8luXZ5rXknTyolijj5IATQMUv5ybEeAOcJ39awvkHN7dCjLR+kHvoeu khcrcqLng9yplh5jrzl2FAJy5OI+PhI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728911252; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=dnazj/SBO1aQxEa66dJTvC8ksemBo5idWIChnf144/w=; b=YcW8KmYnf3YJX9Jw+b5s2D9gcgTEAr3Xyh1xAQ3yoBP9dFb4Knds7LWIvSVQaoKznYZfTr 4sbut5o5wqHfBjBw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 5B43213A42; Mon, 14 Oct 2024 13:07:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id moq0E5MXDWcqTwAAD6G6ig (envelope-from ); Mon, 14 Oct 2024 13:07:31 +0000 From: Stanimir Varbanov To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-pci@vger.kernel.org, Broadcom internal kernel review list Cc: Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Jim Quinlan , Nicolas Saenz Julienne , Bjorn Helgaas , Lorenzo Pieralisi , kw@linux.com, Philipp Zabel , Andrea della Porta , Phil Elwell , Jonathan Bell , Stanimir Varbanov Subject: [PATCH v3 00/11] Add PCIe support for bcm2712 Date: Mon, 14 Oct 2024 16:06:59 +0300 Message-ID: <20241014130710.413-1-svarbanov@suse.de> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Rspamd-Queue-Id: 64AA321D3F X-Spamd-Result: default: False [-1.51 / 50.00]; BAYES_HAM(-3.00)[100.00%]; SUSPICIOUS_RECIPS(1.50)[]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_TWELVE(0.00)[21]; FUZZY_BLOCKED(0.00)[rspamd.com]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_CC(0.00)[linutronix.de,kernel.org,broadcom.com,gmail.com,google.com,linux.com,pengutronix.de,suse.com,raspberrypi.com,suse.de]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:mid]; RCVD_VIA_SMTP_AUTH(0.00)[]; TAGGED_RCPT(0.00)[dt]; DKIM_TRACE(0.00)[suse.de:+]; FREEMAIL_ENVRCPT(0.00)[gmail.com] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241014_060738_493865_0FCA2BB8 X-CRM114-Status: GOOD ( 13.29 ) 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 Hello, Here is v3 the series to add support for PCIe on bcm2712 SoC used by RPi5. Previous v2 can be found at [1]. v2 -> v3 changes include: - Added Reviewed-by/Acked-by tags. - MIP MSI-X driver has been converted to MSI parent. - Added a new patch for PHY PLL adjustment need to succesfully enumerate PCIe endpoints on extension connector (tested with Pineboards AI Bundle + NVME SSD adapter card). - Re-introduced brcm,msi-offset DT private property for MIP interrupt-controller (without it I'm anable to use the interrupts of adapter cards on PCIe enxtension connector). For more info check patches. [1] https://patchwork.kernel.org/project/linux-pci/cover/20240910151845.17308-1-svarbanov@suse.de/ Stanimir Varbanov (11): dt-bindings: interrupt-controller: Add bcm2712 MSI-X DT bindings dt-bindings: PCI: brcmstb: Update bindings for PCIe on bcm2712 irqchip: mip: Add Broadcom bcm2712 MSI-X interrupt controller PCI: brcmstb: Expand inbound size calculation helper PCI: brcmstb: Enable external MSI-X if available PCI: brcmstb: Avoid turn off of bridge reset PCI: brcmstb: Add bcm2712 support PCI: brcmstb: Reuse config structure PCI: brcmstb: Adjust PHY PLL setup to use a 54MHz input refclk arm64: dts: broadcom: bcm2712: Add PCIe DT nodes arm64: dts: broadcom: bcm2712-rpi-5-b: Enable PCIe DT nodes .../brcm,bcm2712-msix.yaml | 60 ++++ .../bindings/pci/brcm,stb-pcie.yaml | 5 +- .../boot/dts/broadcom/bcm2712-rpi-5-b.dts | 8 + arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 160 +++++++++ drivers/irqchip/Kconfig | 16 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-bcm2712-mip.c | 308 ++++++++++++++++++ drivers/pci/controller/pcie-brcmstb.c | 197 ++++++++--- 8 files changed, 707 insertions(+), 48 deletions(-) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2712-msix.yaml create mode 100644 drivers/irqchip/irq-bcm2712-mip.c