Message ID | cover.1748526284.git.andrea.porta@suse.com |
---|---|
Headers | show |
Series | Add support for RaspberryPi RP1 PCI device using a DT overlay | expand |
From: Florian Fainelli <f.fainelli@gmail.com> On Thu, 29 May 2025 15:50:38 +0200, Andrea della Porta <andrea.porta@suse.com> wrote: > Add device tree bindings for the clock generator found in RP1 multi > function device, and relative entries in MAINTAINERS file. > > Signed-off-by: Andrea della Porta <andrea.porta@suse.com> > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> > --- Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks! -- Florian
From: Florian Fainelli <f.fainelli@gmail.com> On Thu, 29 May 2025 15:50:39 +0200, Andrea della Porta <andrea.porta@suse.com> wrote: > Add device tree bindings for the gpio/pin/mux controller that is part of > the RP1 multi function device, and relative entries in MAINTAINERS file. > > Signed-off-by: Andrea della Porta <andrea.porta@suse.com> > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Reviewed-by: Linus Walleij <linus.walleij@linaro.org> > Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> > --- Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks! -- Florian
From: Florian Fainelli <f.fainelli@gmail.com> On Thu, 29 May 2025 15:50:45 +0200, Andrea della Porta <andrea.porta@suse.com> wrote: > The RP1 found on Raspberry Pi 5 board needs an external crystal at 50MHz. > Add clk_rp1_xosc node to provide that. > > Signed-off-by: Andrea della Porta <andrea.porta@suse.com> > Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> > --- Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks! -- Florian
From: Florian Fainelli <f.fainelli@gmail.com> On Thu, 29 May 2025 15:50:47 +0200, Andrea della Porta <andrea.porta@suse.com> wrote: > Define the RP1 node in an overlay. The inclusion tree is > as follow (the arrow points to the includer): > > rp1.dtso > ^ > | > rp1-common.dtsi ----> rp1-nexus.dtsi > > Signed-off-by: Andrea della Porta <andrea.porta@suse.com> > Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> > --- Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks! -- Florian
From: Florian Fainelli <f.fainelli@gmail.com> On Thu, 29 May 2025 15:50:42 +0200, Andrea della Porta <andrea.porta@suse.com> wrote: > The RP1 is an MFD supporting a gpio controller and /pinmux/pinctrl. > Add minimum support for the gpio only portion. The driver is in > pinctrl folder since upcoming patches will add the pinmux/pinctrl > support where the gpio part can be seen as an addition. > > Signed-off-by: Andrea della Porta <andrea.porta@suse.com> > Reviewed-by: Linus Walleij <linus.walleij@linaro.org> > Reviewed-by: Stefan Wahren <wahrenst@gmx.net> > --- Applied to https://github.com/Broadcom/stblinux/commits/drivers/next, thanks! -- Florian
From: Florian Fainelli <f.fainelli@gmail.com> On Thu, 29 May 2025 15:50:44 +0200, Andrea della Porta <andrea.porta@suse.com> wrote: > The RaspberryPi RP1 is a PCI multi function device containing > peripherals ranging from Ethernet to USB controller, I2C, SPI > and others. > > Implement a bare minimum driver to operate the RP1, leveraging > actual OF based driver implementations for the on-board peripherals > by loading a devicetree overlay during driver probe if the RP1 > node is not already present in the DT. > > The peripherals are accessed by mapping MMIO registers starting > from PCI BAR1 region. > > With the overlay approach we can achieve more generic and agnostic > approach to managing this chipset, being that it is a PCI endpoint > and could possibly be reused in other hw implementations. The > presented approach is also used by Bootlin's Microchip LAN966x > patchset (see link) as well, for a similar chipset. > In this case, the inclusion tree for the DT overlay is as follow > (the arrow points to the includer): > > rp1-pci.dtso <---- rp1-common.dtsi > > On the other hand, to ensure compatibility with downstream, this > driver can also work with a DT already comprising the RP1 node, so > the dynamically loaded overlay will not be used if the DT is already > fully defined. > > The reason why this driver is contained in drivers/misc has > been paved by Bootlin's LAN966X driver, which first used the > overlay approach to implement non discoverable peripherals behind a > PCI bus. For RP1, the same arguments apply: it's not used as an SoC > since the driver code is not running on-chip and is not like an MFD > since it does not really need all the MFD infrastructure (shared regs, > etc.). So, for this particular use, misc has been proposed and deemed > as a good choice. For further details about that please check the links. > > This driver is heavily based on downstream code from RaspberryPi > Foundation, and the original author is Phil Elwell. > > Link: https://datasheets.raspberrypi.com/rp1/rp1-peripherals.pdf > Link: https://lore.kernel.org/all/20240612140208.GC1504919@google.com/ > Link: https://lore.kernel.org/all/83f7fa09-d0e6-4f36-a27d-cee08979be2a@app.fastmail.com/ > Link: https://lore.kernel.org/all/2024081356-mutable-everyday-6f9d@gregkh/ > Link: https://lore.kernel.org/all/20240808154658.247873-1-herve.codina@bootlin.com/ > > Signed-off-by: Andrea della Porta <andrea.porta@suse.com> > Acked-by: Bjorn Helgaas <bhelgaas@google.com> # quirks.c, pci_ids.h > Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > --- Applied to https://github.com/Broadcom/stblinux/commits/drivers/next, thanks! -- Florian
From: Florian Fainelli <f.fainelli@gmail.com> On Thu, 29 May 2025 15:50:49 +0200, Andrea della Porta <andrea.porta@suse.com> wrote: > The RP1 driver uses the infrastructure enabled by OF_OVERLAY config > option. Enable that option in defconfig in order to produce a kernel > usable on RaspberryPi5 avoiding to enable it separately. > > Signed-off-by: Andrea della Porta <andrea.porta@suse.com> > Reviewed-by: Stefan Wahren <wahrenst@gmx.net> > Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> > --- Applied to https://github.com/Broadcom/stblinux/commits/defconfig-arm64/next, thanks! -- Florian
On 5/29/25 23:03, Arnd Bergmann wrote: > On Thu, May 29, 2025, at 16:00, Andrea della Porta wrote: >> Hi Krzysztof, >> >> On 15:50 Thu 29 May , Krzysztof Kozlowski wrote: >>> On 29/05/2025 15:50, Andrea della Porta wrote: >>>> *** RESENDING PATCHSET AS V12 SINCE LAST ONE HAS CLOBBERED EMAIL Message-Id *** >>>> >>> Can you slow down please? It's merge window and you keep sending the >>> same big patchset third time today. >> >> Sorry for that, I was sending it so Florian can pick it up for this >> merge window, and I had some trouble with formatting. Hopefully >> this was the last one. > > That's not how the merge window works, you missed 6.16 long ago: > > Florian sent his pull requests for 6.16 in early may, see > https://lore.kernel.org/linux-arm-kernel/20250505165810.1948927-1-florian.fainelli@broadcom.com/ > > and he needed time to test the contents before sending them to me. > > If the driver is ready to be merged now, Florian can pick it up > after -rc1 is out, and then include it in the 6.17 pull requests > so I can include them in the next merge window. I have applied all of the patches in the respective branch as we had discussed with Andrea and also merged all of the branches into my "next" branch so we can give this some proper soak testing. Once 6.16-rc1 is available, all those branches (devicetree/next, defconfig-arm64/next, drivers/next, etc.) will be rebased against that tag such that the patches that are already included will be dropped, and only this patch set plus what I have accumulated will be applied on top (if that makes sense). As Arnd says though, this is too late for 6.16 so this would be included in 6.17. Andrea, thank you very much for your persistence working on this patch series, and sorry that the request to merge those patches came in during a time where I was away. The good news is that I am not doing that again anytime soon. Thank you!
Hi Florian, On 16:46 Fri 30 May , Florian Fainelli wrote: > On 5/29/25 23:03, Arnd Bergmann wrote: > > On Thu, May 29, 2025, at 16:00, Andrea della Porta wrote: > > > Hi Krzysztof, > > > > > > On 15:50 Thu 29 May , Krzysztof Kozlowski wrote: > > > > On 29/05/2025 15:50, Andrea della Porta wrote: > > > > > *** RESENDING PATCHSET AS V12 SINCE LAST ONE HAS CLOBBERED EMAIL Message-Id *** > > > > > > > > > Can you slow down please? It's merge window and you keep sending the > > > > same big patchset third time today. > > > > > > Sorry for that, I was sending it so Florian can pick it up for this > > > merge window, and I had some trouble with formatting. Hopefully > > > this was the last one. > > > > That's not how the merge window works, you missed 6.16 long ago: > > > > Florian sent his pull requests for 6.16 in early may, see > > https://lore.kernel.org/linux-arm-kernel/20250505165810.1948927-1-florian.fainelli@broadcom.com/ > > > > and he needed time to test the contents before sending them to me. > > > > If the driver is ready to be merged now, Florian can pick it up > > after -rc1 is out, and then include it in the 6.17 pull requests > > so I can include them in the next merge window. > > I have applied all of the patches in the respective branch as we had > discussed with Andrea and also merged all of the branches into my "next" > branch so we can give this some proper soak testing. Once 6.16-rc1 is > available, all those branches (devicetree/next, defconfig-arm64/next, > drivers/next, etc.) will be rebased against that tag such that the patches > that are already included will be dropped, and only this patch set plus what > I have accumulated will be applied on top (if that makes sense). > > As Arnd says though, this is too late for 6.16 so this would be included in > 6.17. Andrea, thank you very much for your persistence working on this patch > series, and sorry that the request to merge those patches came in during a > time where I was away. The good news is that I am not doing that again > anytime soon. It was a pleasure, and many thanks for your patience too. Andrea > > Thank you! > -- > Florian
On 6/2/25 00:56, Andrea della Porta wrote: > Hi Florian, > > On 16:46 Fri 30 May , Florian Fainelli wrote: >> On 5/29/25 23:03, Arnd Bergmann wrote: >>> On Thu, May 29, 2025, at 16:00, Andrea della Porta wrote: >>>> Hi Krzysztof, >>>> >>>> On 15:50 Thu 29 May , Krzysztof Kozlowski wrote: >>>>> On 29/05/2025 15:50, Andrea della Porta wrote: >>>>>> *** RESENDING PATCHSET AS V12 SINCE LAST ONE HAS CLOBBERED EMAIL Message-Id *** >>>>>> >>>>> Can you slow down please? It's merge window and you keep sending the >>>>> same big patchset third time today. >>>> >>>> Sorry for that, I was sending it so Florian can pick it up for this >>>> merge window, and I had some trouble with formatting. Hopefully >>>> this was the last one. >>> >>> That's not how the merge window works, you missed 6.16 long ago: >>> >>> Florian sent his pull requests for 6.16 in early may, see >>> https://lore.kernel.org/linux-arm-kernel/20250505165810.1948927-1-florian.fainelli@broadcom.com/ >>> >>> and he needed time to test the contents before sending them to me. >>> >>> If the driver is ready to be merged now, Florian can pick it up >>> after -rc1 is out, and then include it in the 6.17 pull requests >>> so I can include them in the next merge window. >> >> I have applied all of the patches in the respective branch as we had >> discussed with Andrea and also merged all of the branches into my "next" >> branch so we can give this some proper soak testing. Once 6.16-rc1 is >> available, all those branches (devicetree/next, defconfig-arm64/next, >> drivers/next, etc.) will be rebased against that tag such that the patches >> that are already included will be dropped, and only this patch set plus what >> I have accumulated will be applied on top (if that makes sense). >> >> As Arnd says though, this is too late for 6.16 so this would be included in >> 6.17. Andrea, thank you very much for your persistence working on this patch >> series, and sorry that the request to merge those patches came in during a >> time where I was away. The good news is that I am not doing that again >> anytime soon. > > It was a pleasure, and many thanks for your patience too. As a heads up, the kernel robot reported a build failure for devicetree/next due to the missing pcie1 label, I have moved the DT patches from devicetree/next to devicetree-arm64/next where Stanimir's patches adding 2712 PCIe are already present. Thanks!