diff --git a/vendor/rockchip/common/wifi/firmware/mt7601u.bin b/vendor/rockchip/common/wifi/firmware/mt7601u.bin new file mode 100644 index 00000000000..62b3894310d Binary files /dev/null and b/vendor/rockchip/common/wifi/firmware/mt7601u.bin differ diff --git a/vendor/rockchip/common/wifi/firmware/mt7662.bin b/vendor/rockchip/common/wifi/firmware/mt7662.bin new file mode 100644 index 00000000000..26c6fbb278b Binary files /dev/null and b/vendor/rockchip/common/wifi/firmware/mt7662.bin differ diff --git a/vendor/rockchip/common/wifi/firmware/mt7662_rom_patch.bin b/vendor/rockchip/common/wifi/firmware/mt7662_rom_patch.bin new file mode 100644 index 00000000000..10b245e9c17 Binary files /dev/null and b/vendor/rockchip/common/wifi/firmware/mt7662_rom_patch.bin differ diff --git a/vendor/rockchip/common/wifi/mediatek/WIFI_MT7922_patch_mcu_1_1_hdr.bin b/vendor/rockchip/common/wifi/mediatek/WIFI_MT7922_patch_mcu_1_1_hdr.bin new file mode 100644 index 00000000000..c07a908d0c4 Binary files /dev/null and b/vendor/rockchip/common/wifi/mediatek/WIFI_MT7922_patch_mcu_1_1_hdr.bin differ diff --git a/vendor/rockchip/common/wifi/mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin b/vendor/rockchip/common/wifi/mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin new file mode 100644 index 00000000000..869e0288b52 Binary files /dev/null and b/vendor/rockchip/common/wifi/mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin differ diff --git a/vendor/rockchip/common/wifi/mediatek/WIFI_RAM_CODE_MT7922_1.bin b/vendor/rockchip/common/wifi/mediatek/WIFI_RAM_CODE_MT7922_1.bin new file mode 100644 index 00000000000..294b742509a Binary files /dev/null and b/vendor/rockchip/common/wifi/mediatek/WIFI_RAM_CODE_MT7922_1.bin differ diff --git a/vendor/rockchip/common/wifi/mediatek/WIFI_RAM_CODE_MT7961_1.bin b/vendor/rockchip/common/wifi/mediatek/WIFI_RAM_CODE_MT7961_1.bin new file mode 100644 index 00000000000..946720ac01f Binary files /dev/null and b/vendor/rockchip/common/wifi/mediatek/WIFI_RAM_CODE_MT7961_1.bin differ diff --git a/vendor/rockchip/common/wifi/mediatek/mt7662u.bin b/vendor/rockchip/common/wifi/mediatek/mt7662u.bin new file mode 100644 index 00000000000..93c8a7967c8 Binary files /dev/null and b/vendor/rockchip/common/wifi/mediatek/mt7662u.bin differ diff --git a/vendor/rockchip/common/wifi/mediatek/mt7662u_rom_patch.bin b/vendor/rockchip/common/wifi/mediatek/mt7662u_rom_patch.bin new file mode 100644 index 00000000000..2213b2a831e Binary files /dev/null and b/vendor/rockchip/common/wifi/mediatek/mt7662u_rom_patch.bin differ diff --git a/vendor/rockchip/common/wifi/modules/cfg80211.ko b/vendor/rockchip/common/wifi/modules/cfg80211.ko new file mode 100644 index 00000000000..08eaed2aa6d Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/cfg80211.ko differ diff --git a/vendor/rockchip/common/wifi/modules/mac80211.ko b/vendor/rockchip/common/wifi/modules/mac80211.ko new file mode 100644 index 00000000000..8339c7506ca Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/mac80211.ko differ diff --git a/vendor/rockchip/common/wifi/modules/mt76-connac-lib.ko b/vendor/rockchip/common/wifi/modules/mt76-connac-lib.ko new file mode 100644 index 00000000000..3fbea2c9214 Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/mt76-connac-lib.ko differ diff --git a/vendor/rockchip/common/wifi/modules/mt76-usb.ko b/vendor/rockchip/common/wifi/modules/mt76-usb.ko new file mode 100644 index 00000000000..78eb40a4341 Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/mt76-usb.ko differ diff --git a/vendor/rockchip/common/wifi/modules/mt76.ko b/vendor/rockchip/common/wifi/modules/mt76.ko new file mode 100644 index 00000000000..0f38f46e973 Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/mt76.ko differ diff --git a/vendor/rockchip/common/wifi/modules/mt7601u.ko b/vendor/rockchip/common/wifi/modules/mt7601u.ko new file mode 100644 index 00000000000..fc451a93667 Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/mt7601u.ko differ diff --git a/vendor/rockchip/common/wifi/modules/mt76x0-common.ko b/vendor/rockchip/common/wifi/modules/mt76x0-common.ko new file mode 100644 index 00000000000..fed1d3a80b0 Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/mt76x0-common.ko differ diff --git a/vendor/rockchip/common/wifi/modules/mt76x02-lib.ko b/vendor/rockchip/common/wifi/modules/mt76x02-lib.ko new file mode 100644 index 00000000000..e88f9e7cdea Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/mt76x02-lib.ko differ diff --git a/vendor/rockchip/common/wifi/modules/mt76x02-usb.ko b/vendor/rockchip/common/wifi/modules/mt76x02-usb.ko new file mode 100644 index 00000000000..7703b73c3b6 Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/mt76x02-usb.ko differ diff --git a/vendor/rockchip/common/wifi/modules/mt76x0u.ko b/vendor/rockchip/common/wifi/modules/mt76x0u.ko new file mode 100644 index 00000000000..b4e0e7a5491 Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/mt76x0u.ko differ diff --git a/vendor/rockchip/common/wifi/modules/mt76x2-common.ko b/vendor/rockchip/common/wifi/modules/mt76x2-common.ko new file mode 100644 index 00000000000..1638e7cc559 Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/mt76x2-common.ko differ diff --git a/vendor/rockchip/common/wifi/modules/mt76x2e.ko b/vendor/rockchip/common/wifi/modules/mt76x2e.ko new file mode 100644 index 00000000000..d090d5b4baf Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/mt76x2e.ko differ diff --git a/vendor/rockchip/common/wifi/modules/mt76x2u.ko b/vendor/rockchip/common/wifi/modules/mt76x2u.ko new file mode 100644 index 00000000000..2e908f312f8 Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/mt76x2u.ko differ diff --git a/vendor/rockchip/common/wifi/modules/mt7921-common.ko b/vendor/rockchip/common/wifi/modules/mt7921-common.ko new file mode 100644 index 00000000000..c4d7ef7ebba Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/mt7921-common.ko differ diff --git a/vendor/rockchip/common/wifi/modules/mt7921e.ko b/vendor/rockchip/common/wifi/modules/mt7921e.ko new file mode 100644 index 00000000000..d0c579045c2 Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/mt7921e.ko differ diff --git a/vendor/rockchip/common/wifi/modules/mt7921u.ko b/vendor/rockchip/common/wifi/modules/mt7921u.ko new file mode 100644 index 00000000000..caef059d5f9 Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/mt7921u.ko differ diff --git a/vendor/rockchip/common/wifi/modules/rtl8812au.ko b/vendor/rockchip/common/wifi/modules/rtl8812au.ko new file mode 100644 index 00000000000..9c93cb7b11b Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/rtl8812au.ko differ diff --git a/vendor/rockchip/common/wifi/modules/rtl8821CU.ko b/vendor/rockchip/common/wifi/modules/rtl8821CU.ko new file mode 100644 index 00000000000..6e4b1c90b22 Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/rtl8821CU.ko differ diff --git a/vendor/rockchip/common/wifi/modules/rtl8822ce.ko b/vendor/rockchip/common/wifi/modules/rtl8822ce.ko new file mode 100644 index 00000000000..51ab6f0304e Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/rtl8822ce.ko differ diff --git a/vendor/rockchip/common/wifi/modules/rtw88_8822c.ko b/vendor/rockchip/common/wifi/modules/rtw88_8822c.ko new file mode 100644 index 00000000000..b0f063acfee Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/rtw88_8822c.ko differ diff --git a/vendor/rockchip/common/wifi/modules/rtw88_8822ce.ko b/vendor/rockchip/common/wifi/modules/rtw88_8822ce.ko new file mode 100644 index 00000000000..43c291533c1 Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/rtw88_8822ce.ko differ diff --git a/vendor/rockchip/common/wifi/modules/rtw88_core.ko b/vendor/rockchip/common/wifi/modules/rtw88_core.ko new file mode 100644 index 00000000000..7210b599b86 Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/rtw88_core.ko differ diff --git a/vendor/rockchip/common/wifi/modules/rtw88_pci.ko b/vendor/rockchip/common/wifi/modules/rtw88_pci.ko new file mode 100644 index 00000000000..573c5fab190 Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/rtw88_pci.ko differ diff --git a/vendor/rockchip/common/wifi/modules/rtw89_8852a.ko b/vendor/rockchip/common/wifi/modules/rtw89_8852a.ko new file mode 100644 index 00000000000..4065cbe0120 Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/rtw89_8852a.ko differ diff --git a/vendor/rockchip/common/wifi/modules/rtw89_8852ae.ko b/vendor/rockchip/common/wifi/modules/rtw89_8852ae.ko new file mode 100644 index 00000000000..ee84df7e8c1 Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/rtw89_8852ae.ko differ diff --git a/vendor/rockchip/common/wifi/modules/rtw89_8852c.ko b/vendor/rockchip/common/wifi/modules/rtw89_8852c.ko new file mode 100644 index 00000000000..39c35645b20 Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/rtw89_8852c.ko differ diff --git a/vendor/rockchip/common/wifi/modules/rtw89_8852ce.ko b/vendor/rockchip/common/wifi/modules/rtw89_8852ce.ko new file mode 100644 index 00000000000..578e1b8f929 Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/rtw89_8852ce.ko differ diff --git a/vendor/rockchip/common/wifi/modules/rtw89_core.ko b/vendor/rockchip/common/wifi/modules/rtw89_core.ko new file mode 100644 index 00000000000..794dc14b5d6 Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/rtw89_core.ko differ diff --git a/vendor/rockchip/common/wifi/modules/rtw89_pci.ko b/vendor/rockchip/common/wifi/modules/rtw89_pci.ko new file mode 100644 index 00000000000..346f2cc1f7a Binary files /dev/null and b/vendor/rockchip/common/wifi/modules/rtw89_pci.ko differ diff --git a/vendor/rockchip/common/wifi/rtw88/README b/vendor/rockchip/common/wifi/rtw88/README new file mode 100644 index 00000000000..01449ca72e4 --- /dev/null +++ b/vendor/rockchip/common/wifi/rtw88/README @@ -0,0 +1,34 @@ + + rtw88 firmware +================ + +This repository contains firmware images supported by Realtek's wireless +driver rtw88. And some of the devices run with more than one firmware +file. Basically, a "normal" firmware is necessary to be downloaded to +the device. +And another is called "wowlan" firmware, it should be loaded when a +device is going to suspend. Which means driver will "re-download/swap" +the firmware image. The wowlan firmware contains wake up functions that +can recognize specific events and send a wake up signal to device if +needed, and the system will resume to running state. During resume, +driver will then swap the normal firmware back, return to running state. + +If any distros or platforms do not require wowlan feature, they can +_only_ pick the normal firmware. And everything still works fine, +except that the device cannot be waken from the wireless NICs. + +Currently supported devices with corresponding firmwares: + +RTL8822BE + rtw8822b_fw.bin + +RTL8821CE + rtw8821c_fw.bin + +RTL8822CE + rtw8822c_fw.bin + rtw8822c_wow_fw.bin + +RTL8723DE + rtw8723d_fw.bin + diff --git a/vendor/rockchip/common/wifi/rtw88/rtw8723d_fw.bin b/vendor/rockchip/common/wifi/rtw88/rtw8723d_fw.bin new file mode 100644 index 00000000000..ac2b9250c39 Binary files /dev/null and b/vendor/rockchip/common/wifi/rtw88/rtw8723d_fw.bin differ diff --git a/vendor/rockchip/common/wifi/rtw88/rtw8821c_fw.bin b/vendor/rockchip/common/wifi/rtw88/rtw8821c_fw.bin new file mode 100644 index 00000000000..9beeb38c4bf Binary files /dev/null and b/vendor/rockchip/common/wifi/rtw88/rtw8821c_fw.bin differ diff --git a/vendor/rockchip/common/wifi/rtw88/rtw8822b_fw.bin b/vendor/rockchip/common/wifi/rtw88/rtw8822b_fw.bin new file mode 100644 index 00000000000..0934ffcc77a Binary files /dev/null and b/vendor/rockchip/common/wifi/rtw88/rtw8822b_fw.bin differ diff --git a/vendor/rockchip/common/wifi/rtw88/rtw8822c_fw.bin b/vendor/rockchip/common/wifi/rtw88/rtw8822c_fw.bin new file mode 100644 index 00000000000..919fcd8de59 Binary files /dev/null and b/vendor/rockchip/common/wifi/rtw88/rtw8822c_fw.bin differ diff --git a/vendor/rockchip/common/wifi/rtw88/rtw8822c_wow_fw.bin b/vendor/rockchip/common/wifi/rtw88/rtw8822c_wow_fw.bin new file mode 100644 index 00000000000..1ce74fda8bf Binary files /dev/null and b/vendor/rockchip/common/wifi/rtw88/rtw8822c_wow_fw.bin differ diff --git a/vendor/rockchip/common/wifi/wifi.mk b/vendor/rockchip/common/wifi/wifi.mk index d4f68a7f77a..ff00bef8e28 100644 --- a/vendor/rockchip/common/wifi/wifi.mk +++ b/vendor/rockchip/common/wifi/wifi.mk @@ -2,23 +2,48 @@ HAVE_EXT_WIFI_KO_FILE := $(shell test -d $(TOPDIR)external/wifi_driver/ && echo ifeq ($(HAVE_EXT_WIFI_KO_FILE),yes) EXT_WIFI_KO_FILES := $(shell find $(TOPDIR)external/wifi_driver -name "*.ko" -type f) BOARD_VENDOR_KERNEL_MODULES += \ - $(foreach file, $(EXT_WIFI_KO_FILES), $(file)) + $(foreach file, $(EXT_WIFI_KO_FILES), $(file)) # priority to use external/wifi_driver, delete the same ko in kernel wifi driver EXT_WIFI_DRIVER := $(shell find $(TOPDIR)external/wifi_driver -name "*.ko" -type f | awk -F "wifi_driver/" '{print $$2}' | awk -F "/" '{print $$1}') $(shell for line in $(EXT_WIFI_DRIVER); do rm $(TOPDIR)$(PRODUCT_KERNEL_PATH)/drivers/net/wireless/rockchip_wlan/$$line/*.ko > /dev/null 2>&1; done) $(shell for line in $(EXT_WIFI_DRIVER); do rm $(TOPDIR)$(PRODUCT_KERNEL_PATH)/drivers/net/wireless/rockchip_wlan/rkwifi/$$line/*.ko > /dev/null 2>&1; done) - endif WIFI_KO_FILES := $(shell find $(TOPDIR)$(PRODUCT_KERNEL_PATH)/drivers/net/wireless/rockchip_wlan -name "*.ko" -type f) +WIFI_KO_FILES += \ + $(CUR_PATH)/wifi/modules/cfg80211.ko \ + $(CUR_PATH)/wifi/modules/mac80211.ko \ + $(CUR_PATH)/wifi/modules/rtl8822ce.ko \ + $(CUR_PATH)/wifi/modules/rtl8812au.ko \ + $(CUR_PATH)/wifi/modules/rtl8821CU.ko \ + $(CUR_PATH)/wifi/modules/mt76.ko \ + $(CUR_PATH)/wifi/modules/mt76-connac-lib.ko \ + $(CUR_PATH)/wifi/modules/mt76-usb.ko \ + $(CUR_PATH)/wifi/modules/mt76x02-lib.ko \ + $(CUR_PATH)/wifi/modules/mt76x02-usb.ko \ + $(CUR_PATH)/wifi/modules/mt76x2-common.ko \ + $(CUR_PATH)/wifi/modules/mt76x2u.ko \ + $(CUR_PATH)/wifi/modules/mt7921-common.ko \ + $(CUR_PATH)/wifi/modules/mt7921e.ko \ + $(CUR_PATH)/wifi/modules/mt7921u.ko \ + $(CUR_PATH)/wifi/modules/mt7601u.ko + BOARD_VENDOR_KERNEL_MODULES += \ - $(foreach file, $(WIFI_KO_FILES), $(file)) + $(foreach file, $(WIFI_KO_FILES), $(file)) WifiFirmwareFile := $(shell ls $(CUR_PATH)/wifi/firmware) PRODUCT_COPY_FILES += \ - $(foreach file, $(WifiFirmwareFile), $(CUR_PATH)/wifi/firmware/$(file):$(TARGET_COPY_OUT_VENDOR)/etc/firmware/$(file)) + $(foreach file, $(WifiFirmwareFile), $(CUR_PATH)/wifi/firmware/$(file):$(TARGET_COPY_OUT_VENDOR)/etc/firmware/$(file)) + +MtkFirmwareFile := $(shell ls $(CUR_PATH)/wifi/mediatek) +PRODUCT_COPY_FILES += \ + $(foreach file, $(MtkFirmwareFile), $(CUR_PATH)/wifi/mediatek/$(file):$(TARGET_COPY_OUT_VENDOR)/etc/firmware/mediatek/$(file)) + +Rtw88FirmwareFile := $(shell ls $(CUR_PATH)/wifi/rtw88) +PRODUCT_COPY_FILES += \ + $(foreach file, $(Rtw88FirmwareFile), $(CUR_PATH)/wifi/rtw88/$(file):$(TARGET_COPY_OUT_VENDOR)/etc/firmware/rtw88/$(file)) RtlbtFirmwareFile := $(shell ls $(CUR_PATH)/wifi/rtl_bt) PRODUCT_COPY_FILES += \