diff mbox series

[1/2] wifi: rtw89: 8852c: set pin MUX to enable BT firmware log

Message ID 20220930134417.10282-1-pkshih@realtek.com (mailing list archive)
State Accepted
Commit d187691ab63f53f199a07904422e0911bc6f9390
Delegated to: Kalle Valo
Headers show
Series [1/2] wifi: rtw89: 8852c: set pin MUX to enable BT firmware log | expand

Commit Message

Ping-Ke Shih Sept. 30, 2022, 1:44 p.m. UTC
8852CE is a combo chip, and WiFi driver controls pin MUX. To output BT
firmware log to specific hardware pin, set pin MUX to achieve.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtw89/reg.h      | 4 ++++
 drivers/net/wireless/realtek/rtw89/rtw8852c.c | 3 +++
 2 files changed, 7 insertions(+)

Comments

Kalle Valo Oct. 5, 2022, 7:43 a.m. UTC | #1
Ping-Ke Shih <pkshih@realtek.com> wrote:

> 8852CE is a combo chip, and WiFi driver controls pin MUX. To output BT
> firmware log to specific hardware pin, set pin MUX to achieve.
> 
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>

2 patches applied to wireless-next.git, thanks.

d187691ab63f wifi: rtw89: 8852c: set pin MUX to enable BT firmware log
732dd91db3d3 wifi: rtw89: add to dump TX FIFO 0/1 for 8852C
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw89/reg.h b/drivers/net/wireless/realtek/rtw89/reg.h
index ca20bb024b407..356389425d5dc 100644
--- a/drivers/net/wireless/realtek/rtw89/reg.h
+++ b/drivers/net/wireless/realtek/rtw89/reg.h
@@ -229,6 +229,10 @@ 
 
 #define R_AX_GPIO0_7_FUNC_SEL 0x02D0
 
+#define R_AX_LED1_FUNC_SEL 0x02DC
+#define B_AX_PINMUX_EESK_FUNC_SEL_V1_MASK GENMASK(27, 24)
+#define PINMUX_EESK_FUNC_SEL_BT_LOG 0x1
+
 #define R_AX_GPIO0_15_EECS_EESK_LED1_PULL_LOW_EN 0x02E4
 #define B_AX_LED1_PULL_LOW_EN BIT(18)
 #define B_AX_EESK_PULL_LOW_EN BIT(17)
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852c.c b/drivers/net/wireless/realtek/rtw89/rtw8852c.c
index 67653b3e1a356..5792b75e19ce8 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8852c.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852c.c
@@ -273,6 +273,9 @@  static int rtw8852c_pwr_on_func(struct rtw89_dev *rtwdev)
 			  B_AX_CMAC_DMA_EN | B_AX_PTCLTOP_EN | B_AX_SCHEDULER_EN |
 			  B_AX_TMAC_EN | B_AX_RMAC_EN);
 
+	rtw89_write32_mask(rtwdev, R_AX_LED1_FUNC_SEL, B_AX_PINMUX_EESK_FUNC_SEL_V1_MASK,
+			   PINMUX_EESK_FUNC_SEL_BT_LOG);
+
 	return 0;
 }