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 C0E8BD2445D for ; Thu, 10 Oct 2024 23:01:40 +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-Type: MIME-Version:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=ik2yW34cYo3+wuaUQyghwTmrk/xLpbWNPixY+aIZQz8=; b=DQViBwzln+ftS7 OpOwZmnPz7AJR0wkc7wz3ccDqcs4aUpOIumf2MI90z2lyvqcW0Nr7eml1dLn9Wn5bjmM2paHof6bS 1UXQIlw8XOJxQ37xHsfRS/Xdx/2j74a79dYZNZgFzcIyR0w8zfa1VhoJrZs2XDW4ybcdVa3ii+agn pLp7bOGYxzVB9CYTSSEpqMpOjIEJpg4a0S/0+6oFWOAMDixckupnlD14xNvoN8fYl6HuNgy7DT5n5 lSfCgWq6vek9oSjg3/6j/jeyA3vx1dI0t1VNO+LFftj9vPCMV1wVzLdfvp+TY7UP2XaL4JFk32tdm asdYLhmcydyUXiHVOS7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sz29z-0000000Ec8s-3m87; Thu, 10 Oct 2024 23:01:31 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syykS-0000000E5wy-06Gw for linux-arm-kernel@bombadil.infradead.org; Thu, 10 Oct 2024 19:22:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:References; bh=ik2yW34cYo3+wuaUQyghwTmrk/xLpbWNPixY+aIZQz8=; b=ZW1pFW5nuzCGNz0CT1TytdTyQl RuVOQo2B3L0WVJ9qgLCmkF57RrPfDrwa+u7xP1qAa77MdapayybzTfvFPIBRiF1vgy3rLeGIrHuCh o9h9KiPE06WH1UwtU0gxsAuF10uyN9OnfsTkeCT3yfJJi/2MklelMngnB95kGM8/NHp9trR7V8Y0L sUu0JTzmToRgsGmEZ4UKUX4wfYZ2+Kmd/IMlvQelTG5Sf6dRtKmxsZWm9P1IG/+64DZHQEfR8GnNF 35IvHyPVA9Zng4Dle1PHdqzBHgPx5eYTmyKMVdvR+tsh8tldhFgjYn83Vy8wxhgG3q7q2HysbzXTZ jdYufjAQ==; Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syykL-00000005Y0X-3zk7 for linux-arm-kernel@lists.infradead.org; Thu, 10 Oct 2024 19:22:52 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id B67D7A44C2B; Thu, 10 Oct 2024 19:22:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3EDDC4CECD; Thu, 10 Oct 2024 19:22:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728588165; bh=BobLlBAHXvgkmTfcYJ918ZwYFw0KZ50oja9YbgYE578=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=VxL8DtpmsZ5s62//hcB6UyBuWVpNLlNZliRP1k6XpGxdgNjgkNJDpI+25sFjZnh1B hZF92dbDyUbZKSPKZR5OesyedLtFqu6Zv0xzmyzeuBNkShYrobrCwSJZnWaF0rQ/xY zzDxaVNBPuxseoYAbbjT3XpzqwcK33Tr7ZYMqZ32PY8JZZkzsg6DJCXlUoyYDWsb7w VOOJ6NEFaEUnikP1wCdqFs1I/EeHUC3+nJrbMXcyt05oAM/MuNHhwIyJoYRWOesePb 1O/5LhM4vIOWCL6ft9LvN5ZND5wj2IJgJmTaCVhGpIBMJTMf0XjXF9ZR1wMkntSHiw SGBfd3g0zr+tg== Date: Thu, 10 Oct 2024 14:22:43 -0500 From: Bjorn Helgaas To: Herve Codina Cc: Geert Uytterhoeven , Andy Shevchenko , Simon Horman , Lee Jones , Arnd Bergmann , Derek Kiernan , Dragan Cvetic , Greg Kroah-Hartman , Bjorn Helgaas , Philipp Zabel , Lars Povlsen , Steen Hegelund , Daniel Machon , UNGLinuxDriver@microchip.com, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Saravana Kannan , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Horatiu Vultur , Andrew Lunn , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Allan Nielsen , Luca Ceresoli , Thomas Petazzoni Subject: Re: [PATCH v9 1/6] misc: Add support for LAN966x PCI device Message-ID: <20241010192243.GA573660@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241010063611.788527-2-herve.codina@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241010_202250_648217_E6059412 X-CRM114-Status: GOOD ( 27.90 ) 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 Thu, Oct 10, 2024 at 08:36:01AM +0200, Herve Codina wrote: > Add a PCI driver that handles the LAN966x PCI device using a device-tree > overlay. This overlay is applied to the PCI device DT node and allows to > describe components that are present in the device. > > The memory from the device-tree is remapped to the BAR memory thanks to > "ranges" properties computed at runtime by the PCI core during the PCI > enumeration. > > The PCI device itself acts as an interrupt controller and is used as the > parent of the internal LAN966x interrupt controller to route the > interrupts to the assigned PCI INTx interrupt. > > Signed-off-by: Herve Codina > Acked-by: Greg Kroah-Hartman Acked-by: Bjorn Helgaas # quirks.c > --- > drivers/misc/Kconfig | 24 ++++ > drivers/misc/Makefile | 3 + > drivers/misc/lan966x_pci.c | 215 ++++++++++++++++++++++++++++++++++ > drivers/misc/lan966x_pci.dtso | 167 ++++++++++++++++++++++++++ > drivers/pci/quirks.c | 1 + > 5 files changed, 410 insertions(+) > create mode 100644 drivers/misc/lan966x_pci.c > create mode 100644 drivers/misc/lan966x_pci.dtso > > diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig > index 3fe7e2a9bd29..8e5b06ac9b6f 100644 > --- a/drivers/misc/Kconfig > +++ b/drivers/misc/Kconfig > @@ -610,6 +610,30 @@ config MARVELL_CN10K_DPI > To compile this driver as a module, choose M here: the module > will be called mrvl_cn10k_dpi. > > +config MCHP_LAN966X_PCI > + tristate "Microchip LAN966x PCIe Support" > + depends on PCI > + select OF > + select OF_OVERLAY > + select IRQ_DOMAIN > + help > + This enables the support for the LAN966x PCIe device. > + This is used to drive the LAN966x PCIe device from the host system > + to which it is connected. > + > + This driver uses an overlay to load other drivers to support for > + LAN966x internal components. > + Even if this driver does not depend on these other drivers, in order > + to have a fully functional board, the following drivers are needed: I don't think "overlay" by itself has enough context to be useful as help text. Maybe "device tree" or similar hint? Add blank lines between paragraphs or reflow into a single paragraph. > + - fixed-clock (COMMON_CLK) > + - lan966x-oic (LAN966X_OIC) > + - lan966x-cpu-syscon (MFD_SYSCON) > + - lan966x-switch-reset (RESET_MCHP_SPARX5) > + - lan966x-pinctrl (PINCTRL_OCELOT) > + - lan966x-serdes (PHY_LAN966X_SERDES) > + - lan966x-miim (MDIO_MSCC_MIIM) > + - lan966x-switch (LAN966X_SWITCH) > + > source "drivers/misc/c2port/Kconfig" > source "drivers/misc/eeprom/Kconfig" > source "drivers/misc/cb710/Kconfig" > diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c > index dccb60c1d9cc..41dec625ed7b 100644 > --- a/drivers/pci/quirks.c > +++ b/drivers/pci/quirks.c > @@ -6266,6 +6266,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0xa76e, dpc_log_size); > DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_XILINX, 0x5020, of_pci_make_dev_node); > DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_XILINX, 0x5021, of_pci_make_dev_node); > DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_REDHAT, 0x0005, of_pci_make_dev_node); > +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_EFAR, 0x9660, of_pci_make_dev_node); > > /* > * Devices known to require a longer delay before first config space access > -- > 2.46.2 >