#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pinctrl/consumer.h>
#include <linux/of.h>
#include <linux/of_reserved_mem.h>
#include <linux/iopoll.h>
#include <linux/reset.h>
#include <linux/of_net.h>
#include <linux/clk.h>
#include "mt7915.h"
#define MT7981_CON_INFRA_VERSION …
#define MT7986_CON_INFRA_VERSION …
#define MT_INFRACFG_CONN2AP_SLPPROT …
#define MT_INFRACFG_AP2CONN_SLPPROT …
#define MT_INFRACFG_RX_EN_MASK …
#define MT_INFRACFG_TX_RDY_MASK …
#define MT_INFRACFG_TX_EN_MASK …
#define MT_TOP_POS_FAST_CTRL …
#define MT_TOP_POS_FAST_EN_MASK …
#define MT_TOP_POS_SKU …
#define MT_TOP_POS_SKU_MASK …
#define MT_TOP_POS_SKU_ADIE_DBDC_MASK …
enum { … };
static int
mt76_wmac_spi_read(struct mt7915_dev *dev, u8 adie, u32 addr, u32 *val)
{ … }
static int
mt76_wmac_spi_write(struct mt7915_dev *dev, u8 adie, u32 addr, u32 val)
{ … }
static int
mt76_wmac_spi_rmw(struct mt7915_dev *dev, u8 adie,
u32 addr, u32 mask, u32 val)
{ … }
static int
mt7986_wmac_adie_efuse_read(struct mt7915_dev *dev, u8 adie,
u32 addr, u32 *data)
{ … }
static inline void mt76_wmac_spi_lock(struct mt7915_dev *dev)
{ … }
static inline void mt76_wmac_spi_unlock(struct mt7915_dev *dev)
{ … }
static u32 mt76_wmac_rmw(void __iomem *base, u32 offset, u32 mask, u32 val)
{ … }
static u8 mt798x_wmac_check_adie_type(struct mt7915_dev *dev)
{ … }
static int mt7986_wmac_consys_reset(struct mt7915_dev *dev, bool enable)
{ … }
static int mt7986_wmac_gpio_setup(struct mt7915_dev *dev)
{ … }
static int mt7986_wmac_consys_lockup(struct mt7915_dev *dev, bool enable)
{ … }
static int mt798x_wmac_coninfra_check(struct mt7915_dev *dev)
{ … }
static int mt798x_wmac_coninfra_setup(struct mt7915_dev *dev)
{ … }
static int mt798x_wmac_sku_setup(struct mt7915_dev *dev, u32 *adie_type)
{ … }
static inline u16 mt7986_adie_idx(u8 adie, u32 adie_type)
{ … }
static inline bool is_7975(struct mt7915_dev *dev, u8 adie, u32 adie_type)
{ … }
static inline bool is_7976(struct mt7915_dev *dev, u8 adie, u32 adie_type)
{ … }
static int mt7986_wmac_adie_thermal_cal(struct mt7915_dev *dev, u8 adie)
{ … }
static int
mt7986_read_efuse_xo_trim_7976(struct mt7915_dev *dev, u8 adie,
bool is_40m, int *result)
{ … }
static int mt7986_wmac_adie_xtal_trim_7976(struct mt7915_dev *dev, u8 adie)
{ … }
static int mt798x_wmac_adie_patch_7976(struct mt7915_dev *dev, u8 adie)
{ … }
static int
mt7986_read_efuse_xo_trim_7975(struct mt7915_dev *dev, u8 adie,
u32 addr, u32 *result)
{ … }
static int mt7986_wmac_adie_xtal_trim_7975(struct mt7915_dev *dev, u8 adie)
{ … }
static int mt7986_wmac_adie_patch_7975(struct mt7915_dev *dev, u8 adie)
{ … }
static int mt7986_wmac_adie_cfg(struct mt7915_dev *dev, u8 adie, u32 adie_type)
{ … }
static int
mt7986_wmac_afe_cal(struct mt7915_dev *dev, u8 adie, bool dbdc, u32 adie_type)
{ … }
static void mt7986_wmac_subsys_pll_initial(struct mt7915_dev *dev, u8 band)
{ … }
static void mt7986_wmac_subsys_setting(struct mt7915_dev *dev)
{ … }
static int mt7986_wmac_bus_timeout(struct mt7915_dev *dev)
{ … }
static void mt7986_wmac_clock_enable(struct mt7915_dev *dev, u32 adie_type)
{ … }
static int mt7986_wmac_top_wfsys_wakeup(struct mt7915_dev *dev, bool enable)
{ … }
static int mt7986_wmac_wm_enable(struct mt7915_dev *dev, bool enable)
{ … }
static int mt7986_wmac_wfsys_poweron(struct mt7915_dev *dev, bool enable)
{ … }
static int mt7986_wmac_wfsys_setting(struct mt7915_dev *dev)
{ … }
static void mt7986_wmac_wfsys_set_timeout(struct mt7915_dev *dev)
{ … }
static int mt7986_wmac_sku_update(struct mt7915_dev *dev, u32 adie_type)
{ … }
static int
mt7986_wmac_adie_setup(struct mt7915_dev *dev, u8 adie, u32 adie_type)
{ … }
static int mt7986_wmac_subsys_powerup(struct mt7915_dev *dev, u32 adie_type)
{ … }
static int mt7986_wmac_wfsys_powerup(struct mt7915_dev *dev)
{ … }
int mt7986_wmac_enable(struct mt7915_dev *dev)
{ … }
void mt7986_wmac_disable(struct mt7915_dev *dev)
{ … }
static int mt798x_wmac_init(struct mt7915_dev *dev)
{ … }
static int mt798x_wmac_probe(struct platform_device *pdev)
{ … }
static void mt798x_wmac_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id mt798x_wmac_of_match[] = …;
MODULE_DEVICE_TABLE(of, mt798x_wmac_of_match);
struct platform_driver mt798x_wmac_driver = …;
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);