Skip to content

Arm Juno board OF_CONTROL upgrade

Andre Przywara u-boot 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 0 repliesNew
  2. v27 patches 0 repliesSuperseded
  3. v17 patches 0 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7arm: juno: Fix Juno address variablesinclude/configs/vexpress_aemv8a.h+13 -152 replies
2/7uart: pl011: Add proper DM clock supportdrivers/serial/serial_pl01x.c+31 -162 replies
2/7uart: pl011: Add proper DM clock support+0 -01 reply
3/7arm: juno: Fix UART clock rateinclude/configs/vexpress_aemv8a.h+1 -12 replies
4/7arm: juno: Enable OF_CONTROLarch/arm/Kconfig board/armltd/vexpress64/Kconfig board/armltd/vexpress64/vexpress64.c +1 more+70 -32 replies
5/7arm: juno: Use PSCI based resetarch/arm/Kconfig board/armltd/vexpress64/vexpress64.c+3 -32 replies
6/7arm: juno: enable USBarch/arm/Kconfig configs/vexpress_aemv8a_juno_defconfig include/configs/vexpress_aemv8a.h+14 -02 replies
7/7arm: vexpress64: Remove unneeded CONFIG_ checkinclude/configs/vexpress_aemv8a.h+0 -62 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchLinus WalleijLiviu DudauSimon Glass
1/7R-b
2/7R-b
2/7R-b
3/7R-b R-b
4/7R-b R-b
5/7A-b R-b
6/7R-b A-b R-b
7/7R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/7] Arm Juno board OF_CONTROL upgrade

Hi,

another small update, fixing the Raspberry Pi breakage from the previous version. Only patch 2/7 has changed.
I added Linus' Reviewed-by: to patch 7/7 and dropped Simon's R-b: to patch 2/7, because of the changes.

Cheers,
Andre

------------
The Juno port in U-Boot didn't see much love lately, so it has fallen a bit behind. We already get a build warning for using an old network driver, but there is more:
- The port is using hardcoded information, even though we have quite decent DTs available to find things at runtime.
- There is no support for USB or PCI, which pretty much limits the board to load a kernel from flash (yuck!) or TFTP (at least!).
- Probably because of this, newer features like UEFI support don't work properly.
- There are minor things like less-than-ideal default load addresses and missing reset support.

This series is the first part of fixing this. The main part is to switch the board port to use OF_CONTROL, so U-Boot will use a DT to configure itself at runtime. This requires some update to the PL011 driver first (patch 2/7), and allows us to simply enable USB in the defconfig (patch 6/7). USB requires two "usb reset" calls after the initial "usb start" to recognise any devices, not sure why this is.
But eventually I am able to load grub from a USB hard drive and do a full featured Ubuntu UEFI boot from there (with a distro kernel).

Patches 1, 3, and 7 are mere fixes, patch 4/7 does the actual OF_CONTROL conversion.

I also have some proper DM_PCI compliant driver in an advanced state, which allows to load from a SATA hard disk. Unfortunately there is no sky2 network driver in U-Boot, so the Gigabit Ethernet chip connected to PCI will not work easily.
I will post this once this is cleaned up and tested.

Converting the smc network driver to DM_ETH is on my list as well, but the code is shared with some U-Boot *application* code, also used by some PowerPC boards, so that's not really a low hanging fruit. But it would remove the deprecation warning.

Cheers,
Andre

Changelog v2 ... v3:
- cope with platforms not defining CONFIG_PL011_CLOCK

Changelog v1 ... v2:
- drop fdt_high and initrd_high variables
- rename initrd_addr to ramdisk_addr_r

P.S. In case you want to test this without flashing it, you can chainload U-Boot from an existing U-Boot installation:

$ mkimage -A arm64 -O u-boot -T standalone -C none -a 0xe0000000 -e 0xe0000000
  -d u-boot.bin -n U-Boot /srv/tftp/u-boot-juno.img
VExpress64# tftpboot 0xe0000000 u-boot-juno.img
VExpress64# bootm

Andre Przywara (7):
arm: juno: Fix Juno address variables
uart: pl011: Add proper DM clock support
arm: juno: Fix UART clock rate
arm: juno: Enable OF_CONTROL
arm: juno: Use PSCI based reset
arm: juno: enable USB
arm: vexpress64: Remove unneeded CONFIG_ check

 arch/arm/Kconfig                       | 11 +++++
 board/armltd/vexpress64/Kconfig        |  7 +++
 board/armltd/vexpress64/vexpress64.c   | 61 ++++++++++++++++++++++++--
 configs/vexpress_aemv8a_juno_defconfig |  9 ++--
 drivers/serial/serial_pl01x.c          | 47 +++++++++++++-------
 include/configs/vexpress_aemv8a.h      | 41 ++++++++---------
 6 files changed, 132 insertions(+), 44 deletions(-)
Signature · 1 line
2.17.5