drivers/net/wireless/mediatek/mt7601u/initvals_phy.h

Source file repositories/reference/linux-study-clean/drivers/net/wireless/mediatek/mt7601u/initvals_phy.h

File Facts

System
Linux kernel
Corpus path
drivers/net/wireless/mediatek/mt7601u/initvals_phy.h
Extension
.h
Size
7472 bytes
Lines
284
Domain
Driver Families
Bucket
drivers/net
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef __MT7601U_PHY_INITVALS_H
#define __MT7601U_PHY_INITVALS_H

#define RF_REG_PAIR(bank, reg, value)				\
	{ MT_MCU_MEMMAP_RF | (bank) << 16 | (reg), value }

static const struct mt76_reg_pair rf_central[] = {
	/* Bank 0 - for central blocks: BG, PLL, XTAL, LO, ADC/DAC */
	RF_REG_PAIR(0,	 0, 0x02),
	RF_REG_PAIR(0,	 1, 0x01),
	RF_REG_PAIR(0,	 2, 0x11),
	RF_REG_PAIR(0,	 3, 0xff),
	RF_REG_PAIR(0,	 4, 0x0a),
	RF_REG_PAIR(0,	 5, 0x20),
	RF_REG_PAIR(0,	 6, 0x00),
	/* B/G */
	RF_REG_PAIR(0,	 7, 0x00),
	RF_REG_PAIR(0,	 8, 0x00),
	RF_REG_PAIR(0,	 9, 0x00),
	RF_REG_PAIR(0,	10, 0x00),
	RF_REG_PAIR(0,	11, 0x21),
	/* XO */
	RF_REG_PAIR(0,	13, 0x00),		/* 40mhz xtal */
	/* RF_REG_PAIR(0,	13, 0x13), */	/* 20mhz xtal */
	RF_REG_PAIR(0,	14, 0x7c),
	RF_REG_PAIR(0,	15, 0x22),
	RF_REG_PAIR(0,	16, 0x80),
	/* PLL */
	RF_REG_PAIR(0,	17, 0x99),
	RF_REG_PAIR(0,	18, 0x99),
	RF_REG_PAIR(0,	19, 0x09),
	RF_REG_PAIR(0,	20, 0x50),
	RF_REG_PAIR(0,	21, 0xb0),
	RF_REG_PAIR(0,	22, 0x00),
	RF_REG_PAIR(0,	23, 0xc5),
	RF_REG_PAIR(0,	24, 0xfc),
	RF_REG_PAIR(0,	25, 0x40),
	RF_REG_PAIR(0,	26, 0x4d),
	RF_REG_PAIR(0,	27, 0x02),
	RF_REG_PAIR(0,	28, 0x72),
	RF_REG_PAIR(0,	29, 0x01),
	RF_REG_PAIR(0,	30, 0x00),
	RF_REG_PAIR(0,	31, 0x00),
	/* test ports */
	RF_REG_PAIR(0,	32, 0x00),
	RF_REG_PAIR(0,	33, 0x00),
	RF_REG_PAIR(0,	34, 0x23),
	RF_REG_PAIR(0,	35, 0x01), /* change setting to reduce spurs */
	RF_REG_PAIR(0,	36, 0x00),
	RF_REG_PAIR(0,	37, 0x00),
	/* ADC/DAC */
	RF_REG_PAIR(0,	38, 0x00),
	RF_REG_PAIR(0,	39, 0x20),
	RF_REG_PAIR(0,	40, 0x00),
	RF_REG_PAIR(0,	41, 0xd0),
	RF_REG_PAIR(0,	42, 0x1b),
	RF_REG_PAIR(0,	43, 0x02),
	RF_REG_PAIR(0,	44, 0x00),
};

static const struct mt76_reg_pair rf_channel[] = {
	RF_REG_PAIR(4,	 0, 0x01),
	RF_REG_PAIR(4,	 1, 0x00),
	RF_REG_PAIR(4,	 2, 0x00),
	RF_REG_PAIR(4,	 3, 0x00),
	/* LDO */
	RF_REG_PAIR(4,	 4, 0x00),
	RF_REG_PAIR(4,	 5, 0x08),
	RF_REG_PAIR(4,	 6, 0x00),
	/* RX */
	RF_REG_PAIR(4,	 7, 0x5b),
	RF_REG_PAIR(4,	 8, 0x52),
	RF_REG_PAIR(4,	 9, 0xb6),
	RF_REG_PAIR(4,	10, 0x57),
	RF_REG_PAIR(4,	11, 0x33),
	RF_REG_PAIR(4,	12, 0x22),
	RF_REG_PAIR(4,	13, 0x3d),
	RF_REG_PAIR(4,	14, 0x3e),
	RF_REG_PAIR(4,	15, 0x13),
	RF_REG_PAIR(4,	16, 0x22),
	RF_REG_PAIR(4,	17, 0x23),
	RF_REG_PAIR(4,	18, 0x02),
	RF_REG_PAIR(4,	19, 0xa4),
	RF_REG_PAIR(4,	20, 0x01),
	RF_REG_PAIR(4,	21, 0x12),
	RF_REG_PAIR(4,	22, 0x80),
	RF_REG_PAIR(4,	23, 0xb3),
	RF_REG_PAIR(4,	24, 0x00), /* reserved */
	RF_REG_PAIR(4,	25, 0x00), /* reserved */
	RF_REG_PAIR(4,	26, 0x00), /* reserved */

Annotation

Implementation Notes