Skip to content

Commit

Permalink
ipq807x: add Xiaomi AX3600 and ath11k support
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Jun 14, 2021
1 parent bb23907 commit 9d8a34c
Show file tree
Hide file tree
Showing 48 changed files with 6,176 additions and 101 deletions.
77 changes: 77 additions & 0 deletions package/firmware/ath11k-firmware/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=ath11k-firmware
PKG_SOURCE_DATE:=2020-06-26
PKG_SOURCE_VERSION:=ac35049edfa9e59fc0aa9988ba12ea91d28241f5
PKG_MIRROR_HASH:=a5bbe673c7714447df3197de2bc86a09b13d402b89f7f9a813c4b400d897eb9e
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/kvalo/ath11k-firmware.git

PKG_MAINTAINER:=Robert Marko <[email protected]>

include $(INCLUDE_DIR)/package.mk

define Package/ath11k-firmware-default
SECTION:=firmware
CATEGORY:=Firmware
URL:=$(PKG_SOURCE_URL)
DEPENDS:=
endef

define Package/ath11k-firmware-ipq6018
$(Package/ath11k-firmware-default)
TITLE:=ath11k firmware for IPQ6018 devices
SECTION:=firmware
CATEGORY:=Firmware
endef

define Package/ath11k-firmware-ipq8074
$(Package/ath11k-firmware-default)
TITLE:=ath11k firmware for IPQ8074 devices
SECTION:=firmware
CATEGORY:=Firmware
endef

define Package/ath11k-firmware-qca6390
$(Package/ath11k-firmware-default)
TITLE:=ath11k firmware for QCA6390 devices
SECTION:=firmware
CATEGORY:=Firmware
endef

define Build/Compile

endef

define Package/ath11k-firmware-ipq6018/install
$(INSTALL_DIR) $(1)/lib/firmware/IPQ6018
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/IPQ6018/hw1.0/board-2.bin \
$(1)/lib/firmware/IPQ6018/
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/IPQ6018/hw1.0/2.1.0.1/WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2/* \
$(1)/lib/firmware/IPQ6018
endef

define Package/ath11k-firmware-ipq8074/install
$(INSTALL_DIR) $(1)/lib/firmware/IPQ8074
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/IPQ8074/hw2.0/board-2.bin \
$(1)/lib/firmware/IPQ8074/
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/IPQ8074/hw2.0/2.1.0.1/WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2/* \
$(1)/lib/firmware/IPQ8074
endef

define Package/ath11k-firmware-qca6390/install
$(INSTALL_DIR) $(1)/lib/firmware/QCA6390
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/QCA6390/hw2.0/WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1/* \
$(1)/lib/firmware/QCA6390
endef

$(eval $(call BuildPackage,ath11k-firmware-ipq6018))
$(eval $(call BuildPackage,ath11k-firmware-ipq8074))
$(eval $(call BuildPackage,ath11k-firmware-qca6390))
21 changes: 19 additions & 2 deletions package/kernel/mac80211/ath.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PKG_DRIVERS += \
ath ath5k ath6kl ath6kl-sdio ath6kl-usb ath9k ath9k-common ath9k-htc ath10k \
carl9170 owl-loader ar5523 wil6210
ath11k carl9170 owl-loader ar5523 wil6210

PKG_CONFIG_DEPENDS += \
CONFIG_PACKAGE_ATH_DEBUG \
Expand All @@ -19,6 +19,7 @@ ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
ATH9K_DEBUGFS \
ATH9K_HTC_DEBUGFS \
ATH10K_DEBUGFS \
ATH11K_DEBUGFS \
CARL9170_DEBUGFS \
ATH5K_DEBUG \
ATH6KL_DEBUG \
Expand All @@ -28,14 +29,15 @@ endif
ifdef CONFIG_PACKAGE_MAC80211_TRACING
config-y += \
ATH10K_TRACING \
ATH11K_TRACING \
ATH6KL_TRACING \
ATH_TRACEPOINTS \
ATH5K_TRACER \
WIL6210_TRACING
endif

config-$(call config_package,ath) += ATH_CARDS ATH_COMMON
config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH9K_STATION_STATISTICS
config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH11K_DEBUG ATH9K_STATION_STATISTICS
config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED
config-$(CONFIG_PACKAGE_ATH_SPECTRAL) += ATH9K_COMMON_SPECTRAL ATH10K_SPECTRAL
config-$(CONFIG_PACKAGE_ATH_DYNACK) += ATH9K_DYNACK
Expand All @@ -55,6 +57,7 @@ config-$(CONFIG_ATH10K_THERMAL) += ATH10K_THERMAL

config-$(call config_package,ath9k-htc) += ATH9K_HTC
config-$(call config_package,ath10k) += ATH10K ATH10K_PCI
config-$(call config_package,ath11k) += ATH11K

config-$(call config_package,ath5k) += ATH5K
ifdef CONFIG_TARGET_ath25
Expand Down Expand Up @@ -282,6 +285,20 @@ define KernelPackage/ath10k/config

endef

define KernelPackage/ath11k
$(call KernelPackage/mac80211/Default)
TITLE:=Qualcomm 802.11ax wireless chipset support
URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k
DEPENDS+= @TARGET_ipq807x +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT +@DRIVER_11AX_SUPPORT +@DRIVER_11W_SUPPORT +kmod-crypto-michael-mic
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k.ko
AUTOLOAD:=$(call AutoProbe,ath11k)
endef

define KernelPackage/ath11k/description
This module adds support for Qualcomm Technologies 802.11ax family of
chipsets.
endef

define KernelPackage/carl9170
$(call KernelPackage/mac80211/Default)
TITLE:=Driver for Atheros AR9170 USB sticks
Expand Down
10 changes: 7 additions & 3 deletions target/linux/ipq807x/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ include $(TOPDIR)/rules.mk

ARCH:=aarch64
BOARD:=ipq807x
BOARDNAME:=Qualcomm Atheros IPQ807x
FEATURES:=squashfs ramdisk source-only
MAINTAINER:=John Crispin <[email protected]>
BOARDNAME:=Qualcomm Atheros IPQ807X
FEATURES:=squashfs fpu ramdisk nand source-only
KERNELNAME:=Image dtbs
CPU_TYPE:=cortex-a53
SUBTARGETS:=generic

KERNEL_PATCHVER:=5.4

include $(INCLUDE_DIR)/target.mk
DEFAULT_PACKAGES += \
kmod-leds-gpio kmod-gpio-button-hotplug \
ath11k-firmware-ipq8074 kmod-ath11k \
wpad-basic-wolfssl

$(eval $(call BuildTarget))
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh -x

[ -e /lib/firmware/$FIRMWARE ] && exit 0

. /lib/functions/caldata.sh

board=$(board_name)

case "$FIRMWARE" in
"IPQ8074/caldata.bin")
case "$board" in
xiaomi,ax3600)
caldata_extract "0:ART" 0x1000 0x20000
;;
esac
;;
*)
exit 1
;;
esac
5 changes: 5 additions & 0 deletions target/linux/ipq807x/base-files/etc/inittab
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2013 The Linux Foundation. All rights reserved.
::sysinit:/etc/init.d/rcS S boot
::shutdown:/etc/init.d/rcS K shutdown
ttyMSM0::askfirst:/usr/libexec/login.sh
ttyMSM1::askfirst:/usr/libexec/login.sh
Loading

0 comments on commit 9d8a34c

Please sign in to comment.