summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/btmtk.h
diff options
context:
space:
mode:
authorChih-Ying Chiang <chih-yin.chiang@mediatek.com>2022-02-08 21:17:40 +0300
committerMarcel Holtmann <marcel@holtmann.org>2022-03-04 18:10:50 +0300
commit8fafe702253d50bf90daf324ae86b5ad5ac8a5e1 (patch)
tree2814b9eff8a22f81957cd57f64847fcc479f5351 /drivers/bluetooth/btmtk.h
parente616fec63f517449e153051b785b1769775562ce (diff)
downloadlinux-8fafe702253d50bf90daf324ae86b5ad5ac8a5e1.tar.xz
Bluetooth: mt7921s: support bluetooth reset mechanism
Implement .cmd_timeout to reset the MT7921s device via a dedicated GPIO pin when the firmware hang or the command has no response. Co-developed-by: Mark Chen <mark-yw.chen@mediatek.com> Signed-off-by: Mark Chen <mark-yw.chen@mediatek.com> Co-developed-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Chih-Ying Chiang <chih-yin.chiang@mediatek.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/btmtk.h')
-rw-r--r--drivers/bluetooth/btmtk.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/bluetooth/btmtk.h b/drivers/bluetooth/btmtk.h
index fb76d9765ce0..8960a5f89d48 100644
--- a/drivers/bluetooth/btmtk.h
+++ b/drivers/bluetooth/btmtk.h
@@ -10,9 +10,15 @@
#define BTMTK_WMT_REG_WRITE 0x1
#define BTMTK_WMT_REG_READ 0x2
+#define MT7921_BTSYS_RST 0x70002610
+#define MT7921_BTSYS_RST_WITH_GPIO BIT(7)
+
#define MT7921_PINMUX_0 0x70005050
#define MT7921_PINMUX_1 0x70005054
+#define MT7921_DLSTATUS 0x7c053c10
+#define BT_DL_STATE BIT(1)
+
enum {
BTMTK_WMT_PATCH_DWNLD = 0x1,
BTMTK_WMT_TEST = 0x2,