linux/drivers
Mark Chen fc342c4dc4 Bluetooth: btusb: Add protocol support for MediaTek MT7921U USB devices
There is mt7921 firmware download mechanism

1. Read Chip id from MT7921.

2. Download firmware by endpoint 0, it's the same mechanism with
mt7663/mt7668.
   (it's medaitek specific header format for downloading firmware.)

3. Enabling Bluetooth function.

The information in /sys/kernel/debug/usb/devices about the MT7921U
Bluetooth device is listed as the below.

  T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 40 Spd=480  MxCh= 0
  D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
  P:  Vendor=0e8d ProdID=7961 Rev= 1.00
  S:  Manufacturer=MediaTek Inc.
  S:  Product=Wireless_Device
  S:  SerialNumber=000000000
  C:* #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA
  A:  FirstIf#= 0 IfCount= 3 Cls=e0(wlcon) Sub=01 Prot=01
  I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
  E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=125us
  E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
  E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
  I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
  E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
  E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
  I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
  E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
  E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
  I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
  E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
  E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
  I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
  E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
  E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
  I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
  E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
  E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
  I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
  E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
  E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
  I:  If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
  E:  Ad=83(I) Atr=01(Isoc) MxPS=  63 Ivl=1ms
  E:  Ad=03(O) Atr=01(Isoc) MxPS=  63 Ivl=1ms
  I:* If#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
  E:  Ad=8a(I) Atr=03(Int.) MxPS=  64 Ivl=125us
  E:  Ad=0a(O) Atr=03(Int.) MxPS=  64 Ivl=125us
  I:  If#= 2 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
  E:  Ad=8a(I) Atr=03(Int.) MxPS= 512 Ivl=125us
  E:  Ad=0a(O) Atr=03(Int.) MxPS= 512 Ivl=125us

Signed-off-by: Mark Chen <Mark-YW.Chen@mediatek.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2021-02-02 17:21:52 +01:00
..
accessibility speakup: fix uninitialized flush_lock 2020-12-09 15:38:13 +01:00
acpi Driver core updates for 5.11-rc1 2020-12-15 14:02:26 -08:00
amba
android binder: add flag to clear buffer on txn complete 2020-12-09 15:41:21 +01:00
ata libata-5.10-2020-10-30 2020-10-30 14:51:01 -07:00
atm Merge https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-11-19 19:08:46 -08:00
auxdisplay auxdisplay: panel: Remove redundant charlcd_ops structures 2020-11-16 17:13:37 +01:00
base Driver core updates for 5.11-rc1 2020-12-15 14:02:26 -08:00
bcma
block zram: break the strict dependency from lzo 2020-12-15 12:13:47 -08:00
bluetooth Bluetooth: btusb: Add protocol support for MediaTek MT7921U USB devices 2021-02-02 17:21:52 +01:00
bus Char / Misc driver updates for 5.11-rc1 2020-12-15 14:10:09 -08:00
cdrom
char Char / Misc driver updates for 5.11-rc1 2020-12-15 14:10:09 -08:00
clk clk: renesas: r9a06g032: Drop __packed for portability 2020-12-07 13:58:49 -08:00
clocksource clocksource/drivers/sh_cmt: Fix potential deadlock when calling runtime PM 2020-12-07 20:10:05 +01:00
connector
counter counter: microchip-tcb-capture: Fix CMR value check 2020-12-03 19:40:31 +00:00
cpufreq Merge branch 'cpufreq/arm/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm 2020-11-23 12:55:01 +01:00
cpuidle Merge branch 'linus' into sched/core, to resolve semantic conflict 2020-11-27 11:10:50 +01:00
crypto Networking updates for 5.11 2020-12-15 13:22:29 -08:00
dax vm_ops: rename .split() callback to .may_split() 2020-12-15 12:13:41 -08:00
dca
devfreq
dio
dma dmaengine fixes for v5.10-rc5 2020-11-20 10:23:49 -08:00
dma-buf Merge branch 'akpm' (patches from Andrew) 2020-12-15 12:53:37 -08:00
edac Merge branch 'akpm' (patches from Andrew) 2020-12-15 12:53:37 -08:00
eisa
extcon extcon: max77693: Fix modalias string 2020-12-11 17:18:10 +09:00
firewire
firmware Char / Misc driver updates for 5.11-rc1 2020-12-15 14:10:09 -08:00
fpga Merge 5.10-rc7 into char-misc-next 2020-12-07 10:08:14 +01:00
fsi fsi: Aspeed: Add mutex to protect HW access 2020-12-09 19:52:25 +01:00
gnss
gpio gpio: eic-sprd: break loop when getting NULL device resource 2020-12-09 09:41:49 +01:00
gpu Merge branch 'akpm' (patches from Andrew) 2020-12-15 12:53:37 -08:00
greybus
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid 2020-11-22 14:36:06 -08:00
hsi
hv hyperv-fixes for 5.10-rc5 2020-11-16 15:02:33 -08:00
hwmon hwmon: (amd_energy) modify the visibility of the counters 2020-11-13 06:46:20 -08:00
hwspinlock
hwtracing Char / Misc driver updates for 5.11-rc1 2020-12-15 14:10:09 -08:00
i2c i2c: mlxbf: Fix the return check of devm_ioremap and ioremap 2020-12-05 14:52:35 +01:00
i3c * Fix DAA for the pre-reserved address case 2020-10-17 11:01:01 -07:00
ide ide: remove BUG_ON(in_interrupt() || irqs_disabled()) from ide_unregister() 2020-12-15 12:13:36 -08:00
idle intel_idle: Build fix 2020-12-03 10:00:23 +01:00
iio Staging / IIO driver patches for 5.11-rc1 2020-12-15 14:18:40 -08:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-12-11 22:29:38 -08:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2020-12-12 09:41:33 -08:00
interconnect interconnect changes for 5.11 2020-12-04 14:11:20 +01:00
iommu Yet another large set of x86 interrupt management updates: 2020-12-14 18:59:53 -08:00
ipack ipack: iopctal: remove unneeded break 2020-11-09 16:05:34 +01:00
irqchip irqchip fixes for Linux 5.10, take #2 2020-11-25 00:56:28 +01:00
isdn net: don't include ethtool.h from netdevice.h 2020-11-23 17:27:04 -08:00
leds
lightnvm lightnvm: fix out-of-bounds write to array devices->info[] 2020-10-16 09:28:45 -06:00
macintosh macintosh/adb-iop: Send correct poll command 2020-12-07 10:48:16 +01:00
mailbox ARM: SoC-related driver updates 2020-10-24 10:39:22 -07:00
mcb
md Revert "dm raid: fix discard limits for raid1 and raid10" 2020-12-14 12:12:08 -05:00
media Networking updates for 5.11 2020-12-15 13:22:29 -08:00
memory ARM: SoC-related driver updates 2020-10-24 10:39:22 -07:00
memstick
message scsi: mptfusion: Fix null pointer dereferences in mptscsih_remove() 2020-10-26 16:57:18 -04:00
mfd - New Drivers 2020-10-14 15:56:58 -07:00
misc Char / Misc driver updates for 5.11-rc1 2020-12-15 14:10:09 -08:00
mmc Char / Misc driver updates for 5.11-rc1 2020-12-15 14:10:09 -08:00
most
mtd mtd: rawnand: xway: Do not force a particular software ECC engine 2020-12-11 20:10:02 +01:00
mux
net USB / Thunderbolt patches for 5.11-rc1 2020-12-15 13:54:56 -08:00
nfc Networking updates for 5.11 2020-12-15 13:22:29 -08:00
ntb Bug fixes for v5.10 2020-10-25 11:12:31 -07:00
nubus
nvdimm mm/memremap_pages: support multiple ranges per invocation 2020-10-13 18:38:28 -07:00
nvme nvme: fix memory leak freeing command effects 2020-11-14 09:57:55 +01:00
nvmem nvmem: imx-ocotp: add support for the unaliged word count 2020-11-27 16:10:07 +01:00
of Driver core updates for 5.11-rc1 2020-12-15 14:02:26 -08:00
opp opp: Reduce the size of critical section in _opp_table_kref_release() 2020-10-27 13:21:03 +05:30
oprofile
parisc
parport
pci Yet another large set of x86 interrupt management updates: 2020-12-14 18:59:53 -08:00
pcmcia
perf perf/imx_ddr: Add system PMU identifier for userspace 2020-12-09 14:14:02 +00:00
phy Char / Misc driver updates for 5.11-rc1 2020-12-15 14:10:09 -08:00
pinctrl Staging / IIO driver patches for 5.11-rc1 2020-12-15 14:18:40 -08:00
platform USB / Thunderbolt patches for 5.11-rc1 2020-12-15 13:54:56 -08:00
pnp PNP: fix kernel-doc markups 2020-10-27 19:23:04 +01:00
power ARM: SoC platform updates 2020-10-24 10:33:08 -07:00
powercap Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2020-11-10 10:02:31 -08:00
pps
ps3
ptp ptp: clockmatrix: deprecate firmware older than 4.8.7 2020-12-09 15:00:55 -08:00
pwm pwm: sl28cpld: fix getting driver data in pwm callbacks 2020-12-03 09:57:37 -08:00
rapidio rapidio: fix the missed put_device() for rio_mport_add_riodev 2020-10-16 11:11:22 -07:00
ras
regulator regulator: ti-abb: Fix array out of bound read access on the first transition 2020-11-18 17:59:24 +00:00
remoteproc remoteproc updates for v5.10 2020-10-22 12:56:33 -07:00
reset ARM: SoC-related driver updates 2020-10-24 10:39:22 -07:00
rpmsg rpmsg updates for 5.10 2020-10-22 12:58:21 -07:00
rtc ntp: Make the RTC sync offset less obscure 2020-12-11 10:40:53 +01:00
s390 Networking updates for 5.11 2020-12-15 13:22:29 -08:00
sbus
scsi Networking updates for 5.11 2020-12-15 13:22:29 -08:00
sfi
sh
siox siox: Make remove callback return void 2020-12-10 16:17:15 +01:00
slimbus slimbus: qcom: fix potential NULL dereference in qcom_slim_prg_slew() 2020-12-10 16:23:56 +01:00
soc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-11-27 18:25:27 -08:00
soundwire soundwire: intel: fix another unused-function warning 2020-12-05 13:11:54 +05:30
spi spi: dw: Fix spi registration for controllers overriding CS 2020-11-25 12:54:05 +00:00
spmi spmi: Add driver shutdown support 2020-12-10 10:45:36 +01:00
ssb
staging Staging / IIO driver patches for 5.11-rc1 2020-12-15 14:18:40 -08:00
target SCSI fixes on 20201120 2020-11-20 16:24:28 -08:00
tc
tee Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-12-14 12:18:19 -08:00
thermal thermal: ti-soc-thermal: Disable the CPU PM notifier for OMAP4430 2020-11-12 12:30:29 +01:00
thunderbolt thunderbolt: Changes for v5.11 merge window 2020-12-08 13:41:45 +01:00
tty TTY/Serial patches for 5.11-rc1 2020-12-15 13:57:14 -08:00
uio uio: uio_hv_generic: use devm_kzalloc() for private data alloc 2020-12-09 19:59:00 +01:00
usb Char / Misc driver updates for 5.11-rc1 2020-12-15 14:10:09 -08:00
vdpa Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux 2020-12-07 18:36:21 -08:00
vfio vfio: platform: Switch to use platform_get_mem_or_io() 2020-12-10 16:31:46 +01:00
vhost vhost: vringh: use krealloc_array() 2020-12-15 12:13:37 -08:00
video drm for 5.11-rc1 2020-12-14 11:07:56 -08:00
virt nitro_enclaves: Fixup type and simplify logic of the poll mask setup 2020-11-09 18:20:36 +01:00
virtio mm, page_poison: remove CONFIG_PAGE_POISONING_NO_SANITY 2020-12-15 12:13:46 -08:00
visorbus
vlynq
vme vme: switch from 'pci_' to 'dma_' API 2020-12-09 19:44:34 +01:00
w1 w1: w1_therm: Rename conflicting sysfs attribute 'eeprom' to 'eeprom_cmd' 2020-11-12 08:50:13 +01:00
watchdog ARM: SoC platform updates 2020-10-24 10:33:08 -07:00
xen xen/unpopulated-alloc: consolidate pgmap manipulation 2020-12-15 12:13:40 -08:00
zorro
Kconfig
Makefile vdpa: mlx5: fix vdpa/vhost dependencies 2020-12-02 04:09:56 -05:00