Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp47548pxb; Tue, 14 Sep 2021 18:15:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw36TaMb6eALIiCPukKo+72spbFyNl/aqcc4oJm/PNR8mQ3yOJrjbYpaIDlOBw3q8RNRJPB X-Received: by 2002:a05:6602:200f:: with SMTP id y15mr16180617iod.64.1631668558908; Tue, 14 Sep 2021 18:15:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631668558; cv=none; d=google.com; s=arc-20160816; b=VXeX+u69DOoUBO0tSZdUaogpqy0UtrHLK5MHsy9D3FMa25/fEdZ8CDgvoXNNhwHWGV UWTYzzKTnvcrQtg01WcyIXL0aZ0nUD9zpB/8Wr8JBgtsJwI1GSAdhVZ4V0yT84drZD0T 4UUzDW9wvZwmC/Oz9rIXt/UDUY3bnxZxdeYEPeh8jF6Ivo/QcPqAwBJKsWB9veSyx3SY N3RuZ8JspxpQ6jQ042Lui79YgPROgiGRzVKBcSUy6VgwvGkVMXDlPatnAIRDbUQeEM3X kcVsNp+MGy/0mmbUeIKte+MHsxc6ADDoUJl5Ae8EaO+xmVMLotv6pg8Q91H0/5jrDS9W VwRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=d+Fq9K/qw8n/GPq8atQBA/CsiV3jrG80ItBYLbWG2Eg=; b=lJwe7f+5+49aWHVvFz8LEl9emhEz66GkzjsRse+Yuk6nPeiukT4tmyXcEP0er+yTkZ i/xvm+hF9RpO8gPv1EE0sKXz/RRivyKyv3DKdorFz9QOPjwMHzGEgGpRam3mkizNmSWx F1zEw9jOAZdX6JrSqNKncm2fHjDu0ZwkNsIuJy67OspdCA0evsHObxO9iz59+4jsXSB7 KdOB8BES+UhjAzXIOcwIRJrIeBVrFHlKDMH6fOu9Vc3Y1spEG8EzySJJgaaVDTf/M8e8 LKaRDOsLIMjWC18afO7nKrF2d3e4czJ1MX6vlmJQesnjEKP67QM0eKxTIb8Vvgw8pAHQ Xd3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q11si7413582ilv.64.2021.09.14.18.15.41; Tue, 14 Sep 2021 18:15:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232151AbhIOBQa (ORCPT + 99 others); Tue, 14 Sep 2021 21:16:30 -0400 Received: from mailgw02.mediatek.com ([216.200.240.185]:7170 "EHLO mailgw02.mediatek.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230006AbhIOBQ3 (ORCPT ); Tue, 14 Sep 2021 21:16:29 -0400 X-UUID: 6a69c263c0374afc8b77e40fc9395c2b-20210914 X-UUID: 6a69c263c0374afc8b77e40fc9395c2b-20210914 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 209439151; Tue, 14 Sep 2021 18:15:06 -0700 Received: from mtkcas11.mediatek.inc (172.21.101.40) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 14 Sep 2021 18:14:53 -0700 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 15 Sep 2021 09:14:51 +0800 From: To: , CC: , , , , , , , , , , , , , , , , , , , Sean Wang Subject: [PATCH v1 00/16] Add MT7921 SDIO support Date: Wed, 15 Sep 2021 09:14:33 +0800 Message-ID: X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Sean Wang The patchset adds the SDIO support to the MT7921 driver, basically are made up of 3 parts. PART 1: patch 1-5, 9, 10 and 12-14 These are preliminary patches for mt7921s driver to refactor and reuse the current mt7921e driver as much as possible. PART 2: patch 6-8 These are preliminary patches for mt7921s driver to refactor and reuse the current mt7663s driver as much as possible. PART 3: patch 11 and 15-16 These are specific patches for mt7921s driver and reset mechanism in the same framework where mt7921e have been supported. The patchset are built and generated against the current mt76 tree plus the extra pending patches [1] expected to be merged to mt76 tree soon to help the review and merge process be easier. [1] The pending patch list prior to add MT7921 SDIO support bc8238b1d71b mt76: mt7921s: add reset support e1aa6be18238 mt76: mt7921: introduce mt7921s support 917c58fea5ae mt76: mt7921: refactor mt7921_mcu_send_message 6cc82d84bde6 mt76: mt7921: rely on mcu_get_nic_capability c2ffb6abccee mt76: connac: extend mcu_get_nic_capability b1c9fdc84dc4 mt76: connac: extend mt76_connac_sdio module to support CONNAC2 d251c19578f1 mt76: mt7921: use physical addr to unify register access faf43c5f538a mt76: mt7921: make all event parser resuable between mt7921s and mt7921e 4d7725450ead mt76: mt7663s: rely on mt76_connac_sdio common library 85e99d7c663c mt76: connac: move sdio utility routines in mt76_connac_sdio module bc35b5486170 mt76: connac: move mcu reg access utility routines in mt76_connac_lib module fec36e88c44b mt76: mt7921: add MT7921_COMMON module 210a8cd3ab66 mt76: mt7921: refactor init.c to be bus independent 37519dafa027 mt76: mt7921: refactor mcu.c to be bus independent aa4827ded213 mt76: mt7921: refactor dma.c to be pcie specific f0d66c706432 mt76: mt7921: refactor mac.c to be bus independent 39ac94bb3154 mt76: schedule status timeout at dma completion 3e9f849d0fa4 mt76: substitute sk_buff_head status_list with spinlock_t status_lock f739888cbc9a mt76: remove mt76_wcid pointer from mt76_tx_status_check signature 7282f018bbd5 mt76: introduce packet_id idr f067947571dc mt76: mt7921: add 6GHz support 2a29c573f44a mt76: add 6GHz support ba4e1c352d91 mt76: connac: enable hw amsdu @ 6GHz ed3294b6241b mt76: connac: add 6GHz support to mt76_connac_mcu_uni_add_bss ad7d31a50d49 mt76: connac: add 6GHz support to mt76_connac_mcu_sta_tlv 017ba00f2c14 mt76: connac: set 6G phymode in single-sku support 9516ab381214 mt76: connac: add 6GHz support to mt76_connac_mcu_set_channel_domain 1afbef896fdd mt76: connac: enable 6GHz band for hw scan 527c23367b96 mt76: mt7921: remove mt7921_sta_stats efb4fe718da9 mt76: mt7921: remove mcu rate reporting code 2950bd783385 mt76: mt7921: report tx rate directly from tx status dd82125f72a4 mt76: mt7921: add support for tx status reporting c0937116aefd mt76: mt7921: start reworking tx rate reporting 914640e9777d mt76: mt7921: update mib counters dumping phy stats 4d8d84d63bd3 mt76: mt7921: always wake device if necessary in debugfs 67a7fa715caf mt76: mt7921: move mt7921_queue_rx_skb to mac.c 8011d3c37132 mt76: mt7921: fix retrying release semaphore without end 50c452b6ad50 mt76: mt7921: robustify hardware initialization flow 9c19de7d8b1d (nbd/mt76) mt76: mt7615: checkpatch cleanup Sean Wang (16): mt76: mt7921: refactor mac.c to be bus independent mt76: mt7921: refactor dma.c to be pcie specific mt76: mt7921: refactor mcu.c to be bus independent mt76: mt7921: refactor init.c to be bus independent mt76: mt7921: add MT7921_COMMON module mt76: connac: move mcu reg access utility routines in mt76_connac_lib module mt76: connac: move sdio utility routines in mt76_connac_sdio module mt76: mt7663s: rely on mt76_connac_sdio common library mt76: mt7921: make all event parser resuable between mt7921s and mt7921e mt76: mt7921: use physical addr to unify register access mt76: connac: extend mt76_connac_sdio module to support CONNAC2 mt76: connac: extend mcu_get_nic_capability mt76: mt7921: rely on mcu_get_nic_capability mt76: mt7921: refactor mt7921_mcu_send_message mt76: mt7921: introduce mt7921s support mt76: mt7921s: add reset support drivers/net/wireless/mediatek/mt76/Kconfig | 5 + drivers/net/wireless/mediatek/mt76/Makefile | 2 + drivers/net/wireless/mediatek/mt76/mcu.c | 8 +- drivers/net/wireless/mediatek/mt76/mt76.h | 4 + .../net/wireless/mediatek/mt76/mt7615/Kconfig | 2 +- .../wireless/mediatek/mt76/mt7615/Makefile | 2 +- .../net/wireless/mediatek/mt76/mt7615/mcu.c | 28 -- .../wireless/mediatek/mt76/mt7615/mt7615.h | 6 - .../net/wireless/mediatek/mt76/mt7615/sdio.c | 310 ++------------- .../wireless/mediatek/mt76/mt7615/sdio_mcu.c | 9 +- .../wireless/mediatek/mt76/mt76_connac_mcu.c | 93 +++++ .../wireless/mediatek/mt76/mt76_connac_mcu.h | 3 + .../wireless/mediatek/mt76/mt76_connac_sdio.c | 363 +++++++++++++++++ .../{mt7615/sdio.h => mt76_connac_sdio.h} | 81 +++- .../sdio_txrx.c => mt76_connac_sdio_txrx.c} | 177 ++++++--- .../net/wireless/mediatek/mt76/mt7921/Kconfig | 19 +- .../wireless/mediatek/mt76/mt7921/Makefile | 8 +- .../wireless/mediatek/mt76/mt7921/debugfs.c | 18 +- .../net/wireless/mediatek/mt76/mt7921/dma.c | 35 +- .../wireless/mediatek/mt76/mt7921/eeprom.c | 101 ----- .../net/wireless/mediatek/mt76/mt7921/init.c | 52 +-- .../net/wireless/mediatek/mt76/mt7921/mac.c | 364 ++---------------- .../net/wireless/mediatek/mt76/mt7921/mac.h | 4 + .../net/wireless/mediatek/mt76/mt7921/main.c | 7 + .../net/wireless/mediatek/mt76/mt7921/mcu.c | 131 ++----- .../wireless/mediatek/mt76/mt7921/mt7921.h | 92 ++++- .../net/wireless/mediatek/mt76/mt7921/pci.c | 20 +- .../wireless/mediatek/mt76/mt7921/pci_init.c | 26 ++ .../wireless/mediatek/mt76/mt7921/pci_mac.c | 347 +++++++++++++++++ .../wireless/mediatek/mt76/mt7921/pci_mcu.c | 115 ++++++ .../net/wireless/mediatek/mt76/mt7921/regs.h | 22 +- .../net/wireless/mediatek/mt76/mt7921/sdio.c | 262 +++++++++++++ .../wireless/mediatek/mt76/mt7921/sdio_init.c | 23 ++ .../wireless/mediatek/mt76/mt7921/sdio_mac.c | 202 ++++++++++ .../wireless/mediatek/mt76/mt7921/sdio_mcu.c | 133 +++++++ .../wireless/mediatek/mt76/mt7921/testmode.c | 2 +- 36 files changed, 2069 insertions(+), 1007 deletions(-) create mode 100644 drivers/net/wireless/mediatek/mt76/mt76_connac_sdio.c rename drivers/net/wireless/mediatek/mt76/{mt7615/sdio.h => mt76_connac_sdio.h} (51%) rename drivers/net/wireless/mediatek/mt76/{mt7615/sdio_txrx.c => mt76_connac_sdio_txrx.c} (58%) delete mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/eeprom.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/pci_init.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/pci_mac.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/pci_mcu.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/sdio.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/sdio_init.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/sdio_mac.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/sdio_mcu.c -- 2.25.1