Update for opi3b compatibility

v1.1.1: uwe5622
v2.1: ap6256
This commit is contained in:
baiywt
2024-04-18 17:03:19 +08:00
parent d91089989f
commit 947e6bc1e5
4 changed files with 10 additions and 12 deletions

View File

@@ -2,13 +2,10 @@
BOARD_NAME="OPI 3B"
BOARDFAMILY="rockchip-rk356x"
BOOTCONFIG="orangepi-3b-rk3566_defconfig"
MODULES="sprdbt_tty sprdwl_ng"
MODULES_BLACKLIST_LEGACY="bcmdhd"
KERNEL_TARGET="legacy,current"
BOOT_LOGO="desktop"
BOOT_SUPPORT_SPI="yes"
DISTRIB_TYPE_LEGACY="focal jammy bullseye bookworm raspi"
BOOTFS_TYPE="fat"
IMAGE_PARTITION_TABLE="gpt"
BOOT_FDT_FILE="rockchip/rk3566-orangepi-3b.dtb"
REVISION="1.0.4"
REVISION="1.0.6"

View File

@@ -46,10 +46,6 @@ load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}
fdt addr ${fdt_addr_r}
fdt resize 65536
if test "${yt8531c_phy_level}" = "3v3"; then
setenv overlays "vccio5_3v3 $overlays"
fi
for overlay_file in ${overlays}; do
if load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then
echo "Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo"

View File

@@ -350,13 +350,17 @@ prepare_board() {
amixer -c 0 cset name='Playback Path' HP > /dev/null 2>&1
amixer -c 0 cset name='Capture MIC Path' 'Main Mic' > /dev/null 2>&1
if [[ $BOARD == orangepi3b ]]; then
rfkill unblock all
/usr/bin/hciattach_opi -n -s 1500000 /dev/ttyBT0 sprd &
elif [[ $BOARD == orangepicm4 ]]; then
bt_status=$(cat /proc/device-tree/wireless-bluetooth/status)
wifi_chip=$(cat /proc/device-tree/wireless-wlan/wifi_chip_type)
if [[ "${wifi_chip}" == "ap6256" && "${bt_status}" == "okay" ]]; then
rfkill unblock all
brcm_patchram_plus --bd_addr_rand --enable_hci --no2bytes --use_baudrate_for_download --tosleep 200000 \
--baudrate 1500000 --patchram /lib/firmware/BCM4345C0.hcd /dev/ttyS1 &
else
rfkill unblock all
/usr/bin/hciattach_opi -n -s 1500000 /dev/ttyBT0 sprd &
fi
;;
orangepi3plus)

View File

@@ -0,0 +1 @@
ACTION=="add", SUBSYSTEM=="sdio", SUBSYSTEMS=="sdio", ENV{SDIO_ID}=="0000:0000", RUN+="/sbin/modprobe -a sprdwl_ng sprdbt_tty"