10029ccabSBitterblue Smith // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 20029ccabSBitterblue Smith /* Copyright(c) 2025 Realtek Corporation 30029ccabSBitterblue Smith */ 40029ccabSBitterblue Smith 50029ccabSBitterblue Smith #include <linux/module.h> 60029ccabSBitterblue Smith #include <linux/usb.h> 70029ccabSBitterblue Smith #include "rtw8852a.h" 80029ccabSBitterblue Smith #include "reg.h" 90029ccabSBitterblue Smith #include "usb.h" 100029ccabSBitterblue Smith 110029ccabSBitterblue Smith static const struct rtw89_usb_info rtw8852a_usb_info = { 120029ccabSBitterblue Smith .usb_host_request_2 = R_AX_USB_HOST_REQUEST_2, 130029ccabSBitterblue Smith .usb_wlan0_1 = R_AX_USB_WLAN0_1, 140029ccabSBitterblue Smith .hci_func_en = R_AX_HCI_FUNC_EN, 150029ccabSBitterblue Smith .usb3_mac_npi_config_intf_0 = R_AX_USB3_MAC_NPI_CONFIG_INTF_0, 160029ccabSBitterblue Smith .usb_endpoint_0 = R_AX_USB_ENDPOINT_0, 170029ccabSBitterblue Smith .usb_endpoint_2 = R_AX_USB_ENDPOINT_2, 180029ccabSBitterblue Smith .bulkout_id = { 190029ccabSBitterblue Smith [RTW89_DMA_ACH0] = 3, 200029ccabSBitterblue Smith [RTW89_DMA_ACH2] = 5, 210029ccabSBitterblue Smith [RTW89_DMA_ACH4] = 4, 220029ccabSBitterblue Smith [RTW89_DMA_ACH6] = 6, 230029ccabSBitterblue Smith [RTW89_DMA_B0MG] = 0, 240029ccabSBitterblue Smith [RTW89_DMA_B0HI] = 0, 250029ccabSBitterblue Smith [RTW89_DMA_B1MG] = 1, 260029ccabSBitterblue Smith [RTW89_DMA_B1HI] = 1, 270029ccabSBitterblue Smith [RTW89_DMA_H2C] = 2, 280029ccabSBitterblue Smith }, 290029ccabSBitterblue Smith }; 300029ccabSBitterblue Smith 310029ccabSBitterblue Smith static const struct rtw89_driver_info rtw89_8852au_info = { 320029ccabSBitterblue Smith .chip = &rtw8852a_chip_info, 330029ccabSBitterblue Smith .variant = NULL, 340029ccabSBitterblue Smith .quirks = NULL, 350029ccabSBitterblue Smith .bus = { 360029ccabSBitterblue Smith .usb = &rtw8852a_usb_info, 370029ccabSBitterblue Smith } 380029ccabSBitterblue Smith }; 390029ccabSBitterblue Smith 400029ccabSBitterblue Smith static const struct usb_device_id rtw_8852au_id_table[] = { 410029ccabSBitterblue Smith { USB_DEVICE_AND_INTERFACE_INFO(0x0411, 0x0312, 0xff, 0xff, 0xff), 420029ccabSBitterblue Smith .driver_info = (kernel_ulong_t)&rtw89_8852au_info }, 430029ccabSBitterblue Smith { USB_DEVICE_AND_INTERFACE_INFO(0x056e, 0x4020, 0xff, 0xff, 0xff), 440029ccabSBitterblue Smith .driver_info = (kernel_ulong_t)&rtw89_8852au_info }, 450029ccabSBitterblue Smith { USB_DEVICE_AND_INTERFACE_INFO(0x0b05, 0x1997, 0xff, 0xff, 0xff), 460029ccabSBitterblue Smith .driver_info = (kernel_ulong_t)&rtw89_8852au_info }, 470029ccabSBitterblue Smith { USB_DEVICE_AND_INTERFACE_INFO(0x0bda, 0x8832, 0xff, 0xff, 0xff), 480029ccabSBitterblue Smith .driver_info = (kernel_ulong_t)&rtw89_8852au_info }, 490029ccabSBitterblue Smith { USB_DEVICE_AND_INTERFACE_INFO(0x0bda, 0x885a, 0xff, 0xff, 0xff), 500029ccabSBitterblue Smith .driver_info = (kernel_ulong_t)&rtw89_8852au_info }, 510029ccabSBitterblue Smith { USB_DEVICE_AND_INTERFACE_INFO(0x0bda, 0x885c, 0xff, 0xff, 0xff), 520029ccabSBitterblue Smith .driver_info = (kernel_ulong_t)&rtw89_8852au_info }, 530029ccabSBitterblue Smith { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x3321, 0xff, 0xff, 0xff), 540029ccabSBitterblue Smith .driver_info = (kernel_ulong_t)&rtw89_8852au_info }, 55*292c0bc8SZenm Chen { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x3323, 0xff, 0xff, 0xff), 56*292c0bc8SZenm Chen .driver_info = (kernel_ulong_t)&rtw89_8852au_info }, 570029ccabSBitterblue Smith { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x332c, 0xff, 0xff, 0xff), 580029ccabSBitterblue Smith .driver_info = (kernel_ulong_t)&rtw89_8852au_info }, 590029ccabSBitterblue Smith { USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x013f, 0xff, 0xff, 0xff), 600029ccabSBitterblue Smith .driver_info = (kernel_ulong_t)&rtw89_8852au_info }, 610029ccabSBitterblue Smith { USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x0140, 0xff, 0xff, 0xff), 620029ccabSBitterblue Smith .driver_info = (kernel_ulong_t)&rtw89_8852au_info }, 630029ccabSBitterblue Smith { USB_DEVICE_AND_INTERFACE_INFO(0x2357, 0x0141, 0xff, 0xff, 0xff), 640029ccabSBitterblue Smith .driver_info = (kernel_ulong_t)&rtw89_8852au_info }, 65a2f1fc9aSJan Gerber { USB_DEVICE_AND_INTERFACE_INFO(0x3625, 0x010d, 0xff, 0xff, 0xff), 66a2f1fc9aSJan Gerber .driver_info = (kernel_ulong_t)&rtw89_8852au_info }, 670029ccabSBitterblue Smith { USB_DEVICE_AND_INTERFACE_INFO(0x3625, 0x010f, 0xff, 0xff, 0xff), 680029ccabSBitterblue Smith .driver_info = (kernel_ulong_t)&rtw89_8852au_info }, 690029ccabSBitterblue Smith {}, 700029ccabSBitterblue Smith }; 710029ccabSBitterblue Smith MODULE_DEVICE_TABLE(usb, rtw_8852au_id_table); 720029ccabSBitterblue Smith 730029ccabSBitterblue Smith static struct usb_driver rtw_8852au_driver = { 740029ccabSBitterblue Smith .name = KBUILD_MODNAME, 750029ccabSBitterblue Smith .id_table = rtw_8852au_id_table, 760029ccabSBitterblue Smith .probe = rtw89_usb_probe, 770029ccabSBitterblue Smith .disconnect = rtw89_usb_disconnect, 780029ccabSBitterblue Smith }; 790029ccabSBitterblue Smith module_usb_driver(rtw_8852au_driver); 800029ccabSBitterblue Smith 810029ccabSBitterblue Smith MODULE_AUTHOR("Bitterblue Smith <rtl8821cerfe2@gmail.com>"); 820029ccabSBitterblue Smith MODULE_DESCRIPTION("Realtek 802.11ax wireless 8852AU driver"); 830029ccabSBitterblue Smith MODULE_LICENSE("Dual BSD/GPL"); 84