[PATCH v2 00/21] ARM: rpi: add basic Raspberry Pi 4 support

Sascha Hauer sha at pengutronix.de
Fri Jun 10 01:33:07 PDT 2022


On Thu, Jun 09, 2022 at 07:59:01AM +0200, Ahmad Fatoum wrote:
> Just basic support, so we get a shell on mini-uart and SD
> working and can boot a Linux kernel with all cores usable.
> Needs more work for USB and Ethernet, but I'll leave that
> to others now that the initial hurdle is overcome.
> 
> I tested this series on Raspberry Pi 3b (both 32-bit and newly
> added 64-bit support) and Raspberry Pi 4b (both 32/64-bit).
> 
> v1 -> v2:
>   - add new common barebox-raspberry-pi.img that includes all
>     enabled DTs. The old approach with barebox-dt-2nd.img proved
>     inadequate, because VideoCore applied overlays to barebox DT,
>     when they were needed for the kernel and it made support
>     for Raspberry Pi kernel (with different bindings) harder.
>   - Use mailbox in PBL to determine which DT to use
>   - Use compressed DTBs
>   - fix breakage for existing 64-bit platforms due to
>     how CPU/SYS_SUPPORTS_64BIT_KERNEL was mishandled
>   - fix /env/boot/rpi for 64-bit
>   - replace ns16550 driver hack with DT hack

Applied, thanks

Sascha

> 
> Boot log:
> 
>   >Deep probe supported due to raspberrypi,4-model-b
>   Switch to console [cs0]
>   
>   
>   barebox 2022.05.0-00152-g628da31493e4 #14 Wed Jun 8 22:35:07 CEST 2022
>   
>   
>   Board: Raspberry Pi 4 Model B
>   Deep probe supported due to raspberrypi,4-model-b
>   reserved-memory: region /memreserve 0x00000000-0x00000fff
>   WARNING: dwc2 fe980000.usb at 7e980000.of: dwc2_core_reset: Timeout!
>   Waiting for Core Soft Reset
>   ERROR: dwc2 fe980000.usb at 7e980000.of: probe failed: Connection timed out
>   WARNING: bcm2835_mci fe340000.mmc at 7e340000.of: Failed to get 'vmmc'
>   regulator (ignored).
>   bcm2835_mci fe340000.mmc at 7e340000.of: registered as mci0
>   malloc space: 0x1d87f1e0 -> 0x3b0fe3bf (size 472.5 MiB)
>   mci0: detected SD card version 2.0
>   mci0: registered disk0
>   environment load /boot/barebox.env: No such file or directory
>   Maybe you have to create the partition.
> 
> Ahmad Fatoum (20):
>   ARM64: asm: implement read_cpuid_id()
>   dma: add dma_sync nop stubs for PBL
>   ARM: rpi: move bcm2835_add_device_sdram() into header
>   ARM: rpi: support PBL use of mbox
>   ARM: rpi: split out mbox helpers to share code with PBL
>   ARM: rpi: switch to ARM_USE_COMPRESSED_DTB
>   ARM: rpi: add generic Raspberry Pi image
>   ARM: rpi: support FDT in x0 for 64bit configurations
>   serial: ns16550: rpi: remove ungating now done by proper clk driver
>   ARM: cpu: prevent recursive dependencies via CPU_SUPPORTS_64BIT_KERNEL
>   ARM: cpu: remove unnecessary CONFIG_SYS_SUPPORTS_64BIT_KERNEL
>   ARM: cpu: remove unused SYS_SUPPORTS_32BIT_KERNEL
>   ARM: rpi: add Raspberry Pi 3 64-bit build support
>   ARM: rpi: rpi3: disallow MMU_EARLY && 64BIT
>   clk: rpi: add Raspberry Pi 4 support
>   clocksource: bcm2835: bump below architeced timer for AArch64
>   ARM: rpi: add Raspberry Pi 4 support
>   ARM: rpi: add debug_ll support for Raspberry Pi 4
>   doc: bcm283x: reference newer firmware
>   ARM: rpi: use correct kernel8.img as name for 64-bit
> 
> Uwe Kleine-König (1):
>   mci: bcm2835: add bcm2711-emmc2 (Rpi4) support
> 
>  Documentation/boards/bcm2835.rst              |  17 ++-
>  arch/arm/Kconfig                              |  10 +-
>  arch/arm/boards/raspberry-pi/Makefile         |   1 +
>  arch/arm/boards/raspberry-pi/lowlevel.c       | 129 +++++++++++++++---
>  arch/arm/boards/raspberry-pi/lowlevel.h       |   5 +
>  arch/arm/boards/raspberry-pi/mbox-helpers.c   |  73 ++++++++++
>  arch/arm/boards/raspberry-pi/rpi-common.c     | 129 ++++++------------
>  arch/arm/configs/rpi_v8a_defconfig            | 111 +++++++++++++++
>  arch/arm/cpu/Kconfig                          |   7 -
>  arch/arm/dts/Makefile                         |   1 +
>  arch/arm/dts/bcm2711-rpi-4.dts                |  18 +++
>  arch/arm/include/asm/cputype.h                |  22 ++-
>  arch/arm/include/asm/system_info.h            |   6 +
>  arch/arm/mach-bcm283x/Kconfig                 |  29 +++-
>  arch/arm/mach-bcm283x/Makefile                |   2 +-
>  arch/arm/mach-bcm283x/core.c                  |  57 ++++----
>  arch/arm/mach-bcm283x/include/mach/core.h     |  23 ++--
>  arch/arm/mach-bcm283x/include/mach/debug_ll.h |  26 ++++
>  arch/arm/mach-bcm283x/include/mach/mbox.h     |   4 +
>  arch/arm/mach-bcm283x/include/mach/platform.h |   5 +-
>  arch/arm/mach-bcm283x/mbox.c                  |  26 ++--
>  arch/arm/mach-imx/Kconfig                     |   2 +-
>  arch/arm/mach-layerscape/Kconfig              |   2 +-
>  arch/arm/mach-rockchip/Kconfig                |   2 +-
>  common/Kconfig                                |   7 +
>  drivers/clk/clk-rpi.c                         |  42 ++++--
>  drivers/clocksource/bcm2835.c                 |   3 +-
>  drivers/mci/mci-bcm2835.c                     |   4 +-
>  drivers/serial/serial_ns16550.c               |   4 -
>  images/Makefile.bcm283x                       |  10 ++
>  include/dma.h                                 |  19 +++
>  31 files changed, 593 insertions(+), 203 deletions(-)
>  create mode 100644 arch/arm/boards/raspberry-pi/mbox-helpers.c
>  create mode 100644 arch/arm/configs/rpi_v8a_defconfig
>  create mode 100644 arch/arm/dts/bcm2711-rpi-4.dts
> 
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> barebox mailing list
> barebox at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list