Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
PGMT7620_V.1.0_040503
Page 2 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
MIPS 24KEc
64 KB I-Cache
32 KB D-
Cache
(580 MHz)
OCP Bridge
OCP
_IF
Arbiter
DRAM
Controller
RBUS (SYS_CLK)
SPI
NFC
PBUS
GDMA
RJ45 x5
Switch
(4FE + 2GE)
5-Port EPHY
RGMII
TMII/MII
x2
PCIe 1.1
PHY
Single-Port
USB 2.0 PHY
Host/
Device
PCIe x1
UART
GPIO
PCM x4
I2S
I2C
I2S
PBUS
INTC
I2C
GPIO
/LED
SPI
NAND
UART
To CPU
interrupt
s
16-Bit
SDR/DDR1/DDR2
EJTAG
WLAN
11n 2x2
2.4 GHz
Timer
PCM
SDHC
SD
MT7620 Overview
The MT7620 SoC includes a high performance 580 MHz MIPS24KEc CPU core and USB host controller/PHY,
which is designed to enable a multitude of high performance, cost-effective IEEE 802.11n applications with a
MediaTek (Ralink) client card.
Functional Block Diagram
Figure 1-1 MT7620 Block Diagram
There are several masters (MIPS 24KEc, USB , PCI Express) in the MT7620 SoC on a high performance, low
latency Rbus, (Ralink Bus). In addition, the MT7620 SoC supports lower speed peripherals such as UART, GPIO,
and SPI via a low speed peripheral bus (Pbus). The SDRAM/DDR1/DDR2 controller is the only bus slave on the
Rbus. It includes an Advanced Memory Scheduler to arbitrate the requests from bus masters, enhancing the
performance of memory access intensive tasks.
PGMT7620_V.1.0_040503
Page 3 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Table of Contents
1. MIPS 24K PROCESSOR 11
1.1FEATURES11
1.2BLOCK DIAGRAM12
1.3MEMORY MAP SUMMARY13
1.4CLOCK PLAN14
1.5CPUCLOCK MUX15
2. REGISTERS 16
2.1NOMENCLATURE16
2.2SYSTEM CONTROL17
2.2.1FEATURES17
2.2.2BLOCK DIAGRAM17
2.2.3LIST OF REGISTERS18
2.2.4REGISTER DESCRIPTIONS (BASE:0X1000_0000) 19
2.3TIMER46
2.3.1FEATURES46
2.3.2BLOCK DIAGRAM47
2.3.3LIST OF REGISTERS48
2.3.4REGISTER DESCRIPTIONS (BASE:0X1000_0100) 49
2.4INTERRUPT CONTROLLER53
2.4.1FEATURES53
2.4.2BLOCK DIAGRAM53
2.4.3LIST OF REGISTERS54
2.4.4REGISTER DESCRIPTIONS (BASE:0X1000_0200) 55
2.5SYSTEM TICK COUNTER60
2.5.1LIST OF REGISTERS60
2.5.2REGISTER DESCRIPTIONS (BASE:0X1000_0D00) 61
2.6UART 62
2.6.1FEATURES62
2.6.2BLOCK DIAGRAM62
2.6.3LIST OF REGISTERS63
2.6.4REGISTER DESCRIPTIONS (BASE:0X1000_0500) 64
2.7UARTLITE72
2.7.1FEATURES72
2.7.2BLOCK DIAGRAM72
2.7.3LIST OF REGISTERS73
2.7.4REGISTER DESCRIPTIONS (BASE:0X1000_0C00) 74
2.8PROGRAMMABLE I/O 81
2.8.1FEATURES81
2.8.2BLOCK DIAGRAM81
2.8.3LIST OF REGISTERS82
2.8.4REGISTER DESCRIPTIONS (BASE:0X1000_0600) 84
2.9I2CCONTROLLER97
2.9.1FEATURES97
2.9.2BLOCK DIAGRAM97
2.9.3LIST OF REGISTERS98
PGMT7620_V.1.0_040503
Page 4 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
FIGURE 4-1TXD AND TX FRAME INFORMATION ............................................................................................................ 481
FIGURE 4-6RXWIFRAME FORMAT ............................................................................................................................ 492
TABLE 2-4RATE CONTROL ........................................................................................................................................ 249
TABLE 2-5RULE CONTROL ........................................................................................................................................ 249
MIPS32 Enhanced Architecture (Release 2) Features
Vectored interrupts and support for an external interrupt controller
Programmable exception vector base
Atomic interrupt enable/disable
GPR shadow registers (one, three or seven additional shadows can be optionally added to minimize
latency for interrupt handlers)
Bit field manipulation instructions
MIPS32 Privileged Resource Architecture
MIPS DSP ASE
Fractional data types (Q15, Q31)
Saturating arithmetic
SIMD instructions operate on 2x16 b or 4x8 b simultaneously
3 additional pairs of accumulator registers
16-bit encodings of 32-bit instructions to improve code density
Special PC-relative instructions for efficient loading of addresses and constants
SAVE & RESTORE macro instructions for setting up and tearing down stack frames within subroutines
Improved support for handling 8 and 16-bit datatypes
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
2. Registers
2.1 Nomenclature
The following nomenclature is used for register types:
RO Read Only
WO Write Only
RW Read or Write
RC Read Clear
W1C Write One Clear
- Reserved bit
X Undefined binary value
PGMT7620_V.1.0_040503
Page 17 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
System Control
Registers
PalmBus Interface
System Control Block
CPU Rbus Wrapper
Pin Muxing Block
Platform Blocks
PCIe, PCM, ...
Boot Strapping Signals
Cache Hit/Miss Strobes
To/From MIPS
Memory Remapping
GPIO Pin Muxing Scheme
Per Block S/W Reset
Miscellaneous Registers
2.2 System Control
2.2.1 Features
Provides read-only chip revision registers
Provides a window to access boot-strapping signals
Supports memory remapping configurations
Supports software reset to each platform building block
Provides registers to determine GPIO and other peripheral pin muxing schemes
Provides some power-on-reset only test registers for software programmers
Combines miscellaneous registers (such as clock skew control, status register, memo registers, etc)
2.2.2 Block Diagram
Figure 2-1 System Control Block Diagram
PGMT7620_V.1.0_040503
Page 18 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
No.
Offset
Register Name
Description
Page
1
0x0000
CHIPID0_3
Chip ID ASCII Character 0-3
19 2 0x0004
CHIPID4_7
Chip ID ASCII Character 4-7
19 3 0x000C
REVID
Chip Revision Identification
19 4 0x0010
SYSCFG0
System Configuration Register 0
19 5 0x0014
SYSCFG1
System Configuration Register 1
20 6 0x0018
TESTSTAT
Firmware Test Status Register
22 7 0x001C
TESTSTAT2
Firmware Test Status Register 2
22
8
0x0020
Reserved
-
22
9
0x0024
Reserved
-
23
10
0x0028
Reserved
-
23
11
0x002C
CLKCFG0
Clock Configuration Register 0
23
12
0x0030
CLKCFG1
Clock Configuration Register 1
24
13
0x0034
RSTCTRL
Reset Control
25
14
0x0038
RSTSTAT
Reset Status
26
15
0x003C
CPU_SYS_CLKCFG
CPU and SYS Clock Control
27
16
0x0040
CLK_LUT_CFG
Clock Look Up Table Configuration
29
17
0x0044
CUR_CLK_STS
Current clock status
30
18
0x0048
BPLL_CFG0
BB PLL Configuration 0
31
19
0x004C
BPLL_CFG1
BB PLL Configuration 1
31
20
0x0054
CPLL_CFG0
CPU PLL Configuration 0
33
21
0x0058
CPLL_CFG1
CPU PLL Configuration 1
36
22
0x005C
USB_PHY_CFG
USB PHY control
36
23
0x0060
GPIOMODE
GPIO Purpose Select
36
24
0x0064
PCIPDMA_STAT
Control and Status of PDMA in PCIe Device
39
25
0x0088
PMU0_CFG
Power Management Unit 0 Configuration
39
26
0x008C
PMU1_CFG
Power Management Unit 1 Configuration
40
27
0x0098
PPLL_CFG0
PCIe PLL Configuration 0
41
28
0x009C
PPLL_CFG1
PCIe PLL Configuration 1
43
29
0x00A0
PPLL_DRV
PCIe Driver Configuration
44
2.2.3 List of Registers
PGMT7620_V.1.0_040503
Page 19 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:24
RO
CHIP_ID3
ASCII CHIP Name Identification Character 3
0x36
23:16
RO
CHIP_ID2
ASCII CHIP Name Identification Character 2
0x37
15:8
RO
CHIP_ID1
ASCII CHIP Name Identification Character 1
0x54
7:0
RO
CHIP_ID0
ASCII CHIP Name Identification Character 0
0x4D
Bits
Type
Name
Description
Initial Value
31:24
RO
CHIP_ID7
ASCII CHIP Name Identification Character 7
0x20
23:16
RO
CHIP_ID6
ASCII CHIP Name Identification Character 6
0x20
15:8
RO
CHIP_ID5
ASCII CHIP Name Identification Character 5
0x30
7:0
RO
CHIP_ID4
ASCII CHIP Name Identification Character 4
0x32
Bits
Type
Name
Description
Initial Value
31:17
- - Reserved
0x0
16
RO
PKG_ID
Package ID
0: DRQFN-148 pin
1: TFBGA-269 ball
NOTE: This value is determined by the package
used.
-
15:12
- - Reserved
0x0
11:8
RO
VER_ID
Chip Version Number
0x2
7:4 - -
Reserved
0x0
3:0
RO
ECO_ID
Chip ECO Number
0x1
Bits
Type
Name
Description
Initial Value
31:24
RW
TEST_CODE
Test Code
Default value is from bootstrap and can be
modified by software.
0x0
23 - -
Reserved
0x0
22:12
RO
BS_SHADOW
BS shadow register for last boot-up value
Displays a backup copy of the last bootup value.
BS
11:9
- - Reserved
0x0
2.2.4 Register Descriptions (base: 0x1000_0000)
1. CHIPID0_3: Chip ID ASCII Character 0-3 (offset: 0x0000)
2. CHIPID4_7: Chip Name ASCII Character 4-7 (offset: 0x0004)
4. SYSCFG0: System Configuration Register 0 (offset: 0x0010)
PGMT7620_V.1.0_040503
Page 20 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
8
RO
DRAM_FROM_EE
DRAM Configuration from EEPROM
0: DRAM/PLL configuration from EEPROM.
1: DRAM configuration from Auto Detect.
For more information see the Bootstrapping
Pins Description in the datasheet for this chip.
Chip Mode
A vector to set chip function/test/debug modes
in non-test/debug operation.
For more information see the Bootstrapping
Pins Description in the datasheet for this chip.
BS
Bits
Type
Name
Description
Initial Value
31:30
- - Reserved
-
29:28
RW
DDR_DPIN_RXPWD
SDRAM Data Pin Receiver Circuit Power Down
Control*
(DQ/DQS)
0: Disable (SDR/DDR1/DDR2 default)
1: Enable
2: Enable while data pin is output mode.
3: Enable while data pin is input mode.
BS
27:26
RW
DDR_DPIN_ODT
SDRAM Data Pin On Die Termination Setting*
(DQ/DQS)
[27:26]
SDR
(3.3 V)
SDR
(2.5 V/
1.8 V)
DDR1
DDR2
0
(Disable)
(Disable)
(Disable)
(Disable)
1
75 Ω
75 Ω
75 Ω
75 Ω
2
150 Ω
150 Ω
150 Ω
150 Ω
3
N/A
N/A
N/A
N/A
BS
5. SYSCFG1: System Configuration Register 0 (offset: 0x0014)
PGMT7620_V.1.0_040503
Page 21 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
25:24
RW
DDR_DPIN_DRV
SDRAM Data Pin Driving Setting*
(DQ/DQS/DQM)
[25:24]
SDR
(3.3 V)
SDR
(2.5 V/
1.8 V)
DDR1
DDR2
0
N/A
10 mA
Class II
Full 1 N/A
8 mA
N/A
N/A 2 16 mA
4 mA
(Class I)
(Half)
3
(8 mA)
(2 mA)
N/A
N/A
BS
23 - -
Reserved
-
22
RW
DDR_CPIN_RXPWD
SDRAM Command Pin Receiver Circuit Power
Down Control*
(MA/MBA/MCS_N/MWE_N/MRAS_N/
MCAS_N/ MCKE)
0: Disable power down
1: Enable power down (SDR/DDR1/DDR2
default)
Oscillator 1 μs Divider
Sets the maximum for the reference clock
counter for either a 20 MHz or 40 MHz external
XTAL input. The count increments each 1 μsec
(indicating 1 MHz), up to the maximum, before
resetting to zero. This counts the frequency of
an external XTAL. This count is used to output a
32 KHz frequency to the REFCLK0 pin.
6’b0: Automatically generates a 1 μs system tick
regardless of whether XTAL frequency is 20
MHz or 40 MHz.
6’d39: Default value for an external 40 MHz
XTAL.
6’d19: Default value for an external 20 MHz
XTAL.
Others: Manual mode for tick generation.
0x0
23
-
-
Reserved
0x0
22:18
RW
INT_CLK_FDIV
Internal Clock Frequency Divider
The frequency divider used to generate the
Fraction-N clock frequency.
Valid values range from 1 to 31.
Fraction-N clock frequency =
(INT_CLK_FFRAC/INT_CLK_FDIV)*PLL_FREQ
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
16:12
RW
INT_CLK_FFRAC
Internal Clock Fraction-N Frequency
A parameter used in conjunction with
INT_CLK_FDIV to generate the Fraction-N clock
frequency.
Valid values range from 0 to 31.
Fraction-N clock Frequency =
(INT_CLK_FFRAC/INT_CLK_FDIV)*PLL_FREQ
Peripheral Clock Source Select
Sets the peripheral clock to use the 20/40 MHz
frequency input from XTAL.
0: 40 MHz from 480 MHz divided by 12.
1: 20 MHz/40M Hz from XTAL input
0x0
3
RW
EPHY_USE_25M
EPHY Clock Source Select
Set the EPHY clock to use the 25 MHz frequency
input from the PPLL.
0: EPHY use 20/40 MHz from XTAL
1: EPHY use 25 MHz from PPLL
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
22 - -
Reserved
0x1
21
RW
FE_ CLK_EN
FE clock enable
0x1
20 - -
Reserved
0x0
19
RW
UARTL_ CLK_EN
UART Lite clock enable
0x1
18
RW
SPI CLK_EN
SPI clock enable
0x1
17
RW
I2S CLK_EN
I2S clock enable
0x1
16
RW
I2C CLK_EN
I2C clock enable
0x1
15
RW
NAND_CLK_EN
Nand flash control clock enable
0x1
14
RW
GDMA CLK_EN
GDMA clock enable
0x1
13
RW
PIO CLK_EN
GPIO controller clock enable
0x1
12
RW
UART_ CLK_EN
UART clock enable
0x1
11
RW
PCM_ CLK_EN
PCM clock enable
0x1
10
RW
MC_ CLK_EN
Memory controller clock enable
0x1
9
RW
INTC_ CLK_EN
Interrupt controller clock enable
0x1
8
RW
TIMER_CLK_EN
Timer clock enable
0x1
7
RW
GE2_CLK_EN
GE2 controller clock enable.
0x1
6
RW
GE1_CLK_EN
GE1 controller clock enable.
0x1
5:0 - -
Reserved
0x0
Bits
Type
Name
Description
Initial Value
31
RW
PPE_RST
Resets PPE
0x0
30
RW
SDHC_RST
Resets SD Controller.
0x0
29 - -
Reserved
0x0
28
RW
MIPS_CNT_RST
Resets MIPS counter block.
0x0
27 - -
Reserved
0x0
26
RW
PCIE0_RST
Resets PCIE Host Bridge, PCIE0 Controller and
PHY.
0x0
25
RW
UHST0_RST
Resets USB PHY0.
NOTE: USB Host controller will be reset when
both UHST0_RST and UHST1_RST are set.
0x0
24
RW
EPHY_RST
Resets the Ethernet PHY block.
0x0
23
RW
ESW_RST
Resets the Ethernet switch block.
0x0
22 - -
Reserved
0x0
21
RW
FE_RST
Resets the Frame Engine block.
0x0
20
RW
WLAN_RST-
Resets the WLAN block.
0x0
19
RW
UARTL_RST
Resets the UART Lite block.
0x0
NOTE:
0: Clock is gated.
1: Clock is enabled.
13. RSTCTRL: Reset Control Register (offset: 0x0034)
PGMT7620_V.1.0_040503
Page 26 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
18
RW
SPI
Resets the SPI block.
0x0
17
RW
I2S
Resets the I2S block.
0x0
16
RW
I2C
Resets the I2C block.
0x0
15
RW
NAND
Resets the NAND block.
0x0
14
RW
DMA
Resets the DMA block.
0x0
13
RW
PIO
Resets the PIO block.
0x0
12
RW
UART_RST
Resets the UART block.
0x0
11
RW
PCM_RST
Resets the PCM block.
0x0
10
RW
MC_RST
Resets the Memory Controller block.
0x1
9
RW
INTC_RST
Resets the Interrupt Controller block.
0x0
8
RW
TIMER_RST
Resets the Timer block.
0x0
7:1 - -
Reserved
0x0
0
W1C
SYS_RST
Resets the whole SoC.
0x0
Bits
Type
Name
Description
Initial Value
31
RW
WDT2SYSRST_EN
Watchdog Timeout To System Reset Enable
Enables watchdog timeout to trigger a system
reset.
0: Disable
1: Enable
0x1
30
RW
WDT2RSTO_EN
Watchdog Timeout to Reset Output Enable
Enables watchdog timeout to trigger the reset
output pin.
0: Disable
1: Enable
0x1
29:16
RW
WDTRSTPD
Watchdog Reset Output Low Period
Controls the WDT reset output low period. For
example:
If the pin share mode was set correctly and
WDT2RSTO_EN=1,
When WDTRSTPD= 0, you can see duration
of 1 μs low on the WDT reset output pin.
When WDTRSTPD= 3, you can see duration
of 4 μs low on the WDT reset output pin.
(unit: 1 μs)
0x3
15:4
- - Reserved
0x0
NOTE:
0: Deassert reset
1: Reset
14. RSTSTAT: Reset Status Register (offset: 0x0038)
PGMT7620_V.1.0_040503
Page 27 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
3
R/W1C
SWCPURST
Software CPU Reset
Indicates when software has reset the CPU by
writing to the RSTCPU bit in RSTCTL.
0: Has no effect.
1: Clears this bit.
NOTE: This register is reset only by a power-on
reset.
0x0
2
R/W1C
SWSYSRST
Software System Reset
Indicates when software has reset the chip by
writing to the RSTSYS bit in RSTCTL.
0: Has no effect.
1: Clears this bit.
NOTE: This register is reset only by a power on
reset.
0x0
1
R/W1C
WDRST
Watchdog Reset
Indicates when the watchdog timer has reset
the chip.
0: Has no effect.
1: Clears this bit.
NOTE: This register is reset only by power-on
reset.
0x0
0 - -
Reserved
0x0
Bits
Type
Name
Description
Initial Value
31:20
- - Reserved
0x0
19:16
RW
CPU_OCP_RATIO
CPU OCP Ratio
The ratio between the system bus frequency
and the CPU frequency.
Value
Ratio (SYS : CPU )
4’d0
1 : 1 (Reserved)
4’d1
1 : 1.5 (Reserved)
4’d2
1 : 2
4’d3
1 : 2.5 (Reserved)
4’d4
1 : 3
4’d5
1 : 3.5 (Reserved)
4’d6
1 : 4
4’d7
1 : 5
4’d8
1 : 10
Others
Reserved
NOTE: If the chip runs in USB OHCI mode, the
OCP frequency cannot be lower than 30 MHz. It
means that
PLL_FREQ*(CPU_FFRAC/CPU_FDIV)/(CPU_OCP_
RATIO+1) >= 30 MHz.
0x4
15:13
- - Reserved
0x0
15. CPU_SYS_CLKCFG: CPU and SYS Clock Control (offset: 0x003C)
PGMT7620_V.1.0_040503
Page 28 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
12:8
RW
CPU_FDIV
CPU Frequency Divider
The frequency divider is used to generate the
CPU frequency. The value must be larger than
or equal to CPU_FFRAC. Valid values range from
1 to 31.
0xA
7:5 - -
Reserved
0x0
4:0
RW
CPU_FFRAC
CPU Frequency Fractional
A parameter used in conjunction with the CPU
frequency divider to determine the CPU
frequency. Input a value in the following
equation to determine the CPU frequency.
Valid values range from 0 to 31.
CPU frequency =
(CPU_FFRAC/CPU_FDIV)*PLL_FREQ
NOTE: If the chip runs in USB OHCI mode, the
OCP frequency cannot be lower than 30 MHz. It
means that
PLL_FREQ*(CPU_FFRAC/CPU_FDIV)/(CPU_OCP_
RATIO+1) >= 30 MHz.
0x1
NOTE:
1. Equation used to derive system frequency after chip boot up:
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31
RW
SLP_EN
Sleep Mode Enable
Enables sleep mode when MIPS SI_Sleep is
asserted.
0: Disable
1: Enable
Sleep Mode CPU Frequency =
(1/CPU_FDIV)*PLL_FREQ
0x0
30
RW
STEP_EN
Step Jump Enable
Enables step jump after MIPS exits sleep mode.
The CPU will jump to the normal frequency in
increments defined by STEP_FFRAC.bit[4:0] of
this register.
0: Disable
1: Enable
0x0
29:28
- - Reserved
0x0
27:20
RW
STEP_CNT
Step Counter
Sets the period of each step jump. When the
counter counts down to zero, the CPU clock
automatically changes to the next step
frequency.
The count period unit is 1 μs.
0x2
19:16
RW
SLP_OCP_RATIO
Sleep Mode CPU and System Bus Frequency
Ratio
Sets the ratio between the system bus frequency
and the CPU frequency when entering sleep
mode. (SYS:CPU)
Value
Ratio (SYS : CPU )
4’d0
1 : 1
4’d1
1 : 1.5 (Reserved)
4’d2
1 : 2
4’d3
1 : 2.5 (Reserved)
4’d4
1 : 3
4’d5
1 : 3.5 (Reserved)
4’d6
1 : 4
4’d7
1 : 5
4’d8
1 : 10
Others
Reserved
0x4
15:5
- - Reserved
0x0
16. CLK_LUT_CFG: CPU and SYS Clock Auto Control (offset: 0x0040)
PGMT7620_V.1.0_040503
Page 30 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
4:0
RW
STEP_FFRAC
Step Frequency Fraction
Sets the fractional size of the increment in CPU
frequency after the CPU exits from sleep mode
and returns to normal operation. This step is
only valid when SLP_STEP_EN is enabled.
FRAC_VALUE =
PREVIOUS_FRAC_VALUE + STEP_FFRAC
CPU Frequency =
(FRAC_VALUE/CPU_FDIV)*PLL_FREQ
0x6
Bits
Type
Name
Description
Initial Value
31:21
- - Reserved
0x0
20
RO
SAME_FREQ
Indicates that the SYS and DRAM clocks are on
the same frequency.
0: False
1: True
-
19:16
RO
CUR_OCP_RATIO
Current CPU_OCP_Ratio (SYS : CPU)
Shows the current ratio between the system bus
and CPU frequencies.
Value
Ratio (SYS : CPU )
4’d0
1 : 1
4’d1
1 : 1.5 (Reserved)
4’d2
1 : 2
4’d3
1 : 2.5 (Reserved)
4’d4
1 : 3
4’d5
1 : 3.5 (Reserved)
4’d6
1 : 4
4’d7
1 : 5
4’d8
1 : 10
Others
Reserved
-
15:13
- - Reserved
0x0
12:8
RO
CUR_CPU_FDIV
Current CPU Frequency Divider
The frequency divider is used to generate the
CPU frequency.
For more information, see CPU_SYS_CLKCFG,
offset 0x003C, bit[12:8].
0xA
7:5 - -
Reserved
0x0
4:0
RO
CUR_CPU_FFRAC
Current CPU Frequency Fraction
A parameter used in conjunction with the CPU
frequency divider to determine the CPU
frequency.
For more information, see CPU_SYS_CLKCFG,
offset 0x003C, bit[4:0].
0x1
17. CUR_CLK_STS: Current Clock Status (offset: 0x0044)
PGMT7620_V.1.0_040503
Page 31 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31
RW
BPLL_SW_CFG
BB PLL Software Configuration
Sets BB PLL parameters set by software.
0: Apply default parameters set by hardware.
1: Apply new parameters set by software in
BPLL_CFG0 & BPLL_CFG1.
0x0
30:23
- - Reserved
0x0
22:20
RW
BBPL_OPTION
Reserved
0x0
19:17
-
-
Reserved
0x0
16
RW
BBPL_PD
BB PLL Power Down
0: Power On
1: Power Down
0x0
15:14
-
-
Reserved
0x0
13
RO
BBPL_FBDV2
BB PLL Feedback Divisor 2
This value depends on the bootstrap pin.
<0x0>: 40 MHz
<0x1>: 20 MHz
BS
12
RW
BBPL_FOUTDV2
BB PLL Frequency Output Divisor 2
0: Fixed at 960 MHz
The time AFC waits until BIAS is ready
00: 5 μs
10: 20 μs
01: 10 μs
11: 40 μs
0x0
PGMT7620_V.1.0_040503
Page 33 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
12:11
RW
BBPL_TLCK
BB PLL Time Lock
The delay from when AFC is ready to when PLL
starts locking.
00: 5 μs
10: 20 μs
01: 10 μs
11: 40 μs
0x0
10
RW
BBPL_FORCE
Force PLL open loop
0: Close loop
1: Open loop
0x0
9:0
RW
BBPL_AFC
BB PLL Automatic Frequency Calibration
VCO band selection/output code[8:0]
0xxxxxxxxx: Normal
1xxxxxxxxx: Manual set
When read, BBPL_AFC[8:0] is the output code
from BBPL macro
0x0
Bits
Type
Name
Description
Initial Value
31
RW
CPLL_SW_CFG
CPU PLL Software Configuration
Sets CPU PLL parameters set by software.
0: Apply default parameters set by hardware.
1: Apply new parameters set by software in
CPLL_CFG0[25:0], CPLL_CFG1[9:0] and [26].
0x0
30:25
- - Reserved
0x0
24
RW
OPEN_LOOP
Force PLL Open Loop
Forces PLL to operate in open loop mode.
0: Closed loop
1: Open loop
0x0
23:22
RW
AFC_WAIT_TIME
Automatic Frequency Calibration (AFC) Wait
Time
The time AFC waits until BIAS is ready.
00: 5 μs
01: 10 μs
10: 20 μs
11: 40 μs
0x0
21:20
RW
PLL_LOCK_TIME
PLL Lock Time
The delay from when AFC is ready to when PLL
starts locking.
00: 5 μs
01: 10 μs
10: 20 μs
11: 40 μs
0x0
20. CPLL_CFG0: CPU PLL Configuration 0 (offset: 0x0054)
PGMT7620_V.1.0_040503
Page 34 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
19
RW
EC_CUPLLOK
CPU Lock OK
0: Check AFC. After AFC, if F
vco
is within ± 3.2% of
the target value, this bit is set to 1.
1: Set this bit to always indicate CPU Lock status
is OK, and disable the AFC check.
0x0
18:16
RW
PLL_MULT_RATIO
PLL Multiplying Ratio
Sets the ratio between the VCO and reference
clock frequencies.
When LC_CURFCK = 0:
LED JTAG GPIO Share Mode
Sets an LED pin to operate in JTAG or GPIO
mode.
0: Normal Mode (JTAG/EPHY_LED depending on
bootstrapping settings)
1: GPIO Mode
0x0
14 - -
Reserved
0x0
PGMT7620_V.1.0_040503
Page 38 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
13
RW
WLED_GPIO_MODE
WLAN LED GPIO Share Mode
Sets the WLAN LED pin to operate in GPIO
mode.
0: Normal mode
1: GPIO Mode
0x1
12
RW
SPI_REFCLK0_MODE
SPI Reference Clock GPO Share Mode
Sets SPI pins to operate in reference clock and
GPO mode.
0: Normal SPI mode
1: SPI_CS1 pins are shared with the reference
clock and GPO mode.
0x1
11
RW
SPI_GPIO_MODE
SPI GPIO Share Mode
Sets the SPI pins to operate in GPIO mode.
0: Normal Mode
1: GPIO Mode
0x0
10
RW
RGMII2_GPIO_MODE
RGMII2 GPIO Share Mode
Sets the RGMII2 pins to operate in GPIO mode.
0: Normal Mode
1: GPIO Mode
0x1
9
RW
RGMII1_GPIO_MODE
RGMII1 GPIO Share Mode
Sets the RGMII1 pins to operate in GPIO mode.
0: Normal Mode
1: GPIO Mode
0x1
8:7
RW
MDIO_GPIO_MODE
MDIO GPIO Share Mode
Sets the MDIO pin to operate in GPIO mode.
UART Lite GPIO Share Mode
Sets the UART Lite pins to operate in GPIO
mode.
0: Normal Mode
1: GPIO Mode
0x1
4:2
RW
UARTF_SHARE_MODE
UART Full Interface Share Mode
Sets the UART Full interface to operate in PCM,
I2S, and GPIO mode.
A detailed description of the UARTF Mode Pin
Sharing scheme is shown in the datasheet for
this chip.
0x7
1 - -
Reserved
0x0
0
RW
I2C_GPIO_MODE
I2C GPIO Share Mode
Sets the I2C pins to operate in GPIO mode.
0: Normal Mode
1: GPIO Mode
0x1
PGMT7620_V.1.0_040503
Page 39 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:4
- - Reserved
0x0
3
RW
PCIPDMA_RX_EN
PDMA Rx DMA Enable
In iNIC applications, the external Host can
enable the PDMA of a PCIe Device to start Rx
PDMA (from the point of view of the external
host).
However, the actual PDMA Rx is enabled when
both of following conditions are met.
MIPS (internal CPU) writes 1 to
PCIPDMA_RX_EN.
External Host writes 1 to RX_DMA_EN via
BAR1.
0x0
2
RW
PCIPDMA_TX_EN
PDMA Tx DMA Enable
In iNIC applications, the external Host can
enable the PDMA of a PCIe Device to start Tx
PDMA (from the point of view of the external
host).
However, the actual PDMA Tx is enabled when
both of following conditions are met.
MIPS (internal CPU) writes 1 to
PCIPDMA_TX_EN.
External Host writes 1 to TX_DMA_EN via
BAR1.
0x0
1
RO
PCIPDMA_RX_BUSY
PCIe PDMA Rx Busy
Indicates PDMA Rx in the PCIe device is busy.
0: PDMA Rx is idle
1: PDMA Rx is busy
0x0
0
RO
PCIPDMA_TX_BUSY
Indicates PDMA Tx in the PCIe device is busy.
0: PDMA Tx is idle
1: PDMA Tx is busy
0x0
Bits
Type
Name
Description
Initial Value
31:29
- - Reserved
0x0
28
RW
PMU_SW_SET
PMU Software Register Set
0: Set hardware to control the PMU software
register.
1: Set software to control the software register
field [24:16]
0x0
24
RW
A_DCDC_EN
SW Analog DC/DC Converter Enable
0: Disable
1: Enable
0x1
NOTE: For more information on pin sharing schemes, see the datasheet for this chip.
24. PCIPDMA_STAT: Control and Status of PDMA in PCIe Device (offset: 0x0064)
25. PMU0_CFG: (offset: 0x0088)
PGMT7620_V.1.0_040503
Page 40 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
23:20
- - Reserved
0x0
19
RW
A_SSCPERI
Analog Spread Spectrum Clock Generator
(SSCG) Modulation Period Select
0: 16.5 kHz
1: 33 kHz
0x1
18
RW
A_SSCGEN
Analog Spread Spectrum Clock Generator
Enable
0: Disable
1: Enable
0x1
17:16
RW
A_SSC
Analog Spread Spectrum Clock Control
Increases the SSCG modulation frequency from
a base level of 1 MHz.
<0x0>: ± 5%
<0x1>: Reserved
<0x2>: ± 10%
<0x3>: ± 20%
0x2
15:11
- - Reserved
0x0
10:8
RW
A_DLY
Analog Delay
Controls the output power MOSFET dead zone.
Sets the turn off/delay period between the
external upper and lower MOSFET. The periods
given below are approximate as the exact value
depends on the production process for each
chip, the input voltage, and the chip
temperature.
<0x1>: Approx. 40 nsec
<0x2>: Approx. 30 nsec
<0x3:> Approx. 20 nsec
<0x4:> Approx. 10 nsec
0x2
7:0
RW
A_VTUNE
Analog Voltage Tune
Sets the output voltage level.
<0x51>: 0.76 V (min)
…
<0xB9>: 1.75 V - 20 mv
<0xBA>: 1.75 V - 10 mv
<0xBB>: 1.75 V (default)
<0xBC>: 1.75 V + 10 mv
<0xBD>: 1.75 V + 20 mv
…
<0xFF> : 2.4 V (max)
0xBB
Bits
Type
Name
Description
Initial Value
31:30
- - Reserved
-
26. PMU1_CFG: (offset: 0x008C)
PGMT7620_V.1.0_040503
Page 41 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
29:28
RW
DIG_LDO_GAIN
DIG_LDO gain control
00: High DC gain
00: Reserved
10: Reserved
11: Low DC gain
0x0
27:26
- - Reserved
-
25
RW
DIG_SW_SEL
SW Configured Digital LDO output level
0: HW controlled DIG LDO
1: SW controlled DIG LDO field [24:16]
0x0
24
RW
DIG_LDO_EN
DIG LDO Enable
0: Disable
1: Enable
0x1
23:16
RW
DIG_LDO_VALUE
LDO Output Level Selection
0x69
15:14
- - Reserved
-
13:12
RW
DDR_LDO_Gain
DDR LDO gain control
00: High DC gain
00: Reserved
10: Reserved
11: Low DC gain
0x0
11:10
- - Reserved
-
9
RW
DDR_SW_SEL
SW Config DDR LDO Output Level
0: HW control DDR LDO (based on bootstrap
value)
1: SW control DDR LDO field [8:0]
0x0
8
RW
DDR_LDO_EN
DDR LDO Enable
0: Disable
1: Enable
0x1
7:0
RW
DDR_LDO_VALUE
LDO Output Level Selection
default:
<10011011> for output=1.8 V (DDR2)
<11010101> for output=2.5 V (DDR1)
BS
Bits
Type
Name
Description
Initial Value
31
RW
PPLL_SW_SET
Progammable PLL Software Set
0: HW sets default PLL parameters
1: SW applies new parameters with
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Description
11:10
Output voltage level
Value
Description
00
0.7 V
10
0.8 V
01
0.75 V
11
0.85 V
9
Reserved
8:4
Output termination adjustment
Value
Description
Value
Description
Value
Description
00000
70
01010
52
10101
41
00001
66
01011
51
10110
40
00010
64
01100
50
10111
39
00011
62
01101
49
11000
38.5
00100
61
01110
48
11001
38
00101
59
01111
47
11010
37.5
00110
58
10000
46
11011
37
00111
56
10001
45
11100
36.5
01000
55
10010
44
11101
36
01001
54
10011
43
11110
35.5
10100
42
11111
35
3:2
Output slew-rate control
Value
Description
00
1.71 V/ns
01
1.12 V/ns
10
0.78 V/ns
11
0.6 V/ns
1:0
Reserved
PGMT7620_V.1.0_040503
Page 46 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
2.3 Timer
2.3.1 Features
Independent clock pre-scale for each timer.
Independent interrupts for each timer.
Two general-purpose timers which run at a 40 MHz clock rate. The other two run at a 32 kHz clock rate.
Periodic mode
Free-running mode
Time-out mode
Second timer may be used as a watchdog timer. Watchdog timer resets system on time-out.
Timer Modes
Periodic
In periodic mode, the timer counts down to zero from the load value. An interrupt is generated when the
count is zero. After reaching zero, the load value is reloaded into the timer and the timer counts down
again. A load value of zero disables the timer.
Timeout
In timeout mode, the timer counts down to zero from the load value. An interrupt is generated when the
count is zero. In this mode, the ENABLE bit is reset when the timer reaches zero, stopping the
counter. After reaching zero, the load value is reloaded into the timer. A load value of zero disables the
timer.
Free-running
In free-running mode, the timer counts down to zero from FFFFh. An interrupt is generated when the
count is zero. After reaching zero, FFFFh is reloaded into the timer. This mode is identical to the periodic
mode with a load value of 65535. It is worth noting that if firmware writes to the load value register in
this mode, the timer will still load that value even though that value will be ignored thereafter. Also note
that when the timer is first enabled, it will begin counting down from its current value, not necessarily
FFFFh.
Watchdog
In watchdog mode, the timer counts down to zero from the load value. If the load value is not reloaded or
the timer is not disabled before the count is zero, the chip will be reset. When this occurs, every register
in the chip is reset except the watchdog reset status bit WDRST in the RSTSTAT register in the system
control block; it remains set to alert firmware of the timeout event when it re-executes its bootstrap.
PGMT7620_V.1.0_040503
Page 47 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Load Value
Counter
Test Control
Prescale
Mode Control
Timer 0
Load Value
Counter
Test Control
Prescale
Mode Control
Watchdog
Status
Interrupt
Control
PalmBus
Interface
Clock
Reset
Timer 0 Interrupt
Timer 1 Interrupt
Watchdog Timeout
PalmBus Signals
Timer
Timer 1
2.3.2 Block Diagram
Figure 2-2 Timer Block Diagram
PGMT7620_V.1.0_040503
Page 48 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
No.
Offset
Register Name
Description
Page
30
0x0000
TMRSTAT
Timer Status
49
31
0x0010
TMR0LOAD
Timer 0 Load Value
50
32
0x0014
TMR0VAL
Timer 0 Counter Value
50
33
0x0018
TMR0CTL
Timer 0 Control
50
34
0x0020
TMR1LOAD
Timer 1 Load Value
51
35
0x0024
TMR1VAL
Timer 1 Counter Value
51
36
0x0028
TMR1CTL
Timer 1 Control
51
2.3.3 List of Registers
PGMT7620_V.1.0_040503
Page 49 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:6
- - Reserved
0x0
5
WO
TMR1RST
Timer 1 Reset
Read
Reading this bit returns a 0.
Write
0: No effect.
1: Reset Timer 1 to 0xFFFF if in free-running
mode, or to the value specified in the
TMR1LOAD register in all other modes.
0x0
4
WO
TMR0RST
Timer 0 Reset
Read
Reading this bit returns a 0.
Write
0: No effect.
1: Reset Timer 0 to 0xFFFF if in free-running
mode, or to the value specified in the
TMR0LOAD register in all other modes.
0x0
3:2 - -
Reserved
0x0
1
R/W1C
TMR1INT
Timer 1 Interrupt Status
Indicates that timer 1 has expired and timer 1
interrupt to the processor has asserted. After
the interrupt is sent, the bit is written to 1 and
cleared.
Read
0: Not asserted.
1: Asserted.
Write
0: No effect
1: Clears the interrupt.
0x0
0
R/W1C
TMR0INT
Timer 0 Interrupt Status
Indicates that timer 0 has expired and timer 0
interrupt to the processor has asserted. After
the interrupt is sent, the bit is written to 1 and
cleared.
Read
0: Not asserted.
1: Asserted.
Write
0: No effect
1: Clears the interrupt.
0x0
2.3.4 Register Descriptions (base: 0x1000_0100)
30. TMRSTAT: Timer Status Register (offset: 0x0000)
PGMT7620_V.1.0_040503
Page 50 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:16
RO - Reserved
0x0
15:0
RW
TMRLOAD
Timer Load Value
This register contains the load value for the
timer. In all modes, this value is loaded into the
timer counter when this register is written. In
all modes except free-running mode, this value
is reloaded into the timer counter after the
timer counter reaches 0. It may be updated at
any time; the new value will be written to the
counter immediately.
0: Disables the timer, except in free-running
mode.
0x0
Bits
Type
Name
Description
Initial Value
31:16
- - Reserved
0x0
15:0
RO
TMRVAL
Timer Counter Value
This register contains the current value of the
timer. During functional operation, writes have
no effect.
0xffff
Bits
Type
Name
Description
Initial Value
31:16
- - Reserved
0x0
15
RW
TESTEN
Test Enable
Reserved for testing. This bit should be set to 0.
0x0
14:8
- - Reserved
0x0
7
RW
ENABLE
Timer Enable
Enables the 40 MHz timer0.
0: Disable the timer. The timer will stop
32. TMR0VAL: Timer 0 Counter Value (offset: 0x0014)
33. TMR0CTL: Timer 0 Control (offset: 0x0018)
PGMT7620_V.1.0_040503
Page 51 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
3:0
RW
PRESCALE
Timer Clock Pre-scale
These bits are used to scale the timer clock in
order to achieve higher resolution or longer
timer periods. Their definitions are below.
Value
Timer Clock Frequency
0
System clock
1
System clock / 4
2
System clock / 8
3
System clock / 16
…
…
14
System clock / 32768
15
System clock / 65536
NOTE: The pre-scale value should not be
changed unless the timer is disabled.
0x0
Bits
Type
Name
Description
Initial Value
31:16
- - Reserved
0x0
15:0
RW
TMRLOAD
Timer Load Value
This register contains the load value for the
timer. In all modes, this value is loaded into the
timer counter when this register is written. In
all modes except free-running mode, this value
is reloaded into the timer counter after the
timer counter reaches 0. It may be updated at
any time; the new value will be written to the
counter immediately.
0: Disable the timer, except in free-running
mode.
0x0
Bits
Type
Name
Description
Initial Value
31:16
- - Reserved
0x0
15:0
RO
TMRVAL
Timer Counter Value
This register contains the current value of the
timer. During functional operation, writes have
no effect.
0xffff
Bits
Type
Name
Description
Initial Value
31:16
- - Reserved
0x0
15
RW
TESTEN
Test Enable
Reserved for testing. This bit should be set to 0.
0x0
34. TMR1LOAD: Timer 1 Load Value (offset: 0x0020)
35. TMR1VAL: Timer 1 Counter Value (offset: 0x0024)
36. TMR1CTL: Timer 1 Control (offset: 0x0028)
PGMT7620_V.1.0_040503
Page 52 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
14:8
- - Reserved
0x0
7
RW
ENABLE
Timer Enable
Enables the 40 MHz timer1.
0: Disable the timer. The timer will stop
counting and will retain its current value.
1: Enable the timer. The timer will begin
counting from its current value.
0x0
6
RW
WD_TIMEOUT_SRC
Watchdog Timeout Alarm Source
0: From Timer 1
1: From PMU watch dog timer
Timer Clock Pre-scale
These bits are used to scale the timer clock in
order to achieve higher resolution or longer
timer periods. Their definitions are below.
Value
Timer Clock Frequency
0
System clock
1
System clock / 4
2
System clock / 8
3
System clock / 16
……14
System clock / 32768
15
System clock / 65536
NOTE: The pre-scale value should not be
changed unless the timer is disabled.
0x0
PGMT7620_V.1.0_040503
Page 53 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
MIPS H/W interrupt pins
Connect to
Remark
HW_INT#5
Timer interrupt
Highest priority
HW_INT#4
Reserved
HW_INT#3
FE HW_INT#2
PCIe
HW_INT#1
Other high priority interrupts (IRQ#1)
HW_INT#0
Other low priority interrupts (IRQ#0)
Lowest priority
Interrupt
Masking
Interrupt Priority
Selection
PalmBus Interface
Interrupts
(from platform blocks)
PalmBus
(to/from MIPS)
MIPS
Interrupt Controller
MIPS Timer INT
IRQ1
(high priority)
IRQ0
(low priority)
INT 5
INT 4
INT 3
INT 2
INT 1
INT 0
2.4 Interrupt Controller
2.4.1 Features
Supports a central point for interrupt aggregation for platform related blocks
Separated interrupt enable and disable registers
Supports global disable function
2-level Interrupt priority selection
Each interrupt source can be directed to IRQ#0 or IRQ#1
NOTE: MT7620 supports MIPS 24K’s vector interrupt mechanism.
There are 6 hardware interrupts supported by MIPS 24K. The interrupt allocation is shown below:
2.4.2 Block Diagram
Figure 2-3 Interrupt Controller Block Diagram
PGMT7620_V.1.0_040503
Page 54 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
No.
Offset
Register Name
Description
Page
37
0x0000
IRQ0STAT
Interrupt Type 0 Status after Enable Mask
55
38
0x0004
IRQ1STAT
Interrupt Type 1 Status after Enable Mask
55
39
0x0020
INTTYPE
Interrupt Type
56
40
0x0030
INTRAW
Raw Interrupt Status before Enable Mask
57
41
0x0034
INTENA
Interrupt Enable
58
42
0x0038
INTDIS
Interrupt Disable
58
2.4.3 List of Registers
PGMT7620_V.1.0_040503
Page 55 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:20
- - Reserved
-
19
RO
UDEV
USB device interrupt status after mask
0x0
18
RO
UHST
USB host interrupt status after mask
0x0
17
RO
ESW
Ethernet Switch interrupt status after mask
0x0
16 - -
Reserved
0x0
15
RO
R2P
R2P interrupt after mask
0x0
14
RO
SDHC
SDHC interrupt after mask
0x0
13 - -
Reserved
0x0
12
RO
UARTLITE
UARTLITE interrupt status after mask
0x0
11
RO
SPI
SPI interrupt status after mask
0x0
10
RO
I2S
I2S interrupt status after mask
0x0
9
RO
PC
MIPS performance counter interrupt status
after mask
0x0
8 - -
Reserved
0x0
7
RO
DMA
DMA interrupt status after mask
0x0
6
RO
PIO
PIO interrupt status after mask
0x0
5
RO
UART
UART interrupt status after mask
0x0
4
RO
PCM
PCM interrupt status after mask
0x0
3
RO
ILL_ACC
Illegal access interrupt status after mask
0x0
2
RO
WDTIMER
Watchdog timer interrupt status after mask
0x0
1
RO
TIMER0
Timer 0 interrupt status after mask
0x0
0
RO
SYSCTL
System control interrupt status after mask
0x0
Bits
Type
Name
Description
Initial Value
31:20
- - Reserved
-
19
RO
UDEV
USB device interrupt status after mask
0x0
18
RO
UHST
USB host interrupt status after mask
0x0
17
RO
ESW
Ethernet Switch interrupt status after mask
0x0
16 - -
Reserved
0x0
15
RO
R2P
R2P interrupt after mask
0x0
2.4.4 Register Descriptions (base: 0x1000_0200)
37. IRQ0STAT: Interrupt Type 0 Status after Enable Mask (offset: 0x0000)
NOTE: These bits are set if the corresponding interrupt is asserted from the source and with the following two
conditions.
1. The interrupt is not masked (the bit is not set in the INTDIS register)
2. The interrupt type is set to INT0 (in the INTTYPE register).
NOTE: Writing to these bits is ignored and each bit cannot be simultaneously active in both the IRQ0STAT and
IRQ1STAT registers.
38. IRQ1STAT: Interrupt Type 1 Status after Enable Mask (offset: 0x0004)
PGMT7620_V.1.0_040503
Page 56 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
14
RO
SDHC
SDHC interrupt after mask
0x0
13 - -
Reserved
0x0
12
RO
UARTLITE
UARTLITE interrupt status after mask
0x0
11
RO
SPI
SPI interrupt status after mask
0x0
10
RO
I2S
I2S interrupt status after mask
0x0
9
RO
PC
MIPS performance counter interrupt status
after mask
0x0
8 - -
Reserved
0x0
7
RO
DMA
DMA interrupt status after mask
0x0
6
RO
PIO
PIO interrupt status after mask
0x0
5
RO
UART
UART interrupt status after mask
0x0
4
RO
PCM
PCM interrupt status after mask
0x0
3
RO
ILL_ACC
Illegal access interrupt status after mask
0x0
2
RO
WDTIMER
Watchdog timer interrupt status after mask
0x0
1
RO
TIMER0
Timer 0 interrupt status after mask
0x0
0
RO
SYSCTL
System control interrupt status after mask
0x0
Bits
Type
Name
Description
Initial Value
31:20
- - Reserved
-
19
RW
UDEV
USB device interrupt status type
0x0
18
RW
UHST
USB host interrupt status type
0x0
17
RW
ESW
Ethernet Switch interrupt status type
0x0
16 - -
Reserved
0x0
15
RW
R2P
R2P Interrupt status type
0x0
14
RW
SDHC
SDHC Engine interrupt status type
0x0
13 - -
Reserved
0x0
12
RW
UARTLITE
UARTLITE interrupt status type
0x0
11
RW
SPI
SPI interrupt status type
0x0
10
RW
I2S
I2S interrupt status type
0x0
9
RW
PC
MIPS performance counter interrupt status
type
0x0
8 - -
Reserved
0x0
7
RW
DMA
DMA interrupt status type
0x0
NOTE: These bits are set if the corresponding interrupt is asserted from the source and with the following two
conditions:
1. The interrupt is not masked (the bit is not set in the INTDIS register)
2. The interrupt type is set to INT1 (in the INTTYPE register).
NOTE: Writing to these bits is ignored and each bit cannot be simultaneously active in both the IRQ0STAT and
IRQ1STAT registers.
39. INTTYPE: Interrupt Type (offset: 0x0020)
PGMT7620_V.1.0_040503
Page 57 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
6
RW
PIO
PIO interrupt status type
0x0
5
RW
UART
UART interrupt status type
0x0
4
RW
PCM
PCM interrupt status type
0x0
3
RW
ILL_ACC
Illegal access interrupt status type
0x0
2
RW
WDTIMER
Watchdog timer interrupt status type
0x0
1
RW
TIMER0
Timer 0 interrupt status type
0x0
0
RW
SYSCTL
System control interrupt status type
0x0
Bits
Type
Name
Description
Initial Value
31:20
- - Reserved
0x0
19
RO
UDEV
USB device interrupt status before mask
0x0
18
RO
UHST
USB host interrupt status before mask
0x0
17
RO
ESW
Ethernet Switch interrupt status before mask
0x0
16 - -
Reserved
0x0
15
RO
R2P
R2P interrupt status before mask
0x0
14
RO
SDHC
SDHC interrupt status before mask
0x0
13 - -
Reserved
0x0
12
RO
UARTLITE
UARTLITE interrupt status before mask
0x0
11
RO
SPI
SPI interrupt status before mask
0x0
10
RO
I2S
I2S interrupt status before mask
0x0
9
RO
PC
MIPS performance counter interrupt status
before mask
0x0
8 - -
Reserved
0x0
7
RO
DMA
DMA interrupt status before mask
0x0
6
RO
PIO
PIO interrupt status before mask
0x0
5
RO
UART
UART interrupt status before mask
0x0
4
RO
PCM
PCM interrupt status before mask
0x0
3
RO
ILL_ACC
Illegal access interrupt status before mask
0x0
2
RO
WDTIMER
Watchdog timer interrupt status before mask
0x0
1
RO
TIMER0
Timer 0 interrupt status before mask
0x0
0
RO
SYSCTL
System control interrupt status before mask
0x0
NOTE:
0: IRQ type 0
1: IRQ type 1
The interrupt type may be changed at any time; if the interrupt type is changed while the interrupt is active,
the interrupt is immediately redirected.
40. INTRAW: Raw Interrupt Status before Enable Mask (offset: 0x0030)
NOTE: These bits are set if the corresponding interrupt is asserted from the source. The status bit is set if the
interrupt is active, even if it is masked, and regardless of the interrupt type. This provides a single-access
snapshot of all active interrupts for implementation of a polling system.
PGMT7620_V.1.0_040503
Page 58 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31
RW
GLOBAL
Global Interrupt Enable
Allows local interrupts in this register to be
individually enabled. Set this bit before
enabling interrupts in this register.
0x0
30:20
- - Reserved
0x0
19 - -
Reserved
0x0
18
RW
UHST
USB host interrupt enable
0x0
17
RW
ESW
Ethernet Switch interrupt enable
0x0
16 - -
Reserved
0x0
15
RW
R2P
R2P interrupt enable
0x0
14
RW
SDHC
SDHC interrupt enable
-
13 - -
Reserved
-
12
RW
UARTLITE
UARTLITE interrupt enable
0x0
11
RW
SPI
SPI interrupt enable
0x0
10
RW
I2S
I2S interrupt enable
0x0
9
RW
PC
MIPS performance counter interrupt enable
0x0
8 - -
Reserved
0x0
7
RW
DMA
DMA interrupt enable
0x0
6
RW
PIO
PIO interrupt enable
0x0
5
RW
UART
UART interrupt enable
0x0
4
RW
PCM
PCM interrupt enable
0x0
3
RW
ILL_ACC
Illegal access interrupt enable
0x0
2
RW
WDTIMER
Watchdog timer interrupt enable
0x0
1
RW
TIMER0
Timer 0 interrupt enable
0x0
0
RW
SYSCTL
System control interrupt enable
0x0
Bits
Type
Name
Description
Initial Value
31
RW
GLOBAL
Global Interrupt Disable
Allows local interrupts in this register to be
individually disabled. Set this bit before
disabling interrupts in this register.
0x0
30:20
- - Reserved
0x0
19 - -
Reserved
0x0
18
RW
UHST
USB host interrupt status disable
0x0
17
RW
ESW
Ethernet Switch interrupt disable
0x0
16 - -
Reserved
0x0
15
RW
R2P
R2P interrupt disable
0x0
41. INTENA: Interrupt Enable (offset: 0x0034)
NOTE: Where applicable,
1: Enable
42. INTDIS: Interrupt Disable (offset: 0x0038)
PGMT7620_V.1.0_040503
Page 59 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
14
RW
SDHC
SDHC interrupt disable
0x0
13 - -
Reserved
0x0
12
RW
UARTLITE
UARTLITE interrupt disable
0x0
11
RW
SPI
SPI interrupt disable
0x0
10
RW
I2S
I2S interrupt disable
0x0
9
RW
PC
MIPS performance counter interrupt disable
0x0
8
RW
NAND
NAND flash controller interrupt disable
0x0
7
RW
DMA
DMA interrupt disable
0x0
6
RW
PIO
PIO interrupt disable
0x0
5
RW
UART
UART interrupt disable
0x0
4
RW
PCM
PCM interrupt disable
0x0
3
RW
ILL_ACC
Illegal access interrupt disable
0x0
2
RW
WDTIMER
Watchdog timer interrupt disable
0x0
1
RW
TIMER0
Timer 0 interrupt disable
0x0
0
RW
SYSCTL
System control interrupt disable
0x0
NOTE: Where applicable,
1: Disable
PGMT7620_V.1.0_040503
Page 60 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
No.
Offset
Register Name
Description
Page
43
0x0000
STCK_CNT_CFG
MIPS Configuration
61
44
0x0004
CMP_CNT
MIPS Compare
61
45
0x0008
CNT
MIPS Counter
61
2.5 System Tick Counter
2.5.1 List of Registers
PGMT7620_V.1.0_040503
Page 61 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:2
- - Reserved
-
1
RW
EXT_STK_EN
External System Tick Enable
Selects the system tick source
0: Use the MIPS internal timer interrupt.
1: Use the external timer interrupt from an
external MIPS counter.
0x0
0
RW
CNT_EN
Count Enable
Enables the free run counter (MIPS counter).
This counter increments every 20 μs.
0: Disable
1: Enable
0x0
Bits
Type
Name
Description
Initial Value
31:16
- - Reserved
-
15:0
RW
CMP_CNT
Compare Count
Sets the cutoff point for the free run counter
(MIPS counter). If the free run counter equals
the compare counter, then the timer circuit
generates an interrupt. The interrupt remains
active until the compare counter is written
again.
0x0
Bits
Type
Name
Description
Initial Value
31:16
- - Reserved
-
15:0
RW
CNT
MIPS Counter
The MIPS counter (free run counter) increases
by 1 every 20 μs (50 KHz). The counter
continues to count until it reaches the value
loaded into CMP_CNT.
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
PalmBus
Interface
Serializer
Deserializer
Transmit FIFO
Receive FIFO
MODEM
Control
Protocol ControlStatusInterrupts
Baud Rate
Generator
16550-Compatible UART
RXD
TXD
Reset
from System
Control
PalmBus Signals
from PalmBus
Clock
from System
Control
Interrupt
to Interrupt
Controller
2.6 UART
2.6.1 Features
16550-compatible register set, except for Divisor Latch register
5-8 data bits
1-2 stop bits (1 or 2 stop bits are supported with 5 data bits)
Even, odd, stick or no parity
All standard baud rates up to 345 600 b/s
16-byte receive buffer
16-byte transmit buffer
Receive buffer threshold interrupt
Transmit buffer threshold interrupt
False start bit detection in asynchronous mode
Internal diagnostic capabilities
Break simulation
Loop-back control for communications link fault isolation
2.6.2 Block Diagram
Figure 2-4 UART Block Diagram
PGMT7620_V.1.0_040503
Page 63 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
No.
Offset
Register Name
Description
Page
46
0x0000
RBR
Receive Buffer Register
64
47
0x0004
TBR
Transmit Buffer Register
64
48
0x0008
IER
Interrupt Enable Register
64
49
0x000C
IIR
Interrupt Identification Register
65
50
0x0010
FCR
FIFO Control Register
66
51
0x0014
LCRLCR
Line Control Register
66
52
0x0018
MCR
Modem Control Register
67
53
0x001C
LSR
Line Status Register
68
54
0x0020
MSR
Modem Status Register
69
55
0x0024
SCRATCH
Scratch
70
56
0x0028
DL
Clock Divider Divisor Latch
70
57
0x002C
DLLO
Clock Divider Divisor Latch Low
71
58
0x0030
DLHI
Clock Divider Divisor Latch High
71
2.6.3 List of Registers
PGMT7620_V.1.0_040503
Page 64 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
-
7:0
RO
RXD
Receive Buffer Data
Data is transferred to this register from the
receive shift register after a full character is
received. If the contents of this register have
not been read before another character is
received, the OE bit in the LSR register is set,
indicating a received data buffer overrun.
0x0
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
-
7:0
RO
TXD
Transmit Buffer Data
When a character is written to this register, it is
stored in the transmitter holding register. If the
transmitter register is empty, the character is
moved to the transmitter register, starting
transmission.
0x0
Bits
Type
Name
Description
Initial Value
31:4
-
-
Reserved
-
3
RW
EDSSI
Enable Modem Interrupt
Enables the following modem status interrupts.
Data Carrier Detect (DCD)
Ring Indicator (RI)
Data Set Ready (DSR)
Clear to Send (CTS)
Delta Data Carrier Detect (DDCD)
Trailing Edge Ring Indicator (TERI)
Delta Data Set Ready (DDSR) to Send (DCTS)
0x0
2
RW
ELSI
Enable Receiver Line Status Interrupt
Enables the following receive line status
interrupts.
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
0
RW
ERBFI
Enable Rx Buffer Full Interrupt
Enables the receive buffer full interrupt, as well
as the data ready (DR) and character time-out
interrupts.
0x0
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
-
7:6
RO
FIFOEN
FIFOs Enabled
These bits reflect the FIFO enable bit setting in
the FIFO Control Register.
00: FIFO enable bit is cleared.
11: FIFO enable bit is set.
0x0
5:4 - -
Reserved
0x0
3:1
RO
INTID
Interrupt Identifier
These bits provide a snapshot of the interrupt
type, and may be used as the offset into an
interrupt vector table.
See NOTE below.
0x0
0
RO
INTPEND
Interrupt Pending
0: An interrupt bit is set and is not masked.
1: No interrupts are pending.
If more than one category of interrupt is asserted, only the highest priority ID is given.
The line and modem status interrupts are cleared by reading the corresponding status register in the UART
block (LSR (0x001C), MSR (0x0020)). The receive buffer full interrupt is cleared when all of the data is read
from the receive buffer. The transmit buffer empty interrupt is cleared when data is written to the TBR register
(0x0004) in the UART block.
PGMT7620_V.1.0_040503
Page 66 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
-
7:6
RW
RXTRIG
Rx Trigger Level
Sets the number of characters contained by the
receive buffer which triggers assertion of the
data ready (DR) interrupt.
0: 1
1: 4
2: 8
3: 14
NOTE: This register is not used if the receive
FIFO is disabled.
0x0
5:4
RW
TXTRIG
Tx Trigger Level
Sets the number of characters contained by the
transmit buffer which triggers the threshold
empty (THRE) interrupt.
0: 1
1: 4
2: 8
3: 12
0x0
3
RW
DMAMODE
Enable DMA transfers
This bit is writeable and readable, but has no
other hardware function.
0x0
2
WO
TXRST
Tx Reset
1: Clears the transmit FIFO and resets the
transmit status. The shift register is not
cleared.
0x0
1
WO
RXRST
Rx Reset
1: Clears the receive FIFO and resets the receive
status. The shift register is not cleared.
0x0
0
RW
FIFOENA
FIFO Enable
Enables Tx and Rx FIFOs. When disabled, the
FIFOs have an effective depth of one character.
0: Disable
1: Enable
NOTE: The FIFO status and data are
automatically cleared when this bit is changed.
0x0
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
0x0
7
RW
DLAB
Divisor Latch Access Bit
This bit has no functionality, and is retained for
compatibility only
0x0
50. FCR: FIFO Control Register (offset: 0x0010)
51. LCR: Line Control Register (offset: 0x0014)
PGMT7620_V.1.0_040503
Page 67 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
6
RW
SETBRK
Set Break Condition
0: Normal functionality.
1: Force TXD pin to 0. Tx otherwise operates
normally.
0x0
5
RW
FORCEPAR
Force Parity Bit
0: Normal functionality.
1: If even parity is selected, the (transmitted
and checked) parity is forced to 0.
If odd parity is selected, the (transmitted and
checked) parity if forced to 1.
0x0
4
RW
EPS
Even Parity Select
0: Odd parity selected (checksum, including
parity is 1).
1: Even parity selected (checksum, including
parity is 0).
NOTE: This bit is ignored if the PEN bit is 0.
0x0
3
RW
PEN
Parity Enable
0: Parity is not transmitted or checked.
1: Parity is generated (transmit), and checked
(receive).
0x0
2
RW
STB
Stop Bit Select
0: 1 Stop Bit is transmitted and received.
1: 1.5 Stop Bits are transmitted and received if
WLS is 0;
2 Stop Bits are transmitted and received if
WLS is 1, 2, or 3.
0x0
1:0
RW
WLS
Word Length Select
Selects the character length.
0: Each character is 5 bits in length
1: Each character is 6 bits in length
2: Each character is 7 bits in length
3: Each character is 8 bits in length
0x0
Bits
Type
Name
Description
Initial Value
31:5
- - Reserved
0x0
52. MCR: Modem Control Register (offset: 0x0018)
PGMT7620_V.1.0_040503
Page 68 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
4
RW
LOOP
Loopback Mode Enable
0: Normal Operation.
1: The UART is put into loopback mode, and
used for self-testiing. The TXD pin is driven
high; the TXD signal connections are made
internally.
Signal
Wrapped Back Through:
TXD
RXD
DTRN
DSRN
RTSN
CTSN
OUT1N
RIN
OUT2N
DCDN
0x0
3
RW
OUT2
OUT2 Pin Value
0: OUT2N pin is driven to a high level.
1: OUT2N pin is driven to a low level.
NOTE: This bit is only functional in loopback
mode.
0x0
2
RW
OUT1
OUT1 Pin Value
0: OUT1N pin is driven to a high level.
1: OUT1N pin is driven to a low level.
NOTE: This bit is only functional in loopback
mode.
0x0
1
RW
RTS
RTSN1 Pin Value
0: RTSN pin is driven to a high level.
1: RTSN pin is driven to a low level.
0x0
0
RW
DTR
DTRN 1 Pin Value
0: DTRN pin is driven to a high level.
1: DTRN pin is driven to a low level.
0x0
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
0x0
7
RC
ERINFIFO
Error in FIFO
Indicates that a FIFO contains data which was
received with a parity error, framing error, or
break condition.
0x0
6
RC
TEMT
Transmit Shift Register Empty
Indicates that the transmit shift register is
empty. This bit is reset when data is written to
the transmit buffer register (TBR).
0x1
5
RC
THRE
Transmit Holding Register Empty
Indicates that the transmitter holding register is
empty. This bit is reset when data is written to
the transmit buffer register (TBR).
0x1
53. LSR: Line Status Register (offset: 0x001C)
PGMT7620_V.1.0_040503
Page 69 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
4
RC
BI
Break Interrupt
Indicates that a break is received, that is, when
the RXD signal is at a low state for more than
one character transmission time (from Start Bit
to Stop Bit). Under this condition, a single 0 is
received.
0x0
3
RC
FE
Framing Error
Indicates that a valid Stop Bit is not detected. If
a framing error occurs, the receive buffer will
attempt to re-synchronize by sampling the Start
Bit twice and then receiving the data.
0x0
2
RC
PE
Parity Error
Indicates that the received parity is different
from the expected value.
0x0
1
RC
OE
Overrun Error
Indicates that when a receive overrun occurs.
This happens if a character is received before
the previous character has been read by
firmware.
0x0
0
RC
DR
Data Ready
Indicates that character is received, and has
been transferred to the receive buffer register.
This bit is reset when all the characters are read
from the receive buffer register.
0x0
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
0x0
7
RC
DCD
Data Carrier Detect
Indicates the DCDN (Data Carrier Detect) pin is
at a low value.
0x0
6
RC
RI
Ring Indicator
Indicates the RIN (Ring Indicator) pin is at a low
value.
0x0
5
RC
DSR
Data Set Ready
Indicates the DSRN (Data Set Ready) pin is at a
low value.
0x0
4
RC
CTS
Clear to Send
Indicates the CTSN (Clear to Send) pin is at a
low value.
0x0
3
RC
DDCD
Delta Data Carrier Detect
Indicates when the DCDN (Data Carrier Detect)
pin changes.
0x0
NOTE:
0: False
1: True
54. MSR: Modem Status Register (offset: 0x0020)
PGMT7620_V.1.0_040503
Page 70 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
2
RC
TERI
Trailing Edge Ring Indicator
Indicates when the RIN (Ring Indicator) pin
changes from a low to a high value.
0x0
1
RC
DDSR
Delta Data Set Ready
Indicates when the DSRN (Data Set Ready) pin
changes.
0x0
0
RC
DCTS
Delta Clear to Send
Indicates when the CTSN (Clear to Send) pin
changes.
0x0
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
0x0
7:0
RW
SCRATCH
Scratch
This register is defined as a scratch register in
16550 application. It has no hardware function,
and is retained for compatibility only.
0x0
Bits
Type
Name
Description
Initial Value
31:16
- - Reserved
0x0
15:0
RW
DL
Divisor Latch
This register is used in the clock divider to
generate the baud clock.
The baud rate (transfer rate in bits per second)
is defined as:
baud rate = 40 MHz / (CLKDIV * 16).
1. In standard 16550 implementation, this register is accessible as two 8-bit halves only. In this implementation,
the DL register is accessible as a single 16-bit entity only.
2. DL[15:0] should be >= 4.
PGMT7620_V.1.0_040503
Page 71 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
0x0
7:0
RW
DLLO
This register is the equivalent to the lower 8
bits of the DL register. It is provided for16550
compatibility.
NOTE: In standard 16550 implementation, this
register is accessible as two 8-bit halves only.
For convenience, the divisor latch is accessible
as a single 16-bit entity via the DL register.
0x1
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
0x0
7:0
RW
DLHI
This register is the equivalent to the upper 8
bits of the DL register. It is provided for 16550
compatibility.
NOTE: In standard 16550 implementation, this
register is accessible as two 8-bit halves only.
For convenience, the divisor latch is accessible
as a single 16-bit entity via the DL register.
58. DLHI: Clock Divider Divisor Latch High (offset: 0x0030)
PGMT7620_V.1.0_040503
Page 72 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Baud Rate
Generator
CPU Interface
Interrupts
Transmit FIFO
Receive FIFO
StatusProtocol Control
Serializer
Deserializer
TXD
RXD
clock
reset
from System
Controller
CPU Interface
from PalmBus
Controller
Interrupt
to Interrupt
Controller
2.7 UART Lite
2.7.1 Features
2-pin UART
16550-compatible register set, except for Divisor Latch register
5-8 data bits
1-2 stop bits (1 or 2 stop bits are supported with 5 data bits)
Even, odd, stick or no parity
All standard baud rates up to 345600 b/s
16-byte receive buffer
16-byte transmit buffer
Receive buffer threshold interrupt
Transmit buffer threshold interrupt
False start bit detection in asynchronous mode
Internal diagnostic capabilities
Break simulation
Loop-back control for communications link fault isolation
2.7.2 Block Diagram
Figure 2-5 UART Lite Block Diagram
PGMT7620_V.1.0_040503
Page 73 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
No.
Offset
Register Name
Description
Page
59
0x0000
RBR
Receive Buffer Register
74
60
0x0004
TBR
Transmit Buffer Register
74
61
0x0008
IER
Interrupt Enable Register
74
62
0x000C
IIR
Interrupt Identification Register
75
63
0x0010
FCR
FIFO Control Register
76
64
0x0014
LCR
Line Control Register
76
65
0x0018
MCR
Modem Control Register
77
66
0x001C
LSR
Line Status Register
78
67
0x0028
DL
Clock Divider Divisor Latch
79
68
0x002C
DLLO
Clock Divider Divisor Latch Low
79
69
0x0030
DLHI
Clock Divider Divisor Latch High
80
70
0x0034
IFCTL
Interface Control
80
2.7.3 List of Registers
PGMT7620_V.1.0_040503
Page 74 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
0x0
7:0
RO
RXD
Receive Buffer Data
Data is transferred to this register from the Rx
shift register after a full character is received.
The OE bit in the LSR register is set if the
contents of this register have not been read
before another character is received, indicating
an Rx buffer overrun.
0x0
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
0x0
7:0
RO
TXD
Transmit Buffer Data
When a character is written to this register, it is
stored in the Tx holding register; if the Tx
register is empty, the character is moved to the
Tx register, starting transmission.
0x0
Bits
Type
Name
Description
Initial Value
31:3
- - Reserved
0x0
2
RW
ELSI
Enable Line Status Interrupts
Enables the following Rx line status interrupts.
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
0x0
7:6
RO
FIFOENA
FIFOs Enabled
These bits reflect the FIFO enable bit setting in
the FIFO Control Register.
00: FIFO enable bit is cleared.
11: FIFO enable bit is set.
0x0
5:4 - -
Reserved
0x0
3:1
RO
INTID
Interrupt Identifier
These bits provide a snapshot of the interrupt
type, and may be used as the offset into an
interrupt vector table.
See NOTE below.
0x0
0
RO
INTPEND
Interrupt Pending
0: An interrupt bit is set and is not masked.
1: No interrupts are pending.
If more than one category of interrupt is asserted, only the highest priority ID is given.
The line and modem status interrupts are cleared by reading the corresponding status register (LSR (0x001C)).
The receiver buffer full interrupt is cleared when all of the data is read from the receive buffer. The transmitter
buffer empty is cleared when data is written to the TBR register (0x0004).
PGMT7620_V.1.0_040503
Page 76 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
0x0
7:6
RW
RXTRIG
Rx Trigger Level
Sets the number of characters contained by the
receive buffer which triggers the data ready
(DR) interrupt.
0: 1 character
1: 4 characters
2: 8 characters
3: 14 characters
NOTE: This register is not used if the Rx FIFO is
disabled.
0x0
5:4
RW
TXTRIG
Tx Trigger Level
Sets the number of characters contained by the
transmit buffer which will trigger the threshold
empty (THRE) interrupt.
0: 1 character
1: 4 characters
2: 8 characters
3: 12 characters
0x0
3
RW
DMAMODE
DMA Mode
Enables DMA transfers
This bit is writeable and readable, but has no
other hardware function.
0x0
2
WO
TXRST
Tx Reset
1: Clears the transmit FIFO and resets its status.
The shift register is not cleared.
0x0
1
WO
RXRST
Rx Reset
1: Clears the receive FIFO and resets its status.
The shift register is not cleared.
0x0
0
RW
FIFOENA
FIFO Enable
Enables Tx and Rx FIFOs. When disabled, the
FIFOs have an effective depth of one character.
0: Disable
1: Enable
NOTE: The FIFO status and data are
automatically cleared when this bit is changed.
0x0
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
0x0
7
RW
DLAB
Divisor Latch Access Bit
This bit has no functionality, and is retained for
compatibility only.
0x0
63. FCR: FIFO Control Register (offset: 0x0010)
64. LCR: Line Control Register (offset: 0x0014)
PGMT7620_V.1.0_040503
Page 77 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
6
RW
SETBRK
Set Break Condition
0: Normal functionality.
1: Force TXD pin to 0. Tx otherwise operates
normally.
0x0
5
RW
FORCEPAR
Force Parity Bit
0: Normal functionality.
1: If even parity is selected, the (transmitted
and checked) parity is forced to 0.
If odd parity is selected, the (transmitted and
checked) parity if forced to 1.
0x0
4
RW
EPS
Even Parity Select
0: Odd parity selected (checksum, including
parity is 1).
1: Even parity selected (checksum, including
parity is 0).
NOTE: This bit is ignored if the PEN bit is 0.
0x0
3
RW
PEN
Parity Enable
0: Parity is not transmitted or checked.
1: Parity is generated (transmit), and checked
(receive).
0x0
2
RW
STB
Stop Bit Select
0: 1 Stop Bit is transmitted and received.
1: 1.5 Stop Bits are transmitted and received if
WLS is 0; 2 Stop Bits are transmitted and
received if WLS is 1, 2, or 3.
0x0
1:0
RW
WLS
Word Length Select
Selects the character length.
0: Each character is 5 bits in length
1: Each character is 6 bits in length
2: Each character is 7 bits in length
3: Each character is 8 bits in length
0x0
Bits
Type
Name
Description
Initial Value
31:5
- - Reserved
0x0
4
RW
LOOP
Loopback Mode Enable
0: Normal Operation.
1: The UART is put into loop-back mode, used
for self-testing: The TXD pin is driven high;
the TXD signal are connected to RXD
internally.
0x0
3:0
RO - Reserved
0x0
65. MCR: Modem Control Register (offset: 0x0018)
PGMT7620_V.1.0_040503
Page 78 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
0x0
7
RC
ERINFIFO
Error in FIFO
Indicates that a FIFO contains data which was
received with a parity error, framing error, or
break condition.
0x0
6
RC
TEMT
Transmit Shift Register Empty
Indicates that the transmit shift register is
empty. This bit is reset when data is written to
the transmit buffer register (TBR).
0x1
5
RC
THRE
Transmit Holding Register Empty
Indicates that the transmitter holding register is
empty. This bit resets when data is written to
the Tx buffer register (TBR).
0x1
4
RC
BI
Break Interrupt
Indicates that a break is received, that is, when
the RXD signal is at a low state for more than
one character transmission time (from Start Bit
to Stop Bit). Under this condition, a single 0 is
received.
0x1
3
RC
FE
Framing Error
Indicates that a valid Stop Bit is not detected. If
a framing error occurs, the receive buffer will
attempt to re-synchronize by sampling the Start
Bit twice and then receiving the data.
0x0
2
RC
PE
Parity Error
Indicates that the received parity is different
from the expected value.
0x0
1
RC
OE
Overrun Error
Indicates that when a receive overrun occurs.
This happens if a character is received before
the previous character has been read by
firmware.
0x0
0
RC
DR
Data Ready
Indicates that a character is received, and has
been transferred to the receive buffer register.
The bit is reset when all the characters are read
from the receive buffer register.
0x0
66. LSR: Line Status Register (offset: 0x001C)
NOTE:
0: False
1: True
PGMT7620_V.1.0_040503
Page 79 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:16
- - Reserved
0x0
15:0
RW
DL
Divisor Latch
This register is used in the clock divider to
generate the baud clock. The baud rate
(transfer rate in bits per second) is defined as:
Baud rate = system clock frequency / (CLKDIV *
16).
See NOTE below.
0x1
SRC Clock Freq.
Req. Baud Rate (Bd)
DL [15:0]
Error Rate (%)
40 MHz
57 000
44
-0.32%
115 200
22
-1.36%
230 400
11
-1.36%
345 600
7
3.34%
460 800
5
8.51%
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
0x0
7:0
RW
DLLO
Divisor Latch Low
This register is the equivalent to the lower 8
bits of the DL register. It is provided for 16550
compatibility.
NOTE: In a standard 16550 implementation,
this register is accessible as two 8-bit halves
only. For convenience, the divisor latch is
accessible as a single 16-bit entity via the DL
register.
1. In standard 16550 implementation, this register is accessible as two 8-bit halves only. In this implementation,
the DL register is accessible as a single 16-bit entity only.
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
0x0
7:0
RW
DLHI
Divisor Latch High
This register is the equivalent to the upper 8
bits of the DL register. It is provided for 16550
compatibility.
NOTE: In a standard 16550 implementation,
this register is accessible as two 8-bit halves
only. For convenience, the divisor latch is
accessible as a single 16-bit entity via the DL
register.
0x0
Bits
Type
Name
Description
Initial Value
31:1
- - Reserved
0x0
0
RW
IFCTL
Open Collector Mode Control
This register controls if the UART Lite TXD
output functions in open collector mode or is
always driven.
0: The output is always driven with the value of
the transmit data signal.
1: The TXD output functions in open collector
mode, where the TXD output is either driven
low (when the transmit data output is active
low) or tri-stated (when the transmit data
output is active high).
0x0
69. DLHI: Clock Divider Divisor Latch High (offset: 0x0030)
70. IFCTL: Interface Control (offset: 0x0034)
PGMT7620_V.1.0_040503
Page 81 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Edge Detect
PalmBus Interface
Q
Q
PolarityData Out
Direction
Reset
from Power
Management
Clock
from Power
Management
Interrupt
to Interrupt
Controller
PalmBus Signals
to PalmBus
Controller
PIO Data
to I/O Cells
Q
PIO Controller
2.8 Programmable I/O
2.8.1 Features
Supports 73 programmable I/Os
Parameterized numbers of independent inputs, outputs, and inputs
Independent polarity controls for each pin
Independently masked edge detect interrupt on any input transition
Programmable I/O pins are shared with MDIO, JTAG, UART-Lite, UART, SPI, PCM, I2C, GE1, and
EPHY_LED.
2.8.2 Block Diagram
Figure 2-6 Programmable I/O Block Diagram
PGMT7620_V.1.0_040503
Page 82 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
No.
Offset
Register Name
Description
Page
71
0x0000
GPIO23_00_INT
PIO Pin Ports 23 to 00 Interrupt Status
84
72
0x0004
GPIO23_00_EDGE
PIO Pin Ports 23 to 00 Edge Status
84
73
0x0008
GPIO23_00_RMASK
PIO Pin Ports 23 to 00 Rising Edge Interrupt Mask
85
74
0x000C
GPIO23_00_MASK
PIO Pin Ports 23 to 00 Falling Edge Interrupt Mask
85
75
0x0020
GPIO23_00_DATA
PIO Pin Ports 23 to 00 Data
85
76
0x0024
GPIO23_00_DIR
PIO Pin Ports 23 to 00 Data Direction
86
77
0x0028
GPIO23_00_POL
PIO Pin Ports 23 to 00 Data Polarity
86
78
0x002C
GPIO23_00_SET
PIO Pin Ports 23 to 00 Set Data Bit
86
79
0x0030
GPIO23_00_RESET
PIO Pin Ports 23 to 00 Clear Data Bit
86
80
0x0034
GPIO23_00_TOG
PIO Pin Ports 23 to 00 Toggle PIO Data Bit
86
81
0x0038
GPIO39_24_INT
PIO Pin Ports 39 to 24 Pin Interrupt Status
87
82
0x003C
GPIO39_24_EDGE
PIO Pin Ports 39 to 24 Pin Edge Status
87
83
0x0040
GPIO39_24_RMASK
PIO Pin Ports 39 to 24 Rising Edge Interrupt Mask
88
84
0x0044
GPIO39_ 24_FMASK
PIO Pin Ports 39 to 24 Falling Edge Interrupt Mask
88
85
0x0048
GPIO39_24_DATA
PIO Pin Ports 39 to 24 Data
89
86
0x004C
GPIO39_24_DIR
PIO Pin Ports 39 to 24 Data Direction
89
87
0x0050
GPIO39_24_POL
PIO Pin Ports 39 to 24 Data Polarity
89
88
0x0054
GPIO39_24_SET
PIO Pin Ports 39 to 24 Set Data Bit
90
89
0x0058
GPIO39_24_RESET
PIO Pin Ports 39 to 24 Clear Data Bit
90
90
0x005C
GPIO39_24_TOG
PIO Pin Ports 39 to 24 Toggle Data Bit
90
91
0x0060
GPIO71_40_INT
PIO Pin Ports 71 to 40 Interrupt Status
90
92
0x0064
GPIO71_40_EDGE
PIO Pin Ports 71 to 40 Edge Status
91
93
0x0068
GPIO71_40_RMASK
PIO Pin Ports 71 to 40 Rising Edge Interrupt Mask
91
94
0x006C
GPIO71_40_FMASK
PIO Pin Ports 71 to 40 Falling Edge Interrupt Mask
91
95
0x0070
GPIO71_40_DATA
PIO Pin Ports 71 to 40 Data
92
96
0x0074
GPIO71_40_DIR
PIO Pin Ports 71 to 40 Data Direction
92
97
0x0078
GPIO71_40_POL
PIO Pin Ports 71 to 40 Data Polarity
92
98
0x007C
GPIO71_40_SET
PIO Pin Ports 71 to 40 Set Data Bit
93
99
0x0080
GPIO71_40_RESET
PIO Pin Ports 71 to 40 Clear Data Bit
93
100
0x0084
GPIO71_40_TOG
PIO Ports 71 to 40 Toggle Data Bit
93
101
0x0088
GPIO72_INT
PIO Pin Port 72 Interrupt Status
93
102
0x008C
GPIO72_EDGE
PIO Pin Port 72 Edge Status
93
103
0x0090
GPIO72_RMASK
PIO Pin Port 72 Rising Edge Interrupt Mask
94
104
0x0094
GPIO72_FMASK
PIO Pin Port 72 Falling Edge Interrupt Mask
94
105
0x0098
GPIO72_DATA
PIO Pin Port 72 Data
95
106
0x009C
GPIO72_DIR
PIO Pin Port 72 Data Direction
95
107
0x00A0
GPIO72_POL
PIO Pin Port 72 Data Polarity
95
108
0x00A4
GPIO72_SET
PIO Pin Port 72 Set Data Bit
96
2.8.3 List of Registers
PGMT7620_V.1.0_040503
Page 83 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
109
0x00A8
GPIO72_RESET
PIO Pin Port 72 Clear Data Bit
96
110
0x00AC
GPIO72_TOG
PIO Pin Port 72 Toggle Data Bit
96
PGMT7620_V.1.0_040503
Page 84 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:24
- - Reserved
-
23:0
RC
PIOINT
PIO Pin Interrupt
A PIOINT bit is set when its corresponding PIO
pin changes value and the edge for that pin is
enabled via the PIORMASK or PIOFMASK
register. The pin must be set as an input in the
PIODIR register to generate an interrupt.
Read
0: No change detected.
1: Change detected.
Write
All bits are cleared by writing 1 to either this
register or the PIOEDGE register.
NOTE: Changes to the PIO pins can only be
detected when the clock is running.
0x0
Bits
Type
Name
Description
Initial Value
31:24
- - Reserved
-
23:0
RC
PIOEDGE
The PIOEDGE bits have different meanings
depending on whether the interrupt for that pin
is enabled via the PIORMASK or PIOFMASK
register.
Read
If the PIO PIN Interrupt for this PIO pin is
asserted, the corresponding PIOEDGE bit
indicates whether a falling or rising edge
triggered the interrupt.
0: Interrupt triggered by falling edge.
1: Interrupt triggered by rising edge.
If the interrupt is masked (disabled), the
PIOEDGE bit is set on either a rising or falling
edge and remains set until cleared by firmware.
Bits corresponding to pins that are not set as
inputs will never be set.
Write
All bits are cleared by writing 1 to either this
register or the PIOINT register.
NOTE: Changes to the PIO pins can only be
detected when the clock is running.
0x0
2.8.4 Register Descriptions (base: 0x1000_0600)
71. GPIO23_00_INT: PIO Pin Interrupt Status (offset: 0x0000)
72. GPIO23_00_EDGE: PIO Pin Edge Status (offset: 0x0004)
PGMT7620_V.1.0_040503
Page 85 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:24
- - Reserved
-
23:0
RW
PIORMASK
PIO Pin Rising Edge Interrupt Mask
Masks the PIO interrupt indicating when data
on the corresponding PIO pin transitions from a
0 to a 1, i.e. a rising edge.
0: No mask
1: Mask
NOTE: Edge detection is done after the polarity
is adjusted according to the PIOPOL register.
0x0
Bits
Type
Name
Description
Initial Value
31:24
- - Reserved
-
23:0
RW
PIOFMASK
PIO Pin Falling Edge Interrupt Mask
Masks the PIO interrupt indicating when data
on the corresponding PIO pin transitions from a
1 to a 0, i.e. a falling edge.
0: No mask
1: Mask
NOTE: Edge detection is done after the polarity
is adjusted according to the PIOPOL register.
0x0
Bits
Type
Name
Description
Initial Value
31:24
- - Reserved
-
23:0
RW
PIODATA
PIO Pin Data
These bits are used for driving or sensing static
signals on the PIO pins. To drive a value onto a
PIO pin, the corresponding bit in the PIODIR
register must be set. If the corresponding
direction bit is set, the value written to the bit
in the PIODATA register will be driven at the
pin. A read of this register returns the value of
the signals currently on the PIO pins.
NOTE:
1. The value of any bit in this register is inverted
with respect to the pin if the corresponding bit
in the PIOPOL register is set, both in input and
output modes.
2. The values read from the PIO pins are not
synchronized; the user should be sure that the
data will not change when this register is read,
or should be aware that the bits which are not
static at that time may be inaccurate.
PC
73. GPIO23_00_RMASK: PIO Pin Rising Edge Interrupt Mask (offset: 0x0008)
74. GPIO23_00_MASK: PIO Pin Falling Edge Interrupt Mask (offset: 0x000C)
75. GPIO23_00_DATA: PIO Pin Data (offset: 0x0020)
PGMT7620_V.1.0_040503
Page 86 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:24
- - Reserved
-
23:0
RW
PIODIR
PIO Pin Direction
Sets the data direction on PIO pins
corresponding to bits in this register.
0: Set data direction to input.
1: Set data direction to output.
The values driven onto the PIO pins are
controlled by the PIOPOL and PIODATA
registers.
0x0
Bits
Type
Name
Description
Initial Value
31:24
- - Reserved
-
23:0
RW
PIOPOL
PIO Pin Polarity
Sets the polarity of data on PIO pins
corresponding to bits in this register.
0: Maintain original polarity
1: Invert existing polarity
NOTE: The polarity controls affect both input
and output modes.
0x0
Bits
Type
Name
Description
Initial Value
31:24
- - Reserved
-
23:0
W
PIOSET
PIO Pin Set
Sets the corresponding bit in the PIODATA
output register.
0: No effect.
1: Set the selected PIODATA bit.
0x0
Bits
Type
Name
Description
Initial Value
31:24
- - Reserved
-
23:0
W
PIORESET
PIO Pin Reset
Clears the corresponding bit in the PIODATA
output register.
0: No effect.
1: Clear the selected PIODATA bit.
0x0
Bits
Type
Name
Description
Initial Value
31:24
- - Reserved
-
76. GPIO23_00_DIR: PIO Pin Direction (offset: 0x0024)
77. GPIO23_00_POL: PIO Pin Polarity (offset: 0x0028)
78. GPIO23_00_SET: Set PIO Pin Data Bit (offset: 0x002C)
79. GPIO23_00_RESET: Clear PIO Pin Data Bit (offset: 0x0030)
80. GPIO23_00_TOG: Toggle PIO Pin Data Bit (offset: 0x0034)
PGMT7620_V.1.0_040503
Page 87 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
23:0
W
PIOTOG
PIO Pin Toggle
Toggles the corresponding bit in the PIODATA
output register.
0: No effect.
1: Invert the selected PIODATA bit.
0x0
Bits
Type
Name
Description
Initial Value
31:16
- - Reserved
-
15:0
RC
PIOINT
PIO Interrupt
A PIOINT bit is set when its corresponding PIO
pin changes Value and the edge for that pin is
enabled via the PIORMASK or PIOFMASK
register. The pin must be set as an input in the
PIODIR register to generate an interrupt.
Read
0: No change detected.
1: Change detected.
Write
All bits are cleared by writing 1 to either this
register or the PIOEDGE register.
NOTE: Changes to the PIO pins can only be
detected when the clock is running.
0x0
Bits
Type
Name
Description
Initial Value
31:16
- - Reserved
-
81. GPIO39_24_INT: PIO Pin Interrupt (offset: 0x0038)
82. GPIO39_24_EDGE: PIO Pin Edge Status (offset: 0x003C)
PGMT7620_V.1.0_040503
Page 88 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
15:0
RC
PIOEDGE
The PIOEDGE bits have different meanings
depending on whether the interrupt for that
pin is enabled via the PIORMASK or PIOFMASK
register.
Read
If the PIO Pin Interrupt for this PIO pin is
asserted, the corresponding PIOEDGE bit
indicates whether a falling or rising edge
triggered the interrupt.
0: Interrupt triggered by falling edge.
1: Interrupt triggered by rising edge.
If the interrupt is masked (disabled), the
PIOEDGE bit is set on either a rising or falling
edge and remains set until cleared by firmware.
Bits corresponding to pins that are not set as
inputs will never be set.
Write
All bits are cleared by writing 1 to either this
register or the PIOINT register.
NOTE: Changes to the PIO pins can only be
detected when the clock is running.
0x0
Bits
Type
Name
Description
Initial Value
31:16
- - Reserved
-
15:0
RW
PIORMASK
PIO Pin Rising Edge Interrupt Mask
Masks the PIO interrupt indicating when data
on the corresponding PIO pin transitions from a
0 to a 1, i.e. a rising edge.
0: No mask
1: Mask
NOTE: Edge detection is done after the polarity
is adjusted according to the PIOPOL register.
0x0
Bits
Type
Name
Description
Initial Value
31:16
- - Reserved
-
15:0
RW
PIOFMASK
PIO Pin Falling Edge Interrupt Mask
Masks the PIO interrupt indicating when data
on the corresponding PIO pin transitions from a
1 to a 0, i.e. a falling edge.
0: No mask
1: Mask
NOTE: Edge detection is done after the polarity
is adjusted according to the PIOPOL register.
0x0
83. GPIO39_24_RMASK: PIO Pin Rising Edge Interrupt Mask (offset: 0x0040)
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:16
- - Reserved
-
15:0
RW
PIODATA
PIO Pin Data
These bits are used for driving or sensing static
signals on the PIO pins. To drive a value onto a
PIO pin, the corresponding bit in the PIODIR
register must be set. If the corresponding
direction bit is set, the value written to the bit
in the PIODATA register will be driven at the
pin. A read of this register returns the value of
the signals currently on the PIO pins.
NOTE:
1. The value of any bit in this register is inverted
with respect to the pin if the corresponding bit
in the PIOPOL register is set, both in input and
output modes.
2. The values read from the PIO pins are not
synchronized; the user should be sure that the
data will not be changing when this register is
read, or should be aware that the bits which are
not static at that time may be inaccurate.
PC
Bits
Type
Name
Description
Initial Value
31:16
- - Reserved
-
15:0
RW
PIODIR
PIO Pin Direction
Sets the data direction on PIO pins
corresponding to bits in this register.
0: Set data direction to input.
1: Set data direction to output.
The values driven onto the PIO pins are
controlled by the PIOPOL and PIODATA
registers.
0x0
Bits
Type
Name
Description
Initial Value
31:16
- - Reserved
-
15:0
RW
PIOPOL
PIO Pin Polarity
Sets the polarity of data on PIO pins
corresponding to bits in this register.
0: Maintain original polarity
1: Invert existing polarity
NOTE: The polarity controls affect both input
and output modes.
0x0
85. GPIO39_24_DATA: PIO Pin Data (offset: 0x0048)
86. GPIO39_24_DIR: Program I/O Direction (offset: 0x004C)
87. GPIO39_24_POL: PIO Pin Polarity (offset: 0x0050)
PGMT7620_V.1.0_040503
Page 90 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:16
- - Reserved
-
15:0
RC
PIOSET
PIO Pin Set
Sets the corresponding bit in the PIODATA
output register.
0: No effect.
1: Set the selected PIODATA bit.
0x0
Bits
Type
Name
Description
Initial Value
31:16
- - Reserved
-
15:0
RC
PIORESET
PIO Pin Reset
Clears the corresponding bit in the PIODATA
output register.
0: No effect.
1: Clear the selected PIODATA bit.
0x0
Bits
Type
Name
Description
Initial Value
31:16
- - Reserved
-
15:0
RC
PIOTOG
PIO Pin Toggle
Toggles the corresponding bit in the PIODATA
output register.
0: No effect.
1: Invert the selected PIODATA bit.
0x0
Bits
Type
Name
Description
Initial Value
31:0
RC
PIOINT
PIO Pin Interrupt
A PIOINT bit is set when its corresponding PIO
pin changes value and the edge for that pin is
enabled via the PIORMASK or PIOFMASK
register. The pin must be set as an input in the
PIODIR register to generate an interrupt.
Read
0: No change detected.
1: Change detected.
Write
All bits are cleared by writing 1 to either this
register or the PIOEDGE register.
NOTE: Changes to the PIO pins can only be
detected when the clock is running.
0x0
88. GPIO39_24_SET: Set PIO Pin Data Bit (offset: 0x0054)
89. GPIO39_24_RESET: Clear PIO Pin Data Bit (offset: 0x0058)
90. GPIO39_24_TOG: Toggle PIO Pin Data Bit (offset: 0x005C)
91. GPIO71_40_INT: PIO Pin Interrupt Status (offset: 0x0060)
PGMT7620_V.1.0_040503
Page 91 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:0
RC
PIOEDGE
The PIOEDGE bits have different meanings
depending on whether the interrupt for that
pin is enabled via the PIORMASK or PIOFMASK
register.
Read
If the PIO PIN Interrupt for this PIO pin is
asserted, the corresponding PIOEDGE bit
indicates whether a falling or rising edge
triggered the interrupt.
0: Interrupt triggered by falling edge.
1: Interrupt triggered by rising edge.
If the interrupt is masked (disabled), the
PIOEDGE bit is set on either a rising or falling
edge and remains set until cleared by firmware.
Bits corresponding to pins that are not set as
inputs will never be set.
Write
All bits are cleared by writing 1 to either this
register or the PIOINT register.
NOTE: Changes to the PIO pins can only be
detected when the clock is running.
0x0
Bits
Type
Name
Description
Initial Value
31:0
RW
PIORMASK
PIO Pin Rising Edge Interrupt Mask
Masks the PIO interrupt indicating when data
on the corresponding PIO pin transitions from a
0 to a 1, i.e. a rising edge.
0: No mask
1: Mask
NOTE: Edge detection is done after the polarity
is adjusted according to the PIOPOL register.
0x0
Bits
Type
Name
Description
Initial Value
31:0
RW
PIOFMASK
PIO Pin Falling Edge Interrupt Mask
Masks the PIO interrupt indicating when data
on the corresponding PIO pin transitions from a
1 to a 0, i.e. a falling edge.
0: No mask
1: Mask
NOTE: Edge detection is done after the polarity
is adjusted according to the PIOPOL register.
0x0
92. GPIO71_40_EDGE: PIO Pin Edge Status (offset: 0x0064)
93. GPIO71_40_RMASK: PIO Pin Rising Edge Interrupt Mask (offset: 0x0068)
94. GPIO71_40_FMASK: PIO Pin Falling Edge Interrupt Mask (offset: 0x006C)
PGMT7620_V.1.0_040503
Page 92 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:0
RW
PIODATA
PIO Pin Data
These bits are used for driving or sensing static
signals on the PIO pins. To drive a value onto a
PIO pin, the corresponding bit in the PIODIR
register must be set. If the corresponding
direction bit is set, the value written to the bit
in the PIODATA register will be driven at the
pin. A read of this register returns the value of
the signals currently on the PIO pins.
NOTE:
1. The value of any bit in this register is inverted
with respect to the pin if the corresponding bit
in the PIOPOL register is set, both in input and
output modes.
2. The values read from the PIO pins are not
synchronized; the user should be sure that the
data will not be changing when this register is
read, or should be aware that the bits which
are not static at that time may be inaccurate.
PC
Bits
Type
Name
Description
Initial Value
31:0
RW
PIODIR
PIO Pin Direction
Sets the data direction on PIO pins
corresponding to bits in this register.
0: Set the data direction on this pin to input.
1: Set the data direction on this pin to output.
The values driven onto the PIO pins are
controlled by the PIOPOL and PIODATA
registers.
0x0
Bits
Type
Name
Description
Initial Value
31:0
RW
PIOPOL
PIO Pin Polarity
Sets the polarity of data on PIO pins
corresponding to bits in this register.
0: Maintain original polarity
1: Invert existing polarity
NOTE: The polarity controls affect both input
and output modes.
0x0
95. GPIO71_40_DATA: PIO Pin Data (offset: 0x0070)
96. GPIO71_40_DIR: PIO Pin Direction (offset: 0x0074)
97. GPIO71_40_POL: PIO Pin Polarity (offset: 0x0078)
PGMT7620_V.1.0_040503
Page 93 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:0
RC
PIOSET
PIO Pin Set
Sets the corresponding bit in the PIODATA
output register.
0: No effect.
1: Set the selected PIODATA bit.
0x0
Bits
Type
Name
Description
Initial Value
31:0
RC
PIORESET
PIO Pin Reset
Clears the corresponding bit in the PIODATA
output register.
0: No effect.
1: Clear the selected PIODATA bit.
0x0
Bits
Type
Name
Description
Initial Value
31:0
RC
PIOTOG
PIO Pin Toggle
Toggles the corresponding bit in the PIODATA
output register.
0: No effect.
1: Invert the selected PIODATA bit.
0x0
Bits
Type
Name
Description
Initial Value
31:1
- - Reserved
-
0
RC
PIOINT
PIO Pin Interrupt
A PIOINT bit is set when its corresponding PIO
pin changes value and the edge for that pin is
enabled via the PIORMASK or PIOFMASK
register. The pin must be set as an input in the
PIODIR register to generate an interrupt.
Read
0: No change detected.
1: Change detected.
Write
All bits are cleared by writing 1 to either this
register or the PIOEDGE register.
NOTE: Changes to the PIO pins can only be
detected when the clock is running.
0x0
Bits
Type
Name
Description
Initial Value
31:1
- - Reserved
-
98. GPIO71_40_SET: Set PIO Pin Data Bit (offset: 0x007C)
99. GPIO71_40_RESET: Clear PIO Pin Data bit (offset: 0x0080)
100. GPIO71_40_TOG: Toggle PIO Pin Data bit (offset: 0x0084)
101. GPIO72_INT: PIO Pin Interrupt Status (offset: 0x0088)
102. GPIO72_EDGE: PIO Pin Edge Status (offset: 0x008C)
PGMT7620_V.1.0_040503
Page 94 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
0
RC
PIOEDGE
The PIOEDGE bits have different meanings
depending on whether the interrupt for that
pin is enabled via the PIORMASK or PIOFMASK
register.
Read
If the PIO PIN Interrupt for this PIO pin is
asserted, the corresponding PIOEDGE bit
indicates whether a falling or rising edge
triggered the interrupt.
0: Interrupt triggered by falling edge.
1: Interrupt triggered by rising edge.
If the interrupt is masked (disabled), the
PIOEDGE bit is set on either a rising or falling
edge and remains set until cleared by firmware.
Bits corresponding to pins that are not set as
inputs will never be set.
Write
All bits are cleared by writing 1 to either this
register or the PIOINT register.
NOTE: Changes to the PIO pins can only be
detected when the clock is running.
0x0
Bits
Type
Name
Description
Initial Value
31:1
- - Reserved
-
0
RW
PIORMASK
PIO Pin Rising Edge Interrupt Mask
Masks the PIO interrupt indicating when data
on the corresponding PIO pin transitions from a
0 to a 1, i.e. a rising edge.
0: No mask
1: Mask
NOTE: Edge detection is done after the polarity
is adjusted according to the PIOPOL register.
0x0
Bits
Type
Name
Description
Initial Value
31:1
- - Reserved
-
0
RW
PIOFMASK
PIO Pin Falling Edge Interrupt Mask
Masks the PIO interrupt indicating when data
on the corresponding PIO pin transitions from a
1 to a 0, i.e. a falling edge.
0: No mask
1: Mask
NOTE: Edge detection is done after the polarity
is adjusted according to the PIOPOL register.
0x0
103. GPIO72_RMASK: PIO Pin Rising Edge Interrupt Mask (offset: 0x0090)
104. GPIO72_FMASK: PIO Pin Falling Edge Interrupt Mask (offset: 0x0094)
PGMT7620_V.1.0_040503
Page 95 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:1
- - Reserved
-
0
RW
PIODATA
PIO Pin Data
These bits are used for driving or sensing static
signals on the PIO pins. To drive a value onto a
PIO pin, the corresponding bit in the PIODIR
register must be set. If the corresponding
direction bit is set, the value written to the bit
in the PIODATA register will be driven at the
pin. A read of this register returns the value of
the signals currently on the PIO pins.
NOTE:
1. The value of any bit in this register is inverted
with respect to the pin if the corresponding bit
in the PIOPOL register is set, both in input and
output modes.
2. The values read from the PIO pins are not
synchronized; the user should be sure that the
data will not be changing when this register is
read, or should be aware that the bits which are
not static at that time may be inaccurate.
PC
Bits
Type
Name
Description
Initial Value
31:1
- - Reserved
-
0
RW
PIODIR
PIO Pin Direction
Sets the data direction on PIO pins
corresponding to bits in this register.
0: Set the data direction on this pin to input.
1: Set the data direction on this pin to output.
The values driven onto the PIO pins are
controlled by the PIOPOL and PIODATA
registers.
0x0
Bits
Type
Name
Description
Initial Value
31:1
- - Reserved
-
0
RW
PIOPOL
PIO Pin Polarity
Sets the polarity of data on PIO pins
corresponding to bits in this register.
0: Maintain original polarity
1: Invert existing polarity
NOTE: The polarity controls affect both input
and output modes.
0x0
105. GPIO72_DATA: PIO Pin Data (offset: 0x0098)
106. GPIO72_DIR: PIO Pin Direction (offset: 0x009C)
107. GPIO72_POL: PIO Pin Polarity (offset: 0x00A0)
PGMT7620_V.1.0_040503
Page 96 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:1
- - Reserved
-
0 W PIOSET
PIO Pin Set
Sets the corresponding bit in the PIODATA
output register.
0: No effect.
1: Set the selected PIODATA bit.
0x0
Bits
Type
Name
Description
Initial Value
31:1
- - Reserved
-
0 W PIORESET
PIO Pin Reset
Clears the corresponding bit in the PIODATA
output register.
0: No effect.
1: Clear the selected PIODATA bit.
0x0
Bits
Type
Name
Description
Initial Value
31:1
- - Reserved
-
0 W PIOTOG
PIO Pin Toggle
Toggles the corresponding bit in the PIODATA
output register.
0: No effect.
1: Invert the selected PIODATA bit.
0x0
108. GPIO72_SET: Set PIO Pin Data Bit (offset: 0x00A4)
109. GPIO72_RESET: Clear PIO Pin Data Bit (offset: 0x00A8)
110. GPIO72_TOG: Toggle PIO Pin Data Bit (offset: 0x00AC)
PGMT7620_V.1.0_040503
Page 97 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
I2C
Configuration
Registers
PalmBus
Interface
Clock Control
State Machine
Serdes
Arbiter
Data Holding
Registers
SCLK
L_SCLK
SCLK_OE_N
L_SD
SDOUT
SD_OE_N
RST_N
CLK
PB_I2C_SEL
PB_WE
PB_RE
PB_ADDR
PB_WDATA
PB_I2C_RDATA
PB_I2C_WAIT
2
2.9 I
C Controller
2.9.1 Features
Programmable I
Supports the Synchronous Inter-Integrated Circuits (I
2
C bus clock rate
2
C) serial protocol
Bi-directional data transfer
Programmable address width up to 8 bits
Sequential byte read or write capability
Device address and data address can be transmitted for device, page and address selection
Supports Standard mode and Fast mode
2.9.2 Block Diagram
Figure 2-7 I2C Controller Block Diagram
PGMT7620_V.1.0_040503
Page 98 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
No.
Offset
Register Name
Description
Page
111
0x0000
CONFIG
I2C Configuration
99
112
0x0004
CLKDIV
I2C Clock Divisor
99
113
0x0008
DEVADDR
I2C Device Address
100
114
0x000C
ADDR
I2C Address
100
115
0x0010
DATAOUT
I2C Data Out
100
116
0x0014
DATAIN
I2C Data In
101
117
0x0018
STATUS
I2C Status
101
118
0x001C
STARTXFR
I2C Transfer Start
102
119
0x0020
BYTECNT
I2C Byte Counter
102
2.9.3 List of Registers
PGMT7620_V.1.0_040503
Page 99 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
-
7:5
RW
ADDRLEN
Address Length
The value written to this register plus one
indicates the number of address bits to be
transferred from the I2C ADDR register.
0: Transfers a 1-bit address
1: Transfers a 2-bit address, etc.
0x0
4:2
RW
DEVADLEN
Device Address Length
The value written to this register plus one
indicates the number of device address bits to
be transferred from the DEVADDR register. This
field should be programmed to 6 for
compliance with I2C bus protocol.
0x0
1
RW
ADDRDIS
Address Disable
Selects whether the address is included in
transmission.
0: Normal transfers occur with the address
included in the transfer, followed by read or
write data.
1: The controller reads or writes serial data
without transferring the address.
0x0
0
RW
DEVADDIS
Device Address Disable
0: The device address is transmitted before the
data address.
1: The controller does not transfer the device
address.
NOTE:
1. If this bit is set, the ADDRDIS bit is ignored,
and an address is always transmitted.
2. Most I2C slave devices require a device
address to be transmitted; this bit should
typically be set to 0.
0x0
Bits
Type
Name
Description
Initial Value
31:16
- - Reserved
0x0
2.9.4 Register Descriptions (base: 0x1000_0900)
111. CONFIG: I
2
C Configuration Register (offset: 0x0000)
112. CLKDIV: I
2
C Clock Divisor Register (offset: 0x0004)
PGMT7620_V.1.0_040503
Page 100 of 523
MT7620 PROGRAMMING GUIDE
Integrated 802.11n MAC/BBP and 2.4 GHz RF/FEM Router-on-a-Chip
Bits
Type
Name
Description
Initial Value
15:0
RW
CLKDIV
Clock Divisor
The value written to this register is used to
generate the I2C bus SCLK signal by applying
the following equation:
SCLK frequency = 40 MHz / ( 2 x CLKDIV )
NOTE:
1. Only values of 8 and above are valid.
2. Due to synchronization between the I2C
internal clock and the system clock, the exact
equation is actually
SCLK frequency = PB_CLK frequency / ((2 x
CLKDIV) + 5).
For most systems, CLKDIV is usually
programmed to very larger numbers since the
system clock frequency should be orders of
magnitude faster than the I2C bus clock. These
results in the synchronization errors being
insignificant and the exact equation
approximating the simpler one given above.
0x0
Bits
Type
Name
Description
Initial Value
31:7
- - Reserved
0x0
6:0
RW
DEVADDR
I2C Device Address
This value is transmitted as the device address,
if DEVADDIS bit in the CONFIG register is not set
to 1.
0x0
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
0x0
7:0
RW
ADDR
I2C Address
These bits store the 8-bits of address to be sent
to the external I2C slave devices when the
ADDRDIS bit is 0.
0x0
Bits
Type
Name
Description
Initial Value
31:8
- - Reserved
0x0
7:0
RW
DATAOU
I2C Data Out
These bits store the 8-bits of data to be written
to the external I2C slave devices during a write
transfer.
0x0
113. DEVADDR: I
114. ADDR: I
115. DATAOUT: I
2
C Device Address Register (offset: 0x0008)
2
C Address Register (offset: 0x000C)
2
C Data Out Register (offset: 0x0010)
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.