Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions br-ext-chip-xiongmai/board/xm530/xm533.generic.config
Original file line number Diff line number Diff line change
Expand Up @@ -1192,6 +1192,7 @@ CONFIG_MMC_ARASAN=y
# CONFIG_MMC_WIFI is not set
CONFIG_MMC_SD=m
CONFIG_MMC_XM_V200_SD=m
CONFIG_MMC_XM_V200_SDIO_WIFI=m
# CONFIG_MMC_ARMMMCI is not set
# CONFIG_MMC_SDHCI is not set
# CONFIG_MMC_SDHCI_PXAV3 is not set
Expand Down
38 changes: 5 additions & 33 deletions br-ext-chip-xiongmai/board/xm530/xm535d2.generic.config
Original file line number Diff line number Diff line change
Expand Up @@ -564,25 +564,12 @@ CONFIG_WIRELESS_EXT=y
CONFIG_WEXT_CORE=y
CONFIG_WEXT_PROC=y
CONFIG_WEXT_PRIV=y
CONFIG_CFG80211=m
# CONFIG_NL80211_TESTMODE is not set
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
# CONFIG_CFG80211_REG_DEBUG is not set
# CONFIG_CFG80211_CERTIFICATION_ONUS is not set
CONFIG_CFG80211_DEFAULT_PS=y
# CONFIG_CFG80211_INTERNAL_REGDB is not set
# CONFIG_CFG80211_WEXT is not set
# CONFIG_CFG80211 is not set
# CONFIG_LIB80211 is not set
CONFIG_MAC80211=m
CONFIG_MAC80211_HAS_RC=y
# CONFIG_MAC80211_RC_PID is not set
CONFIG_MAC80211_RC_MINSTREL=y
CONFIG_MAC80211_RC_MINSTREL_HT=y
CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"
# CONFIG_MAC80211_MESH is not set
# CONFIG_MAC80211_MESSAGE_TRACING is not set
# CONFIG_MAC80211_DEBUG_MENU is not set

#
# CFG80211 needs to be enabled for MAC80211
#
# CONFIG_WIMAX is not set
# CONFIG_RFKILL is not set
# CONFIG_NET_9P is not set
Expand Down Expand Up @@ -836,24 +823,9 @@ CONFIG_MDIO_BITBANG=y
# CONFIG_USB_USBNET is not set
# CONFIG_USB_IPHETH is not set
CONFIG_WLAN=y
# CONFIG_LIBERTAS_THINFIRM is not set
# CONFIG_AT76C50X_USB is not set
CONFIG_USB_ZD1201=m
# CONFIG_USB_NET_RNDIS_WLAN is not set
# CONFIG_RTL8187 is not set
# CONFIG_MAC80211_HWSIM is not set
# CONFIG_ATH_CARDS is not set
# CONFIG_B43 is not set
# CONFIG_B43LEGACY is not set
# CONFIG_BRCMFMAC is not set
# CONFIG_HOSTAP is not set
# CONFIG_LIBERTAS is not set
# CONFIG_P54_COMMON is not set
# CONFIG_RT2X00 is not set
# CONFIG_RTLWIFI is not set
# CONFIG_WL_TI is not set
# CONFIG_ZD1211RW is not set
# CONFIG_MWIFIEX is not set

#
# Enable WiMAX (Networking options) to see the WiMAX drivers
Expand Down
2 changes: 2 additions & 0 deletions br-ext-chip-xiongmai/configs/xm530v200_lite_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,6 @@ BR2_PACKAGE_MOTORS=y
BR2_PACKAGE_OPUS_OPENIPC=y
BR2_PACKAGE_VTUND_OPENIPC=y
BR2_PACKAGE_XIONGMAI_OSDRV_XM530V200=y
# Wi-Fi: the X6C-WEQ's AltoBeam ATBM6012B-X and the X2-WQ2's XM713G (AsmLite), USB
BR2_PACKAGE_ATBM603X_COMB_OPENIPC=y
BR2_PACKAGE_YAML_CLI=y
2 changes: 2 additions & 0 deletions br-ext-chip-xiongmai/configs/xm533_lite_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,6 @@ BR2_PACKAGE_MOTORS=y
BR2_PACKAGE_OPUS_OPENIPC=y
BR2_PACKAGE_VTUND_OPENIPC=y
BR2_PACKAGE_XIONGMAI_OSDRV_XM530V200=y
# Wi-Fi: the X3-WQ-B's "SSV6158M", an iComm SSV6020, SDIO
BR2_PACKAGE_SSV6020_OPENIPC=y
BR2_PACKAGE_YAML_CLI=y
2 changes: 2 additions & 0 deletions br-ext-chip-xiongmai/configs/xm535d1_lite_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,6 @@ BR2_PACKAGE_MOTORS=y
BR2_PACKAGE_OPUS_OPENIPC=y
BR2_PACKAGE_VTUND_OPENIPC=y
BR2_PACKAGE_XIONGMAI_OSDRV_XM530V200=y
# Wi-Fi: the X6E-WEQ's AltoBeam ATBM6012B-X, USB
BR2_PACKAGE_ATBM603X_COMB_OPENIPC=y
BR2_PACKAGE_YAML_CLI=y
2 changes: 2 additions & 0 deletions br-ext-chip-xiongmai/configs/xm535d2_lite_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,6 @@ BR2_PACKAGE_MOTORS=y
BR2_PACKAGE_OPUS_OPENIPC=y
BR2_PACKAGE_VTUND_OPENIPC=y
BR2_PACKAGE_XIONGMAI_OSDRV_XM530V200=y
# Wi-Fi: the X9-WE2Q's AltoBeam ATBM6132CU, USB, with its own cfg80211
BR2_PACKAGE_ATBM606X_OPENIPC=y
Comment thread
dimerr marked this conversation as resolved.
Resolved
BR2_PACKAGE_YAML_CLI=y
2 changes: 2 additions & 0 deletions br-ext-chip-xiongmai/configs/xm535w1_lite_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,6 @@ BR2_PACKAGE_MOTORS=y
BR2_PACKAGE_OPUS_OPENIPC=y
BR2_PACKAGE_VTUND_OPENIPC=y
BR2_PACKAGE_XIONGMAI_OSDRV_XM530V200=y
# Wi-Fi: the X2W-WNG's AltoBeam ATBM6012B-X, USB
BR2_PACKAGE_ATBM603X_COMB_OPENIPC=y
BR2_PACKAGE_YAML_CLI=y
16 changes: 16 additions & 0 deletions general/overlay/etc/wireless/sdio
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,20 @@ if [ "$1" = "rtl8189ftv-t31-wyze-v3" ]; then
exit 0
fi

# XM533 X3-WQ-B: SSV6020 ("SSV6158M") on SDIO0. xm_v200_sdio_wifi registers
# the slot, sets its clock and powers the chip up (power pad 166, clock phase
# 0x170, as its vendor loadpublic passes them); wlan0 appears once the card
# has enumerated and the driver has loaded its firmware.
if [ "$1" = "ssv6020-xm533-x3-wq-b" ]; then
modprobe xm_v200_sdio_wifi value=166 phase=0x170
modprobe ssv6x5x stacfgpath=/etc/ssv6x5x-wifi.cfg || exit 1
i=0
while [ ! -e /sys/class/net/wlan0 ] && [ $i -lt 10 ]; do
sleep 1
i=$((i + 1))
done
[ -e /sys/class/net/wlan0 ]
exit $?
fi

exit 1
65 changes: 63 additions & 2 deletions general/overlay/etc/wireless/usb
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,15 @@ if [ "$1" = "rtl8812au-generic" ]; then
exit 0
fi

# Generic ATBM603x
# Generic ATBM603x: atbm-wifi's module, or atbm603x-comb-openipc's
if [ "$1" = "atbm603x-generic-usb" ]; then
modprobe atbm603x_wifi_usb
modprobe atbm603x_wifi_usb 2>/dev/null || modprobe atbm603x_comb_wifi_usb
exit 0
fi

# Generic ATBM606x (Wi-Fi 6: ATBM6062, 6162, 6132-C)
if [ "$1" = "atbm606x-generic-usb" ]; then
modprobe atbm606x_wifi_usb
exit 0
fi

Expand Down Expand Up @@ -332,4 +338,59 @@ if [ "$1" = "rtl8188fu-t31-aoni-e97vj62" ]; then
exit 0
fi

# Xiongmai V200 series. The USB host is the vendor's dwc2 and xm_usb0, which
# load_xiongmai only loads after S40network, so the profile loads them. The
# dongle's power pad is cycled as the vendor's wifi_pdn.ko does: output high
# (off) for 2 s, then low (on) for 2 s; pad register 0x10020000 + 4 * pad.
# $1: power pad, 0 for none. $2: driver module.
xm_v200_wifi() {
modprobe dwc2
modprobe xm_usb0
if [ "$1" -gt 0 ]; then
pad=$(printf 0x%x $((0x10020000 + $1 * 4)))
devmem "$pad" 32 0xc00
sleep 2
devmem "$pad" 32 0x400
sleep 2
fi
modprobe "$2" || return 1
# wlan0 appears once the dongle has enumerated and taken its firmware
i=0
while [ ! -e /sys/class/net/wlan0 ] && [ $i -lt 10 ]; do
sleep 1
i=$((i + 1))
done
[ -e /sys/class/net/wlan0 ]
}

# XM530V200 X6C-WEQ: ATBM6012B-X
if [ "$1" = "atbm603x-xm530v200-x6c-weq" ]; then
xm_v200_wifi 87 atbm603x_comb_wifi_usb
exit $?
fi

# XM530V200 X2-WQ2: XM713G
if [ "$1" = "atbm603x-xm530v200-x2-wq2" ]; then
xm_v200_wifi 82 atbm603x_comb_wifi_usb
exit $?
fi

# XM535D1 X6E-WEQ: ATBM6012B-X
if [ "$1" = "atbm603x-xm535d1-x6e-weq" ]; then
xm_v200_wifi 11 atbm603x_comb_wifi_usb
exit $?
fi

# XM535D2 X9-WE2Q: ATBM6132CU, no power pad (the vendor passes 255)
if [ "$1" = "atbm606x-xm535d2-x9-we2q" ]; then
xm_v200_wifi 0 atbm606x_wifi_usb
exit $?
fi

# XM535W1 X2W-WNG: ATBM6012B-X
if [ "$1" = "atbm603x-xm535w1-x2w-wng" ]; then
xm_v200_wifi 163 atbm603x_comb_wifi_usb
exit $?
fi

exit 1
3 changes: 3 additions & 0 deletions general/package/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ source "$BR2_EXTERNAL_GENERAL_PATH/package/allwinner-osdrv-v83x/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/allwinner-osdrv-v85x/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/anyka-osdrv-ak3918av130/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/atbm-wifi/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/atbm603x-comb-openipc/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/atbm60xx/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/atbm606x-openipc/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/aura-httpd/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/baresip-openipc/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/comgt/Config.in"
Expand Down Expand Up @@ -110,6 +112,7 @@ source "$BR2_EXTERNAL_GENERAL_PATH/package/sigmastar-osdrv-infinity6e/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/sigmastar-osdrv-sensors/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/siproxd-openipc/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/ssv615x-openipc/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/ssv6020-openipc/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/ssv635x-openipc/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/ssw101b/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/txw8301-openipc/Config.in"
Expand Down
7 changes: 7 additions & 0 deletions general/package/atbm603x-comb-openipc/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
config BR2_PACKAGE_ATBM603X_COMB_OPENIPC
bool "atbm603x-comb-openipc"
depends on BR2_LINUX_KERNEL
help
AltoBeam USB Wi-Fi driver for the ATBM6012B-X/Y and 6032-X
(AsmLite) and the ATBM603x (Ares-B), firmware built in;
binds 007a:888b and 007a:8888. Needs the kernel's cfg80211.
23 changes: 23 additions & 0 deletions general/package/atbm603x-comb-openipc/atbm603x-comb-openipc.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
################################################################################
#
# atbm603x-comb-openipc
#
################################################################################

# OpenIPC/atbm_60xx's atbm603x_comb/ directory: AltoBeam's apollo driver
# (DRIVER_VER 2874) with the AsmLite and Ares-B firmware, as Khadas ships it.
ATBM603X_COMB_OPENIPC_SITE = $(call github,openipc,atbm_60xx,$(ATBM603X_COMB_OPENIPC_VERSION))
ATBM603X_COMB_OPENIPC_VERSION = 543b02dc8871a1bc4df90cd56e07305b95c3ec9c

ATBM603X_COMB_OPENIPC_LICENSE = GPL-2.0

# The directory carries its own .config (USB, firmware built in, module
# atbm603x_comb_wifi_usb). ATBM_BUILD_IN_KERNEL=n makes its Makefiles
# read it from WIFI_PROJ_DIR.
ATBM603X_COMB_OPENIPC_MODULE_SUBDIRS = atbm603x_comb
Comment thread
qodo-free-for-open-source-projects[bot] marked this conversation as resolved.
Resolved
ATBM603X_COMB_OPENIPC_MODULE_MAKE_OPTS = \
ATBM_BUILD_IN_KERNEL=n \
WIFI_PROJ_DIR=$(@D)/atbm603x_comb

$(eval $(kernel-module))
$(eval $(generic-package))
8 changes: 8 additions & 0 deletions general/package/atbm606x-openipc/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
config BR2_PACKAGE_ATBM606X_OPENIPC
bool "atbm606x-openipc"
depends on BR2_LINUX_KERNEL
help
AltoBeam Wi-Fi 6 USB driver for the ATBM6062, ATBM6062-C,
ATBM6162 and ATBM6132-C (Cronus, Oceanus, Cronus Lite), firmware
built in. It brings its own cfg80211 and mac80211, so the kernel's
CONFIG_CFG80211 and CONFIG_MAC80211 must be off.
58 changes: 58 additions & 0 deletions general/package/atbm606x-openipc/atbm606x-openipc.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
################################################################################
#
# atbm606x-openipc
#
################################################################################

# OpenIPC/atbm_60xx's atbm606x/ directory: AltoBeam's Wi-Fi 6 driver as
# Ingenic's SDK ships it (DRIVER_VER 4327).
ATBM606X_OPENIPC_SITE = $(call github,openipc,atbm_60xx,$(ATBM606X_OPENIPC_VERSION))
ATBM606X_OPENIPC_VERSION = 5379d2a495cc572e927e4ba2fb3f25519b17ab1e

ATBM606X_OPENIPC_LICENSE = GPL-2.0

# The tree has no .config: its settings are passed instead, as for
# atbm60xx. ATBM_BUILD_IN_KERNEL=n is what makes its top Makefile build
# the bundled cfg80211 (wireless/) beside the driver (hal_apollo/).
ATBM606X_OPENIPC_MODULE_SUBDIRS = atbm606x
ATBM606X_OPENIPC_MODULE_MAKE_OPTS = \
ATBM_BUILD_IN_KERNEL=n \
WIFI_PROJ_DIR=$(@D)/atbm606x \
CONFIG_ATBM_MENUCONFIG_WIFI6=y \
CONFIG_ATBM_WIRELESS_WIFI6=y \
CONFIG_ATBM_USB_BUS_WIFI6=y \
CONFIG_ATBM_USE_FIRMWARE_H_WIFI6=y \
CONFIG_COMPAT_COMBO_HFW=y \
CONFIG_COMPAT_6062X=y \
CONFIG_COMPAT_6162X=y \
CONFIG_COMPAT_6062_CX=y \
CONFIG_COMPAT_6132_C=y \
CONFIG_ATBM_SUPPORT_BAN_5G_24G_WIFI6=y \
CONFIG_ATBM_FUNC_NOTXCONFIRM_WIFI6=y \
CONFIG_ATBM_FUNC_MONITOR_WIFI6=y \
CONFIG_ATBM_USB_INTR_WIFI6=y \
CONFIG_ATBM_FUNC_DEV_CTRL_API_WIFI6=y \
CONFIG_ATBM_FUNC_MODULE_FS_WIFI6=y \
CONFIG_ATBM_FUNC_PRIVE_IE_WIFI6=y \
CONFIG_ATBM_FUNC_SAE_AUTHEN_WIFI6=y \
CONFIG_ATBM_FUNC_DRIVER_SETUP_AMPDU_WIFI6=y \
CONFIG_ATBM_DEFAULT_COUNTRY_CODE_WIFI6=00 \
CONFIG_ATBM_APOLLO_SUPPORT_SGI_WIFI6=y \
CONFIG_ATBM_WIFIIF1_NAME_WIFI6=wlan%d \
CONFIG_NEED_P2P0_INTERFACE_WIFI6=y \
CONFIG_ATBM_WIFIIF2_NAME_WIFI6=p2p%d \
CONFIG_ATBM_MODULE_PM_STAYAWK_WIFI6=pm_stayawake \
CONFIG_ATBM_MODULE_DRIVER_NAME_WIFI6=atbm_wlan \
CONFIG_ATBM_PLATFORM_DEVICE_NAME_WIFI6=atbm_dev_wifi \
CONFIG_ATBM_MODULE_NAME_WIFI6=atbm606x_wifi_usb \
Comment thread
dimerr marked this conversation as resolved.
Resolved
CONFIG_CPTCFG_CFG80211=y \
CONFIG_CPTCFG_CFG80211_WEXT=y \
CONFIG_CPTCFG_CFG80211_CRDA_SUPPORT=y \
CONFIG_CPTCFG_CFG80211_COUNTRY_CODE=y

# Its mac80211 code reaches the WEP/TKIP software crypto unconditionally
# on kernels up to 5.4; this option is what gives it the fields it uses.
ATBM606X_OPENIPC_MODULE_MAKE_OPTS += CONFIG_ATBM_FUNC_SW_ENC_WIFI6=y

$(eval $(kernel-module))
$(eval $(generic-package))
7 changes: 7 additions & 0 deletions general/package/ssv6020-openipc/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
config BR2_PACKAGE_SSV6020_OPENIPC
bool "ssv6020-openipc"
depends on BR2_LINUX_KERNEL
help
iComm SSV6020 (Turismo E) SDIO wireless driver, sdio:v5653d2060:
the SSV6020B/C, sold as the SSV6158M on Xiongmai XM533 boards.
Loads ssv6x5x-sw.bin from /lib/firmware.
25 changes: 25 additions & 0 deletions general/package/ssv6020-openipc/ssv6020-openipc.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
################################################################################
#
# ssv6020-openipc
#
################################################################################

# OpenIPC/ssv6x5x's ssv6020/ directory: iComm's L.SMAC trunk r170 with the
# SSV6020 HAL, as Allwinner's BSP ships it for the SSV6158, built as an
# external module on 3.10 kernels.
SSV6020_OPENIPC_SITE = $(call github,openipc,ssv6x5x,$(SSV6020_OPENIPC_VERSION))
SSV6020_OPENIPC_VERSION = 1d5db4649d12cdfddc7c8ecccd039e528afca89f

SSV6020_OPENIPC_LICENSE = GPL-2.0

SSV6020_OPENIPC_MODULE_SUBDIRS = ssv6020
SSV6020_OPENIPC_MODULE_MAKE_OPTS = CONFIG_SSV6X5X=m

define SSV6020_OPENIPC_INSTALL_FIRMWARE
$(INSTALL) -D -m 644 $(@D)/ssv6020/image/ssv6x5x-sw.bin $(TARGET_DIR)/lib/firmware/ssv6x5x-sw.bin
$(INSTALL) -D -m 644 $(@D)/ssv6020/ssv6x5x-wifi.cfg $(TARGET_DIR)/etc/ssv6x5x-wifi.cfg
endef
SSV6020_OPENIPC_POST_INSTALL_TARGET_HOOKS += SSV6020_OPENIPC_INSTALL_FIRMWARE

$(eval $(kernel-module))
$(eval $(generic-package))
Comment thread
dimerr marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ insert_ko() {
# The kernel's xm_v200_sd, not the vendor's sdio0_sd/sdio1_sd: those hand
# the arasan driver their own kernel's platform data layout.
modprobe xm_v200_sd detect=1 pdn="$SDIO_PDN"
insmod dwc2.ko
insmod xm_usb0.ko
# modprobe: a Wi-Fi profile (/etc/wireless/usb) may have loaded them already
modprobe dwc2
modprobe xm_usb0
}

remove_ko() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ insert_ko() {
# The kernel's xm_v200_sd, not the vendor's sdio0_sd/sdio1_sd: those hand
# the arasan driver their own kernel's platform data layout.
modprobe xm_v200_sd detect=1 pdn="$SDIO_PDN"
insmod dwc2.ko
insmod xm_usb0.ko
# modprobe: a Wi-Fi profile (/etc/wireless/usb) may have loaded them already
modprobe dwc2
modprobe xm_usb0
}

remove_ko() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ insert_ko() {
# The kernel's xm_v200_sd, not the vendor's sdio0_sd/sdio1_sd: those hand
# the arasan driver their own kernel's platform data layout.
modprobe xm_v200_sd detect=1 pdn="$SDIO_PDN"
insmod dwc2.ko
insmod xm_usb0.ko
# modprobe: a Wi-Fi profile (/etc/wireless/usb) may have loaded them already
modprobe dwc2
modprobe xm_usb0
}

remove_ko() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ insert_ko() {
insmod adc.ko
# No SD card: the X2W-WNG has no slot, and its firmware ships no SD
# module to take the pads from.
insmod dwc2.ko
insmod xm_usb0.ko
# modprobe: a Wi-Fi profile (/etc/wireless/usb) may have loaded them already
modprobe dwc2
modprobe xm_usb0
}

remove_ko() {
Expand Down
Loading