mirror of https://github.com/OpenIPC/firmware.git
Ingenic T31 atbm603x wifi drivers + wireless-configuration support (#885)
parent
1c8af5e6e0
commit
9f0bdad48d
|
@ -103,6 +103,9 @@ BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y
|
|||
BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y
|
||||
BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC=y
|
||||
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_RTL8188EU is not set
|
||||
|
||||
# WIREGUARD
|
||||
|
|
|
@ -104,4 +104,42 @@ if [ "$1" = "l716-t31-camhi" ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
# T31 ATBM603X on SDIO bus 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
|
||||
devmem 0x10011128 32 0x400
|
||||
# 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
|
||||
|
||||
cp /usr/share/atbm603x_conf/atbm_txpwer_dcxo_cfg.txt /tmp
|
||||
cp /usr/share/atbm603x_conf/set_rate_power.txt /tmp
|
||||
# note, let this run on the background because if the firmware fails to load, it'll stall the OS startup
|
||||
modprobe atbm603x_wifi_sdi0
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# T31 ATBM603X on SDIO bus mmc1
|
||||
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
|
||||
|
||||
cp /usr/share/atbm603x_conf/atbm_txpwer_dcxo_cfg.txt /tmp
|
||||
cp /usr/share/atbm603x_conf/set_rate_power.txt /tmp
|
||||
# note, let this run on the background because if the firmware fails to load, it'll stall the OS startup
|
||||
modprobe atbm603x_wifi_sdi1
|
||||
exit 0
|
||||
fi
|
||||
|
||||
exit 1
|
||||
|
|
|
@ -31,6 +31,7 @@ source "$BR2_EXTERNAL_GENERAL_PATH/package/hisilicon-osdrv-hi3516ev200/Config.in
|
|||
source "$BR2_EXTERNAL_GENERAL_PATH/package/hisilicon-osdrv-hi3519v101/Config.in"
|
||||
source "$BR2_EXTERNAL_GENERAL_PATH/package/hisilicon-osdrv-hi3536dv100/Config.in"
|
||||
source "$BR2_EXTERNAL_GENERAL_PATH/package/i2c-telemetry/Config.in"
|
||||
source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-atbm603x-sdio-t31/Config.in"
|
||||
source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-opensdk/Config.in"
|
||||
source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-osdrv-t20/Config.in"
|
||||
source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-osdrv-t21/Config.in"
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
config BR2_PACKAGE_INGENIC_ATBM603X_SDIO_T31
|
||||
bool "ingenic-atbm603x-sdio-t31"
|
||||
help
|
||||
ingenic-atbm603x-sdio-t31 - Ingenic kernel module for the ATBM603X, on SDIO bus.
|
||||
|
||||
comment "ATBM603X needs a Linux kernel to be built"
|
||||
depends on !BR2_PACKAGE_INGENIC_OSDRV_T31
|
||||
|
||||
|
||||
if BR2_PACKAGE_INGENIC_ATBM603X_SDIO_T31
|
||||
|
||||
config BR2_PACKAGE_INGENIC_ATBM603X_SDIO_T31_MMC0
|
||||
bool "ingenic-atbm603x-sdio-t31-mmc0"
|
||||
default y
|
||||
help
|
||||
ingenic-atbm603x-sdio-t31-mmc0 - Provide the driver that loads on bus MMC0.
|
||||
|
||||
config BR2_PACKAGE_INGENIC_ATBM603X_SDIO_T31_MMC1
|
||||
bool "ingenic-atbm603x-sdio-t31-mmc1"
|
||||
default y
|
||||
help
|
||||
ingenic-atbm603x-sdio-t31-mmc1 - Provide the driver that loads on bus MMC1.
|
||||
|
||||
endif
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
|||
delta_gain1:-1 delta_gain2:-1 delta_gain3:-1 dcxo:-1
|
||||
b_delta_gain1:10 b_delta_gain2:12 b_delta_gain3:15
|
||||
gn_delta_gain1:10 gn_delta_gain2:8 gn_delta_gain3:12
|
|
@ -0,0 +1,11 @@
|
|||
b_1M_2M=0
|
||||
b_5_5M_11M=0
|
||||
g_6M_n_6_5M=0
|
||||
g_9M=0
|
||||
g_12M_n_13M=0
|
||||
g_18M_n_19_5M=0
|
||||
g_24M_n_26M=0
|
||||
g_36M_n_39M=0
|
||||
g_48M_n_52M=0
|
||||
g_54M_n_58_5M=0
|
||||
n_65M=2
|
|
@ -0,0 +1,24 @@
|
|||
################################################################################
|
||||
#
|
||||
# ingenic-atbm603x-sdio-t31
|
||||
#
|
||||
################################################################################
|
||||
|
||||
INGENIC_ATBM603X_SDIO_T31_VERSION =
|
||||
INGENIC_ATBM603X_SDIO_T31_SITE =
|
||||
INGENIC_ATBM603X_SDIO_T31_LICENSE = GPL-2.0
|
||||
INGENIC_ATBM603X_SDIO_T31_LICENSE_FILES = LICENSE
|
||||
|
||||
define INGENIC_ATBM603X_SDIO_T31_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -m 755 -d $(TARGET_DIR)/lib/modules/3.10.14__isvp_swan_1.0__/extra
|
||||
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/share/atbm603x_conf
|
||||
$(INSTALL) -m 644 -t $(TARGET_DIR)/usr/share/atbm603x_conf $(INGENIC_ATBM603X_SDIO_T31_PKGDIR)/files/*.txt
|
||||
|
||||
$(if $(BR2_PACKAGE_INGENIC_ATBM603X_SDIO_T31_MMC0),\
|
||||
$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/3.10.14__isvp_swan_1.0__/extra $(INGENIC_ATBM603X_SDIO_T31_PKGDIR)/files/atbm603x_wifi_sdi0.ko)
|
||||
|
||||
$(if $(BR2_PACKAGE_INGENIC_ATBM603X_SDIO_T31_MMC1),\
|
||||
$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/3.10.14__isvp_swan_1.0__/extra $(INGENIC_ATBM603X_SDIO_T31_PKGDIR)/files/atbm603x_wifi_sdi1.ko)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
Loading…
Reference in New Issue