Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp7408170rwn; Tue, 13 Sep 2022 20:37:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR5UjmaZ9CB9XMKJ05IU6nmL985mnIoYQOetv8LxXmz9GugmVZBm4p2dOuDPnk8psYRv3Kfz X-Received: by 2002:a17:902:ce12:b0:172:9512:595d with SMTP id k18-20020a170902ce1200b001729512595dmr35633911plg.101.1663126630383; Tue, 13 Sep 2022 20:37:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663126630; cv=none; d=google.com; s=arc-20160816; b=cg2FWSwYQ5vcajIu7rYWDAPQqnGA8EIQ7b4csXOj621x9tMirIypvwvNhjBQORpRbU 5ZYUIC84QPw/qHYjT9wYdIZVq6B153g25lARfkZmI8OyXObieGl2K98XVHATnFoGqI/w r1xFDCaXAqBiDSkPNwD2iaUQYnNwUp3s6yV0FPgX1Ver6OSi/AWzWccNZAxRnrgEIJO3 MyCb34aY614vPvEBUOdYhcuPJTFRD4csD93IuLQGzYBSSk/46qNGzubk4mD3Zxsn19Mg BVnsWTLTSksVGtm7CeLaK0Ho2+1Dyp/3pr9Se13Uloo721OwJCfyp+J/KZ2jR6eFLgGU 9kWw== 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 :mailrelay-external-outbound:dkim-signature; bh=+TS1g4zN5A45V5qHoxQNnSm4e7HctOmuDH0z1x2mZFg=; b=gCtNEFfaH4ALSljnRb9QWB9NDzEceEmWsx0Nr/x7bYgXP2CFRm21dJawl5/KgCB+B6 oOGqW0cdRPBgWpQT7a+KV3X2+mdeMDUZOZJKtTq543rufYkAfXhBc92FrHUGN4+vvwdJ EQGtwH1XSgjw2Q246FypB0Bqen6q/uICc+eDWzvcSU0b62RygKsfWN0EOpveDctFactc eomRk2sUykXZiA6DO/dx4BE9mPUR1sKPhy9EXezUuC05uYnvtNjPjLxFxgh58AT6rYdj 6GxGwG/M+VtyvkbbRAl8TVJt/2MtarfLORCgWZIxlRbN6foppihmBo2D1DC22jXmM4XZ c80A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infineon.com header.s=IFXMAIL header.b=iozoZDEI; 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=fail (p=NONE sp=NONE dis=NONE) header.from=infineon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j12-20020a62e90c000000b0053e321ce53esi12294134pfh.127.2022.09.13.20.37.01; Tue, 13 Sep 2022 20:37:10 -0700 (PDT) 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=fail header.i=@infineon.com header.s=IFXMAIL header.b=iozoZDEI; 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=fail (p=NONE sp=NONE dis=NONE) header.from=infineon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229709AbiINDcw (ORCPT + 64 others); Tue, 13 Sep 2022 23:32:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229559AbiINDcu (ORCPT ); Tue, 13 Sep 2022 23:32:50 -0400 Received: from smtp12.infineon.com (smtp12.infineon.com [217.10.52.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9283B5A8B0 for ; Tue, 13 Sep 2022 20:32:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infineon.com; i=@infineon.com; q=dns/txt; s=IFXMAIL; t=1663126370; x=1694662370; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iiARnzuXZlRtpTn4PTV6t/xx1zxnrilKYxybeShQtPA=; b=iozoZDEIVOc6JenzNhWzkcs85T2g+ngxYl2t5CoM4OiMH2gLTujDz1yr dCYO+70wt1jl2H6JCcHOrth7EXcys0HIHqDcY9Wlg9bRF/L4dMypG9jB+ tyG8AX3ub9TMxjtBJVU4FErg/ehANT78CHi/ntHCM/g3q3zdd3tguQWxQ g=; X-SBRS: None X-IronPort-AV: E=McAfee;i="6500,9779,10469"; a="317079778" X-IronPort-AV: E=Sophos;i="5.93,313,1654552800"; d="scan'208";a="317079778" Received: from unknown (HELO mucxv002.muc.infineon.com) ([172.23.11.17]) by smtp11.infineon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2022 05:31:46 +0200 Received: from MUCSE822.infineon.com (MUCSE822.infineon.com [172.23.29.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mucxv002.muc.infineon.com (Postfix) with ESMTPS for ; Wed, 14 Sep 2022 05:31:45 +0200 (CEST) Received: from MUCSE804.infineon.com (172.23.29.30) by MUCSE822.infineon.com (172.23.29.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Wed, 14 Sep 2022 05:31:44 +0200 Received: from mailrelay-cypress3.infineon.com (172.23.18.46) by SMTP-MailRelay1.infineon.com (172.23.29.5) with Microsoft SMTP Server id 15.2.986.29; Wed, 14 Sep 2022 05:31:44 +0200 mailrelay-external-outbound: True X-IronPort-AV: E=McAfee;i="6500,9779,10469"; a="258419597" X-IronPort-AV: E=Sophos;i="5.93,313,1654552800"; d="scan'208";a="258419597" Received: from unknown (HELO mail.spansion.com) ([10.248.30.8]) by mailrelay-cypress3.infineon.com with ESMTP; 14 Sep 2022 05:31:44 +0200 Received: from inf2.aus.cypress.com (10.248.80.6) by BIZ-EXHT102.spansion.com (10.248.30.8) with Microsoft SMTP Server id 14.3.498.0; Tue, 13 Sep 2022 22:31:42 -0500 Received: from iot-wlan-dev-u03.aus.cypress.com (iot-wlan-dev-u03 [10.248.81.193]) by inf2.aus.cypress.com (Postfix) with ESMTP id 9EAFE10033A; Tue, 13 Sep 2022 22:31:42 -0500 (CDT) Received: by iot-wlan-dev-u03.aus.cypress.com (Postfix, from userid 27991) id 9BADF980794; Tue, 13 Sep 2022 22:31:42 -0500 (CDT) From: Ian Lin To: CC: , , , , , , Subject: [PATCH 2/5] brcmfmac: Support 89459 pcie Date: Tue, 13 Sep 2022 22:30:59 -0500 Message-ID: <20220914033102.27893-3-ian.lin@infineon.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20220914033102.27893-1-ian.lin@infineon.com> References: <20220914033102.27893-1-ian.lin@infineon.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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_NONE, T_SCC_BODY_TEXT_LINE 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 From: "alep@cypress.com" Adds support of 89459 chip pcie device and save restore support. Signed-off-by: alep@cypress.com Signed-off-by: Joseph chuang Signed-off-by: Chi-Hsien Lin Signed-off-by: Ian Lin --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 3 +++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 4 ++++ drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c index 4ec7773b6906..de9a2be55db4 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c @@ -732,6 +732,8 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci) return 0x160000; case CY_CC_43752_CHIP_ID: return 0x170000; + case CY_CC_89459_CHIP_ID: + return ((ci->pub.chiprev < 9) ? 0x180000 : 0x160000); default: brcmf_err("unknown chip: %s\n", ci->pub.name); break; @@ -1420,6 +1422,7 @@ bool brcmf_chip_sr_capable(struct brcmf_chip *pub) reg = chip->ops->read32(chip->ctx, addr); return reg != 0; case CY_CC_4373_CHIP_ID: + case CY_CC_89459_CHIP_ID: /* explicitly check SR engine enable bit */ addr = CORE_CC_REG(base, sr_control0); reg = chip->ops->read32(chip->ctx, addr); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c index 97f0f13dfe50..1c54274ff626 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c @@ -59,6 +59,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_DEF(4355, "brcmfmac89459-pcie"); /* firmware config files */ MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-pcie.txt"); @@ -87,6 +88,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(CY_CC_89459_CHIP_ID, 0xFFFFFFFF, 4355), }; #define BRCMF_PCIE_FW_UP_TIMEOUT 5000 /* msec */ @@ -2105,6 +2107,8 @@ static const struct pci_device_id brcmf_pcie_devid_table[] = { BRCMF_PCIE_DEVICE(BRCM_PCIE_4366_2G_DEVICE_ID), BRCMF_PCIE_DEVICE(BRCM_PCIE_4366_5G_DEVICE_ID), BRCMF_PCIE_DEVICE(BRCM_PCIE_4371_DEVICE_ID), + BRCMF_PCIE_DEVICE(CY_PCIE_89459_DEVICE_ID), + BRCMF_PCIE_DEVICE(CY_PCIE_89459_RAW_DEVICE_ID), { /* 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 ed0b707f0cdf..e9e7f8dd65e3 100644 --- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h +++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h @@ -54,6 +54,7 @@ #define CY_CC_4373_CHIP_ID 0x4373 #define CY_CC_43012_CHIP_ID 43012 #define CY_CC_43752_CHIP_ID 43752 +#define CY_CC_89459_CHIP_ID 0x4355 /* USB Device IDs */ #define BRCM_USB_43143_DEVICE_ID 0xbd1e @@ -87,7 +88,8 @@ #define BRCM_PCIE_4366_2G_DEVICE_ID 0x43c4 #define BRCM_PCIE_4366_5G_DEVICE_ID 0x43c5 #define BRCM_PCIE_4371_DEVICE_ID 0x440d - +#define CY_PCIE_89459_DEVICE_ID 0x4415 +#define CY_PCIE_89459_RAW_DEVICE_ID 0x4355 /* brcmsmac IDs */ #define BCM4313_D11N2G_ID 0x4727 /* 4313 802.11n 2.4G device */ -- 2.25.0