* [PATCH rtw-next 1/8] wifi: rtw89: wow: use struct style to fill WOW wakeup control H2C command
From: Ping-Ke Shih @ 2026-03-25 7:21 UTC (permalink / raw)
To: linux-wireless; +Cc: timlee, echuang, kevin_yang
In-Reply-To: <20260325072130.41751-1-pkshih@realtek.com>
From: Chin-Yen Lee <timlee@realtek.com>
The WOW wakeup control command is used to tell firmware the content
of wakeup feature. Use struct instead of macros to fill the data.
Signed-off-by: Chin-Yen Lee <timlee@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/fw.c | 21 ++++++----
drivers/net/wireless/realtek/rtw89/fw.h | 56 ++++++-------------------
2 files changed, 26 insertions(+), 51 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c
index 45d8c5e70084..701cea9a771e 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.c
+++ b/drivers/net/wireless/realtek/rtw89/fw.c
@@ -9705,38 +9705,43 @@ int rtw89_fw_h2c_wow_global(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rtw
return ret;
}
-#define H2C_WAKEUP_CTRL_LEN 4
int rtw89_fw_h2c_wow_wakeup_ctrl(struct rtw89_dev *rtwdev,
struct rtw89_vif_link *rtwvif_link,
bool enable)
{
struct rtw89_wow_param *rtw_wow = &rtwdev->wow;
+ struct rtw89_h2c_wow_wakeup_ctrl *h2c;
struct sk_buff *skb;
+ u32 len = sizeof(*h2c);
u8 macid = rtwvif_link->mac_id;
int ret;
- skb = rtw89_fw_h2c_alloc_skb_with_hdr(rtwdev, H2C_WAKEUP_CTRL_LEN);
+ skb = rtw89_fw_h2c_alloc_skb_with_hdr(rtwdev, len);
if (!skb) {
rtw89_err(rtwdev, "failed to alloc skb for wakeup ctrl\n");
return -ENOMEM;
}
- skb_put(skb, H2C_WAKEUP_CTRL_LEN);
+ skb_put(skb, len);
+ h2c = (struct rtw89_h2c_wow_wakeup_ctrl *)skb->data;
if (rtw_wow->pattern_cnt)
- RTW89_SET_WOW_WAKEUP_CTRL_PATTERN_MATCH_ENABLE(skb->data, enable);
+ h2c->w0 |= le32_encode_bits(enable,
+ RTW89_H2C_WOW_WAKEUP_CTRL_W0_PATTERN_MATCH_ENABLE);
if (test_bit(RTW89_WOW_FLAG_EN_MAGIC_PKT, rtw_wow->flags))
- RTW89_SET_WOW_WAKEUP_CTRL_MAGIC_ENABLE(skb->data, enable);
+ h2c->w0 |= le32_encode_bits(enable,
+ RTW89_H2C_WOW_WAKEUP_CTRL_W0_MAGIC_ENABLE);
if (test_bit(RTW89_WOW_FLAG_EN_DISCONNECT, rtw_wow->flags))
- RTW89_SET_WOW_WAKEUP_CTRL_DEAUTH_ENABLE(skb->data, enable);
+ h2c->w0 |= le32_encode_bits(enable,
+ RTW89_H2C_WOW_WAKEUP_CTRL_W0_DEAUTH_ENABLE);
- RTW89_SET_WOW_WAKEUP_CTRL_MAC_ID(skb->data, macid);
+ h2c->w0 |= le32_encode_bits(macid, RTW89_H2C_WOW_WAKEUP_CTRL_W0_MAC_ID);
rtw89_h2c_pkt_set_hdr(rtwdev, skb, FWCMD_TYPE_H2C,
H2C_CAT_MAC,
H2C_CL_MAC_WOW,
H2C_FUNC_WAKEUP_CTRL, 0, 1,
- H2C_WAKEUP_CTRL_LEN);
+ len);
ret = rtw89_h2c_tx(rtwdev, skb, false);
if (ret) {
diff --git a/drivers/net/wireless/realtek/rtw89/fw.h b/drivers/net/wireless/realtek/rtw89/fw.h
index 57e3b464c0a2..cf86fade84a2 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.h
+++ b/drivers/net/wireless/realtek/rtw89/fw.h
@@ -2219,50 +2219,20 @@ struct rtw89_h2c_cfg_nlo {
#define RTW89_H2C_NLO_W0_IGNORE_CIPHER BIT(2)
#define RTW89_H2C_NLO_W0_MACID GENMASK(31, 24)
-static inline void RTW89_SET_WOW_WAKEUP_CTRL_PATTERN_MATCH_ENABLE(void *h2c, u32 val)
-{
- le32p_replace_bits((__le32 *)h2c, val, BIT(0));
-}
-
-static inline void RTW89_SET_WOW_WAKEUP_CTRL_MAGIC_ENABLE(void *h2c, u32 val)
-{
- le32p_replace_bits((__le32 *)h2c, val, BIT(1));
-}
-
-static inline void RTW89_SET_WOW_WAKEUP_CTRL_HW_UNICAST_ENABLE(void *h2c, u32 val)
-{
- le32p_replace_bits((__le32 *)h2c, val, BIT(2));
-}
-
-static inline void RTW89_SET_WOW_WAKEUP_CTRL_FW_UNICAST_ENABLE(void *h2c, u32 val)
-{
- le32p_replace_bits((__le32 *)h2c, val, BIT(3));
-}
-
-static inline void RTW89_SET_WOW_WAKEUP_CTRL_DEAUTH_ENABLE(void *h2c, u32 val)
-{
- le32p_replace_bits((__le32 *)h2c, val, BIT(4));
-}
-
-static inline void RTW89_SET_WOW_WAKEUP_CTRL_REKEYP_ENABLE(void *h2c, u32 val)
-{
- le32p_replace_bits((__le32 *)h2c, val, BIT(5));
-}
-
-static inline void RTW89_SET_WOW_WAKEUP_CTRL_EAP_ENABLE(void *h2c, u32 val)
-{
- le32p_replace_bits((__le32 *)h2c, val, BIT(6));
-}
-
-static inline void RTW89_SET_WOW_WAKEUP_CTRL_ALL_DATA_ENABLE(void *h2c, u32 val)
-{
- le32p_replace_bits((__le32 *)h2c, val, BIT(7));
-}
+struct rtw89_h2c_wow_wakeup_ctrl {
+ __le32 w0;
+} __packed;
-static inline void RTW89_SET_WOW_WAKEUP_CTRL_MAC_ID(void *h2c, u32 val)
-{
- le32p_replace_bits((__le32 *)h2c, val, GENMASK(31, 24));
-}
+#define RTW89_H2C_WOW_WAKEUP_CTRL_W0_PATTERN_MATCH_ENABLE BIT(0)
+#define RTW89_H2C_WOW_WAKEUP_CTRL_W0_MAGIC_ENABLE BIT(1)
+#define RTW89_H2C_WOW_WAKEUP_CTRL_W0_HW_UNICAST_ENABLE BIT(2)
+#define RTW89_H2C_WOW_WAKEUP_CTRL_W0_FW_UNICAST_ENABLE BIT(3)
+#define RTW89_H2C_WOW_WAKEUP_CTRL_W0_DEAUTH_ENABLE BIT(4)
+#define RTW89_H2C_WOW_WAKEUP_CTRL_W0_REKEYP_ENABLE BIT(5)
+#define RTW89_H2C_WOW_WAKEUP_CTRL_W0_EAP_ENABLE BIT(6)
+#define RTW89_H2C_WOW_WAKEUP_CTRL_W0_ALL_DATA_ENABLE BIT(7)
+#define RTW89_H2C_WOW_WAKEUP_CTRL_W0_MAC_ID_EXT GENMASK(23, 16)
+#define RTW89_H2C_WOW_WAKEUP_CTRL_W0_MAC_ID GENMASK(31, 24)
struct rtw89_h2c_wow_cam_update {
__le32 w0;
--
2.25.1
^ permalink raw reply related
* [PATCH rtw-next 2/8] wifi: rtw89: wow: enable MLD address for Magic packet wakeup
From: Ping-Ke Shih @ 2026-03-25 7:21 UTC (permalink / raw)
To: linux-wireless; +Cc: timlee, echuang, kevin_yang
In-Reply-To: <20260325072130.41751-1-pkshih@realtek.com>
From: Chin-Yen Lee <timlee@realtek.com>
Under MLO connections, the original Magic Packet configuration
only supported Link Addresses for wakeup. Update the setting
to support both MLD Address and Link Addresses for wakeup process.
Signed-off-by: Chin-Yen Lee <timlee@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/fw.c | 8 +++++++-
drivers/net/wireless/realtek/rtw89/fw.h | 1 +
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c
index 701cea9a771e..13391ec9627c 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.c
+++ b/drivers/net/wireless/realtek/rtw89/fw.c
@@ -9709,6 +9709,7 @@ int rtw89_fw_h2c_wow_wakeup_ctrl(struct rtw89_dev *rtwdev,
struct rtw89_vif_link *rtwvif_link,
bool enable)
{
+ struct ieee80211_vif *vif = rtwvif_link_to_vif(rtwvif_link);
struct rtw89_wow_param *rtw_wow = &rtwdev->wow;
struct rtw89_h2c_wow_wakeup_ctrl *h2c;
struct sk_buff *skb;
@@ -9728,9 +9729,14 @@ int rtw89_fw_h2c_wow_wakeup_ctrl(struct rtw89_dev *rtwdev,
if (rtw_wow->pattern_cnt)
h2c->w0 |= le32_encode_bits(enable,
RTW89_H2C_WOW_WAKEUP_CTRL_W0_PATTERN_MATCH_ENABLE);
- if (test_bit(RTW89_WOW_FLAG_EN_MAGIC_PKT, rtw_wow->flags))
+ if (test_bit(RTW89_WOW_FLAG_EN_MAGIC_PKT, rtw_wow->flags)) {
h2c->w0 |= le32_encode_bits(enable,
RTW89_H2C_WOW_WAKEUP_CTRL_W0_MAGIC_ENABLE);
+ if (ieee80211_vif_is_mld(vif))
+ h2c->w0 |= le32_encode_bits(enable,
+ RTW89_H2C_WOW_WAKEUP_CTRL_W0_MAGIC_MLD_ENABLE);
+ }
+
if (test_bit(RTW89_WOW_FLAG_EN_DISCONNECT, rtw_wow->flags))
h2c->w0 |= le32_encode_bits(enable,
RTW89_H2C_WOW_WAKEUP_CTRL_W0_DEAUTH_ENABLE);
diff --git a/drivers/net/wireless/realtek/rtw89/fw.h b/drivers/net/wireless/realtek/rtw89/fw.h
index cf86fade84a2..4574a281d352 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.h
+++ b/drivers/net/wireless/realtek/rtw89/fw.h
@@ -2231,6 +2231,7 @@ struct rtw89_h2c_wow_wakeup_ctrl {
#define RTW89_H2C_WOW_WAKEUP_CTRL_W0_REKEYP_ENABLE BIT(5)
#define RTW89_H2C_WOW_WAKEUP_CTRL_W0_EAP_ENABLE BIT(6)
#define RTW89_H2C_WOW_WAKEUP_CTRL_W0_ALL_DATA_ENABLE BIT(7)
+#define RTW89_H2C_WOW_WAKEUP_CTRL_W0_MAGIC_MLD_ENABLE BIT(8)
#define RTW89_H2C_WOW_WAKEUP_CTRL_W0_MAC_ID_EXT GENMASK(23, 16)
#define RTW89_H2C_WOW_WAKEUP_CTRL_W0_MAC_ID GENMASK(31, 24)
--
2.25.1
^ permalink raw reply related
* [PATCH rtw-next 3/8] wifi: rtw89: pci: clear SER ISR when initial and leaving WoWLAN for WiFi 7 chips
From: Ping-Ke Shih @ 2026-03-25 7:21 UTC (permalink / raw)
To: linux-wireless; +Cc: timlee, echuang, kevin_yang
In-Reply-To: <20260325072130.41751-1-pkshih@realtek.com>
The PCIE SER is to diagnose PCIE becomes abnormal, relying on IMR settings
to trigger interrupt when status is weird. Update settings to disable
PHY error flag 9, and clear ISR when initial and leaving WoWLAN.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/pci.h | 3 ++
drivers/net/wireless/realtek/rtw89/pci_be.c | 52 +++++++++++++++++----
2 files changed, 47 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/pci.h b/drivers/net/wireless/realtek/rtw89/pci.h
index dc488d9a8884..c7cd34e99349 100644
--- a/drivers/net/wireless/realtek/rtw89/pci.h
+++ b/drivers/net/wireless/realtek/rtw89/pci.h
@@ -55,6 +55,8 @@
#define B_AX_CALIB_EN BIT(13)
#define B_AX_DIV GENMASK(15, 14)
#define RAC_SET_PPR_V1 0x31
+#define RAC_ANA40 0x40
+#define PHY_ERR_IMR_DIS (BIT(9) | BIT(0))
#define RAC_ANA41 0x41
#define PHY_ERR_FLAG_EN BIT(6)
@@ -1029,6 +1031,7 @@
#define B_BE_SER_PMU_IMR BIT(0)
#define R_BE_REG_PL1_ISR 0x34B4
+#define B_PCIE_SER_ALL_ISR 0x7F
#define R_BE_RX_APPEND_MODE 0x8920
#define B_BE_APPEND_OFFSET_MASK GENMASK(23, 16)
diff --git a/drivers/net/wireless/realtek/rtw89/pci_be.c b/drivers/net/wireless/realtek/rtw89/pci_be.c
index dea01d9e57fd..dfffec1ff3c7 100644
--- a/drivers/net/wireless/realtek/rtw89/pci_be.c
+++ b/drivers/net/wireless/realtek/rtw89/pci_be.c
@@ -351,14 +351,41 @@ static void rtw89_pci_ser_setting_be(struct rtw89_dev *rtwdev)
return;
rtw89_write32(rtwdev, R_BE_PL1_DBG_INFO, 0x0);
- rtw89_write32_set(rtwdev, R_BE_FWS1IMR, B_BE_PCIE_SER_TIMEOUT_INDIC_EN);
- rtw89_write32_set(rtwdev, R_BE_SER_PL1_CTRL, B_BE_PL1_SER_PL1_EN);
- rtw89_write32_mask(rtwdev, R_BE_SER_PL1_CTRL, B_BE_PL1_TIMER_UNIT_MASK, 1);
- val32 = rtw89_read32(rtwdev, R_BE_REG_PL1_MASK);
- val32 |= B_BE_SER_PMU_IMR | B_BE_SER_L1SUB_IMR | B_BE_SER_PM_MASTER_IMR |
- B_BE_SER_LTSSM_IMR | B_BE_SER_PM_CLK_MASK | B_BE_SER_PCLKREQ_ACK_MASK;
- rtw89_write32(rtwdev, R_BE_REG_PL1_MASK, val32);
+ switch (hal->cv) {
+ case CHIP_CAV:
+ case CHIP_CBV:
+ rtw89_write32_clr(rtwdev, R_BE_SER_PL1_CTRL, B_BE_PL1_SER_PL1_EN);
+ rtw89_write32_mask(rtwdev, R_BE_SER_PL1_CTRL,
+ B_BE_PL1_TIMER_UNIT_MASK, PCIE_SER_TIMER_UNIT);
+
+ val32 = rtw89_read32(rtwdev, R_BE_REG_PL1_MASK);
+ val32 &= ~(B_BE_SER_PMU_IMR | B_BE_SER_L1SUB_IMR |
+ B_BE_SER_PM_MASTER_IMR | B_BE_SER_LTSSM_IMR |
+ B_BE_SER_PM_CLK_MASK | B_BE_SER_PCLKREQ_ACK_MASK);
+ rtw89_write32(rtwdev, R_BE_REG_PL1_MASK, val32);
+ break;
+ case CHIP_CCV:
+ default:
+ rtw89_write32_clr(rtwdev, R_BE_SER_PL1_CTRL, B_BE_PL1_SER_PL1_EN);
+
+ ret = read_poll_timeout_atomic(rtw89_read32, val32, !val32,
+ 1, 1000, false, rtwdev, R_BE_REG_PL1_ISR);
+ if (ret)
+ rtw89_warn(rtwdev, "[ERR] PCIE SER clear poll fail\n");
+
+ rtw89_write32_mask(rtwdev, R_BE_SER_PL1_CTRL,
+ B_BE_PL1_TIMER_UNIT_MASK, PCIE_SER_TIMER_UNIT);
+ rtw89_write32_set(rtwdev, R_BE_SER_PL1_CTRL, B_BE_PL1_SER_PL1_EN);
+
+ val32 = rtw89_read32(rtwdev, R_BE_REG_PL1_MASK);
+ val32 |= (B_BE_SER_PMU_IMR | B_BE_SER_PM_MASTER_IMR |
+ B_BE_SER_LTSSM_IMR | B_BE_SER_PM_CLK_MASK |
+ B_BE_SER_PCLKREQ_ACK_MASK);
+ val32 &= ~B_BE_SER_L1SUB_IMR;
+ rtw89_write32(rtwdev, R_BE_REG_PL1_MASK, val32);
+ break;
+ }
return;
@@ -366,6 +393,11 @@ static void rtw89_pci_ser_setting_be(struct rtw89_dev *rtwdev)
rtw89_write32_clr(rtwdev, R_BE_PCIE_SER_DBG, B_BE_PCIE_SER_FLUSH_RSTB);
rtw89_write32_set(rtwdev, R_BE_PCIE_SER_DBG, B_BE_PCIE_SER_FLUSH_RSTB);
+ rtw89_write16_clr(rtwdev, RAC_DIRECT_OFFESET_L0_G1 +
+ RAC_ANA40 * RAC_MULT, PHY_ERR_IMR_DIS);
+ rtw89_write16_clr(rtwdev, RAC_DIRECT_OFFESET_L0_G2 +
+ RAC_ANA40 * RAC_MULT, PHY_ERR_IMR_DIS);
+
rtw89_write16_clr(rtwdev, RAC_DIRECT_OFFESET_L0_G1 +
RAC_ANA41 * RAC_MULT, PHY_ERR_FLAG_EN);
rtw89_write16_clr(rtwdev, RAC_DIRECT_OFFESET_L0_G2 +
@@ -378,6 +410,7 @@ static void rtw89_pci_ser_setting_be(struct rtw89_dev *rtwdev)
val32 = rtw89_read32(rtwdev, R_BE_SER_PL1_CTRL);
val32 &= ~B_BE_PL1_SER_PL1_EN;
rtw89_write32(rtwdev, R_BE_SER_PL1_CTRL, val32);
+ rtw89_write32(rtwdev, R_BE_REG_PL1_ISR, B_PCIE_SER_ALL_ISR);
ret = read_poll_timeout_atomic(rtw89_read32, val32, !val32,
1, 1000, false, rtwdev, R_BE_REG_PL1_ISR);
@@ -385,9 +418,10 @@ static void rtw89_pci_ser_setting_be(struct rtw89_dev *rtwdev)
rtw89_warn(rtwdev, "[ERR] PCIE SER clear poll fail\n");
val32 = rtw89_read32(rtwdev, R_BE_REG_PL1_MASK);
- val32 |= B_BE_SER_PMU_IMR | B_BE_SER_L1SUB_IMR | B_BE_SER_PM_MASTER_IMR |
+ val32 |= B_BE_SER_PMU_IMR | B_BE_SER_PM_MASTER_IMR |
B_BE_SER_LTSSM_IMR | B_BE_SER_PM_CLK_MASK | B_BE_SER_PCLKREQ_ACK_MASK |
B_BE_SER_LTSSM_UNSTABLE_MASK;
+ val32 &= ~B_BE_SER_L1SUB_IMR;
rtw89_write32(rtwdev, R_BE_REG_PL1_MASK, val32);
rtw89_write32_mask(rtwdev, R_BE_SER_PL1_CTRL, B_BE_PL1_TIMER_UNIT_MASK,
@@ -761,6 +795,8 @@ static int __maybe_unused rtw89_pci_resume_be(struct device *dev)
goto clear_phy_isr;
rtw89_write32_clr(rtwdev, R_BE_SER_PL1_CTRL, B_BE_PL1_SER_PL1_EN);
+ if (rtwdev->chip->chip_id == RTL8922D)
+ rtw89_write32(rtwdev, R_BE_REG_PL1_ISR, B_PCIE_SER_ALL_ISR);
ret = read_poll_timeout_atomic(rtw89_read32, polling, !polling, 1, 1000,
false, rtwdev, R_BE_REG_PL1_ISR);
--
2.25.1
^ permalink raw reply related
* [PATCH rtw-next 4/8] wifi: rtw89: mac: add specific case to dump mac memory for RTL8922D
From: Ping-Ke Shih @ 2026-03-25 7:21 UTC (permalink / raw)
To: linux-wireless; +Cc: timlee, echuang, kevin_yang
In-Reply-To: <20260325072130.41751-1-pkshih@realtek.com>
The RTL8922D can reuse most mac memory addresses, but only
RTW89_MAC_MEM_SECURITY_CAM is different from existing one. Add a function
to return the specific memory address for RTL8922D.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/debug.c | 2 +-
drivers/net/wireless/realtek/rtw89/mac.c | 4 ++--
drivers/net/wireless/realtek/rtw89/mac.h | 13 +++++++++++++
drivers/net/wireless/realtek/rtw89/ser.c | 2 +-
4 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/debug.c b/drivers/net/wireless/realtek/rtw89/debug.c
index 82849d109cc3..7d8d22311018 100644
--- a/drivers/net/wireless/realtek/rtw89/debug.c
+++ b/drivers/net/wireless/realtek/rtw89/debug.c
@@ -1129,7 +1129,7 @@ static int rtw89_debug_dump_mac_mem(struct rtw89_dev *rtwdev,
pages = len / mem_page_size + 1;
start_page = start_addr / mem_page_size;
residue = start_addr % mem_page_size;
- base_addr = mac->mem_base_addrs[sel];
+ base_addr = rtw89_mac_mem_base_addrs(rtwdev, sel);
base_addr += start_page * mem_page_size;
for (pp = 0; pp < pages; pp++) {
diff --git a/drivers/net/wireless/realtek/rtw89/mac.c b/drivers/net/wireless/realtek/rtw89/mac.c
index 35fd18fe6470..54aad37485d6 100644
--- a/drivers/net/wireless/realtek/rtw89/mac.c
+++ b/drivers/net/wireless/realtek/rtw89/mac.c
@@ -43,7 +43,7 @@ static void rtw89_mac_mem_write(struct rtw89_dev *rtwdev, u32 offset,
u32 val, enum rtw89_mac_mem_sel sel)
{
const struct rtw89_mac_gen_def *mac = rtwdev->chip->mac_def;
- u32 addr = mac->mem_base_addrs[sel] + offset;
+ u32 addr = rtw89_mac_mem_base_addrs(rtwdev, sel) + offset;
rtw89_write32(rtwdev, mac->filter_model_addr, addr);
rtw89_write32(rtwdev, mac->indir_access_addr, val);
@@ -53,7 +53,7 @@ static u32 rtw89_mac_mem_read(struct rtw89_dev *rtwdev, u32 offset,
enum rtw89_mac_mem_sel sel)
{
const struct rtw89_mac_gen_def *mac = rtwdev->chip->mac_def;
- u32 addr = mac->mem_base_addrs[sel] + offset;
+ u32 addr = rtw89_mac_mem_base_addrs(rtwdev, sel) + offset;
rtw89_write32(rtwdev, mac->filter_model_addr, addr);
return rtw89_read32(rtwdev, mac->indir_access_addr);
diff --git a/drivers/net/wireless/realtek/rtw89/mac.h b/drivers/net/wireless/realtek/rtw89/mac.h
index 88a877556cb3..93bedf056f17 100644
--- a/drivers/net/wireless/realtek/rtw89/mac.h
+++ b/drivers/net/wireless/realtek/rtw89/mac.h
@@ -334,6 +334,7 @@ enum rtw89_mac_dbg_port_sel {
#define NAT25_CAM_BASE_ADDR_BE 0x18820000
#define RXPLD_FLTR_CAM_BASE_ADDR_BE 0x18823000
#define SEC_CAM_BASE_ADDR_BE 0x18824000
+#define SEC_CAM_BASE_ADDR_BE_8922D 0x1882C000
#define WOW_CAM_BASE_ADDR_BE 0x18828000
#define MLD_TBL_BASE_ADDR_BE 0x18829000
#define RX_CLSF_CAM_BASE_ADDR_BE 0x1882A000
@@ -1131,6 +1132,18 @@ struct rtw89_mac_gen_def {
extern const struct rtw89_mac_gen_def rtw89_mac_gen_ax;
extern const struct rtw89_mac_gen_def rtw89_mac_gen_be;
+static inline
+u32 rtw89_mac_mem_base_addrs(struct rtw89_dev *rtwdev, u8 sel)
+{
+ const struct rtw89_mac_gen_def *mac = rtwdev->chip->mac_def;
+
+ if (rtwdev->chip->chip_id == RTL8922D &&
+ sel == RTW89_MAC_MEM_SECURITY_CAM)
+ return SEC_CAM_BASE_ADDR_BE_8922D;
+
+ return mac->mem_base_addrs[sel];
+}
+
static inline
u32 rtw89_mac_reg_by_idx(struct rtw89_dev *rtwdev, u32 reg_base, u8 band)
{
diff --git a/drivers/net/wireless/realtek/rtw89/ser.c b/drivers/net/wireless/realtek/rtw89/ser.c
index 75220042a9a7..a507ce1fcd63 100644
--- a/drivers/net/wireless/realtek/rtw89/ser.c
+++ b/drivers/net/wireless/realtek/rtw89/ser.c
@@ -589,7 +589,7 @@ static void ser_mac_mem_dump(struct rtw89_dev *rtwdev, u8 *buf,
start_page = start_addr / mem_page_size;
residue = start_addr % mem_page_size;
- base_addr = mac->mem_base_addrs[sel];
+ base_addr = rtw89_mac_mem_base_addrs(rtwdev, sel);
base_addr += start_page * mem_page_size;
while (cnt < len) {
--
2.25.1
^ permalink raw reply related
* [PATCH rtw-next 5/8] wifi: rtw89: mac: disable pre-load function for RTL8922DE
From: Ping-Ke Shih @ 2026-03-25 7:21 UTC (permalink / raw)
To: linux-wireless; +Cc: timlee, echuang, kevin_yang
In-Reply-To: <20260325072130.41751-1-pkshih@realtek.com>
The pre-load function is a MAC function to pre-load TX packets into
WiFi device's memory, so it can enhance performance. However, RTL8922DE
has not fully verified and fine tune this function, temporarily disable
this function.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/mac.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/mac.h b/drivers/net/wireless/realtek/rtw89/mac.h
index 93bedf056f17..9db9ae219cd6 100644
--- a/drivers/net/wireless/realtek/rtw89/mac.h
+++ b/drivers/net/wireless/realtek/rtw89/mac.h
@@ -1828,8 +1828,7 @@ static inline bool rtw89_mac_chk_preload_allow(struct rtw89_dev *rtwdev)
if (rtwdev->hci.type != RTW89_HCI_TYPE_PCIE)
return false;
- if (rtwdev->chip->chip_id == RTL8922D && rtwdev->hal.cid == RTL8922D_CID7090)
- return true;
+ /* The RTL8922DE will re-enable pre-load function after verification. */
return false;
}
--
2.25.1
^ permalink raw reply related
* [PATCH rtw-next 6/8] wifi: rtw89: phy: expand PHY page for RTL8922D
From: Ping-Ke Shih @ 2026-03-25 7:21 UTC (permalink / raw)
To: linux-wireless; +Cc: timlee, echuang, kevin_yang
In-Reply-To: <20260325072130.41751-1-pkshih@realtek.com>
From: Eric Huang <echuang@realtek.com>
PHY page range is to define offset from PHY0 to PHY1, and RTL8922D
needs to expand page to 0x2E0.
Signed-off-by: Eric Huang <echuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/phy_be.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtw89/phy_be.c b/drivers/net/wireless/realtek/rtw89/phy_be.c
index 08fd24a55d85..929fac1b10d2 100644
--- a/drivers/net/wireless/realtek/rtw89/phy_be.c
+++ b/drivers/net/wireless/realtek/rtw89/phy_be.c
@@ -199,7 +199,7 @@ static u32 rtw89_phy0_phy1_offset_be_v1(struct rtw89_dev *rtwdev, u32 addr)
(phy_page >= 0x240 && phy_page <= 0x24f) ||
(phy_page >= 0x260 && phy_page <= 0x26f) ||
(phy_page >= 0x2C0 && phy_page <= 0x2C9) ||
- (phy_page >= 0x2E4 && phy_page <= 0x2E8) ||
+ (phy_page >= 0x2E0 && phy_page <= 0x2E8) ||
phy_page == 0x2EE)
ofst = 0x1000;
else
--
2.25.1
^ permalink raw reply related
* [PATCH rtw-next 7/8] wifi: rtw89: phy: load RF parameters relying on ACV for RTL8922D
From: Ping-Ke Shih @ 2026-03-25 7:21 UTC (permalink / raw)
To: linux-wireless; +Cc: timlee, echuang, kevin_yang
In-Reply-To: <20260325072130.41751-1-pkshih@realtek.com>
RF parameters are conditional formats with RFE type and CV as arguments,
but RTL8922D has many variants and use ACV as argument instead of CV.
Add to select proper register values.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/phy.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/phy.c b/drivers/net/wireless/realtek/rtw89/phy.c
index 3a241738ac06..980a2e7c36e1 100644
--- a/drivers/net/wireless/realtek/rtw89/phy.c
+++ b/drivers/net/wireless/realtek/rtw89/phy.c
@@ -1808,7 +1808,7 @@ static int rtw89_phy_sel_headline(struct rtw89_dev *rtwdev,
}
static void rtw89_phy_init_reg(struct rtw89_dev *rtwdev,
- const struct rtw89_phy_table *table,
+ const struct rtw89_phy_table *table, bool by_acv,
void (*config)(struct rtw89_dev *rtwdev,
const struct rtw89_reg2_def *reg,
enum rtw89_rf_path rf_path,
@@ -1817,8 +1817,8 @@ static void rtw89_phy_init_reg(struct rtw89_dev *rtwdev,
{
const struct rtw89_reg2_def *reg;
enum rtw89_rf_path rf_path = table->rf_path;
+ u8 cv = by_acv ? rtwdev->hal.acv : rtwdev->hal.cv;
u8 rfe = rtwdev->efuse.rfe_type;
- u8 cv = rtwdev->hal.cv;
u32 i;
u32 headline_size = 0, headline_idx = 0;
u32 target = 0, cfg_target;
@@ -1885,16 +1885,16 @@ void rtw89_phy_init_bb_reg(struct rtw89_dev *rtwdev)
const struct rtw89_phy_table *bb_gain_table;
bb_table = elm_info->bb_tbl ? elm_info->bb_tbl : chip->bb_table;
- rtw89_phy_init_reg(rtwdev, bb_table, rtw89_phy_config_bb_reg, NULL);
+ rtw89_phy_init_reg(rtwdev, bb_table, false, rtw89_phy_config_bb_reg, NULL);
if (rtwdev->dbcc_en)
- rtw89_phy_init_reg(rtwdev, bb_table, rtw89_phy_config_bb_reg,
+ rtw89_phy_init_reg(rtwdev, bb_table, false, rtw89_phy_config_bb_reg,
(void *)RTW89_PHY_1);
rtw89_chip_init_txpwr_unit(rtwdev);
bb_gain_table = elm_info->bb_gain ? elm_info->bb_gain : chip->bb_gain_table;
if (bb_gain_table)
- rtw89_phy_init_reg(rtwdev, bb_gain_table,
+ rtw89_phy_init_reg(rtwdev, bb_gain_table, false,
chip->phy_def->config_bb_gain, NULL);
rtw89_phy_bb_reset(rtwdev);
@@ -2000,6 +2000,7 @@ void rtw89_phy_init_rf_reg(struct rtw89_dev *rtwdev, bool noio)
const struct rtw89_chip_info *chip = rtwdev->chip;
const struct rtw89_phy_table *rf_table;
struct rtw89_fw_h2c_rf_reg_info *rf_reg_info;
+ bool by_acv = chip->chip_id == RTL8922D;
u8 path;
rf_reg_info = kzalloc_obj(*rf_reg_info);
@@ -2015,7 +2016,7 @@ void rtw89_phy_init_rf_reg(struct rtw89_dev *rtwdev, bool noio)
else
config = rf_table->config ? rf_table->config :
rtw89_phy_config_rf_reg;
- rtw89_phy_init_reg(rtwdev, rf_table, config, (void *)rf_reg_info);
+ rtw89_phy_init_reg(rtwdev, rf_table, by_acv, config, (void *)rf_reg_info);
if (rtw89_phy_config_rf_reg_fw(rtwdev, rf_reg_info))
rtw89_warn(rtwdev, "rf path %d reg h2c config failed\n",
rf_reg_info->rf_path);
@@ -2056,7 +2057,7 @@ static void rtw89_phy_init_rf_nctl(struct rtw89_dev *rtwdev)
rtw89_phy_preinit_rf_nctl(rtwdev);
nctl_table = elm_info->rf_nctl ? elm_info->rf_nctl : chip->nctl_table;
- rtw89_phy_init_reg(rtwdev, nctl_table, rtw89_phy_config_bb_reg, NULL);
+ rtw89_phy_init_reg(rtwdev, nctl_table, false, rtw89_phy_config_bb_reg, NULL);
if (chip->nctl_post_table)
rtw89_rfk_parser(rtwdev, chip->nctl_post_table);
--
2.25.1
^ permalink raw reply related
* [PATCH rtw-next 8/8] wifi: rtw89: fw: load TX power elements according to AID
From: Ping-Ke Shih @ 2026-03-25 7:21 UTC (permalink / raw)
To: linux-wireless; +Cc: timlee, echuang, kevin_yang
In-Reply-To: <20260325072130.41751-1-pkshih@realtek.com>
From: Zong-Zhe Yang <kevin_yang@realtek.com>
For different A-die, there will be different TX power parameters.
In FW element header, the corresponding A-die ID will be described.
So, compare runtime AID with that to load the target TX power
parameters.
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/fw.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c
index 13391ec9627c..52db41c67265 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.c
+++ b/drivers/net/wireless/realtek/rtw89/fw.c
@@ -1153,8 +1153,13 @@ int rtw89_fw_recognize_txpwr_from_elm(struct rtw89_dev *rtwdev,
const struct __rtw89_fw_txpwr_element *txpwr_elm = &elm->u.txpwr;
const unsigned long offset = arg.offset;
struct rtw89_efuse *efuse = &rtwdev->efuse;
+ struct rtw89_hal *hal = &rtwdev->hal;
+ u16 aid = le16_to_cpu(elm->aid);
struct rtw89_txpwr_conf *conf;
+ if (aid && aid != hal->aid)
+ return 1;
+
if (!rtwdev->rfe_data) {
rtwdev->rfe_data = kzalloc_obj(*rtwdev->rfe_data);
if (!rtwdev->rfe_data)
--
2.25.1
^ permalink raw reply related
* Re: pull request: mt76-next 2026-03-23
From: Krzysztof Kozlowski @ 2026-03-25 7:27 UTC (permalink / raw)
To: Johannes Berg, Felix Fietkau, linux-wireless
Cc: Ryder Lee, devicetree, Krzysztof Kozlowski, Conor Dooley
In-Reply-To: <3d2f9e4d3f06f93e8eb191ade69f4b43752a36bf.camel@sipsolutions.net>
On 24/03/2026 16:24, Johannes Berg wrote:
> On Mon, 2026-03-23 at 10:33 +0100, Felix Fietkau wrote:
>
>> The following changes since commit 9ac76f3d0bb2940db3a9684d596b9c8f301ef315:
>>
>> Merge tag 'wireless-next-2026-03-19' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next (2026-03-19 15:30:20 +0100)
>>
>> are available in the Git repository at:
>>
>> https://github.com/nbd168/wireless tags/mt76-next-2026-03-23
>
> [...]
>
>> dt-bindings: net: wireless: mt76: add mt79 PCI devices
>> dt-bindings: net: wireless: mt76: clarify backoff limit usage
>
> OK I have no idea what happened here, apparently Ryder has a super
> messed up email setup that ended up sending different versions with the
> same Message-Id, so the lore archive is a big mess ... whatever is going
> on there, please fix that.
>
> But given what I _can_ see about these patches in the archive, I don't
> want to pull this now unless I get a clear ACK from DT maintainers.
I don't get what is the question to DT maintainers here.... but there
are no such two commits in the next and I do not see Acks from DT
maintainers on the list.
Why were they applied without Acks? And why the nbd168 tree where they
are applied is not in the next?
Best regards,
Krzysztof
^ permalink raw reply
* Re: pull request: mt76-next 2026-03-23
From: Felix Fietkau @ 2026-03-25 8:26 UTC (permalink / raw)
To: Krzysztof Kozlowski, Johannes Berg, linux-wireless
Cc: Ryder Lee, devicetree, Krzysztof Kozlowski, Conor Dooley
In-Reply-To: <6bd3cee4-5f9a-4af9-af42-c1ea3cbe54c3@kernel.org>
On 25.03.26 08:27, Krzysztof Kozlowski wrote:
> On 24/03/2026 16:24, Johannes Berg wrote:
>> On Mon, 2026-03-23 at 10:33 +0100, Felix Fietkau wrote:
>>
>>> The following changes since commit 9ac76f3d0bb2940db3a9684d596b9c8f301ef315:
>>>
>>> Merge tag 'wireless-next-2026-03-19' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next (2026-03-19 15:30:20 +0100)
>>>
>>> are available in the Git repository at:
>>>
>>> https://github.com/nbd168/wireless tags/mt76-next-2026-03-23
>>
>> [...]
>>
>>> dt-bindings: net: wireless: mt76: add mt79 PCI devices
>>> dt-bindings: net: wireless: mt76: clarify backoff limit usage
>>
>> OK I have no idea what happened here, apparently Ryder has a super
>> messed up email setup that ended up sending different versions with the
>> same Message-Id, so the lore archive is a big mess ... whatever is going
>> on there, please fix that.
>>
>> But given what I _can_ see about these patches in the archive, I don't
>> want to pull this now unless I get a clear ACK from DT maintainers.
>
> I don't get what is the question to DT maintainers here.... but there
> are no such two commits in the next and I do not see Acks from DT
> maintainers on the list.
>
> Why were they applied without Acks? And why the nbd168 tree where they
> are applied is not in the next?
I accidentally pulled them in earlier with some other changes, but
removed them from my tree again after Johannes pointed out the issue.
v2 of my pull request no longer contains them, so they're not on the way
to next at this point.
- Felix
^ permalink raw reply
* Re: [PATCH] wifi: virt_wifi: remove SET_NETDEV_DEV to avoid use-after-free
From: Greg KH @ 2026-03-25 8:35 UTC (permalink / raw)
To: Alexander Popov
Cc: Andrew Lunn, Jakub Kicinski, David Miller, Eric Dumazet,
Paolo Abeni, Simon Horman, Maxime Chevallier, Michal Kubecek,
Gal Pressman, Kory Maincent, Oleksij Rempel, Ido Schimmel,
Heiner Kallweit, Johannes Berg, James Guan, Kees Cook, Paul Moses,
linux-wireless, netdev, linux-kernel, security, notify
In-Reply-To: <20260324224607.374327-1-alex.popov@linux.com>
On Wed, Mar 25, 2026 at 01:46:02AM +0300, Alexander Popov wrote:
> Currently we execute `SET_NETDEV_DEV(dev, &priv->lowerdev->dev)` for
> the virt_wifi net devices. However, unregistering a virt_wifi device in
> netdev_run_todo() can happen together with the device referenced by
> SET_NETDEV_DEV().
>
> It can result in use-after-free during the ethtool operations performed
> on a virt_wifi device that is currently being unregistered. Such a net
> device can have the `dev.parent` field pointing to the freed memory,
> but ethnl_ops_begin() calls `pm_runtime_get_sync(dev->dev.parent)`.
>
> Let's remove SET_NETDEV_DEV for virt_wifi to avoid bugs like this:
>
> ==================================================================
> BUG: KASAN: slab-use-after-free in __pm_runtime_resume+0xe2/0xf0
> Read of size 2 at addr ffff88810cfc46f8 by task pm/606
>
> Call Trace:
> <TASK>
> dump_stack_lvl+0x4d/0x70
> print_report+0x170/0x4f3
> ? __pfx__raw_spin_lock_irqsave+0x10/0x10
> kasan_report+0xda/0x110
> ? __pm_runtime_resume+0xe2/0xf0
> ? __pm_runtime_resume+0xe2/0xf0
> __pm_runtime_resume+0xe2/0xf0
> ethnl_ops_begin+0x49/0x270
> ethnl_set_features+0x23c/0xab0
> ? __pfx_ethnl_set_features+0x10/0x10
> ? kvm_sched_clock_read+0x11/0x20
> ? local_clock_noinstr+0xf/0xf0
> ? local_clock+0x10/0x30
> ? kasan_save_track+0x25/0x60
> ? __kasan_kmalloc+0x7f/0x90
> ? genl_family_rcv_msg_attrs_parse.isra.0+0x150/0x2c0
> genl_family_rcv_msg_doit+0x1e7/0x2c0
> ? __pfx_genl_family_rcv_msg_doit+0x10/0x10
> ? __pfx_cred_has_capability.isra.0+0x10/0x10
> ? stack_trace_save+0x8e/0xc0
> genl_rcv_msg+0x411/0x660
> ? __pfx_genl_rcv_msg+0x10/0x10
> ? __pfx_ethnl_set_features+0x10/0x10
> netlink_rcv_skb+0x121/0x380
> ? __pfx_genl_rcv_msg+0x10/0x10
> ? __pfx_netlink_rcv_skb+0x10/0x10
> ? __pfx_down_read+0x10/0x10
> genl_rcv+0x23/0x30
> netlink_unicast+0x60f/0x830
> ? __pfx_netlink_unicast+0x10/0x10
> ? __pfx___alloc_skb+0x10/0x10
> netlink_sendmsg+0x6ea/0xbc0
> ? __pfx_netlink_sendmsg+0x10/0x10
> ? __futex_queue+0x10b/0x1f0
> ____sys_sendmsg+0x7a2/0x950
> ? copy_msghdr_from_user+0x26b/0x430
> ? __pfx_____sys_sendmsg+0x10/0x10
> ? __pfx_copy_msghdr_from_user+0x10/0x10
> ___sys_sendmsg+0xf8/0x180
> ? __pfx____sys_sendmsg+0x10/0x10
> ? __pfx_futex_wait+0x10/0x10
> ? fdget+0x2e4/0x4a0
> __sys_sendmsg+0x11f/0x1c0
> ? __pfx___sys_sendmsg+0x10/0x10
> do_syscall_64+0xe2/0x570
> ? exc_page_fault+0x66/0xb0
> entry_SYSCALL_64_after_hwframe+0x77/0x7f
> </TASK>
>
> This fix may be combined with another one in the ethtool subsystem:
> https://lore.kernel.org/all/20260322075917.254874-1-alex.popov@linux.com/T/#u
>
> Fixes: d43c65b05b848e0b ("ethtool: runtime-resume netdev parent in ethnl_ops_begin")
> Cc: stable@vger.kernel.org
> Signed-off-by: Alexander Popov <alex.popov@linux.com>
> ---
> drivers/net/wireless/virtual/virt_wifi.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/wireless/virtual/virt_wifi.c b/drivers/net/wireless/virtual/virt_wifi.c
> index 885dc7243e8d..97bd39d89e98 100644
> --- a/drivers/net/wireless/virtual/virt_wifi.c
> +++ b/drivers/net/wireless/virtual/virt_wifi.c
> @@ -557,7 +557,6 @@ static int virt_wifi_newlink(struct net_device *dev,
> eth_hw_addr_inherit(dev, priv->lowerdev);
> netif_stacked_transfer_operstate(priv->lowerdev, dev);
>
> - SET_NETDEV_DEV(dev, &priv->lowerdev->dev);
> dev->ieee80211_ptr = kzalloc_obj(*dev->ieee80211_ptr);
>
> if (!dev->ieee80211_ptr) {
> --
> 2.53.0
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply
* Re: [PATCH] wifi: mt76: mt7996: disable UNI_BSS_INFO_PROTECT_INFO for mt7996
From: Lorenzo Bianconi @ 2026-03-25 7:58 UTC (permalink / raw)
To: Ryder Lee; +Cc: Felix Fietkau, linux-mediatek, linux-wireless, Shayne Chen
In-Reply-To: <a1f5ad05b164c836161e9c53e32335c15a1fa2a2.1774411028.git.ryder.lee@mediatek.com>
[-- Attachment #1: Type: text/plain, Size: 1028 bytes --]
> There are known firmware issues with MT7996, so it is temporarily
> disabled. MT7992 and MT7990 are working normally.
>
> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
> ---
> drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
> index 16420375112d..bdc40e94127c 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
> @@ -1281,6 +1281,9 @@ int mt7996_mcu_set_protection(struct mt7996_phy *phy, struct mt7996_vif_link *li
> PROT_NONGF_STA = BIT(7),
> };
>
> + if (is_mt7996(&dev->mt76))
> + return 0;
Hi Ryder,
nit: can you please add a comment here describing why this is required? Thanks.
Regard,
Lorenzo
> +
> skb = __mt7996_mcu_alloc_bss_req(&dev->mt76, &link->mt76,
> MT7996_BSS_UPDATE_MAX_SIZE);
> if (IS_ERR(skb))
> --
> 2.45.2
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply
* Re: [PATCH 0/2] ath10k: WCN3990 firmware workarounds for WLAN.HL.3.2
From: Loic Poulain @ 2026-03-25 8:41 UTC (permalink / raw)
To: Jeff Johnson; +Cc: Malte Schababerle, linux-wireless, ath10k
In-Reply-To: <20260322124822.230492-1-m.schababerle@gmail.com>
Hi Jeff, Malte.
On Sun, Mar 22, 2026 at 2:49 PM Malte Schababerle
<m.schababerle@gmail.com> wrote:
>
> Two firmware workarounds for WCN3990 (QCA6174 integrated variant on
> Qualcomm SM8150/SDM845 platforms) running WLAN.HL.3.2 firmware.
>
> Both issues are firmware bugs where WCN3990 advertises capabilities it
> cannot handle correctly. Tested on OnePlus 7T (SM8150) with
> WLAN.HL.3.2.0.c2-00006 and WLAN.HL.3.2.0.c2-00011.
>
> Patch 1 fixes a deterministic firmware crash caused by the quiet mode
> WMI command. The existing guard from commit 53884577fbcef relied on
> THERM_THROT not being advertised, but HL3.2 now advertises it despite
> still crashing on the command.
>
> Patch 2 works around a bug where active scan does not tune the radio
> on 5GHz non-DFS channels, making 5GHz networks invisible. Forcing
> passive scan mode restores 5GHz discovery.
>
> Malte Schababerle (2):
> ath10k: skip quiet mode for WCN3990 to prevent firmware crash
> ath10k: force passive scan on 5GHz for WCN3990
Jeff, is this something that could be addressed or worked around
through the firmware or NV configuration? Applying this workaround to
all WCN3990 devices feels a bit excessive if the issue is limited to
specific variants.
Regards,
Loic
^ permalink raw reply
* Re: [PATCH v3 1/9] arm64: dts: amlogic: t7: Add eMMC, SD card and SDIO pinctrl nodes
From: Ronald Claveau @ 2026-03-25 8:40 UTC (permalink / raw)
To: Xianwei Zhao
Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel,
linux-mmc, linux-wireless, Neil Armstrong, Kevin Hilman,
Jerome Brunet, Martin Blumenstingl, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Ulf Hansson, Johannes Berg,
van Spriel
In-Reply-To: <316efeff-477d-4d8d-9c60-ac7c4e5b9b33@amlogic.com>
On 3/25/26 3:48 AM, Xianwei Zhao wrote:
> Hi Ronald,
>
> On 2026/3/23 17:55, Ronald Claveau wrote:
>> These pinctrl nodes are required by the eMMC, SD card and SDIO drivers
>> to configure pin muxing at runtime.
>>
>> - eMMC: control, 4-bit/8-bit data, data strobe and clock gate pins
>> - SD card: data, clock, command and clock gate pins
>> - SDIO: data, clock, command and clock gate pins
>>
>> Signed-off-by: Ronald Claveau<linux-kernel-dev@aliel.fr>
>> ---
>> arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 98 +++++++++++++++++++
>> ++++++++++
>> 1 file changed, 98 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/
>> boot/dts/amlogic/amlogic-t7.dtsi
>> index 6510068bcff92..ac8de8e9b8010 100644
>> --- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
>> +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
>> @@ -250,6 +250,104 @@ gpio: bank@4000 {
>> #gpio-cells = <2>;
>> gpio-ranges =
>> <&periphs_pinctrl 0 0 157>;
>> };
>> +
>> + emmc_ctrl_pins: emmc-ctrl {
>> + mux-0 {
>> + groups = "emmc_cmd";
>> + function = "emmc";
>> + bias-pull-up;
>> + };
>> +
>> + mux-1 {
>> + groups = "emmc_clk";
>> + function = "emmc";
>> + bias-disable;
>> + };
>> + };
>> +
>> + emmc_data_4b_pins: emmc-data-4b {
>> + mux-0 {
>> + groups = "emmc_nand_d0",
>> + "emmc_nand_d1",
>> + "emmc_nand_d2",
>> + "emmc_nand_d3";
>> + function = "emmc";
>> + bias-pull-up;
>> + };
>> + };
>> +
>> + emmc_data_8b_pins: emmc-data-8b {
>> + mux-0 {
>> + groups = "emmc_nand_d0",
>> + "emmc_nand_d1",
>> + "emmc_nand_d2",
>> + "emmc_nand_d3",
>> + "emmc_nand_d4",
>> + "emmc_nand_d5",
>> + "emmc_nand_d6",
>> + "emmc_nand_d7";
>> + function = "emmc";
>> + bias-pull-up;
>> + };
>> + };
>> +
>> + emmc_ds_pins: emmc-ds {
>> + mux {
>> + groups = "emmc_nand_ds";
>> + function = "emmc";
>> + bias-pull-down;
>> + };
>> + };
>> +
>> + emmc_clk_gate_pins: emmc_clk_gate {
>
> Node names should use hyphens ('-') instead of underscores ('_'),
> consistent with the following nodes.
>
Thanks for your feedback Xianwei.
I will change that.
>> + mux {
>> + groups = "GPIOB_8";
>> + function =
>> "gpio_periphs";
>> + bias-pull-down;
>> + };
>> + };
>> +
>> + sdcard_pins: sdcard {
>> + mux {
>> + groups = "sdcard_d0",
>> + "sdcard_d1",
>> + "sdcard_d2",
>> + "sdcard_d3",
>> + "sdcard_clk",
>> + "sdcard_cmd";
>> + function = "sdcard";
>> + bias-pull-up;
>> + };
>> + };
>> +
>> + sdcard_clk_gate_pins: sdcard_clk_gate {
>> + mux {
>> + groups = "GPIOC_4";
>> + function =
>> "gpio_periphs";
>> + bias-pull-down;
>> + };
>> + };
>> +
>> + sdio_pins: sdio {
>> + mux-0 {
>> + groups = "sdio_d0",
>> + "sdio_d1",
>> + "sdio_d2",
>> + "sdio_d3",
>> + "sdio_clk",
>> + "sdio_cmd";
>> + function = "sdio";
>> + bias-pull-up;
>> + };
>> + };
>> +
>> + sdio_clk_gate_pins: sdio_clk_gate {
>> + mux {
>> + groups = "GPIOX_4";
>> + function =
>> "gpio_periphs";
>> + bias-pull-up;
>> + };
>> + };
>> };
>>
>> gpio_intc: interrupt-controller@4080 {
--
Best regards,
Ronald
^ permalink raw reply
* Re: [PATCH v3 2/9] dt-bindings: mmc: amlogic: Add compatible for T7 mmc
From: Ronald Claveau @ 2026-03-25 8:45 UTC (permalink / raw)
To: Xianwei Zhao
Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel,
linux-mmc, linux-wireless, Neil Armstrong, Kevin Hilman,
Jerome Brunet, Martin Blumenstingl, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Ulf Hansson, Johannes Berg,
van Spriel
In-Reply-To: <c01c4e7e-1c0c-4bbf-b126-831160c8e32b@amlogic.com>
On 3/25/26 3:38 AM, Xianwei Zhao wrote:
> Hi Ronald,
>
> On 2026/3/23 17:55, Ronald Claveau wrote:
>> Add amlogic,t7-mmc compatible string, falling back to amlogic,meson-
>> axg-mmc
>> as the T7 MMC controller is compatible with the AXG implementation.
>>
>> Signed-off-by: Ronald Claveau<linux-kernel-dev@aliel.fr>
>> ---
>> Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml | 5
>> ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git
>> a/Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml
>> b/Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml
>> index 57646575a13f8..40dccf9715781 100644
>> --- a/Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml
>> +++ b/Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml
>> @@ -19,7 +19,10 @@ allOf:
>> properties:
>> compatible:
>> oneOf:
>> - - const: amlogic,meson-axg-mmc
>> + - items:
>> + - enum:
>> + - amlogic,t7-mmc
>> + - const: amlogic,meson-axg-mmc
>
> It seems that break API here.
> One item should be added here instead of being replaced.
>
Thanks Xianwei, ok I will change that in a new version.
>> - items:
>> - const: amlogic,meson-gx-mmc
>> - const: amlogic,meson-gxbb-mmc
>>
>> --
>> 2.49.0
--
Best regards,
Ronald
^ permalink raw reply
* [PATCH v4 1/9] arm64: dts: amlogic: t7: Add eMMC, SD card and SDIO pinctrl nodes
From: Ronald Claveau @ 2026-03-25 9:15 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Ulf Hansson,
Johannes Berg, van Spriel
Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel,
linux-mmc, linux-wireless, Ronald Claveau
In-Reply-To: <20260325-add-emmc-t7-vim4-v4-0-44c7b4a5e459@aliel.fr>
These pinctrl nodes are required by the eMMC, SD card and SDIO drivers
to configure pin muxing at runtime.
- eMMC: control, 4-bit/8-bit data, data strobe and clock gate pins
- SD card: data, clock, command and clock gate pins
- SDIO: data, clock, command and clock gate pins
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
---
arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 98 +++++++++++++++++++++++++++++
1 file changed, 98 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
index 6510068bcff92..016b5429c8d1b 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
+++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
@@ -250,6 +250,104 @@ gpio: bank@4000 {
#gpio-cells = <2>;
gpio-ranges = <&periphs_pinctrl 0 0 157>;
};
+
+ emmc_ctrl_pins: emmc-ctrl {
+ mux-0 {
+ groups = "emmc_cmd";
+ function = "emmc";
+ bias-pull-up;
+ };
+
+ mux-1 {
+ groups = "emmc_clk";
+ function = "emmc";
+ bias-disable;
+ };
+ };
+
+ emmc_data_4b_pins: emmc-data-4b {
+ mux-0 {
+ groups = "emmc_nand_d0",
+ "emmc_nand_d1",
+ "emmc_nand_d2",
+ "emmc_nand_d3";
+ function = "emmc";
+ bias-pull-up;
+ };
+ };
+
+ emmc_data_8b_pins: emmc-data-8b {
+ mux-0 {
+ groups = "emmc_nand_d0",
+ "emmc_nand_d1",
+ "emmc_nand_d2",
+ "emmc_nand_d3",
+ "emmc_nand_d4",
+ "emmc_nand_d5",
+ "emmc_nand_d6",
+ "emmc_nand_d7";
+ function = "emmc";
+ bias-pull-up;
+ };
+ };
+
+ emmc_ds_pins: emmc-ds {
+ mux {
+ groups = "emmc_nand_ds";
+ function = "emmc";
+ bias-pull-down;
+ };
+ };
+
+ emmc_clk_gate_pins: emmc-clk-gate {
+ mux {
+ groups = "GPIOB_8";
+ function = "gpio_periphs";
+ bias-pull-down;
+ };
+ };
+
+ sdcard_pins: sdcard {
+ mux {
+ groups = "sdcard_d0",
+ "sdcard_d1",
+ "sdcard_d2",
+ "sdcard_d3",
+ "sdcard_clk",
+ "sdcard_cmd";
+ function = "sdcard";
+ bias-pull-up;
+ };
+ };
+
+ sdcard_clk_gate_pins: sdcard-clk-gate {
+ mux {
+ groups = "GPIOC_4";
+ function = "gpio_periphs";
+ bias-pull-down;
+ };
+ };
+
+ sdio_pins: sdio {
+ mux-0 {
+ groups = "sdio_d0",
+ "sdio_d1",
+ "sdio_d2",
+ "sdio_d3",
+ "sdio_clk",
+ "sdio_cmd";
+ function = "sdio";
+ bias-pull-up;
+ };
+ };
+
+ sdio_clk_gate_pins: sdio-clk-gate {
+ mux {
+ groups = "GPIOX_4";
+ function = "gpio_periphs";
+ bias-pull-up;
+ };
+ };
};
gpio_intc: interrupt-controller@4080 {
--
2.49.0
^ permalink raw reply related
* [PATCH v4 0/9] arm64: dts: amlogic: Add MMC/SD/SDIO support for Khadas VIM4 (Amlogic T7)
From: Ronald Claveau @ 2026-03-25 9:15 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Ulf Hansson,
Johannes Berg, van Spriel
Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel,
linux-mmc, linux-wireless, Ronald Claveau, Nick Xie
This patch series depends on Jian's SCMI clock patches yet to merge
https://lore.kernel.org/all/20260313070022.700437-1-jian.hu@amlogic.com/
This series adds device tree support for the MMC, SD card and SDIO
interfaces on the Amlogic T7 SoC and the Khadas VIM4 board.
The first patches add the necessary building blocks in the T7 SoC
DTSI: pinctrl nodes for pin muxing, PWM controller nodes, and MMC
controller nodes. The amlogic,t7-mmc and amlogic,t7-pwm compatible
strings are introduced with fallbacks to existing drivers, avoiding
the need for new driver code.
The remaining patches enable these interfaces on the Khadas VIM4
board, including the power regulators, the SDIO power sequence and
32.768kHz PWM clock required by the BCM43752 Wi-Fi module, and the
board-specific MMC controller configurations.
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
---
Changes in v4:
- Address potential DT binding API break from Xianwei's feedback.
- Change underscore to dash in pinctrl nodes names from Xianwei's feedback.
- Link to v3: https://lore.kernel.org/r/20260323-add-emmc-t7-vim4-v3-0-5159d90a984c@aliel.fr
Changes in v3:
- Remove all changes about fixed pll clock from analog controller.
- Use clocks retrieved through SCMI.
- Add other MMC controllers
- Manage Wi-Fi module enablement.
- Link to v2: https://lore.kernel.org/r/20260218101709.35450-1-linux-kernel-dev@aliel.fr
Changes in v2:
- Resend v1 patches as attached to the first patch.
- Link to v1: https://lore.kernel.org/r/20260218101709.35450-1-linux-kernel-dev@aliel.fr
---
Ronald Claveau (9):
arm64: dts: amlogic: t7: Add eMMC, SD card and SDIO pinctrl nodes
dt-bindings: mmc: amlogic: Add compatible for T7 mmc
arm64: dts: amlogic: t7: Add MMC controller nodes
arm64: dts: amlogic: t7: Add PWM pinctrl nodes
arm64: dts: amlogic: t7: Add PWM controller nodes
arm64: dts: amlogic: t7: khadas-vim4: Add power regulators
arm64: dts: amlogic: t7: khadas-vim4: Add SDIO power sequence and WiFi clock
dt-bindings: net: wireless: brcm: Add compatible for bcm43752
arm64: dts: amlogic: t7: khadas-vim4: Add MMC nodes
.../bindings/mmc/amlogic,meson-gx-mmc.yaml | 4 +
.../bindings/net/wireless/brcm,bcm4329-fmac.yaml | 1 +
.../dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 202 ++++++++++++-
arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 336 +++++++++++++++++++++
4 files changed, 542 insertions(+), 1 deletion(-)
---
base-commit: f6eb9ae8b9fc13c3971e4a6d1e8442f253001f36
change-id: 20260320-add-emmc-t7-vim4-6ad16e94614f
prerequisite-message-id: <20260313070022.700437-1-jian.hu@amlogic.com>
prerequisite-patch-id: f03a086b4137158412b2d47b3de793b858de8dde
prerequisite-patch-id: 123970c9b29c2090440f2fd71c85d3c6fd8e36de
prerequisite-patch-id: 3e2e56b0926ba327b520f935df4ced5089bbe503
Best regards,
--
Ronald Claveau <linux-kernel-dev@aliel.fr>
^ permalink raw reply
* [PATCH v4 2/9] dt-bindings: mmc: amlogic: Add compatible for T7 mmc
From: Ronald Claveau @ 2026-03-25 9:15 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Ulf Hansson,
Johannes Berg, van Spriel
Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel,
linux-mmc, linux-wireless, Ronald Claveau
In-Reply-To: <20260325-add-emmc-t7-vim4-v4-0-44c7b4a5e459@aliel.fr>
Add amlogic,t7-mmc compatible string, falling back to amlogic,meson-axg-mmc
as the T7 MMC controller is compatible with the AXG implementation.
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
---
Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml b/Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml
index 57646575a13f8..976f36de2091c 100644
--- a/Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml
+++ b/Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml
@@ -19,6 +19,10 @@ allOf:
properties:
compatible:
oneOf:
+ - items:
+ - enum:
+ - amlogic,t7-mmc
+ - const: amlogic,meson-axg-mmc
- const: amlogic,meson-axg-mmc
- items:
- const: amlogic,meson-gx-mmc
--
2.49.0
^ permalink raw reply related
* [PATCH v4 3/9] arm64: dts: amlogic: t7: Add MMC controller nodes
From: Ronald Claveau @ 2026-03-25 9:15 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Ulf Hansson,
Johannes Berg, van Spriel
Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel,
linux-mmc, linux-wireless, Ronald Claveau
In-Reply-To: <20260325-add-emmc-t7-vim4-v4-0-44c7b4a5e459@aliel.fr>
Add device tree nodes for the three MMC controllers available
on the Amlogic T7 SoC, using amlogic,meson-axg-mmc as fallback compatible.
All nodes are disabled by default and should be
enabled in the board-specific DTS file.
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
---
arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 39 +++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
index 016b5429c8d1b..62c87d0ef7065 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
+++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
@@ -374,6 +374,45 @@ sec_ao: ao-secure@10220 {
reg = <0x0 0x10220 0x0 0x140>;
amlogic,has-chip-id;
};
+
+ sd_emmc_a: mmc@88000 {
+ compatible = "amlogic,t7-mmc", "amlogic,meson-axg-mmc";
+ reg = <0x0 0x88000 0x0 0x800>;
+ interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ clocks = <&clkc_periphs CLKID_SYS_SD_EMMC_A>,
+ <&clkc_periphs CLKID_SD_EMMC_A>,
+ <&scmi_clk CLKID_FCLK_DIV2>;
+ clock-names = "core", "clkin0", "clkin1";
+ assigned-clocks = <&clkc_periphs CLKID_SD_EMMC_A_SEL>;
+ assigned-clock-parents = <&xtal>;
+ };
+
+ sd_emmc_b: mmc@8a000 {
+ compatible = "amlogic,t7-mmc", "amlogic,meson-axg-mmc";
+ reg = <0x0 0x8a000 0x0 0x800>;
+ interrupts = <GIC_SPI 177 IRQ_TYPE_EDGE_RISING>;
+ status = "disabled";
+ clocks = <&clkc_periphs CLKID_SYS_SD_EMMC_B>,
+ <&clkc_periphs CLKID_SD_EMMC_B>,
+ <&scmi_clk CLKID_FCLK_DIV2>;
+ clock-names = "core", "clkin0", "clkin1";
+ assigned-clocks = <&clkc_periphs CLKID_SD_EMMC_B_SEL>;
+ assigned-clock-parents = <&xtal>;
+ };
+
+ sd_emmc_c: mmc@8c000 {
+ compatible = "amlogic,t7-mmc", "amlogic,meson-axg-mmc";
+ reg = <0x0 0x8c000 0x0 0x800>;
+ interrupts = <GIC_SPI 178 IRQ_TYPE_EDGE_RISING>;
+ status = "disabled";
+ clocks = <&clkc_periphs CLKID_SYS_SD_EMMC_C>,
+ <&clkc_periphs CLKID_SD_EMMC_C>,
+ <&scmi_clk CLKID_FCLK_DIV2>;
+ clock-names = "core", "clkin0", "clkin1";
+ assigned-clocks = <&clkc_periphs CLKID_SD_EMMC_C_SEL>;
+ assigned-clock-parents = <&xtal>;
+ };
};
};
--
2.49.0
^ permalink raw reply related
* [PATCH v4 4/9] arm64: dts: amlogic: t7: Add PWM pinctrl nodes
From: Ronald Claveau @ 2026-03-25 9:15 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Ulf Hansson,
Johannes Berg, van Spriel
Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel,
linux-mmc, linux-wireless, Ronald Claveau
In-Reply-To: <20260325-add-emmc-t7-vim4-v4-0-44c7b4a5e459@aliel.fr>
These pinctrl nodes are required by the PWM drivers to configure
pin muxing at runtime.
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
---
arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 136 ++++++++++++++++++++++++++++
1 file changed, 136 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
index 62c87d0ef7065..eb09a26bcd0e0 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
+++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
@@ -307,6 +307,142 @@ mux {
};
};
+ pwm_a_pins: pwm-a {
+ mux {
+ groups = "pwm_a";
+ function = "pwm_a";
+ bias-disable;
+ };
+ };
+
+ pwm_ao_a_pins: pwm-ao-a {
+ mux {
+ groups = "pwm_ao_a";
+ function = "pwm_ao_a";
+ bias-disable;
+ };
+ };
+
+ pwm_ao_b_pins: pwm-ao-b {
+ mux {
+ groups = "pwm_ao_b";
+ function = "pwm_ao_b";
+ bias-disable;
+ };
+ };
+
+ pwm_ao_c_pins: pwm-ao-c {
+ mux {
+ groups = "pwm_ao_c";
+ function = "pwm_ao_c";
+ bias-disable;
+ };
+ };
+
+ pwm_ao_c_hiz_pins: pwm-ao-c-hiz {
+ mux {
+ groups = "pwm_ao_c_hiz";
+ function = "pwm_ao_c_hiz";
+ bias-disable;
+ };
+ };
+
+ pwm_ao_d_pins: pwm-ao-d {
+ mux {
+ groups = "pwm_ao_d";
+ function = "pwm_ao_d";
+ bias-disable;
+ };
+ };
+
+ pwm_ao_e_pins: pwm-ao-e {
+ mux {
+ groups = "pwm_ao_e";
+ function = "pwm_ao_e";
+ bias-disable;
+ };
+ };
+
+ pwm_ao_f_pins: pwm-ao-f {
+ mux {
+ groups = "pwm_ao_f";
+ function = "pwm_ao_f";
+ bias-disable;
+ };
+ };
+
+ pwm_ao_g_pins: pwm-ao-g {
+ mux {
+ groups = "pwm_ao_g";
+ function = "pwm_ao_g";
+ bias-disable;
+ };
+ };
+
+ pwm_ao_g_hiz_pins: pwm-ao-g-hiz {
+ mux {
+ groups = "pwm_ao_g_hiz";
+ function = "pwm_ao_g_hiz";
+ bias-disable;
+ };
+ };
+
+ pwm_ao_h_pins: pwm-ao-h {
+ mux {
+ groups = "pwm_ao_h";
+ function = "pwm_ao_h";
+ bias-disable;
+ };
+ };
+
+ pwm_b_pins: pwm-b {
+ mux {
+ groups = "pwm_b";
+ function = "pwm_b";
+ bias-disable;
+ };
+ };
+
+ pwm_c_pins: pwm-c {
+ mux {
+ groups = "pwm_c";
+ function = "pwm_c";
+ bias-disable;
+ };
+ };
+
+ pwm_d_pins: pwm-d {
+ mux {
+ groups = "pwm_d";
+ function = "pwm_d";
+ bias-disable;
+ };
+ };
+
+ pwm_e_pins: pwm-e {
+ mux {
+ groups = "pwm_e";
+ function = "pwm_e";
+ bias-disable;
+ };
+ };
+
+ pwm_f_pins: pwm-f {
+ mux {
+ groups = "pwm_f";
+ function = "pwm_f";
+ bias-disable;
+ };
+ };
+
+ pwm_vs_pins: pwm-vs {
+ mux {
+ groups = "pwm_vs";
+ function = "pwm_vs";
+ bias-disable;
+ };
+ };
+
sdcard_pins: sdcard {
mux {
groups = "sdcard_d0",
--
2.49.0
^ permalink raw reply related
* [PATCH v4 5/9] arm64: dts: amlogic: t7: Add PWM controller nodes
From: Ronald Claveau @ 2026-03-25 9:15 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Ulf Hansson,
Johannes Berg, van Spriel
Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel,
linux-mmc, linux-wireless, Ronald Claveau, Nick Xie
In-Reply-To: <20260325-add-emmc-t7-vim4-v4-0-44c7b4a5e459@aliel.fr>
Add device tree nodes for the seven PWM controllers available
on the Amlogic T7 SoC, using amlogic,meson-s4-pwm as fallback compatible.
All nodes are disabled by default and should be
enabled in the board-specific DTS file.
Co-developed-by: Nick Xie <nick@khadas.com>
Signed-off-by: Nick Xie <nick@khadas.com>
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
---
arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 63 +++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
index eb09a26bcd0e0..581cdaebfe637 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
+++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
@@ -511,6 +511,69 @@ sec_ao: ao-secure@10220 {
amlogic,has-chip-id;
};
+ pwm_ao_ef: pwm@30000 {
+ compatible = "amlogic,t7-pwm", "amlogic,meson-s4-pwm";
+ reg = <0x0 0x30000 0x0 0x24>;
+ clocks = <&clkc_periphs CLKID_PWM_AO_E>,
+ <&clkc_periphs CLKID_PWM_AO_F>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
+ pwm_ao_gh: pwm@32000 {
+ compatible = "amlogic,t7-pwm", "amlogic,meson-s4-pwm";
+ reg = <0x0 0x32000 0x0 0x24>;
+ clocks = <&clkc_periphs CLKID_PWM_AO_G>,
+ <&clkc_periphs CLKID_PWM_AO_H>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
+ pwm_ab: pwm@58000 {
+ compatible = "amlogic,t7-pwm", "amlogic,meson-s4-pwm";
+ reg = <0x0 0x58000 0x0 0x24>;
+ clocks = <&clkc_periphs CLKID_PWM_A>,
+ <&clkc_periphs CLKID_PWM_B>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
+ pwm_cd: pwm@5a000 {
+ compatible = "amlogic,t7-pwm", "amlogic,meson-s4-pwm";
+ reg = <0x0 0x5a000 0x0 0x24>;
+ clocks = <&clkc_periphs CLKID_PWM_C>,
+ <&clkc_periphs CLKID_PWM_D>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
+ pwm_ef: pwm@5c000 {
+ compatible = "amlogic,t7-pwm", "amlogic,meson-s4-pwm";
+ reg = <0x0 0x5c000 0x0 0x24>;
+ clocks = <&clkc_periphs CLKID_PWM_E>,
+ <&clkc_periphs CLKID_PWM_F>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
+ pwm_ao_ab: pwm@5e000 {
+ compatible = "amlogic,t7-pwm", "amlogic,meson-s4-pwm";
+ reg = <0x0 0x5e000 0x0 0x24>;
+ clocks = <&clkc_periphs CLKID_PWM_AO_A>,
+ <&clkc_periphs CLKID_PWM_AO_B>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
+ pwm_ao_cd: pwm@60000 {
+ compatible = "amlogic,t7-pwm", "amlogic,meson-s4-pwm";
+ reg = <0x0 0x60000 0x0 0x24>;
+ clocks = <&clkc_periphs CLKID_PWM_AO_C>,
+ <&clkc_periphs CLKID_PWM_AO_D>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
sd_emmc_a: mmc@88000 {
compatible = "amlogic,t7-mmc", "amlogic,meson-axg-mmc";
reg = <0x0 0x88000 0x0 0x800>;
--
2.49.0
^ permalink raw reply related
* [PATCH v4 6/9] arm64: dts: amlogic: t7: khadas-vim4: Add power regulators
From: Ronald Claveau @ 2026-03-25 9:15 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Ulf Hansson,
Johannes Berg, van Spriel
Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel,
linux-mmc, linux-wireless, Ronald Claveau
In-Reply-To: <20260325-add-emmc-t7-vim4-v4-0-44c7b4a5e459@aliel.fr>
Add voltage regulator nodes describing the VIM4 power tree,
required by peripheral nodes such as the SD card controller.
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
---
.../dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 90 ++++++++++++++++++++++
1 file changed, 90 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
index fffdab96b12eb..2450084d37642 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
+++ b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
@@ -6,6 +6,8 @@
/dts-v1/;
#include "amlogic-t7.dtsi"
+#include <dt-bindings/gpio/amlogic,t7-periphs-pinctrl.h>
+#include <dt-bindings/gpio/gpio.h>
/ {
model = "Khadas vim4";
@@ -45,6 +47,94 @@ xtal: xtal-clk {
#clock-cells = <0>;
};
+ dc_in: regulator-dc-in {
+ compatible = "regulator-fixed";
+ regulator-name = "DC_IN";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
+ sd_3v3: regulator-sdcard-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "SD_3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vddao_3v3>;
+ gpio = <&gpio GPIOD_11 GPIO_ACTIVE_LOW>;
+ regulator-boot-on;
+ enable-active-low;
+ regulator-always-on;
+ };
+
+ vcc5v: regulator-vcc-5v {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC5V";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&dc_in>;
+
+ gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ vcc5v0_usb: regulator-vcc-usb {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC5V0_USB";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v>;
+
+ gpio = <&gpio GPIOY_5 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ vddao_1v8: regulator-vddao-1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "VDDAO_1V8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&vddao_3v3>;
+ regulator-always-on;
+ };
+
+ vddao_3v3: regulator-vddao-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "VDDAO_3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&dc_in>;
+ regulator-always-on;
+ };
+
+ vddio_1v8: regulator-vddio-1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "VDDIO_1V8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&vddio_3v3>;
+ regulator-always-on;
+ };
+
+ vddio_3v3: regulator-vddio-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "VDDIO_3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vddao_3v3>;
+ regulator-always-on;
+ };
+
+ vddio_c: regulator-gpio-c {
+ compatible = "regulator-gpio";
+ regulator-name = "VDDIO_C";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vddio_3v3>;
+ gpios = <&gpio GPIOD_9 GPIO_ACTIVE_HIGH>;
+ states = <1800000 1
+ 3300000 0>;
+ };
};
&uart_a {
--
2.49.0
^ permalink raw reply related
* [PATCH v4 7/9] arm64: dts: amlogic: t7: khadas-vim4: Add SDIO power sequence and WiFi clock
From: Ronald Claveau @ 2026-03-25 9:15 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Ulf Hansson,
Johannes Berg, van Spriel
Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel,
linux-mmc, linux-wireless, Ronald Claveau
In-Reply-To: <20260325-add-emmc-t7-vim4-v4-0-44c7b4a5e459@aliel.fr>
Add the SDIO power sequence node using mmc-pwrseq-simple and a
32.768kHz PWM-based clock required by the Wi-Fi module.
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
---
.../dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
index 2450084d37642..770f06b0b16c7 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
+++ b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
@@ -67,6 +67,15 @@ sd_3v3: regulator-sdcard-3v3 {
regulator-always-on;
};
+ sdio_pwrseq: sdio-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
+ post-power-on-delay-ms = <500>;
+ power-off-delay-us = <200000>;
+ clocks = <&wifi32k>;
+ clock-names = "ext_clock";
+ };
+
vcc5v: regulator-vcc-5v {
compatible = "regulator-fixed";
regulator-name = "VCC5V";
@@ -135,6 +144,19 @@ vddio_c: regulator-gpio-c {
states = <1800000 1
3300000 0>;
};
+
+ wifi32k: wifi32k {
+ compatible = "pwm-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ pwms = <&pwm_ab 0 30518 0>;
+ };
+};
+
+&pwm_ab {
+ status = "okay";
+ pinctrl-0 = <&pwm_a_pins>;
+ pinctrl-names = "default";
};
&uart_a {
--
2.49.0
^ permalink raw reply related
* [PATCH v4 8/9] dt-bindings: net: wireless: brcm: Add compatible for bcm43752
From: Ronald Claveau @ 2026-03-25 9:15 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Ulf Hansson,
Johannes Berg, van Spriel
Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel,
linux-mmc, linux-wireless, Ronald Claveau
In-Reply-To: <20260325-add-emmc-t7-vim4-v4-0-44c7b4a5e459@aliel.fr>
Add bcm43752 compatible with its bcm4329 compatible fallback.
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
---
Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
index 3be7576787644..81fd3e37452a6 100644
--- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
@@ -42,6 +42,7 @@ properties:
- brcm,bcm4356-fmac
- brcm,bcm4359-fmac
- brcm,bcm4366-fmac
+ - brcm,bcm43752-fmac
- cypress,cyw4373-fmac
- cypress,cyw43012-fmac
- infineon,cyw43439-fmac
--
2.49.0
^ permalink raw reply related
* [PATCH v4 9/9] arm64: dts: amlogic: t7: khadas-vim4: Add MMC nodes
From: Ronald Claveau @ 2026-03-25 9:15 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Ulf Hansson,
Johannes Berg, van Spriel
Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel,
linux-mmc, linux-wireless, Ronald Claveau
In-Reply-To: <20260325-add-emmc-t7-vim4-v4-0-44c7b4a5e459@aliel.fr>
Enable and configure the three MMC controllers for the Khadas VIM4 board:
- sd_emmc_a: SDIO interface for the BCM43752 Wi-Fi module
- sd_emmc_b: SD card slot
- sd_emmc_c: eMMC storage
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
---
.../dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 90 +++++++++++++++++++++-
1 file changed, 89 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
index 770f06b0b16c7..5a73ae081036c 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
+++ b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
@@ -14,7 +14,10 @@ / {
compatible = "khadas,vim4", "amlogic,a311d2", "amlogic,t7";
aliases {
- serial0 = &uart_a;
+ serial0 = &uart_a;
+ mmc0 = &sd_emmc_c;
+ mmc1 = &sd_emmc_b;
+ mmc2 = &sd_emmc_a;
};
memory@0 {
@@ -159,6 +162,91 @@ &pwm_ab {
pinctrl-names = "default";
};
+/* SDIO */
+&sd_emmc_a {
+ status = "okay";
+ pinctrl-0 = <&sdio_pins>;
+ pinctrl-1 = <&sdio_clk_gate_pins>;
+ pinctrl-names = "default", "clk-gate";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ bus-width = <4>;
+ cap-sd-highspeed;
+ sd-uhs-sdr12;
+ sd-uhs-sdr25;
+ sd-uhs-sdr50;
+ sd-uhs-sdr104;
+ cap-sdio-irq;
+ max-frequency = <200000000>;
+ non-removable;
+ disable-wp;
+ no-mmc;
+ no-sd;
+
+ power-domains = <&pwrc PWRC_T7_SDIO_A_ID>;
+
+ keep-power-in-suspend;
+
+ mmc-pwrseq = <&sdio_pwrseq>;
+
+ vmmc-supply = <&vddao_3v3>;
+ vqmmc-supply = <&vddao_1v8>;
+
+ brcmf: wifi@1 {
+ reg = <1>;
+ compatible = "brcm,bcm43752-fmac", "brcm,bcm4329-fmac";
+ };
+};
+
+/* SD card */
+&sd_emmc_b {
+ status = "okay";
+ pinctrl-0 = <&sdcard_pins>;
+ pinctrl-1 = <&sdcard_clk_gate_pins>;
+ pinctrl-names = "default", "clk-gate";
+
+ bus-width = <4>;
+ cap-sd-highspeed;
+ sd-uhs-sdr12;
+ sd-uhs-sdr25;
+ sd-uhs-sdr50;
+ sd-uhs-sdr104;
+ max-frequency = <200000000>;
+ disable-wp;
+ no-sdio;
+ no-mmc;
+
+ power-domains = <&pwrc PWRC_T7_SDIO_B_ID>;
+
+ cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
+ vmmc-supply = <&sd_3v3>;
+ vqmmc-supply = <&vddio_c>;
+};
+
+/* eMMC */
+&sd_emmc_c {
+ status = "okay";
+ pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
+ pinctrl-1 = <&emmc_clk_gate_pins>;
+ pinctrl-names = "default", "clk-gate";
+
+ bus-width = <8>;
+ cap-mmc-highspeed;
+ mmc-ddr-1_8v;
+ mmc-hs200-1_8v;
+ max-frequency = <200000000>;
+ disable-wp;
+ non-removable;
+ no-sdio;
+ no-sd;
+
+ power-domains = <&pwrc PWRC_T7_EMMC_ID>;
+
+ vmmc-supply = <&vddio_3v3>;
+ vqmmc-supply = <&vddio_1v8>;
+};
+
&uart_a {
status = "okay";
clocks = <&xtal>, <&xtal>, <&xtal>;
--
2.49.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox