From patchwork Thu Jun 20 02:00:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacobe Zang X-Patchwork-Id: 13704799 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1AE07C27C53 for ; Thu, 20 Jun 2024 02:01:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fPdAgx/XmDpuOgU/xsUfIGnn/4AS/ce3BVC4+ZZowEA=; b=MiZ1MRqN4T5Pr+ 7D//uB3BlupiMuOVdH5uiSpU3IdNA4rs+PsaYRm0YJs/5D8es4h1TkwAggT6gQO4WSywPEBcugLvw Zy6YX6DSZlUOKXMIlVvHmi9yTIHFEgcCD/55oabWjL5FhGNug+gYVBQ4Bu/3BKwir1moOHAfhaQ4o TExre0TFv26NQZZFBPO3MFez0PecHPFRxOrti4YOgwxQbGkbFgcU7QOTr4JkInT/CXwS8zW6i+4DE uCGxfBqs/cs/Ms8C6ZBVFQfEjQIm24L0lwvR0F0b/vnCGV9pQsKVJv08jFsq1KxFoQsQRberxQnDc khR17wezC3fyZPecTqgg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sK76r-00000003JVd-34S3; Thu, 20 Jun 2024 02:01:09 +0000 Received: from mail-sgaapc01on2070b.outbound.protection.outlook.com ([2a01:111:f400:feab::70b] helo=APC01-SG2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sK76Z-00000003JJr-1POt; Thu, 20 Jun 2024 02:00:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fFufsblirz2lMH2CycigsI8yd5EDLYFUQg/hrlDtA75WH9Jecjg1h3YNIeRGste3EM/nG9exizCjKWmRPj4ljHSDJebP5bRmQsfa8Wj2DNe6pGXRubjUUCGUlFRrJT1/3xcDtFY5UAs1FiCSSsji5J/NnyNOqxrOSUqQkDbHFLI9Uuhn/uVl4Y6E/Y4uaJpuqF+kGAVcAZdhwP71h4bEyDCTB1AWqUIZoxNZQDsXN9q2xoxRocIXbxYunFpbp8Blr/pOXCLWtsMxOMmDa/hb0vX58IklL44nT0fEkkPT8CtnUFbwORCXCrZr6tY538GKsVEmNDIbUvXIC2vC+KKFBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=U6hbGoEs9Vr71hwrQ+0VzO3tMCpU/yX3mus5cqX6VQ8=; b=cEs8HzxhNamXOm/VM/WMn8xYgwsh/fmyRGqjSTnItrbWgavGGtDHMf5+EZgYbicZVl3x2AWBB3oae1Celqi/0CSJXVxiXnEKFtgBEUxiBedn8fBvusYZDnnL/LwKMrAgKni1yegPEmoVeBi6WiXwPKAR1LLV7klSuas8XOZjyACoM20m+osLUK+1pgtJJpgD6c6S00ojgAMPOEKDg+qga5qLa6VpH+jC9mqMjZYTLEA5I4k6EICeIc1ZydM2AVaSdglyE6TxAgJw3Fw/O1+wVhWyN5D7K4jqAn0uVWzsJeyLE1y8KtkC/MH05w29wsmESHGedDJzGURROymY8/AyBg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wesion.com; dmarc=pass action=none header.from=wesion.com; dkim=pass header.d=wesion.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wesion.com; Received: from TYZPR03MB7001.apcprd03.prod.outlook.com (2603:1096:400:26a::14) by JH0PR03MB7323.apcprd03.prod.outlook.com (2603:1096:990:11::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.31; Thu, 20 Jun 2024 02:00:37 +0000 Received: from TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0]) by TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0%6]) with mapi id 15.20.7677.029; Thu, 20 Jun 2024 02:00:37 +0000 From: Jacobe Zang To: arend.vanspriel@broadcom.com Cc: kvalo@kernel.org, duoming@zju.edu.cn, bhelgaas@google.com, minipli@grsecurity.net, linux-wireless@vger.kernel.org, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, megi@xff.cz, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, heiko@sntech.de, nick@khadas.com, efectn@protonmail.com, jagan@edgeble.ai, dsimic@manjaro.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Jacobe Zang Subject: [PATCH v1 3/3] net: wireless: brcmfmac: Add support for AP6275P Date: Thu, 20 Jun 2024 10:00:15 +0800 Message-Id: <20240620020015.4021696-4-jacobe.zang@wesion.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240620020015.4021696-1-jacobe.zang@wesion.com> References: <20240620020015.4021696-1-jacobe.zang@wesion.com> X-ClientProxiedBy: SG2PR04CA0185.apcprd04.prod.outlook.com (2603:1096:4:14::23) To TYZPR03MB7001.apcprd03.prod.outlook.com (2603:1096:400:26a::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR03MB7001:EE_|JH0PR03MB7323:EE_ X-MS-Office365-Filtering-Correlation-Id: 46453918-9b87-4954-2289-08dc90ccc73e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|1800799021|52116011|366013|376011|7416011|38350700011; X-Microsoft-Antispam-Message-Info: krYlmyyAyhxcgjUe+S0xXL8S49r8oANhVx/+ECJyyd8UfSntPwPTkzPB1cGazh2tZl2gn8nDcBu7+2TunpF5b9noOG/waaISUXpiPhCM5t4MOE4bBlwClVkmC6JMs75ziL40FRDXv65PTE7BbpK76EojgtxIBxhltPM8v5ZLmUgzwUCkc1aVjXUP89bIsCpWwMTNaYPOMkjTHNxYQt/+/GeckFerQLZsMnlpnd/WWEc8spRxhMkuD6MPpOGX6WKoRWG9rWq+Ak9S1vkjLIKa/AZ1AuLlhQ18DcpmKBRPTjXhs/CklVpNIoSin8caJok26UGgqt5jAyYaJ1UwXSap7z25WKRq0hJHGkdKOBpB5LLw9fzcEhsZBh6MT0iLrgfQBj4u7Iw2/V5asdUDowaErTatXcV7jOKtcA7eR2H9YI3ffr5kCWF2f/FJUgkFVWE/oguvEz570rXTi/MUul2NmruT/XyuhcBfTZm4WIi4zYfsBD6c8+wRdgZ2NFeOXrKDpyxgrizX39EwdN6bYS+/V+Prbq1Zh/F3vT1c7mjlWV/qThq5XBE3AatsK60Mjr0ISWt1KPXM/A9UfujhEhm+AeUUD6QQVxRJ8QLHBuy6NIjHf6o6BQsiHRweJoS/p1CXHiSl2FSMd1ldoRP8YBu4AHXB6shE9FEoB41KPGLoW2DE+t4jqfot26ERNQ7/P3x6pNwDnFpjJlP5mS301FpSBSkyhhYogroAQ1Wznk2KovI2FhrlicNXPQW8/oobtgH5NS6fpJadwLiZ+qTiXXWFS0uZ7ASRUray16pQeMPVdhqAXtEGH602zuoGgEHmlYTyvXNkuxjqUt0kNst9ywXr/PUoIQUmKQv9RiH16eg97iO/jR4OmM94/uFJVANlX07Srev4/PgLk9PM5K6NXL9AjNLAjcBks5P4WiKXNgwYzpCTuUMf6vKh2ymc2yIdYh5BlVBRkeMbWi9goy7ivuiMP1dJtzE/XFx0V1R0Egpr+t4XSVjdIpNL4ByPVha9+0MXCN5GvbKLQgVh93FcZXboaQPYN1Mgf8vCSLAY9ROdMWrmrv7m/mWo/McRSMb/5Z5fvPGpsn/EUvLgESUWVTC/KsTC+29VJBKRQCPot3wcI5o0vAclL/0KdiL4H7NgS4TtKxc3T1js1RAHZAwMe+QstR9/TQ6DvbEDysXQRIWQ2/8iFDyei13YzgBYXxgn0Eyf0cX2DSaV6BJhymgJgkMl4MgJfJ1mCuG6wKPTmeczTxArO4iygmCclnbSVjkrlZ4d1iqwRo8V+t+dXNJx0LdWKWhMvdBpYBZhO9JNfilGpp0DQ0Kuo2r/hAD1Vmo0wwu58mBJKgxtZAn1dWLfCEF260TeM4Uqy7rYTFXpqNrwNJU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR03MB7001.apcprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230037)(1800799021)(52116011)(366013)(376011)(7416011)(38350700011);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6fGwhQi3QihAEmZ6okwKe8fG0sCEHU6swgO232K63o7O3FN2wH4d1d0XJMVSQeDSfhe+BfVCfILHOC7cWzWzfcoQBJ6gmNzmj0tVOADV3V+hlZEiIYnL/iiML4mKYj58jKMRb7nNJ5vqm4pXfPFA6oWuMXHIIa8PzzWeqUhwHdFhyAPiTiy4osxWToZ/mtjfsyi6lby39QLMAN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GnbYJsDauWz8TpeITqaB5Lf5c/I3z1lbTco7P2RwD03rhLmJ1QhCCjNNpUzlCjpsELS/SZEvkqgi6I9GmBQDxPz1JwpgHLYQFMxEiMWYch6c//73bzr5W1uO5O8FBU0w0D4Vk8lXutHqhbz19NtU1LAOPujiTIeBGdN3nGukgGD88ZEPxk7GcZ5LVgjiu0L/jNPtf3WTt1hl2DqdFtridB9WaY5YonRzv2FFWBG1SSMtAWP7E8ICQz6Ikj4cd97DZrjms2M0HqXmR7Etey8Xi7Vfnmkci0P58hmFT/lVoJzOs6nOhTdzo76NOl X-OriginatorOrg: wesion.com X-MS-Exchange-CrossTenant-Network-Message-Id: 46453918-9b87-4954-2289-08dc90ccc73e X-MS-Exchange-CrossTenant-AuthSource: TYZPR03MB7001.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2024 02:00:37.1366 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 2dc3bd76-7ac2-4780-a5b7-6c6cc6b5af9b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: YKAryeTOiiOeVp7EfePtAGQ8sddXyadTVCmnvjnJcihw0vv0fIAd4GCjLX5l85Sqar6/MqSdDjCXIyyV+RjO6g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: JH0PR03MB7323 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240619_190051_414690_BBCB2DC6 X-CRM114-Status: GOOD ( 11.06 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org This module features BCM43752A2 chipset. The firmware requires randomness seeding, so enabled it. Signed-off-by: Jacobe Zang --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 5 ++++- .../net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c index f241e1757d7e3..add317731126c 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c @@ -71,6 +71,7 @@ BRCMF_FW_CLM_DEF(4377B3, "brcmfmac4377b3-pcie"); BRCMF_FW_CLM_DEF(4378B1, "brcmfmac4378b1-pcie"); BRCMF_FW_CLM_DEF(4378B3, "brcmfmac4378b3-pcie"); BRCMF_FW_CLM_DEF(4387C2, "brcmfmac4387c2-pcie"); +BRCMF_FW_CLM_DEF(43752, "brcmfmac43752-pcie"); /* firmware config files */ MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-pcie.txt"); @@ -105,6 +106,7 @@ static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { BRCMF_FW_ENTRY(BRCM_CC_43664_CHIP_ID, 0xFFFFFFF0, 4366C), BRCMF_FW_ENTRY(BRCM_CC_43666_CHIP_ID, 0xFFFFFFF0, 4366C), BRCMF_FW_ENTRY(BRCM_CC_4371_CHIP_ID, 0xFFFFFFFF, 4371), + BRCMF_FW_ENTRY(BRCM_CC_43752_CHIP_ID, 0xFFFFFFFF, 43752), BRCMF_FW_ENTRY(BRCM_CC_4377_CHIP_ID, 0xFFFFFFFF, 4377B3), /* revision ID 4 */ BRCMF_FW_ENTRY(BRCM_CC_4378_CHIP_ID, 0x0000000F, 4378B1), /* revision ID 3 */ BRCMF_FW_ENTRY(BRCM_CC_4378_CHIP_ID, 0xFFFFFFE0, 4378B3), /* revision ID 5 */ @@ -1721,7 +1723,7 @@ static int brcmf_pcie_download_fw_nvram(struct brcmf_pciedev_info *devinfo, memcpy_toio(devinfo->tcm + address, nvram, nvram_len); brcmf_fw_nvram_free(nvram); - if (devinfo->otp.valid) { + if (devinfo->otp.valid || devinfo->ci->chip == BRCM_CC_43752_CHIP_ID) { size_t rand_len = BRCMF_RANDOM_SEED_LENGTH; struct brcmf_random_seed_footer footer = { .length = cpu_to_le32(rand_len), @@ -2710,6 +2712,7 @@ static const struct pci_device_id brcmf_pcie_devid_table[] = { BRCMF_PCIE_DEVICE(BRCM_PCIE_4366_5G_DEVICE_ID, BCA), BRCMF_PCIE_DEVICE(BRCM_PCIE_4371_DEVICE_ID, WCC), BRCMF_PCIE_DEVICE(BRCM_PCIE_43596_DEVICE_ID, CYW), + BRCMF_PCIE_DEVICE(BRCM_PCIE_43752_DEVICE_ID, WCC), BRCMF_PCIE_DEVICE(BRCM_PCIE_4377_DEVICE_ID, WCC), BRCMF_PCIE_DEVICE(BRCM_PCIE_4378_DEVICE_ID, WCC), BRCMF_PCIE_DEVICE(BRCM_PCIE_4387_DEVICE_ID, WCC), diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h index 44684bf1b9acc..c1e22c589d85e 100644 --- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h +++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h @@ -52,6 +52,7 @@ #define BRCM_CC_43664_CHIP_ID 43664 #define BRCM_CC_43666_CHIP_ID 43666 #define BRCM_CC_4371_CHIP_ID 0x4371 +#define BRCM_CC_43752_CHIP_ID 43752 #define BRCM_CC_4377_CHIP_ID 0x4377 #define BRCM_CC_4378_CHIP_ID 0x4378 #define BRCM_CC_4387_CHIP_ID 0x4387 @@ -94,6 +95,7 @@ #define BRCM_PCIE_4366_5G_DEVICE_ID 0x43c5 #define BRCM_PCIE_4371_DEVICE_ID 0x440d #define BRCM_PCIE_43596_DEVICE_ID 0x4415 +#define BRCM_PCIE_43752_DEVICE_ID 0x449d #define BRCM_PCIE_4377_DEVICE_ID 0x4488 #define BRCM_PCIE_4378_DEVICE_ID 0x4425 #define BRCM_PCIE_4387_DEVICE_ID 0x4433