]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI: brcmstb: Add BCM2712 support
authorStanimir Varbanov <svarbanov@suse.de>
Mon, 24 Feb 2025 08:35:59 +0000 (10:35 +0200)
committerKrzysztof Wilczyński <kwilczynski@kernel.org>
Tue, 4 Mar 2025 15:54:08 +0000 (15:54 +0000)
commit377bced88c326499b05114722e0dcff29799edb0
tree5002fc4c6cf635ac6614910457aeb92e364a9601
parent25a98c727015638baffcfa236e3f37b70cedcf87
PCI: brcmstb: Add BCM2712 support

Add a bare minimum amount of changes in order to support PCIe Root
Complex hardware IP found on RPi5. The PCIe controller on BCM2712
is based on BCM7712 and as such it inherits register offsets, PERST#
assertion, bridge_reset ops, and inbound windows count.

Although, the implementation for BCM2712 needs a workaround related to
the control of the bridge_reset where turning off of the Root Port must
not shutdown the bridge_reset and this must be avoided. To implement
this workaround a quirks field is introduced in pcie_cfg_data struct.

The controller also needs adjustment of PHY PLL setup to use a 54MHz
input refclk. The default input reference clock for the PHY PLL is
100Mhz, except for some devices where it is 54Mhz like BCM2712C1 and
BCM2712D0.

To implement those adjustments introduce a new .post_setup op in
pcie_cfg_data and call it at the end of brcm_pcie_setup function.

The BCM2712 .post_setup callback implements the required MDIO writes
that switch the PLL refclk and also change PHY PM clock period.

Without this RPi5 PCIex1 is unable to enumerate endpoint devices on
the expansion connector.

Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Jim Quinlan <james.quinlan@broadcom.com>
Tested-by: Ivan T. Ivanov <iivanov@suse.de>
Link: https://lore.kernel.org/r/20250224083559.47645-8-svarbanov@suse.de
[commit log]
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
drivers/pci/controller/pcie-brcmstb.c