Merge pull request #201 from luckfox-eng29/pullrequest

Add Luckfox Pico WebBee support
This commit is contained in:
luckfox-eng33 2024-11-29 17:33:44 +08:00 committed by GitHub
commit 23c4e3c690
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 430 additions and 6 deletions

View File

@ -153,6 +153,7 @@ function choose_target_board() {
"RV1103_Luckfox_Pico_Mini_A"
"RV1103_Luckfox_Pico_Mini_B"
"RV1103_Luckfox_Pico_Plus"
"RV1103_Luckfox_Pico_WebBee"
"RV1106_Luckfox_Pico_Pro"
"RV1106_Luckfox_Pico_Max"
"RV1106_Luckfox_Pico_Ultra"
@ -176,6 +177,8 @@ function choose_target_board() {
LUNCH_NUM=$((LUNCH_NUM + 1))
echo "${space8}${space8}[${LUNCH_NUM}] RV1103_Luckfox_Pico_Plus"
LUNCH_NUM=$((LUNCH_NUM + 1))
echo "${space8}${space8}[${LUNCH_NUM}] RV1103_Luckfox_Pico_WebBee"
LUNCH_NUM=$((LUNCH_NUM + 1))
echo "${space8}${space8}[${LUNCH_NUM}] RV1106_Luckfox_Pico_Pro"
LUNCH_NUM=$((LUNCH_NUM + 1))
echo "${space8}${space8}[${LUNCH_NUM}] RV1106_Luckfox_Pico_Max"
@ -196,10 +199,10 @@ function choose_target_board() {
msg_error "Error: HW_INDEX is not a number."
exit 1
else
if (($HW_INDEX < 0 || $HW_INDEX > 8)); then
msg_error "Error: HW_INDEX is not in the range 0-8."
if (($HW_INDEX < 0 || $HW_INDEX > $LUNCH_NUM)); then
msg_error "Error: HW_INDEX is not in the range 0-$LUNCH_NUM."
exit 1
elif [ $HW_INDEX == 8 ]; then
elif [ $HW_INDEX == $LUNCH_NUM ]; then
for item in ${RK_TARGET_BOARD_ARRAY[@]}; do
local f0 boot_medium ddr sys_ver hardware_version product_name
echo "----------------------------------------------------------------"
@ -267,8 +270,8 @@ function choose_target_board() {
#fi
range_sd_card=(0 1)
range_sd_card_spi_nand=(2 3 4 5)
range_emmc=(6 7)
range_sd_card_spi_nand=(2 3 4 5 6)
range_emmc=(7 8)
if __IS_IN_ARRAY "$HW_INDEX" "${range_sd_card[@]}"; then
echo "${space8}${space8}[0] SD_CARD"

View File

@ -0,0 +1,118 @@
#!/bin/bash
#################################################
# Board Config
#################################################
export LF_ORIGIN_BOARD_CONFIG=BoardConfig-SD_CARD-Buildroot-RV1103_Luckfox_Pico_WebBee.mk
# Target CHIP
export RK_CHIP=rv1106
# app config
# export RK_APP_TYPE=RKIPC_RV1103
# Config CMA size in environment
export RK_BOOTARGS_CMA_SIZE="1M"
# Kernel dts
export RK_KERNEL_DTS=rv1103g-luckfox-pico-webbee.dts
#################################################
# BOOT_MEDIUM
#################################################
# Target boot medium
export RK_BOOT_MEDIUM=sd_card
# Uboot defconfig fragment
export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-emmc.config
# specify post.sh for delete/overlay files
# export RK_PRE_BUILD_OEM_SCRIPT=rv1103-spi_nor-post.sh
# config partition in environment
# RK_PARTITION_CMD_IN_ENV format:
# <partdef>[,<partdef>]
# <partdef> := <size>[@<offset>](part-name)
# Note:
# If the first partition offset is not 0x0, it must be added. Otherwise, it needn't adding.
export RK_PARTITION_CMD_IN_ENV="32K(env),512K@32K(idblock),256K(uboot),32M(boot),512M(oem),256M(userdata),6G(rootfs)"
# config partition's filesystem type (squashfs is readonly)
# emmc: squashfs/ext4
# nand: squashfs/ubifs
# spi nor: squashfs/jffs2
# RK_PARTITION_FS_TYPE_CFG format:
# AAAA:/BBBB/CCCC@ext4
# AAAA ----------> partition name
# /BBBB/CCCC ----> partition mount point
# ext4 ----------> partition filesystem type
export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/oem@ext4
# config filesystem compress (Just for squashfs or ubifs)
# squashfs: lz4/lzo/lzma/xz/gzip, default xz
# ubifs: lzo/zlib, default lzo
# export RK_SQUASHFS_COMP=xz
# export RK_UBIFS_COMP=lzo
#################################################
# TARGET_ROOTFS
#################################################
# Target rootfs
export LF_TARGET_ROOTFS=buildroot
# Buildroot defconfig
export RK_BUILDROOT_DEFCONFIG=luckfox_pico_defconfig
#################################################
# Defconfig
#################################################
# Target arch
export RK_ARCH=arm
# Target Toolchain Cross Compile
export RK_TOOLCHAIN_CROSS=arm-rockchip830-linux-uclibcgnueabihf
#misc image
export RK_MISC=wipe_all-misc.img
# Uboot defconfig
export RK_UBOOT_DEFCONFIG=luckfox_rv1106_uboot_defconfig
# Kernel defconfig
export RK_KERNEL_DEFCONFIG=luckfox_rv1106_linux_defconfig
# Config sensor IQ files
# RK_CAMERA_SENSOR_IQFILES format:
# "iqfile1 iqfile2 iqfile3 ..."
# ./build.sh media and copy <SDK root dir>/output/out/media_out/isp_iqfiles/$RK_CAMERA_SENSOR_IQFILES
# export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json"
#export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json sc530ai_CMK-OT2115-PC1_30IRC-F16.json"
# Config sensor lens CAC calibrattion bin files
# export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16"
#export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16 CAC_sc530ai_CMK-OT2115-PC1_30IRC-F16"
# build ipc web backend
# export RK_APP_IPCWEB_BACKEND=y
# enable install app to oem partition
export RK_BUILD_APP_TO_OEM_PARTITION=y
# enable rockchip test
export RK_ENABLE_ROCKCHIP_TEST=y
#################################################
# PRE and POST
#################################################
# specify pre.sh for delete/overlay files
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-nocsi-oem-pre.sh
# specify post.sh for delete/overlay files
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
# declare overlay directory
export RK_POST_OVERLAY="overlay-luckfox-buildroot-init overlay-luckfox-buildroot-shadow overlay-luckfox-buildroot-webbee"

View File

@ -0,0 +1,120 @@
#!/bin/bash
#################################################
# Board Config
#################################################
export LF_ORIGIN_BOARD_CONFIG=BoardConfig-SD_CARD-Ubuntu-RV1103_Luckfox_Pico_WebBee.mk
# Target CHIP
export RK_CHIP=rv1106
# app config
# export RK_APP_TYPE=RKIPC_RV1103
# Config CMA size in environment
export RK_BOOTARGS_CMA_SIZE="1M"
# Kernel dts
export RK_KERNEL_DTS=rv1103g-luckfox-pico-webbee.dts
#################################################
# BOOT_MEDIUM
#################################################
# Target boot medium
export RK_BOOT_MEDIUM=sd_card
# Uboot defconfig fragment
export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-emmc.config
# specify post.sh for delete/overlay files
# export RK_PRE_BUILD_OEM_SCRIPT=rv1103-spi_nor-post.sh
# config partition in environment
# RK_PARTITION_CMD_IN_ENV format:
# <partdef>[,<partdef>]
# <partdef> := <size>[@<offset>](part-name)
# Note:
# If the first partition offset is not 0x0, it must be added. Otherwise, it needn't adding.
export RK_PARTITION_CMD_IN_ENV="32K(env),512K@32K(idblock),256K(uboot),32M(boot),512M(oem),256M(userdata),6G(rootfs)"
# config partition's filesystem type (squashfs is readonly)
# emmc: squashfs/ext4
# nand: squashfs/ubifs
# spi nor: squashfs/jffs2
# RK_PARTITION_FS_TYPE_CFG format:
# AAAA:/BBBB/CCCC@ext4
# AAAA ----------> partition name
# /BBBB/CCCC ----> partition mount point
# ext4 ----------> partition filesystem type
export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ext4,userdata@/userdata@ext4,oem@/oem@ext4
# config filesystem compress (Just for squashfs or ubifs)
# squashfs: lz4/lzo/lzma/xz/gzip, default xz
# ubifs: lzo/zlib, default lzo
# export RK_SQUASHFS_COMP=xz
# export RK_UBIFS_COMP=lzo
#################################################
# TARGET_ROOTFS
#################################################
# Target rootfs
export LF_TARGET_ROOTFS=ubuntu
# SUBMODULES : github/gitee
export LF_SUBMODULES_BY=github
# Buildroot defconfig
export RK_BUILDROOT_DEFCONFIG=luckfox_pico_defconfig
#################################################
# Defconfig
#################################################
# Target arch
export RK_ARCH=arm
# Target Toolchain Cross Compile
export RK_TOOLCHAIN_CROSS=arm-rockchip830-linux-uclibcgnueabihf
#misc image
export RK_MISC=wipe_all-misc.img
# Uboot defconfig
export RK_UBOOT_DEFCONFIG=luckfox_rv1106_uboot_defconfig
# Kernel defconfig
export RK_KERNEL_DEFCONFIG=luckfox_rv1106_linux_defconfig
# Config sensor IQ files
# RK_CAMERA_SENSOR_IQFILES format:
# "iqfile1 iqfile2 iqfile3 ..."
# ./build.sh media and copy <SDK root dir>/output/out/media_out/isp_iqfiles/$RK_CAMERA_SENSOR_IQFILES
export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json"
#export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json sc530ai_CMK-OT2115-PC1_30IRC-F16.json"
# Config sensor lens CAC calibrattion bin files
export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16"
#export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16 CAC_sc530ai_CMK-OT2115-PC1_30IRC-F16"
# build ipc web backend
# export RK_APP_IPCWEB_BACKEND=y
# enable install app to oem partition
export RK_BUILD_APP_TO_OEM_PARTITION=y
# enable rockchip test
export RK_ENABLE_ROCKCHIP_TEST=y
#################################################
# PRE and POST
#################################################
# specify pre.sh for delete/overlay files
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-ubuntu-oem-pre.sh
# specify post.sh for delete/overlay files
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
# declare overlay directory
export RK_POST_OVERLAY="overlay-luckfox-ubuntu"

View File

@ -0,0 +1,117 @@
#!/bin/bash
#################################################
# Board Config
#################################################
export LF_ORIGIN_BOARD_CONFIG=BoardConfig-SPI_NAND-Buildroot-RV1103_Luckfox_Pico_WebBee.mk
# Target CHIP
export RK_CHIP=rv1106
# app config
#export RK_APP_TYPE=RKIPC_RV1103
# Config CMA size in environment
export RK_BOOTARGS_CMA_SIZE="1M"
# Kernel dts
export RK_KERNEL_DTS=rv1103g-luckfox-pico-webbee.dts
#################################################
# BOOT_MEDIUM
#################################################
# Target boot medium: emmc/spi_nor/spi_nand
export RK_BOOT_MEDIUM=spi_nand
# Uboot defconfig fragment
export RK_UBOOT_DEFCONFIG_FRAGMENT=rk-sfc.config
# specify post.sh for delete/overlay files
# export RK_PRE_BUILD_OEM_SCRIPT=rv1103-spi_nor-post.sh
# config partition in environment
# RK_PARTITION_CMD_IN_ENV format:
# <partdef>[,<partdef>]
# <partdef> := <size>[@<offset>](part-name)
# Note:
# If the first partition offset is not 0x0, it must be added. Otherwise, it needn't adding.
export RK_PARTITION_CMD_IN_ENV="256K(env),256K@256K(idblock),512K(uboot),4M(boot),30M(oem),6M(userdata),85M(rootfs)"
# config partition's filesystem type (squashfs is readonly)
# emmc: squashfs/ext4
# nand: squashfs/ubifs
# spi nor: squashfs/jffs2
# RK_PARTITION_FS_TYPE_CFG format:
# AAAA:/BBBB/CCCC@ext4
# AAAA ----------> partition name
# /BBBB/CCCC ----> partition mount point
# ext4 ----------> partition filesystem type
export RK_PARTITION_FS_TYPE_CFG=rootfs@IGNORE@ubifs,oem@/oem@ubifs,userdata@/userdata@ubifs
# config filesystem compress (Just for squashfs or ubifs)
# squashfs: lz4/lzo/lzma/xz/gzip, default xz
# ubifs: lzo/zlib, default lzo
# export RK_SQUASHFS_COMP=xz
# export RK_UBIFS_COMP=lzo
#################################################
# TARGET_ROOTFS
#################################################
# Target rootfs : ubuntu(only emmc)/buildroot/busybox
export LF_TARGET_ROOTFS=buildroot
# Buildroot defconfig
export RK_BUILDROOT_DEFCONFIG=luckfox_pico_defconfig
#################################################
# Defconfig
#################################################
# Target arch
export RK_ARCH=arm
# Target Toolchain Cross Compile
export RK_TOOLCHAIN_CROSS=arm-rockchip830-linux-uclibcgnueabihf
#misc image
export RK_MISC=wipe_all-misc.img
# Uboot defconfig
export RK_UBOOT_DEFCONFIG=luckfox_rv1106_uboot_defconfig
# Kernel defconfig
export RK_KERNEL_DEFCONFIG=luckfox_rv1106_linux_defconfig
# Config sensor IQ files
# RK_CAMERA_SENSOR_IQFILES format:
# "iqfile1 iqfile2 iqfile3 ..."
# ./build.sh media and copy <SDK root dir>/output/out/media_out/isp_iqfiles/$RK_CAMERA_SENSOR_IQFILES
#export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json"
#export RK_CAMERA_SENSOR_IQFILES="sc4336_OT01_40IRC_F16.json sc3336_CMK-OT2119-PC1_30IRC-F16.json sc530ai_CMK-OT2115-PC1_30IRC-F16.json"
# Config sensor lens CAC calibrattion bin files
#export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16"
#export RK_CAMERA_SENSOR_CAC_BIN="CAC_sc4336_OT01_40IRC_F16 CAC_sc530ai_CMK-OT2115-PC1_30IRC-F16"
# build ipc web backend
# export RK_APP_IPCWEB_BACKEND=y
# enable install app to oem partition
export RK_BUILD_APP_TO_OEM_PARTITION=y
# enable rockchip test
export RK_ENABLE_ROCKCHIP_TEST=y
#################################################
# PRE and POST
#################################################
# specify pre.sh for delete/overlay files
export RK_PRE_BUILD_OEM_SCRIPT=luckfox-buildroot-nocsi-oem-pre.sh
# specify post.sh for delete/overlay files
export RK_PRE_BUILD_USERDATA_SCRIPT=luckfox-userdata-pre.sh
# declare overlay directory
export RK_POST_OVERLAY="overlay-luckfox-buildroot-init overlay-luckfox-buildroot-shadow overlay-luckfox-buildroot-webbee"

View File

@ -0,0 +1,66 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2022 Rockchip Electronics Co., Ltd.
*/
/dts-v1/;
#include "rv1103.dtsi"
#include "rv1106-evb.dtsi"
#include "rv1103-luckfox-pico-ipc.dtsi"
/ {
model = "Luckfox Pico WebBee";
compatible = "rockchip,rv1103g-38x38-ipc-v10", "rockchip,rv1103";
};
/**********SFC**********/
&sfc {
status = "okay";
flash@0 {
compatible = "spi-nand";
reg = <0>;
spi-max-frequency = <75000000>;
spi-rx-bus-width = <4>;
spi-tx-bus-width = <1>;
};
};
/**********SDMMC**********/
&sdmmc {
max-frequency = <50000000>;
no-sdio;
no-mmc;
bus-width = <4>;
cap-mmc-highspeed;
cap-sd-highspeed;
disable-wp;
pinctrl-names = "default";
pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_det &sdmmc0_bus4>;
status = "okay";
};
/**********ETH**********/
&gmac {
status = "okay";
};
/**********USB**********/
&usbdrd_dwc3 {
status = "okay";
dr_mode = "peripheral";
};
/**********CSI**********/
&i2c4{
status = "disabled";
};
/********AUDIO**********/
&i2s0_8ch {
status = "disabled";
};
&acodec {
status = "disabled";
};

View File

@ -376,7 +376,7 @@
pinctrl-0 = <&pwm9m1_pins>;
};
&pwm10 {
pinctrl-0 = <&pwm10m2_pins>;
pinctrl-0 = <&pwm10m1_pins &pwm10m2_pins>;
};
&pwm11 {
pinctrl-0 = <&pwm11m1_pins>;