boards: Add board BananaPi F3

RISC-V SpacemiT K1 SoC

Signed-off-by: Patrick Yavitz <pyavitz@armbian.com>
This commit is contained in:
Patrick Yavitz
2024-06-25 10:22:53 -04:00
committed by Igor
parent c91039bc28
commit d66c4d9fce
3 changed files with 85 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
# SpacemiT K1 octa core RISC-V SoC 2GB/4GB RAM 8GB/16GB eMMC 4x USB3 2x GbE
BOARD_NAME="Banana Pi F3"
BOARDFAMILY="spacemit"
BOARD_MAINTAINER=""
KERNEL_TARGET="legacy,current"
BOOT_FDT_FILE="spacemit/k1-bananapi-f3.dtb"
SRC_EXTLINUX="yes"
SRC_CMDLINE="earlycon=sbi console=tty1 console=ttyS0,115200 clk_ignore_unused swiotlb=65536"
PACKAGE_LIST_BOARD="rfkill bluetooth bluez bluez-tools"
function post_config_uboot_target__extra_configs_for_bananapi_f3() {
display_alert "u-boot for ${BOARD}" "u-boot: enabling extra configs" "info"
run_host_command_logged scripts/config --enable CONFIG_SD_BOOT
run_host_command_logged scripts/config --enable CONFIG_EXT4_WRITE
run_host_command_logged scripts/config --enable CONFIG_FS_BTRFS
run_host_command_logged scripts/config --enable CONFIG_CMD_BTRFS
}
function post_family_tweaks_bsp__bananapi_f3_extras() {
if [[ -d "$SRC/packages/blobs/riscv64/spacemit" ]]; then
run_host_command_logged mkdir -pv "${destination}"/lib/firmware
display_alert "$BOARD" "Installing boot firmware" "info"
run_host_command_logged cp -fv $SRC/packages/blobs/riscv64/spacemit/esos.elf "${destination}"/lib/firmware
fi
display_alert "$BOARD" "Force load wireless" "info"
run_host_command_logged mkdir -pv "${destination}"/etc/modprobe.d
run_host_command_logged echo "options 8852bs rtw_drv_log_level=0 rtw_phl_log_level=0" > "${destination}"/etc/modprobe.d/50-8852bs.conf
run_host_command_logged mkdir -pv "${destination}"/etc/modules-load.d
run_host_command_logged echo "8852bs" > "${destination}"/etc/modules-load.d/${BOARD}.conf
}

View File

@@ -0,0 +1,26 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/* Copyright (c) 2024 Spacemit, Inc */
/dts-v1/;
#include "k1-x_deb1.dts"
/ {
model = "BananaPi BPI-F3";
};
&pcie2_rc {
num-lanes = <1>;
};
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2>;
status = "okay";
bluetooth {
compatible = "realtek,rtl8852bs-bt";
device-wake-gpios = <&gpio 64 GPIO_ACTIVE_HIGH>;
host-wake-gpios = <&gpio 65 GPIO_ACTIVE_HIGH>;
};
};

View File

@@ -0,0 +1,26 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/* Copyright (c) 2024 Spacemit, Inc */
/dts-v1/;
#include "k1-x_deb1.dts"
/ {
model = "BananaPi BPI-F3";
};
&pcie2_rc {
num-lanes = <1>;
};
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2>;
status = "okay";
bluetooth {
compatible = "realtek,rtl8852bs-bt";
device-wake-gpios = <&gpio 64 GPIO_ACTIVE_HIGH>;
host-wake-gpios = <&gpio 65 GPIO_ACTIVE_HIGH>;
};
};