Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion board/common/uboot/env.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
boot_targets = "virtio mmc";
bootcmd = "run ixboot";

ixvariant = "";
ixpreboot = /incbin/("scripts/ixpreboot.sh");
ixbtn-devmode = /incbin/("scripts/ixbtn-devmode.sh");
ixbtn-factory = /incbin/("scripts/ixbtn-factory.sh");
Expand Down
2 changes: 1 addition & 1 deletion board/common/uboot/scripts/ixpreboot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ for tgt in "${boot_targets}"; do

if load ${devtype} ${devnum}:${auxpart} ${loadaddr} /uboot.env; then
env import -c ${loadaddr} ${filesize} BOOT_ORDER DEBUG ethact BOARD_VARIANT
run ixvariant
test -n "${ixvariant}" && run ixvariant
fi

if test -n "${DEBUG}"; then
Expand Down
5 changes: 3 additions & 2 deletions board/riscv64/Config.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
if BR2_riscv
if BR2_RISCV_64

# No boards yet in tree, visionfive2 is not integrated
source "$BR2_EXTERNAL_INFIX_PATH/board/riscv64/bananapi-bpi-f3/Config.in"
source "$BR2_EXTERNAL_INFIX_PATH/board/riscv64/starfive-visionfive2/Config.in"

endif
6 changes: 6 additions & 0 deletions board/riscv64/bananapi-bpi-f3/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
config BR2_PACKAGE_BANANAPI_BPI_F3
bool "Banana Pi BPI-F3"
depends on BR2_RISCV_64
select SDCARD_AUX
help
Support for the Banana Pi BPI-F3, based on the SpacemiT K1 SoC.
13 changes: 13 additions & 0 deletions board/riscv64/bananapi-bpi-f3/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright (c) 2026 The KernelKit Authors

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
55 changes: 55 additions & 0 deletions board/riscv64/bananapi-bpi-f3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Banana Pi BPI-F3
================

The [BPI-F3][1] is a SpacemiT K1 (8x RISC-V X60) board with two GbE
ports, eMMC, and a microSD slot. Infix runs from SD card.

| **Component** | **Source** |
|-----------------|--------------------------------------------------|
| FSBL (DDR init) | SpacemiT `uboot-2022.10`, `k1-bl-v2.2.y` |
| OpenSBI | upstream v1.8.1 |
| U-Boot | `kkit-u-boot-2026.10.y`, `spacemit_k1_defconfig` |


How to Build
------------

```
$ make O=x-boot bpi_f3_boot_defconfig
$ make O=x-boot
$ make riscv64_defconfig
$ make
$ ./utils/mkimage.sh -b x-boot -r output bananapi-bpi-f3
$ sudo dd if=x-boot/images/infix-bpi-f3-sdcard.img of=/dev/mmcblk0 bs=1M status=progress oflag=direct
```


Booting the Board
-----------------

1. Connect a 3.3V TTL UART to the debug header, 115200 8N1
2. Insert the SD card and power on


Limitations
-----------

Linux 6.18:

- SD card support needs backported device tree and driver changes
- Reboot and power-off need a backported P1 PMIC driver
- SD card limited to 3.3V signalling (`no-1-8-v`), no UHS modes
- PDMA disabled in the board DT, its probe hangs the boot
- No temperature sensors, the K1 thermal driver landed in v7.2
- No PCIe, so no WiFi or NVMe, the K1 PCIe drivers landed after 6.18
- No USB, the K1 USB2 PHY driver landed after 6.18
- The P1 RTC cannot be read at boot, the clock starts from the build default

Boot loader:

- Vendor FSBL (U-Boot 2022.10 SPL) for DDR init
- U-Boot has no Ethernet driver for the K1, so there is no netboot
- U-Boot has no reset driver for the K1, `reset` does nothing
- SD card image only, no eMMC image yet

[1]: https://docs.banana-pi.org/en/BPI-F3/BananaPi_BPI-F3
2 changes: 2 additions & 0 deletions board/riscv64/bananapi-bpi-f3/bananapi-bpi-f3.hash
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Locally calculated
sha256 d48246c717b505cc11df95171f2fd548b389e1a463f1af4c68d0b69fe0d1009b LICENSE
31 changes: 31 additions & 0 deletions board/riscv64/bananapi-bpi-f3/bananapi-bpi-f3.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
define BANANAPI_BPI_F3_LINUX_CONFIG_FIXUPS
$(call KCONFIG_ENABLE_OPT,CONFIG_ARCH_SPACEMIT)
$(call KCONFIG_ENABLE_OPT,CONFIG_SPACEMIT_CCU)
$(call KCONFIG_ENABLE_OPT,CONFIG_SPACEMIT_K1_CCU)
$(call KCONFIG_ENABLE_OPT,CONFIG_PINCTRL_SPACEMIT_K1)
$(call KCONFIG_ENABLE_OPT,CONFIG_GPIO_SPACEMIT_K1)
$(call KCONFIG_ENABLE_OPT,CONFIG_RESET_SPACEMIT)
$(call KCONFIG_ENABLE_OPT,CONFIG_MFD_SYSCON)
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_8250)
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_8250_CONSOLE)
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_OF_PLATFORM)
$(call KCONFIG_ENABLE_OPT,CONFIG_MMP_PDMA)
$(call KCONFIG_ENABLE_OPT,CONFIG_I2C_K1)
$(call KCONFIG_ENABLE_OPT,CONFIG_MFD_SPACEMIT_P1)
$(call KCONFIG_ENABLE_OPT,CONFIG_REGULATOR_SPACEMIT_P1)
$(call KCONFIG_ENABLE_OPT,CONFIG_REGULATOR_FIXED_VOLTAGE)
$(call KCONFIG_ENABLE_OPT,CONFIG_RTC_DRV_SPACEMIT_P1)
$(call KCONFIG_ENABLE_OPT,CONFIG_POWER_RESET_SPACEMIT_P1)
$(call KCONFIG_ENABLE_OPT,CONFIG_MMC)
$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_SDHCI)
$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_SDHCI_PLTFM)
$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_SDHCI_OF_K1)
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_VENDOR_SPACEMIT)
$(call KCONFIG_ENABLE_OPT,CONFIG_SPACEMIT_K1_EMAC)
$(call KCONFIG_ENABLE_OPT,CONFIG_REALTEK_PHY)
$(call KCONFIG_ENABLE_OPT,CONFIG_LEDS_GPIO)
$(call KCONFIG_ENABLE_OPT,CONFIG_LEDS_TRIGGER_HEARTBEAT)
endef

$(eval $(ix-board))
$(eval $(generic-package))
1 change: 1 addition & 0 deletions board/riscv64/bananapi-bpi-f3/dts/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dtb-y += spacemit/k1-bananapi-f3.dtb
13 changes: 13 additions & 0 deletions board/riscv64/bananapi-bpi-f3/dts/spacemit/infix.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Common Infix OS defaults
*/

/ {
chosen {
infix {
/* Default admin user password: 'admin' */
factory-password-hash = "$5$mI/zpOAqZYKLC2WU$i7iPzZiIjOjrBF3NyftS9CCq8dfYwHwrmUK097Jca9A";
};
};
};
19 changes: 19 additions & 0 deletions board/riscv64/bananapi-bpi-f3/dts/spacemit/k1-bananapi-f3.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include <riscv/spacemit/k1-bananapi-f3.dts>
#include "infix.dtsi"

/*
* UHS needs the pinctrl driver to switch the SD pads' IO power domain
* to 1.8V, which 6.18 does not do. Stay at 3.3V signalling until a
* kernel that does.
*/
&sdhci0 {
no-1-8-v;
};

/*
* The 6.18 PDMA driver hangs the boot in probe on this board, and no
* peripheral uses DMA yet.
*/
&pdma {
status = "disabled";
};
92 changes: 92 additions & 0 deletions board/riscv64/bananapi-bpi-f3/genimage.cfg.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
image cfg.ext4 {
empty = true
temporary = true
size = 16M

ext4 {
label = "cfg"
use-mke2fs = true
features = "uninit_bg"
extraargs = "-m 0 -i 4096"
}
}

# The /var partition will be expanded automatically at first boot
# to use the full size of the SD-card or eMMC media.
image var.ext4 {
empty = true
temporary = true
size = 128M

ext4 {
label = "var"
use-mke2fs = true
features = "uninit_bg"
extraargs = "-m 0 -i 4096"
}
}

image #IX_ID##VERSION#-bpi-f3-sdcard.img {
hdimage {
partition-table-type = "gpt"
}

partition bootinfo {
in-partition-table = false
offset = 0
image = "bootinfo_sd.bin"
}

partition fsbl {
offset = 128K
size = 256K
image = "FSBL.bin"
}

# Read by the vendor FSBL, left empty for its built-in defaults
partition env {
offset = 384K
size = 64K
}

partition opensbi {
offset = 1M
size = 1M
image = "fw_dynamic.itb"
}

partition uboot {
offset = 2M
size = 2M
image = "u-boot.itb"
}

partition aux {
partition-uuid = D4EF35A0-0652-45A1-B3DE-D63339C82035
image = "aux.ext4"
}

partition primary {
partition-type-uuid = linux
bootable = true
size = 250M
image = "rootfs.squashfs"
}

partition secondary {
partition-type-uuid = linux
bootable = true
size = 250M
image = "rootfs.squashfs"
}

partition cfg {
partition-uuid = 7aa497f0-73b5-47e5-b2ab-8752d8a48105
image = "cfg.ext4"
}

partition var {
partition-uuid = 8046A06A-E45A-4A14-A6AD-6684704A393F
image = "var.ext4"
}
}
Loading
Loading