Merge pull request #180 from luckfox-eng29/pullrequest

Partial bug fixes and optimization
This commit is contained in:
luckfox-eng33 2024-10-15 11:36:34 +08:00 committed by GitHub
commit e1caff31f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 32 additions and 20 deletions

View File

@ -1 +1 @@
./prebuilts/*
prebuilts

View File

@ -14,6 +14,15 @@
chosen {
bootargs = "loglevel=0 rootfstype=erofs rootflags=dax console=ttyFIQ0 root=/dev/rd0 snd_soc_core.prealloc_buffer_size_kbytes=16 coherent_pool=0 driver_async_probe=dwmmc_rockchip";
};
leds: leds {
compatible = "gpio-leds";
work_led: work{
gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "activity";
default-state = "on";
};
};
};
/delete-node/ &thunder_boot_spi_nor;

View File

@ -208,26 +208,19 @@ function luckfox_load_cfg() {
# SDMMC
value=$(luckfox_get_pin_cfg "SDMMC_ENABLE")
if [ -z "$value" ] && [ "$LUCKFOX_CHIP_MEDIA_CLASS" == "spi_nand" ] && [ "$LUCKFOX_CHIP_MEDIA" == "Luckfox Pico Plus" ]; then
luckfox_set_pin_mark "GPIO3_A1" 1
luckfox_set_pin_mark "GPIO3_A3" 1
luckfox_set_pin_mark "GPIO3_A2" 1
luckfox_set_pin_mark "GPIO3_A4" 1
luckfox_set_pin_mark "GPIO3_A5" 1
luckfox_set_pin_mark "GPIO3_A7" 1
luckfox_set_pin_mark "GPIO3_A6" 1
elif [ "$LUCKFOX_CHIP_MEDIA_CLASS" == "sdmmc" ] && [ "$LUCKFOX_CHIP_MEDIA" == "Luckfox Pico Plus" ]; then
luckfox_set_pin_mark "GPIO3_A1" 1
luckfox_set_pin_mark "GPIO3_A3" 1
luckfox_set_pin_mark "GPIO3_A2" 1
luckfox_set_pin_mark "GPIO3_A4" 1
luckfox_set_pin_mark "GPIO3_A5" 1
luckfox_set_pin_mark "GPIO3_A7" 1
luckfox_set_pin_mark "GPIO3_A6" 1
else
if [ -n "$value" ]; then
luckfox_sdmmc_app "$value"
if [ -z "$value" ]; then
if [ "$LUCKFOX_CHIP_MODEL" == "Luckfox Pico Plus" ]; then
luckfox_set_pin_mark "GPIO3_A1" 1
luckfox_set_pin_mark "GPIO3_A3" 1
luckfox_set_pin_mark "GPIO3_A2" 1
luckfox_set_pin_mark "GPIO3_A4" 1
luckfox_set_pin_mark "GPIO3_A5" 1
luckfox_set_pin_mark "GPIO3_A7" 1
luckfox_set_pin_mark "GPIO3_A6" 1
fi
else
luckfox_sdmmc_app "$value"
fi
# Create global variables by comparing cfg files
@ -1274,6 +1267,16 @@ function luckfox_check_i2c() {
#check CSI status
if [ "$i2c_main" == 4 ]; then
csi_status=$(luckfox_get_pin_cfg "CSI_ENABLE")
# process default status
if [ -z "$csi_status" ]; then
# CSI I2C is not enabled on Ultra models by default
if [ "$LUCKFOX_CHIP_MODEL" == "Luckfox Pico Ultra" ] || [ "$LUCKFOX_CHIP_MODEL" == "Luckfox Pico Ultra W" ]; then
"$csi_status" = 0
else
"$csi_status" = 1
fi
fi
if [ "$csi_status" == 1 ]; then
luckfox_result_handle "$LF_ERR" "CSI is enable,Can't config I2C4"
fi