Skip to content

Commit

Permalink
ath11k-wifi: add board bdf files package
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf authored and sdf8057 committed Apr 1, 2023
1 parent 8998744 commit c127280
Show file tree
Hide file tree
Showing 7 changed files with 194 additions and 1 deletion.
92 changes: 92 additions & 0 deletions package/firmware/ath11k-wifi/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/version.mk

PKG_NAME:=ath11k-wifi
PKG_RELEASE:=1
PKG_FLAGS:=nonshared

include $(INCLUDE_DIR)/package.mk

define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef

define Build/Compile
endef

# Use ath10k-bdencoder from https://github.com/qca/qca-swiss-army-knife.git
# to generate the board-* files here.
#
# This is intended to be used on an interim basis until device-specific
# board data for new devices is available through the upstream compilation
#
# Please send a mail with your device-specific board files upstream.
# You can find instructions and examples on the linux-wireless wiki:
# <https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles>

ALLWIFIBOARDS:= \
gl-ax1800 \
gl-axt1800 \
qihoo_v6

ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ath11k-wifi-$(BOARD))

define Package/ath11k-wifi-default
SUBMENU:=ath11k Board-Specific Overrides
SECTION:=firmware
CATEGORY:=Firmware
DEPENDS:=@TARGET_ipq60xx
TITLE:=Custom Board
endef

define ath11k-wifi-install-one-to
$(INSTALL_DIR) $(2)/lib/firmware/ath11k/$(3)/
$(INSTALL_DATA) $(1) $(2)/lib/firmware/ath11k/$(3)/board-2.bin
endef

define ath11k-wifi-install-one
$(if $(filter $(suffix $(1)),.IPQ6018 .ipq6018),\
$(call ath11k-wifi-install-one-to,$(1),$(2),IPQ6018/hw1.0),\
$(error Unrecognized board-file suffix '$(suffix $(1))' for '$(1)')\
)

endef
# Blank line required at end of above define due to foreach context

define generate-ath11k-wifi-package
define Package/ath11k-wifi-$(1)
$(call Package/ath11k-wifi-default)
TITLE:=board-2.bin Overrides for $(2)
CONFLICTS:=$(PREV_BOARD)
endef

define Package/ath11k-wifi-$(1)/description
The $(2) requires board-specific, reference ("cal") data
that is not yet present in the upstream wireless firmware distribution.

This package supplies board-2.bin file(s) that, in the interim,
overwrite those supplied by the ath10k-firmware-* packages.

This is package is only necessary for the $(2).

Do not install it for any other device!
endef

define Package/ath11k-wifi-$(1)/install-overlay
$$$$(foreach IPQ_WIFI_BOARD_FILE,$$$$(wildcard board-$(1).*),\
$$$$(call ath11k-wifi-install-one,$$$$(IPQ_WIFI_BOARD_FILE),$$(1)))
endef

PREV_BOARD+=ath11k-wifi-$(1)
endef

# Add board name to ALLWIFIBOARDS
# Place files in this directory as board-<devicename>.<qca4019|qca9888|qca9984>
# Add $(eval $(call generate-ath11k-wifi-package,<devicename>,<display name>))

$(eval $(call generate-ath11k-wifi-package,gl-ax1800,Gl.iNET AX1800))
$(eval $(call generate-ath11k-wifi-package,gl-axt1800,Gl.iNET AXT1800))
$(eval $(call generate-ath11k-wifi-package,qihoo_v6,QIHOO 360V6))


$(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE))))
Binary file added package/firmware/ath11k-wifi/board-2.bin.IPQ6018
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
99 changes: 99 additions & 0 deletions package/firmware/ath11k-wifi/qdss_trace_config.bin
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
//This comment and parser will ignore
//Tracer scenario(or commands) always
//starts with start keyword
//Below commands to enable Event traces on UMAC,MAC0,MAC1
//seq_start;
//seq_type:mem_req;
//memory size always given in KB. beow example reserves 3 buffers segments of 16 KB.
//sink:etr_ddr,0x1,0x1000;
//seq_end;
//Below commands to enable Event traces on UMAC,MAC0,MAC1
seq_start;
seq_type:mac_event_trace;
sink:etr_ddr;
subsys_cfg_start:mac0;
hwsch:0x1, 0x000FFFF1,0x1036052C,0x0,0x0;
rxdma:0x2, 0x3400,0x8000,0x0,0x0;
crypto:0x3, 0xF79B3770,0x0,0x0,0x0;
txpcu:0x4, 0xD687F4E7,0x20000092,0x0,0x0;
txole:0x5, 0x640F0622,0x2,0x0,0x0;
pdg:0x6, 0x3C800706,0x0,0x0,0x0;
subsys_cfg_end:mac0;
subsys_cfg_start:mac1;
hwsch:0x7, 0x000FFFF1,0x1036052C,0x0,0x0;
rxdma:0x8, 0x3400,0x8000,0x0,0x0;
crypto:0x9, 0xF79B3770,0x0,0x0,0x0;
txpcu:0xA, 0xD687F4E7,0x20000092,0x0,0x0;
txole:0xB, 0x640F0622,0x2,0x0,0x0;
pdg:0xC, 0x3C800706,0x0,0x0,0x0;
subsys_cfg_end:mac1;
swap:0xFFFFFFFF;
trigger_start:trc;
wfi:0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF;
ts0:0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF;
ts1:0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF;
ts2:0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF;
ts3:0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF;
ts4:0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF;
trigger_end:trc;
memw:0xFFFFFFFF,0xFFFFFFFF;
seq_end;
// Below commands to enable obo trace on the mac0
//seq_start;
//seq_type:mac_obo_trace;
//sink:etb_wcss;
//subsys_cfg_start:mac0;
//hwsch:0x1,0xABCDABCD;
//subsys_cfg_end:mac0;
//swap:0xABCDABCD;
//trigger_start:trc;
//wfi:0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF;
//ts0:0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF;
//ts1:0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF;
//ts2:0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF;
//ts3:0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF;
//ts4:0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF;
//trigger_end:trc;
//memw:0xFFFFFFFF,0xFFFFFFFF;
//seq_end;
// Below commands to enable TLV trace on the mac0
//seq_start;
//seq_type:mac_tlv_trace;
//sink:etb_wcss;
//subsys_cfg_start:mac0;
//tlv_port:PDG_TXDMA_TLV;
//subsys_cfg_end:mac0;
//seq_end;
// Below commands to enable q6 etm
//seq_start;
//seq_type:q6_etm_trace;
//sink:etr_ddr;
//seq_end;
// Below commands to enable umac noc traces
//seq_start;
//seq_type:umac_noc_trace;
//sink:etb_wcss;
//ctrl:0x12;
//port_sel:0x4;
//lut:0xA;
//routeid_base:0x01000000;
//routeid_mask:0x01c00000;
//addr_lo:0x0;
//addr_hi:0x0;
//win_size:0x25;
//req_opcode:0x3;
//res_status:0x3;
//fltr_len:0xF;
//async_period:0xC;
//seq_end;
// Below commands to enable umac noc traces
//seq_start;
//seq_type:phy_tlv_trace;
//sink:etr_ddr;
//seq_end;
//seq_start;
//seq_type:phy_event_trace;
//sink:etr_ddr;
//phya:0x1,0x1;
//phyb:0x1,0x1;
//seq_end;
4 changes: 3 additions & 1 deletion target/linux/ipq60xx/image/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ define Device/glinet_gl-ax1800
$(call Device/glinet_gl-common)
DEVICE_DTS := qcom-ipq6018-gl-ax1800
DEVICE_TITLE := GL.iNet GL-AX1800
DEVICE_PACKAGES := ath11k-wifi-gl-axt1800
IMAGES += nand-factory.bin
IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand
endef
Expand All @@ -65,6 +66,7 @@ define Device/glinet_gl-axt1800
$(call Device/glinet_gl-common)
DEVICE_DTS := qcom-ipq6018-gl-axt1800
DEVICE_TITLE := GL.iNet GL-AXT1800
DEVICE_PACKAGES := ath11k-wifi-gl-ax1800
endef
TARGET_DEVICES += glinet_gl-axt1800

Expand Down Expand Up @@ -103,7 +105,7 @@ define Device/qihoo_v6
DEVICE_DTS := qcom-ipq6018-qihoo-v6
DEVICE_DTS_CONFIG := config@cp03-c1
DEVICE_TITLE := Qihoo V6
DEVICE_PACKAGES := kmod-usb3 kmod-usb-phy-msm
DEVICE_PACKAGES := ath11k-wifi-qihoo-v6 kmod-usb3 kmod-usb-phy-msm
endef
TARGET_DEVICES += qihoo_v6

Expand Down

0 comments on commit c127280

Please sign in to comment.