wireless-scripts: add support for ingenic t31 with rtl8189fs-openipc (#962)

Thanks to all who participated, together we will do much more and better ;)
pull/972/head
gtxaspec 2023-08-25 05:11:44 -07:00 committed by GitHub
parent e042d0b2e2
commit 4889c985aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 64 additions and 12 deletions

View File

@ -106,6 +106,7 @@ BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC_MEDIATEK_MT7601U=y
BR2_PACKAGE_INGENIC_ATBM603X_SDIO_T31=y
BR2_PACKAGE_INGENIC_ATBM603X_SDIO_T31_MMC0=y
BR2_PACKAGE_INGENIC_ATBM603X_SDIO_T31_MMC1=y
BR2_PACKAGE_RTL8189FS_OPENIPC=y
# BR2_PACKAGE_RTL8188EU is not set
# Motors

View File

@ -8,6 +8,13 @@ set_gpio() {
sleep 1
}
set_mmc() {
mmc=/sys/devices/platform/jzmmc_v1.2.$1/present
if [ "$(cat $mmc)" = "N" ]; then
echo "INSERT" > $mmc
fi
}
# T31 ATBM603X mmc0
if [ "$1" = "atbm603x-t31-mmc0" ]; then
# PB10 in wifi mmc1 is in the pull-down state by default, it needs to be set to a high-impedance state
@ -15,16 +22,12 @@ if [ "$1" = "atbm603x-t31-mmc0" ]; then
# set wifi mmc1 clk drive capability to 8mA
devmem 0x10011134 32 0x20000
# "insert" the bus mmc0 device
if [ "$(cat /sys/devices/platform/jzmmc_v1.2.0/present)" = "N" ]; then
echo "INSERT" > /sys/devices/platform/jzmmc_v1.2.0/present
sleep 1
fi
set_mmc 0
cp /usr/share/atbm603x_conf/atbm_txpwer_dcxo_cfg.txt /tmp
cp /usr/share/atbm603x_conf/set_rate_power.txt /tmp
modprobe atbm603x_wifi_sdi0
modprobe atbm603x_wifi_sdi0 atbm_printk_mask=0
exit 0
fi
@ -33,16 +36,64 @@ if [ "$1" = "atbm603x-t31-mmc1" ]; then
# not sure what this does, but it's copied from the stock fw
devmem 0x10011110 32 0x6e094800
# "insert" the bus mmc1 device
if [ "$(cat /sys/devices/platform/jzmmc_v1.2.1/present)" = "N" ]; then
echo "INSERT" > /sys/devices/platform/jzmmc_v1.2.1/present
sleep 1
fi
set_mmc 1
cp /usr/share/atbm603x_conf/atbm_txpwer_dcxo_cfg.txt /tmp
cp /usr/share/atbm603x_conf/set_rate_power.txt /tmp
modprobe atbm603x_wifi_sdi1
modprobe atbm603x_wifi_sdi1 atbm_printk_mask=0
exit 0
fi
# T31 Wyze V3 / AtomCam 2 ATBM603x
if [ "$1" = "atbm603x-t31-wyze-v3" ]; then
set_gpio 57 1
set_mmc 1
cp /usr/share/atbm603x_conf/atbm_txpwer_dcxo_cfg.txt /tmp
cp /usr/share/atbm603x_conf/set_rate_power.txt /tmp
modprobe atbm603x_wifi_sdi1 atbm_printk_mask=0
sleep 1
exit 0
fi
# T31 Wyze V3 RTL8189FTV
if [ "$1" = "rtl8189ftv-t31-wyze-v3" ]; then
set_gpio 57 1
set_mmc 1
modprobe 8189fs rtw_power_mgnt=0 rtw_enusbss=0
sleep 1
exit 0
fi
# T31 Wyze DB3 RTL8189FTV
if [ "$1" = "rtl8189ftv-t31-wyze-db3" ]; then
set_mmc 1
modprobe 8189fs rtw_power_mgnt=0 rtw_enusbss=0
sleep 1
exit 0
fi
# T20 Wyze V2 RTL8189FTV
if [ "$1" = "rtl8189ftv-t20-wyze-v2" ]; then
set_mmc 1
modprobe 8189fs rtw_power_mgnt=0 rtw_enusbss=0
sleep 1
exit 0
fi
# T20 Wyze PanV1 RTL8189ES
if [ "$1" = "rtl8189ftv-t20-wyze-pan-v1" ]; then
set_mmc 1
modprobe 8189es rtw_power_mgnt=0 rtw_enusbss=0
sleep 1
exit 0
fi