Skip to content

Add support for Banana Pi BPi-F3 - #1699

Merged
troglobit merged 11 commits into
mainfrom
bpi-f3
Oct 13, 2026
Merged

troglobit merged 11 commits into
mainfrom
bpi-f3

Conversation

@troglobit

Copy link
Copy Markdown
Contributor

Description

Banana Pi BPI-F3 (SpacemiT K1) support, plus a cleanup of the riscv64 BSP so it follows the aarch64 layout: one board package per board.

What works

  • VisionFive2 builds and boots as before, now as a board package
  • BPi-F3 boots Infix from SD card: vendor FSBL, OpenSBI 1.8.1, mainline U-Boot with the usual ixboot flow and signed image verification
  • Serial console, both GbE ports, eMMC, SD card, P1 PMIC
  • Admin login with a board factory-config, DHCP client on both ports
  • Reboot via dedicated PMIC driver

Limitations, resolved by the upcoming 7.4 kernel upgrade

The 6.18 kernel lacks most K1 support, so this carries backports for the SD card and PMIC reboot. Mainline has these, and more:

  • No temperature sensors
  • No PCIe, so no WiFi or NVMe
  • No USB
  • SD card limited to 3.3V, no UHS modes
  • PDMA disabled, its probe hangs the boot on 6.18

With 7.4 the kernel backports go away, and the PDMA and 3.3V workarounds get rechecked.

Other limitations

  • Vendor FSBL for DDR init, until mainline U-Boot SPL is usable
  • U-Boot has no Ethernet (no netboot) or reset driver for the K1
  • SD card image only, eMMC image to follow

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

The 1.11.1 release tarball lacks cipher/simd-common-riscv.h, so the
RISC-V vector code fails to build.  Fixed upstream in 1.11.2.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The VisionFive2 was wired straight into riscv64_defconfig, and its
paths still pointed at board/riscv64/visionfive2/ after the directory
was renamed, so the defconfig no longer built.  Make it an ix-board
package like the aarch64 boards, with the JH7110 kernel options in its
.mk, so riscv64 can take more boards and a single-board build still
gets a working kernel.

The factory password hash moves from a kernel patch to the board's own
infix.dtsi.  The camera, audio and display drivers are not carried
over.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The VisionFive2's U-Boot and OpenSBI were built as part of
riscv64_defconfig, which ties the generic riscv64 image to one board.
Give it its own boot defconfig, like the aarch64 boards, and let
mkimage.sh put the SD card image together.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
riscv64 had fallen behind the other architectures.  It was still on
Linux 6.8.2, which none of the kernel patches in patches/linux/ apply
to, it lacked the test mode the regression tests rely on, and it still
built an ext2 root filesystem that nothing uses.  Rebase it on
aarch64_defconfig so the two only differ in architecture and boards.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The riscv64 kernel config was a StarFive desktop config, with sound,
camera, DRM and NFS root, and it never picked up the netfilter, ipset
and LSM settings the other architectures have.  Derive it from the
aarch64 config instead, without the SoC drivers, so it carries the
common Infix feature set and leaves hardware to the board packages.

On riscv nothing selects SMP, GPIOLIB, PINCTRL, PM and friends the way
the arm64 platform options do, so they are set explicitly.  Also
enable earlycon over SBI for board bring-up.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The 6.18 device tree for the K1 has no SD card controller, nor the
I2C bus and P1 PMIC that supply the card, and the 6.18 SD driver never
turns on the card clock, so Linux cannot use the SD card the BPi-F3
boots from.  Take the nodes and driver fixes from v7.2, the nodes
trimmed of the USB3, SPI and PCIe parts they were diffed against.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The K1 BootROM loads a signed first stage loader that brings up DDR
before anything else runs.  Mainline U-Boot can build that SPL now,
but only with SpacemiT's signing tool and DDR firmware blob, so use
the vendor SPL for the time being and run mainline U-Boot after it.

The FSBL also loads an OpenSBI FIT from its own partition, so wrap
the OpenSBI build in the format it expects.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@troglobit
troglobit requested a review from mattiaswal October 12, 2026 15:48
SpacemiT K1 based board with two GbE ports, eMMC and an SD card slot.
This first spin runs from SD card.  The SD pads stay at 3.3V because
6.18 cannot switch their IO power domain for UHS.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The vendor FSBL brings up DDR and loads upstream OpenSBI and mainline
U-Boot from the SD card.  Mainline gained K1 SD and eMMC support after
v2026.10, so U-Boot comes from a kkit branch with those changes picked
on top of the release.  U-Boot has no Ethernet for the K1 yet.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The empty default never made it into the environment, since setting a
variable to the empty string deletes it.  So boards without a variant
script printed '## Error: "ixvariant" not defined' on every boot with
a uboot.env on aux.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Neither OpenSBI nor Linux 6.18 can reset the K1, so reboot hangs the
board.  The P1 PMIC driver for it landed in v6.19, its MFD cell in
v7.2.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@troglobit
troglobit merged commit d93c7fd into main Oct 13, 2026
9 checks passed
@troglobit
troglobit deleted the bpi-f3 branch October 13, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants