Hi,since your goal is minimal Raspberry Pi 5 support, i suggest to use this
This patchset adds support for the SDHCI controller on Broadcom BCM2712
SoC in order to make it possible to boot (particularly) Raspberry Pi 5
from SD card. This work is heavily based on downstream contributions.
Patch #1 and 2: introduce the dt binding definitions for, respectively,The patch still seems to contain a lot unnecessary stuff (Wifi, BT,
the new pin cfg/mux controller and the SD host controller as a preparatory
step for the upcoming dts.
Patch #3: add a somewhat reasonable (*almost* bare-minimum) dts to be used
to boot Rpi5 boards. Since till now there was no support at all for any
2712 based chipset, both the SoC and board dts plus definitions for the
new Pin and SD host controller have been added.
Patch #4: the driver supporting the pin controller. Based on [1] andI don't think this should be necessary for minimal Raspberry Pi 5
successive fix commits.
Patch #5: add SDHCI support. Based on [2] and the next 2 fix commits.
Drop the SD Express implementation for now, that will be added by patch
#6.
Patch #6: this patch offers SD Express support and can be considered totally
optional. The callback plumbing is slightly different w.r.t. the downstream
approach (see [3]), as explained in the patch comment. Not sure what is the best,
any comment is highly appreciated.
Tested succesfully on Raspberry Pi 5 using an SDxC card as the boot device.
Still untested:
- SD Express due to the lack of an Express capable card.
Also, it will need PCIe support first.
- card detection pin, since the sd was the booting and root fs device.
Many thanks,
Andrea
Links:
[1] - https://github.com/raspberrypi/linux/commit/d9b655314a826724538867bf9b6c229d04c25d84
[2] - https://github.com/raspberrypi/linux/commit/e3aa070496e840e72a4dc384718690ea4125fa6a
[3] - https://github.com/raspberrypi/linux/commit/eb1df34db2a9a5b752eba40ee298c4ae87e26e87
Andrea della Porta (6):
dt-bindings: pinctrl: Add support for BCM2712 pin controller
dt-bindings: mmc: Add support for BCM2712 SD host controller
arm64: dts: broadcom: Add support for BCM2712
pinctrl: bcm: Add pinconf/pinmux controller driver for BCM2712
mmc: sdhci-brcmstb: Add BCM2712 support
mmc: sdhci-brcmstb: Add BCM2712 SD Express support
.../bindings/mmc/brcm,sdhci-brcmstb.yaml | 51 +-
.../pinctrl/brcm,bcm2712-pinctrl.yaml | 99 ++
arch/arm64/boot/dts/broadcom/Makefile | 1 +
.../boot/dts/broadcom/bcm2712-rpi-5-b.dts | 313 +++++
arch/arm64/boot/dts/broadcom/bcm2712-rpi.dtsi | 81 ++
arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 841 +++++++++++
drivers/mmc/host/Kconfig | 1 +
drivers/mmc/host/sdhci-brcmstb.c | 275 ++++
drivers/pinctrl/bcm/Kconfig | 9 +
drivers/pinctrl/bcm/Makefile | 1 +
drivers/pinctrl/bcm/pinctrl-bcm2712.c | 1247 +++++++++++++++++
11 files changed, 2918 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm2712-pinctrl.yaml
create mode 100644 arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
create mode 100644 arch/arm64/boot/dts/broadcom/bcm2712-rpi.dtsi
create mode 100644 arch/arm64/boot/dts/broadcom/bcm2712.dtsi
create mode 100644 drivers/pinctrl/bcm/pinctrl-bcm2712.c