Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp13009744rwl; Wed, 4 Jan 2023 02:06:47 -0800 (PST) X-Google-Smtp-Source: AMrXdXsXquZKQCvS8Zz2zznorUGxWq1wcdBRf7SDN2d9QPjiagL+/mlfKGvuddfD0ufjT4Q1EHOi X-Received: by 2002:a17:906:b08b:b0:7c4:f8fb:6a27 with SMTP id x11-20020a170906b08b00b007c4f8fb6a27mr47608965ejy.0.1672826807264; Wed, 04 Jan 2023 02:06:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672826807; cv=none; d=google.com; s=arc-20160816; b=VR7CbrVY2UUyco0tAFDfe2DVrjOPRtNu3JKgXuGKsV30Z45iYMb4TY3Z0PKXDbLT/Z /qpEhr4PsZpjwtO6F21YkvtTkBPTBwVHE8iKrzgBKqH2GAdTcBvQZPBmwrd7+s37Milk TRuiF2O+LFlDgHQ3d93w3x2S3ROSiOfiR2yEHXD5kC4+Z1gB9UBqiIoTadFASwEECwYC 5gXDmWLnl2PM3cx2CL9cmUp4y/svTcICJKEHJzaxHlrftMTfLbZPgRdr6wwlHj8aJhiH Hd7QI+ZhsY4JOFvKVLcorG8W9hiueTd0YJOcPxXxEXOfYI8dKIy6b/D2Adlizfhrn/69 fDTA== 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=WOasP3D3Hm0s5RK51lAdV2+xryF8lubu0eaoERMqXPw=; b=iMWAtg7BliF1fIK/s8WtYHBHKKFAuz8dCu5K92JH/B72oAFoysJ1LymZa4yJyEyvXu 8RMpooIEHbgkrpa7ZCEfA5LcvBnVY48ZhcXlZD1m8Fxm6j4/pwjCaQPOat6xWZoK3MvQ VVChBrvxIAdDNHH8z4/tWa55Dy+jK50FzvYjhXDAwr1ddcpQXfi40sTNUxB80miCRn0e bOKIilJHG5GJBHrC/Tg+KjCaQI/cF58tmHnYhFQtNHDmyn4uGjPO5io/I4HFg6Uv4XrS NMnfUajhrUNzwANGiYFOqtsvhnMmOBUDyttkXG/aWyhRqLubXU9RI8kW6/F6qnde7zYQ ZK9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b=lK7eaitn; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc8-20020a170907168800b0078e1d213831si33166596ejc.122.2023.01.04.02.06.30; Wed, 04 Jan 2023 02:06:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-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=lK7eaitn; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-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 S234794AbjADKD7 (ORCPT + 67 others); Wed, 4 Jan 2023 05:03:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234504AbjADKDv (ORCPT ); Wed, 4 Jan 2023 05:03:51 -0500 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 085541CB0D; Wed, 4 Jan 2023 02:03:50 -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 A8FBE3FB17; Wed, 4 Jan 2023 10:03:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marcan.st; s=default; t=1672826629; bh=5PQ213c6dksFSTAkHkcUxrdlo98cuY3Drgsr26/bTj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=lK7eaitnWXWoiGRhBlPxiaKClZ+BhrwK7hMX4+Oe+MTqDxXgrdDcSOIcExpPr9vLY vuVj1ChBbhEYH4ApXWFy4OV6XrNyH+I7/9KmtDCTEE5zLec8s5T9lrHeLyLFOI/DxV VYLHzY5DyjHCtdzcYUhY8MqIm42YU85Bu12i50aIgvDYrXGB8K5lI+AMeGuMnKBHc3 mQp9+pjSygkgxKPh9+ZE8UWPqniez2IZy8lm1PEnMZk+rP54FWEljet2LN3LLbSaDX rFprDRgN4uIhnxxRqKA3eTEWH6A32OBFx4Ks92lBq6KBaWjCEFSY6Nc0PMzY2qCNXh ChZVhMGu0o4Ew== 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 Subject: [PATCH v1 2/4] brcmfmac: pcie: Add IDs/properties for BCM4355 Date: Wed, 4 Jan 2023 19:01:14 +0900 Message-Id: <20230104100116.729-3-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 Content-Transfer-Encoding: 8bit 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-wireless@vger.kernel.org This chip is present on at least these Apple T2 Macs: * hawaii: MacBook Air 13" (Late 2018) * hawaii: MacBook Air 13" (True Tone, 2019) Users report seeing PCI revision ID 12 for this chip, which Arend reports should be revision C2, but Apple has the firmware tagged as revision C1. Assume the right cutoff point for firmware versions is revision ID 11 then, and leave older revisions using the non-versioned firmware filename (Apple only uses C1 firmware builds). Signed-off-by: Hector Martin --- .../net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 10 +++++++++- .../wireless/broadcom/brcm80211/include/brcm_hw_ids.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c index 3264be485e20..bb4faea0f0b6 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c @@ -52,6 +52,7 @@ BRCMF_FW_DEF(43602, "brcmfmac43602-pcie"); BRCMF_FW_DEF(4350, "brcmfmac4350-pcie"); BRCMF_FW_DEF(4350C, "brcmfmac4350c2-pcie"); BRCMF_FW_CLM_DEF(4355, "brcmfmac4355-pcie"); +BRCMF_FW_CLM_DEF(4355C1, "brcmfmac4355c1-pcie"); BRCMF_FW_CLM_DEF(4356, "brcmfmac4356-pcie"); BRCMF_FW_CLM_DEF(43570, "brcmfmac43570-pcie"); BRCMF_FW_DEF(4358, "brcmfmac4358-pcie"); @@ -78,7 +79,8 @@ static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { BRCMF_FW_ENTRY(BRCM_CC_4350_CHIP_ID, 0x000000FF, 4350C), BRCMF_FW_ENTRY(BRCM_CC_4350_CHIP_ID, 0xFFFFFF00, 4350), BRCMF_FW_ENTRY(BRCM_CC_43525_CHIP_ID, 0xFFFFFFF0, 4365C), - BRCMF_FW_ENTRY(BRCM_CC_4355_CHIP_ID, 0xFFFFFFFF, 4355), + BRCMF_FW_ENTRY(BRCM_CC_4355_CHIP_ID, 0x000007FF, 4355), + BRCMF_FW_ENTRY(BRCM_CC_4355_CHIP_ID, 0xFFFFF800, 4355C1), /* rev ID 12/C2 seen */ BRCMF_FW_ENTRY(BRCM_CC_4356_CHIP_ID, 0xFFFFFFFF, 4356), BRCMF_FW_ENTRY(BRCM_CC_43567_CHIP_ID, 0xFFFFFFFF, 43570), BRCMF_FW_ENTRY(BRCM_CC_43569_CHIP_ID, 0xFFFFFFFF, 43570), @@ -1994,6 +1996,11 @@ static int brcmf_pcie_read_otp(struct brcmf_pciedev_info *devinfo) int ret; switch (devinfo->ci->chip) { + case BRCM_CC_4355_CHIP_ID: + coreid = BCMA_CORE_CHIPCOMMON; + base = 0x8c0; + words = 0xb2; + break; case BRCM_CC_4378_CHIP_ID: coreid = BCMA_CORE_GCI; base = 0x1120; @@ -2591,6 +2598,7 @@ static const struct pci_device_id brcmf_pcie_devid_table[] = { BRCMF_PCIE_DEVICE_SUB(0x4355, BRCM_PCIE_VENDOR_ID_BROADCOM, 0x4355, WCC), BRCMF_PCIE_DEVICE(BRCM_PCIE_4354_RAW_DEVICE_ID, WCC), BRCMF_PCIE_DEVICE(BRCM_PCIE_4355_RAW_DEVICE_ID, WCC), + BRCMF_PCIE_DEVICE(BRCM_PCIE_4355_DEVICE_ID, WCC), BRCMF_PCIE_DEVICE(BRCM_PCIE_4356_DEVICE_ID, WCC), BRCMF_PCIE_DEVICE(BRCM_PCIE_43567_DEVICE_ID, WCC), BRCMF_PCIE_DEVICE(BRCM_PCIE_43570_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 cacc43db86eb..a722c37d7399 100644 --- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h +++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h @@ -73,6 +73,7 @@ #define BRCM_PCIE_4354_DEVICE_ID 0x43df #define BRCM_PCIE_4354_RAW_DEVICE_ID 0x4354 #define BRCM_PCIE_4355_RAW_DEVICE_ID 0x4355 +#define BRCM_PCIE_4355_DEVICE_ID 0x43dc #define BRCM_PCIE_4356_DEVICE_ID 0x43ec #define BRCM_PCIE_43567_DEVICE_ID 0x43d3 #define BRCM_PCIE_43570_DEVICE_ID 0x43d9 -- 2.35.1