mirror of https://github.com/OpenIPC/firmware.git
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
parent
e042d0b2e2
commit
4889c985aa
|
@ -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=y
|
||||||
BR2_PACKAGE_INGENIC_ATBM603X_SDIO_T31_MMC0=y
|
BR2_PACKAGE_INGENIC_ATBM603X_SDIO_T31_MMC0=y
|
||||||
BR2_PACKAGE_INGENIC_ATBM603X_SDIO_T31_MMC1=y
|
BR2_PACKAGE_INGENIC_ATBM603X_SDIO_T31_MMC1=y
|
||||||
|
BR2_PACKAGE_RTL8189FS_OPENIPC=y
|
||||||
# BR2_PACKAGE_RTL8188EU is not set
|
# BR2_PACKAGE_RTL8188EU is not set
|
||||||
|
|
||||||
# Motors
|
# Motors
|
||||||
|
|
|
@ -8,6 +8,13 @@ set_gpio() {
|
||||||
sleep 1
|
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
|
# T31 ATBM603X mmc0
|
||||||
if [ "$1" = "atbm603x-t31-mmc0" ]; then
|
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
|
# 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
|
# set wifi mmc1 clk drive capability to 8mA
|
||||||
devmem 0x10011134 32 0x20000
|
devmem 0x10011134 32 0x20000
|
||||||
|
|
||||||
# "insert" the bus mmc0 device
|
set_mmc 0
|
||||||
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
|
|
||||||
|
|
||||||
cp /usr/share/atbm603x_conf/atbm_txpwer_dcxo_cfg.txt /tmp
|
cp /usr/share/atbm603x_conf/atbm_txpwer_dcxo_cfg.txt /tmp
|
||||||
cp /usr/share/atbm603x_conf/set_rate_power.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
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -33,16 +36,64 @@ if [ "$1" = "atbm603x-t31-mmc1" ]; then
|
||||||
# not sure what this does, but it's copied from the stock fw
|
# not sure what this does, but it's copied from the stock fw
|
||||||
devmem 0x10011110 32 0x6e094800
|
devmem 0x10011110 32 0x6e094800
|
||||||
|
|
||||||
# "insert" the bus mmc1 device
|
set_mmc 1
|
||||||
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
|
|
||||||
|
|
||||||
cp /usr/share/atbm603x_conf/atbm_txpwer_dcxo_cfg.txt /tmp
|
cp /usr/share/atbm603x_conf/atbm_txpwer_dcxo_cfg.txt /tmp
|
||||||
cp /usr/share/atbm603x_conf/set_rate_power.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
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue