From patchwork Wed Jan 4 10:01:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hector Martin X-Patchwork-Id: 38839 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp5062641wrt; Wed, 4 Jan 2023 02:06:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXtZiWvrnT6u/crir5izIOtYJK3JOgqpquDpxi7zqtmGRhQE8zTG1JJkpKsi3VRFg+D4d6tO X-Received: by 2002:a05:6a20:2d9a:b0:ae:6619:6e5d with SMTP id bf26-20020a056a202d9a00b000ae66196e5dmr49468285pzb.47.1672826800388; Wed, 04 Jan 2023 02:06:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672826800; cv=none; d=google.com; s=arc-20160816; b=slBbUA9jahD/adqV69irWJMkHIObMgkcQDOna4cCbqlPjBgfo9iBEk+hBaFCqUSFtI DCh2RWzQHGrc3bvEYEcSy63Ybimviaqy1syYJU3Y9IPADaRwIrCkAJjYGqX1XUV8dikM l/895bHgNE5KCyowCZMfAHZt3dI73TgnwY/hnaCd0lfx1+Dh+lQHh2DrEArNxOnfRIGx 4NMNIo0XUCSuf8Idyg1fNXTZlA9kg74vLLwmJyqQvzzOxSs12pIRfdP25/hBdqalP6GE 9zTnP7wYpFKRc2YgM+05F8vEwfoytv4RYQOUvSKFmB52r5MoY0Nt0mEI/QHEu8Lz4zSY KD3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6LJsOOrsa2DWPrDXz/rFvw5BbLwwq6mbjE9k260sCiA=; b=LW+5J1jDiP+WNOJFTmHKAwHOezxDCYCJNFipv8uzmKV1FZj8dW9qEAUqXq7lNZ2Omd QZf9gnl7e9U4kIX8fshyOnm0uDyx9EPyT91JY97oL7lP9IPPdDA5XfQT4h8ZxbKHZn8W OjPmSTsbQuxxgF22mp0n0cuUVwRZlYJl8Vq0Xy13drJf75unlT86zCHbWkdzTKLvJ//P ktnyOEDMzHcHZRgFn8xFEN5PCZE3sSLMiCDh2XxSuKsnn2fPLNR3UET/EX1rmjn/x3jo d6nNXxidq6Xce/j4tNl7O/2wHYsxM4/AUQzk3/qkW5RzAQiXj8V24qOohLqy6yswH/yY PzVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b=Ace4+4do; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e14-20020a63d94e000000b00496731929d6si30287535pgj.780.2023.01.04.02.06.27; Wed, 04 Jan 2023 02:06:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b=Ace4+4do; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234483AbjADKEZ (ORCPT + 99 others); Wed, 4 Jan 2023 05:04:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234777AbjADKD6 (ORCPT ); Wed, 4 Jan 2023 05:03:58 -0500 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96F231DF19; Wed, 4 Jan 2023 02:03:57 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sendonly@marcansoft.com) by mail.marcansoft.com (Postfix) with ESMTPSA id 1EC5F41DF4; Wed, 4 Jan 2023 10:03:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marcan.st; s=default; t=1672826636; bh=ezJqomiC1Oh9Aro4P8edDLKT3g9b775rb27gPyv8tJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Ace4+4doRdSgbQxGIcFy6IAYBUROrHFSe9zH7kJZ+De0WsQPJQZaIFwVtMBOTAUhF JAksTdzkWQxrhYcRVBDqoW+u1Vg0zhun0IgzgNY6e6TbFo3hq6FtK8tpcKIZnf9+Bl N7IL4DjuYk8kqcM9AGsFDFRtmesyJoIKvxD4iIK5rYSJlA+Cy2fVWUn93/ZegoKSWd agjmFgQEiYIl5gBm/mrWioydGpMsbVUm0xWSMm8bLNiunLYhGnGKszf1LDkC3MdjAU D//qGrNGK9PquLIh5KxfvGd+1QN8H4bvsgWvV4MHyUFaGsR0R8stB+ddwTrfauYMPr NXG0riXnYVFtQ== From: Hector Martin To: Arend van Spriel , Franky Lin , Hante Meuleman , Kalle Valo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Alexander Prutskov , Chi-Hsien Lin , Wright Feng , Ian Lin , Soontak Lee , Joseph chuang , Sven Peter , Alyssa Rosenzweig , asahi@lists.linux.dev, linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, SHA-cyfmac-dev-list@infineon.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Hector Martin , Linus Walleij Subject: [PATCH v1 3/4] brcmfmac: pcie: Add IDs/properties for BCM4377 Date: Wed, 4 Jan 2023 19:01:15 +0900 Message-Id: <20230104100116.729-4-marcan@marcan.st> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230104100116.729-1-marcan@marcan.st> References: <20230104100116.729-1-marcan@marcan.st> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754086035274980507?= X-GMAIL-MSGID: =?utf-8?q?1754086035274980507?= This chip is present on at least these Apple T2 Macs: * tahiti: MacBook Pro 13" (2020, 2 TB3) * formosa: MacBook Pro 13" (Touch/2019) * fiji: MacBook Air 13" (Scissor, 2020) Reviewed-by: Linus Walleij Signed-off-by: Hector Martin Reviewed-by: Arend van Spriel --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 1 + drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 5 +++++ .../net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h | 2 ++ 3 files changed, 8 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c index 3e42c2bd0d9a..8073f31be27d 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c @@ -733,6 +733,7 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci) case CY_CC_4373_CHIP_ID: return 0x160000; case CY_CC_43752_CHIP_ID: + case BRCM_CC_4377_CHIP_ID: return 0x170000; case BRCM_CC_4378_CHIP_ID: return 0x352000; diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c index bb4faea0f0b6..c203f14343d3 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c @@ -63,6 +63,7 @@ BRCMF_FW_DEF(4365C, "brcmfmac4365c-pcie"); BRCMF_FW_DEF(4366B, "brcmfmac4366b-pcie"); BRCMF_FW_DEF(4366C, "brcmfmac4366c-pcie"); BRCMF_FW_DEF(4371, "brcmfmac4371-pcie"); +BRCMF_FW_CLM_DEF(4377B3, "brcmfmac4377b3-pcie"); BRCMF_FW_CLM_DEF(4378B1, "brcmfmac4378b1-pcie"); /* firmware config files */ @@ -95,6 +96,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_4377_CHIP_ID, 0xFFFFFFFF, 4377B3), /* revision ID 4 */ BRCMF_FW_ENTRY(BRCM_CC_4378_CHIP_ID, 0xFFFFFFFF, 4378B1), /* revision ID 3 */ }; @@ -2001,6 +2003,7 @@ static int brcmf_pcie_read_otp(struct brcmf_pciedev_info *devinfo) base = 0x8c0; words = 0xb2; break; + case BRCM_CC_4377_CHIP_ID: case BRCM_CC_4378_CHIP_ID: coreid = BCMA_CORE_GCI; base = 0x1120; @@ -2619,7 +2622,9 @@ 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, WCC), + BRCMF_PCIE_DEVICE(BRCM_PCIE_4377_DEVICE_ID, WCC), BRCMF_PCIE_DEVICE(BRCM_PCIE_4378_DEVICE_ID, WCC), + { /* end: all zeroes */ } }; 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 a722c37d7399..be9232c21789 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_4377_CHIP_ID 0x4377 #define BRCM_CC_4378_CHIP_ID 0x4378 #define CY_CC_4373_CHIP_ID 0x4373 #define CY_CC_43012_CHIP_ID 43012 @@ -93,6 +94,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_4377_DEVICE_ID 0x4488 #define BRCM_PCIE_4378_DEVICE_ID 0x4425 /* brcmsmac IDs */