mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2 00/21] ARM: rpi: add basic Raspberry Pi 4 support
@ 2022-06-09  5:59 Ahmad Fatoum
  2022-06-09  5:59 ` [PATCH v2 01/21] ARM64: asm: implement read_cpuid_id() Ahmad Fatoum
                   ` (21 more replies)
  0 siblings, 22 replies; 27+ messages in thread
From: Ahmad Fatoum @ 2022-06-09  5:59 UTC (permalink / raw)
  To: barebox

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

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@7e980000.of: dwc2_core_reset: Timeout!
  Waiting for Core Soft Reset
  ERROR: dwc2 fe980000.usb@7e980000.of: probe failed: Connection timed out
  WARNING: bcm2835_mci fe340000.mmc@7e340000.of: Failed to get 'vmmc'
  regulator (ignored).
  bcm2835_mci fe340000.mmc@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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2022-06-14  9:12 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09  5:59 [PATCH v2 00/21] ARM: rpi: add basic Raspberry Pi 4 support Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 01/21] ARM64: asm: implement read_cpuid_id() Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 02/21] dma: add dma_sync nop stubs for PBL Ahmad Fatoum
2022-06-14  8:49   ` Sascha Hauer
2022-06-14  9:00     ` Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 03/21] ARM: rpi: move bcm2835_add_device_sdram() into header Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 04/21] ARM: rpi: support PBL use of mbox Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 05/21] ARM: rpi: split out mbox helpers to share code with PBL Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 06/21] ARM: rpi: switch to ARM_USE_COMPRESSED_DTB Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 07/21] ARM: rpi: add generic Raspberry Pi image Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 08/21] ARM: rpi: support FDT in x0 for 64bit configurations Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 09/21] serial: ns16550: rpi: remove ungating now done by proper clk driver Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 10/21] ARM: cpu: prevent recursive dependencies via CPU_SUPPORTS_64BIT_KERNEL Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 11/21] ARM: cpu: remove unnecessary CONFIG_SYS_SUPPORTS_64BIT_KERNEL Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 12/21] ARM: cpu: remove unused SYS_SUPPORTS_32BIT_KERNEL Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 13/21] ARM: rpi: add Raspberry Pi 3 64-bit build support Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 14/21] ARM: rpi: rpi3: disallow MMU_EARLY && 64BIT Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 15/21] clk: rpi: add Raspberry Pi 4 support Ahmad Fatoum
2022-06-09 13:58   ` Sascha Hauer
2022-06-09 14:15     ` Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 16/21] mci: bcm2835: add bcm2711-emmc2 (Rpi4) support Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 17/21] clocksource: bcm2835: bump below architeced timer for AArch64 Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 18/21] ARM: rpi: add Raspberry Pi 4 support Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 19/21] ARM: rpi: add debug_ll support for Raspberry Pi 4 Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 20/21] doc: bcm283x: reference newer firmware Ahmad Fatoum
2022-06-09  5:59 ` [PATCH v2 21/21] ARM: rpi: use correct kernel8.img as name for 64-bit Ahmad Fatoum
2022-06-10  8:33 ` [PATCH v2 00/21] ARM: rpi: add basic Raspberry Pi 4 support Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox