From f8376ffbc18c36c16a2df4d947342b11bbce3306 Mon Sep 17 00:00:00 2001 From: Josef Schlehofer Date: Tue, 28 Jun 2022 13:10:55 +0200 Subject: [PATCH 1/9] mac80211: mwl: add patch to raise global limit of SSID up to 4 SDIO chip 88W9997 from NXP [1] is quite limited by its firmware and driver. Add hacky patch to allow up to 4 SSID instead of 3 SSID. Signed-off-by: Josef Schlehofer --- ...crease-the-global-limit-up-to-4-SSID.patch | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 package/kernel/mac80211/patches/mwl/900-mwifiex-increase-the-global-limit-up-to-4-SSID.patch diff --git a/package/kernel/mac80211/patches/mwl/900-mwifiex-increase-the-global-limit-up-to-4-SSID.patch b/package/kernel/mac80211/patches/mwl/900-mwifiex-increase-the-global-limit-up-to-4-SSID.patch new file mode 100644 index 0000000000..0b9f552f95 --- /dev/null +++ b/package/kernel/mac80211/patches/mwl/900-mwifiex-increase-the-global-limit-up-to-4-SSID.patch @@ -0,0 +1,46 @@ +From ef8098cd6cb8b5989afef2e8461fe6ba9570a854 Mon Sep 17 00:00:00 2001 +From: Josef Schlehofer +Date: Wed, 24 Nov 2021 12:47:40 +0100 +Subject: [PATCH] mwifiex: increase the global limit up to 4 SSID + +Firmware for SDIO (88W8997), which is used in Turris MOX SDIO addon [1], +allows up to 4 SSID. Unfortunately, driver (even in mainline kernel) +has a global limit for all Marvell cards up to 3 SSID. + +Pali Rohár tested this patch and verified that the SDIO Wi-Fi addon works +with the 4 SSID. So, let's increase the global limit from 3 to 4. + +Ideally, this patch should be done differently before sending +it to Linux kernel. It means that limit definition should be moved to +the card-specific structure. + +[1] https://docs.turris.cz/hw/mox/addons/#wi-fi-sdio +--- + drivers/net/wireless/marvell/mwifiex/decl.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/wireless/marvell/mwifiex/decl.h b/drivers/net/wireless/marvell/mwifiex/decl.h +index cdc9972..f9bcbf5 100644 +--- a/drivers/net/wireless/marvell/mwifiex/decl.h ++++ b/drivers/net/wireless/marvell/mwifiex/decl.h +@@ -30,7 +30,7 @@ + #include + + #define MWIFIEX_BSS_COEX_COUNT 2 +-#define MWIFIEX_MAX_BSS_NUM (3) ++#define MWIFIEX_MAX_BSS_NUM (4) + + #define MWIFIEX_DMA_ALIGN_SZ 64 + #define MWIFIEX_RX_HEADROOM 64 +@@ -112,7 +112,7 @@ + #define MWIFIEX_RATE_INDEX_OFDM0 4 + + #define MWIFIEX_MAX_STA_NUM 3 +-#define MWIFIEX_MAX_UAP_NUM 3 ++#define MWIFIEX_MAX_UAP_NUM 4 + #define MWIFIEX_MAX_P2P_NUM 3 + + #define MWIFIEX_A_BAND_START_FREQ 5000 +-- +2.30.2 + From 7f1ac858e3e8ac2c57e631274cb7bf1c6ade8f71 Mon Sep 17 00:00:00 2001 From: Josef Schlehofer Date: Tue, 28 Jun 2022 13:42:26 +0200 Subject: [PATCH 2/9] mac80211: add patch for mwifiex to fix cryptic errors/warnings In Turris MOX SDIO card [1], which uses Marvell 88W997 and its driver mwifiex, you might get cryptic messages, which are not helpful to use. @pali created patch, which improves messages by the driver and he will send this to Linux kernel soon. Before: [ 81.026156] mwifiex_sdio mmc1:0001:1: CMD_RESP: cmd 0x20 error, result=0x1 After: [ 15.784018] mwifiex_sdio mmc1:0001:1: CMD_RESP: cmd RF_ANTENNA (0x20) error, result=0x1 Signed-off-by: Josef Schlehofer --- ...ringified-name-of-command-in-error-l.patch | 200 ++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 package/kernel/mac80211/patches/mwl/950-mwifiex-Print-stringified-name-of-command-in-error-l.patch diff --git a/package/kernel/mac80211/patches/mwl/950-mwifiex-Print-stringified-name-of-command-in-error-l.patch b/package/kernel/mac80211/patches/mwl/950-mwifiex-Print-stringified-name-of-command-in-error-l.patch new file mode 100644 index 0000000000..17e7df2722 --- /dev/null +++ b/package/kernel/mac80211/patches/mwl/950-mwifiex-Print-stringified-name-of-command-in-error-l.patch @@ -0,0 +1,200 @@ +From f7252b1b5755150535af226e806594bbefd45e0f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pali=20Roh=C3=A1r?= +Date: Sun, 26 Sep 2021 14:39:44 +0200 +Subject: [PATCH] mwifiex: Print stringified name of command in error log +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Failed hex command number in error log is hard to understand. +So add also more human readable stringified command name into error log. + +Signed-off-by: Pali Rohár +--- + drivers/net/wireless/marvell/mwifiex/cmdevt.c | 96 +++++++++++++++++-- + drivers/net/wireless/marvell/mwifiex/main.h | 2 + + .../wireless/marvell/mwifiex/sta_cmdresp.c | 5 +- + .../net/wireless/marvell/mwifiex/uap_cmd.c | 3 +- + 4 files changed, 95 insertions(+), 11 deletions(-) + +diff --git a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wireless/marvell/mwifiex/cmdevt.c +index 5a2788955f1c..1b05002330ff 100644 +--- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c ++++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c +@@ -28,6 +28,85 @@ + + static void mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter); + ++const char * ++mwifiex_cmd_to_str(u16 command) ++{ ++ switch (command) { ++ case HostCmd_CMD_GET_HW_SPEC: return "GET_HW_SPEC"; ++ case HostCmd_CMD_802_11_SCAN: return "SCAN"; ++ case HostCmd_CMD_802_11_GET_LOG: return "GET_LOG"; ++ case HostCmd_CMD_MAC_MULTICAST_ADR: return "MAC_MULTICAST_ADR"; ++ case HostCmd_CMD_802_11_EEPROM_ACCESS: return "EEPROM_ACCESS"; ++ case HostCmd_CMD_802_11_ASSOCIATE: return "ASSOCIATE"; ++ case HostCmd_CMD_802_11_SNMP_MIB: return "SNMP_MIB"; ++ case HostCmd_CMD_MAC_REG_ACCESS: return "MAC_REG_ACCESS"; ++ case HostCmd_CMD_BBP_REG_ACCESS: return "BBP_REG_ACCESS"; ++ case HostCmd_CMD_RF_REG_ACCESS: return "RF_REG_ACCESS"; ++ case HostCmd_CMD_PMIC_REG_ACCESS: return "PMIC_REG_ACCESS"; ++ case HostCmd_CMD_RF_TX_PWR: return "RF_TX_PWR"; ++ case HostCmd_CMD_RF_ANTENNA: return "RF_ANTENNA"; ++ case HostCmd_CMD_802_11_DEAUTHENTICATE: return "DEAUTHENTICATE"; ++ case HostCmd_CMD_MAC_CONTROL: return "MAC_CONTROL"; ++ case HostCmd_CMD_802_11_AD_HOC_START: return "AD_HOC_START"; ++ case HostCmd_CMD_802_11_AD_HOC_JOIN: return "AD_HOC_JOIN"; ++ case HostCmd_CMD_802_11_AD_HOC_STOP: return "AD_HOC_STOP"; ++ case HostCmd_CMD_802_11_MAC_ADDRESS: return "MAC_ADDRESS"; ++ case HostCmd_CMD_802_11D_DOMAIN_INFO: return "DOMAIN_INFO"; ++ case HostCmd_CMD_802_11_KEY_MATERIAL: return "KEY_MATERIAL"; ++ case HostCmd_CMD_802_11_BG_SCAN_CONFIG: return "BG_SCAN_CONFIG"; ++ case HostCmd_CMD_802_11_BG_SCAN_QUERY: return "BG_SCAN_QUERY"; ++ case HostCmd_CMD_WMM_GET_STATUS: return "WMM_GET_STATUS"; ++ case HostCmd_CMD_802_11_SUBSCRIBE_EVENT: return "SUBSCRIBE_EVENT"; ++ case HostCmd_CMD_802_11_TX_RATE_QUERY: return "TX_RATE_QUERY"; ++ case HostCmd_CMD_802_11_IBSS_COALESCING_STATUS: return "IBSS_COALESCING_STATUS"; ++ case HostCmd_CMD_MEM_ACCESS: return "MEM_ACCESS"; ++ case HostCmd_CMD_CFG_DATA: return "CFG_DATA"; ++ case HostCmd_CMD_VERSION_EXT: return "VERSION_EXT"; ++ case HostCmd_CMD_MEF_CFG: return "MEF_CFG"; ++ case HostCmd_CMD_RSSI_INFO: return "RSSI_INFO"; ++ case HostCmd_CMD_FUNC_INIT: return "FUNC_INIT"; ++ case HostCmd_CMD_FUNC_SHUTDOWN: return "FUNC_SHUTDOWN"; ++ case HOST_CMD_APCMD_SYS_RESET: return "SYS_RESET"; ++ case HostCmd_CMD_UAP_SYS_CONFIG: return "UAP_SYS_CONFIG"; ++ case HostCmd_CMD_UAP_BSS_START: return "UAP_BSS_START"; ++ case HostCmd_CMD_UAP_BSS_STOP: return "UAP_BSS_STOP"; ++ case HOST_CMD_APCMD_STA_LIST: return "STA_LIST"; ++ case HostCmd_CMD_UAP_STA_DEAUTH: return "UAP_STA_DEAUTH"; ++ case HostCmd_CMD_11N_CFG: return "11N_CFG"; ++ case HostCmd_CMD_11N_ADDBA_REQ: return "ADDBA_REQ"; ++ case HostCmd_CMD_11N_ADDBA_RSP: return "ADDBA_RSP"; ++ case HostCmd_CMD_11N_DELBA: return "DELBA"; ++ case HostCmd_CMD_RECONFIGURE_TX_BUFF: return "RECONFIGURE_TX_BUFF"; ++ case HostCmd_CMD_CHAN_REPORT_REQUEST: return "CHAN_REPORT_REQUEST"; ++ case HostCmd_CMD_AMSDU_AGGR_CTRL: return "AMSDU_AGGR_CTRL"; ++ case HostCmd_CMD_TXPWR_CFG: return "TXPWR_CFG"; ++ case HostCmd_CMD_TX_RATE_CFG: return "TX_RATE_CFG"; ++ case HostCmd_CMD_ROBUST_COEX: return "ROBUST_COEX"; ++ case HostCmd_CMD_802_11_PS_MODE_ENH: return "PS_MODE_ENH"; ++ case HostCmd_CMD_802_11_HS_CFG_ENH: return "HS_CFG_ENH"; ++ case HostCmd_CMD_P2P_MODE_CFG: return "P2P_MODE_CFG"; ++ case HostCmd_CMD_CAU_REG_ACCESS: return "CAU_REG_ACCESS"; ++ case HostCmd_CMD_SET_BSS_MODE: return "SET_BSS_MODE"; ++ case HostCmd_CMD_PCIE_DESC_DETAILS: return "PCIE_DESC_DETAILS"; ++ case HostCmd_CMD_802_11_SCAN_EXT: return "SCAN_EXT"; ++ case HostCmd_CMD_COALESCE_CFG: return "COALESCE_CFG"; ++ case HostCmd_CMD_MGMT_FRAME_REG: return "MGMT_FRAME_REG"; ++ case HostCmd_CMD_REMAIN_ON_CHAN: return "REMAIN_ON_CHAN"; ++ case HostCmd_CMD_GTK_REKEY_OFFLOAD_CFG: return "GTK_REKEY_OFFLOAD_CFG"; ++ case HostCmd_CMD_11AC_CFG: return "11AC_CFG"; ++ case HostCmd_CMD_HS_WAKEUP_REASON: return "HS_WAKEUP_REASON"; ++ case HostCmd_CMD_TDLS_CONFIG: return "TDLS_CONFIG"; ++ case HostCmd_CMD_MC_POLICY: return "MC_POLICY"; ++ case HostCmd_CMD_TDLS_OPER: return "TDLS_OPER"; ++ case HostCmd_CMD_FW_DUMP_EVENT: return "FW_DUMP_EVENT"; ++ case HostCmd_CMD_SDIO_SP_RX_AGGR_CFG: return "SDIO_SP_RX_AGGR_CFG"; ++ case HostCmd_CMD_STA_CONFIGURE: return "STA_CONFIGURE"; ++ case HostCmd_CMD_CHAN_REGION_CFG: return "CHAN_REGION_CFG"; ++ case HostCmd_CMD_PACKET_AGGR_CTRL: return "PACKET_AGGR_CTRL"; ++ default: return "UNKNOWN"; ++ } ++} ++ + /* + * This function initializes a command node. + * +@@ -205,8 +284,8 @@ static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv, + cmd_code != HostCmd_CMD_FUNC_SHUTDOWN && + cmd_code != HostCmd_CMD_FUNC_INIT) { + mwifiex_dbg(adapter, ERROR, +- "DNLD_CMD: FW in reset state, ignore cmd %#x\n", +- cmd_code); ++ "DNLD_CMD: FW in reset state, ignore cmd %s (%#x)\n", ++ mwifiex_cmd_to_str(cmd_code), cmd_code); + mwifiex_recycle_cmd_node(adapter, cmd_node); + queue_work(adapter->workqueue, &adapter->main_work); + return -1; +@@ -660,8 +739,8 @@ int mwifiex_send_cmd(struct mwifiex_private *priv, u16 cmd_no, + /* Return error, since the command preparation failed */ + if (ret) { + mwifiex_dbg(adapter, ERROR, +- "PREP_CMD: cmd %#x preparation failed\n", +- cmd_no); ++ "PREP_CMD: cmd %s (%#x) preparation failed\n", ++ mwifiex_cmd_to_str(cmd_no), cmd_no); + mwifiex_insert_cmd_to_free_q(adapter, cmd_node); + return -1; + } +@@ -900,8 +979,9 @@ int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter) + if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING) { + if (ret) { + mwifiex_dbg(adapter, ERROR, +- "%s: cmd %#x failed during\t" +- "initialization\n", __func__, cmdresp_no); ++ "%s: cmd %s (%#x) failed during\t" ++ "initialization\n", __func__, ++ mwifiex_cmd_to_str(cmdresp_no), cmdresp_no); + mwifiex_init_fw_complete(adapter); + //if (adapter->if_ops.card_reset) + // adapter->if_ops.card_reset(adapter); +@@ -1266,8 +1346,8 @@ mwifiex_process_sleep_confirm_resp(struct mwifiex_adapter *adapter, + + if (command != HostCmd_CMD_802_11_PS_MODE_ENH) { + mwifiex_dbg(adapter, ERROR, +- "%s: rcvd unexpected resp for cmd %#x, result = %x\n", +- __func__, command, result); ++ "%s: rcvd unexpected resp for cmd %s (%#x), result = %x\n", ++ __func__, mwifiex_cmd_to_str(command), command, result); + return; + } + +diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h +index 5923c5c14c8d..0d30f61a9d3c 100644 +--- a/drivers/net/wireless/marvell/mwifiex/main.h ++++ b/drivers/net/wireless/marvell/mwifiex/main.h +@@ -1106,6 +1106,8 @@ void mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter); + void mwifiex_cancel_pending_scan_cmd(struct mwifiex_adapter *adapter); + void mwifiex_cancel_scan(struct mwifiex_adapter *adapter); + ++const char *mwifiex_cmd_to_str(u16 command); ++ + void mwifiex_recycle_cmd_node(struct mwifiex_adapter *adapter, + struct cmd_ctrl_node *cmd_node); + +diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c +index 6b5d35d9e69f..ae6554f7b583 100644 +--- a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c ++++ b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c +@@ -48,8 +48,9 @@ mwifiex_process_cmdresp_error(struct mwifiex_private *priv, + struct host_cmd_ds_802_11_ps_mode_enh *pm; + + mwifiex_dbg(adapter, ERROR, +- "CMD_RESP: cmd %#x error, result=%#x\n", +- resp->command, resp->result); ++ "CMD_RESP: cmd %s (%#x) error, result=%#x\n", ++ mwifiex_cmd_to_str(le16_to_cpu(resp->command)), ++ le16_to_cpu(resp->command), le16_to_cpu(resp->result)); + + if (adapter->curr_cmd->wait_q_enabled) + adapter->cmd_wait_q.status = -1; +diff --git a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c +index 18e89777b784..29b8af55f522 100644 +--- a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c ++++ b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c +@@ -806,7 +806,8 @@ int mwifiex_uap_prepare_cmd(struct mwifiex_private *priv, u16 cmd_no, + break; + default: + mwifiex_dbg(priv->adapter, ERROR, +- "PREP_CMD: unknown cmd %#x\n", cmd_no); ++ "PREP_CMD: unknown cmd (%s) %#x\n", ++ mwifiex_cmd_to_str(cmd_no), cmd_no); + return -1; + } + +-- +2.20.1 + From c5882c33a78153e84acca22af3429ff6eb6c99e0 Mon Sep 17 00:00:00 2001 From: John Audia Date: Mon, 27 Jun 2022 16:40:48 -0400 Subject: [PATCH 3/9] kernel: bump 5.10 to 5.10.126 No patches rebased, just checksum update for this refresh. Build system: x86_64 Build-tested: ipq806x/R7800 Signed-off-by: John Audia --- include/kernel-5.10 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/kernel-5.10 b/include/kernel-5.10 index 545cae1cd0..da4b922966 100644 --- a/include/kernel-5.10 +++ b/include/kernel-5.10 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.10 = .125 -LINUX_KERNEL_HASH-5.10.125 = b9356ea02532c063f0b19a82e67c2afbd7c5460184fce7011222cf8667568f60 +LINUX_VERSION-5.10 = .126 +LINUX_KERNEL_HASH-5.10.126 = 91054369e893ffc5ddab5c9e2470f31631924eab1a8faff56a3d04bc7b2d4f63 From 433dc5892a60003753655aac6e6a4b59fb13b2e4 Mon Sep 17 00:00:00 2001 From: John Audia Date: Wed, 29 Jun 2022 04:22:49 -0400 Subject: [PATCH 4/9] kernel: bump 5.10 to 5.10.127 All patches automatically rebased. Signed-off-by: John Audia --- include/kernel-5.10 | 4 ++-- .../802-usb-xhci-force-msi-renesas-xhci.patch | 2 +- ...er-nftables-update-table-flags-from-the-commi.patch | 4 ++-- .../generic/hack-5.10/720-net-phy-add-aqr-phys.patch | 10 +++++----- ...722-net-phy-aquantia-enable-AQR112-and-AQR412.patch | 8 ++++---- ...-net-phy-aquantia-fix-system-side-protocol-mi.patch | 2 +- ...24-net-phy-aquantia-Add-AQR113-driver-support.patch | 4 ++-- ...-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch | 4 ++-- .../hack-5.10/780-usb-net-MeigLink_modem_support.patch | 2 +- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/include/kernel-5.10 b/include/kernel-5.10 index da4b922966..658767af33 100644 --- a/include/kernel-5.10 +++ b/include/kernel-5.10 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.10 = .126 -LINUX_KERNEL_HASH-5.10.126 = 91054369e893ffc5ddab5c9e2470f31631924eab1a8faff56a3d04bc7b2d4f63 +LINUX_VERSION-5.10 = .127 +LINUX_KERNEL_HASH-5.10.127 = 419233ee0b1ee1dc2be8abf1b241545d10dad19d95f237180d6ccdc0cd221580 diff --git a/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch index bdf484c4e4..e2b864df99 100644 --- a/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch @@ -13,7 +13,7 @@ produce a noisy warning. --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -283,6 +283,7 @@ static void xhci_pci_quirks(struct devic +@@ -287,6 +287,7 @@ static void xhci_pci_quirks(struct devic pdev->device == 0x0015) { xhci->quirks |= XHCI_RESET_ON_RESUME; xhci->quirks |= XHCI_ZERO_64B_REGS; diff --git a/target/linux/generic/backport-5.10/610-v5.13-10-netfilter-nftables-update-table-flags-from-the-commi.patch b/target/linux/generic/backport-5.10/610-v5.13-10-netfilter-nftables-update-table-flags-from-the-commi.patch index 9a42cb12d3..e32bcfa4a7 100644 --- a/target/linux/generic/backport-5.10/610-v5.13-10-netfilter-nftables-update-table-flags-from-the-commi.patch +++ b/target/linux/generic/backport-5.10/610-v5.13-10-netfilter-nftables-update-table-flags-from-the-commi.patch @@ -70,7 +70,7 @@ Signed-off-by: Pablo Neira Ayuso nft_trans_table_update(trans) = true; list_add_tail(&trans->list, &ctx->net->nft.commit_list); return 0; -@@ -7910,11 +7914,10 @@ static int nf_tables_commit(struct net * +@@ -7916,11 +7920,10 @@ static int nf_tables_commit(struct net * switch (trans->msg_type) { case NFT_MSG_NEWTABLE: if (nft_trans_table_update(trans)) { @@ -86,7 +86,7 @@ Signed-off-by: Pablo Neira Ayuso } else { nft_clear(net, trans->ctx.table); } -@@ -8127,11 +8130,9 @@ static int __nf_tables_abort(struct net +@@ -8133,11 +8136,9 @@ static int __nf_tables_abort(struct net switch (trans->msg_type) { case NFT_MSG_NEWTABLE: if (nft_trans_table_update(trans)) { diff --git a/target/linux/generic/hack-5.10/720-net-phy-add-aqr-phys.patch b/target/linux/generic/hack-5.10/720-net-phy-add-aqr-phys.patch index 4d4420aa2f..f7dd2f7187 100644 --- a/target/linux/generic/hack-5.10/720-net-phy-add-aqr-phys.patch +++ b/target/linux/generic/hack-5.10/720-net-phy-add-aqr-phys.patch @@ -20,7 +20,7 @@ Signed-off-by: Birger Koblitz #define MDIO_PHYXS_VEND_IF_STATUS 0xe812 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK GENMASK(7, 3) -@@ -330,6 +332,49 @@ static int aqr107_read_rate(struct phy_d +@@ -343,6 +345,49 @@ static int aqr107_read_rate(struct phy_d return 0; } @@ -70,7 +70,7 @@ Signed-off-by: Birger Koblitz static int aqr107_read_status(struct phy_device *phydev) { int val, ret; -@@ -460,7 +505,7 @@ static void aqr107_chip_info(struct phy_ +@@ -473,7 +518,7 @@ static void aqr107_chip_info(struct phy_ build_id = FIELD_GET(VEND1_GLOBAL_RSVD_STAT1_FW_BUILD_ID, val); prov_id = FIELD_GET(VEND1_GLOBAL_RSVD_STAT1_PROV_ID, val); @@ -79,7 +79,7 @@ Signed-off-by: Birger Koblitz fw_major, fw_minor, build_id, prov_id); } -@@ -632,6 +677,24 @@ static struct phy_driver aqr_driver[] = +@@ -645,6 +690,24 @@ static struct phy_driver aqr_driver[] = .link_change_notify = aqr107_link_change_notify, }, { @@ -104,7 +104,7 @@ Signed-off-by: Birger Koblitz PHY_ID_MATCH_MODEL(PHY_ID_AQCS109), .name = "Aquantia AQCS109", .probe = aqr107_probe, -@@ -657,6 +720,24 @@ static struct phy_driver aqr_driver[] = +@@ -670,6 +733,24 @@ static struct phy_driver aqr_driver[] = .ack_interrupt = aqr_ack_interrupt, .read_status = aqr_read_status, }, @@ -129,7 +129,7 @@ Signed-off-by: Birger Koblitz }; module_phy_driver(aqr_driver); -@@ -667,8 +748,10 @@ static struct mdio_device_id __maybe_unu +@@ -680,8 +761,10 @@ static struct mdio_device_id __maybe_unu { PHY_ID_MATCH_MODEL(PHY_ID_AQR105) }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR106) }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR107) }, diff --git a/target/linux/generic/hack-5.10/722-net-phy-aquantia-enable-AQR112-and-AQR412.patch b/target/linux/generic/hack-5.10/722-net-phy-aquantia-enable-AQR112-and-AQR412.patch index e3541400d7..ae85a21f97 100644 --- a/target/linux/generic/hack-5.10/722-net-phy-aquantia-enable-AQR112-and-AQR412.patch +++ b/target/linux/generic/hack-5.10/722-net-phy-aquantia-enable-AQR112-and-AQR412.patch @@ -27,7 +27,7 @@ Signed-off-by: Alex Marginean #define PHY_ID_AQR813 0x31c31cb2 #define MDIO_PHYXS_VEND_IF_STATUS 0xe812 -@@ -123,6 +125,29 @@ +@@ -125,6 +127,29 @@ #define VEND1_GLOBAL_INT_VEND_MASK_GLOBAL2 BIT(1) #define VEND1_GLOBAL_INT_VEND_MASK_GLOBAL3 BIT(0) @@ -57,7 +57,7 @@ Signed-off-by: Alex Marginean struct aqr107_hw_stat { const char *name; int reg; -@@ -243,6 +268,51 @@ static int aqr_config_aneg(struct phy_de +@@ -256,6 +281,51 @@ static int aqr_config_aneg(struct phy_de return genphy_c45_check_and_restart_aneg(phydev, changed); } @@ -109,7 +109,7 @@ Signed-off-by: Alex Marginean static int aqr_config_intr(struct phy_device *phydev) { bool en = phydev->interrupts == PHY_INTERRUPT_ENABLED; -@@ -738,6 +808,30 @@ static struct phy_driver aqr_driver[] = +@@ -751,6 +821,30 @@ static struct phy_driver aqr_driver[] = .get_stats = aqr107_get_stats, .link_change_notify = aqr107_link_change_notify, }, @@ -140,7 +140,7 @@ Signed-off-by: Alex Marginean }; module_phy_driver(aqr_driver); -@@ -748,9 +842,11 @@ static struct mdio_device_id __maybe_unu +@@ -761,9 +855,11 @@ static struct mdio_device_id __maybe_unu { PHY_ID_MATCH_MODEL(PHY_ID_AQR105) }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR106) }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR107) }, diff --git a/target/linux/generic/hack-5.10/723-net-phy-aquantia-fix-system-side-protocol-mi.patch b/target/linux/generic/hack-5.10/723-net-phy-aquantia-fix-system-side-protocol-mi.patch index 9c5df905bb..5ce07c9aa4 100644 --- a/target/linux/generic/hack-5.10/723-net-phy-aquantia-fix-system-side-protocol-mi.patch +++ b/target/linux/generic/hack-5.10/723-net-phy-aquantia-fix-system-side-protocol-mi.patch @@ -14,7 +14,7 @@ Signed-off-by: Alex Marginean --- a/drivers/net/phy/aquantia_main.c +++ b/drivers/net/phy/aquantia_main.c -@@ -301,10 +301,16 @@ static int aqr_config_aneg_set_prot(stru +@@ -314,10 +314,16 @@ static int aqr_config_aneg_set_prot(stru phy_write_mmd(phydev, MDIO_MMD_VEND1, AQUANTIA_VND1_GSTART_RATE, aquantia_syscfg[if_type].start_rate); diff --git a/target/linux/generic/hack-5.10/724-net-phy-aquantia-Add-AQR113-driver-support.patch b/target/linux/generic/hack-5.10/724-net-phy-aquantia-Add-AQR113-driver-support.patch index 7a661309f9..5d7213957e 100644 --- a/target/linux/generic/hack-5.10/724-net-phy-aquantia-Add-AQR113-driver-support.patch +++ b/target/linux/generic/hack-5.10/724-net-phy-aquantia-Add-AQR113-driver-support.patch @@ -18,7 +18,7 @@ Add a new entry for AQR113 PHY_ID #define PHY_ID_AQR113C 0x31c31c12 #define PHY_ID_AQCS109 0x03a1b5c2 #define PHY_ID_AQR405 0x03a1b4b0 -@@ -827,6 +828,14 @@ static struct phy_driver aqr_driver[] = +@@ -840,6 +841,14 @@ static struct phy_driver aqr_driver[] = .get_stats = aqr107_get_stats, }, { @@ -33,7 +33,7 @@ Add a new entry for AQR113 PHY_ID PHY_ID_MATCH_MODEL(PHY_ID_AQR412), .name = "Aquantia AQR412", .probe = aqr107_probe, -@@ -849,6 +858,7 @@ static struct mdio_device_id __maybe_unu +@@ -862,6 +871,7 @@ static struct mdio_device_id __maybe_unu { PHY_ID_MATCH_MODEL(PHY_ID_AQR106) }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR107) }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR112) }, diff --git a/target/linux/generic/hack-5.10/725-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch b/target/linux/generic/hack-5.10/725-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch index 40ad0ff583..a307a8f399 100644 --- a/target/linux/generic/hack-5.10/725-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch +++ b/target/linux/generic/hack-5.10/725-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch @@ -21,7 +21,7 @@ Signed-off-by: Daniel Golle #define PHY_ID_AQR113 0x31c31c40 #define PHY_ID_AQR113C 0x31c31c12 #define PHY_ID_AQCS109 0x03a1b5c2 -@@ -828,6 +830,30 @@ static struct phy_driver aqr_driver[] = +@@ -841,6 +843,30 @@ static struct phy_driver aqr_driver[] = .get_stats = aqr107_get_stats, }, { @@ -52,7 +52,7 @@ Signed-off-by: Daniel Golle PHY_ID_MATCH_MODEL(PHY_ID_AQR113), .name = "Aquantia AQR113", .config_aneg = aqr_config_aneg, -@@ -858,6 +884,8 @@ static struct mdio_device_id __maybe_unu +@@ -871,6 +897,8 @@ static struct mdio_device_id __maybe_unu { PHY_ID_MATCH_MODEL(PHY_ID_AQR106) }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR107) }, { PHY_ID_MATCH_MODEL(PHY_ID_AQR112) }, diff --git a/target/linux/generic/hack-5.10/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-5.10/780-usb-net-MeigLink_modem_support.patch index bdbab68ee1..344ba809a9 100644 --- a/target/linux/generic/hack-5.10/780-usb-net-MeigLink_modem_support.patch +++ b/target/linux/generic/hack-5.10/780-usb-net-MeigLink_modem_support.patch @@ -19,7 +19,7 @@ #define QUECTEL_VENDOR_ID 0x2c7c /* These Quectel products use Quectel's vendor ID */ -@@ -1131,6 +1133,11 @@ static const struct usb_device_id option +@@ -1133,6 +1135,11 @@ static const struct usb_device_id option { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG95, 0xff, 0, 0) }, { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), .driver_info = RSVD(4) }, From e1dcaeb55c939365cdd27e469b63fca295bf1a2e Mon Sep 17 00:00:00 2001 From: Tamas Balogh Date: Tue, 28 Jun 2022 12:31:59 +0200 Subject: [PATCH 5/9] ath79: add support for ASUS PL-AC56 Asus PL-AC56 Powerline Range Extender Rev.A1 (in kit with Asus PL-E56P Powerline-slave) Hardware specifications: Board: AP152 SoC: QCA9563 2.4G n 3x3 PLC: QCA7500 WiFi: QCA9882 5G ac 2x2 Switch: QCA8337 3x1000M Flash: 16MB 25L12835F SPI-NOR DRAM SoC: 64MB w9751g6kb-25 DRAM PLC: 128MB w631gg6kb-15 Clocks: CPU:775.000MHz, DDR:650.000MHz, AHB:258.333MHz, Ref:25.000MHz MAC addresses as verified by OEM firmware: use address source Lan/Wan/PLC *:10 art 0x1002 (label) 2G *:10 art 0x1000 5G *:14 art 0x5000 Important notes: the PLC firmware has to be provided and copied manually onto the device! The PLC here has no dedicated flash, thus the firmware file has to be uploaded to the PLC controller at every system start the PLC functionality is managed by the script /etc/init.d/plc_basic, a very basic script based on the the one from Netadair (netadair dot de) Installation: Asus windows recovery tool: have to have the latest Asus firmware flashed before continuing! install the Asus firmware restoration utility unplug the router, hold the reset button while powering it on release when the power LED flashes slowly specify a static IP on your computer: IP address: 192.168.1.75 Subnet mask 255.255.255.0 start the Asus firmware restoration utility, specify the factory image and press upload do NOT power off the device after OpenWrt has booted until the LED flashing TFTP Recovery method: have to have the latest Asus firmware flashed before continuing! set computer to a static ip, 192.168.1.75 connect computer to the LAN 1 port of the router hold the reset button while powering on the router for a few seconds send firmware image using a tftp client; i.e from linux: $ tftp tftp> binary tftp> connect 192.168.1.1 tftp> put factory.bin tftp> quit do NOT power off the device after OpenWrt has booted until the LED flashing Additional notes: the pairing buttons have to have pressed for at least half a second, it doesn't matter on which plc device (master or slave) first it is possible to pair the devices without the button-pairing requirement simply by pressing reset on the slave device. This will default to the firmware settings, which is also how the plc_basic script is setting up the master device, i.e. configuring it to firmware defaults the PL-E56P slave PLC has its dedicated 4MByte SPI, thus it is capable to store all firmware currently available. Note that some other slave devices are not guarantied to have the capacity for the newer ~1MByte firmware blobs! To have a good overlook about the slave device, here are its specs: same QCA7500 PLC controller, same w631gg6kb-15 128MB RAM, 25L3233F 4MB SPI-NOR and an AR8035-A 1000M-Transceiver Signed-off-by: Tamas Balogh --- .../linux/ath79/dts/qca9563_asus_pl-ac56.dts | 156 ++++++++++++++++++ .../generic/base-files/etc/board.d/01_leds | 5 + .../generic/base-files/etc/board.d/02_network | 5 + .../base-files/etc/board.d/03_gpio_switches | 3 + .../etc/hotplug.d/firmware/10-ath9k-eeprom | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 1 + target/linux/ath79/image/generic.mk | 13 ++ 7 files changed, 184 insertions(+) create mode 100644 target/linux/ath79/dts/qca9563_asus_pl-ac56.dts diff --git a/target/linux/ath79/dts/qca9563_asus_pl-ac56.dts b/target/linux/ath79/dts/qca9563_asus_pl-ac56.dts new file mode 100644 index 0000000000..c597b566aa --- /dev/null +++ b/target/linux/ath79/dts/qca9563_asus_pl-ac56.dts @@ -0,0 +1,156 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca956x.dtsi" + +#include +#include + +/ { + model = "ASUS PL-AC56"; + compatible = "asus,pl-ac56", "qca,qca9563"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-upgrade = &led_power; + label-mac-device = ð0; + }; + + keys { + compatible = "gpio-keys"; + + reset { + linux,code = ; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + wps { + linux,code = ; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "red:power"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + lan { + label = "green:lan"; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + }; + + wlan2g { + label = "green:wlan2g"; + gpios = <&gpio 19 GPIO_ACTIVE_LOW>; + }; + + wlan5g { + label = "green:wlan5g"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x40000>; + read-only; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x040000 0x10000>; + read-only; + }; + + art: partition@50000 { + label = "art"; + reg = <0x050000 0x10000>; + read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_1002: macaddr@1002 { + reg = <0x1002 0x6>; + }; + }; + + partition@60000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x060000 0xf20000>; + }; + + partition@f80000 { + label = "plc"; + reg = <0xf80000 0x80000>; + read-only; + }; + }; + }; +}; + +&mdio0 { + status = "okay"; + + phy-mask = <0>; + + phy0: ethernet-phy@0 { + reg = <0>; + phy-mode = "sgmii"; + qca,mib-poll-interval = <500>; + + qca,ar8327-initvals = < + 0x04 0x80000080 /* AR8327_REG_PAD0_MODE */ + 0x08 0x01000000 /* AR8327_REG_PAD5_MODE */ + 0x0c 0x07500000 /* AR8327_REG_PAD6_MODE */ + 0x10 0x602613a0 /* AR8327_REG_POWER_ON_STRAP */ + 0x50 0xcc35cc35 /* AR8327_REG_LED_CTRL0 */ + 0x54 0xca35ca35 /* AR8327_REG_LED_CTRL1 */ + 0x58 0xc935c935 /* AR8327_REG_LED_CTRL2 */ + 0x5c 0x03ffff00 /* AR8327_REG_LED_CTRL3 */ + 0x7c 0x0000007e /* AR8327_REG_PORT_STATUS(0) */ + 0x94 0x0000007e /* AR8327_REG_PORT_STATUS(6) */ + >; + }; +}; + +ð0 { + status = "okay"; + + phy-mode = "sgmii"; + nvmem-cells = <&macaddr_art_1002>; + nvmem-cell-names = "mac-address"; + phy-handle = <&phy0>; +}; + +&wmac { + status = "okay"; + + qca,no-eeprom; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index 93438b1498..0802b8345f 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -56,6 +56,11 @@ alfa-network,tube-2hq) ucidef_set_led_rssi "signal3" "SIGNAL3" "green:signal3" "wlan0" "50" "100" ucidef_set_led_rssi "signal4" "SIGNAL4" "green:signal4" "wlan0" "75" "100" ;; +asus,pl-ac56) + ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x3e" + ucidef_set_led_netdev "wlan2g" "WLAN2G" "green:wlan2g" "wlan1" "link" + ucidef_set_led_netdev "wlan5g" "WLAN5G" "green:wlan5g" "wlan0" "link" + ;; asus,rp-ac66) ucidef_set_rssimon "wlan0" "200000" "1" ucidef_set_rssimon "wlan1" "200000" "1" diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 7ba39c4c49..8405c5f521 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -127,6 +127,11 @@ ath79_setup_interfaces() ubnt,unifi-ap-outdoor-plus) ucidef_set_interface_lan "eth0 eth1" ;; + asus,pl-ac56) + # port 6 (internal) is the power-line port + ucidef_add_switch "switch0" \ + "0@eth0" "1:lan:1" "2:lan:2" "3:lan:3" "6:lan:4" + ;; atheros,db120) ucidef_add_switch "switch0" \ "0@eth0" "2:lan" "3:lan" "4:lan" "5:lan" "1:wan" diff --git a/target/linux/ath79/generic/base-files/etc/board.d/03_gpio_switches b/target/linux/ath79/generic/base-files/etc/board.d/03_gpio_switches index ca7d8c633c..899a8ba97e 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/03_gpio_switches +++ b/target/linux/ath79/generic/base-files/etc/board.d/03_gpio_switches @@ -24,6 +24,9 @@ adtran,bsap1840) ucidef_add_gpio_switch "wifi0_ext_c" "2.4GHz External Antenna C" "509" "1" ucidef_add_gpio_switch "wifi0_int_c" "2.4GHz Internal Antenna C" "510" ;; +asus,pl-ac56) + ucidef_add_gpio_switch "plc_enable" "PLC enable" "14" "1" + ;; comfast,cf-e5|\ telco,t1) ucidef_add_gpio_switch "lte_power" "LTE Power" "14" "1" diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 8631984ee8..3e4d9a556b 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -12,6 +12,7 @@ case "$FIRMWARE" in 8dev,lima) caldata_extract "art" 0x1000 0x800 ;; + asus,pl-ac56|\ asus,rp-ac66) caldata_extract "art" 0x1000 0x440 ;; diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 5c42ae4fac..f522268e59 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -19,6 +19,7 @@ case "$FIRMWARE" in caldata_extract "art" 0x5000 0x844 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) 2) ;; + asus,pl-ac56|\ asus,rp-ac66|\ comfast,cf-wr650ac-v1|\ comfast,cf-wr650ac-v2|\ diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 24e828956c..6fc844b4b2 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -376,6 +376,19 @@ define Device/aruba_ap-105 endef TARGET_DEVICES += aruba_ap-105 +define Device/asus_pl-ac56 + SOC := qca9563 + DEVICE_VENDOR := ASUS + DEVICE_MODEL := PL-AC56 + DEVICE_VARIANT := A1 + IMAGE_SIZE := 15488k + IMAGES += factory.bin + IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \ + append-rootfs | pad-rootfs + DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct +endef +TARGET_DEVICES += asus_pl-ac56 + define Device/asus_rp-ac66 SOC := qca9563 DEVICE_VENDOR := ASUS From 416d4483e878fe316ba490c3948850c0aee0b828 Mon Sep 17 00:00:00 2001 From: Tamas Balogh Date: Tue, 28 Jun 2022 12:35:05 +0200 Subject: [PATCH 6/9] ath79: add support for ASUS RP-AC51 Asus RP-AC51 Repeater Category: AC750 300+433 (OEM w. unstable driver) AC1200 300+866 (OpenWrt w. stable driver) Hardware specifications: Board: AP147 SoC: QCA9531 2.4G b/g/n WiFi: QCA9886 5G n/ac DRAM: 128MB DDR2 Flash: gd25q128 16MB SPI-NOR LAN/WAN: AR8229 1x100M Clocks: CPU:650MHz, DDR:600MHz, AHB:200MHz MAC addresses as verified by OEM firmware: use address source Lan/W2G *:C8 art 0x1002 (label) 5G *:CC art 0x5006 Installation: Asus windows recovery tool: install the Asus firmware restoration utility unplug the router, hold the reset button while powering it on release when the power LED flashes slowly specify a static IP on your computer: IP address: 192.168.1.75 Subnet mask 255.255.255.0 Start the Asus firmware restoration utility, specify the factory image and press upload Do not power off the device after OpenWrt has booted until the LED flashing. TFTP Recovery method: set computer to a static ip, 192.168.1.10 connect computer to the LAN 1 port of the router hold the reset button while powering on the router for a few seconds send firmware image using a tftp client; i.e from linux: $ tftp tftp> binary tftp> connect 192.168.1.1 tftp> put factory.bin tftp> quit Signed-off-by: Tamas Balogh --- .../linux/ath79/dts/qca9531_asus_rp-ac51.dts | 140 ++++++++++++++++++ .../generic/base-files/etc/board.d/01_leds | 5 + .../generic/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/10-ath9k-eeprom | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 13 +- target/linux/ath79/image/generic.mk | 11 ++ 6 files changed, 165 insertions(+), 6 deletions(-) create mode 100644 target/linux/ath79/dts/qca9531_asus_rp-ac51.dts diff --git a/target/linux/ath79/dts/qca9531_asus_rp-ac51.dts b/target/linux/ath79/dts/qca9531_asus_rp-ac51.dts new file mode 100644 index 0000000000..ec8b825ef2 --- /dev/null +++ b/target/linux/ath79/dts/qca9531_asus_rp-ac51.dts @@ -0,0 +1,140 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca953x.dtsi" + +#include +#include + +/ { + model = "ASUS RP-AC51"; + compatible = "asus,rp-ac51", "qca,qca9531"; + + aliases { + led-boot = &led_wps; + led-failsafe = &led_wps; + led-running = &led_wps; + led-upgrade = &led_wps; + label-mac-device = ð0; + }; + + keys { + compatible = "gpio-keys"; + + wps { + linux,code = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + reset { + linux,code = ; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "blue:power"; + gpios = <&gpio 4 GPIO_ACTIVE_HIGH>; + }; + + led_wps: wps { + label = "red:wps"; + gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; + }; + + lan { + label = "blue:lan"; + gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + }; + + wlan2g { + label = "blue:wlan2g"; + gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; + }; + + wlan5g { + label = "blue:wlan5g"; + gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&pcie0 { + status = "okay"; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x40000>; + read-only; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x040000 0x10000>; + read-only; + }; + + art: partition@50000 { + label = "art"; + reg = <0x050000 0x10000>; + read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_1002: macaddr@1002 { + reg = <0x1002 0x6>; + }; + }; + + partition@60000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x060000 0xfa0000>; + }; + }; + }; +}; + +ð0 { + status = "okay"; + + phy-handle = <&swphy4>; + + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; +}; + +ð1 { + nvmem-cells = <&macaddr_art_1002>; + nvmem-cell-names = "mac-address"; +}; + +&wmac { + status = "okay"; + + qca,no-eeprom; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index 0802b8345f..b3a8b2fbb6 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -61,6 +61,11 @@ asus,pl-ac56) ucidef_set_led_netdev "wlan2g" "WLAN2G" "green:wlan2g" "wlan1" "link" ucidef_set_led_netdev "wlan5g" "WLAN5G" "green:wlan5g" "wlan0" "link" ;; +asus,rp-ac51) + ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0" + ucidef_set_led_netdev "wlan2g" "WLAN2G" "blue:wlan2G" "wlan1" "link" + ucidef_set_led_netdev "wlan5g" "WLAN5G" "blue:wlan5G" "wlan0" "link" + ;; asus,rp-ac66) ucidef_set_rssimon "wlan0" "200000" "1" ucidef_set_rssimon "wlan1" "200000" "1" diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 8405c5f521..84221da80d 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -19,6 +19,7 @@ ath79_setup_interfaces() araknis,an-700-ap-i-ac|\ arduino,yun|\ aruba,ap-105|\ + asus,rp-ac51|\ asus,rp-ac66|\ avm,fritz1750e|\ avm,fritz300e|\ diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 3e4d9a556b..95439b9b27 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -13,6 +13,7 @@ case "$FIRMWARE" in caldata_extract "art" 0x1000 0x800 ;; asus,pl-ac56|\ + asus,rp-ac51|\ asus,rp-ac66) caldata_extract "art" 0x1000 0x440 ;; diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index f522268e59..56e42f1e31 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -175,6 +175,13 @@ case "$FIRMWARE" in ;; "ath10k/pre-cal-pci-0000:00:00.0.bin") case $board in + asus,rp-ac51|\ + yuncore,a782|\ + yuncore,xd4200) + caldata_extract "art" 0x5000 0x2f20 + ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ + /lib/firmware/ath10k/QCA9888/hw2.0/board.bin + ;; comfast,cf-e313ac) caldata_extract "art" 0x5000 0x2f20 ath10k_patch_mac $(mtd_get_mac_binary art 0x6) @@ -250,12 +257,6 @@ case "$FIRMWARE" in ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ /lib/firmware/ath10k/QCA9888/hw2.0/board.bin ;; - yuncore,a782|\ - yuncore,xd4200) - caldata_extract "art" 0x5000 0x2f20 - ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ - /lib/firmware/ath10k/QCA9888/hw2.0/board.bin - ;; esac ;; *) diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 6fc844b4b2..8d059f3679 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -389,6 +389,17 @@ define Device/asus_pl-ac56 endef TARGET_DEVICES += asus_pl-ac56 +define Device/asus_rp-ac51 + SOC := qca9531 + DEVICE_VENDOR := ASUS + DEVICE_MODEL := RP-AC51 + IMAGE_SIZE := 16000k + IMAGES += factory.bin + DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct \ + -swconfig +endef +TARGET_DEVICES += asus_rp-ac51 + define Device/asus_rp-ac66 SOC := qca9563 DEVICE_VENDOR := ASUS From a5526efde0c4a5c0a94fc2e7f6bcecd844148408 Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Wed, 18 May 2022 21:40:51 +0300 Subject: [PATCH 7/9] mac80211: read alternative brcm fw names from DT This patch is required for the Raspberry Pi Zero 2 W. Signed-off-by: Stijn Tintel --- ...d-alternative-firmware-names-from-DT.patch | 205 ++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 package/kernel/mac80211/patches/brcm/865-brcmfmac-Read-alternative-firmware-names-from-DT.patch diff --git a/package/kernel/mac80211/patches/brcm/865-brcmfmac-Read-alternative-firmware-names-from-DT.patch b/package/kernel/mac80211/patches/brcm/865-brcmfmac-Read-alternative-firmware-names-from-DT.patch new file mode 100644 index 0000000000..6d9cfe7b14 --- /dev/null +++ b/package/kernel/mac80211/patches/brcm/865-brcmfmac-Read-alternative-firmware-names-from-DT.patch @@ -0,0 +1,205 @@ +From 4e32024cbb14230af3048e249e84f8c2b25ce45a Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 28 Oct 2021 15:03:16 +0100 +Subject: [PATCH] brcmfmac: Read alternative firmware names from DT + +Add the ability to load the names of alternative firmwares from the +Device Tree node. This permits separate firmwares for 43436s and 43438 +and allows downstream firmwares to coexist with upstream. + +Signed-off-by: Phil Elwell +--- + .../wireless/broadcom/brcm80211/brcmfmac/of.c | 36 ++++++++++++++ + .../wireless/broadcom/brcm80211/brcmfmac/of.h | 7 +++ + .../broadcom/brcm80211/brcmfmac/sdio.c | 47 +++++++++++++++++-- + 3 files changed, 87 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c +index 2f7bc3a70c65..c2d6b8a22858 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c +@@ -10,6 +10,7 @@ + #include "debug.h" + #include "core.h" + #include "common.h" ++#include "firmware.h" + #include "of.h" + + static int brcmf_of_get_country_codes(struct device *dev, +@@ -118,3 +119,38 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, + sdio->oob_irq_nr = irq; + sdio->oob_irq_flags = irqf; + } ++ ++struct brcmf_firmware_mapping * ++brcmf_of_fwnames(struct device *dev, u32 *fwname_count) ++{ ++ struct device_node *np = dev->of_node; ++ struct brcmf_firmware_mapping *fwnames; ++ struct device_node *map_np, *fw_np; ++ int of_count; ++ int count = 0; ++ ++ map_np = of_get_child_by_name(np, "firmwares"); ++ of_count = of_get_child_count(map_np); ++ if (!of_count) ++ return NULL; ++ ++ fwnames = devm_kcalloc(dev, of_count, ++ sizeof(struct brcmf_firmware_mapping), ++ GFP_KERNEL); ++ ++ for_each_child_of_node(map_np, fw_np) ++ { ++ struct brcmf_firmware_mapping *cur = &fwnames[count]; ++ ++ if (of_property_read_u32(fw_np, "chipid", &cur->chipid) || ++ of_property_read_u32(fw_np, "revmask", &cur->revmask)) ++ continue; ++ cur->fw_base = of_get_property(fw_np, "fw_base", NULL); ++ if (cur->fw_base) ++ count++; ++ } ++ ++ *fwname_count = count; ++ ++ return count ? fwnames : NULL; ++} +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h +index 10bf52253337..5b39a39812d0 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h +@@ -5,9 +5,16 @@ + #ifdef CONFIG_OF + void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, + struct brcmf_mp_device *settings); ++struct brcmf_firmware_mapping * ++brcmf_of_fwnames(struct device *dev, u32 *map_count); + #else + static void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, + struct brcmf_mp_device *settings) + { + } ++static struct brcmf_firmware_mapping * ++brcmf_of_fwnames(struct device *dev, u32 *map_count) ++{ ++ return NULL; ++} + #endif /* CONFIG_OF */ +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +index 89de65d32ed5..88c08fee58f6 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +@@ -35,6 +35,7 @@ + #include "core.h" + #include "common.h" + #include "bcdc.h" ++#include "of.h" + + #define DCMD_RESP_TIMEOUT msecs_to_jiffies(2500) + #define CTL_DONE_TIMEOUT msecs_to_jiffies(2500) +@@ -634,7 +635,7 @@ MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-sdio.*.txt"); + /* per-board firmware binaries */ + MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-sdio.*.bin"); + +-static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = { ++static const struct brcmf_firmware_mapping sdio_fwnames[] = { + BRCMF_FW_ENTRY(BRCM_CC_43143_CHIP_ID, 0xFFFFFFFF, 43143), + BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0x0000001F, 43241B0), + BRCMF_FW_ENTRY(BRCM_CC_43241_CHIP_ID, 0x00000020, 43241B4), +@@ -660,6 +661,9 @@ static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = { + BRCMF_FW_ENTRY(CY_CC_43752_CHIP_ID, 0xFFFFFFFF, 43752) + }; + ++static const struct brcmf_firmware_mapping *brcmf_sdio_fwnames = sdio_fwnames; ++static u32 brcmf_sdio_fwnames_count = ARRAY_SIZE(sdio_fwnames); ++ + #define TXCTL_CREDITS 2 + + static void pkt_align(struct sk_buff *p, int len, int align) +@@ -4151,7 +4155,7 @@ int brcmf_sdio_get_fwname(struct device *dev, const char *ext, u8 *fw_name, + } + fwreq = brcmf_fw_alloc_request(bus_if->chip, bus_if->chiprev, + brcmf_sdio_fwnames, +- ARRAY_SIZE(brcmf_sdio_fwnames), ++ brcmf_sdio_fwnames_count, + fwnames, ARRAY_SIZE(fwnames)); + if (!fwreq) + return -ENOMEM; +@@ -4207,6 +4211,9 @@ static const struct brcmf_bus_ops brcmf_sdio_bus_ops = { + #define BRCMF_SDIO_FW_CODE 0 + #define BRCMF_SDIO_FW_NVRAM 1 + ++static struct brcmf_fw_request * ++brcmf_sdio_prepare_fw_request(struct brcmf_sdio *bus); ++ + static void brcmf_sdio_firmware_callback(struct device *dev, int err, + struct brcmf_fw_request *fwreq) + { +@@ -4222,6 +4229,22 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, + + brcmf_dbg(TRACE, "Enter: dev=%s, err=%d\n", dev_name(dev), err); + ++ if (err && brcmf_sdio_fwnames != sdio_fwnames) { ++ /* Try again with the standard firmware names */ ++ brcmf_sdio_fwnames = sdio_fwnames; ++ brcmf_sdio_fwnames_count = ARRAY_SIZE(sdio_fwnames); ++ kfree(fwreq); ++ fwreq = brcmf_sdio_prepare_fw_request(bus); ++ if (!fwreq) { ++ err = -ENOMEM; ++ goto fail; ++ } ++ err = brcmf_fw_get_firmwares(dev, fwreq, ++ brcmf_sdio_firmware_callback); ++ if (!err) ++ return; ++ } ++ + if (err) + goto fail; + +@@ -4430,7 +4453,7 @@ brcmf_sdio_prepare_fw_request(struct brcmf_sdio *bus) + + fwreq = brcmf_fw_alloc_request(bus->ci->chip, bus->ci->chiprev, + brcmf_sdio_fwnames, +- ARRAY_SIZE(brcmf_sdio_fwnames), ++ brcmf_sdio_fwnames_count, + fwnames, ARRAY_SIZE(fwnames)); + if (!fwreq) + return NULL; +@@ -4448,6 +4471,9 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) + struct brcmf_sdio *bus; + struct workqueue_struct *wq; + struct brcmf_fw_request *fwreq; ++ struct brcmf_firmware_mapping *of_fwnames, *fwnames = NULL; ++ const int fwname_size = sizeof(struct brcmf_firmware_mapping); ++ u32 of_fw_count; + + brcmf_dbg(TRACE, "Enter\n"); + +@@ -4530,6 +4556,21 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) + + brcmf_dbg(INFO, "completed!!\n"); + ++ of_fwnames = brcmf_of_fwnames(sdiodev->dev, &of_fw_count); ++ if (of_fwnames) ++ fwnames = devm_kcalloc(sdiodev->dev, ++ of_fw_count + brcmf_sdio_fwnames_count, ++ fwname_size, GFP_KERNEL); ++ ++ if (fwnames) { ++ /* The array is scanned in order, so overrides come first */ ++ memcpy(fwnames, of_fwnames, of_fw_count * fwname_size); ++ memcpy(fwnames + of_fw_count, sdio_fwnames, ++ brcmf_sdio_fwnames_count * fwname_size); ++ brcmf_sdio_fwnames = fwnames; ++ brcmf_sdio_fwnames_count += of_fw_count; ++ } ++ + fwreq = brcmf_sdio_prepare_fw_request(bus); + if (!fwreq) { + ret = -ENOMEM; +-- +2.30.2 + From e9f9cd14cc71826957877999fd063dd080de4751 Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Mon, 1 Nov 2021 23:39:48 +0200 Subject: [PATCH 8/9] bcm27xx: add support for Raspberry Pi Zero 2 Due to licensing uncertainty, we do not include the firmwares for the wireless chips used in the Raspberry Pi Zero 2 W. To have working wireless, follow the instructions below. For people building their own images: mkdir -p files/lib/firmware/brcm wget -P files/lib/firmware/brcm/ https://github.com/RPi-Distro/firmware-nonfree/raw/bullseye/debian/config/brcm80211/brcm/brcmfmac43436-sdio.bin wget -P files/lib/firmware/brcm/ https://github.com/RPi-Distro/firmware-nonfree/raw/bullseye/debian/config/brcm80211/brcm/brcmfmac43436-sdio.txt wget -P files/lib/firmware/brcm/ https://github.com/RPi-Distro/firmware-nonfree/raw/bullseye/debian/config/brcm80211/brcm/brcmfmac43436s-sdio.bin wget -P files/lib/firmware/brcm/ https://github.com/RPi-Distro/firmware-nonfree/raw/bullseye/debian/config/brcm80211/brcm/brcmfmac43436s-sdio.txt Now build the OpenWrt image as usual, and it will include the firmware files in the correct location. For people using ext4 images: Write the ext4 image to the sdcard, then mount the 2nd partition and put the firmware files from the links above in /lib/firmware/brcm relative from the mount point where the partition is mounted. For people using squashfs images: Write the squashfs image to the sdcard, place it in the Raspberry Pi Zero 2 W, boot it and wait for the overlay filesystem to be created. Find the offset of the overlay filesystem in sysfs: # cat /sys/devices/virtual/block/loop0/loop/offset 25755648 Shut down the device, unplug the power and move the SD card to a Linux computer. Mount the 2nd partition of the sdcard as a loop device with the offset found earlier. sudo mount /dev/sdh2 -o loop,offset=25755648 /mnt/temp Put the firmware files from the links above in /upper/lib/firmware/brcm relative to the mount point where the loop device is mounted. Signed-off-by: Stijn Tintel Tested-by: Peter van Dijk --- .../bcm27xx/base-files/etc/board.d/02_network | 1 + target/linux/bcm27xx/base-files/etc/diag.sh | 1 + target/linux/bcm27xx/image/Makefile | 16 ++++++++++------ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/target/linux/bcm27xx/base-files/etc/board.d/02_network b/target/linux/bcm27xx/base-files/etc/board.d/02_network index b4394f6922..23bc9afdb9 100644 --- a/target/linux/bcm27xx/base-files/etc/board.d/02_network +++ b/target/linux/bcm27xx/base-files/etc/board.d/02_network @@ -23,6 +23,7 @@ raspberrypi,model-b-rev2) ucidef_set_interface_lan "eth0" ;; +raspberrypi,model-zero-2 |\ raspberrypi,model-zero-w) ucidef_set_interface_lan "wlan0" ;; diff --git a/target/linux/bcm27xx/base-files/etc/diag.sh b/target/linux/bcm27xx/base-files/etc/diag.sh index a22ffd3f2a..180b31ec95 100644 --- a/target/linux/bcm27xx/base-files/etc/diag.sh +++ b/target/linux/bcm27xx/base-files/etc/diag.sh @@ -20,6 +20,7 @@ set_state() { raspberrypi,3-compute-module |\ raspberrypi,model-b |\ raspberrypi,model-zero |\ + raspberrypi,model-zero-2 |\ raspberrypi,model-zero-w) status_led="led0" ;; diff --git a/target/linux/bcm27xx/image/Makefile b/target/linux/bcm27xx/image/Makefile index 83d255f326..4cd1052941 100644 --- a/target/linux/bcm27xx/image/Makefile +++ b/target/linux/bcm27xx/image/Makefile @@ -96,13 +96,15 @@ define Device/rpi-2 bcm2709-rpi-2-b bcm2710-rpi-2-b \ bcm2710-rpi-3-b bcm2710-rpi-3-b-plus \ bcm2711-rpi-4-b bcm2711-rpi-400 \ - bcm2710-rpi-cm3 bcm2711-rpi-cm4 + bcm2710-rpi-cm3 bcm2711-rpi-cm4 \ + bcm2710-rpi-zero-2 SUPPORTED_DEVICES := \ - rpi-2-b rpi-3-b rpi-3-b-plus rpi-cm \ + rpi-2-b rpi-3-b rpi-3-b-plus rpi-cm rpi-zero-2 \ raspberrypi,2-model-b raspberrypi,2-model-b-rev2 \ raspberrypi,3-model-b raspberrypi,3-model-b-plus \ raspberrypi,3-compute-module raspberrypi,compute-module-3 \ - raspberrypi,400 raspberrypi,4-compute-module raspberrypi,4-model-b + raspberrypi,400 raspberrypi,4-compute-module raspberrypi,4-model-b \ + raspberrypi,model-zero-2 DEVICE_PACKAGES := \ cypress-firmware-43430-sdio \ cypress-nvram-43430-sdio-rpi-3b \ @@ -126,12 +128,14 @@ define Device/rpi-3 DEVICE_DTS := \ broadcom/bcm2710-rpi-2-b \ broadcom/bcm2710-rpi-3-b broadcom/bcm2710-rpi-3-b-plus \ - broadcom/bcm2710-rpi-cm3 + broadcom/bcm2710-rpi-cm3 \ + broadcom/bcm2710-rpi-zero-2 SUPPORTED_DEVICES := \ - rpi-3-b rpi-3-b-plus \ + rpi-3-b rpi-3-b-plus rpi-zero-2 \ raspberrypi,2-model-b-rev2 \ raspberrypi,3-model-b raspberrypi,3-model-b-plus \ - raspberrypi,3-compute-module raspberrypi,compute-module-3 + raspberrypi,3-compute-module raspberrypi,compute-module-3 \ + raspberrypi,model-zero-2 DEVICE_PACKAGES := \ cypress-firmware-43430-sdio \ cypress-nvram-43430-sdio-rpi-3b \ From 04071cb111f290417074de130d34ae5895fd3a7b Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Fri, 1 Jul 2022 16:17:37 +0300 Subject: [PATCH 9/9] qoriq: enable Book-E Watchdog Timer Enable PowerPC Book-E Watchdog Timer support. Having this enabled in-kernel will result in procd starting it during boot. This effectively solves the problem of the WDT in the Winbond W83793 chip potentially resetting the system during sysupgrade, which could result in an unbootable device. While the driver is modular, resulting in procd not starting the WDT during boot (because that happens before kmod load), the WDT handover during sysupgrade results in the WDT being started. This normally shouldn't be a problem, but the W83793 WDT does not like procd's defaults, nor the handover happening during sysupgrade. Signed-off-by: Stijn Tintel --- target/linux/qoriq/config-5.10 | 2 ++ target/linux/qoriq/config-5.15 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/target/linux/qoriq/config-5.10 b/target/linux/qoriq/config-5.10 index 835a90470a..3b53cb3ebc 100644 --- a/target/linux/qoriq/config-5.10 +++ b/target/linux/qoriq/config-5.10 @@ -23,6 +23,7 @@ CONFIG_BLK_MQ_PCI=y CONFIG_BLK_PM=y CONFIG_BLK_SCSI_REQUEST=y CONFIG_BOOKE=y +CONFIG_BOOKE_WDT=y CONFIG_CLKDEV_LOOKUP=y CONFIG_CLK_QORIQ=y CONFIG_CLONE_BACKWARDS=y @@ -380,6 +381,7 @@ CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y CONFIG_VT=y CONFIG_VT_CONSOLE=y # CONFIG_VT_HW_CONSOLE_BINDING is not set +CONFIG_WATCHDOG_CORE=y # CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set CONFIG_XPS=y CONFIG_ZLIB_DEFLATE=y diff --git a/target/linux/qoriq/config-5.15 b/target/linux/qoriq/config-5.15 index 258ac11aa2..7d5e410ee1 100644 --- a/target/linux/qoriq/config-5.15 +++ b/target/linux/qoriq/config-5.15 @@ -23,6 +23,7 @@ CONFIG_BLK_DEV_SD=y CONFIG_BLK_MQ_PCI=y CONFIG_BLK_PM=y CONFIG_BOOKE=y +CONFIG_BOOKE_WDT=y CONFIG_CLK_QORIQ=y CONFIG_CLONE_BACKWARDS=y CONFIG_CLZ_TAB=y @@ -397,6 +398,7 @@ CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y CONFIG_VT=y CONFIG_VT_CONSOLE=y # CONFIG_VT_HW_CONSOLE_BINDING is not set +CONFIG_WATCHDOG_CORE=y # CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set CONFIG_XPS=y CONFIG_ZLIB_DEFLATE=y