MT7628 ProgrammingGuide 20140428 (E2)
MT7628 ProgrammingGuide 20140428 (E2)
NL
EO
US L
.tw TIA
om N
x.c DE
ne FI
MT7628
syn ON
PROGRAMMING GUIDE
C
Version: 1.0
g@ K
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
MT7628 Overview
The MT7628 SoC includes a high performance 580/575 MHz MIPS24KEc CPU core and high speed USB2.0/PCIe
interfaces, which is designed to enable a multitude of high performance, cost-effective IEEE 802.11n
EO
applications with a MediaTek WiFi client card.
US L
.tw TIA
Functional Block Diagram
16-Bit
EJTAG
DDR1/DDR2
om N
CLKGEN IOMUX
interrupts
RSTGEN Strap Pin
DDR1/DDR2
MIPS 24KEc Memory Controller
64KB I-Cache Rbus
32KB D-Cache OCP_IF 2ch Arbiter INTC
x.c DE
(580/575MHz) OCP Bridge
PWM x4 PWM
8ch QoS Arbiter
SPI(M) x2 SPI
SPI(S) SPI
RBUS (SYS_CLK)
ne FI UARTL x3 UART
APB BUS
GPIO GPIO
APB BUS
I2C I2C
SDXC AES SUTIF
syn ON
WPDMA PDMA GDMA
eMMC Engine USB 2.0 PCIe 1.1 3wSPI I2S I2S
Host Host
Controller Controller MAC
PCM PCM
WLAN Switch
UTMI PIPE BBP Timer
USB 2.0 PHY PCIe 1.1 PHY RF 11n 2x2 5-Port EPHY
C
SDXC
USB Host PCIe Host RJ45 x5
Host
2.4GHz
g@ K
There are several masters (MIPS 24KEc, USB, PCI Express, SDXC, FE) in the MT7628 SoC on a high performance,
rw IAT
low latency Rbus. In addition, the MT7628 SoC supports lower speed peripherals such as UART Lite, GPIO, I2C
and SPI via a low speed peripheral bus (Pbus). The DDR/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.
far D
R ME
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Document Revision History
EO
US L
.tw TIA
Revision Date Author Description
om N
x.c DE
ne FI
syn ON
C
g@ K
an E
rw IAT
far D
R ME
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Table of Contents
MT7628 OVERVIEW 2
EO
US L
FUNCTIONAL BLOCK DIAGRAM 2
DOCUMENT REVISION HISTORY 3
.tw TIA
TABLE OF CONTENTS 4
TABLE OF FIGURES 6
LIST OF TABLES 7
1. MIPS 24KEC PROCESSOR 8
1.1 FEATURES 8
om N
1.2 BLOCK DIAGRAM 9
1.3 MEMORY MAP SUMMARY 10
1.3 INTERUPT TABLE SUMMARY 11
x.c DE
1.4 CLOCK PLAN 12
2. REGISTERS 13
2.1 NOMENCLATURE 13
2.2 SYSTEM CONTROL
ne FI 14
2.2.1 FEATURES 14
2.2.2 BLOCK DIAGRAM 14
2.2.3 REGISTERS 15
syn ON
2.3 TIMER 32
2.3.1 FEATURES 32
2.3.2 BLOCK DIAGRAM 32
2.3.3 REGISTERS 33
C
2.5.1 REGSITER 46
2.6 R-BUS CONTROLLER 63
an E
2.6.1 FEATURES 63
2.6.2 BLOCK DIAGRAM 63
rw IAT
2.8.4 REGISTER 77
2.9 SPI SLAVE 91
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.12 SPI CONTROLLER 110
2.12.1 FEATURES 110
2.12.2 BLOCK DIAGRAM 110
EO
US L
2.12.3 REGISTERS 110
2.13 UART LITE 121
.tw TIA
2.13.1 FEATURES 121
2.13.2 REGISTERS 121
2.14 PCM CONTROLLER 135
2.14.1 FEATURES 135
2.14.2 BLOCK DIAGRAM 135
2.14.3 LIST OF REGISTERS 136
om N
2.14.4 PCM CONFIGURATION 136
2.14.5 REGISTER 138
x.c DE
2.15 GENERIC DMA CONTROLLER 155
2.15.1 FEATURES 155
2.15.2 BLOCK DIAGRAM 155
2.15.3 PERIPHERAL CHANNEL CONNECTION 155
2.15.4 REGISTERS
ne FI 156
2.16 AES CONTROLLER 204
2.16.1 REGISTERS 204
2.17 PWM (PULSE WIDTH MODULATION) 214
syn ON
2.17.1 REGISTERS 214
2.18 FRAME ENGINE 232
2.18.1 REGISTERS 232
2.19 SWITCH CONTROLLER 251
C
3. LIST 345
far D
R ME
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Table of Figures
EO
FIGURE 1-1 MT7628 BLOCK DIAGRAM .......................................................................................................................... 2
US L
FIGURE 1-1 MIPS 24KEC CPU BLOCK DIAGRAM ..................................................................................................... 9
FIGURE 1-2 MT7628 CLOCK DIAGRAM ........................................................................................................................ 12
.tw TIA
FIGURE 2-1 SYSTEM CONTROL BLOCK DIAGRAM ............................................................................................................. 14
FIGURE 2-2 TIMER BLOCK DIAGRAM ............................................................................................................................. 32
FIGURE 2-9 QOS ARBITRATION BLOCK DIAGRAM ............................................................................................................ 63
FIGURE 2-3 PROGRAMMABLE I/O BLOCK DIAGRAM ........................................................................................................ 76
2
FIGURE 2-7 I S TRANSMITTER BLOCK DIAGRAM ............................................................................................................ 103
FIGURE 2-8 I2S TRANSMIT/RECEIVE ........................................................................................................................... 103
om N
FIGURE 2-6 SPI CONTROLLER BLOCK DIAGRAM ............................................................................................................ 110
FIGURE 2-4 PCM CONTROLLER BLOCK DIAGRAM .......................................................................................................... 135
x.c DE
FIGURE 2-5 GENERIC DMA CONTROLLER BLOCK DIAGRAM............................................................................................. 155
ne FI
syn ON
C
g@ K
an E
rw IAT
far D
R ME
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
List of Tables
TABLE 1 THE IIR[5:0] CODES ASSOCIATED WITH THE POSSIBLE INTERRUPTS......................................................................... 123
EO
TABLE 2 DIVISOR NEEDED TO GENERATE A GIVEN BAUD RATE............................................................................................ 128
US L
TABLE 3 DIVISOR NEEDED TO GENERATE A GIVEN BAUD RATE FROM 13MHZ BASED ON DIFFERENT HIGHSPEED VALUE ............. 130
TABLE 4 DIVISOR NEEDED TO GENERATE A GIVEN BAUD RATE FROM 26 MHZ BASED ON DIFFERENT HIGHSPEED VALUE ............ 131
.tw TIA
TABLE 5 DIVISOR NEEDED TO GENERATE A GIVEN BAUD RATE FROM 52 MHZ BASED ON DIFFERENT HIGHSPEED VALUE ............ 131
om N
x.c DE
ne FI
syn ON
C
g@ K
an E
rw IAT
far D
R ME
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
1. MIPS 24KEc Processor
EO
1.1 Features
US L
8-stage pipeline
32-bit address paths
.tw TIA
64-bit data paths to caches and external interfaces
MIPS32-Compatible Instruction Set
Multiply-Accumulate and Multiply-Subtract Instructions (MADD, MADDU, MSUB, MSUBU)
Targeted Multiply Instruction (MUL)
Zero/One Detect Instructions (CLZ, CLO)
Wait instructions (WAIT)
om N
Conditional Move instructions (MOVZ, MOVN)
Prefetch instructions (PREF)
x.c DE
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
ne FI
latency for interrupt handlers)
Bit field manipulation instructions
MIPS32 Privileged Resource Architecture
syn ON
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
C
8-entry DTLB
Optional simple Fixed Mapping Translation (FMT) mechanism
an E
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
1.2 Block Diagram
EO
ISPRAM DMA
US L
OCP I/F Instruction EJTAG Off/on chip
i-cache 0/8/16/32/64 KB trace I/F
scratchpad
4-way set associative
.tw TIA
RAM Trace
TAP
User-defined Off-chip
CorExtend Debug I/F
block
CorExtend
Fetch Unit
8-entry instruction buffer
om N
512-entry BHT
4-entry RPS OCP
MDU
x.c DE
Interface on-
BIU chip Bus(es)
Execution Unit 4-entry merging
User-defined (RF/ALU/ MMU write buffer,
COP2 block Shift) 16/32/64 JTLB or FMT 10 outstanding
CP2 reads
ne FI
Non-blocking load/store
syn ON
unit
8 outstanding misses
DSPRAM
System Co-
DMA OCP
processor
Interface
D-cache Data scratchpad
C
0/8/16/32/64 KB RAM
Power 4-way set associative
Managment
g@ K
Fixed / Required
an E
Optional
rw IAT
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
1.3 Memory Map Summary
Start End Size Description
EO
US L
0000.0000 - 0FFF.FFFF 256 MBytes DDR 256 MB
.tw TIA
1000.0000 - 1000.00FF 256 Bytes SYSCTL
1000.0100 - 1000.01FF 256 Bytes TIMER
1000.0200 - 1000.02FF 256 Bytes INTCTL
1000.0300 - 1000.03FF 256 Bytes EXT_MC_ARB (DDR/DDR II)
1000.0400 - 1000.04FF 256 Bytes Rbus Matrix CTRL
1000.0500 - 1000.05FF 256 Bytes MIPS CNT
om N
1000.0600 - 1000.06FF 256 Bytes GPIO
1000.0700 - 1000.07FF 256 Bytes SPI Slave
x.c DE
1000.0800 - 1000.08FF 256 Bytes <<Reserved>>
1000.0900 - 1000.09FF 256 Bytes I2C
1000.0A00 - 1000.0AFF 256 Bytes I2S
1000.0B00 - 1000.0BFF 256 Bytes SPI Master
1000.0C00 - 1000.0CFF 256 Bytes UARTLITE 1
1000.0D00
1000.0E00
ne FI -
-
1000.0DFF
1000.0EFF
256 Bytes
256 Bytes
UARTLITE 2
UARTLITE 3
1000.0F00 - 1000.0FFF 256 Bytes <<Reserved>>
syn ON
1000.1000 - 1000.17FF 2 KBytes RGCTL
1000.1800 - 1000.1FFF 2 KBytes <<Reserved>>
1000.2000 - 1000.27FF 2 KBytes PCM (up to 16 channels)
1000.2800 - 1000.2FFF 2 KBytes Generic DMA (up to 16 channels)
1000.3000 - 1000.3FFF 4 KBytes <<Reserved>>
C
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
1.3 Interupt Table Summary
SI_Int -
EO
US L
Module Source Pin Level/Edge
SI_Int0 soc_cirq cpu_irq0 Level
.tw TIA
SI_Int1 soc_cirq cpu_irq1 Level
SI_Int2 PCIE pcie_int_req Level
SI_Int3 FE fe_int_req Level
SI_Int4 WLAN wlan_int_req Level
SI_Int5 MIPS24Kec/aux_tick SI_TIMERInt/stk_int Level
om N
INTC -
Module Source Pin Level/Edge
x.c DE
soc_cirq_int0 SYSCTL sysctl_int Level
soc_cirq_int1 SPIS SW interrupt Level
soc_cirq_int2
soc_cirq_int3 DRAMC mc_int Level
soc_cirq_int4 PCM pcm_int Level
ne FI
soc_cirq_int5
soc_cirq_int6 GPIO gpio_int Level
soc_cirq_int7 GDMA gdma_int Level
syn ON
soc_cirq_int8
soc_cirq_int9 MIPS24Kec pc_int Level
soc_cirq_int10 I2S i2s_int Level
soc_cirq_int11 SPI spi_int Level
soc_cirq_int12
C
soc_cirq_int19
soc_cirq_int20 UART-LITE uart0_int Level
rw IAT
soc_cirq_int29
soc_cirq_int30
soc_cirq_int31
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
1.4 Clock Plan
EO
US L
Pull-up/dwon
QI_IORDY_V33
QI_IORDY_V33
.tw TIA
PAD_PORST_N
xtal_sel[1:0]
EXT_BGCLK 1 QI_PMU_RST
dkydelitch xtest_mode
pincap scan_mod
olt_mode
…..
NI_BGCLK 0
ANA_PMU_A102 35KHz ~ 40MHz
03A
wifisys_top
NI_EXCLK (7603)
sync_en_wf0_txdig (dig_en_wf0_txdig)
QI_SYSRDY_33
C wifisys_top_txdig_f480m_clk_int
om N
G
AD_XO_BBTOP_CLK
25/40MHz 20/25MHz
AD_XO_F20M_CLK_USB
x.c DE
PAD_XTALIN DA_XO_PREBUF_EN /3 sys_clk
PAD_CLKOUTP I
S C 25/40MHz /1 for 25/40M
AD_XO_BBTOP_CLK
PAD_CLKOUTN O G
1 /10 for 580M
DA_XO_DIGPREBUF_EN cpu_clk
A10203_RF [40]: 580MHz frac_gen
1 ocp_clk
osc_rdy
I [25]: 575MHz 0
S AD_XO_EPHY_CK
CPU PLL
O 0
(SSC) /3 dram_clk
25/40MHz
ne FI BBP
PLL
I
S
O
AD_TOP_TXDIG_F480M_CLK_INT
/2
PCM/I2S
PCM_240
USB2.0 Host
syn ON
Freq@XTAL=20M Freq@XTAL=25M Freq@XTAL=40M IP
PCIe, CPUPLL, SoC,
AD_XO_BBTOP_CK 20 25 40 20MHz
WiFi 240 MHz
AD_XO_F20M_CLK_USB 20 25 20 WiFi USB PHY
/24 120 MHz
AD_XO_EPHY_CK 20 25 40 EPHY (pll)
AD_TOP_TXDIG_F480M_
CLK_INTP_CK
480 480 480 SoC, WiFi
1 25/40MHz
clk_peri
C
(timer/uart/I2C)
0
/12
25/40MHz
(DA_PE1_NS_XTAL_CK) 100MHz
PCIe PCIe PCIe_CLK
DRV (EXT)
g@ K
PHY-A
(pll) 125MHz
0
PCIe pcie_clk
25MHz (from EPHY) (host)
PHY-D
1
125MHz (from EPHY)
an E
PCIe Host
0
pcie_aux_clk
(host)
rw IAT
/100 1
250MHz
25/40MHz ck_250m
EPHY PLL
20/25/40MHz ck_50m
50MHz
SWPHY_top
far D
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2. Registers
EO
2.1 Nomenclature
US L
The following nomenclature is used for register types:
.tw TIA
RO Read Only
WO Write Only
RW Read or Write
RC Read Clear
W1C Write One Clear
- Reserved bit
om N
X Undefined binary value
x.c DE
ne FI
syn ON
C
g@ K
an E
rw IAT
far D
R ME
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.2 System Control
EO
2.2.1 Features
US L
Provides read-only chip revision registers
Provides a window to access boot-strapping signals
.tw TIA
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)
om N
2.2.2 Block Diagram
x.c DE
System Control Block
Memory Remapping
CPU Rbus Wrapper
Boot Strapping Signals
ne FI System Control
GPIO Pin Muxing Scheme
Pin Muxing Block
To/From MIPS
APBus Interface
C
g@ K
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.2.3 Registers
SYSCTL Changes LOG
EO
Revision Date Author Change Log
US L
0.1 2013/10/3 PeterCT Wu Initial for MT7628
0.2 2014/4/28 PeterCT Wu MT7628 E2
.tw TIA
Module name: SYSCTL Base address: (+10000000h)
Address Name Widt Register Function
h
om N
10000000 CHIPID0_3 32 CHIP ID ASCII Character 0-3
10000004 CHIPID4_7 32 CHIP ID ASCII Character 4-7
x.c DE
10000008 EE_CFG 32 E-Fuse Configuration
1000000C CHIP_REV_ID 32 Chip Revision Identification
10000010 SYSCFG0 32 System Configuration Register 0
10000014 SYSCFG1 32 System Configuration Register 1
10000018 ne FI TESTSTAT 32 Firmware Test Status
1000001C TESTSTAT2 32 Firmware Test Status 2
10000028 ROM_STATUS 32 Andes ROM Status
1000002C CLKCFG0 32 Clock Configuration Register 0
syn ON
10000030 CLKCFG1 32 Clock Configuration Register 1
10000034 RSTCTL 32 Reset Control Register
10000038 RSTSTAT 32 Reset Status Register
1000003C AGPIO_CFG 32 Analog GPIO Configuration
C
3637544
10000000 CHIPID0_3 CHIP ID ASCII Character 0-3
D
R ME
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name CHIP_ID3 CHIP_ID2
Type RO RO
Reset 0 0 1 1 0 1 1 0 0 0 1 1 0 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name CHIP_ID1 CHIP_ID0
Type RO RO
Reset 0 1 0 1 0 1 0 0 0 1 0 0 1 1 0 1
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
31:24 CHIP_ID3 ASCII CHIP Name Identification Character 3
23:16 CHIP_ID2 ASCII CHIP Name Identification Character 2
EO
US L
15:8 CHIP_ID1 ASCII CHIP Name Identification Character 1
7:0 CHIP_ID0 ASCII CHIP Name Identification Character 0
.tw TIA
2020383
10000004 CHIPID4_7 CHIP ID ASCII Character 4-7
2
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
om N
Name CHIP_ID7 CHIP_ID6
Type RO RO
Reset 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0
x.c DE
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name CHIP_ID5 CHIP_ID4
Type RO RO
Reset 0 0 1 1 1 0 0 0 0 0 1 1 0 0 1 0
Bit(s)
31:24
ne FI
Name
CHIP_ID7
Description
ASCII CHIP Name Identification Character 3
23:16 CHIP_ID6 ASCII CHIP Name Identification Character 2
syn ON
15:8 CHIP_ID5 ASCII CHIP Name Identification Character 1
7:0 CHIP_ID4 ASCII CHIP Name Identification Character 0
C
0000000
10000008 EE_CFG E-Fuse Configuration
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
g@ K
EE_CFG1
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
an E
Name EE_CFG0
Type RO
rw IAT
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0001010
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
16 PKG_ID Package ID
EO
US L
0: DRQFN10x10-110
1: DRQFN12x12-156
11:8 VER_ID Chip Version ID
.tw TIA
3:0 ECO_ID Chip ECO ID
0000010
10000010 SYSCFG0 System Configuration Register 0
0
om N
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name TEST_CODE BS_SHADOW[8:4]
x.c DE
Type RW RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DB XT
TES TES
G_J AL_ DR
T_ EXT T_
TA FR AM
Name ne FI
BS_SHADOW[3:0]
G_
MO
DE
MO
DE_
1
EQ
_SE
L
_B
G
MO
DE_
0
CHIP_MODE
_TY
PE
Type RO RO RO RO RO RO RO RO
syn ON
Reset 0 0 0 0 1 0 0 0 0 0 0 0 0
SYSCFG1.PULL_EN)
Displays a backup copy of the last bootup value
8 DBG_JTAG_MODE JTAG for MIPS and Andes
g@ K
1: Normal Boot-up
0: JTAG mode(MIPS & Andes)
7 TEST_MODE_1 Test Mode[1:0]
an E
1: 3-wire SPI
3:1 CHIP_MODE Chip Mode
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
0 DRAM_TYPE DDR type
[note] This DDR attribute is not valid for KN package.. ( 7628KN has DDR1
EO
KGD)
US L
0: DDR2
1: DDR1
.tw TIA
0000000
10000014 SYSCFG1 System Configuration Register 1
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
om N
PU
Name LL_
EN
x.c DE
Type RW
Reset 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name
Type
Reset
Bit(s)
ne FI
Name Description
16 PULL_EN Internal Manual Boot-Strap
syn ON
1: enable
0: disable
0000000
C
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
an E
Name TESTSTAT[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
rw IAT
0000000
1000001C TESTSTAT2 Firmware Test Status 2
R ME
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name TESTSTAT2[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TESTSTAT2[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
31:0 TESTSTAT2 Firmware Test Status Register 2
NOTE: This register is reset only by a power-on reset.
EO
US L
.tw TIA
ROM_STATU 0000000
10000028 Andes ROM Status
S 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
om N
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name STATUS
Type RO
x.c DE
Reset 0 0 0 0 0 0 0 0
0020100
1000002C CLKCFG0 Clock Configuration Register 0
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
INT
C
_CL
K_F
Name OSC_1US_DIV INT_CLK_FDIV
FR
AC[
g@ K
4:4]
Type RW RW RW
Reset 0 0 0 0 0 0 0 1 0 0 0 0
an E
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PCI PE DIS CP CP
EN_
E_E RI_ _B U_F U_F
rw IAT
DIS BB
Name INT_CLK_FFRAC[3:0] REFCLK0_RATE XT_ CL BP_ RM RM
_N9 P_C
125 K_S SLE _B _XT
LK
M EL EP BP AL
Type RW RW RW RW RW RW RW RW RW
Reset 0 0 0 1 0 0 0 0 0 0 0 0 0 0
MHz external XTAL input. The count increments each 1usec (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.
0: Automatically generates a 1 usec system tick regardless of whether XTAL
frequency is 20 MHz or 40 MHz.
39: Default value for an external 40 MHz XTAL.
19: Default value for an external 20 MHz XTAL.
Others: Manual mode for tick generation.
22:18 INT_CLK_FDIV Internal Clock Frequency Divider for I2S/PCM
The frequency divider used to generate the Fraction-N clock frequency.
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
Valid values range from 1 to 31.
Fraction-N clock frequency = (INT_CLK_FFRAC/INT_CLK_FDIV)*PLL_FREQ
EO
16:12 INT_CLK_FFRAC Internal Clock Fraction-N Frequency for I2S/PCM
US L
A parameter used in conjunction with INT_CLK_FDIV to generate the
Fraction-N clock frequency.
.tw TIA
Valid values range from 0 to 31.
Fraction-N clock Frequency =
(INT_CLK_FFRAC/INT_CLK_FDIV)*PLL_FREQ
11:9 REFCLK0_RATE Output clock rate of reference Clock 0
7: CPUPLL Clock/8
6: Off
5: Internal Fraction-N_CLK/2 (I2S/PCM)
om N
4: 48 MHz
3: 40 MHz
x.c DE
2: 25 MHz
1: 12 MHz
0: Xtal clock(25/40 MHz by boot strap)
7 DIS_N9 Pause Andes Execution
[Note] This bit is initialized by HW STRAP and can be changed by SW
ne FI afterwards.
1: Enable
0: default
5 PCIE_EXT_125M PCIe 125MHZ Clock Source
syn ON
1: Ext. 125MHz Source (EPHY)
0: PCIe PHY 125M
4 PERI_CLK_SEL Peripheral Clock Source Select
1: XTAL input
0: 40 MHz from BBP 480 MHz divided by 12
C
0: 580MHz CPUPLL
0 CPU_FRM_XTAL CPU clock from XTAL
[Note] This bit is initialized by HW STRAP and can be changed by SW
afterwards.
1: XTAL input
0: CPUPLL
far D
R ME
F69F7F0
10000030 CLKCFG1 Clock Configuration Register 1
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
CR
PW SD MIP UP ET UA UA
YPT PCI SPI I2S I2C
M_ XC_ SC_ HY_ H_ RT2 RT1
O_ E_C _CL _CL _CL
Name CL CL
CL
CL
LK_
CL CL _CL _CL
K_E K_E K_E
K_E K_E K_E K_E K_E K_E K_E
K_E EN N N N
N N N N N N N
N
Type RW RW RW RW RW RW RW RW RW RW RW RW
Reset 1 1 1 1 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
GD UA PC TIM
PIO MC INT
MA RT0 M_ ER_
_CL _CL _CL
Name _CL
K_E
_CL CL
K_E K_E
CL
K_E K_E K_E K_E
EO
N N N
N N N N
US L
Type RW RW RW RW RW RW RW
Reset 1 1 1 1 1 1 1
.tw TIA
Bit(s) Name Description
31 PWM_CLK_EN PWM clock control
1: Clock Enable
0: Clock Disable
30 SDXC_CLK_EN SDXC clock control
om N
1: Clock Enable
0: Clock Disable
x.c DE
29 CRYPTO_CLK_EN AUX system tick counter clock control
1: Clock Enable
0: Clock Disable
28 MIPSC_CLK_EN MIPS Counter clock control
1: Clock Enable
26
ne FI
PCIE_CLK_EN
0: Clock Disable
PCIE2 clock control
1: Clock Enable
0: Clock Disable
syn ON
25 UPHY_CLK_EN UPHY clock control
1: Clock Enable
0: Clock Disable
23 ETH_CLK_EN ETH clock control
C
1: Clock Enable
0: Clock Disable
20 UART2_CLK_EN UART2 clock control
1: Clock Enable
g@ K
0: Clock Disable
19 UART1_CLK_EN UART1 clock control
an E
1: Clock Enable
0: Clock Disable
18 SPI_CLK_EN SPI clock control
rw IAT
1: Clock Enable
0: Clock Disable
17 I2S_CLK_EN I2S clock control
1: Clock Enable
0: Clock Disable
16 I2C_CLK_EN I2C clock control
far D
1: Clock Enable
0: Clock Disable
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
1: Clock Enable
0: Clock Disable
EO
10 MC_CLK_EN MC clock control
US L
1: Clock Enable
0: Clock Disable
.tw TIA
9 INT_CLK_EN INT clock control
1: Clock Enable
0: Clock Disable
8 TIMER_CLK_EN TIMER clock control
1: Clock Enable
0: Clock Disable
om N
x.c DE
0400040
10000034 RSTCTL Reset Control Register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
AU
CR
Name
PW
M_
RS
ne FI
SD
XC_
RS
YPT
O_
RS
X_S
TC
K_
PCI
E_R
ST
EP
HY_
RS
ET
H_
RS
UH
ST_
RS
UA
RT2
_RS
UA
RT1
_RS
SPI
_RS
T
I2S
_RS
T
I2C
_RS
T
T T RS T T T T T
T
T
syn ON
Type RW RW RW RW RW RW RW RW RW RW RW RW RW
Reset 0 0 0 0 1 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GD UA PC TIM
PIO MC INT HIF WIF SPI SY
MA RT0 M_ ER_
Name _RS
_RS
_RS RS
_RS _RS
RS
_RS I_R S_R S_R
T T T T ST ST ST
C
T T T T
W1
Type RW RW RW RW RW RW RW RW RW RW
C
Reset 0 0 0 0 1 0 0 0 0 0 0
g@ K
0: Reset Deassert
26 PCIE_RST PCIE reset control
1: Reset Assert
0: Reset Deassert
24 EPHY_RST EPHY reset control
1: Reset Assert
0: Reset Deassert
23 ETH_RST ETH reset control
1: Reset Assert
0: Reset Deassert
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
22 UHST_RST USB PHY reset control
1: Reset Assert
EO
0: Reset Deassert
US L
20 UART2_RST UART2 reset control
1: Reset Assert
.tw TIA
0: Reset Deassert
19 UART1_RST UART1 reset control
1: Reset Assert
0: Reset Deassert
18 SPI_RST SPI reset control
1: Reset Assert
om N
0: Reset Deassert
17 I2S_RST I2S reset control
x.c DE
1: Reset Assert
0: Reset Deassert
16 I2C_RST I2C reset control
1: Reset Assert
0: Reset Deassert
14
ne FI
GDMA_RST GDMA reset control
1: Reset Assert
0: Reset Deassert
syn ON
13 PIO_RST PIO reset control
1: Reset Assert
0: Reset Deassert
12 UART0_RST UART0 reset control
1: Reset Assert
C
0: Reset Deassert
11 PCM_RST PCM reset control
1: Reset Assert
g@ K
0: Reset Deassert
10 MC_RST MC reset control
1: Reset Assert
an E
0: Reset Deassert
9 INT_RST INT reset control
rw IAT
1: Reset Assert
0: Reset Deassert
8 TIMER_RST TIMER reset control
1: Reset Assert
0: Reset Deassert
5 HIF_RST WIFI HIF reset control
far D
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
1: Whole System Reset
0: NA
EO
US L
.tw TIA
C003000
10000038 RSTSTAT Reset Status Register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
WD
WD
T2S
T2R
YS
Name ST WDTRSTPD
RS
om N
O_
T_E
EN
N
Type RW RW RW
x.c DE
Reset 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WD
N9_
RS N9S
WD SW WD
T_T YS
Name ON
RS
RS
SYS RS
ne FI 9_E
N
T_E
N
T
W1
RST
W1
T
W1
Type RW RW
C C C
syn ON
Reset 0 0 0 0 0
1: Enable
0: Disable
30 WDT2RSTO_EN WDT reset apply to watch dog reset pin out.
1: Enable
g@ K
0: Disable
29:16 WDTRSTPD Watchdog Reset Output Low Period
an E
output pin.
When WDTRSTPD= 3, you can see duration of 4 usec low on the WDT reset
output pin.
(unit: 1 usec)
9 WDRST_TON9_EN MIPS software reset or watch-dog reset apply to N9 subsys.
When this bit is set, MIPS can reset N9 or N9 is reset when MISP watch-dog
far D
reset happen.
0: disable
1: Enable
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
2 SWSYSRST Software system reset occurred
This bit will be set if software reset the chip by writing to the RSTSYS bit in
EO
RSTCTL. Writing a '1' will clear this bit. Writing a '0' has not effect.
US L
NOTE: This register is reset only by a power on reset.
0: Has no effect.
.tw TIA
1: Clears this bit.
1 WDRST Watchdog reset occurred
This bit will be set if the watchdog timer reset the chip. Writing a '1' will clear
this bit. Writing a '0' has not effect.
NOTE: This register is reset only by power-on reset.
0: Has no effect.
1: Clears this bit.
om N
x.c DE
001F001
1000003C AGPIO_CFG Analog GPIO Configuration
F
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
EP
Name
ne FI EPHY_GPIO_AIO_EN
HY_
P0_
DIS
Type RW RW
Reset
syn ON
1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RE
RF_ I2S I2S I2S I2S
WL F_C
OL EIN _CL _W _SD _SD
ED_ LK
Name T_ T_S K_ S_A O_ I_AI
OD O_
MO EL AIO IO_ AIO O_
_EN AIO
C
DE _EN EN _EN EN
_EN
Type RW RW RW RW RW RW RW RW
Reset 0 0 0 1 1 1 1 1
g@ K
1: Digital PAD
16 EPHY_P0_DIS EPHY P0 Disable
0: Enable
1: Disable
12 RF_OLT_MODE Enable RF OLT mode
0: DIsable
far D
1: Enable
9 EINT_SEL Andes EINT Source
R ME
0: from W_UTIF
1: from GPIO [23:20]
8 WLED_OD_EN WLED Open-Drain
0: DIsable
1: Open-Drain
4 REF_CLKO_AIO_E REF Clock Output PAD Selection
N 0: Analog PAD
1: Digital PAD
3 I2S_CLK_AIO_EN I2S Clock PAD Selection
0: Analog PAD
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
1: Digital PAD
2 I2S_WS_AIO_EN I2S WS PAD Selection
EO
US L
0: Analog PAD
1: Digital PAD
1 I2S_SDO_AIO_EN I2S CSDO PAD Selection
.tw TIA
0: Analog PAD
1: Digital PAD
0 I2S_SDI_AIO_EN I2S SDI PAD Selection
0: Analog PAD
1: Digital PAD
om N
x.c DE
0000000
10000040 N9_GPIO_INT Andes GPIO Interrupt
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
GPI
O_I
Name ne FI NT[
16:
16]
W1
Type
C
syn ON
Reset 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GPIO_INT[15:0]
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
C
N9_GPIO_MA 0001FFF
an E
GPI
O_
MA
Name SK[
16:
16]
Type RW
far D
Reset 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GPIO_MASK[15:0]
R ME
Type RW
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
5405040
10000060 GPIO1_MODE GPIO1 purpose selection
4
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
RE PE
FCL RS
PWM1_MO PWM0_MO UART2_M UART1_M
Name I2C_MODE K_ T_
EO
DE DE ODE ODE
MO MO
US L
DE DE
Type RW RW RW RW RW RW RW
.tw TIA
Reset 0 1 0 1 0 1 0 0 0 0 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
WD SPI
T_ _M UART0_M SPI_CS1_ SPIS_MOD GPIO_MO
Name MO OD
SD_MODE
ODE
I2S_MODE
MODE E DE
DE E
Type RW RW RW RW RW RW RW RW
Reset 0 0 0 1 0 0 0 0 0 0 0 1 0 0
om N
Bit(s) Name Description
x.c DE
31:30 PWM1_MODE PWM1 GPIO mode
3: SDXC D6
2: UTIF[5]
1: GPIO
0: PWM ch1
29:28 ne FI
PWM0_MODE PWM0 GPIO mode
3: SDXC D7
2: UTIF[4]
1: GPIO
syn ON
0: PWM ch0
27:26 UART2_MODE UART2 GPIO mode
3: SDXC D5/D4
2: PWM ch2/ch3
1: GPIO
C
0: UART-Lite #2
25:24 UART1_MODE UART1 GPIO mode
3: SW_R, SW_T
g@ K
2: PWM ch0/ch1
1: GPIO
0: UART-Lite #1
an E
0: I2C
18 REFCLK_MODE REFCLK GPIO mode
1: GPIO
0: REFCLK (12M)
16 PERST_MODE PCIe RESET GPIO mode
1: GPIO
far D
0: PCIe reset
14 WDT_MODE Watch dog timeout GPIO mode
R ME
1: GPIO
0: Watch dog
12 SPI_MODE SPI GPIO mode
1: GPIO
0: SPI
11:10 SD_MODE SDXC GPIO mode
3: Andes JTAG
2: UTIF[17:10]
1: GPIO
0: SDXC
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
9:8 UART0_MODE UART0 GPIO mode
1: GPIO
EO
0: UART-Lite #0
US L
7:6 I2S_MODE I2S GPIO mode
3: ANTSEL[5:2]
.tw TIA
2: PCM
1: GPIO
0: I2S
5:4 SPI_CS1_MODE SPI CS1 GPIO mode
2: REFCLK
1: GPIO
om N
0: SPI CS1
3:2 SPIS_MODE SPI Slave GPIO mode
x.c DE
3: PWM CH0/1 and UART2
2: UTIF[3:0]
1: GPIO
0: SPI Slave
1:0 GPIO_MODE GPIO mode
ne FI 3: PCIe Reset
2: REFCLK (12M)
1: GPIO
0: GPIO
syn ON
0555055
10000064 GPIO2_MODE GPIO2 purpose selection
5
C
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
P4_LED_K P3_LED_K P2_LED_K P1_LED_K P0_LED_K WLED_KN
Name
N_MODE N_MODE N_MODE N_MODE N_MODE _MODE
Type RW RW RW RW RW RW
Reset
g@ K
0 1 0 1 0 1 0 1 0 1 0 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
P4_LED_A P3_LED_A P2_LED_A P1_LED_A P0_LED_A WLED_AN
Name N_MODE N_MODE N_MODE N_MODE N_MODE _MODE
an E
Type RW RW RW RW RW RW
Reset 0 1 0 1 0 1 0 1 0 1 0 1
rw IAT
1: GPIO
0: EPHY P4 LED
25:24 P3_LED_KN_MODE EPHY P3 LED GPIO mode
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
21:20 P1_LED_KN_MODE EPHY P1 LED GPIO mode
[Note] Only valid for MT7628KN.
EO
3: JTAG (JTDI)
US L
2: UTIF[9]
1: GPIO
.tw TIA
0: EPHY P1 LED
19:18 P0_LED_KN_MODE EPHY P0 LED GPIO mode
[Note] Only valid for MT7628KN.
3: JTAG(JTDO)
2: Reserved
1: GPIO
0: EPHY P0 LED
om N
17:16 WLED_KN_MODE WLED GPIO mode
[Note] Only valid for MT7628KN.
x.c DE
3: Reserved
2: Reserved
1: GPIO
0: WLED
11:10 P4_LED_AN_MODE EPHY P4 LED GPIO mode
ne FI [Note] Only valid for MT7628AN.
3: JTAG (JTRST_N)
2: UTIF[6]
1: GPIO
syn ON
0: EPHY P4 LED
9:8 P3_LED_AN_MODE EPHY P3 LED GPIO mode
[Note] Only valid for MT7628AN.
3: JTAG (JTCLK)
2: UTIF[7]
C
1: GPIO
0: EPHY P3 LED
7:6 P2_LED_AN_MODE EPHY P2 LED GPIO mode
[Note] Only valid for MT7628AN.
g@ K
3: JTAG (JTMS)
2: UTIF[8]
1: GPIO
an E
0: EPHY P2 LED
5:4 P1_LED_AN_MODE EPHY P1 LED GPIO mode
rw IAT
3: JTAG(JTDO)
2: Reserved
R ME
1: GPIO
0: EPHY P0 LED
1:0 WLED_AN_MODE WLED GPIO mode
[Note] Only valid for MT7628AN.
3: Reserved
2: Reserved
1: GPIO
0: WLED
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0000000
10000068 MEMO1 Memory1
0
EO
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
US L
Name MEMO1[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name MEMO1[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
31:0 MEMO1 Memory1
x.c DE
0000000
1000006C MEMO2 Memory2
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset 0
ne FI 0 0 0 0 0 0
MEMO2[31:16]
0
RW
0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
syn ON
Name MEMO2[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
10000070 EXT_MEMO1 Extend Application #1
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
an E
Name MEMO1[31:16]
Type RW
rw IAT
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name MEMO1[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
10000074 EXT_MEMO2 Extend Application #2
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name MEMO2[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name MEMO2[15:0]
Type RW
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
31:0 MEMO2 Extend Application #2
US L
.tw TIA
0000000
10000078 EXT_MEMO3 Extend Application #3
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name MEMO3[31:16]
Type RW
om N
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name MEMO3[15:0]
x.c DE
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name MEMO4[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
g@ K
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.3 Timer
EO
2.3.1 Features
US L
Independent 1usec tick pre-scale for each timer.
Independent interrupts for each timer.
.tw TIA
Two general-purpose timers and a watchdog timer. Watchdog timer resets system on time-out.
Timer Modes
Periodic
In periodic mode, the timer counts down to zero from the limited value. An interrupt is generated when
the count is zero. After reaching zero, the limited value is reloaded into the timer and the timer counts
om N
down again. A limited value of zero disables the timer.
Timeout
x.c DE
In timeout mode, the timer counts down to zero from the limited 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.
Watchdog
ne FI
In watchdog mode, the timer counts down to zero from the limited 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
syn ON
system control block; it remains set to alert firmware of the timeout event when it re-executes its
bootstrap.
Timer 0
Timer 1 Interrupt
Watchdog Timer (Timer 1)
rw IAT
Interrupt
Control
Limited Value Prescale
Timer 2
Watchdog Timeout
Limited Value Prescale
R ME
APBus Signals
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.3.3 Registers
EO
US L
Revision Date Author Change Log
0.1 2012/8/24 Leon Chung Initialization
.tw TIA
0.2 2013/12/10 Rick Ho 1. Modify T0CTL_REG Bit[4] to WO and add Bit[3] RO
2. Modify WDTCTL_REG Bit[4] to WO and add Bit[3]
RO 3. Modify T1CTL_REG Bit[4] to WO and add Bit[3]
RO
om N
Module name: TIMER Base address: (+10000100h)
Address Name Widt Register Function
h
x.c DE
10000100 TGLB_REG 32 RISC Global Control Register
10000110 T0CTL_REG 32 RISC Timer 0 Control Register
10000114 T0LMT_REG 32 RISC Timer 0 Limit Register
10000118 ne FI T0_REG 32 RISC Timer 0 Register
10000120 WDTCTL_REG 32 Watch Dog Timer Control Register
10000124 WDTLMT_REG 32 Watch Dog Timer Limit Register
10000128 WDT_REG 32 Watch Dog Timer Register
syn ON
10000130 T1CTL_REG 32 RISC Timer 1 Control Register
10000134 T1LMT_REG 32 RISC Timer 1 Limit Register
10000138 T1_REG 32 RISC Timer 1 Register
C
0000000
10000100 TGLB_REG RISC Global Control Register
0
g@ K
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV1[20:5]
Type RO
an E
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw IAT
WD WD
T1R T0R T1I T0I
Name RESV1[4:0]
ST
TR
ST
RESV0
NT
TIN
NT
ST T
W1 W1 W1 W1 W1 W1
Type RO RO
C C C C C C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
far D
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
0 T0INT Timer 0 interrupt status
EO
US L
0000000
.tw TIA
10000110 T0CTL_REG RISC Timer 0 Control Register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name T0PRES
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
om N
T0A
T0E T0A L_S
Name RESV2 RESV1 RESV0
N L TAT
US
x.c DE
Type RO RW RO WO RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1: Enable
0: Disable
2:0 RESV0 Reserved
g@ K
an E
0000000
10000114 T0LMT_REG RISC Timer 0 Limit Register
0
rw IAT
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV0
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name T0LMT
Type RW
Reset
far D
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000FFF
10000118 T0_REG RISC Timer 0 Register
F
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV0
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
US L
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name T0
Type RW
.tw TIA
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
om N
x.c DE
WDTCTL_RE 0000000
10000120 Watch Dog Timer Control Register
G 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name WDTPRES
Type RW
Reset
Bit
0
15
ne FI 0
14
0
13
0
12
0
11
0
10
0
9
0
8
0
7
0
6
0
5
0
4 3
WD
0 0
2
0
1
0
0
WD TAL
WD
syn ON
Name RESV2 TE RESV1
TAL
_ST RESV0
N AT
US
Type RO RW RO WO RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
C
WDTLMT_RE 0000000
10000124 Watch Dog Timer Limit Register
R ME
G 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV0
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name WDTLMT
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
31:16 RESV0 Reserved
15:0 WDTLMT Watch dog timer Limit.
EO
US L
When WDTAL is set to 1, WDTLMT will be loaded into watch dog timer when
watch dog timer is enabled or when count down to 0.
.tw TIA
0000FFF
10000128 WDT_REG Watch Dog Timer Register
F
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV0
om N
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
x.c DE
Name WDT
Type RW
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0000000
10000130 T1CTL_REG RISC Timer 1 Control Register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C
Name T1PRES
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
g@ K
T1A
T1E T1A L_S
Name RESV2
N
RESV1
L TAT
RESV0
an E
US
Type RO RW RO WO RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
rw IAT
1: Enable
0: Disable
3 T1AL_STATUS Timer 1 auto load enable status
1: Enable
0: Disable
2:0 RESV0 Reserved
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV0
EO
Type RO
US L
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
.tw TIA
Name T1LMT
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
15:0 T1LMT Timer 1 Limit.
When T1AL is set to 1, T1LMT will be loaded into timer 1 when timer 1 is
enabled or when count down to 0.
x.c DE
0000FFF
10000138 T1_REG RISC Timer 1 Register
F
Bit
Name
31
ne FI30 29 28 27 26 25 24
RESV0
23 22 21 20 19 18 17 16
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
syn ON
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name T1
Type RW
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
C
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.4 Interrupt Controller
EO
2.4.1 Registers
US L
CIRQ Changes LOG
.tw TIA
Revision Date Author Change Log
0.1 2012/6/15 YuShu Xiao Initialization
om N
Address Name Widt Register Function
h
x.c DE
IRQ Selection 0 Register
The registers allow the interrupt sources to be mapped onto
10000200 IRQ_SEL0 32 interrupt requests IRQ.
When write data to this register, the FIQ_SEL register will be
update to the inverse data at the same time.
10000204
ne FI IRQ_SEL1 32
Reserved
Reserved
Reserved
10000208 IRQ_SEL2 32
Reserved
syn ON
Reserved
1000020C IRQ_SEL3 32
Reserved
FIQ Selection Register
The registers allow the interrupt sources to be mapped onto
1000026C FIQ_SEL 32 interrupt requests FIQ.
C
Controller.
FIQ Mask Register
an E
10000274 FIQ_MASK 32 This register contains a mask bit for each interrupt line in FIQ
Controller
IRQ_MASK_CL IRQ Mask Clear Register
rw IAT
10000278 R 32
This register is used to clear bits in IRQ Mask Register.
FIQ_MASK_CL FIQ Mask Clear Register
1000027C 32
R This register is used to clear bits in FIQ Mask Register.
IRQ_MASK_SE IRQ Mask Set Register
10000280 T 32
This register is used to set bits in the IRQ Mask Register.
FIQ Mask Set Register
far D
FIQ_MASK_SE
10000284 T 32
This register is used to set bits in the FIQ Mask Register.
IRQ End of Interrupt Register
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
level sensitive.
FIQ Sensitive Register
10000294 FIQ_SENS 32 This register is used to set the FIQ interrupts as either edge or
EO
level sensitive.
US L
Software Interrupt Register
Setting 1 to the specific bit position generates a software
10000298 INT_SOFT 32
.tw TIA
interrupt for corresponding interrupt line before interrupt input
multiplex.
This register is used for debug purpose.
IRQ Status Register
1000029C IRQ_STAT 32 Reading this register will get the IRQ interrupt sources with
masking.
FIQ Status Register
om N
100002A0 FIQ_STAT 32 Reading this register will get the FIQ interrupt sources with
masking.
Interrupt Pure Register
x.c DE
100002A4 INT_PURE 32 Reading this register will get the pure interrupt sources without
masking.
Interrupt Mode Selection Register
100002A8 INT_MSEL 32 This register is used to select the interrupt modes of
MIPS1004Kc.
ne FI
0000000
syn ON
10000200 IRQ_SEL0 IRQ Selection 0 Register
1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name IRQ0[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
C
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name IRQ0[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
g@ K
0000000
10000204 IRQ_SEL1 Reserved
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
far D
Name RESV[31:16]
Type RW
Reset
R ME
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RESV[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0000000
10000208 IRQ_SEL2 Reserved
0
EO
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
US L
Name RESV[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RESV[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
31:0 RESV Reserved
x.c DE
0000000
1000020C IRQ_SEL3 Reserved
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset 0
ne FI 0 0 0 0 0 0
RESV[31:16]
0
RW
0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
syn ON
Name RESV[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
1000026C FIQ_SEL FIQ Selection Register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
an E
Name FIQ[31:16]
Type RW
rw IAT
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name FIQ[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
10000270 IRQ_MASK IRQ Mask Register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name IRQ0[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Name IRQ0[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
US L
Bit(s) Name Description
31:0 IRQ0 IRQ Mask
.tw TIA
0: Interrupt is disabled
1: Interrupt is enabled
0000000
10000274 FIQ_MASK FIQ Mask Register
0
om N
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name FIQ[31:16]
x.c DE
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name FIQ[15:0]
Type RW
Reset 0ne FI 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
IRQ_MASK_C 0000000
10000278 IRQ Mask Clear Register
LR 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
g@ K
Name IRQ0[31:16]
Type WO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
an E
Name IRQ0[15:0]
Type WO
rw IAT
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
FIQ_MASK_C 0000000
1000027C FIQ Mask Clear Register
LR 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name FIQ[31:16]
Type WO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name FIQ[15:0]
Type WO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
31:0 FIQ FIQ Mask Clear
0: No effect
EO
1: Clear the corresponding MASK bit
US L
.tw TIA
IRQ_MASK_S 0000000
10000280 IRQ Mask Set Register
ET 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name IRQ0[31:16]
Type WO
om N
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name IRQ0[15:0]
x.c DE
Type WO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
FIQ_MASK_S 0000000
10000284 FIQ Mask Set Register
ET 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name FIQ[31:16]
C
Type WO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name
g@ K
FIQ[15:0]
Type WO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
an E
0: No effect
1: Set the corresponding MASK bit
0000000
far D
Name IRQ0[31:16]
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name IRQ0[15:0]
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
1: Interrupt request is in-service
EO
US L
0000000
1000028C FIQ_EOI FIQ End of Interrupt Register
.tw TIA
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name FIQ[31:16]
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name FIQ[15:0]
om N
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
x.c DE
Bit(s) Name Description
31:0 FIQ FIQ End of Interrupt
0: No service is currently in progress or pending
1: Interrupt request is in-service
ne FI
0000000
syn ON
10000290 IRQ_SENS IRQ Sensitive Register
1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name IRQ0[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
C
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name IRQ0[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
g@ K
0000000
10000294 FIQ_SENS FIQ Sensitive Register
1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
far D
Name FIQ[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R ME
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name FIQ[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0000000
10000298 INT_SOFT Software Interrupt Register
0
EO
US L
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name INT[31:16]
Type
.tw TIA
RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name INT[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
Bit(s) Name Description
31:0 INT Software Interrupt
x.c DE
0000000
1000029C IRQ_STAT IRQ Status Register
0
Bit
Name
Type
31ne FI 30 29 28 27 26 25 24 23
IRQ0[31:16]
RO
22 21 20 19 18 17 16
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
syn ON
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name IRQ0[15:0]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
100002A0 FIQ_STAT FIQ Status Register
0
rw IAT
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name FIQ[31:16]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name FIQ[15:0]
Type RO
far D
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R ME
0000000
100002A4 INT_PURE Interrupt Pure Register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Name INT[31:16]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EO
US L
Name INT[15:0]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit(s) Name Description
31:0 INT Pure Interrupt
0: No interrupt source is asserted
1: Interrupt source is asserted
om N
0000000
x.c DE
100002A8 INT_MSEL Interrupt Mode Selection Register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV[30:15]
Type RW
Reset 0ne FI 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RESV[14:0] SEL
Type RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
syn ON
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.5 EMC Controller
EO
2.5.1 Regsiter
US L
EXT_MC_ARB Changes LOG
.tw TIA
Revision Date Author Change Log
0.1 2012/10/5 Lancelot Initialization
0.2 2013/8/19 YS Xiao Modify to MT7628
om N
Address Name Widt Register Function
h
x.c DE
10000300 SDRAM_CFG0 32 SDRAM Configuration 0
10000304 SDRAM_CFG1 32 SDRAM Configuration 1
ILL_ACC_ADD
10000308 R 32 Illegal Access Address Capture
1000030C
10000310
ne FI ILL_ACC_TYPE
DDR_SELF_RE
FRESH
32
32
Illegal Access Type Capture
SDR_DDR_PW
syn ON
10000314 R_SAVE_CNT 32 Self-Refresh Time Count
5192528
10000300 SDRAM_CFG0 SDRAM Configuration 0
2
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
DIS
_CL CLK_SLE TW
Name TMRD TRFC RSV0 TCAS
K_ W R
GT
Type RW RW RW RW RW RO RW
Reset 0 1 0 1 0 0 0 1 1 0 0 1 0 0 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TRAS RSV1 TRCD TRC RSV2 TRP
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Type RW RO RW RW RO RW
Reset 0 1 0 1 0 0 1 0 1 0 0 0 0 0 1 0
EO
Bit(s) Name Description
US L
31 DIS_CLK_GT Disable Clock Gating
Disables clock gating of the SDR DRAM controller.
.tw TIA
0: Enable
1: Disable
30:29 CLK_SLEW Reserved
28 TWR Write Recovery Time
(unit: system clock cycles - 1)
27:24 TMRD Load Mode Register command to any other command delay.
om N
(unit: system clock cycles - 1)
23:20 TRFC Auto Refresh period
x.c DE
(unit: system clock cycles - 1)
19:18 RSV0 Reserved
17:16 TCAS CAS Latency Time
(unit: system clock cycles - 1)
15:12 ne FI
TRAS The Active To Precharge command delay.
(unit: system clock cycles - 1)
11:10 RSV1 Reserved
syn ON
9:8 TRCD Active To Read or Write delay (RAS to CAS delay)
(unit: system clock cycles - 1)
7:4 TRC Active To Active command period
(unit: system clock cycles - 1)
3:2 RSV2 Reserved
C
SDRAM_CFG 0112060
an E
SD SD PW
RA RA RB PW R_ SD
M_I M_I C_ R_ DO RA
NUMROW
Name NIT NIT MA DO WN RSV0 M_ RSV1 NUMCOLS RSV2
S
_ST _D PPI WN _M WID
AR ON NG _EN OD TH
T E E
Type RW RO RW RW RW RO RW RO RW RO RW
far D
Reset 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TREFR
R ME
Type RW
Reset 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
1: Initialized.
29 RBC_MAPPING RBC Mapping
EO
US L
Selects the address mapping scheme.
0: {BANK ADDR, ROW ADDR, COL ADDR} address mapping scheme
1: {ROW ADDR, BANK ADDR, COL ADDR} address mapping scheme
.tw TIA
28 PWR_DOWN_EN Power Down Enable
Enables the SDRAM precharge power-down mode to save standby power.
0: Disable
1: Enable
27 PWR_DOWN_MOD Power Down Mode
E 0: Precharge power down mode
om N
1: Active power down
26:25 RSV0 Reserved
x.c DE
24 SDRAM_WIDTH SDRAM Width
Selects the number of SDRAM data bus bits.
0: 16 bits
1: 32 bits
23:22 RSV1 Reserved
21:20
ne FI
NUMCOLS Number of Columns
Selects the number of column address bits.
0: 8 Column address bits
syn ON
1: 9 Column address bits (default)
2: 10 Column address bits
3 11 Column address bits
19:18 RSV2 Reserved
17:16 NUMROWS Number of Rows
C
ILL_ACC_AD 0000000
10000308 Illegal Access Address Capture
DR 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name ILL_ACC_ADDR[31:16]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
far D
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name ILL_ACC_ADDR[15:0]
Type RO
R ME
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
ILL_ACC_TYP 0000000
1000030C Illegal Access Type Capture
E 0
EO
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
US L
ILL ILL
_IN _A
Name T_S CC RSV0 ILL_ACC_BSEL
.tw TIA
TAT _W
US R
W1
Type C
RO RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RSV1 ILL_IID ILL_ACC_LEN
om N
Type RO RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
x.c DE
Bit(s) Name Description
31 ILL_INT_STATUS Illegal Access Interrupt Status
Indicates whether the ilegal access interrupt is cleared or pending.
Read
ne FI 0: Cleared
1: Pending
Write
1: Clear both the ILL_ACC_ADDR and ILL_ACC_TYPE registers and thus
clear ILL_INT_STATUS.
syn ON
30 ILL_ACC_WR Illegal Access Write
Indicates the illegal access is a read or a write.
0: A read access
1: A write access
29:20 RSV0 Reserved
C
0: CPU
1: DMA
2: PPE
rw IAT
3: Ethernet PDMA Rx
4: Ethernet PDMA Tx
5: PCI/PCIE
6: Embedded WLAN MAC/BBP
7: USB
7:0 ILL_ACC_LEN Illegal Access Length
far D
DDR_SELF_R 0E12000
10000310 ODT and Self-Refresh Configuration
EFRESH 1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RSV0 ODT_SRC_SEL ODT_OFF_DLY ODT_ON_DLY
Type RO RW RW RW
Reset 0 0 0 0 1 1 1 0 0 0 0 1 0 0 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SR_ SR SR
Name RSV1 RSV2
AU AC RE
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
TO_ K_ Q_
EN B B
Type RO RW RO RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
EO
US L
Bit(s) Name Description
.tw TIA
31:28 RSV0 Reserved
27:24 ODT_SRC_SEL ODT Source Select
Sets the DDR pad ODT control source.
0: Dasavtive[0]
1: Dasavtive[1]
...
11: Dasavtive[11]
om N
12: DQS_WINDOW
13: ODT_LOCAL
14: Always on
x.c DE
15: Always off
23:20 ODT_OFF_DLY ODT Off Delay
Sets the delay time of the ODT_OFF signal based on the ODT_ON signal.
0: 0 T
ne FI 1: 0.5 T
2: 1.5 T
3: 2.5 T
...
15: 14.5 T
syn ON
19:16 ODT_ON_DLY ODT On Delay
Sets the delay time of the ODT_ON signal based on the ODT source signal.
0: 0 T
1: 1 T
2: 2 T
C
...
15: 15 T
15:5 RSV1 Reserved
g@ K
1: Enable
3:2 RSV2 Reserved
rw IAT
It is low active.
0: Enter self-refresh mode.
1: Exit self-refresh mode.
SDR_DDR_P
0003FFF
10000314 WR_SAVE_C Self-Refresh Time Count
F
NT
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name PD_CNT SR_TAR_CNT[23:16]
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Type RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SR_TAR_CNT[15:0]
EO
US L
Type RW
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
.tw TIA
Bit(s) Name Description
31:24 PD_CNT Power Down Count
Counts the times self-refresh mode is entered
23:0 SR_TAR_CNT Self-Refresh Time Count
This counter is only referenced when the SDR (PWR_DOWN_EN ) or DDR
(SR_AUTO_EN) is set.
om N
This counter measures the period SDR or DDR is in IDLE status.
When the IDLE period has reached the specified time period, the SDR or
x.c DE
DDR automatically enter power-saving or selfrefresh mode.
Use the following equations to configure the counter.
DRAM_CLK_FREQ is PLL_CLK (600 MHz) divided by 3
DDR: (SR_TAR_CNT * 256 + 255) / DRAM_CLK_FREQ
SDR: (SR_TAR_CNT * 256) / DRAM_CLK_FREQ
DDR reference table
ne FI 200 MHz: (32'h03FFFF * 256 + 255) * 5 ns ~= 335 ms
SDRAM reference table
120 MHz: 32'h03FFFF * 256 * 8.3 ns ~= 560 ms
syn ON
0000000
10000320 DLL_DBG DRAM DLL Debug Probe
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C
TDC_STA
Name RSV0 RSV1
BLE[5:4]
Type RO RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
g@ K
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
AD
LL_
an E
LO
RS CURR_ST
Name TDC_STABLE[3:0] MST_DLY_SEL
V2 ATE
CK
_D
rw IAT
ON
E
Type RO RO RO RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
249B425
10000340 DDR_CFG0 DDR1/DDR2 controller configuration 0 register
B
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name T_RRD T_RAS T_RP T_RFC[5:3]
Type RW RW RW RW
Reset 0 0 1 0 0 1 0 0 1 0 0 1 1 0 1 1
EO
US L
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name T_RFC[2:0] T_REFI
Type RW RW
.tw TIA
Reset 0 1 0 0 0 0 1 0 0 1 0 1 1 0 1 1
om N
27:23 T_RAS The number of clock cycles from an active command until a pre-charge
command is allowed. To obtain this value, one should divide the
minimum RAS# to pre-charge delay of the SDRAM by the clock cycle
x.c DE
time (TRAS). The sum of Active-to-Pre-charge and Pre-charge-to-Active
should be equal or larger than active-to-active delay of the same ban
(TRC)
22:19 T_RP The number of clock cycles needed for the SDRAM to recover from a
pre-charge command and ready to accept the next active command. To
ne FI obtain this value, one should divide the RAS# pre-charge time of the
SDRAM (TRP) by the clock cycle time. The sum of Active-to-Pre-charge
and Pre-charge-to-Active should be equal or larger than active-to-active
delay of the same bank (TRC)
syn ON
18:13 T_RFC Half the number of clock cycles needed for the SDRAM to recover from
a refresh signal to be ready to take the next command. To obtain this
value, one should divide the SDRAM row cycle time (TRFC) by the clock
cycle time.
12:0 T_REFI The number of clock cycles from one refresh command to the next
C
refresh command. To obtain this value, one should divide the periodic
refresh interval (TREFI) by the clock cycle time. The actual timing of
issuing a pre-charge command may be delayed by if the SDRAM is
processing a normal access. However, the delay is not accumulative so
g@ K
222E242
10000344 DDR_CFG1 DDR1/DDR2 controller configuration 1 register
4
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
US
ER_
DA IND_SDRAM_SIZ IND_SDRA
Name T_WTR T_RTP RSV0
far D
TA_ E M_WIDTH
WID
TH
R ME
Type RW RW RO RW RW RW
Reset 0 0 1 0 0 0 1 0 0 0 1 0 1 1 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TOTAL_SD
EXT_BAN
Name RAM_WID T_WR T_MRD T_RCD
K
TH
Type RW RW RW RW RW
Reset 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
command) as specified by the DDR2 data sheet
27:24 T_RTP The read-to-pre-charge delay (TRTP) as specified by the DDR2 data
EO
sheet. Note that this is a DDR2 requirement, and requires a minimum of
US L
2 cycles. These bits are ignored in DDR mode.
23:22 RSV0 Reserved
.tw TIA
21 USER_DATA_WIDT Specify user data width
H 0: 32-bit
1: 64-bit
When user data width is 32-bit, total SDRAM width (bit[13:12]) must be 10.
NOTE: This system is always 64-bit. Please do not modify this setting.
20:18 IND_SDRAM_SIZE Specify individual SRAM size
om N
000: Reserved
001: Individual SDRAM is 64 Mbit, (DDR only)
010: Individual SDRAM is 128 Mbit, (DDR only)
x.c DE
011: Individual SDRAM is 256 Mbit.
100: Individual SDRAM is 512 Mbit.
101: Individual SDRAM is 1 Gbit.
110: Individual SDRAM is 2 Gbit, (DDR2 only).
111: Reserved
17:16
ne FI
IND_SDRAM_WIDT
H
Specify individual SRAM data width
00: Reserved
01: 8-bit.
10: 16-bit.
syn ON
11: Reserved
15:14 EXT_BANK Specify bank/module configuration
00: 1 external bank, 1 module. (CS#[0])
01: 2 external bank, 1 module. (CS#[1:0]),
10: Reserved
C
01: Reserved
10: 16-bit
rw IAT
11: 32-bit. Allowed only when user data width is 64-bit (bit21 is 1).
11:8 T_WR The clock cycles needed for the DDR to recover from a write command
and be able to accept a pre-charge command. To obtain this value,
divide the SDRAM write recovery time by the clock cycle time (TWR)
7:4 T_MRD The number of clock cycles after the setting of the mode registers in the
DDR and before the issue of the next command. To obtain this value,
divide the Mode Register Set Cycle time (TMRD) by the clock cycle time.
far D
3:0 T_RCD The number of clock cycles from an active command to a read/write
assertion. To obtain this value, divide the RAS# to CAS# delay time
R ME
43FFE44
10000348 DDR_CFG2 DDR1/DDR2 controller configuration 2 register
3
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
DD
DQS0_GA DQS1_GA
RE R2_
Name TING_WIN TING_WIN RSV0[12:3]
GE MO
DOW DOW
DE
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Type RW RW RW RW RO
Reset 0 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BU
EO
TES
US L
DLL RS
TM
Name RSV0[2:0] PD WR RE CAS_LATENCY T_T BURST_LENGTH
OD
SET YP
E
.tw TIA
E
Type RO RW RW RW RW RW RO RW
Reset 1 1 1 0 0 1 0 0 0 1 0 0 0 0 1 1
om N
DDR SDRAM. One example of such instance is when register mode
SDRAM DIMM is used. This bit should be low when the control and
address signals from the controller is connected to the SDRAM without
x.c DE
register delay.
30 DDR2_MODE This bit determines whether the memory controller is in DDR1 or DDR2
mode.
0: DDR1 mode
ne FI 1: DDR2 mode
29:28 DQS0_GATING_WI Controls the mask for the data strobe 0 (DQS0) window leading and
NDOW trailing edge.
00: Half extended cycle for the leading and trailing edge of DQS window
syn ON
(maximum window)
01: Only half extended cycle for leading edge of DQS window
10: Only half extended cycle for trailing edge of DQS window
11: No extended cycle for leading and trailing edge of DQS window (minimum
window)
27:26 DQS1_GATING_WI Controls the mask for the data strobe 1 DQS1 window leading and
C
01: Only half extended cycle for leading edge of DQS window
10: Only half extended cycle for trailing edge of DQS window
11: No extended cycle for leading and trailing edge of DQS window (minimum
window)
an E
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
100: 4 (DDR2 only)
3 BURST_TYPE This register is hardwired to 0 to indicate a sequential burst type.
EO
US L
2:0 BURST_LENGTH Indicates the burst length of the read/write transaction.
010: 4 bursts
011: 8 bursts
.tw TIA
NOTE:
1. A burst of 4 is not allowed when user data is 64-bit while SDRAM data is
16-bit.
2. A burst of 8 is allowed in all user/SDRAM data width combination.
3. Other values for burst length are not allowed.
om N
FFFFE41
1000034C DDR_CFG3 DDR1/DDR2 controller configuration 3 register
x.c DE
2
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RSV0[18:3]
Type RO
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bit 15ne FI 14 13 12
Q_
11 10
DIS
_DI
9 8 7 6 5 4 3 2 1 0
1: Disabled
This bit is used for DDR2 only. This bit must be 0 for DDR1.
11 RDOS Redundant Data Strobe (DQS)
an E
This bit enables the redundant DQS function if supported by the SDRAM.
0: Disable
rw IAT
1: Enable
This bit is used for DDR2 only and must be 0 for DDR1.
10 DIS_DIFF_DQS Disable differential DQS
0: Enable
1: Disable
This bit is used for DDR2 only and must be 0 for DDR1.
far D
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
001: 1 cycle
010: 2 cycles
EO
011: 3 cycles
US L
100: 4 cycles
101: 5 cycles
Others: Reserved
.tw TIA
This bit is used for DDR2 only and must be 0 for DDR1.
2 RTT0 Internal Termination Resistor (RTT) bit 0
Used together with bit 6 (RTT1) to control ODT.
This bit is used for DDR2 only and must be 0 for DDR1.
1 DS SDRAM drive Strength
0: 100% drive strength.
om N
1: 60% drive strength.
0 DLL SDRAM Delay Locked Loop (DLL) Enable
x.c DE
0: Disable
1: Enable
10000350
ne FIDDR_CFG4 DDR1/DDR2 controller configuration 4 register
FFFFFF
F4
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
syn ON
Name RSV0[26:11]
Type RO
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RSV0[10:0] FAW
Type RO RW
C
Reset 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0
0000888
10000360 DDR_DQ_DLY DDR1/DDR2 DQ delay control register
8
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
far D
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DQ_GROUP1_DELAY_C DQ_GROUP1_DELAY_FI DQ_GROUP0_DELAY_C DQ_GROUP0_DELAY_FI
Name OARSE_TUNING NE_TUNING OARSE_TUNING NE_TUNING
Type RW RW RW RW
Reset 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
bit3~0: for fine-grain delay setting
23:16 DQ_GROUP0_DEL Force Data Group 0 (MD0 to MD7) Output Delay. Valid when
EO
AY_SEL DQ_DLY_SEL_EN is 1.
US L
bit7~4: for coarse-grain delay setting
bit3~0: for fine-grain delay setting
.tw TIA
15:12 DQ_GROUP1_DEL Data Group 1 (MD8 to MD15) Output Delay Coarse-Grain Tuning
AY_COARSE_TUNI 0x0 to 0x7: Decrease delay by 250 ps per step.
NG 0x8: Keep DLL delay.
0x9 to 0xF: Increase delay by 250 ps per step.
11:8 DQ_GROUP1_DEL Data Group 1 (MD8 to MD15) Output Delay Fine-Grain Tuning
AY_FINE_TUNING 0x0 to 0x7: Decrease delay by 30 ps per step.
om N
0x8: Keep DLL delay.
0x9 to 0xF: Increase delay by 30 ps per step.
x.c DE
7:4 DQ_GROUP0_DEL Data Group 0 (MD0 to MD7) Output Delay Coarse-Grain Tuning
AY_COARSE_TUNI 0x0 to 0x7: Decrease delay by 250 ps per step.
NG 0x8: Keep DLL delay.
0x9 to 0xF: Increase delay by 250 ps per step.
3:0 DQ_GROUP0_DEL Data Group 0 (MD0 to MD7) Output Delay Fine-Grain Tuning
ne FI
AY_FINE_TUNING 0x0 to 0x7: Decrease delay by 30 ps per step.
0x8: Keep DLL delay.
0x9 to 0xF: Increase delay by 30 ps per step.
syn ON
DDR_DQS_DL 0000888
10000364 DDR1/DDR2 DQS delay control register
Y 8
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C
Reset 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0
31:24 DQS1_DELAY_SEL Force Data Strobe 1 (MDQS1) Input Delay. Valid when
DQS_DLY_SEL_EN is 1
bit7~4: for coarse-grain delay setting
bit3~0: for fine-grain delay setting
23:16 DQS0_DELAY_SEL Force Data Strobe 0 (MDQS0) Input Delay. Valid when
DQS_DLY_SEL_EN is 1
far D
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
0x8: Keep DLL delay.
0x9 to 0xF: Increase delay by 250 ps per step.
EO
3:0 DQS0_DELAY_FIN Data Strobe 0 Input Delay Fine-Grain Tuning
US L
E_TUNING 0x0 to 0x7: Decrease delay by 30 ps per step.
0x8: Keep DLL delay.
.tw TIA
0x9 to 0xF: Increase delay by 30 ps per step.
DDR_DLL_SL 0000000
10000368 DDR1/DDR2 DLL slave control register
V 0
om N
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RSV0[22:7]
Type RO
x.c DE
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DLL
_SL
DQ DQ
V_U
S_D _DL
PD
Name ne FI RSV0[6:0]
AT
E_
MO
RSV1 LY_
SEL
_EN
RSV2 Y_S
EL_
EN
DE
syn ON
Type RO RW RO RW RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
DDR_DLL_MS 0000000
1000036C DDR1/DDR2 DLL master control register
far D
T 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
31 DLL_MAS_RELOCK Delayed Locked Loop (DLL) Master Relock Enable
EO
US L
_EN 0: Disable relocking scheme.
1: Enable relocking scheme. DLL supports restarting locking from initial value
if DLL is not locked after waiting 512 cycles.
.tw TIA
30:26 RSV0 Reserved
25 DLL_MAS_BYPASS DLL Bypass Fine Grain Delay
_FD 0: Fine-grain delay code is determined by DLL.
1: Fine-grain delay code is fixed by DLL_MAS_FIXED_FD.
24 DLL_MAS_BYPASS DLL Bypass Coarse Grain Delay
_CD 0: Coarse-grain delay code is determined by DLL
om N
1: Coarse-grain delay code is fixed by DLL_MAS_FIXED_CD.
23:12 RSV1 Reserved
x.c DE
11:8 DLL_MAS_FIXED_F DLL Fixed Fine Grain Delay
D Specifies the fine-grain delay. The effective range is 0 to 15. Each step is
about 30 ps.
7:6 RSV2 Reserved
5:0 ne FI
DLL_MAS_FIXED_
CD
DLL Fixed Coarse Grain Delay
Specifies the coarse-grain delay. The delay = ((x-2)/4-1)*250 ps, the effective
range of x is 10 to 52.
syn ON
MC_ARB_CF 07FAC6
10000380 MC 2 to 1 arbiter setting
G 88
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C
pre
clas
em trtc
Name RSV0 s_e cls_priority[23:16]
pt_ _en
n
en
g@ K
Type RO RW RW RW RW
Reset 0 0 0 0 0 1 1 1 1 1 1 1 1 0 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
an E
Name cls_priority[15:0]
Type RW
Reset 1 1 0 0 0 1 1 0 1 0 0 0 1 0 0 0
rw IAT
0: Disable Preemption
1: Enable Preemption
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
23:0 cls_priority Class Priority
This field is used for class priority for second arbitration.
EO
{BEy(3'd7), LCg(3'd6), BSy(3'd5), LSy(3'd4), BEg (3'd3), BSg (3'd2),
US L
LSg(3'd1), LCgd(3'd0)}
.tw TIA
0110FF4
10000384 MC_AG_BW MC Channel BW/QoS_Type/DueDate Setting
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
ag_ ag_ ag_qos_ty
Name RSV0 RSV1 ag_duedate
om N
wr sel pe
Type WO RO RW RO RW RW
Reset 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0
x.c DE
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name ag_pir ag_cir
Type RW RW
Reset 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 0
Bit(s)
31
ne FI
Name
ag_wr
Description
Agent Write
0: Read
1: Write
syn ON
30:29 RSV0 Reserved
28 ag_sel DMA Agent Select
Selects a DMA agent to configure.
0: CPU (Rbus0)
1: DMA (Rbus1)
C
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0000000
10000390 RB_DBG RB Debug
0
EO
US L
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RSV0[30:15]
Type
.tw TIA
RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rb_
Name RSV0[14:0]
sel
Type RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
Bit(s) Name Description
31:1 RSV0 Reserved
x.c DE
0 rb_sel RB channel select for debug message dump
ne FI 0000000
10000394 RB_STATE RB Debug State
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RSV0[20:5]
syn ON
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rb_r
Name RSV0[4:0] rb_state rb_length
w
Type RO RO RO RO
C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2'b10: ACK
2'b11: DATA
7:0 rb_length RB channel burst length (Byte)
far D
0000000
10000398 RB_BW RB Bandwidth
0
R ME
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
bw_ RS
Name rst V0
avg_bw peak_bw[9:6]
Type WO RO RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name peak_bw[5:0] rb_bw
Type RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
31 bw_rst Write 1 will reset BW values.
30 RSV0 Reserved
EO
US L
29:20 avg_bw Average BW (MB/S)
19:10 peak_bw Peak BW (MB/S)
.tw TIA
9:0 rb_bw RB channel BW (MB/S)
0000000
1000039C RB_LAT RB Latency
0
om N
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
lat_ RS
Name avg_lat peak_lat[9:6]
rst V0
x.c DE
Type WO RO RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name peak_lat[5:0] rd_lat
Type RO RO
Reset 0ne FI 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.6 R-Bus Controller
EO
2.6.1 Features
US L
8 channel QoS Arbiter
Configurable Bandwidth and Duedate for each agent
.tw TIA
QoS classifier can be programmed for RR, BW RR, Fixed Priority and QoS Arb
om N
N requestors (N=8) Req#0 Req#1 Req#2 Req#7
x.c DE
TRTC TRTC TRTC TRTC N Meters
ne FI
N Run time classifiers
(based on QoS type,
due date and color)
N Classifiers
syn ON
Classifier Classifier Classifier Classifier
(N ports/arbiter)
1 second
g@ K
2.6.3 Regsiter
Rbus_Matrix_CTRL Changes LOG
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
h
DMA_ARB_CF
10000400 G 32 DMA 8 to 1 arbiter setting
EO
DMA_AG_BW_
US L
10000404 32 DMA Channel BW/QoS_Type/DueDate Setting
CFG
1000040C DMA_ROUTE 32 DMA Routing
.tw TIA
10000410 DMA_MON_AG 32 DMA Monitor Agent Select
_SEL
10000414 DMA_STATE 32 DMA State
10000418 DMA_BW 32 DMA Bandwidth
1000041C DMA_LAT 32 DMA Latency
10000420 OCP_CFG0 32 OCP to Rbus configuration
om N
10000424 OCP_CFG1 32 Read bypass write mask
10000430 R2P_MONITOR 32 Rbus to APbus monitor
x.c DE
R2P_ERR_ADD
10000434 R 32 Rbus to APbus error address
DMA_ARB_C 04FAC6
10000400 DMA 8 to 1 arbiter setting
FG 88
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
pre
g@ K
clas
em trtc
Name RSV0 s_e cls_priority[23:16]
pt_ _en
n
en
an E
Type RO RW RW RW RW
Reset 0 0 0 0 0 1 0 0 1 1 1 1 1 0 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw IAT
Name cls_priority[15:0]
Type RW
Reset 1 1 0 0 0 1 1 0 1 0 0 0 1 0 0 0
transaction
0: Disable Preemption
1: Enable Preemption
25 trtc_en Two Rate Three Color Bandwidth (TRTC) Meter Enable
0: Disable TRTC
1: Enable TRTC
24 class_en QoS Classifier Enable
0: Disable CLASS
1: Enable CLASS
TRTC (0) CLASS (0) Round Robin
TRTC (0) CLASS (1) Fixed Priority
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
TRTC (1) CLASS (0) BW RR
TRTC (1) CLASS (1) QoS Arb
EO
23:0 cls_priority Class Priority
US L
This field is used for class priority for second arbitration.
{BEy(3'd7), LCg(3'd6), BSy(3'd5), LSy(3'd4), BEg (3'd3), BSg (3'd2),
.tw TIA
LSg(3'd1), LCgd(3'd0)}
DMA_AG_BW 0220802
10000404 DMA Channel BW/QoS_Type/DueDate Setting
_CFG 0
om N
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
ag_ ag_qos_ty
Name wr
ag_sel RSV0
pe
ag_duedate
x.c DE
W1
Type C
RW RO RW RW
Reset 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name ag_pir ag_cir
Type RW RW
Reset 1
ne FI 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
0: SDXC
1: GDMA
2: SPI Slave/3-Wire SPI Slave/PUTIF
3: Switch
g@ K
4: WLAN
5: PCIe
6: AES
an E
7: USB20
27:26 RSV0 Reserved
rw IAT
The PIR is greater than or equal to the CIR. Bandwidth which exceeds PIR is
marked red.
0x00: 0 MB/s
0x01: 4 MB/s
...
0x80: 512 MB/s (default)
...
0xFF: 1020 MB/s (Max)
7:0 ag_cir Committed Information Rate for the Agent
Bandwidth which falls below the CIR is marked green. BW which exceeds the
CIR but is below the EIR is marked yellow.
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
0x00: 0 MB/s
0x01: 4 MB/s
EO
...
US L
0x20: 128 MB/s (default)
...
0xFF: 1020 MB/s (Max)
.tw TIA
0000000
1000040C DMA_ROUTE DMA Routing
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
om N
Name RSV0[30:15]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
x.c DE
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
dm
a_r
Name RSV0[14:0]
out
e
Type
Reset 0
ne FI 0 0 0 0 0 0
RO
0 0 0 0 0 0 0 0
RW
0
DMA_MON_A 0000000
10000410 DMA Monitor Agent Select
g@ K
G_SEL 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RSV0[28:13]
an E
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw IAT
content.
0: SDXC
1: GDMA
2: SPI Slave/3-Wire SPI Slave/PUTIF
3: Switch
4: WLAN
5: PCIe
6: AES
7: USB20
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0000000
10000414 DMA_STATE DMA State
0
EO
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
US L
Name RSV0[20:5]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
dm
Name RSV0[4:0] a_r dma_state dma_length
w
Type RO RO RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
Bit(s) Name Description
31:11 RSV0 Reserved
x.c DE
10 dma_rw DMA channel RW state
9:8 dma_state DMA channel State
2'b00: IDLE
2'b01: REQ
ne FI 2'b10: ACK
2'b11: DATA
7:0 dma_length DMA channel burst length (Byte) state
syn ON
0000000
10000418 DMA_BW DMA Bandwidth
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C
bw_ RS
Name avg_bw peak_bw[9:6]
rst V0
Type WO RO RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
g@ K
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name peak_bw[5:0] dma_bw
Type RO RO
an E
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
1000041C DMA_LAT DMA Latency
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
lat_ RS
Name rst V0
avg_lat peak_lat[9:6]
Type WO RO RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name peak_lat[5:0] rd_lat
Type RO RO
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
31 lat_rst Write 1 will reset latency values
US L
30 RSV0 Reserved
.tw TIA
29:20 avg_lat Average read latency (T)
19:10 peak_lat Peak read latency (T)
9:0 rd_lat DMA channel read latency (T)
om N
0000000
10000420 OCP_CFG0 OCP to Rbus configuration
1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
x.c DE
Name RSV0[27:12]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ocp
ne FI syn rbu rd_
_sy
c_ s_a byp
Name RSV0[11:0] nc_
met syn ass
cm
hod c _wr
d
Type RO RW RW RW RW
syn ON
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
1: Enable
1 rbus_async Async Mode for RBUS
rw IAT
1: Enable
R ME
FFFFFF
10000424 OCP_CFG1 Read bypass write mask
FF
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name rd_bypass_wr_mask[31:16]
Type RW
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name rd_bypass_wr_mask[15:0]
Type RW
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
31:0 rd_bypass_wr_mask Mask bit for read bypass write address
EO
US L
.tw TIA
R2P_MONITO 0000000
10000430 Rbus to APbus monitor
R 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
r2p
_in
Name RSV0
c_cl
om N
r
W1
Type RO
C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
x.c DE
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name r2p_err_cnt r2p_inc_cnt
Type RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit(s)
31:17
ne FI
Name
RSV0
Description
Reserved
16 r2p_inc_clr R2APB Interrupt Clear
syn ON
Write 1 to clear this interrupt.
15:10 r2p_err_cnt R2APB error counter
9:0 r2p_inc_cnt R2APB Interrupt Countdown Timer
Sets a delay timer which begins counting down when an R2P error is
detected.
C
When the timer reaches zero the R2P interrupt is then triggered.
10'b0000000000: Disable R2P monitoring
10'b0000000001: 20 us
10'b0000000010: 40 us
g@ K
...
10'b1000000000: 40 ms
an E
rw IAT
R2P_ERR_AD 0000000
10000434 Rbus to APbus error address
DR 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name r2p_err_addr[31:16]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
far D
Name r2p_err_addr[15:0]
Type RO
R ME
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
00030A0
10000440 DYN_CFG0 Dynamic cpu/ocp frequency control
1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Name RSV0 cpu_ocp_ratio
Type RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EO
US L
Name RSV1 cpu_fdiv RSV2 cpu_ffrac
Type RO RW RO RW
Reset 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1
.tw TIA
Bit(s) Name Description
31:19 RSV0 Reserved
18:16 cpu_ocp_ratio CPU OCP Ratio
The ratio between the system bus frequency and the CPU frequency.
3'b011: SYS/CPU = 1/3
om N
3'b100: SYS/CPU = 1/4 (Not used in MT7628)
15:12 RSV1 Reserved
x.c DE
11:8 cpu_fdiv CPU Frequency Divider
The frequency divider is used to generate the CPU frequency. Valid values
range from 1 to 15.
NOTE1: CPU_FDIV must be equaled to N*CPU_FFRAC(N is a integer
number) when rbus_async equal to 1'b0.
ne FI NOTE2: CPU_FDIV must be larger than or equal to CPU_FFRAC when
rbus_async equal to 1'b1.
7:4 RSV2 Reserved
syn ON
3:0 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.
CPU frequency = PLL_FREQ*(CPU_FFRAC/CPU_FDIV)
NOTE: If the chip runs in USB OHCI mode, the OCP frequency cannot be
C
00230A0
10000444 DYN_CFG1 CPU sleep step frequency control
6
an E
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
ste
rw IAT
slp RS
Name p_e RSV0 step_cnt step_ocp_ratio
_en V1
n
Type RW RW RO RW RO RO
Reset 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RSV2 step_fdiv RSV3 step_ffrac
Type RO RO RO RW
far D
Reset 0 0 0 0 1 0 1 0 0 0 0 0 0 1 1 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
1: Enable
29:28 RSV0 Reserved
EO
US L
27:20 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.
.tw TIA
The count period unit is 1 us.
19 RSV1 Reserved
18:16 step_ocp_ratio Step OCP Ratio (Fix to cpu_ocp_ratio)
The ratio between the system bus frequency and the CPU frequency.
3'b011: SYS/CPU = 1/3
3'b100: SYS/CPU = 1/4 (Not used in MT7628)
om N
15:12 RSV2 Reserved
11:8 step_fdiv Step Frequency Divider (Fix to CPU_FDIV)
x.c DE
The frequency divider is used to generate the CPU frequency after the CPU
exits from sleep mode and returns to normal operation. Valid values range
from 1 to 15.
7:4 RSV3 Reserved
3:0 ne FI
step_ffrac Step Frequency Fraction
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.
syn ON
FRAC_VALUE = PREVIOUS_FRAC_VALUE + STEP_FFRAC
CPU Frequency = (FRAC_VALUE/CPU_FDIV)*PLL_FREQ
00030A0
C
me RS
Name RSV0 dfc_fsm RSV1
_fre V2
cpu_ocp_ratio
q
Type RO RO RO RO RO RO
an E
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw IAT
20 same_freq Indicates that the SYS and DRAM clocks are on the same frequency.
19 RSV2 Reserved
18:16 cpu_ocp_ratio OCP ratio after changed frequency
15:12 RSV3 Reserved
11:8 cpu_fdiv CPU fdiv after changed frequency
7:4 RSV4 Reserved
3:0 cpu_ffrac CPU ffrac after changed frequency
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0000000
1000044C DYN_CFG3 SI_Sleep Serial Counter Setting
0
EO
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
US L
si_s
lp_
Name cnt
RSV0 si_slp_time_unit[27:16]
.tw TIA
_en
Type RW RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name si_slp_time_unit[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
Bit(s) Name Description
x.c DE
31 si_slp_cnt_en SI_Sleep Serial Counter Enable
30:28 RSV0 Reserved
27:0 si_slp_time_unit SI_Sleep Time Counter unit
28'h0000000: count per 1us
ne FI 28'h0000001: count per 2us
28'h0000002: count per 3us
...
28'hfffffff: count per 268435456us
syn ON
0000000
10000450 DYN_CFG4 SI_Sleep Issue Count Counter
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C
Name si_slp_cnt[31:16]
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
g@ K
Name si_slp_cnt[15:0]
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
an E
0000000
10000454 DYN_CFG5 Sleep Time Counter for SI_Sleep
far D
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R ME
Name si_slp_time_unit_cnt[31:16]
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name si_slp_time_unit_cnt[15:0]
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
Write to this register will clear the counter value.
EO
US L
0000000
10000458 DYN_CFG6 Operation Time Counter for non SI_Sleep
.tw TIA
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name si_opt_time_unit_cnt[31:16]
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name si_opt_time_unit_cnt[15:0]
om N
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
x.c DE
Bit(s) Name Description
31:0 si_opt_time_unit_cnt Operation Time Counter for non SI_Sleep
Finally, CPU in non SI_Sleep time is
"si_opt_time_unit_cnt*si_slp_time_unit(us)".
ne FI Write to this register will clear the counter value.
syn ON
C
g@ K
an E
rw IAT
far D
R ME
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.7 MIPS CNT
EO
2.7.1 Registers
US L
MIPS_CNT Changes LOG
.tw TIA
Revision Date Author Change Log
0.1 2013/1/14 YuShu Xiao Initialization
om N
Address Name Widt Register Function
h
x.c DE
STCK_CNT_CF
10000500 G 32 MIPS Configuration
MIPS Compare
Sets the cutoff point for the free run counter (MIPS counter). If
10000504 CMP_CNT 32 the free run counter equals the compare counter, then the timer
ne FI circuit generates an interrupt. The interrupt remains active until
the compare counter is written again.
MIPS Counter
10000508 CNT 32 The MIPS counter (free run counter) increases by 1 every 20 us
syn ON
(50 KHz). The counter continues to count until it reaches the
value loaded into CMP_CNT.
STCK_CNT_C 0000000
C
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
an E
EXT
CN
_ST
Name RESV[13:0] T_E
K_E
rw IAT
N
N
Type RO RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 EXT_STK_EN External System Tick Enable - Selects the system tick source.
0: Use the MIPS internal timer interrupts.
1: Use the external timer interrupt from an external MIPS counter.
R ME
0 CNT_EN Counter Enable - Enable the free run counter (MIPS counter).
0: Disable
1: Enable
0000000
10000504 CMP_CNT MIPS Compare
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name CMP_CNT
EO
US L
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit(s) Name Description
31:16 RESV
15:0 CMP_CNT Compare Count
om N
0000000
10000508 CNT MIPS Counter
0
x.c DE
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name
Type
Reset 0
ne FI 0 0 0 0 0 0 0
CNT
RW
0 0 0 0 0 0 0 0
syn ON
Bit(s) Name Description
31:16 RESV
15:0 CNT MIPS Counter
C
g@ K
an E
rw IAT
far D
R ME
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.8 General Purpose IO
EO
2.8.1 Features
US L
Parameterized numbers of independent inputs, outputs, and inouts
Independent polarity controls for each pin
.tw TIA
Independently masked edge detect interrupt on any input transition
om N
x96
gpio_reg cfg_data[95:0] gpio_control gpio_out[95:0]
x.c DE
PBus signals
Configuration
gpio_in[95:0]
Registers
ne FI
gpio_int
gpio_interrupt
I/O PAD
syn ON
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.8.3 GPIO pin mapping
EO
PAD Name Function 0 Function 1 Function 2 Function 3 strap pmux_group GPIO
US L
PAD_I2S_SDI i2ssdi (I) gpio (I/O) pcmdrx (I) antsel[5] (O) i2s_gpio_psel[2:0] 0
PAD_I2S_SDO i2ssdo (O) gpio (I/O) pcmdtx (O) antsel[4] (O) 0 i2s_gpio_psel[2:0] 1
.tw TIA
PAD_I2S_WS i2sws(I/O) gpio (I/O) pcmclk (I/O) antsel[3] (O) i2s_gpio_psel[2:0] 2
PAD_I2S_CLK i2sclk (I/O) gpio (I/O) pcmfs (I/O) antsel[2] (O) i2s_gpio_psel[2:0] 3
PAD_I2C_SCLK i2c_sclk (I/O) gpio (I/O) sutif_txd (O) ext_bgclk (I) i2c_gpio_psel[2:0] 4
PAD_I2C_SD i2c_sd (I/O) gpio (I/O) sutif_rxd (I) i2c_gpio_psel[2:0] 5
PAD_SPI_CS1 spi_cs1 (O) gpio (I/O) co_clko (O) 1 spi_cs1_psel[2:0] 6
PAD_SPI_CLK spi_clk (O) gpio (I/O) 2 spi_gpio_psel[1:0] 7
om N
PAD_SPI_MOSI spi_mosi (I/O) gpio (I/O) 3 spi_gpio_psel[1:0] 8
PAD_SPI_MISO spi_miso (I/O) gpio (I/O) spi_gpio_psel[1:0] 9
PAD_SPI_CS0 spi_cs0 (O) gpio (I/O) spi_gpio_psel[1:0] 10
x.c DE
PAD_GPIO0 gpio (I/O) gpio (I/O) co_clko (O) perst_n (O) 4 gpio_psel[2:0] 11
PAD_TXD0 txd0 (O) gpio (I/O) 5 uart0_gpio_psel[2:0] 12
PAD_RXD0 rxd0 (I) gpio (I/O) uart0_gpio_psel[2:0] 13
PAD_MDI_TP_P1 spis_cs (I) gpio (I/O) w_utif[0] (I/O) pwm_ch0 (O) spis_gpio_psel[2:0] 14
ne FI
PAD_MDI_TN_P1
PAD_MDI_RP_P1
PAD_MDI_RN_P1
spis_clk (I)
spis_miso (O)
spis_mosi (I)
gpio (I/O)
gpio (I/O)
gpio (I/O)
w_utif[1] (I/O)
w_utif[2] (I/O)
w_utif[3] (I/O)
pwm_ch1 (O)
txd2 (O)
rxd2 (I)
spis_gpio_psel[2:0]
spis_gpio_psel[2:0]
spis_gpio_psel[2:0]
15
16
17
PAD_MDI_RP_P2 pwm_ch0 (O) gpio (I/O) w_utif[4] (I/O) sd_d7 (I/O) pwm0_gpio_psel[2:0] 18
syn ON
PAD_MDI_RN_P2 pwm_ch1 (O) gpio (I/O) w_utif[5] (I/O) sd_d6 (I/O) pwm1_gpio_psel[2:0] 19
PAD_MDI_TP_P2 txd2 (O) gpio (I/O) pwm_ch2 (O) sd_d5 (I/O) uart2_gpio_psel[2:0] 20
PAD_MDI_TN_P2 rxd2 (I) gpio (I/O) pwm_ch3 (O) sd_d4 (I/O) uart2_gpio_psel[2:0] 21
PAD_MDI_TP_P3 sd_wp (I) gpio (I/O) w_utif[10] (I/O) w_dbgin (I) sd_gpio_psel[2:0] 22
PAD_MDI_TN_P3 sd_cd (I) gpio (I/O) w_utif[11] (I/O) w_dbgack (O) sd_gpio_psel[2:0] 23
C
PAD_MDI_RP_P3 sd_d1 (I/O) gpio (I/O) w_utif[12] (I/O) w_jtclk (I) sd_gpio_psel[2:0] 24
PAD_MDI_RN_P3 sd_d0 (I/O) gpio (I/O) w_utif[13] (I/O) w_jtdi (I) sd_gpio_psel[2:0] 25
PAD_MDI_RP_P4 sd_clk (I/O) gpio (I/O) w_utif[14] (I/O) w_jtdo (O) sd_gpio_psel[2:0] 26
g@ K
PAD_MDI_RN_P4 sd_cmd (I/O) gpio (I/O) w_utif[15] (I/O) dbg_uart_txd (O) sd_gpio_psel[2:0] 27
PAD_MDI_TP_P4 sd_d3 (I/O) gpio (I/O) w_utif[16] (I/O) w_jtms (I) sd_gpio_psel[2:0] 28
PAD_MDI_TN_P4 sd_d2 (I/O) gpio (I/O) w_utif[17] (I/O) w_jtrst_n (I) sd_gpio_psel[2:0] 29
an E
PAD_EPHY_LED4_K ephy_led4_k (O) gpio (I/O) w_utif_k[6] (I/O) jtrstn_k (I) p4_led_kn_psel[2:0] 30
PAD_EPHY_LED3_K ephy_led3_k (O) gpio (I/O) w_utif_k[7] (I/O) jtclk_k (I) p3_led_kn_psel[2:0] 31
rw IAT
PAD_EPHY_LED2_K ephy_led2_k (O) gpio (I/O) w_utif_k[8] (I/O) jtms_k (I) p2_led_kn_psel[2:0] 32
PAD_EPHY_LED1_K ephy_led1_k (O) gpio (I/O) w_utif_k[9] (I/O) jtdi_k (I) p1_led_kn_psel[2:0] 33
PAD_EPHY_LED0_K ephy_led0_k (O) gpio (I/O) jtdo_k (I/O) p0_led_kn_psel[2:0] 34
PAD_WLED_K wled_k (I/O) gpio (I/O) wled_kn_psel[2:0] 35
PAD_PERST_N perst_n (O) gpio (I/O) 6 prest_gpio_psel[1:0] 36
PAD_CO_CLKO co_clko (O) gpio (I/O) 7 rclk_gpio_psel[1:0] 37
far D
PAD_EPHY_LED2_N ephy_led2_n (O) gpio (I/O) w_utif_n[8] (I/O) jtms_n (I) p2_led_gpio_psel[2:0] 41
PAD_EPHY_LED1_N ephy_led1_n (O) gpio (I/O) w_utif_n[9] (I/O) jtdi_n (I) p1_led_gpio_psel[2:0] 42
PAD_EPHY_LED0_N ephy_led0_n (O) gpio (I/O) jtdo_n (I/O) p0_led_gpio_psel[2:0] 43
PAD_WLED_N wled_n (I/O) gpio (I/O) wled_gpio_psel[2:0] 44
PAD_TXD1 txd1 (O) gpio (I/O) pwm_ch0 (O) antsel[1] (O) 8 uart1_gpio_psel[2:0] 45
PAD_RXD1 rxd1 (I) gpio (I/O) pwm_ch1 (O) antsel[0] (O) uart1_gpio_psel[2:0] 46
2.8.4 Register
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
GPIO Changes LOG
Revision Date Author Change Log
EO
0.1 2012/6/21 YuShu Xiao Initialization
US L
.tw TIA
Module name: GPIO Base address: (+10000600h)
Address Name Widt Register Function
h
GPIO0 to GPIO31 direction control register
These direction control registers are used to select the data
10000600 GPIO_CTRL_0 32 direction of the GPIO pin.
om N
The value driven onto the GPIO pins, are controlled by the
GPIO_POL_x, and GPIO_DATA_x registers.
x.c DE
GPIO32 to GPIO63 direction control register
These direction control registers are used to select the data
10000604 GPIO_CTRL_1 32 direction of the GPIO pin.
The value driven onto the GPIO pins, are controlled by the
GPIO_POL_x, and GPIO_DATA_x registers.
GPIO64 to GPIO95 direction control register
10000608
ne FI
GPIO_CTRL_2 32
These direction control registers are used to select the data
direction of the GPIO pin.
The value driven onto the GPIO pins, are controlled by the
GPIO_POL_x, and GPIO_DATA_x registers.
syn ON
GPIO0 to GPIO31 polarity control register
10000610 GPIO_POL_0 32 These polarity control registers are used to control the polarity of
the data is driven on or read from the GPIO pin.
GPIO32 to GPIO63 polarity control register
10000614 GPIO_POL_1 32 These polarity control registers are used to control the polarity of
C
10000624 GPIO_DATA_1 32 These data registers store current GPIO data value for GPIO
input mode, or output driven value for GPIO output mode.
Bit position stand for correspondent GPIO pin.
GPIO64 to GPIO95 data register
10000628 GPIO_DATA_2 32 These data registers store current GPIO data value for GPIO
input mode, or output driven value for GPIO output mode.
Bit position stand for correspondent GPIO pin.
far D
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
These data set registers are used to clear bits in the
GPIO_DATA_x registers.
GPIO64 to GPIO95 data clear register
10000648 GPIO_DCLR_2 32
EO
These data set registers are used to clear bits in the
US L
GPIO_DATA_x registers.
GPIO0 to GPIO31 rising edge interrupt enable register
GINT_REDGE_
10000650 32
.tw TIA
0 These registers are used to enable the condition of rising edge
triggered interrupt.
GPIO32 to GPIO63 rising edge interrupt enable register
GINT_REDGE_
10000654 1 32 These registers are used to enable the condition of rising edge
triggered interrupt.
GPIO64 to GPIO95 rising edge interrupt enable register
GINT_REDGE_
10000658 2 32 These registers are used to enable the condition of rising edge
om N
triggered interrupt.
GPIO0 to GPIO31 falling edge interrupt enable register
10000660 GINT_FEDGE_ 32
x.c DE
0 These registers are used to enable the condition of falling edge
triggered interrupt.
GPIO32 to GPIO63 falling edge interrupt enable register
10000664 GINT_FEDGE_ 32
1 These registers are used to enable the condition for falling edge
triggered interrupt.
10000668
ne FI
GINT_FEDGE_
2
32
GPIO64 to GPIO95 falling edge interrupt enable register
These registers are used to enable the condition of falling edge
triggered interrupt.
GPIO0 to GPIO31 high level interrupt enable register
syn ON
These registers are used to enable the condition of high level
10000670 GINT_HLVL_0 32 triggered interrupt.
The bit in this register and the corresponded bit in GINT_LLVL_0
can not be set to 1 at the same time.
GPIO32 to GPIO63 high level interrupt enable register
These registers are used to enable the condition of high level
C
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
These registers are used to record the GPIO current interrupt
status.
GPIO0 to GPIO31 edge status register
EO
100006A0 GINT_EDGE_0 32 These registers are used to record the GPIO current interrupt's
US L
edge status.
These registers are useful only in edge triggered interrupt.
GPIO32 to GPIO63 edge status register
.tw TIA
100006A4 GINT_EDGE_1 32 These registers are used to record the GPIO current interrupt's
edge status.
These registers are useful only in edge triggered interrupt.
GPIO64 to GPIO95 edge status register
100006A8 GINT_EDGE_2 32 These registers are used to record the GPIO current interrupt's
edge status.
These registers are useful only in edge triggered interrupt.
om N
x.c DE
0000000
10000600 GPIO_CTRL_0 GPIO0 to GPIO31 direction control register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GPIOCTRL0[31:16]
Type
Reset
Bit
0
15
ne FI 0
14
0
13
0
12
0
11
0
10
0
9
0
RW
8
0
7
0
6
0
5
0
4
0
3
0
2
0
1
0
0
Name GPIOCTRL0[15:0]
syn ON
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
10000604 GPIO_CTRL_1 GPIO32 to GPIO63 direction control register
an E
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GPIOCTRL1[31:16]
rw IAT
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GPIOCTRL1[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
far D
0000000
10000608 GPIO_CTRL_2 GPIO64 to GPIO95 direction control register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GPIOCTRL2[31:16]
Type RW
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GPIOCTRL2[15:0]
Type RW
EO
US L
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
31:0 GPIOCTRL2 GPIO Pin Direction
0: GPIO input mode
1: GPIO output mode
om N
0000000
10000610 GPIO_POL_0 GPIO0 to GPIO31 polarity control register
0
x.c DE
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GPIOPOL0[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name ne FI GPIOPOL0[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
syn ON
Bit(s) Name Description
31:0 GPIOPOL0 GPIO Data Polarity
0: Data is non-inverted
1: Data is inverted
C
0000000
10000614 GPIO_POL_1 GPIO32 to GPIO63 polarity control register
0
g@ K
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GPIOPOL1[31:16]
Type
an E
RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw IAT
Name GPIOPOL1[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0: Data is non-inverted
1: Data is inverted
R ME
0000000
10000618 GPIO_POL_2 GPIO64 to GPIO95 polarity control register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GPIOPOL2[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GPIOPOL2[15:0]
Type RW
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
31:0 GPIOPOL2 GPIO Data Polarity
US L
0: Data is non-inverted
1: Data is inverted
.tw TIA
GPIO_DATA_ 0000000
10000620 GPIO0 to GPIO31 data register
0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
om N
Name GPIODATA0[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
x.c DE
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GPIODATA0[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit(s)
31:0
ne FI
Name
GPIODATA0
Description
GPIO Data
syn ON
GPIO_DATA_ 0000000
10000624 GPIO32 to GPIO63 data register
1 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GPIODATA1[31:16]
C
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name
g@ K
GPIODATA1[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
an E
GPIO_DATA_ 0000000
10000628 GPIO64 to GPIO95 data register
2 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
far D
Name GPIODATA2[31:16]
Type RW
Reset
R ME
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GPIODATA2[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
FFFFFF
10000630 GPIO_DSET_0 GPIO0 to GPIO31 data set register
FF
EO
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
US L
Name GPIODSET0[31:16]
Type WO
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
.tw TIA
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GPIODSET0[15:0]
Type WO
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
om N
31:0 GPIODSET0 GPIO Data Set
1: Set the GPIO_DATA_0 register
0: No effect
x.c DE
FFFFFF
10000634 GPIO_DSET_1 GPIO32 to GPIO63 data set register
ne FI FF
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GPIODSET1[31:16]
Type WO
syn ON
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GPIODSET1[15:0]
Type WO
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
C
0: No effect
an E
FFFFFF
10000638 GPIO_DSET_2 GPIO64 to GPIO95 data set register
rw IAT
FF
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GPIODSET2[31:16]
Type WO
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GPIODSET2[15:0]
far D
Type WO
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
R ME
GPIO_DCLR_ FFFFFF
10000640 GPIO0 to GPIO31 data clear register
0 FF
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GPIODCLR0[31:16]
Type WO
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
EO
US L
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GPIODCLR0[15:0]
Type WO
.tw TIA
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
om N
x.c DE
GPIO_DCLR_ FFFFFF
10000644 GPIO32 to GPIO63 data clear register
1 FF
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GPIODCLR1[31:16]
Type ne FI WO
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GPIODCLR1[15:0]
Type
syn ON
WO
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
GPIO_DCLR_ FFFFFF
10000648 GPIO64 to GPIO95 data clear register
2 FF
an E
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GPIODCLR2[31:16]
rw IAT
Type WO
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GPIODCLR2[15:0]
Type WO
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
far D
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GINTREDGE0[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
US L
Bit(s) Name Description
.tw TIA
31:0 GINTREDGE0 GPIO Rising Edge Interrupt Enable
1: Enable rising edge triggered
0: Disable rising edge triggered
om N
10000654
_1 register 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
x.c DE
Name GINTREDGE1[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GINTREDGE1[15:0]
Type ne FI RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GINTREDGE2[31:16]
Type RW
Reset
an E
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GINTREDGE2[15:0]
rw IAT
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
31:0 GINTFEDGE0 GPIO Falling Edge Interrupt Enable
EO
US L
1: Enable falling edge triggered
0: Disable falling edge triggered
.tw TIA
GINT_FEDGE GPIO32 to GPIO63 falling edge interrupt enable 0000000
10000664
_1 register 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GINTFEDGE1[31:16]
om N
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
x.c DE
Name GINTFEDGE1[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GINTFEDGE2[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
g@ K
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GINTFEDGE2[15:0]
Type RW
Reset
an E
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
10000670 GINT_HLVL_0 GPIO0 to GPIO31 high level interrupt enable register
0
R ME
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GINTHLVL0[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GINTHLVL0[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
1: Enable high level triggered
0: Disable high level triggered
EO
US L
.tw TIA
0000000
10000674 GINT_HLVL_1 GPIO32 to GPIO63 high level interrupt enable register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GINTHLVL1[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
om N
Name GINTHLVL1[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
x.c DE
Bit(s) Name Description
31:0 GINTHLVL1 GPIO High Level Interrupt Enable
1: Enable high level triggered
ne FI 0: Disable high level triggered
syn ON
0000000
10000678 GINT_HLVL_2 GPIO64 to GPIO95 high level interrupt enable register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GINTHLVL2[31:16]
Type RW
C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GINTHLVL2[15:0]
Type RW
g@ K
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
10000680 GINT_LLVL_0 GPIO0 to GPIO31 low level interrupt enable register
0
far D
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GINTLLVL0[31:16]
Type RW
R ME
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GINTLLVL0[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0000000
EO
10000684 GINT_LLVL_1 GPIO32 to GPIO63 low level interrupt enable register
US L
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
.tw TIA
Name GINTLLVL1[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GINTLLVL1[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
Bit(s) Name Description
x.c DE
31:0 GINTLLVL1 GPIO Low Level Interrupt Enable
1: Enable low level triggered
0: Disable low level triggered
10000688
ne FI
GINT_LLVL_2 GPIO64 to GPIO95 low level interrupt enable register
0000000
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
syn ON
Name GINTLLVL2[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GINTLLVL2[15:0]
Type RW
C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
10000690 GINT_STAT_0 GPIO0 to GPIO31 interrupt status register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GINTSTAT0[31:16]
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
far D
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GINTSTAT0[15:0]
R ME
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0000000
10000694 GINT_STAT_1 GPIO32 to GPIO63 interrupt status register
0
EO
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
US L
Name GINTSTAT1[31:16]
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GINTSTAT1[15:0]
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
31:0 GINTSTAT1 GPIO Interrupt Status
1: Interrupt is detected
0: Interrupt is not detected
x.c DE
0000000
10000698 GINT_STAT_2 GPIO64 to GPIO95 interrupt status register
ne FI 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GINTSTAT2[31:16]
Type W1C
syn ON
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GINTSTAT2[15:0]
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
C
GINT_EDGE_ 0000000
100006A0 GPIO0 to GPIO31 edge status register
rw IAT
0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GINTEDGE0[31:16]
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GINTEDGE0[15:0]
far D
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R ME
GINT_EDGE_ 0000000
100006A4 GPIO32 to GPIO63 edge status register
1 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GINTEDGE1[31:16]
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
US L
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GINTEDGE1[15:0]
Type W1C
.tw TIA
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
x.c DE
GINT_EDGE_ 0000000
100006A8 GPIO64 to GPIO95 edge status register
2 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name GINTEDGE2[31:16]
Type ne FI W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GINTEDGE2[15:0]
Type
syn ON
W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1: Rising edge
0: Falling edge
g@ K
an E
rw IAT
far D
R ME
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.9 SPI Slave
EO
2.9.1 SPI Slave Control
US L
spis_intf Changes LOG
.tw TIA
Revision Date Author Change Log
0.1 2013/9/23 Kaiping Yen Initialization
om N
Address Name Widt Register Function
h
x.c DE
00000000 REG00 32 SPI Slave Register 00
00000004 REG01 32 SPI Slave Register 01
00000008 REG02 32 SPI Slave Register 02
0000000C REG03 32 SPI Slave Register 03
00000010 ne FIREG04 32 SPI Slave Register 04
syn ON
0000000
00000000 REG00 SPI Slave Register 00
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name bus_read_data[31:16]
Type RO
C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name bus_read_data[15:0]
Type RO
g@ K
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
00000004 REG01 SPI Slave Register 01
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name bus_write_data[31:16]
far D
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R ME
Name bus_write_data[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name bus_address[31:16]
EO
Type RW
US L
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
.tw TIA
Name bus_address[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
x.c DE
0000000
0000000C REG03 SPI Slave Register 03
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name reg03_31_5[26:11]
Type
Reset
Bit
0
15
ne FI 0
14
0
13
0
12
0
11
0
10
0
9
0
RW
8
0
7
0
6
0
5
0
4 3
0 0
2
0
1 0
0
bus
syn ON
reg bus
_pb
Name reg03_31_5[10:0]
_rb
03_ bus_size _r_
3 w
_sel
Type RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
C
registers only
3 reg03_3 reg03[3] reserved bit
rw IAT
0: read
1: write
R ME
0000000
00000010 REG04 SPI Slave Register 04
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
bus
Name _bu
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
sy
Type RO
Reset 0
EO
US L
Bit(s) Name Description
0 bus_busy Bus (Internal Rbus/Pbus Master) interface status
.tw TIA
0: SPIS bus interface is idle for next access command
1: SPIS bus interface is busy
2.9.2 Regsiters
om N
spis_pbslv Changes LOG
Revision Date Author Change Log
x.c DE
0.1 2013/9/23 Kaiping Yen Initialization
0000000
10000700 SPIS_REG0 SPI Slave Register 0
0
an E
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name spis_reg0[31:16]
Type RO
rw IAT
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name spis_reg0[15:0]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
10000704 SPIS_REG1 SPI Slave Register 1
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name spis_reg1[31:16]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name spis_reg1[15:0]
Type RO
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
31:0 spis_reg1 SPI Slave Register 1
US L
.tw TIA
0000000
10000708 SPIS_REG2 SPI Slave Register 2
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name spis_reg2[31:16]
Type RO
om N
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name spis_reg2[15:0]
x.c DE
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name spis_reg3[15:0]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
g@ K
0000000
10000710 SPIS_REG4 SPI Slave Register 4
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name spis_reg4[31:16]
Type RO
far D
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name spis_reg4[15:0]
R ME
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
EO
Type
US L
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
.tw TIA
Name spis_mode
Type RW
Reset 0 0
om N
2'b01: CPOL=0, CPHA=1
2'b10: CPOL=1, CPHA=0
x.c DE
2'b11: CPOL=1, CPHA=1
ne FI
syn ON
C
g@ K
an E
rw IAT
far D
R ME
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2
2.10 I C Controller
EO
2.10.1 Features
US L
Programmable I C bus clock rate
2
.tw TIA
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
om N
2.10.2 List of Registers
x.c DE
I2C Changes LOG
Revision Date Author Change Log
0.1 2012/10/3 Evan Chou Initialization
ne FI
Module name: I2C Base address: (+10000900h)
Address Name Widt Register Function
syn ON
h
10000908 SM0CFG0 32 SERIAL INTERFACE MASTER 0 CONFIG 0 REGISTER
10000910 SM0DOUT 32 SERIAL INTERFACE MASTER 0 DATAOUT REGISTER
10000914 SM0DIN 32 SERIAL INTERFACE MASTER 0 DATAIN REGISTER
C
0000000
10000908 SM0CFG0 SERIAL INTERFACE MASTER 0 CONFIG 0 REGISTER
0
R ME
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SM0_DEVADDR
Type RW
Reset 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
6:0 SM0_DEVADDR Device address for transmission
EO
US L
SERIAL INTERFACE MASTER 0 DATAOUT 0000000
.tw TIA
10000910 SM0DOUT
REGISTER 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
om N
Name SM0_DATAOUT
Type RW
Reset 0 0 0 0 0 0 0 0
x.c DE
Bit(s) Name Description
7:0 SM0_DATAOUT Data out register for auto mode
10000914
ne FI
SM0DIN SERIAL INTERFACE MASTER 0 DATAIN REGISTER
0000000
0
syn ON
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SM0_DATAIN
C
Type RO
Reset 0 0 0 0 0 0 0 0
0000000
rw IAT
SM
SM
0_
0_R SM
WD
DA 0_B
R ME
Name AT
TA_ US
A_E
RD Y
MP
Y
TY
Type RW RW RO
Reset 0 1 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
0 SM0_BUSY State machine is busy
EO
US L
SERIAL INTERFACE MASTER 0 AUTO-MODE 0000000
.tw TIA
1000091C SM0AUTO
REGISTER 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
om N
SM
0_S
Name TA
RT_
x.c DE
RW
Type RW
Reset 0
0000000
10000920 SM0CFG1 SERIAL INTERFACE MASTER 0 CONFIG 1 REGISTER
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C
Name
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
g@ K
Name SM0_BYTECNT
Type RW
Reset 0 0 0 0 0 0
an E
5:0 SM0_BYTECNT The value + 1 indicateds the number of data bytes for sequential
reads/writes. (word address is included in data bytes)
0000000
10000928 SM0CFG2 SERIAL INTERFACE MASTER 0 CONFIG 2 REGISTER
0
far D
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
R ME
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SM
0_I
S_A
Name UT
OM
OD
E
Type RW
Reset 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
0 SM0_IS_AUTOMOD Set 1 to configure auto mode
EO
US L
E
.tw TIA
0000800
10000940 SM0CTL0 Serial interface master 0 control 0 register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
SM
0_O
Name RESV0 SM0_CLK_DIV
om N
DR
AIN
Type RW RO RW
Reset
x.c DE
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SM SM SM
SM
SIF 0_S 0_S 0_S
0_C SM
_VS RE SM0_VSY CL_ DA CL_
Name RESV2 S_S 0_E
YN SV1 NC_MODE ST _ST ST
TAT N
Type
C
RO
ne FI
RO RW RO
US
RO
AT
E
RO
AT
E
RO RW
RE
CH
RW
Reset 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
syn ON
Bit(s) Name Description
31 SM0_ODRAIN Open-drain output configuration
0: When SIF output is logic 1, the output is pulled high by outer devices. SIF
output is open-drained.
1: When SIF output is logic 1, the output is pulled high by SIF master 0.
C
30:28 RESV0
27:16 SM0_CLK_DIV SIF master 0 clock divide value
g@ K
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SM0_ACK
EO
Type RO
US L
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
.tw TIA
SM
Name SM0_PGLEN SM0_MODE 0_T
RI
Type RW RW RW
Reset 0 0 0 0 0 0 0
om N
23:16 SM0_ACK Acknowledge bits
ACK[7:0] is acknowledge of 8 bytes of data
x.c DE
10:8 SM0_PGLEN Page length
Page length of sequential read/write. The maximum is 8 bytes. Set 0 as 1
byte.
6:4 SM0_MODE SIF master mode
001: Start
ne FI 010: Write data
011: Stop
100: Read data with no ack for final byte
101: Read data with ack
syn ON
0 SM0_TRI Trigger serial interface
0: Read back as serial interface is idle.
1: Set 1 to trigger this serial interface. Read back as serial interface is busy.
C
FFFFFF
10000950 SM0D0 Serial interface master 0 data 0 register
FF
g@ K
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SM0_DATA3 SM0_DATA2
Type RW RW
Reset
an E
x x x x x x x x x x x x x x x x
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SM0_DATA1 SM0_DATA0
rw IAT
Type RW RW
Reset x x x x x x x x x x x x x x x x
FFFFFF
10000954 SM0D1 Serial interface master 0 data 1 register
FF
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SM0_DATA7 SM0_DATA6
Type RW RW
Reset x x x x x x x x x x x x x x x x
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SM0_DATA5 SM0_DATA4
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Type RW RW
Reset x x x x x x x x x x x x x x x x
EO
Bit(s) Name Description
US L
31:24 SM0_DATA7 Serial interface data byte 7
23:16 SM0_DATA6 Serial interface data byte 6
.tw TIA
15:8 SM0_DATA5 Serial interface data byte 5
7:0 SM0_DATA4 Serial interface data byte 4
0000000
om N
1000095C PINTEN Peripheral interrupt enable register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
x.c DE
Name
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SM
ne FI 0_I
Name
NT_
EN
Type RW
Reset 0
syn ON
0000000
10000960 PINTST Peripheral interrupt status register
0
g@ K
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
an E
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SM
rw IAT
0_I
Name
NT_
ST
Type WS
Reset 0
0000000
10000964 PINTCL Peripheral interrupt clear register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SM
Name
0_I
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
NT_
CL
W1
Type
C
EO
Reset 0
US L
Bit(s) Name Description
.tw TIA
0 SM0_INT_CL Serial interface master 0 interrupt clear
om N
x.c DE
ne FI
syn ON
C
g@ K
an E
rw IAT
far D
R ME
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.11 I2S Controller
EO
2.11.1 Features
US L
I2S transmitter/receiver, which can be configured as master or slave.
Supports 16-bit data, sampling rates of 8 kHz, 16 kHz, 22.05 kHz, 44.1 kHz, and 48 kHz
.tw TIA
Support stereo audio data transfer.
32-byte FIFO are available for data transmission.
Supports GDMA access
Supports 12 Mhz bit clock from external source (when in slave mode)
om N
2
The I S transmitter block diagram is shown as below.
x.c DE
RBUS
CPU SDRAM
ne FI
RBUS
RBUS
I2S Design CSR
syn ON
Async interface
SD
Parallel- RBUS
PBUS GDMA
WS to-serial FIFO Control
converter PBUS
SCLK
C
g@ K
2
Figure 2-5 I S Transmitter Block Diagram
an E
rw IAT
2
The I S interface consists of two separate cores, a transmitter and a receiver. Both can operate in either master
or slave mode. The transmitter is only shown here in master or slave mode.
2 2
I S Signal Timing For I S Data Format
far D
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Serial data is transmitted in 2’s complement with the MSB first. The transmitter always sends the MSB of the
EO
next word one clock period after the WS changes. Serial data sent by the transmitter may be synchronized
US L
with either the trailing (HIGH-to-LOW) or the leading (LOW-to-HIGH) edge of the clock signal. However, the
serial data must be latched into the receiver on the leading edge of the serial clock signal, and so there are
.tw TIA
some restrictions when transmitting data that is synchronized with the leading edge.
om N
the slave, this signal is latched on the leading edge of the clock signal. The WS line changes one clock period
before the MSB is transmitted. This allows the slave transmitter to derive synchronous timing of the serial data
x.c DE
that will be set up for transmission. Furthermore, it enables the receiver to store the previous word and clear
the input for the next Word.
2.11.3 Registers
ne FI
I2S Changes LOG
Revision Date Author Change Log
0.1 2014/1/12 Ken Wu Initialization
syn ON
h
I2S Configuration
10000A00 I2S_CFG 32
I2S Tx/Rx Configuration Register
g@ K
Interrupt Status
10000A04 INT_STATUS 32
I2S Interrupt Status
Interrupt Enable
10000A08 INT_EN 32
an E
0001404
10000A00 I2S_CFG I2S Configuration
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
I2S DM LIT SY TX_ RX_ NO DA SL
Name _EN A_E TIE S_E EN EN RM TA_ AV
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
N _EN NDI _24 24B E_
DIA AN BIT IT MO
N_ DE
DA
EO
TA_
US L
FM
T
Type RW RW RW RW RW RW RW RW RW
.tw TIA
Reset 0 0 0 0 0 0 0 0 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RX_FF_THRES TX_FF_THRES
Type RW RW
Reset 0 1 0 0 0 1 0 0
om N
Bit(s) Name Description
31 I2S_EN I2S Enable
Enables I2S. When disabled, all I2S control registers are cleared to their
x.c DE
initial values.
0: Disable
1: Enable
30 DMA_EN DMA Enable
ne FI Enables DMA access.
0: Disable
1: Enable
29 LITTIE_ENDIAN_DA Little endian audio data
syn ON
TA_FMT 0: big endian audio data format
1: little endian audio data format
28 SYS_ENDIAN System endian setting.
0: Little endian
1: Big endian
C
2<RX_FF_THRES<6
(unit: word)
7:4 TX_FF_THRES Tx FIFO Threshold
When the threshold is reached, the host/DMA is notified to fill FIFO.
2<TX_FF_THRES<6
(unit: word)
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
EO
Type
US L
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
.tw TIA
RX_ TX_
RX_ RX_ RX_ TX_ TX_ TX_
DM DM
OV UN TH OV UN TH
Name A_F A_F
RU RU RE RU RU RE
AU AU
N N S N N S
LT LT
Type RW RW RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0
om N
Bit(s) Name Description
7 RX_DMA_FAULT Rx DMA Fault Detected Interrupt
x.c DE
Asserts when a fault is detected in Rx DMA signals.
6 RX_OVRUN Rx Overrun Interrupt
Asserts when the Rx FIFO is overrun.
5 RX_UNRUN Rx Underrun Interrupt
4
ne FI
RX_THRES
Asserts when the Rx FIFO is underrun.
Rx FIFO Below Threshold Interrupt
Asserts when the Rx FIFO is lower than the defined threshold.
syn ON
3 TX_DMA_FAULT Tx DMA Fault Detected Interrupt
Asserts when a fault is detected in Tx DMA signals.
2 TX_OVRUN Tx FIFO Overrun Interrupt
Asserts when the Tx FIFO is overrun.
1 TX_UNRUN Tx FIFO Underrun Interrupt
C
0000000
10000A08 INT_EN Interrupt Enable
0
rw IAT
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RX_ RX_ RX_ RX_ TX_ TX_ TX_ TX_
INT INT INT INT INT INT INT INT
Name
far D
Reset 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
Enables the Rx Underrun Interrupt. This interrupt asserts when the Rx FIFO
is underrun.
EO
4 RX_INT0_EN INT_STATUS[4] Enable
US L
Enables the Rx FIFO Below Threshold Interrupt. This interrupt asserts when
the Rx FIFO is lower than the defined threshold.
.tw TIA
3 TX_INT3_EN INT_STATUS[3] Enable
Enables the Tx DMA Fault Detected Interrupt. This interrupt asserts when a
fault is detected in Tx DMA signals.
2 TX_INT2_EN INT_STATUS[2] Enable
Enables the Tx FIFO Overrun Interrupt. This interrupt asserts when the Tx
FIFO is overrun.
om N
1 TX_INT1_EN INT_STATUS[1] Enable
Enables the Tx FIFO Underrun Interrupt. This interrupt asserts when the Tx
x.c DE
FIFO is underrun.
0 TX_INT0_EN INT_STATUS[0] Enable
Enables the Tx FIFO Below Threshold Interrupt. This interrupt asserts when
the FIFO is lower than the defined threshold.
ne FI
0000001
10000A0C FF_STATUS FIFO Status
0
syn ON
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
C
TX_FIFO_WR 0000000
far D
Name TX_FIFO_WDATA[31:16]
Type WO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TX_FIFO_WDATA[15:0]
Type WO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
RX_FIFO_RR 0000000
EO
10000A14 Receive FIFO Read Register
US L
EG 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
.tw TIA
Name RX_FIFO_RDATA[31:16]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RX_FIFO_RDATA[15:0]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
Bit(s) Name Description
x.c DE
31:0 RX_FIFO_RDATA Rx FIFO Read Data Buffer
Buffers data read from the Rx FIFO.
10000A18
ne FI
I2S_CFG1 I2S Configuration 1
0000000
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
EXT
syn ON
LB
_LB
Name K_E
K_E
N
N
Type RW RW
Reset 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
C
I2S
Name _F
MT
Type RW
g@ K
Reset 0
1: Loopback mode
ASYNC_TXFIFIO -> Tx -> Rx -> ASYNC_RXFIFIO
30 EXT_LBK_EN Enables external loopback.
0: Normal mode
1: Enables external loop back.
External A/D -> Rx -> Tx -> External D/A
far D
DIVCOMP_CF 0000000
10000A20 Integer Part of the Dividor Register 1
G 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
CL
Name K_E
N
Type RW
Reset 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DIVCOMP
Type RW
Reset 0 0 0 0 0 0 0 0 0
EO
US L
Bit(s) Name Description
.tw TIA
31 CLK_EN Enables setting of the I2S clock based on DIVCOMP and DIVINT
parameters.
0: Disable
1: Enable
8:0 DIVCOMP A parameter in an equation which determines FREQOUT. See
DIVINT_CFG.
om N
x.c DE
0000000
10000A28 DIVINT_CFG Integer Part of the Dividor Register 2
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
Bit
Name
15
ne FI14 13 12 11 10 9 8 7 6 5
DIVINT
4 3 2 1 0
Type RW
syn ON
Reset 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.12 SPI Controller
EO
2.12.1 Features
US L
Supports up to 2 SPI master operations
Programmable clock polarity
.tw TIA
Programmable interface clock rate
Programmable bit ordering
Firmware-controlled SPI enable
Programmable payload (address + data) length
Supports 1/2/4 multi-IO SPI flash memory
Supports command/user mode operation
om N
Supports SPI direct access
Extends the addressable range from 24 bits to 32 bits for memory size larger than 128 Mb.
x.c DE
2.12.2 Block Diagram
ne FI
clock
CPU SO/SIO1
CPU Interface SERDES
from PalmBus Interface WP/SIO2
Controller
g@ K
an E
rw IAT
2.12.3 Registers
SPI Changes LOG
Revision Date Author Change Log
0.1 2012/8/29 Lancelot Initialization
0.2 2012/11/6 Lancelot 1. Remove 0x38 SW_RST 2. Add CS_POLAR at 0x38
0.3 2012/11/23 Lancelot Fix default value
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Module name: SPI Base address: (+10000B00h)
EO
US L
Address Name Widt Register Function
h
.tw TIA
10000B00 SPI_TRANS 32 SPI transaction control/status register
10000B04 SPI_OP_ADDR 32 SPI opcode/address register
10000B08 SPI_DIDO_0 32 SPI DI/DO data #0 register
10000B0C SPI_DIDO_1 32 SPI DI/DO data #1 register
10000B10 SPI_DIDO_2 32 SPI DI/DO data #2 register
10000B14 SPI_DIDO_3 32 SPI DI/DO data #3 register
om N
10000B18 SPI_DIDO_4 32 SPI DI/DO data #4 register
10000B1C SPI_DIDO_5 32 SPI DI/DO data #5 register
x.c DE
10000B20 SPI_DIDO_6 32 SPI DI/DO data #6 register
10000B24 SPI_DIDO_7 32 SPI DI/DO data #7 register
10000B28 SPI_MASTER 32 SPI master mode register
10000B30
ne FI
F
SPI_QUEUE_C
TL 32 SPI flash queue control register
0016000
10000B00 SPI_TRANS SPI transaction control/status register
1
g@ K
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
spi
_m
an E
spi_addr_s ast
Name spi_addr_ext Reserved0 Reserved1
ize er_
bus
rw IAT
y
Type RW RO RW RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
spi
_m
ast
Name Reserved2
er_
miso_byte_cnt mosi_byte_cnt
far D
star
t
Type RO WO RW RW
R ME
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
0: reserved.
1: spi_addr[15:0] of SPI DI data register are valid (16-bit size).
EO
2: spi_addr[23:0] of SPI DI data register are valid (24-bit size).
US L
3: {spi_addr_ext[7:0], spi_addr[23:0]} of SPI DI data register are valid
(32-bit size)
Note: The spi_addr_size is valid only when more_buf_mode = 0.
.tw TIA
16 spi_master_busy Transaction busy indication (Read-only). Writes to this bit are ignored.
0: No SPI transaction is ongoing. Software may start a new SPI transaction
by writing to the SPI transaction start bit within this register.
1: An SPI transaction presently is underway. Software must not try to start a
new SPI transaction. Software may not alter the value of any field of the SPI
master control registers.
om N
8 spi_master_start SPI transaction start. Only writes to this field are meaningful, reads
always return 0.
x.c DE
Writes:
0: No effect
1: Starts SPI transaction.
7:4 miso_byte_cnt SPI MISO (rx) byte count.
Determines the number of bytes received from the SPI device from the SPI
ne FI opcode/address register and the SPI DI/DO data #0 register. Values of 0 ~ 8
are valid, other values are illegal.
Note: The miso_byte_cnt is valid only when more_buf_mode = 0.
3:0 mosi_byte_cnt SPI MOSI (tx) byte count.
syn ON
Determines the number of bytes transmitted from the SPI opcode/address
register and the SPI DI/DO data #0 register to the SPI device. Values of 1 ~ 8
are valid, other values are illegal.
Note: The mosi_byte_cnt is valid only when more_buf_mode = 0. The
transmitted data sequence is as follows: spi_opcode, spi_addr (conditional)
and d0_byte ~ d3_byte (conditional).
C
g@ K
SPI_OP_ADD 0000000
10000B04 SPI opcode/address register
R 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
an E
Name spi_addr[23:8]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
rw IAT
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name spi_addr[7:0] spi_opcode
Type RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
31:8 spi_addr SPI address. Usually this field specifies the 24-bits address to transmit
to the SPI device when more_buf_mode = 0.
1: (16-bits SPI address size), spi_addr[23:16] is the 1st byte of the address
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
7:0 spi_opcode SPI opcode. Usually this field specifies the 8-bits opcode (instruction) to
transmit to the SPI device as the first byte of a SPI transaction when
EO
more_buf_mode = 0.
US L
Note: For SPI read transaction and more_buf_mode = 0, this byte is also
used to store the 5-th byte of data read phase according to the rx byte count
.tw TIA
miso_byte_cnt.
0000000
10000B08 SPI_DIDO_0 SPI DI/DO data #0 register
0
om N
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name d3_byte d2_byte
Type RW RW
x.c DE
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name d1_byte d0_byte
Type RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit(s)
ne FI
Name Description
31:24 d3_byte The 4th data byte of data read/write phase.
23:16 d2_byte The 3th data byte of data read/write phase.
syn ON
15:8 d1_byte The 2nd data byte of data read/write phase.
7:0 d0_byte The 1st data byte of data read/write phase.
C
0000000
10000B0C SPI_DIDO_1 SPI DI/DO data #1 register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
g@ K
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name d1_byte d0_byte
rw IAT
Type RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
10000B10 SPI_DIDO_2 SPI DI/DO data #2 register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name d3_byte d2_byte
Type RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name d1_byte d0_byte
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Type RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
Bit(s) Name Description
US L
31:24 d3_byte The 4th data byte of data read/write phase.
23:16 d2_byte The 3th data byte of data read/write phase.
.tw TIA
15:8 d1_byte The 2nd data byte of data read/write phase.
7:0 d0_byte The 1st data byte of data read/write phase.
0000000
om N
10000B14 SPI_DIDO_3 SPI DI/DO data #3 register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
x.c DE
Name d3_byte d2_byte
Type RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name d1_byte d0_byte
Type ne FI RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
10000B18 SPI_DIDO_4 SPI DI/DO data #4 register
g@ K
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
an E
d3_byte d2_byte
Type RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
rw IAT
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name d1_byte d0_byte
Type RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
10000B1C SPI_DIDO_5 SPI DI/DO data #5 register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name d3_byte d2_byte
Type RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name d1_byte d0_byte
Type RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
US L
Bit(s) Name Description
.tw TIA
31:24 d3_byte The 4th data byte of data read/write phase.
23:16 d2_byte The 3th data byte of data read/write phase.
15:8 d1_byte The 2nd data byte of data read/write phase.
7:0 d0_byte The 1st data byte of data read/write phase.
om N
0000000
10000B20 SPI_DIDO_6 SPI DI/DO data #6 register
x.c DE
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name d3_byte d2_byte
Type RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15ne FI 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name d1_byte d0_byte
Type RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
syn ON
Bit(s) Name Description
31:24 d3_byte The 4th data byte of data read/write phase.
23:16 d2_byte The 3th data byte of data read/write phase.
15:8 d1_byte The 2nd data byte of data read/write phase.
C
0000000
10000B24 SPI_DIDO_7 SPI DI/DO data #7 register
0
an E
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name d3_byte d2_byte
rw IAT
Type RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name d1_byte d0_byte
Type RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
far D
000D888
10000B28 SPI_MASTER SPI master mode register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name rs_slave_sel clk_ rs_clk_sel
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
mo
de
Type RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1
EO
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
US L
mor
full spi spi
bidi lsb e_b
_du int_ _st _pr cph cpo serial_mod
.tw TIA
Name cs_dsel_cnt
ple en art_ efet
r_m
a l
_fir uf_
e
ode st mo
x sel ch
de
Type RW RW RW RW RW RW RW RW RW RW RW
Reset 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0
om N
31:29 rs_slave_sel select SPI device
0: select SPI device 0 (default is flash)
1: select SPI device 1
x.c DE
...
7: select SPI device 7
28 clk_mode This register is used to specify that period of SCLK HIGH is longer or
period of SCLK LOW is longer when clock divisor(clk_sel) is odd.
ne FI 0: period of SCLK LOW is longer.
1: period of SCLL HIGH is longer.
27:16 rs_clk_sel Register Space SPI clock frequency select.
0: SPI clock frequency is hclk/2. (50% duty cycle, duty cycle is the ratio of the
syn ON
output high time to the total cycle time)
1: SPI clock frequency is hclk/3. (33.33% or 66.67% duty cycle)
2: SPI clock frequency is hclk/4. (50% duty cycle)
3: SPI clock frequency is hclk/5. (40% or 60% duty cycle)
4095: SPI clock frequency is hclk/4097.
15:11 cs_dsel_cnt De-select time of SPI chip select is configured to occupy the number of
C
for interface with external devices. The MOSI pin becomes the serial
data I/O pin for the SPI transaction and MISO pin is not used. Bi-
direction mode is used for the application with only 1 bi-direction serial
pin for SPI transaction.
0: normal mode (both MOSI and MISO pins are used).
1: bi-direction mode (only MOSI pin is used). SPI host controller must operate
in half duplex mode if bidir_mode = 1.
Note: The bidir_mode is valid only when more_buf_mode = 1.
5 cpha (CPHA, clock phase). Initial SPI clock phase for SPI transaction.
There are four SPI modes used to latch data. These SPI modes latch data in
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
one of four ways, and are defined by the logic state combinations of the CLK
Polarity (CPOL) in relation to the CLK Phase (CPHA). The valid logic
EO
combinations identify and determine the SPI modes supported by the SPI
US L
device.
SPI mode
.tw TIA
At CPOL=0 the base value of the clock is zero
For CPHA=0 (mode 0), data is read on the clock's rising edge and data is
changed on a falling edge.
For CPHA=1 (mode 1), data is read on the clock's falling edge and data is
changed on a rising edge.
At CPOL=1 the base value of the clock is one (inversion of CPOL=0)
om N
For CPHA=0 (mode 2), data is read on clock's falling edge and data is
changed on a rising edge.
For CPHA=1 (mode 3), data is read on clock's rising edge and data is
x.c DE
changed on a falling edge.
4 cpol cpol (CPOL, clock polarity). Initial SPI clock polarity for SPI transaction.
3 lsb_first 0: MSB(most significant bit) is transferred first for SPI transaction.
1: LSB(least significant bit) is transferred first for SPI transaction.
2
ne FI
more_buf_mode Select 2 words buffer or 8 words buffer for SPI transaction.
0: SPI transfer data buffer size is only 2 words. In this mode, SPI DI/DO data
#0 register and SPI opcode/address register are the data buffer for SPI
transaction. And, SPI master follows mosi_byte_cnt and miso_byte_cnt to
syn ON
complete the transmission and reception, respectively. This kind of
transaction must operate in half duplex mode.
1: SPI transfer data buffer size is 8 words. In this mode, SPI opcode/address
register are the data buffer for SPI transaction and follows cmd_bit_cnt to
complete the transaction. SPI DI/DO data #0~#7 register are the data buffer
for SPI transaction and follows do_bit_cnt and di_bit_cnt to complete the
C
transmission and SPI DI/DO #4~#7 registers are used for receipt.
1:0 serial_mode This mode is designed for Winbond SPI flash W25Q80/16/32 and
an E
W25X10/20/40/80/16/32/64 series.
0: standard serial.
1: dual serial.
rw IAT
2: quad serial.
3: reserved.
Note: The serial_mode is valid only when more_buf_mode = 0. The
transaction mode is always as standard serial when more_buf_mode = 1.
far D
SPI_MORE_B 0000000
10000B2C SPI more buf control register
UF 0
R ME
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name Reserved0 cmd_bit_cnt Reserved1 miso_bit_cnt[8:4]
Type RO RW RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name miso_bit_cnt[3:0] Reserved2 mosi_bit_cnt
Type RW RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
29:24 cmd_bit_cnt SPI command phase MOSI (tx) bit count. Determines the number of
command bits transmitted from the SPI opcode/address register to the
EO
SPI device. Values of 0 ~ 32 are valid, but other values are illegal.
US L
Note: The cmd_bit_cnt is valid only when more_buf_mode = 1 and the SPI
opcode/address register is treated as a command register.
.tw TIA
20:12 miso_bit_cnt SPI data phase MISO (rx) bit count. Determines the number of bits
received from the SPI device into the SPI DI/DO data #0~#7 register.
Values of 0 ~ 256 are valid, but other values are illegal. Maximum value
is 256 for half duplex mode and 128 for full duplex mode. Please note
that do_bit_cnt must be equal to di_bit_cnt in full duplex mode.
Note: The miso_bit_cnt is valid only when more_buf_mode = 1.
om N
8:0 mosi_bit_cnt SPI data phase MOSI (tx) bit count. Determines the number of data bits
transmitted from the SPI DI/DO data #0~#7 register to the SPI device.
Values of 0 ~ 256 are valid, but other values are illegal. Maximum value
x.c DE
is 256 for half duplex mode and 128 for full duplex mode.
Note: The mosi_bit_cnt is valid only when more_buf_mode = 1.
10000B30
ne FI
SPI_QUEUE_
CTL
SPI flash queue control register
00000E4
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
syn ON
fs_page_sel Reserved0[12:3]
Type RW RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
fs_ Res
fs_addr_si fs_addr_si
Name Reserved0[2:0] bus fs_di_ph_byc erv fast_spi_sel
ze_r ze
y ed1
C
Type RO RO RO RW RW RO RW
Reset 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 0
g@ K
to the SPI device for SPI Flash Space Read operation only.
0: 25-bit SPI address size
1: 16-bit SPI address size Reserved.
2: 24-bit SPI address size (default for 3B SPI flash)
3: 26-bit SPI address size (default for 4B SPI flash)
If the change of the fs_addr_size is needed, the sequence below must be
followed. Otherwise, the new fs_addr_size configuration will not be updated
to the internal spimc logic .
Step 1: Set new fs_addr_size.
Step 2: Transmit mode change command (ex. En4B or Ex4B of
MX25L25635E)
Note: 1. The value fs_addr_size is not valid in Register Space.
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
2. The Spimc now only supports 3-Byte mode (24 bits) and 4-Byte
mode (25 or 26 bits) switch.
EO
7:4 fs_di_ph_byc Determines the number of data bytes transmitted from the SPI master
US L
controller to the SPI device for SPI Flash Space Read operation. This
field is similar to mosi_byte_cnt in STCSR but is used for setting of
.tw TIA
flash space access control path.
Note: this field should
(if fs_addr_size_r = 2, 24-bit fs_addr_size)
= 4 (OP + ADDR) if fast_spi_sel = 0 (0x03)
= 5 (OP + ADDR + dummy) if fast_spi_sel = 1 (0x0b)
= 5 (OP + ADDR + dummy) if fast_spi_sel = 2 (0x3b)
= 5 (OP + ADDR + M7-0) if fast_spi_sel = 3 (0xbb)
om N
= 5 (OP + ADDR + dummy) if fast_spi_sel = 4 (0x6b)
= 7 (OP + ADDR + M7-0 + dummy) if fast_spi_sel = 5 (0xeb)
= 5 (OP + ADDR + M7-0) if fast_spi_sel = 6 (0xe3)
x.c DE
(if fs_addr_size_r = 0 or 3, 25 or 26-bit fs_addr_size)
= 5 (OP + ADDR) if fast_spi_sel = 0 (0x03)
= 6 (OP + ADDR + dummy) if fast_spi_sel = 1 (0x0b)
= 6 (OP + ADDR + dummy) if fast_spi_sel = 2 (0x3b)
ne FI = 6 (OP + ADDR + M7-0) if fast_spi_sel = 3 (0xbb)
= 6 (OP + ADDR + dummy) if fast_spi_sel = 4 (0x6b)
= 8 (OP + ADDR + M7-0 + dummy) if fast_spi_sel = 5 (0xeb)
= 6 (OP + ADDR + M7-0) if fast_spi_sel = 6 (0xe3)
syn ON
2:0 fast_spi_sel Select SPI flash read instruction for Flash Space
0: standard read data instruction (0x03).
1: standard fast read data instruction (0x0b).
2: fast read dual output instruction defined in Winbond W25Qxx series SPI
flash (0x03b).
3: fast read dual I/O instruction defined in Winbond W25Qxx series SPI flash
C
(0xbb).
4: fast read quad output instruction defined in Winbond W25Qxx series SPI
flash (0x6b).
5: fast read quad I/O instruction defined in Winbond W25Qxx series SPI flash
g@ K
(0xeb).
6: burst read quad I/O instruction defined in Winbond W25Qxx series SPI
flash (0xe3).
an E
Note: serial_mode and more_buf_mode are don't care for this flash space
access control path.
rw IAT
0000003
10000B34 SPI_STATUS SPI controller status register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name Reserved0[25:10]
far D
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R ME
spi_flash_ spi
Name Reserved0[9:0] Reserved1
mode _ok
Type RO RO RO RC
Reset 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
0 spi_ok When SPI transaction complete, SPI master controller will set this bit
and assert SPI interrupt to notify software. Reading this register will
EO
clear this bit and de-assert SPI interrupt.
US L
.tw TIA
SPI_CS_POL 0000000
10000B38 SPI chip select polarity
AR 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
om N
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name cs_polar
x.c DE
Type RW
Reset 0 0 0 0 0 0 0 0
0000003
10000B3C SPI_SPACE SPI flash space control register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name Reserved[16:1]
C
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Res
g@ K
erv
Name ed[
fs_slave_sel fs_clk_sel
0:0]
an E
Type RO RW RW
Reset 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0
rw IAT
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.13 UART Lite
EO
2.13.1 Features
US L
2-pin UART
16550-compatible register set, except for Divisor Latch register
.tw TIA
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
om N
Receive buffer threshold interrupt
Transmit buffer threshold interrupt
x.c DE
False start bit detection in asynchronous mode
Internal diagnostic capabilities
Break simulation
Loop-back control for communications link fault isolation
ne FI
2.13.2 Registers
n = 1; for uart1 only.
syn ON
UARTn+0000h RX Buffer Register UARTn_RBR
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RBR[7:0]
Type RO
C
RBR RX Buffer Register. Read-only register. The received data can be read by accessing this register.
Modified when LCR[7] = 0.
g@ K
Name THR[7:0]
Type WO
rw IAT
THR TX Holding Register. Write-only register. The data to be transmitted is written to this register, and
then sent to the PC via serial communication.
Modified when LCR[7] = 0.
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name CTSI RTSI XOFFI X EDSSI ELSI ETBEI ERBFI
Type R/W
R ME
Reset 0
IER By storing a „1‟ to a specific bit position, the interrupt associated with that bit is enabled. Otherwise,
the interrupt is disabled.
IER[3:0] are modified when LCR[7] = 0.
IER[7:4] are modified when LCR[7] = 0 & EFR[4] = 1.
CTSI Masks an interrupt that is generated when a rising edge is detected on the CTS modem control line.
Note: This interrupt is only enabled when hardware flow control is enabled.
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0 Unmask an interrupt that is generated when a rising edge is detected on the CTS modem control
line.
1 Mask an interrupt that is generated when a rising edge is detected on the CTS modem control line.
EO
US L
RTSI Masks an interrupt that is generated when a rising edge is detected on the RTS modem control line.
Note: This interrupt is only enabled when hardware flow control is enabled.
.tw TIA
0 Unmask an interrupt that is generated when a rising edge is detected on the RTS modem control
line.
1 Mask an interrupt that is generated when a rising edge is detected on the RTS modem control line.
XOFFI Masks an interrupt that is generated when an XOFF character is received.
Note: This interrupt is only enabled when software flow control is enabled.
om N
0 Unmask an interrupt that is generated when an XOFF character is received.
1 Mask an interrupt that is generated when an XOFF character is received.
x.c DE
EDSSI When set ("1"), an interrupt is generated if DDCD, TERI, DDSR or DCTS (MSR[4:1]) becomes set.
0 No interrupt is generated if DDCD, TERI, DDSR or DCTS (MSR[4:1]) becomes set.
1 An interrupt is generated if DDCD, TERI, DDSR or DCTS (MSR[4:1]) becomes set.
ELSI When set ("1"), an interrupt is generated if BI, FE, PE or OE (LSR[4:1]) becomes set.
ne FI
0 No interrupt is generated if BI, FE, PE or OE (LSR[4:1]) becomes set.
1 An interrupt is generated if BI, FE, PE or OE (LSR[4:1]) becomes set.
ETBEI When set ("1"), an interrupt is generated if the TX Holding Register is empty or the contents of the TX
syn ON
FIFO
have been reduced to its Trigger Level.
0 No interrupt is generated if the TX Holding Register is empty or the contents of the TX FIFO have
been reduced to its Trigger Level.
C
1 An interrupt is generated if the TX Holding Register is empty or the contents of the TX FIFO have
been reduced to its Trigger Level
ERBFI When set ("1"), an interrupt is generated if the RX Buffer contains data.
g@ K
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name FIFOE ID4 ID3 ID2 ID1 ID0 NINT
Type RO
Reset 0 0 0 0 0 0 0 1
IIR Identify if there are pending interrupts; ID4 and ID3 are presented only when EFR[4] = 1.
far D
The following table gives the IIR[5:0] codes associated with the possible interrupts:
IIR[5:0] Priority Interrupt Source
R ME
Level
000001 - No interrupt pending
000110 1 Line Status Interrupt BI, FE, PE or OE set in LSR
000100 2 RX Data Received RX Data received or RX Trigger Level reached.
001100 2 RX Data Timeout Timeout on character in RX FIFO.
000010 3 TX Holding Register TX Holding Register empty or TX FIFO Trigger Level
Empty reached.
000000 4 Modem Status change DDCD, TERI, DDSR or DCTS set in MSR
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
010000 5 Software Flow Control XOFF Character received
100000 6 Hardware Flow Control CTS or RTS Rising Edge
EO
Table 1 The IIR[5:0] codes associated with the possible interrupts
US L
Line Status Interrupt: A RX Line Status Interrupt (IIR[5:0`] == 000110b) is generated if ELSI (IER[2]) is set and
.tw TIA
any of BI, FE, PE or OE (LSR[4:1]) becomes set. The interrupt is cleared by reading the Line Status Register.
RX Data Received Interrupt: A RX Received interrupt (IER[5:0] == 000100b) is generated if EFRBI (IER[0]) is set
and either RX Data is placed in the RX Buffer Register or the RX Trigger Level is reached. The interrupt is
cleared by reading the RX Buffer Register or the RX FIFO (if enabled).
RX Data Timeout Interrupt:
When virtual FIFO mode is disabled, RX Data Timeout Interrupt is generated if all of the following apply:
om N
1. FIFO contains at least one character;
2. The most recent character was received longer than four character periods ago (including all start, parity
x.c DE
and stop bits);
3. The most recent CPU read of the FIFO was longer than four character periods ago.
ne FI
The timeout timer is restarted on receipt of a new byte from the RX Shift Register, or on a CPU read from the
RX FIFO.
The RX Data Timeout Interrupt is enabled by setting EFRBI (IER[0]) to 1, and is cleared by reading RX FIFO.
When virtual FIFO mode is enabled, RX Data Timeout Interrupt is generated if all of the following apply:
syn ON
1. FIFO is empty;
2. The most recent character was received longer than four character periods ago (including all start, parity
and stop bits);
C
3. The most recent CPU read of the FIFO was longer than four character periods ago.
The timeout timer is restarted on receipt of a new byte from the RX Shift Register.
g@ K
RX Holding Register Empty Interrupt: A TX Holding Register Empty Interrupt (IIR[5:0] = 000010b) is generated if
ETRBI (IER[1]) is set and either the TX Holding Register or, if FIFOs are enabled, the TX FIFO becomes empty.
The interrupt is cleared by writing to the TX Holding Register or TX FIFO if FIFO enabled.
an E
Modem Status Change Interrupt: A Modem Status Change Interrupt (IIR[5:0] = 000000b) is generated if EDSSI
(IER[3]) is set and either DDCD, TERI, DDSR or DCTS (MSR[3:0]) becomes set. The interrupt is cleared by
rw IAT
rising edge has been detected on either the RTS/CTS Modem Control line. The interrupt is cleared by reading
the Interrupt Identification Register.
R ME
FCR FCR is used to control the trigger levels of the FIFOs, or flush the FIFOs.
FCR[7:6] is modified when LCR != BFh
FCR[5:4] is modified when LCR != BFh & EFR[4] = 1
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
FCR[4:0] is modified when LCR != BFh
FCR[7:6] RX FIFO trigger threshold
0 1
EO
US L
1 6
2 12
.tw TIA
3 RXTRIG
FCR[5:4] TX FIFO trigger threshold
0 1
1 4
2 8
om N
3 14 (FIFOSIZE - 2)
DMA1 This bit determines the DMA mode, which the TXRDY and RXRDY pins support. TXRDY and
x.c DE
RXRDY act to support single-byte transfers between the UART and memory (DMA mode 0) or
multiple byte transfers (DMA mode1). Note that this bit has no effect unless the FIFOE bit is set as
well
0 The device operates in DMA Mode 0.
ne FI
1 The device operates in DMA Mode 1.
TXRDY – mode0: Goes active (low) when the TX FIFO or the TX Holding Register is empty.
Becomes inactive when a byte is written to the Transmit channel.
syn ON
TXRDY – mode1: Goes active (low) when there are no characters in the TX FIFO. Becomes inactive
when the TX FIFO is full.
RXRDY – mode0: Becomes active (low) when at least one character is in the RX FIFO or the RX
Buffer Register is full. Becomes inactive when there are no more characters in the RX FIFO or
C
RX Buffer register.
RXRDY – mode1: Becomes active (low) when the RX FIFO Trigger Level is reached or an RX FIFO
Character Timeout occurs. Goes inactive when the RX FIFO is empty.
g@ K
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DLAB SB SP EPS PEN STB WLS1 WLS0
Type R/W
Reset 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0 The RX and TX Registers are read/written at Address 0 and the IER register is read/written at
Address 4.
1 The Divisor Latch LS is read/written at Address 0 and the Divisor Latch MS is read/written at
EO
US L
Address 4.
SB Set Break
.tw TIA
0 No effect
1 SOUT signal is forced into the “0” state.
SP Stick Parity
0 No effect.
1 The Parity bit is forced into a defined state, depending on the states of EPS and PEN:
om N
If EPS=1 & PEN=1, the Parity bit is set and checked = 0.
If EPS=0 & PEN=1, the Parity bit is set and checked = 1.
x.c DE
EPS Even Parity Select
0 When EPS=0, an odd number of ones is sent and checked.
1 When EPS=1, an even number of ones is sent and checked.
PEN Parity Enable
ne FI
0 The Parity is neither transmitted nor checked.
1 The Parity is transmitted and checked.
STB Number of STOP bits
syn ON
0 One STOP bit is always added.
1 Two STOP bits are added after each character is sent; unless the character length is 5 when 1 STOP
bit is added.
WLS1, 0 Word Length Select.
C
0 5 bits
1 6 bits
2 7 bits
g@ K
3 8 bits
an E
XOFF
DCM_
Name STATU X OUT2 OUT1 RTS DTR
EN
S
Type R/W
Reset 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
1 NOUT2=0.
OUT1 Controls the state of the output NOUT1, even in loop mode.
0 NOUT1=1.
EO
US L
1 NOUT1=0.
RTS Controls the state of the output NRTS, even in loop mode.
.tw TIA
0 NRTS=1.
1 NRTS=0.
DTR Control the state of the output NDTR, even in loop mode.
0 NDTR=1.
1 NDTR=0.
om N
UARTn+0014h Line Status Register UARTn_LSR
x.c DE
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FIFOE
Name TEMT THRE BI FE PE OE DR
RR
Type R/W
Reset 0 1 1 0 0 0 0 0
LSR
ne FI
Line Status Register.
Modified when LCR[7] = 0.
syn ON
FIFOERR RX FIFO Error Indicator.
0 No PE, FE, BI set in the RX FIFO.
1 Set to 1 when there is at least one PE, FE or BI in the RX FIFO.
TEMT TX Holding Register (or TX FIFO) and the TX Shift Register are empty.
0 Empty conditions below are not met.
C
1 If FIFOs are enabled, the bit is set whenever the TX FIFO and the TX Shift Register are empty. If
FIFOs are disabled, the bit is set whenever TX Holding Register and TX Shift Register are empty.
g@ K
THRE Indicates if there is room for TX Holding Register or TX FIFO is reduced to its Trigger Level.
0 Reset whenever the contents of the TX FIFO are more than its Trigger Level (FIFOs are
an E
whenever TX Holding Register is empty and ready to accept new data (FIFOs are disabled).
BI Break Interrupt.
0 Reset by the CPU reading this register
1 If the FIFOs are disabled, this bit is set whenever the SIN is held in the 0 state for more than one
transmission time (START bit + DATA bits + PARITY + STOP bits).
far D
If the FIFOs are enabled, this error is associated with a corresponding character in the FIFO and is
flagged when this byte is at the top of the FIFO. When a break occurs, only one zero character is
R ME
loaded into the FIFO: the next character transfer is enabled when SIN goes into the marking state
and receives the next valid start bit.
FE Framing Error.
0 Reset by the CPU reading this register
1 If the FIFOs are disabled, this bit is set if the received data did not have a valid STOP bit. If the
FIFOs are enabled, the state of this bit is revealed when the byte it refers to is the next to be read.
PE Parity Error
0 Reset by the CPU reading this register
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
1 If the FIFOs are disabled, this bit is set if the received data did not have a valid parity bit. If the
FIFOs are enabled, the state of this bit is revealed when the referred byte is the next to be read.
OE Overrun Error.
EO
US L
0 Reset by the CPU reading this register.
1 If the FIFOs are disabled, this bit is set if the RX Buffer was not read by the CPU before new data
.tw TIA
from the RX Shift Register overwrote the previous contents.
If the FIFOs are enabled, an overrun error occurs when the RX FIFO is full and the RX Shift
Register becomes full. OE is set as soon as this happens. The character in the Shift Register is
then overwritten, but not transferred to the FIFO.
DR Data Ready.
om N
0 Cleared by the CPU reading the RX Buffer or by reading all the FIFO bytes.
1 Set by the RX Buffer becoming full or by a byte being transferred into the FIFO.
x.c DE
UARTn+0018h Modem Status Register UARTn_MSR
Bit
Name
15ne FI14 13 12 11 10 9 8 7
DCD
6
RI
5
DSR
4
CTS
3
DDCD
2
TERI
1
DDSR DCTS
0
Note: After a reset, D4-D7 are inputs. A modem status interrupt can be cleared by writing ‘0’ or set by writing
‘1’ to this register. D0-D3 can be written to.
Modified when LCR[7] = 0.
MSR Modem Status Register
C
RI Ring Indicator.
When Loop = "0", this value is the complement of the NRI input signal.
an E
When Loop = "1", this value is equal to the OUT1 bit in the Modem Control Register.
DSR Data Set Ready
rw IAT
When Loop = "0", this value is the complement of the NDSR input signal.
When Loop = "1", this value is equal to the DTR bit in the Modem Control Register.
CTS Clear To Send.
When Loop = "0", this value is the complement of the NCTS input signal.
When Loop = "1", this value is equal to the RTS bit in the Modem Control Register.
far D
1 Set if the state of DCD has changed since the Modem Status Register was last read.
TERI Trailing Edge Ring Indicator
0 The NRI input does not change since this register was last read.
1 Set if the NRI input changes from “0” to “1” since this register was last read.
DDSR Delta Data Set Ready
0 Cleared if the state of DSR has not changed since this register was last read.
1 Set if the state of DSR has changed since this register was last read.
DCTS Delta Clear To Send
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0 Cleared if the state of CTS has not changed since this register was last read.
1 Set if the state of CTS has changed since this register was last read.
EO
UARTn+001Ch Scratch Register UARTn_SCR
US L
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
.tw TIA
Name SCR[7:0]
Type R/W
om N
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DLL[7:0]
x.c DE
Type R/W
Reset 1
Type R/W
Reset 0
syn ON
Note: DLL & DLM can only be updated if DLAB is set (“1”).. Note too that division by 1 generates a BAUD signal
that is constantly high.
Modified when LCR[7] = 1.
The table below shows the divisor needed to generate a given baud rate from CLK inputs of 13, 26 MHz and
C
52 MHz. The effective clock enable generated is 16 x the required baud rate.
BAUD 13MHz 26MHz 52MHz
110 7386 14773 29545
g@ K
115200 6 14 28
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Auto CTS Enables hardware transmission flow control
0 Disabled.
1 Enabled.
EO
US L
Auto RTS Enables hardware reception flow control
0 Disabled.
.tw TIA
1 Enabled.
Enable-E Enable enhancement features.
0 Disabled.
1 Enabled.
CONT[3:0] Software flow control bits.
om N
00xx No TX Flow Control
10xx Transmit XON1/XOFF1 as flow control bytes
x.c DE
01xx Transmit XON2/XOFF2 as flow control bytes
11xx Transmit XON1 & XON2 and XOFF1 & XOFF2 as flow control words
xx00 No RX Flow Control
xx10 Receive XON1/XOFF1 as flow control bytes
ne FI
xx01 Receive XON2/XOFF2 as flow control bytes
xx11 Receive XON1 & XON2 and XOFF1 & XOFF2 as flow control words
syn ON
UARTn+0010h XON1 UARTn_XON1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name XON1[7:0]
Type R/W
Reset 0
C
g@ K
Type R/W
Reset 0
rw IAT
Reset 0
R ME
*Note: XON1, XON2, XOFF1, XOFF2 are valid only when LCR=BFh.
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
UARTn+0024h HIGH SPEED UART UARTn_HIGHSPEED
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EO
Name SPEED [1:0]
US L
Type R/W
Reset 0
.tw TIA
SPEED UART sample counter base
0 based on 16*baud_pulse, baud_rate = system clock frequency/16/{DLH, DLL}
1 based on 8*baud_pulse, baud_rate = system clock frequency/8/{DLH, DLL}
2 based on 4*baud_pulse, baud_rate = system clock frequency/4/{DLH, DLL}
om N
3 based on sampe_count * baud_pulse, baud_rate = system clock frequency / sampe_count
When HIGHSPEED=3, the value (A * B) means ({DLM, DLL} * SAMPLE_COUNT).
When the Baudrate is more than 115200, it will be more accurate if we set HIGHSPEED=3.
x.c DE
The table below shows the divisor needed to generate a given baud rate from CLK inputs of 13M Hz based on
different HIGHSPEED value.
BAUD HIGHSPEED = 0 HIGHSPEED = 1 HIGHSPEED = 2 HIGHSPEED = 3
110
ne FI 7386 14773 29545 7386 * 16
300 2708 7386 14773 2708 * 16
1200 677 2708 7386 677 * 16
syn ON
2400 338 677 2708 338 * 16
4800 169 338 677 169 * 16
9600 85 169 338 85 * 16
19200 42 85 169 9 * 75
C
38400 21 42 85 13 * 26
57600 14 21 42 8 * 28
g@ K
115200 7 14 21 4 * 28
230400 * 7 14 2 * 28
an E
460800 * * 7 1 * 28
rw IAT
921600 * * * 1 * 14
Table 3 Divisor needed to generate a given baud rate from 13MHz based on different HIGHSPEED value
The table below shows the divisor needed to generate a given baud rate from CLK inputs of 26 MHz based on
different HIGHSPEED value.
far D
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
57600 28 42 85 16 * 28
115200 14 28 42 8 * 28
EO
230400 7 14 28 4 * 28
US L
460800 * 7 14 2 * 28
.tw TIA
921600 * * 7 1 * 28
Table 4 Divisor needed to generate a given baud rate from 26 MHz based on different HIGHSPEED value
The table below shows the divisor needed to generate a given baud rate from CLK inputs of 52MHz based on
different HIGHSPEED value.
om N
BAUD HIGHSPEED = 0 HIGHSPEED = 1 HIGHSPEED = 2 HIGHSPEED = 3
110 29545 59091 118182 14773 * 32
x.c DE
300 10833 29545 59091 5417 * 32
1200 2708 10833 29545 1354 * 32
2400 1354 2708 10833 667 * 32
ne FI
4800
9600
677
339
1354
677
2708
1354
339 * 32
169 * 32
19200 169 339 677 36 * 75
syn ON
38400 85 169 339 52 * 26
57600 56 85 169 32 * 28
115200 28 56 85 16 * 28
C
230400 14 28 56 8 * 28
460800 7 14 28 4 * 28
g@ K
921600 * 7 14 2 * 28
Table 5 Divisor needed to generate a given baud rate from 52 MHz based on different HIGHSPEED value
an E
rw IAT
When HIGHSPEED=3, the sample_count is the threshold value for UART sample counter (sample_num).
Count from 0 to sample_count.
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
e.g. system clock = 13MHz, 921600 = 13000000 / 14
sample_count = 14 and sample point = 7 (sample the central point to decrease the inaccuracy)
The SAMPLE_POINT is usually (SAMPLE_COUNT/2).
EO
US L
.tw TIA
UARTn+0034h Rate Fix Address UARTn_RATEFIX_AD
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RXTE_FIX
Type R/W
Reset 0
om N
rate_fix When you set "rate_fix"(34H[0]), you can transmit and receive data only if
the input f16m_en is enable.
x.c DE
UARTn+003Ch Guard time added register
ne FI UARTn_GUARD
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GUARD_EN GUARD_CNT[3:0]
Type R/W R/W R/W R/W R/W
syn ON
Reset 0 0 0 0 0
GUARD_CNT Guard interval count value. Guard interval = (1/(system clock / div_step / div )) *
GUARD_CNT.
GUARD_EN Guard interval add enable signal.
C
Name ESCAPE_DAT[7:0]
Type WO
Reset FFh
rw IAT
ESCAPE_DAT Escape character added before software flow control data and escape character, i.e. if tx data is
xon (31h), with esc_en =1, uart transmits data as esc + CEh (~xon).
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name ESC_EN
Type R/W
R ME
Reset 0
ESC_EN Add escape character in transmitter and remove escape character in receiver by UART.
0 Do not deal with the escape character.
1 Add escape character in transmitter and remove escape character in receiver.
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Type R/W
Reset 0
EO
SLEEP_EN For sleep mode issue
US L
0 Do not deal with sleep mode indicate signal
1 To activate hardware flow control or software control according to software initial setting when
.tw TIA
chip enters sleep mode. Releasing hardware flow when chip wakes up; but for software control,
uart sends xon when awaken and when FIFO does not reach threshold level.
om N
Name VFIFO_EN
Type R/W
Reset 0
x.c DE
VFIFO_EN Virtual FIFO mechanism enable signal.
0 Disable VFIFO mode.
1 Enable VFIFO mode. When virtual mode is enabled, the flow control is based on the DMA
ne FI
threshold, and generates a timeout interrupt for DMA.
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name FRACDIV_L
an E
Type R/W
Reset 0 0 0 0 0 0 0 0
rw IAT
FRACDIV_L Add sampling count (+1) from state data7 to state data0, in order to contribute fractional
divisor.
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name FRACDIV_M
R ME
Type R/W
Reset 0 0
FRACDIV_M Add sampling count in state stop and state parity, in order to contribute fractional divisor.
FRACDIV_L / FRACDIV_L Add one sampling period to each symbol, in order to increase the baud rate
accuracy.
MediaTek Confidential
Start d0 d1 d2 © 2014
d3 MediaTek
d4 Inc. d5 d6 d7 Page 133
Parity Stopof 347
This document contains information that is proprietary to MediaTek Inc.
Unauthorized reproduction or disclosure of this information in whole or in part is strictly prohibited.
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
EO
US L
.tw TIA
om N
x.c DE
UARTn+005Ch FIFO Control Register UARTn_FCR_RD
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RFTL1 RFTL0 TFTL1 TFTL0 DMA1 FIFOE
Type RO RO
ne FI
Read out UARTn_FCR register.
syn ON
UARTn+0060h TX Active Enable Address UARTn_TX_ACTIVE_EN
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TX_PU_EN TX_OE_EN
Type R/W R/W
C
Reset 0 0
TX_OE_EN Enable UART_TX_OE switching function. TX_OE is to control UART_TX output enable.
g@ K
TX_PU_EN Enable UART_TX_PU switching function. TX_PU is to control UART_TX pull up enable.
an E
rw IAT
far D
R ME
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.14 PCM Controller
EO
2.14.1 Features
US L
Two clock sources are reserved for PCM circuit. (From internal clock generator, INT_PCM_CLK and
EXT_PCM_CLK)
.tw TIA
PCM module can drive a clock out (with fraction-N dividor) to an external codec.
Up to 4 channels PCM are available. 4 to 128 slots are configurable.
Each channel supports a-law (8-bit)/u-law (8-bit)/raw-PCM (8-bit and 16-bit) transfer.
Hardware converter of a-law<->raw-16 and u-law <-> raw-16 are implemented in design.
Support long (8 cycle)/short (1 cycle)/configurable (intervals are configurable, use to emulate I S
2
interface) FSYNC.
om N
DATA & FSYNC can be driven and sampled by either rising/falling of clock.
Last bit of DTX can be configured as tri-stated on falling edge.
x.c DE
Beginning of each slot is configurable by 10-bit registers on each channel.
32-byte FIFO are available for each channel
PCM interface can emulate I2S interface (only 16-bit data-width supported ).
MSB/LSB order is configurable.
Supports both a-law/u-law (8-bits) linear PCM(16-bit) and linear PCM(16-bit) a-law/u-law (8-bit)
ne FI
2.14.2 Block Diagram
PCM Module
syn ON
APBBUS
PCM Control
APBBUS LTF
Status Register
C
g@ K
a/ulaw a/ulaw
SYS clock domain
far D
PCM IF/I2S IF
Two clock domains are partitioned in this design. PCM converter (u-law < = > raw-16-bit and A-law < = > raw
16-bit) are implemented in PCM. The threshold of FIFO is configurable. When the threshold is reached, PCM (a)
triggers the DMA interface to notify external DMA engine to transfer data, and (b) triggers an interrupt to the
host.
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
The interrupt sources include:
The threshold is reached.
FIFO is under-run or over-run.
EO
A fault is detected at the DMA interface.
US L
The A-law and u-law converter is implemented based on the ITU-G.711 A-law and u-law table. In this design,
both A-law/u-law(8-bit) linear PCM (16-bit) and linear PCM (16-bit) A-law/u-law (8-bit) are supported.
.tw TIA
The data-flow from codec to PCM-controller (Rx-flow) is shown as below:
The PCM controller latches the data from DRX at the indicated time slot and then writes it to FIFO. If FIFO
is full, the data is lost.
When the Rx-FIFO reaches the threshold, two actions may be taken:
When DMA_ENA=1, DMA_REQ is asserted to request a burst transfer. It rechecks the FIFO threshold
om N
after DMA_END is asserted by GDMA. (GDMA should be configured before channel is enabled.)
Assert the interrupt source to notify the host. The host can check RFIFO_AVAIL information then get
x.c DE
back the data from FIFO.
The data flow from the PCM controller to codec (Tx-flow) is shown below. After GDMA is configured, software
should configure and enable the PCM channel. The empty FIFO should behave as follows.
ne FI
When DMA_ENA=1, DMA_REQ is triggered to request a burst transfer. It then re-checks the FIFO
threshold after DMA_END is asserted by GDMA (a burst is completed).
The Interrupt source is asserted to notify HOST. HOST writes the data to Tx-FIFO. After that, HOST
rechecks TFIFO_EMPTY information, and then writes more data if available.
syn ON
NOTE: When DMA_ENA=1, the burst size of GDMA should be less than the threshold value.
C
2. Set CH0/1_CFG
3. Write PCM data to FIFO CH0/1_FIFO
4. Set GLB_CFG to enable the PCM and channel.
rw IAT
Case 1:
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
EO
US L
.tw TIA
Case 2:
om N
CFG_FSYNC Register: CFG_FSYNC_EN = 1, START_LOC=0, interval=16
CH0_CFG Register: TS_START=1
x.c DE
CH1_CFG Register: TS_START=17
PCM_CFG Register: LONG_FSYNC=1’b0, FSYNC_POL=1’b1, DRX_TRI=1’b0, SLOT_MODE=3’b0, RAW16-bits
ne FI
syn ON
C
g@ K
Case 3:
an E
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.14.5 Register
EO
US L
Revision Date Author Change Log
0.1 2012/10/8 Paddy Wu Initialization
.tw TIA
Module name: PCM Base address: (+10002000h)
Address Name Widt Register Function
h
om N
10002000 GLB_CFG 32 Global Config
10002004 PCM_CFG 32 PCM configuration
x.c DE
10002008 INT_STATUS 32 Interrupt status
1000200C INT_EN 32 Interrupt enable
CHA0_FF_STA
10002010 TUS 32 Channel A0(represents channel 0) FIFO status
10002020
ne FI TUS
CHA0_CFG 32 Channel A0(represents channel 0) Config
10002024 CHB0_CFG 32 Channel B0(represents channel 1) Config
syn ON
10002030 FSYNC_CFG 32 FSYNC config
10002034 CHA0_CFG2 32 Channel A0(represents channel 0) Config
10002038 CHB0_CFG2 32 Channel B0(represents channel 1) Config
10002040 IP_INFO 32 IP version info
10002044 RSV_REG16 32 SPARE REG 16 bits
C
0044000
10002000 GLB_CFG Global Config
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
EXT
PC DM LB
_LB RS
Name M_ A_E K_E RSV0 RFF_THRES TFF_THRES
K_E V1
EN N N
N
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Type RW RW RW RW RO RW RO RW
Reset 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RSV2 CH_EN
EO
US L
Type RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit(s) Name Description
31 PCM_EN PCM Enable
When disabled, all FSM of PCM are cleared to their default value.
0: disable
1: enable
30 DMA_EN DMA Enable
om N
0: Disable the DMA interface, transfer data using software.
1: Enable the DMA interface, transfer data using DMA.
x.c DE
0: disable
1: enable
29 LBK_EN loopback enable, loopback path is shown as (Asyn-TXFIFO ->DTX ->
DRX->Asyn-RXFIFO)
0: disable
28
ne FI
EXT_LBK_EN
1: enable
loopback enable, loopback path is shown as (Ext-Codec->DRX->DTX-
>Ext-Codec)
0: disable
syn ON
1: enable
27:23 RSV0 Reserved
22:20 RFF_THRES RXFIFO Threshold
When the threshold is reached, the host/DMA is notified to fill FIFO. The
threshold should be >2 and <6.
C
When data in FIFO is under the threshold, the following interrupts and GDMA
are triggered.
CH0T_THRES, CH0R_THRES, CH1T_THRES, CH1R_THRES
(unit: word)
g@ K
19 RSV1 Reserved
18:16 TFF_THRES TXFIFO Threshold
an E
(unit: word)
15:4 RSV2 Reserved
3:0 CH_EN Channels 3 to 0 Tx and Rx Enable
0: disable
1: enable
far D
R ME
0300000
10002004 PCM_CFG PCM configuration
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
CL EXT LO FSY
DT
RS KO _FS NG NC
Name RSV1 X_T RSV2[20:13]
V0 UT_ YN _SY _P
RI
EN C NC OL
Type RO RW RO RW RW RW RW RO
Reset 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RSV2[12:0] SLOT_MODE
Type RO RW
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
31 RSV0 Reserved
US L
30 CLKOUT_EN PCM Clock Out Enable
0: A PCM clock is provided from the external Codec/OSC.
.tw TIA
1: A PCM clock is provided from the internal dividor.
NOTE: Normally, the register should be asserted to 1. Also, it should be
asserted after configuring the divider and enabling the divider clock.
0: EXT_CLK
1: INT_DIV
29:28 RSV1 Reserved
om N
27 EXT_FSYNC FSYNC is provided externally
0: FSYNC is generated by internal circuit.
1: FSYNC is provided externally
x.c DE
26 LONG_SYNC FSYNC Mode
0: Short FSYNC
1: Long FSYNC
25 FSYNC_POL FSYNC Polarity
ne FI 0: FSYNC is low active
1: FSYNC is high active
24 DTX_TRI DTX Tri-State
syn ON
Tristates DTX when the clock signal on the last bit is has a falling edge.
0: Non- tristate DTX
1: Tristate DTX
23:3 RSV2 Reserved
2:0 SLOT_MODE Sets the number of slots in each PCM frame.
C
1: _8_SLOT
2: _16_SLOT
3: _32_SLOT
4: _64_SLOT
5: _128_SLOT
far D
0000000
10002008 INT_STATUS Interrupt status
0
R ME
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RSV0[23:8]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH
CH CH CH
CH CH CH R_ CH
T_D R_ R_
T_O T_U T_T DM R_T
Name RSV0[7:0] MA
VR NR HR A_F
OV UN
HR
_FA RU RU
UN UN ES AU ES
ULT N N
LT
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
W1 W1 W1 W1 W1 W1 W1 W1
Type RO
C C C C C C C C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
US L
Bit(s) Name Description
31:8 RSV0 Reserved
.tw TIA
7 CHT_DMA_FAULT Channel Tx DMA Fault Interrupt, Asserts when a fault has been detected
in a CH-Tx DMA signal.
6 CHT_OVRUN Channel Tx FIFO Overrun Interrupt, Asserts when the CH-Tx FIFO is
overrun.
5 CHT_UNRUN Channel Tx FIFO Underrun Interrupt, Asserts when the CH-Tx FIFO is
underrun.
om N
4 CHT_THRES Channel Tx Threshold Interrupt, Asserts when the CH-Tx FIFO is lower
than the defined threshold.
x.c DE
3 CHR_DMA_FAULT Channel Rx DMA Fault Interrupt, Asserts when a fault is detected in a
CH-Rx DMA signal.
2 CHR_OVRUN Channel Rx Overrun Interrupt, Asserts when the CH-Rx FIFO is overrun.
1 CHR_UNRUN Channel Rx Underrun Interrupt, Asserts when the CH-Rx FIFO is
underrun.
0
ne FI
CHR_THRES Channel Rx Threshold Interrupt, Asserts when the CH-Rx FIFO is lower
than the defined threshold.
syn ON
0000000
1000200C INT_EN Interrupt enable
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RSV0[23:8]
C
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
INT INT INT INT INT INT INT INT
g@ K
Name RSV0[7:0] 7_E 6_E 5_E 4_E 3_E 2_E 1_E 0_E
N N N N N N N N
Type RO RW RW RW RW RW RW RW RW
an E
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
rw IAT
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
This interrupt asserts when the CH-Rx FIFO is lower than the defined
threshold.
EO
US L
.tw TIA
CHA0_FF_ST 0010000
10002010 Channel A0(represents channel 0) FIFO status
ATUS 8
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
CH CH
CH CH CH CH CH CH
TX_ RX_
TX_ TX_ TX_ RX_ RX_ RX_
DM DM
Name RSV0 OV UN TH OV UN TH
A_F A_F
om N
RU RU RE RU RU RE
AU AU
N N S N N S
LT LT
W1 W1 W1 W1 W1 W1 W1 W1
Type RO
x.c DE
C C C C C C C C
Reset 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RSV1 CHRFF_AVCNT CHTFF_EPCNT
Type RO RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
Bit(s)
ne FI
Name Description
31:24 RSV0 Reserved
syn ON
23 CHTX_DMA_FAULT Tx DMA Fault Detected Interrupt,Asserts when a fault is detected in a
Channel A0 Tx DMA signal.
22 CHTX_OVRUN Tx Overrun Interrupt,Asserts when the Channel A0 Tx FIFO is overrun.
21 CHTX_UNRUN Tx FIFO Underrun Interrupt,Asserts when the Channel A0 Tx FIFO is
underrun.
C
3:0 CHTFF_EPCNT Channel A0 TXFIFO Available Space Count,Counts the available space
for writes in channel A0 TXFIFO.(unit: word)
R ME
CHB0_FF_ST 0010000
10002014 Channel B0(represents channel 1) FIFO status
ATUS 8
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
CH CH
CH CH CH CH CH CH
TX_ RX_
TX_ TX_ TX_ RX_ RX_ RX_
DM DM
Name RSV0
A_F
OV UN TH
A_F
OV UN TH
RU RU RE RU RU RE
AU AU
N N S N N S
LT LT
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
W1 W1 W1 W1 W1 W1 W1 W1
Type RO
C C C C C C C C
Reset 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EO
Name
US L
RSV1 CHRFF_AVCNT CHTFF_EPCNT
Type RO RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
.tw TIA
Bit(s) Name Description
31:24 RSV0 Reserved
23 CHTX_DMA_FAULT Tx DMA Fault Detected Interrupt,Asserts when a fault is detected in a
Channel B0 Tx DMA signal.
22 CHTX_OVRUN Tx Overrun Interrupt,Asserts when the Channel B0 Tx FIFO is overrun.
om N
21 CHTX_UNRUN Tx FIFO Underrun Interrupt,Asserts when the Channel B0 Tx FIFO is
underrun.
x.c DE
20 CHTX_THRES Tx FIFO Below Threshold Interrupt,Asserts when the Channel B0 FIFO
is lower than the defined threshold.
19 CHRX_DMA_FAUL Rx DMA Fault Detected Interrupt,Asserts when a fault is detected in a
T Channel B0 Rx DMA signal.
18 CHRX_OVRUN
ne FI Rx FIFO Overrun Interrupt,Asserts when the Channel B0 Rx FIFO is
overrun.
17 CHRX_UNRUN Rx FIFO Underrun Interrupt,Asserts when the Channel B0 Rx FIFO is
underrun.
syn ON
16 CHRX_THRES Rx FIFO Below Threshold Interrupt,Asserts when the Channel B0 FIFO
is lower than the defined threshold.
15:8 RSV1 Reserved
7:4 CHRFF_AVCNT Channel B0 RXFIFO Available Space Count,Counts the available space
for reads in channel B0 RXFIFO.(unit: word)
C
3:0 CHTFF_EPCNT Channel B0 TXFIFO Available Space Count,Counts the available space
for writes in channel B0 TXFIFO.(unit: word)
g@ K
0000000
10002020 CHA0_CFG Channel A0(represents channel 0) Config
an E
1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
rw IAT
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
compressed format)
111: Enable HW converter, A-law mode (8-bit) raw data (16-bit) (PCM bus in
EO
raw, 16-bit format)
US L
0: DIS_CONV16
2: DIS_CONV8
4: EN_ULW2R
.tw TIA
5: EN_R2ULW
6: EN_ALW2R
7: EN_R2ALW
26:10 RSV1 Reserved
9:0 TS_START Timeslot starting location
(unit: clock cycles)
om N
x.c DE
0000000
10002024 CHB0_CFG Channel B0(represents channel 1) Config
1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RSV0 CMP_MODE RSV1[16:6]
Type
Reset
Bit
0
15
ne FI
RO
14
0 0
13
RW
0
12
0
11
0
10
0
9
0
8
0
7
0
6
RO
0
5
0
4 3
0 0
2 1
0 0
0
Name RSV1[5:0] TS_START
syn ON
Type RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
010: Disable HW converter, linear raw data (8-bit), A-law or u-law (8-bit)
011: Reserved
100: Enable HW converter, raw data(16-bit) U-law mode (8-bit) (PCM bus in
an E
compressed format)
101: Enable HW converter, u-law mode (8-bit) raw data (16-bit) (PCM bus in
rw IAT
5: EN_R2ULW
6: EN_ALW2R
7: EN_R2ALW
R ME
2800000
10002030 FSYNC_CFG FSYNC config
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
CF PO PO
PO PO
G_F S_C S_D
S_C S_D
Name SY
AP_ RV_
AP_ RV_ RSV0 RSV1[11:6]
NC FSY FSY
EO
DT DT
_EN NC NC
US L
Type RW RW RW RW RW RO RO
Reset 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RSV1[5:0] FSYNC_INTV
Type RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
30 POS_CAP_DT Positive Edge Capture Data, Sets the PCM controller to capture data on
the negative or positive edge of the PCM clock. NOTE: This
x.c DE
configuration should be 0 if DTX_TRI=1.
29 POS_DRV_DT Positive Edge Drive Data, Sets the PCM controller to drive data on the
negative or positive edge of the PCM clock.
28 POS_CAP_FSYNC Positive Edge Capture FSYNC, Sets the PCM controller to capture
FSYNC on the positive or negative edge of the PCM clock.
27
ne FI
POS_DRV_FSYNC Positive Edge Driver FSYNC, Sets the PCM controller to drive FSYNC on
the negative or positive edge of the PCM clock.
26:22 RSV0 Reserved
syn ON
21:10 RSV1 Reserved
9:0 FSYNC_INTV Interval when FSYNC may be configured.
(unit: clock cycles)
C
0000000
10002034 CHA0_CFG2 Channel A0(represents channel 0) Config
0
g@ K
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RSV0[27:12]
Type RO
an E
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH CH
rw IAT
_RX _TX CH
RS
Name RSV0[11:0] FF_ FF_ _LS
V1
CL CL B
R R
Type RO RW RW RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
far D
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0000000
10002038 CHB0_CFG2 Channel B0(represents channel 1) Config
0
EO
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
US L
Name RSV0[27:12]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH CH
_RX _TX CH
RS
Name RSV0[11:0] FF_ FF_ _LS
V1
CL CL B
R R
Type RO RW RW RO RW
om N
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
x.c DE
31:4 RSV0 Reserved
3 CH_RXFF_CLR Channel B0 Rx FIFO Clear
0: Normal operation
1: Clear this bit
2 ne FI
CH_TXFF_CLR Channel B0 Tx FIFO Clear
0: Normal operation
1: Clear this bit
syn ON
1 RSV1 Reserved
0 CH_LSB Enable CH B0 Tx in LSB order.
0000040
C
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
an E
0000000
10002044 RSV_REG16 SPARE REG 16 bits
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RSV0
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SPARE_REG
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
31:16 RSV0 Reserved
EO
US L
15:0 SPARE_REG Spare register for future use
.tw TIA
DIVCOMP_CF 0000000
10002050 Dividor Compensation part config
G 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
CL
Name K_E RSV0[22:8]
om N
N
Type RW RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
x.c DE
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RSV0[7:0] DIVCOMP
Type RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit(s)
31
ne FI
Name
CLK_EN
Description
Clock Enable
Enables setting of the PCM interface clock based on DIVCOMP and DIVINT
syn ON
parameters.
30:8 RSV0 Reserved
7:0 DIVCOMP A parameter in an equation which determines FREQOUT. See DIVINT.
C
0000000
10002054 DIVINT_CFG Dividor Integer part config
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
g@ K
Name RSV0[21:6]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
an E
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RSV0[5:0] DIVINT
rw IAT
Type RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Formula:
FREQOUT = 1/(FREQIN*2*(DIVINT+DIVCOMP /(2^8)))
FREQIN is always fixed to 40 MHz.
R ME
DIGDELAY_C 0000000
10002060 Digital delay config
FG 2
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
TX CH TX CH CH CH
D_ EN_ D_ EN EN EN
RS
Name CL CL RSV0 GL RSV1 N_ RSV2 P_ PD_
V3
R_ R_ T_S GL GL GL
GL GL T T_S T_S T_S
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
T T T T T
Type RW RW RO RW RO RW RO RW RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EO
US L
TX CH
D_ EN_
DIG DIG
Name RSV4 TXD_DLYVAL RSV5 CHEN_DLYVAL
.tw TIA
DL DL
Y_E Y_E
N N
Type RW RO RW RW RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
om N
31 TXD_CLR_GLT TXD Clear Glitch Flag
Clears the glitch detected flag for TXD.
0: No effect.
x.c DE
1: Clear the flag.
30 CHEN_CLR_GLT Channel Enable (CHEN) Clear Glitch Flag
Clears the glitch detected flag for CHEN.
0: No effect .
ne FI 1: Clear the flag.
29:27 RSV0 Reserved
26 TXD_GLT_ST TXD Glitch Status
Indicates if a glitch is detected in a TXD signal. It can be cleared by bit[31].
syn ON
0: Not detected.
1: Detected
25:23 RSV1 Reserved
22 CHENN_GLT_ST CHEN Negative Glitch Status
Indicates if a glitch is detected in a CHEN signal. It can be cleared by bit[30]
C
(negedge sample).
0: Not detected.
1: Detected
g@ K
(posedge sample).
0: Not detected.
rw IAT
1: Detected
17 RSV3 Reserved
16 CHENPD_GLT_ST CHEN Positive Delay Glitch Status
Indicates if a glitch is detected in a CHEN signal. It can be cleared by bit[30]
(posedge sample, delay 1 cycle).
0: Not detected.
far D
1: Detected
15 TXD_DIGDLY_EN TXD Digital Delay Enable
Enables digital delay path.
R ME
0: Disable
1: Enable
14:13 RSV4 Reserved
12:8 TXD_DLYVAL Delay Count Value
The description is the same as the CHEN_DLYVAL field in this register.
CHEN Digital Delay Enable, Enables the digital delay path.
0: Disable
1: Enable
7 CHEN_DIGDLY_EN CHEN Digital Delay Enable
Enables the digital delay path.
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
0: Disable
1: Enable
EO
6:5 RSV5 Reserved
US L
4:0 CHEN_DLYVAL Delay Count Value
The delay error =
.tw TIA
CLK_PERIOD * (SYNC_DELAY + SYNC_DELTA + (DLYCNT_CFG) + 1)
For example,
DLYCNT_CFG = 4,
(SYNC_DELAY is always fixed to 4)
Final Delay
= CLK_PERIOD * (2 + (-1/0/+1) + (4) + 1)
= CLK_PERIOD * (6/7/8)= CLK_PERIOD * (6 to 8)
om N
= 25 ns to 33.3 ns
NOTE:
Period is 1/240 MHz = 4.1667 ns in MT7620.
x.c DE
0000000
10002080 CH0_FIFO Channel 0 FIFO access point
ne FI 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name CH0_FIFO[31:16]
Type RW
syn ON
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name CH0_FIFO[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
C
0000000
an E
Name CH1_FIFO[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name CH1_FIFO[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
far D
0000000
10002088 CH2_FIFO Channel 2 FIFO access point
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name CH2_FIFO[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Name CH2_FIFO[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
US L
Bit(s) Name Description
31:0 CH2_FIFO Channel 2 FIFO access point
.tw TIA
0000000
1000208C CH3_FIFO Channel 3 FIFO access point
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
om N
Name CH3_FIFO[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
x.c DE
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name CH3_FIFO[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit(s)
31:0
ne FI
Name
CH3_FIFO
Description
Channel 3 FIFO access point
syn ON
CHA1_FF_ST 0010000
10002110 Channel A1(represents channel 3) FIFO status
ATUS 8
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
CH CH
C
CH CH CH CH CH CH
TX_ RX_
TX_ TX_ TX_ RX_ RX_ RX_
DM DM
Name RSV0 OV UN TH OV UN TH
A_F A_F
RU RU RE RU RU RE
AU AU
N N S N N S
g@ K
LT LT
W1 W1 W1 W1 W1 W1 W1 W1
Type RO
C C C C C C C C
Reset
an E
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RSV1 CHRFF_AVCNT CHTFF_EPCNT
rw IAT
Type RO RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
16 CHRX_THRES Rx FIFO Below Threshold Interrupt,Asserts when the Channel A1 FIFO
is lower than the defined threshold.
EO
US L
15:8 RSV1 Reserved
7:4 CHRFF_AVCNT Channel A1 RXFIFO Available Space Count,Counts the available space
for reads in channel A1 RXFIFO.(unit: word)
.tw TIA
3:0 CHTFF_EPCNT Channel A1 TXFIFO Available Space Count,Counts the available space
for writes in channel A1 TXFIFO.(unit: word)
CHB1_FF_ST 0010000
om N
10002114 Channel B1(represents channel 4) FIFO status
ATUS 8
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
x.c DE
CH CH
CH CH CH CH CH CH
TX_ RX_
TX_ TX_ TX_ RX_ RX_ RX_
DM DM
Name RSV0
A_F
OV UN TH
A_F
OV UN TH
RU RU RE RU RU RE
AU AU
N N S N N S
LT LT
Type
Reset 0
ne FI 0 0 0
RO
0 0 0 0
W1
C
0
W1
C
0
W1
C
0
W1
C
1
W1
C
0
W1
C
0
W1
C
0
W1
C
0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
syn ON
Name RSV1 CHRFF_AVCNT CHTFF_EPCNT
Type RO RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
7:4 CHRFF_AVCNT Channel B1 RXFIFO Available Space Count,Counts the available space
for reads in channel B1 RXFIFO.(unit: word)
3:0 CHTFF_EPCNT Channel B1 TXFIFO Available Space Count,Counts the available space
for writes in channel B1 TXFIFO.(unit: word)
0000000
10002120 CHA1_CFG Channel A1(represents channel 3) Config
1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Name RSV0 CMP_MODE RSV1[16:6]
Type RO RW RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EO
US L
Name RSV1[5:0] TS_START
Type RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
.tw TIA
Bit(s) Name Description
31:30 RSV0 Reserved
29:27 CMP_MODE Compression Mode
Sets the conversion method for the hardware converter to compress raw
data.
om N
000: Disable HW converter, linear raw data (16-bit)
010: Disable HW converter, linear raw data (8-bit), A-law or u-law (8-bit)
011: Reserved
x.c DE
100: Enable HW converter, raw data(16-bit) U-law mode (8-bit) (PCM bus in
compressed format)
101: Enable HW converter, u-law mode (8-bit) raw data (16-bit) (PCM bus in
raw, 16-bit format)
110: Enable HW converter, raw data (16-bit) A-law mode (8-bit) (PCM bus in
ne FI compressed format)
111: Enable HW converter, A-law mode (8-bit) raw data (16-bit) (PCM bus in
raw, 16-bit format)
0: DIS_CONV16
syn ON
2: DIS_CONV8
4: EN_ULW2R
5: EN_R2ULW
6: EN_ALW2R
7: EN_R2ALW
26:10 RSV1 Reserved
C
0000000
an E
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
110: Enable HW converter, raw data (16-bit) A-law mode (8-bit) (PCM bus in
compressed format)
EO
111: Enable HW converter, A-law mode (8-bit) raw data (16-bit) (PCM bus in
US L
raw, 16-bit format)
0: DIS_CONV16
2: DIS_CONV8
.tw TIA
4: EN_ULW2R
5: EN_R2ULW
6: EN_ALW2R
7: EN_R2ALW
26:10 RSV1 Reserved
9:0 TS_START Timeslot starting location
om N
(unit: clock cycles)
x.c DE
0000000
10002134 CHA1_CFG2 Channel A1(represents channel 3) Config
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset 0
ne FI 0 0 0 0 0 0
RSV0[27:12]
0
RO
0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
syn ON
CH CH
_RX _TX CH
RS
Name RSV0[11:0] FF_ FF_ _LS
V1
CL CL B
R R
Type RO RW RW RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
C
0: Normal operation
1: Clear this bit
1 RSV1 Reserved
0 CH_LSB Enable CH A1 Tx in LSB order.
far D
0000000
10002138 CHB1_CFG2 Channel B1(represents channel 4) Config
0
R ME
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RSV0[27:12]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH CH
_RX _TX CH
RS
Name RSV0[11:0] FF_ FF_ _LS
V1
CL CL B
R R
Type RO RW RW RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
31:4 RSV0 Reserved
EO
US L
3 CH_RXFF_CLR Channel B1 Rx FIFO Clear
0: Normal operation
1: Clear this bit
.tw TIA
2 CH_TXFF_CLR Channel B1 Tx FIFO Clear
0: Normal operation
1: Clear this bit
1 RSV1 Reserved
0 CH_LSB Enable CH B1 Tx in LSB order.
om N
x.c DE
ne FI
syn ON
C
g@ K
an E
rw IAT
far D
R ME
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.15 Generic DMA Controller
EO
2.15.1 Features
US L
Supports 16 DMA channels
Supports 32 bit address.
.tw TIA
Maximum 65535 byte transfer
Programmable DMA burst size (1, 2, 4, 8, 16 double word burst)
Supports memory to memory, memory to peripheral, peripheral to memory, peripheral to peripheral
transfers.
Supports continuous mode.
Supports division of target transfer count into 1 to 256 segments
om N
Support for combining different channels into a chain.
Programmable hardware channel priority.
x.c DE
Interrupts for each channel.
ne FI
Rbus Interface Rbus Interface
syn ON
(Master) Rbus Rbus (Master)
Master Master
DMA Engine
C
DMA
Interface
g@ K
Arbiter
an E
rw IAT
Interrupt
Interface Ch0 APBbus
Interrupt Interface
Controller ABbus (Slave)
Mux
Slave
far D
Ch"n"
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Channel number Peripheral
2 I2S Controller (TXDMA)
EO
3 I2S Controller (RXDMA)
US L
4 PCM Controller (RDMA, channel-0)
5 PCM Controller (RDMA, channel-1)
.tw TIA
6 PCM Controller (TDMA, channel-0)
7 PCM Controller (TDMA, channel-1)
8 PCM Controller (RDMA, channel-2)
9 PCM Controller (RDMA, channel-3)
om N
10 PCM Controller (TDMA, channel-2)
11 PCM Controller (TDMA, channel-3)
x.c DE
12 SPI Controller (RXDMA)
13 SPI Controller (TXDMA)
8 to 15 Reserved
ne FI
2.15.4 Registers
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
10002854 GDMA_DA_5 32 Destination Address of GDMA Channel 5
10002858 GDMA_CT0_5 32 Control Register 0 of GDMA Channel 5
1000285C GDMA_CT1_5 32 Control Register 1 of GDMA Channel 5
EO
US L
10002860 GDMA_SA_6 32 Source Address of GDMA Channel 6
10002864 GDMA_DA_6 32 Destination Address of GDMA Channel 6
.tw TIA
10002868 GDMA_CT0_6 32 Control Register 0 of GDMA Channel 6
1000286C GDMA_CT1_6 32 Control Register 1 of GDMA Channel 6
10002870 GDMA_SA_7 32 Source Address of GDMA Channel 7
10002874 GDMA_DA_7 32 Destination Address of GDMA Channel 7
10002878 GDMA_CT0_7 32 Control Register 0 of GDMA Channel 7
1000287C GDMA_CT1_7 32 Control Register 1 of GDMA Channel 7
om N
10002880 GDMA_SA_8 32 Source Address of GDMA Channel 8
10002884 GDMA_DA_8 32 Destination Address of GDMA Channel 8
x.c DE
10002888 GDMA_CT0_8 32 Control Register 0 of GDMA Channel 8
1000288C GDMA_CT1_8 32 Control Register 1 of GDMA Channel 8
10002890 GDMA_SA_9 32 Source Address of GDMA Channel 9
10002894 GDMA_DA_9 32 Destination Address of GDMA Channel 9
10002898
1000289C
ne FI
GDMA_CT0_9
GDMA_CT1_9
32
32
Control Register 0 of GDMA Channel 9
Control Register 1 of GDMA Channel 9
100028A0 GDMA_SA_10 32 Source Address of GDMA Channel 10
syn ON
100028A4 GDMA_DA_10 32 Destination Address of GDMA Channel 10
100028A8 GDMA_CT0_10 32 Control Register 0 of GDMA Channel 10
100028AC GDMA_CT1_10 32 Control Register 1 of GDMA Channel 10
100028B0 GDMA_SA_11 32 Source Address of GDMA Channel 11
C
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
GDMA_PERI_A
10002A30 DDR_START_0 32 Peripheral Region 0 Starting Address
EO
DDR_END_0
US L
GDMA_PERI_A
10002A38 DDR_START_1 32 Peripheral Region 1 Starting Address
.tw TIA
10002A3C GDMA_PERI_A 32 Peripheral Region 1 End Address
DDR_END_1
GDMA_PERI_A
10002A40 DDR_START_2 32 Peripheral Region 2 Starting Address
om N
10002A48 DDR_START_3 32 Peripheral Region 3 Starting Address
x.c DE
DDR_END_3
0000000
10002800 GDMA_SA_0 Source Address of GDMA Channel 0
Bit 31
ne FI30 29 28 27 26 25 24 23 22 21 20 19 18 17
0
16
Name SOURCE_ADDR[31:16]
Type RW
syn ON
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SOURCE_ADDR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
C
0000000
an E
Name DEST_ADDR[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DEST_ADDR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
far D
0000000
10002808 GDMA_CT0_0 Control Register 0 of GDMA Channel 0
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name TARGET_BYTE_CNT
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SO SE
DE
UR GM
ST_ SW
CE_ EN
EO
AD _M
AD T_D CH
US L
Name CURR_SEGMENT
DR
DR BURST_SIZE
ON _EN
OD
_M E_E
_M E_I
OD N
OD NT_
.tw TIA
E
E EN
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
T
15:8 CURR_SEGMENT Indicates the current segment (0 to 255)
x.c DE
7 SOURCE_ADDR_M Sets the source address mode
ODE 0: Incremental mode
1: Fix mode
6 DEST_ADDR_MOD Sets the destination address mode
E 0: Incremental mode
5:3
ne FI
BURST_SIZE
1: Fix mode
Sets the number of double words in each burst transaction
0: 1 DW
syn ON
1: 2 DWs
2: 4 DWs
3: 8 DWs
4: 16 DWs
5: Undefined
6: Undefined
C
7: Undefined
2 SEGMENT_DONE_I Enable the segment done interrupt. This interrupt asserts after transfer
NT_EN of each segment is done.
0: Disable
g@ K
1: Enable
1 CH_EN If CONT_MODE_EN=0, this bit is de-asserted by hardware after the
an E
0 SW_MODE_EN Software mode enable. If software mode enable is set, the data transfer
starts when the CH_EN bit is set. Otherwise, the data transfer starts
when the DMA request is asserted.
0: Hardware mode
1: Software mode
far D
0000000
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
_EN AIL
_IN
T_E
N
EO
Type RO RW RW RW RW RW RW
US L
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit(s) Name Description
25:22 NUM_SEGMENT the number of segments=2N, where N is the value of this field. Valid
values for this field are N=0 to 8. The segment
size=(TARGET_BYTE_CNT/2N). It the TARGET_BYTE_CNT is not a
multiple of 2N, the segment size = {(TARGET_BYTE_CNT/2N) + 1}.
21:16 SOURCE_DMA_RE Selects the source DMA request
om N
Q 0: DMA_REQ0
1: DMA_REQ1
2: DMA_REQ2
x.c DE
32: The source of the transfer is memory (always ready)
14 CONT_MODE_EN If CONT_MODE_EN=1, HW will NOT clear CH_EN after the number of
bytes transferred reachs TARGET_BYTE_CNT. Otherwise, HW will clear
CH_EN will clear the CH_EN.
0: Continuous mode is disabled
13:8
ne FI
DEST_DMA_REQ
1: Continuous mode is enabled
Selects the destination DMA request
0: DMA_REQ0
syn ON
1: DMA_REQ1
2: DMA_REQ2
32: The destination of the transfer is memory (always ready)
7:3 NEXT_CH2UNMAS Selects the channel to clear the CH_MASK bit. When the number of
K bytes transferred reaches the TARGET_BYTE_CNT, the hardware will
clear the CH_MASK field of the NEXT_CH2UNMASK channel. If the
C
hardware does not need to clear CH_MASK field of any channel, this
field should be set to the channel itself.
0: Channel 0
1: Channel 1
g@ K
n: Channel n
2 COHERENT_INT_E If COHERENT_INT_EN is set, GDMA will issue a dummy read to
an E
0: Disable
1: Enable
1 CH_UNMASK_FAIL If this field is set, an interrupt will be assert when HW detect the
_INT_EN CH_MASK field of NEXT_CH2UNMASK channel is 1'b0 while trying to
clear it.
0: Disable
far D
1: Enable
0 CH_MASK When this field is set, the transfer of this channel is gated untill this
field is clear by HW/SW.
R ME
0000000
10002810 GDMA_SA_1 Source Address of GDMA Channel 1
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SOURCE_ADDR[31:16]
Type RW
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SOURCE_ADDR[15:0]
Type RW
EO
US L
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
31:0 SOURCE_ADDR Souce address
0000000
10002814 GDMA_DA_1 Destination Address of GDMA Channel 1
0
om N
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name DEST_ADDR[31:16]
x.c DE
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DEST_ADDR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit(s)
ne FI
Name Description
31:0 DEST_ADDR Destination address
syn ON
0000000
10002818 GDMA_CT0_1 Control Register 0 of GDMA Channel 1
0
C
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name TARGET_BYTE_CNT
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
g@ K
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SO SE
DE
UR GM
an E
ST_ SW
CE_ EN
AD _M
AD T_D CH
Name CURR_SEGMENT DR BURST_SIZE OD
DR ON _EN
rw IAT
_M E_E
_M E_I
OD N
OD NT_
E
E EN
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
2: 4 DWs
3: 8 DWs
EO
4: 16 DWs
US L
5: Undefined
6: Undefined
7: Undefined
.tw TIA
2 SEGMENT_DONE_I Enable the segment done interrupt. This interrupt asserts after transfer
NT_EN of each segment is done.
0: Disable
1: Enable
1 CH_EN If CONT_MODE_EN=0, this bit is de-asserted by hardware after the
number of bytes transfferred reaches the TARGET_BYTE_CNT
om N
0: Disable
1: Enable
x.c DE
0 SW_MODE_EN Software mode enable. If software mode enable is set, the data transfer
starts when the CH_EN bit is set. Otherwise, the data transfer starts
when the DMA request is asserted.
0: Hardware mode
1: Software mode
ne FI
0000000
syn ON
1000281C GDMA_CT1_1 Control Register 1 of GDMA Channel 1
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESERVED NUM_SEGMENT SOURCE_DMA_REQ
Type RO RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
C
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH
_U
CO
CO NM
RE HE CH
NT_ AS
g@ K
SE RE _M
Name RV
MO DEST_DMA_REQ NEXT_CH2UNMASK
NT_
K_F
AS
DE_ AIL
ED INT K
EN _IN
_EN
an E
T_E
N
Type RO RW RW RW RW RW RW
rw IAT
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1: DMA_REQ1
2: DMA_REQ2
32: The source of the transfer is memory (always ready)
14 CONT_MODE_EN If CONT_MODE_EN=1, HW will NOT clear CH_EN after the number of
bytes transferred reachs TARGET_BYTE_CNT. Otherwise, HW will clear
CH_EN will clear the CH_EN.
0: Continuous mode is disabled
1: Continuous mode is enabled
13:8 DEST_DMA_REQ Selects the destination DMA request
0: DMA_REQ0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
1: DMA_REQ1
2: DMA_REQ2
EO
32: The destination of the transfer is memory (always ready)
US L
7:3 NEXT_CH2UNMAS Selects the channel to clear the CH_MASK bit. When the number of
K bytes transferred reaches the TARGET_BYTE_CNT, the hardware will
.tw TIA
clear the CH_MASK field of the NEXT_CH2UNMASK channel. If the
hardware does not need to clear CH_MASK field of any channel, this
field should be set to the channel itself.
0: Channel 0
1: Channel 1
n: Channel n
2 COHERENT_INT_E If COHERENT_INT_EN is set, GDMA will issue a dummy read to
om N
N destination after the last write to destination to avoid data coherent
problem. Note: DO NOT set this field if the destination is not MEM. (may
corrupt data, if destination is a FIFO)
x.c DE
0: Disable
1: Enable
1 CH_UNMASK_FAIL If this field is set, an interrupt will be assert when HW detect the
_INT_EN CH_MASK field of NEXT_CH2UNMASK channel is 1'b0 while trying to
ne FI clear it.
0: Disable
1: Enable
0 CH_MASK When this field is set, the transfer of this channel is gated untill this
syn ON
field is clear by HW/SW.
0: Channel is not masked
1: Channel is masked
C
0000000
10002820 GDMA_SA_2 Source Address of GDMA Channel 2
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
g@ K
Name SOURCE_ADDR[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
an E
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SOURCE_ADDR[15:0]
Type
rw IAT
RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
10002824 GDMA_DA_2 Destination Address of GDMA Channel 2
R ME
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name DEST_ADDR[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DEST_ADDR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
31:0 DEST_ADDR Destination address
EO
US L
0000000
.tw TIA
10002828 GDMA_CT0_2 Control Register 0 of GDMA Channel 2
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name TARGET_BYTE_CNT
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
om N
SO SE
DE
UR GM
ST_ SW
CE_ EN
AD _M
AD T_D CH
x.c DE
Name CURR_SEGMENT DR BURST_SIZE OD
DR ON _EN
_M E_E
_M E_I
OD N
OD NT_
E
E EN
Type RO RW RW RW RW RW RW
Reset 0
ne FI 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5:3 BURST_SIZE Sets the number of double words in each burst transaction
0: 1 DW
1: 2 DWs
an E
2: 4 DWs
3: 8 DWs
rw IAT
4: 16 DWs
5: Undefined
6: Undefined
7: Undefined
2 SEGMENT_DONE_I Enable the segment done interrupt. This interrupt asserts after transfer
NT_EN of each segment is done.
0: Disable
far D
1: Enable
1 CH_EN If CONT_MODE_EN=0, this bit is de-asserted by hardware after the
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0000000
1000282C GDMA_CT1_2 Control Register 1 of GDMA Channel 2
0
EO
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
US L
Name RESERVED NUM_SEGMENT SOURCE_DMA_REQ
Type RO RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH
_U
CO
CO NM
RE HE CH
NT_ AS
SE RE _M
Name MO DEST_DMA_REQ NEXT_CH2UNMASK K_F
RV NT_ AS
DE_ AIL
ED INT K
om N
EN _IN
_EN
T_E
N
Type RO RW RW RW RW RW RW
x.c DE
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2: DMA_REQ2
32: The destination of the transfer is memory (always ready)
rw IAT
7:3 NEXT_CH2UNMAS Selects the channel to clear the CH_MASK bit. When the number of
K bytes transferred reaches the TARGET_BYTE_CNT, the hardware will
clear the CH_MASK field of the NEXT_CH2UNMASK channel. If the
hardware does not need to clear CH_MASK field of any channel, this
field should be set to the channel itself.
0: Channel 0
1: Channel 1
far D
n: Channel n
2 COHERENT_INT_E If COHERENT_INT_EN is set, GDMA will issue a dummy read to
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
field is clear by HW/SW.
0: Channel is not masked
EO
1: Channel is masked
US L
.tw TIA
0000000
10002830 GDMA_SA_3 Source Address of GDMA Channel 3
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SOURCE_ADDR[31:16]
Type RW
Reset
om N
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SOURCE_ADDR[15:0]
x.c DE
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DEST_ADDR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
g@ K
0000000
10002838 GDMA_CT0_3 Control Register 0 of GDMA Channel 3
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name TARGET_BYTE_CNT
Type RW
far D
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SO SE
R ME
DE
UR GM
ST_ SW
CE_ EN
AD _M
AD T_D CH
Name CURR_SEGMENT DR BURST_SIZE OD
DR ON _EN
_M E_E
_M E_I
OD N
OD NT_
E
E EN
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
31:16 TARGET_BYTE_CN The number of bytes to be transferred
T
EO
US L
15:8 CURR_SEGMENT Indicates the current segment (0 to 255)
7 SOURCE_ADDR_M Sets the source address mode
ODE
.tw TIA
0: Incremental mode
1: Fix mode
6 DEST_ADDR_MOD Sets the destination address mode
E 0: Incremental mode
1: Fix mode
5:3 BURST_SIZE Sets the number of double words in each burst transaction
om N
0: 1 DW
1: 2 DWs
2: 4 DWs
x.c DE
3: 8 DWs
4: 16 DWs
5: Undefined
6: Undefined
7: Undefined
2 ne FI
SEGMENT_DONE_I
NT_EN
Enable the segment done interrupt. This interrupt asserts after transfer
of each segment is done.
0: Disable
1: Enable
syn ON
1 CH_EN If CONT_MODE_EN=0, this bit is de-asserted by hardware after the
number of bytes transfferred reaches the TARGET_BYTE_CNT
0: Disable
1: Enable
0 SW_MODE_EN Software mode enable. If software mode enable is set, the data transfer
C
starts when the CH_EN bit is set. Otherwise, the data transfer starts
when the DMA request is asserted.
0: Hardware mode
1: Software mode
g@ K
an E
0000000
1000283C GDMA_CT1_3 Control Register 1 of GDMA Channel 3
0
rw IAT
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESERVED NUM_SEGMENT SOURCE_DMA_REQ
Type RO RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH
_U
far D
CO
CO NM
RE HE CH
NT_ AS
SE RE _M
Name RV
MO DEST_DMA_REQ NEXT_CH2UNMASK
NT_
K_F
AS
R ME
DE_ AIL
ED INT K
EN _IN
_EN
T_E
N
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
multiple of 2N, the segment size = {(TARGET_BYTE_CNT/2N) + 1}.
21:16 SOURCE_DMA_RE Selects the source DMA request
EO
Q
US L
0: DMA_REQ0
1: DMA_REQ1
2: DMA_REQ2
.tw TIA
32: The source of the transfer is memory (always ready)
14 CONT_MODE_EN If CONT_MODE_EN=1, HW will NOT clear CH_EN after the number of
bytes transferred reachs TARGET_BYTE_CNT. Otherwise, HW will clear
CH_EN will clear the CH_EN.
0: Continuous mode is disabled
1: Continuous mode is enabled
om N
13:8 DEST_DMA_REQ Selects the destination DMA request
0: DMA_REQ0
1: DMA_REQ1
x.c DE
2: DMA_REQ2
32: The destination of the transfer is memory (always ready)
7:3 NEXT_CH2UNMAS Selects the channel to clear the CH_MASK bit. When the number of
K bytes transferred reaches the TARGET_BYTE_CNT, the hardware will
clear the CH_MASK field of the NEXT_CH2UNMASK channel. If the
ne FI hardware does not need to clear CH_MASK field of any channel, this
field should be set to the channel itself.
0: Channel 0
1: Channel 1
syn ON
n: Channel n
2 COHERENT_INT_E If COHERENT_INT_EN is set, GDMA will issue a dummy read to
N destination after the last write to destination to avoid data coherent
problem. Note: DO NOT set this field if the destination is not MEM. (may
corrupt data, if destination is a FIFO)
C
0: Disable
1: Enable
1 CH_UNMASK_FAIL If this field is set, an interrupt will be assert when HW detect the
_INT_EN CH_MASK field of NEXT_CH2UNMASK channel is 1'b0 while trying to
g@ K
clear it.
0: Disable
1: Enable
an E
0 CH_MASK When this field is set, the transfer of this channel is gated untill this
field is clear by HW/SW.
rw IAT
0000000
10002840 GDMA_SA_4 Source Address of GDMA Channel 4
far D
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SOURCE_ADDR[31:16]
R ME
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SOURCE_ADDR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0000000
10002844 GDMA_DA_4 Destination Address of GDMA Channel 4
0
EO
US L
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name DEST_ADDR[31:16]
Type
.tw TIA
RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DEST_ADDR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
Bit(s) Name Description
31:0 DEST_ADDR Destination address
x.c DE
0000000
10002848 GDMA_CT0_4 Control Register 0 of GDMA Channel 4
0
Bit
Name
Type
31ne FI30 29 28 27 26 25 24
TARGET_BYTE_CNT
RW
23 22 21 20 19 18 17 16
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
syn ON
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SO SE
DE
UR GM
ST_ SW
CE_ EN
AD _M
AD T_D CH
Name CURR_SEGMENT DR BURST_SIZE OD
DR ON _EN
_M E_E
_M E_I
C
OD N
OD NT_
E
E EN
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
g@ K
1: Fix mode
5:3 BURST_SIZE Sets the number of double words in each burst transaction
0: 1 DW
R ME
1: 2 DWs
2: 4 DWs
3: 8 DWs
4: 16 DWs
5: Undefined
6: Undefined
7: Undefined
2 SEGMENT_DONE_I Enable the segment done interrupt. This interrupt asserts after transfer
NT_EN of each segment is done.
0: Disable
1: Enable
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
1 CH_EN If CONT_MODE_EN=0, this bit is de-asserted by hardware after the
number of bytes transfferred reaches the TARGET_BYTE_CNT
EO
0: Disable
US L
1: Enable
0 SW_MODE_EN Software mode enable. If software mode enable is set, the data transfer
.tw TIA
starts when the CH_EN bit is set. Otherwise, the data transfer starts
when the DMA request is asserted.
0: Hardware mode
1: Software mode
om N
0000000
1000284C GDMA_CT1_4 Control Register 1 of GDMA Channel 4
0
x.c DE
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESERVED NUM_SEGMENT SOURCE_DMA_REQ
Type RO RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ne FI
CO
CO
CH
_U
NM
RE HE CH
NT_ AS
SE RE _M
Name
syn ON
MO DEST_DMA_REQ NEXT_CH2UNMASK K_F
RV NT_ AS
DE_ AIL
ED INT K
EN _IN
_EN
T_E
N
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
C
1: DMA_REQ1
2: DMA_REQ2
32: The source of the transfer is memory (always ready)
14 CONT_MODE_EN If CONT_MODE_EN=1, HW will NOT clear CH_EN after the number of
bytes transferred reachs TARGET_BYTE_CNT. Otherwise, HW will clear
CH_EN will clear the CH_EN.
0: Continuous mode is disabled
far D
0: DMA_REQ0
1: DMA_REQ1
2: DMA_REQ2
32: The destination of the transfer is memory (always ready)
7:3 NEXT_CH2UNMAS Selects the channel to clear the CH_MASK bit. When the number of
K bytes transferred reaches the TARGET_BYTE_CNT, the hardware will
clear the CH_MASK field of the NEXT_CH2UNMASK channel. If the
hardware does not need to clear CH_MASK field of any channel, this
field should be set to the channel itself.
0: Channel 0
1: Channel 1
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
n: Channel n
2 COHERENT_INT_E If COHERENT_INT_EN is set, GDMA will issue a dummy read to
EO
N destination after the last write to destination to avoid data coherent
US L
problem. Note: DO NOT set this field if the destination is not MEM. (may
corrupt data, if destination is a FIFO)
.tw TIA
0: Disable
1: Enable
1 CH_UNMASK_FAIL If this field is set, an interrupt will be assert when HW detect the
_INT_EN CH_MASK field of NEXT_CH2UNMASK channel is 1'b0 while trying to
clear it.
0: Disable
1: Enable
om N
0 CH_MASK When this field is set, the transfer of this channel is gated untill this
field is clear by HW/SW.
x.c DE
0: Channel is not masked
1: Channel is masked
10002850
ne FI
GDMA_SA_5 Source Address of GDMA Channel 5
0000000
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
syn ON
Name SOURCE_ADDR[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SOURCE_ADDR[15:0]
Type RW
C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
10002854 GDMA_DA_5 Destination Address of GDMA Channel 5
0
rw IAT
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name DEST_ADDR[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DEST_ADDR[15:0]
far D
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R ME
0000000
10002858 GDMA_CT0_5 Control Register 0 of GDMA Channel 5
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name TARGET_BYTE_CNT
Type RW
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SO SE
DE
UR GM
EO
ST_ SW
US L
CE_ EN
AD _M
AD T_D CH
Name CURR_SEGMENT
DR
DR BURST_SIZE
ON _EN
OD
_M E_E
.tw TIA
_M E_I
OD N
OD NT_
E
E EN
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
31:16 TARGET_BYTE_CN The number of bytes to be transferred
T
15:8 CURR_SEGMENT Indicates the current segment (0 to 255)
x.c DE
7 SOURCE_ADDR_M Sets the source address mode
ODE 0: Incremental mode
1: Fix mode
6 DEST_ADDR_MOD Sets the destination address mode
Ene FI 0: Incremental mode
1: Fix mode
5:3 BURST_SIZE Sets the number of double words in each burst transaction
syn ON
0: 1 DW
1: 2 DWs
2: 4 DWs
3: 8 DWs
4: 16 DWs
5: Undefined
C
6: Undefined
7: Undefined
2 SEGMENT_DONE_I Enable the segment done interrupt. This interrupt asserts after transfer
NT_EN of each segment is done.
g@ K
0: Disable
1: Enable
an E
1: Enable
0 SW_MODE_EN Software mode enable. If software mode enable is set, the data transfer
starts when the CH_EN bit is set. Otherwise, the data transfer starts
when the DMA request is asserted.
0: Hardware mode
1: Software mode
far D
R ME
0000000
1000285C GDMA_CT1_5 Control Register 1 of GDMA Channel 5
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESERVED NUM_SEGMENT SOURCE_DMA_REQ
Type RO RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RE CO CO CH CH
SE NT_ HE _U _M
Name RV MO
DEST_DMA_REQ NEXT_CH2UNMASK
RE NM AS
ED DE_ NT_ AS K
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
EN INT K_F
_EN AIL
_IN
T_E
EO
N
US L
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit(s) Name Description
25:22 NUM_SEGMENT the number of segments=2N, where N is the value of this field. Valid
values for this field are N=0 to 8. The segment
size=(TARGET_BYTE_CNT/2N). It the TARGET_BYTE_CNT is not a
multiple of 2N, the segment size = {(TARGET_BYTE_CNT/2N) + 1}.
om N
21:16 SOURCE_DMA_RE Selects the source DMA request
Q 0: DMA_REQ0
1: DMA_REQ1
x.c DE
2: DMA_REQ2
32: The source of the transfer is memory (always ready)
14 CONT_MODE_EN If CONT_MODE_EN=1, HW will NOT clear CH_EN after the number of
bytes transferred reachs TARGET_BYTE_CNT. Otherwise, HW will clear
CH_EN will clear the CH_EN.
ne FI 0: Continuous mode is disabled
1: Continuous mode is enabled
13:8 DEST_DMA_REQ Selects the destination DMA request
syn ON
0: DMA_REQ0
1: DMA_REQ1
2: DMA_REQ2
32: The destination of the transfer is memory (always ready)
7:3 NEXT_CH2UNMAS Selects the channel to clear the CH_MASK bit. When the number of
K bytes transferred reaches the TARGET_BYTE_CNT, the hardware will
C
1: Channel 1
n: Channel n
2 COHERENT_INT_E If COHERENT_INT_EN is set, GDMA will issue a dummy read to
an E
1: Enable
0 CH_MASK When this field is set, the transfer of this channel is gated untill this
R ME
0000000
10002860 GDMA_SA_6 Source Address of GDMA Channel 6
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SOURCE_ADDR[31:16]
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SOURCE_ADDR[15:0]
EO
US L
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit(s) Name Description
31:0 SOURCE_ADDR Souce address
0000000
om N
10002864 GDMA_DA_6 Destination Address of GDMA Channel 6
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
x.c DE
Name DEST_ADDR[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DEST_ADDR[15:0]
Type RW
Reset 0
ne FI 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
10002868 GDMA_CT0_6 Control Register 0 of GDMA Channel 6
C
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name TARGET_BYTE_CNT
Type RW
g@ K
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SO SE
an E
DE
UR GM
ST_ SW
CE_ EN
AD _M
AD T_D CH
rw IAT
Name CURR_SEGMENT
DR
DR BURST_SIZE
ON _EN
OD
_M E_E
_M E_I
OD N
OD NT_
E
E EN
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
far D
T
15:8 CURR_SEGMENT Indicates the current segment (0 to 255)
7 SOURCE_ADDR_M Sets the source address mode
ODE 0: Incremental mode
1: Fix mode
6 DEST_ADDR_MOD Sets the destination address mode
E 0: Incremental mode
1: Fix mode
5:3 BURST_SIZE Sets the number of double words in each burst transaction
0: 1 DW
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
1: 2 DWs
2: 4 DWs
EO
3: 8 DWs
US L
4: 16 DWs
5: Undefined
6: Undefined
.tw TIA
7: Undefined
2 SEGMENT_DONE_I Enable the segment done interrupt. This interrupt asserts after transfer
NT_EN of each segment is done.
0: Disable
1: Enable
1 CH_EN If CONT_MODE_EN=0, this bit is de-asserted by hardware after the
om N
number of bytes transfferred reaches the TARGET_BYTE_CNT
0: Disable
x.c DE
1: Enable
0 SW_MODE_EN Software mode enable. If software mode enable is set, the data transfer
starts when the CH_EN bit is set. Otherwise, the data transfer starts
when the DMA request is asserted.
0: Hardware mode
ne FI 1: Software mode
syn ON
0000000
1000286C GDMA_CT1_6 Control Register 1 of GDMA Channel 6
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESERVED NUM_SEGMENT SOURCE_DMA_REQ
Type RO RW RW
C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH
_U
CO
g@ K
CO NM
RE HE CH
NT_ AS
SE RE _M
Name MO DEST_DMA_REQ NEXT_CH2UNMASK K_F
RV NT_ AS
DE_ AIL
an E
ED INT K
EN _IN
_EN
T_E
N
rw IAT
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Q 0: DMA_REQ0
1: DMA_REQ1
2: DMA_REQ2
32: The source of the transfer is memory (always ready)
14 CONT_MODE_EN If CONT_MODE_EN=1, HW will NOT clear CH_EN after the number of
bytes transferred reachs TARGET_BYTE_CNT. Otherwise, HW will clear
CH_EN will clear the CH_EN.
0: Continuous mode is disabled
1: Continuous mode is enabled
13:8 DEST_DMA_REQ Selects the destination DMA request
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
0: DMA_REQ0
1: DMA_REQ1
EO
2: DMA_REQ2
US L
32: The destination of the transfer is memory (always ready)
7:3 NEXT_CH2UNMAS Selects the channel to clear the CH_MASK bit. When the number of
.tw TIA
K bytes transferred reaches the TARGET_BYTE_CNT, the hardware will
clear the CH_MASK field of the NEXT_CH2UNMASK channel. If the
hardware does not need to clear CH_MASK field of any channel, this
field should be set to the channel itself.
0: Channel 0
1: Channel 1
n: Channel n
om N
2 COHERENT_INT_E If COHERENT_INT_EN is set, GDMA will issue a dummy read to
N destination after the last write to destination to avoid data coherent
problem. Note: DO NOT set this field if the destination is not MEM. (may
x.c DE
corrupt data, if destination is a FIFO)
0: Disable
1: Enable
1 CH_UNMASK_FAIL If this field is set, an interrupt will be assert when HW detect the
_INT_EN
ne FI CH_MASK field of NEXT_CH2UNMASK channel is 1'b0 while trying to
clear it.
0: Disable
1: Enable
syn ON
0 CH_MASK When this field is set, the transfer of this channel is gated untill this
field is clear by HW/SW.
0: Channel is not masked
1: Channel is masked
C
0000000
10002870 GDMA_SA_7 Source Address of GDMA Channel 7
0
g@ K
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SOURCE_ADDR[31:16]
Type RW
an E
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name
rw IAT
SOURCE_ADDR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
10002874 GDMA_DA_7 Destination Address of GDMA Channel 7
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name DEST_ADDR[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DEST_ADDR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
31:0 DEST_ADDR Destination address
EO
US L
0000000
.tw TIA
10002878 GDMA_CT0_7 Control Register 0 of GDMA Channel 7
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name TARGET_BYTE_CNT
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
om N
SO SE
DE
UR GM
ST_ SW
CE_ EN
AD _M
AD T_D CH
x.c DE
Name CURR_SEGMENT DR BURST_SIZE OD
DR ON _EN
_M E_E
_M E_I
OD N
OD NT_
E
E EN
Type RO RW RW RW RW RW RW
Reset 0
ne FI 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5:3 BURST_SIZE Sets the number of double words in each burst transaction
0: 1 DW
1: 2 DWs
an E
2: 4 DWs
3: 8 DWs
rw IAT
4: 16 DWs
5: Undefined
6: Undefined
7: Undefined
2 SEGMENT_DONE_I Enable the segment done interrupt. This interrupt asserts after transfer
NT_EN of each segment is done.
0: Disable
far D
1: Enable
1 CH_EN If CONT_MODE_EN=0, this bit is de-asserted by hardware after the
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0000000
1000287C GDMA_CT1_7 Control Register 1 of GDMA Channel 7
0
EO
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
US L
Name RESERVED NUM_SEGMENT SOURCE_DMA_REQ
Type RO RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH
_U
CO
CO NM
RE HE CH
NT_ AS
SE RE _M
Name MO DEST_DMA_REQ NEXT_CH2UNMASK K_F
RV NT_ AS
DE_ AIL
ED INT K
om N
EN _IN
_EN
T_E
N
Type RO RW RW RW RW RW RW
x.c DE
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2: DMA_REQ2
32: The destination of the transfer is memory (always ready)
rw IAT
7:3 NEXT_CH2UNMAS Selects the channel to clear the CH_MASK bit. When the number of
K bytes transferred reaches the TARGET_BYTE_CNT, the hardware will
clear the CH_MASK field of the NEXT_CH2UNMASK channel. If the
hardware does not need to clear CH_MASK field of any channel, this
field should be set to the channel itself.
0: Channel 0
1: Channel 1
far D
n: Channel n
2 COHERENT_INT_E If COHERENT_INT_EN is set, GDMA will issue a dummy read to
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
field is clear by HW/SW.
0: Channel is not masked
EO
1: Channel is masked
US L
.tw TIA
0000000
10002880 GDMA_SA_8 Source Address of GDMA Channel 8
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SOURCE_ADDR[31:16]
Type RW
Reset
om N
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SOURCE_ADDR[15:0]
x.c DE
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DEST_ADDR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
g@ K
0000000
10002888 GDMA_CT0_8 Control Register 0 of GDMA Channel 8
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name TARGET_BYTE_CNT
Type RW
far D
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SO SE
R ME
DE
UR GM
ST_ SW
CE_ EN
AD _M
AD T_D CH
Name CURR_SEGMENT DR BURST_SIZE OD
DR ON _EN
_M E_E
_M E_I
OD N
OD NT_
E
E EN
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
31:16 TARGET_BYTE_CN The number of bytes to be transferred
T
EO
US L
15:8 CURR_SEGMENT Indicates the current segment (0 to 255)
7 SOURCE_ADDR_M Sets the source address mode
ODE
.tw TIA
0: Incremental mode
1: Fix mode
6 DEST_ADDR_MOD Sets the destination address mode
E 0: Incremental mode
1: Fix mode
5:3 BURST_SIZE Sets the number of double words in each burst transaction
om N
0: 1 DW
1: 2 DWs
2: 4 DWs
x.c DE
3: 8 DWs
4: 16 DWs
5: Undefined
6: Undefined
7: Undefined
2 ne FI
SEGMENT_DONE_I
NT_EN
Enable the segment done interrupt. This interrupt asserts after transfer
of each segment is done.
0: Disable
1: Enable
syn ON
1 CH_EN If CONT_MODE_EN=0, this bit is de-asserted by hardware after the
number of bytes transfferred reaches the TARGET_BYTE_CNT
0: Disable
1: Enable
0 SW_MODE_EN Software mode enable. If software mode enable is set, the data transfer
C
starts when the CH_EN bit is set. Otherwise, the data transfer starts
when the DMA request is asserted.
0: Hardware mode
1: Software mode
g@ K
an E
0000000
1000288C GDMA_CT1_8 Control Register 1 of GDMA Channel 8
0
rw IAT
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESERVED NUM_SEGMENT SOURCE_DMA_REQ
Type RO RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH
_U
far D
CO
CO NM
RE HE CH
NT_ AS
SE RE _M
Name RV
MO DEST_DMA_REQ NEXT_CH2UNMASK
NT_
K_F
AS
R ME
DE_ AIL
ED INT K
EN _IN
_EN
T_E
N
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
multiple of 2N, the segment size = {(TARGET_BYTE_CNT/2N) + 1}.
21:16 SOURCE_DMA_RE Selects the source DMA request
EO
Q
US L
0: DMA_REQ0
1: DMA_REQ1
2: DMA_REQ2
.tw TIA
32: The source of the transfer is memory (always ready)
14 CONT_MODE_EN If CONT_MODE_EN=1, HW will NOT clear CH_EN after the number of
bytes transferred reachs TARGET_BYTE_CNT. Otherwise, HW will clear
CH_EN will clear the CH_EN.
0: Continuous mode is disabled
1: Continuous mode is enabled
om N
13:8 DEST_DMA_REQ Selects the destination DMA request
0: DMA_REQ0
1: DMA_REQ1
x.c DE
2: DMA_REQ2
32: The destination of the transfer is memory (always ready)
7:3 NEXT_CH2UNMAS Selects the channel to clear the CH_MASK bit. When the number of
K bytes transferred reaches the TARGET_BYTE_CNT, the hardware will
clear the CH_MASK field of the NEXT_CH2UNMASK channel. If the
ne FI hardware does not need to clear CH_MASK field of any channel, this
field should be set to the channel itself.
0: Channel 0
1: Channel 1
syn ON
n: Channel n
2 COHERENT_INT_E If COHERENT_INT_EN is set, GDMA will issue a dummy read to
N destination after the last write to destination to avoid data coherent
problem. Note: DO NOT set this field if the destination is not MEM. (may
corrupt data, if destination is a FIFO)
C
0: Disable
1: Enable
1 CH_UNMASK_FAIL If this field is set, an interrupt will be assert when HW detect the
_INT_EN CH_MASK field of NEXT_CH2UNMASK channel is 1'b0 while trying to
g@ K
clear it.
0: Disable
1: Enable
an E
0 CH_MASK When this field is set, the transfer of this channel is gated untill this
field is clear by HW/SW.
rw IAT
0000000
10002890 GDMA_SA_9 Source Address of GDMA Channel 9
far D
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SOURCE_ADDR[31:16]
R ME
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SOURCE_ADDR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0000000
10002894 GDMA_DA_9 Destination Address of GDMA Channel 9
0
EO
US L
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name DEST_ADDR[31:16]
Type
.tw TIA
RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DEST_ADDR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
Bit(s) Name Description
31:0 DEST_ADDR Destination address
x.c DE
0000000
10002898 GDMA_CT0_9 Control Register 0 of GDMA Channel 9
0
Bit
Name
Type
31ne FI30 29 28 27 26 25 24
TARGET_BYTE_CNT
RW
23 22 21 20 19 18 17 16
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
syn ON
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SO SE
DE
UR GM
ST_ SW
CE_ EN
AD _M
AD T_D CH
Name CURR_SEGMENT DR BURST_SIZE OD
DR ON _EN
_M E_E
_M E_I
C
OD N
OD NT_
E
E EN
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
g@ K
1: Fix mode
5:3 BURST_SIZE Sets the number of double words in each burst transaction
0: 1 DW
R ME
1: 2 DWs
2: 4 DWs
3: 8 DWs
4: 16 DWs
5: Undefined
6: Undefined
7: Undefined
2 SEGMENT_DONE_I Enable the segment done interrupt. This interrupt asserts after transfer
NT_EN of each segment is done.
0: Disable
1: Enable
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
1 CH_EN If CONT_MODE_EN=0, this bit is de-asserted by hardware after the
number of bytes transfferred reaches the TARGET_BYTE_CNT
EO
0: Disable
US L
1: Enable
0 SW_MODE_EN Software mode enable. If software mode enable is set, the data transfer
.tw TIA
starts when the CH_EN bit is set. Otherwise, the data transfer starts
when the DMA request is asserted.
0: Hardware mode
1: Software mode
om N
0000000
1000289C GDMA_CT1_9 Control Register 1 of GDMA Channel 9
0
x.c DE
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESERVED NUM_SEGMENT SOURCE_DMA_REQ
Type RO RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ne FI
CO
CO
CH
_U
NM
RE HE CH
NT_ AS
SE RE _M
Name
syn ON
MO DEST_DMA_REQ NEXT_CH2UNMASK K_F
RV NT_ AS
DE_ AIL
ED INT K
EN _IN
_EN
T_E
N
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
C
1: DMA_REQ1
2: DMA_REQ2
32: The source of the transfer is memory (always ready)
14 CONT_MODE_EN If CONT_MODE_EN=1, HW will NOT clear CH_EN after the number of
bytes transferred reachs TARGET_BYTE_CNT. Otherwise, HW will clear
CH_EN will clear the CH_EN.
0: Continuous mode is disabled
far D
0: DMA_REQ0
1: DMA_REQ1
2: DMA_REQ2
32: The destination of the transfer is memory (always ready)
7:3 NEXT_CH2UNMAS Selects the channel to clear the CH_MASK bit. When the number of
K bytes transferred reaches the TARGET_BYTE_CNT, the hardware will
clear the CH_MASK field of the NEXT_CH2UNMASK channel. If the
hardware does not need to clear CH_MASK field of any channel, this
field should be set to the channel itself.
0: Channel 0
1: Channel 1
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
n: Channel n
2 COHERENT_INT_E If COHERENT_INT_EN is set, GDMA will issue a dummy read to
EO
N destination after the last write to destination to avoid data coherent
US L
problem. Note: DO NOT set this field if the destination is not MEM. (may
corrupt data, if destination is a FIFO)
.tw TIA
0: Disable
1: Enable
1 CH_UNMASK_FAIL If this field is set, an interrupt will be assert when HW detect the
_INT_EN CH_MASK field of NEXT_CH2UNMASK channel is 1'b0 while trying to
clear it.
0: Disable
1: Enable
om N
0 CH_MASK When this field is set, the transfer of this channel is gated untill this
field is clear by HW/SW.
x.c DE
0: Channel is not masked
1: Channel is masked
100028A0
ne FI
GDMA_SA_10 Source Address of GDMA Channel 10
0000000
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
syn ON
Name SOURCE_ADDR[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SOURCE_ADDR[15:0]
Type RW
C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
100028A4 GDMA_DA_10 Destination Address of GDMA Channel 10
0
rw IAT
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name DEST_ADDR[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DEST_ADDR[15:0]
far D
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R ME
GDMA_CT0_1 0000000
100028A8 Control Register 0 of GDMA Channel 10
0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name TARGET_BYTE_CNT
Type RW
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SO SE
DE
UR GM
EO
ST_ SW
US L
CE_ EN
AD _M
AD T_D CH
Name CURR_SEGMENT
DR
DR BURST_SIZE
ON _EN
OD
_M E_E
.tw TIA
_M E_I
OD N
OD NT_
E
E EN
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
31:16 TARGET_BYTE_CN The number of bytes to be transferred
T
15:8 CURR_SEGMENT Indicates the current segment (0 to 255)
x.c DE
7 SOURCE_ADDR_M Sets the source address mode
ODE 0: Incremental mode
1: Fix mode
6 DEST_ADDR_MOD Sets the destination address mode
Ene FI 0: Incremental mode
1: Fix mode
5:3 BURST_SIZE Sets the number of double words in each burst transaction
syn ON
0: 1 DW
1: 2 DWs
2: 4 DWs
3: 8 DWs
4: 16 DWs
5: Undefined
C
6: Undefined
7: Undefined
2 SEGMENT_DONE_I Enable the segment done interrupt. This interrupt asserts after transfer
NT_EN of each segment is done.
g@ K
0: Disable
1: Enable
an E
1: Enable
0 SW_MODE_EN Software mode enable. If software mode enable is set, the data transfer
starts when the CH_EN bit is set. Otherwise, the data transfer starts
when the DMA request is asserted.
0: Hardware mode
1: Software mode
far D
R ME
GDMA_CT1_1 0000000
100028AC Control Register 1 of GDMA Channel 10
0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESERVED NUM_SEGMENT SOURCE_DMA_REQ
Type RO RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RE CO CO CH CH
SE NT_ HE _U _M
Name RV MO
DEST_DMA_REQ NEXT_CH2UNMASK
RE NM AS
ED DE_ NT_ AS K
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
EN INT K_F
_EN AIL
_IN
T_E
EO
N
US L
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit(s) Name Description
25:22 NUM_SEGMENT the number of segments=2N, where N is the value of this field. Valid
values for this field are N=0 to 8. The segment
size=(TARGET_BYTE_CNT/2N). It the TARGET_BYTE_CNT is not a
multiple of 2N, the segment size = {(TARGET_BYTE_CNT/2N) + 1}.
om N
21:16 SOURCE_DMA_RE Selects the source DMA request
Q 0: DMA_REQ0
1: DMA_REQ1
x.c DE
2: DMA_REQ2
32: The source of the transfer is memory (always ready)
14 CONT_MODE_EN If CONT_MODE_EN=1, HW will NOT clear CH_EN after the number of
bytes transferred reachs TARGET_BYTE_CNT. Otherwise, HW will clear
CH_EN will clear the CH_EN.
ne FI 0: Continuous mode is disabled
1: Continuous mode is enabled
13:8 DEST_DMA_REQ Selects the destination DMA request
syn ON
0: DMA_REQ0
1: DMA_REQ1
2: DMA_REQ2
32: The destination of the transfer is memory (always ready)
7:3 NEXT_CH2UNMAS Selects the channel to clear the CH_MASK bit. When the number of
K bytes transferred reaches the TARGET_BYTE_CNT, the hardware will
C
1: Channel 1
n: Channel n
2 COHERENT_INT_E If COHERENT_INT_EN is set, GDMA will issue a dummy read to
an E
1: Enable
0 CH_MASK When this field is set, the transfer of this channel is gated untill this
R ME
0000000
100028B0 GDMA_SA_11 Source Address of GDMA Channel 11
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SOURCE_ADDR[31:16]
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SOURCE_ADDR[15:0]
EO
US L
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit(s) Name Description
31:0 SOURCE_ADDR Souce address
0000000
om N
100028B4 GDMA_DA_11 Destination Address of GDMA Channel 11
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
x.c DE
Name DEST_ADDR[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DEST_ADDR[15:0]
Type RW
Reset 0
ne FI 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
GDMA_CT0_1 0000000
100028B8 Control Register 0 of GDMA Channel 11
C
1 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name TARGET_BYTE_CNT
Type RW
g@ K
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SO SE
an E
DE
UR GM
ST_ SW
CE_ EN
AD _M
AD T_D CH
rw IAT
Name CURR_SEGMENT
DR
DR BURST_SIZE
ON _EN
OD
_M E_E
_M E_I
OD N
OD NT_
E
E EN
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
far D
T
15:8 CURR_SEGMENT Indicates the current segment (0 to 255)
7 SOURCE_ADDR_M Sets the source address mode
ODE 0: Incremental mode
1: Fix mode
6 DEST_ADDR_MOD Sets the destination address mode
E 0: Incremental mode
1: Fix mode
5:3 BURST_SIZE Sets the number of double words in each burst transaction
0: 1 DW
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
1: 2 DWs
2: 4 DWs
EO
3: 8 DWs
US L
4: 16 DWs
5: Undefined
6: Undefined
.tw TIA
7: Undefined
2 SEGMENT_DONE_I Enable the segment done interrupt. This interrupt asserts after transfer
NT_EN of each segment is done.
0: Disable
1: Enable
1 CH_EN If CONT_MODE_EN=0, this bit is de-asserted by hardware after the
om N
number of bytes transfferred reaches the TARGET_BYTE_CNT
0: Disable
x.c DE
1: Enable
0 SW_MODE_EN Software mode enable. If software mode enable is set, the data transfer
starts when the CH_EN bit is set. Otherwise, the data transfer starts
when the DMA request is asserted.
0: Hardware mode
ne FI 1: Software mode
syn ON
GDMA_CT1_1 0000000
100028BC Control Register 1 of GDMA Channel 11
1 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESERVED NUM_SEGMENT SOURCE_DMA_REQ
Type RO RW RW
C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH
_U
CO
g@ K
CO NM
RE HE CH
NT_ AS
SE RE _M
Name MO DEST_DMA_REQ NEXT_CH2UNMASK K_F
RV NT_ AS
DE_ AIL
an E
ED INT K
EN _IN
_EN
T_E
N
rw IAT
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Q 0: DMA_REQ0
1: DMA_REQ1
2: DMA_REQ2
32: The source of the transfer is memory (always ready)
14 CONT_MODE_EN If CONT_MODE_EN=1, HW will NOT clear CH_EN after the number of
bytes transferred reachs TARGET_BYTE_CNT. Otherwise, HW will clear
CH_EN will clear the CH_EN.
0: Continuous mode is disabled
1: Continuous mode is enabled
13:8 DEST_DMA_REQ Selects the destination DMA request
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
0: DMA_REQ0
1: DMA_REQ1
EO
2: DMA_REQ2
US L
32: The destination of the transfer is memory (always ready)
7:3 NEXT_CH2UNMAS Selects the channel to clear the CH_MASK bit. When the number of
.tw TIA
K bytes transferred reaches the TARGET_BYTE_CNT, the hardware will
clear the CH_MASK field of the NEXT_CH2UNMASK channel. If the
hardware does not need to clear CH_MASK field of any channel, this
field should be set to the channel itself.
0: Channel 0
1: Channel 1
n: Channel n
om N
2 COHERENT_INT_E If COHERENT_INT_EN is set, GDMA will issue a dummy read to
N destination after the last write to destination to avoid data coherent
problem. Note: DO NOT set this field if the destination is not MEM. (may
x.c DE
corrupt data, if destination is a FIFO)
0: Disable
1: Enable
1 CH_UNMASK_FAIL If this field is set, an interrupt will be assert when HW detect the
_INT_EN
ne FI CH_MASK field of NEXT_CH2UNMASK channel is 1'b0 while trying to
clear it.
0: Disable
1: Enable
syn ON
0 CH_MASK When this field is set, the transfer of this channel is gated untill this
field is clear by HW/SW.
0: Channel is not masked
1: Channel is masked
C
0000000
100028C0 GDMA_SA_12 Source Address of GDMA Channel 12
0
g@ K
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SOURCE_ADDR[31:16]
Type RW
an E
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name
rw IAT
SOURCE_ADDR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
100028C4 GDMA_DA_12 Destination Address of GDMA Channel 12
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name DEST_ADDR[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DEST_ADDR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
31:0 DEST_ADDR Destination address
EO
US L
GDMA_CT0_1 0000000
.tw TIA
100028C8 Control Register 0 of GDMA Channel 12
2 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name TARGET_BYTE_CNT
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
om N
SO SE
DE
UR GM
ST_ SW
CE_ EN
AD _M
AD T_D CH
x.c DE
Name CURR_SEGMENT DR BURST_SIZE OD
DR ON _EN
_M E_E
_M E_I
OD N
OD NT_
E
E EN
Type RO RW RW RW RW RW RW
Reset 0
ne FI 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5:3 BURST_SIZE Sets the number of double words in each burst transaction
0: 1 DW
1: 2 DWs
an E
2: 4 DWs
3: 8 DWs
rw IAT
4: 16 DWs
5: Undefined
6: Undefined
7: Undefined
2 SEGMENT_DONE_I Enable the segment done interrupt. This interrupt asserts after transfer
NT_EN of each segment is done.
0: Disable
far D
1: Enable
1 CH_EN If CONT_MODE_EN=0, this bit is de-asserted by hardware after the
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
GDMA_CT1_1 0000000
100028CC Control Register 1 of GDMA Channel 12
2 0
EO
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
US L
Name RESERVED NUM_SEGMENT SOURCE_DMA_REQ
Type RO RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH
_U
CO
CO NM
RE HE CH
NT_ AS
SE RE _M
Name MO DEST_DMA_REQ NEXT_CH2UNMASK K_F
RV NT_ AS
DE_ AIL
ED INT K
om N
EN _IN
_EN
T_E
N
Type RO RW RW RW RW RW RW
x.c DE
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2: DMA_REQ2
32: The destination of the transfer is memory (always ready)
rw IAT
7:3 NEXT_CH2UNMAS Selects the channel to clear the CH_MASK bit. When the number of
K bytes transferred reaches the TARGET_BYTE_CNT, the hardware will
clear the CH_MASK field of the NEXT_CH2UNMASK channel. If the
hardware does not need to clear CH_MASK field of any channel, this
field should be set to the channel itself.
0: Channel 0
1: Channel 1
far D
n: Channel n
2 COHERENT_INT_E If COHERENT_INT_EN is set, GDMA will issue a dummy read to
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
field is clear by HW/SW.
0: Channel is not masked
EO
1: Channel is masked
US L
.tw TIA
0000000
100028D0 GDMA_SA_13 Source Address of GDMA Channel 13
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SOURCE_ADDR[31:16]
Type RW
Reset
om N
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SOURCE_ADDR[15:0]
x.c DE
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DEST_ADDR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
g@ K
GDMA_CT0_1 0000000
100028D8 Control Register 0 of GDMA Channel 13
3 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name TARGET_BYTE_CNT
Type RW
far D
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SO SE
R ME
DE
UR GM
ST_ SW
CE_ EN
AD _M
AD T_D CH
Name CURR_SEGMENT DR BURST_SIZE OD
DR ON _EN
_M E_E
_M E_I
OD N
OD NT_
E
E EN
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
31:16 TARGET_BYTE_CN The number of bytes to be transferred
T
EO
US L
15:8 CURR_SEGMENT Indicates the current segment (0 to 255)
7 SOURCE_ADDR_M Sets the source address mode
ODE
.tw TIA
0: Incremental mode
1: Fix mode
6 DEST_ADDR_MOD Sets the destination address mode
E 0: Incremental mode
1: Fix mode
5:3 BURST_SIZE Sets the number of double words in each burst transaction
om N
0: 1 DW
1: 2 DWs
2: 4 DWs
x.c DE
3: 8 DWs
4: 16 DWs
5: Undefined
6: Undefined
7: Undefined
2 ne FI
SEGMENT_DONE_I
NT_EN
Enable the segment done interrupt. This interrupt asserts after transfer
of each segment is done.
0: Disable
1: Enable
syn ON
1 CH_EN If CONT_MODE_EN=0, this bit is de-asserted by hardware after the
number of bytes transfferred reaches the TARGET_BYTE_CNT
0: Disable
1: Enable
0 SW_MODE_EN Software mode enable. If software mode enable is set, the data transfer
C
starts when the CH_EN bit is set. Otherwise, the data transfer starts
when the DMA request is asserted.
0: Hardware mode
1: Software mode
g@ K
an E
GDMA_CT1_1 0000000
100028DC Control Register 1 of GDMA Channel 13
3 0
rw IAT
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESERVED NUM_SEGMENT SOURCE_DMA_REQ
Type RO RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH
_U
far D
CO
CO NM
RE HE CH
NT_ AS
SE RE _M
Name RV
MO DEST_DMA_REQ NEXT_CH2UNMASK
NT_
K_F
AS
R ME
DE_ AIL
ED INT K
EN _IN
_EN
T_E
N
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
multiple of 2N, the segment size = {(TARGET_BYTE_CNT/2N) + 1}.
21:16 SOURCE_DMA_RE Selects the source DMA request
EO
Q
US L
0: DMA_REQ0
1: DMA_REQ1
2: DMA_REQ2
.tw TIA
32: The source of the transfer is memory (always ready)
14 CONT_MODE_EN If CONT_MODE_EN=1, HW will NOT clear CH_EN after the number of
bytes transferred reachs TARGET_BYTE_CNT. Otherwise, HW will clear
CH_EN will clear the CH_EN.
0: Continuous mode is disabled
1: Continuous mode is enabled
om N
13:8 DEST_DMA_REQ Selects the destination DMA request
0: DMA_REQ0
1: DMA_REQ1
x.c DE
2: DMA_REQ2
32: The destination of the transfer is memory (always ready)
7:3 NEXT_CH2UNMAS Selects the channel to clear the CH_MASK bit. When the number of
K bytes transferred reaches the TARGET_BYTE_CNT, the hardware will
clear the CH_MASK field of the NEXT_CH2UNMASK channel. If the
ne FI hardware does not need to clear CH_MASK field of any channel, this
field should be set to the channel itself.
0: Channel 0
1: Channel 1
syn ON
n: Channel n
2 COHERENT_INT_E If COHERENT_INT_EN is set, GDMA will issue a dummy read to
N destination after the last write to destination to avoid data coherent
problem. Note: DO NOT set this field if the destination is not MEM. (may
corrupt data, if destination is a FIFO)
C
0: Disable
1: Enable
1 CH_UNMASK_FAIL If this field is set, an interrupt will be assert when HW detect the
_INT_EN CH_MASK field of NEXT_CH2UNMASK channel is 1'b0 while trying to
g@ K
clear it.
0: Disable
1: Enable
an E
0 CH_MASK When this field is set, the transfer of this channel is gated untill this
field is clear by HW/SW.
rw IAT
0000000
100028E0 GDMA_SA_14 Source Address of GDMA Channel 14
far D
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SOURCE_ADDR[31:16]
R ME
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SOURCE_ADDR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0000000
100028E4 GDMA_DA_14 Destination Address of GDMA Channel 14
0
EO
US L
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name DEST_ADDR[31:16]
Type
.tw TIA
RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DEST_ADDR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
Bit(s) Name Description
31:0 DEST_ADDR Destination address
x.c DE
GDMA_CT0_1 0000000
100028E8 Control Register 0 of GDMA Channel 14
4 0
Bit
Name
Type
31ne FI30 29 28 27 26 25 24
TARGET_BYTE_CNT
RW
23 22 21 20 19 18 17 16
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
syn ON
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SO SE
DE
UR GM
ST_ SW
CE_ EN
AD _M
AD T_D CH
Name CURR_SEGMENT DR BURST_SIZE OD
DR ON _EN
_M E_E
_M E_I
C
OD N
OD NT_
E
E EN
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
g@ K
1: Fix mode
5:3 BURST_SIZE Sets the number of double words in each burst transaction
0: 1 DW
R ME
1: 2 DWs
2: 4 DWs
3: 8 DWs
4: 16 DWs
5: Undefined
6: Undefined
7: Undefined
2 SEGMENT_DONE_I Enable the segment done interrupt. This interrupt asserts after transfer
NT_EN of each segment is done.
0: Disable
1: Enable
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
1 CH_EN If CONT_MODE_EN=0, this bit is de-asserted by hardware after the
number of bytes transfferred reaches the TARGET_BYTE_CNT
EO
0: Disable
US L
1: Enable
0 SW_MODE_EN Software mode enable. If software mode enable is set, the data transfer
.tw TIA
starts when the CH_EN bit is set. Otherwise, the data transfer starts
when the DMA request is asserted.
0: Hardware mode
1: Software mode
om N
GDMA_CT1_1 0000000
100028EC Control Register 1 of GDMA Channel 14
4 0
x.c DE
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESERVED NUM_SEGMENT SOURCE_DMA_REQ
Type RO RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ne FI
CO
CO
CH
_U
NM
RE HE CH
NT_ AS
SE RE _M
Name
syn ON
MO DEST_DMA_REQ NEXT_CH2UNMASK K_F
RV NT_ AS
DE_ AIL
ED INT K
EN _IN
_EN
T_E
N
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
C
1: DMA_REQ1
2: DMA_REQ2
32: The source of the transfer is memory (always ready)
14 CONT_MODE_EN If CONT_MODE_EN=1, HW will NOT clear CH_EN after the number of
bytes transferred reachs TARGET_BYTE_CNT. Otherwise, HW will clear
CH_EN will clear the CH_EN.
0: Continuous mode is disabled
far D
0: DMA_REQ0
1: DMA_REQ1
2: DMA_REQ2
32: The destination of the transfer is memory (always ready)
7:3 NEXT_CH2UNMAS Selects the channel to clear the CH_MASK bit. When the number of
K bytes transferred reaches the TARGET_BYTE_CNT, the hardware will
clear the CH_MASK field of the NEXT_CH2UNMASK channel. If the
hardware does not need to clear CH_MASK field of any channel, this
field should be set to the channel itself.
0: Channel 0
1: Channel 1
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
n: Channel n
2 COHERENT_INT_E If COHERENT_INT_EN is set, GDMA will issue a dummy read to
EO
N destination after the last write to destination to avoid data coherent
US L
problem. Note: DO NOT set this field if the destination is not MEM. (may
corrupt data, if destination is a FIFO)
.tw TIA
0: Disable
1: Enable
1 CH_UNMASK_FAIL If this field is set, an interrupt will be assert when HW detect the
_INT_EN CH_MASK field of NEXT_CH2UNMASK channel is 1'b0 while trying to
clear it.
0: Disable
1: Enable
om N
0 CH_MASK When this field is set, the transfer of this channel is gated untill this
field is clear by HW/SW.
x.c DE
0: Channel is not masked
1: Channel is masked
100028F0
ne FI
GDMA_SA_15 Source Address of GDMA Channel 15
0000000
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
syn ON
Name SOURCE_ADDR[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SOURCE_ADDR[15:0]
Type RW
C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
100028F4 GDMA_DA_15 Destination Address of GDMA Channel 15
0
rw IAT
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name DEST_ADDR[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DEST_ADDR[15:0]
far D
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R ME
GDMA_CT0_1 0000000
100028F8 Control Register 0 of GDMA Channel 15
5 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name TARGET_BYTE_CNT
Type RW
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SO SE
DE
UR GM
EO
ST_ SW
US L
CE_ EN
AD _M
AD T_D CH
Name CURR_SEGMENT
DR
DR BURST_SIZE
ON _EN
OD
_M E_E
.tw TIA
_M E_I
OD N
OD NT_
E
E EN
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
31:16 TARGET_BYTE_CN The number of bytes to be transferred
T
15:8 CURR_SEGMENT Indicates the current segment (0 to 255)
x.c DE
7 SOURCE_ADDR_M Sets the source address mode
ODE 0: Incremental mode
1: Fix mode
6 DEST_ADDR_MOD Sets the destination address mode
Ene FI 0: Incremental mode
1: Fix mode
5:3 BURST_SIZE Sets the number of double words in each burst transaction
syn ON
0: 1 DW
1: 2 DWs
2: 4 DWs
3: 8 DWs
4: 16 DWs
5: Undefined
C
6: Undefined
7: Undefined
2 SEGMENT_DONE_I Enable the segment done interrupt. This interrupt asserts after transfer
NT_EN of each segment is done.
g@ K
0: Disable
1: Enable
an E
1: Enable
0 SW_MODE_EN Software mode enable. If software mode enable is set, the data transfer
starts when the CH_EN bit is set. Otherwise, the data transfer starts
when the DMA request is asserted.
0: Hardware mode
1: Software mode
far D
R ME
GDMA_CT1_1 0000000
100028FC Control Register 1 of GDMA Channel 15
5 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESERVED NUM_SEGMENT SOURCE_DMA_REQ
Type RO RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RE CO CO CH CH
SE NT_ HE _U _M
Name RV MO
DEST_DMA_REQ NEXT_CH2UNMASK
RE NM AS
ED DE_ NT_ AS K
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
EN INT K_F
_EN AIL
_IN
T_E
EO
N
US L
Type RO RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit(s) Name Description
25:22 NUM_SEGMENT the number of segments=2N, where N is the value of this field. Valid
values for this field are N=0 to 8. The segment
size=(TARGET_BYTE_CNT/2N). It the TARGET_BYTE_CNT is not a
multiple of 2N, the segment size = {(TARGET_BYTE_CNT/2N) + 1}.
om N
21:16 SOURCE_DMA_RE Selects the source DMA request
Q 0: DMA_REQ0
1: DMA_REQ1
x.c DE
2: DMA_REQ2
32: The source of the transfer is memory (always ready)
14 CONT_MODE_EN If CONT_MODE_EN=1, HW will NOT clear CH_EN after the number of
bytes transferred reachs TARGET_BYTE_CNT. Otherwise, HW will clear
CH_EN will clear the CH_EN.
ne FI 0: Continuous mode is disabled
1: Continuous mode is enabled
13:8 DEST_DMA_REQ Selects the destination DMA request
syn ON
0: DMA_REQ0
1: DMA_REQ1
2: DMA_REQ2
32: The destination of the transfer is memory (always ready)
7:3 NEXT_CH2UNMAS Selects the channel to clear the CH_MASK bit. When the number of
K bytes transferred reaches the TARGET_BYTE_CNT, the hardware will
C
1: Channel 1
n: Channel n
2 COHERENT_INT_E If COHERENT_INT_EN is set, GDMA will issue a dummy read to
an E
1: Enable
0 CH_MASK When this field is set, the transfer of this channel is gated untill this
R ME
GDMA_UNMA 0000000
10002A00 Unmask Fail Interrupt Status
SK_INTSTS 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name UNMASK_FAIL_INTSTS[31:16]
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name UNMASK_FAIL_INTSTS[15:0]
EO
US L
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit(s) Name Description
31:0 UNMASK_FAIL_INT This field is the bit-map of unmask fail interrupt status of each channel.
STS The unmask fail interrupt will assert when HW detect the CH_MASK field
of NEXT_CH2UNMASK channel is 1'b0 while trying to clear it.
om N
GDMA_DONE 0000000
10002A04 Segment Done Interrupt Status
_INTSTS 0
x.c DE
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SEGMENT_DONE_INTSTS[31:16]
Type W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name
Type
ne FI SEGMENT_DONE_INTSTS[15:0]
W1C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
syn ON
Bit(s) Name Description
31:0 SEGMENT_DONE_I This field is the bit-map of segment done interrupt status of each
NTSTS channel. The segment done interrupt will assert when each segment is
transferred completely.
C
0000000
10002A20 GDMA_GCT Global Control
g@ K
E
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESERVED[26:11]
an E
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw IAT
AR
TOTAL_C B_
Name RESERVED[10:0]
H_NUM
IP_VER
MO
DE
Type RO RO RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
far D
0: 8 channels
1: 16 channels
2: 32 channels
3: Undefined
2:1 IP_VER GDMA core version
0 ARB_MODE Arbitration mode selection
0: channel 0 has highest priority and others are round-robin
1: All channel are round-robin
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
GDMA_PERI_
1000000
10002A30 ADDR_START Peripheral Region 0 Starting Address
0
_0
EO
US L
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name PERI_ADDR_START_0[31:16]
Type
.tw TIA
RW
Reset 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name PERI_ADDR_START_0[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
Bit(s) Name Description
31:0 PERI_ADDR_STAR GDMA request will direct to peripheral bus if the request address >=
T_0 PERI_ADDR_START_x & < PERI_ADDR_END_x
x.c DE
GDMA_PERI_ 2000000
10002A34 Peripheral Region 0 End Address
ADDR_END_0
ne FI 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name PERI_ADDR_END_0[31:16]
Type RW
syn ON
Reset 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name PERI_ADDR_END_0[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
C
GDMA_PERI_
2000000
10002A38 ADDR_START Peripheral Region 1 Starting Address
0
rw IAT
_1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name PERI_ADDR_START_1[31:16]
Type RW
Reset 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name PERI_ADDR_START_1[15:0]
far D
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R ME
GDMA_PERI_ 3000000
10002A3C Peripheral Region 1 End Address
ADDR_END_1 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name PERI_ADDR_END_1[31:16]
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Type RW
Reset 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name PERI_ADDR_END_1[15:0]
EO
US L
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit(s) Name Description
31:0 PERI_ADDR_END_ GDMA request will direct to peripheral bus if the request address >=
1 PERI_ADDR_START_x & < PERI_ADDR_END_x
om N
GDMA_PERI_
1000000
10002A40 ADDR_START Peripheral Region 2 Starting Address
0
_2
x.c DE
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name PERI_ADDR_START_2[31:16]
Type RW
Reset 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15ne FI14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name PERI_ADDR_START_2[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
syn ON
Bit(s) Name Description
31:0 PERI_ADDR_STAR GDMA request will direct to peripheral bus if the request address >=
T_2 PERI_ADDR_START_x & < PERI_ADDR_END_x
C
GDMA_PERI_ 2000000
10002A44 Peripheral Region 2 End Address
ADDR_END_2 0
g@ K
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name PERI_ADDR_END_2[31:16]
Type RW
an E
Reset 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw IAT
Name PERI_ADDR_END_2[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
GDMA_PERI_
6000000
10002A48 ADDR_START Peripheral Region 3 Starting Address
0
_3
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name PERI_ADDR_START_3[31:16]
Type RW
Reset 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name PERI_ADDR_START_3[15:0]
Type RW
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
31:0
US L
PERI_ADDR_STAR GDMA request will direct to peripheral bus if the request address >=
T_3 PERI_ADDR_START_x & < PERI_ADDR_END_x
.tw TIA
GDMA_PERI_ 7000000
10002A4C Peripheral Region 3 End Address
ADDR_END_3 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name PERI_ADDR_END_3[31:16]
om N
Type RW
Reset 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
x.c DE
Name PERI_ADDR_END_3[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.16 AES Controller
EO
2.16.1 Registers
US L
AES Changes LOG
.tw TIA
Revision Date Author Change Log
0.1 2013/4/30 Morrie Lin Initialization
0.2 2013/6/5 Morrie Lin Add desc_5dw_info_en register
0.3 2013/6/7 Morrie Lin Update AES base address
om N
Module name: AES Base address: (+10004000h)
Address Name Widt Register Function
x.c DE
h
TX_BASE_PTR TX_BASE_PTR0
10004000 32
0 Used for DMA base address of TX ring0
TX_MAX_CNT0
10004004 TX_MAX_CNT0 32
10004008
ne FITX_CTX_IDX0 32
Used for DMA max number of TX ring0
TX_CTX_IDX0
Used for CPU pointer of TX ring0
TX_DTX_IDX0
syn ON
1000400C TX_DTX_IDX0 32
Used for DMA pointer of TX ring0
RX_BASE_PTR RX_BASE_PTR0
10004100 0 32
Used for DMA base address of RX ring0
RX_MAX_CNT0
10004104 RX_MAX_CNT0 32
Used for DMA max number of RX ring0
C
RX_CALC_IDX RX_CALC_IDX0
10004108 32
0 Used for CPU pointer of RX ring0
FS_DRX_IDX0
g@ K
1000410C FS_DRX_IDX0 32
Used for DMA pointer of RX ring0
PDMA_INFO
10004200 PDMA_INFO 32
an E
PDMA_RST_ID PDMA_RST_IDX
10004208 X 32
used for PDMA setting
DELAY_INT_CF DELAY_INT_CFG
1000420C G 32
used for PDMA setting
PDMA_Q_CFG
10004210 PDMA_Q_CFG 32
far D
PDMA_INT_MS PDMA_INT_MSK
10004228 K 32
used for PDMA setting
TX_BASE_PT 0000000
10004000 TX_BASE_PTR0
R0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV
Type RO
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TX_BASE_PTR0
Type RW
EO
US L
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
31:16 RESV Reserved
15:0 TX_BASE_PTR0 Tx Base Pointer 0
Points to the base address of TX_Ring 0
(If enable desc_5dw_info_en 8-DWORD aligned address, else 4-DWORD
aligned address).
om N
x.c DE
TX_MAX_CNT 0000000
10004004 TX_MAX_CNT0
0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV
Type RO
Reset
Bit
Name
0
15
ne FI 0
14
0
13
0
12
0
11
0
10
0
9
0
8
TX_MAX_CNT0
0
7
0
6
0
5
0
4
0
3
0
2 1
0 0
0
Type RW
syn ON
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
10004008 TX_CTX_IDX0 TX_CTX_IDX0
0
an E
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV
rw IAT
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TX_MAX_CNT0
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
far D
0000000
1000400C TX_DTX_IDX0 TX_DTX_IDX0
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV[23:8]
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RESV[7:0] TX_DTX_IDX0
EO
US L
Type RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit(s) Name Description
31:8 RESV Reserved
7:0 TX_DTX_IDX0 Tx DMA TXD Index n
Points to the next TXD to be used by the DMA.
(If enable desc_5dw_info_en, 8-DWORD aligned address, else 4-DWORD
aligned address).
om N
x.c DE
RX_BASE_PT 0000000
10004100 RX_BASE_PTR0
R0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV
Type
Reset
Bit
0
15
ne FI 0
14
0
13
0
12
0
11
0
10
0
9
0
8
RO
0
7
0
6
0
5
0
4
0
3
0
2 1
0 0
0
Name RX_BASE_PTR0
syn ON
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
RX_MAX_CNT 0000000
10004104 RX_MAX_CNT0
0 0
rw IAT
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RX_MAX_CNT0
Type RW
far D
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R ME
RX_CALC_ID 0000000
10004108 RX_CALC_IDX0
X0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Name RESV
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EO
US L
Name RX_CALI_IDX0
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit(s) Name Description
31:16 RESV Reserved
15:0 RX_CALI_IDX0 Rx CPU RXD Index 0
Points to the next RXD the CPU will allocate to RXD Ring 0.
(If enable desc_5dw_info_en, 8-DWORD aligned address, else 4-DWORD
om N
aligned address).
x.c DE
0000000
1000410C FS_DRX_IDX0 FS_DRX_IDX0
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset 0
ne FI 0 0 0 0 0 0
RESV[23:8]
0
RO
0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
syn ON
Name RESV[7:0] RX_DRX_IDX0
Type RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
aligned address).
an E
4C00010
rw IAT
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
PDMA_GLO_ 0000045
10004204 PDMA_GLO_CFG
CFG 0
EO
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
US L
RX_ CL
BY
2B_ KG
TE_
Name OF AT RESV[16:4]
.tw TIA
SW
FSE E_B
AP
T YP
Type RW RO RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
des TX_ RX_ TX_
mul sha des BIG RX_ TX_
c_5 WB DM DM
ti_d re_f c_3 _EN WPDMA_B DM DM
om N
Name RESV[3:0] dw_ _D A_ A_
ma ifo_ 2b_ DIA T_SIZE A_E A_E
info DO BU BU
_en en en N N N
_en NE SY SY
Type RO RW RW RW RW RW RW RW RO RW RO RW
x.c DE
Reset 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0
1: Enable
10 multi_dma_en
rw IAT
9 share_fifo_en
8 desc_32b_en Support 32 Byte alignment descriptor
Enables support for 32 Byte alignment PDMA descriptors.
0: Disable
1: Enable
7 BIG_ENDIAN Selects the Endian mode for the SoC platform section.
far D
DMA applies the endian rule to convert payload and Tx/Rx information. DMA
does not apply the endian rule to registers or descriptors.
0: Little endian
R ME
1: Big endian
6 TX_WB_DDONE Tx Write Back DDONE
Enables TX_DMA writing back DDONE into TXD.
0: Disable
1: Enable
5:4 WPDMA_BT_SIZE PDMA Burst Size
Defines the burst size of PDMA.
0 : 4 DWORD (16bytes).
1 : 8 DWORD (32 bytes).
2 : 16 DWORD (64 bytes).
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
3 : 32 DWORD (128 bytes)
3 RX_DMA_BUSY 1 : RX_DMA is busy. 0 : RX_DMA is not busy
EO
US L
2 RX_DMA_EN Rx DMA Enable
Enables Rx DMA. When disabled, Rx DMA finishes the current receiving
packet, and then stops.
.tw TIA
0: Disable
1: Enable
1 TX_DMA_BUSY Indicates whether Tx DMA is busy.
0: Not busy
1: Busy
0 TX_DMA_EN Tx DMA Enable
om N
Enables Tx DMA. When disabled, Tx DMA finishes the current sending
packet, and then stops.
x.c DE
0: Disable
1: Enable
PDMA_RST_I
ne FI 0000000
10004208 PDMA_RST_IDX
DX 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV[31:16]
syn ON
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RESV[15:0]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
C
DELAY_INT_C 0000000
1000420C DELAY_INT_CFG
FG 0
rw IAT
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
TX
DL
Name Y_I TXMAX_PINT TXMAX_PTIME
NT_
EN
Type RW RW RW
far D
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RX
R ME
DL
Name Y_I RXMAX_PINT RXMAX_PTIME
NT_
EN
Type RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
1: Enable
30:24 TXMAX_PINT Tx Maximum Pending Interrupts
EO
US L
Specifies the maximum number of pending interrupts. When the number of
pending interrupts is equal to or greater than the value specified here or the
interrupt pending time has reached the limit (see below), a final TX_DLY_INT
.tw TIA
is generated.
0: Disable this feature.
23:16 TXMAX_PTIME Tx Maximum Pending Time
Specifies the maximum pending time for the internal TX_DONE_INT0 and
TX_DONE_INT1. When the pending time is equal to or greater than
TXMAX_PTIME x 20us or the number of pended TX_DONE_INT0 and
TX_DONE_INT1 is equal to or greater than TXMAX_PINT (see above), a
om N
final TX_DLY_INT is generated
0: Disable this feature.
x.c DE
15 RXDLY_INT_EN Rx Delay Interrupt Enable
Enables the Rx delayed interrupt mechanism.
0: Disable
1: Enable
14:8 RXMAX_PINT Rx Maximum Pending Interrupts
ne FI Specifies the maximum number of pending interrupts. When the number of
pended interrupts is equal to or greater than the value specified here or the
interrupt pending time has reached the limit (see below), a final RX_DLY_INT
is generated.
syn ON
0: Disable this feature.
7:0 RXMAX_PTIME Rx Maximum Pending Time
Specifies the maximum pending time for the internal RX_DONE_INT. When
the pending time is equal to or greater than RXMAX_PTIME x 20 us, or the
number of pended RX_DONE_INT is equal to or greater than RXMAX_PCNT
C
PDMA_Q_CF 0000000
10004210 PDMA_Q_CFG
G 0
an E
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV[27:12]
rw IAT
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RESV[11:0] RST_DRX_IDX1
Type RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
far D
3:0 RST_DRX_IDX1 Will stop to block interface as RX-descriptors reach this threshold
PDMA_INT_S 0000000
10004220 PDMA_INT_STA
TA 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
RX_ RX_ TX_ TX_ RX_
CO DL CO DL DO
Name RESV1
HE Y_I HE Y_I NE_
RE NT RE NT INT
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
NT NT
Type RW RW RW RW RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EO
US L
TX_
DO
Name RESV
NE_
.tw TIA
INT
Type RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
Asserts when the Rx DMA is ready to handle a queue, but cannot access the
queue because the driver is not ready.
30 RX_DLY_INT Rx Delay Interrupt
x.c DE
Asserts when the number of pended Rx interrupts has reached a specified
level, or when the pending time is reached. Configure this interrupt using the
DELAY_INT_CFG register.
29 TX_COHERENT Tx Coherent Interrupt
ne FI Asserts when the Tx DMA is ready to handle a queue, but cannot access the
queue because the driver is not ready.
28 TX_DLY_INT Tx Delay Interrupt
Asserts when the number of pended Tx interrupts has reached a specified
syn ON
level, or when the pending time is reached. Configure this interrupt using the
DELAY_INT_CFG register.
27:17 RESV1
16 RX_DONE_INT Rx Queue 0 Done Interrupt
Asserts when an Rx packet is received on Queue 0.
C
15:1 RESV
0 TX_DONE_INT Tx Queue 0 Done Interrupt
Asserts when a Tx Queue 0 packet is transmitted.
g@ K
an E
PDMA_INT_M 0000000
10004228 PDMA_INT_MSK
SK 0
rw IAT
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
TX_
RX_
RX_ CO TX_ RX_
CO
DL HE DL DO
HE
Name Y_I RE Y_I RESV1 NE_
RE
NT_ NT_ NT_ INT
NT_
EN INT EN _EN
EN
far D
_EN
Type RW RW RW RW RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R ME
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TX_
DO
Name RESV NE_
INT
_EN
Type RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
the driver is not ready.
30 RX_DLY_INT_EN Masks the Rx Delay interrupt. This interrupt asserts when the number of
EO
pending Rx interrupts has reached a specified level, or when the
US L
pending time is reached.
29 TX_COHERENT_IN Masks the Tx Coherent interrupt. This interrupt asserts when the Tx
.tw TIA
T_EN DMA is ready to handle a queue, but cannot access the queue because
the driver is not ready.
28 TX_DLY_INT_EN Masks the Tx Delay interrupt. This interrupt asserts when the number of
pending Tx interrupts has reached a specified level, or when the
pending time is reached.
27:17 RESV1
om N
16 RX_DONE_INT_EN Masks the Rx Queue 0 Done interrupt. This interrupt asserts when an Rx
packet is received on Queue 0.
x.c DE
15:1 RESV
0 TX_DONE_INT_EN Masks the Tx Queue 0 Done interrupt. This interrupt asserts when a Tx
packet is transmitted on Queue 0.
ne FI
syn ON
C
g@ K
an E
rw IAT
far D
R ME
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
EO
US L
.tw TIA
om N
x.c DE
ne FI
syn ON
C
g@ K
an E
rw IAT
far D
R ME
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.17 PWM (Pulse Width Modulation)
EO
2.17.1 Registers
US L
PWM Changes LOG
.tw TIA
Revision Date Author Change Log
1 2013/11/26 Rick Ho Initial Version
om N
Address Name Widt Register Function
h
10005000 PWM_ENABLE 32 PWM Enable register
x.c DE
10005010 PWM0_CON 32 PWM0 Control register
1000501C
ne FI
PWM0_GDURA
TION 32 PWM0 Guard Duration register
PWM0_SEND_
10005030 32 PWM0 Send Data0 register
syn ON
DATA0
PWM1_LDURA
10005058 TION 32 PWM1 Low Duration register
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
PWM2_LDURA
10005098 TION 32 PWM2 Low Duration register
EO
TION
US L
PWM2_SEND_
100050B0 DATA0 32 PWM2 Send Data0 register
.tw TIA
100050B4 PWM2_SEND_ 32 PWM2 Send Data1 register
DATA1
PWM2_WAVE_
100050B8 NUM 32 PWM2 Wave Number register
om N
100050C0 H 32 PWM2 Thresh register
x.c DE
WAVENUM
100050D0 PWM3_CON 32 PWM3 Control register
PWM_EN_STA
1000520C TUS 32 PWM Enable Status register
rw IAT
PWM_ENABL 0000000
10005000 PWM Enable register
E 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV[27:12]
far D
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R ME
PW PW PW PW
Name RESV[11:0] M3_ M2_ M1_ M0_
EN EN EN EN
Type RO RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
2 PWM2_EN 0: disabe PWM2
1: enable PWM2
EO
US L
1 PWM1_EN 0: disabe PWM1
1: enable PWM1
0 PWM0_EN 0: disabe PWM0
.tw TIA
1: enable PWM0
00007E0
10005010 PWM0_CON PWM0 Control register
0
om N
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV0
Type RO
x.c DE
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
OL
GU
D_P IDL
AR CL
WM E_V
Name STOP_BITPOS D_V RESV1 KS CLKDIV
_M
OD
E
ne FI AL
UE
AL
UE
EL
Type RW RW RW RW RO RW RW
Reset 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0
syn ON
0: CLK= 100KHz
1: CLK= 40MHz
2:0 CLKDIV Select PWM0 clock scale.
000: CLK Hz
001: CLK/2 Hz
010: CLK/4 Hz
011: CLK/8 Hz
far D
100: CLK/16 Hz
101: CLK/32 Hz
R ME
110: CLK/64 Hz
111: CLK/128 Hz
PWM0_HDUR 0000000
10005014 PWM0 High Duration register
ATION 1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name HDURATION
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
EO
US L
Bit(s) Name Description
.tw TIA
31:16 RESV RESERVED
15:0 HDURATION PWM0 pulse duration based on the current clock when PWM output is
high. If duration =N, need to program N-1 in this register.
Note: The duration of PWM must not be 0.
om N
PWM0_LDUR 0000000
10005018 PWM0 Low Duration register
ATION 1
x.c DE
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name
Type
Reset 0
ne FI 0 0 0 0 0 0
LDURATION
0
RW
0 0 0 0 0 0 0 1
syn ON
Bit(s) Name Description
31:16 RESV RESERVED
15:0 LDURATION PWM0 pulse duration based on the current clock when PWM output is
low. If duration =N, need to program N-1 in this register.
Note: The duration of PWM must not be 0.
C
g@ K
PWM0_GDUR 0000000
1000501C PWM0 Guard Duration register
ATION 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
an E
Name RESV
Type RO
rw IAT
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GUARD_DURATION
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
PWM0_SEND 0000000
10005030 PWM0 Send Data0 register
_DATA0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SEND_DATA0[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Name SEND_DATA0[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
US L
Bit(s) Name Description
31:0 SEND_DATA0 PWM0 local buffer0 of pulse sequence data to be generated.
.tw TIA
Note: This value should be written only in periodically FIFO mode. In other
mode, this buffer is for internal memory access.
PWM0_SEND 0000000
10005034 PWM0 Send Data1 register
_DATA1 0
om N
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SEND_DATA1[31:16]
x.c DE
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SEND_DATA1[15:0]
Type RW
Reset 0ne FI 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
PWM0_WAVE 0000000
10005038 PWM0 Wave Number register
_NUM 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
g@ K
Name RESV
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
an E
Name WAVE_NUM
Type RW
rw IAT
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
PWM0_DATA 0000000
1000503C PWM0 Data Width register
_WIDTH 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV[18:3]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RESV[2:0] DATA_WIDTH
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Type RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
Bit(s) Name Description
US L
31:13 RESV RESERVED
12:0 DATA_WIDTH The PWM0 pulse data width in the old PWM mode.
.tw TIA
PWM0_THRE 0000000
10005040 PWM0 Thresh register
SH 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
om N
Name RESV[18:3]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
x.c DE
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RESV[2:0] THRESH
Type RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit(s)
31:13
ne FI
Name
RESV
Description
RESERVED
12:0 THRESH The PWM0 pulse data high/low switching threshold in the old PWM
syn ON
mode.
PWM0_SEND 0000000
10005044 PWM0 Send Wave Number register
_WAVENUM 0
C
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV
Type RO
g@ K
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SEND_WAVENUM
an E
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
rw IAT
00007E0
10005050 PWM1_CON PWM1 Control register
R ME
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV0
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
OL
GU
D_P IDL
AR CL
WM E_V
Name _M
STOP_BITPOS D_V
AL
RESV1 KS CLKDIV
AL EL
OD UE
UE
E
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Type RW RW RW RW RO RW RW
Reset 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0
EO
Bit(s) Name Description
US L
31:16 RESV0 RESERVED
15 OLD_PWM_MODE Use old PWM mode
.tw TIA
Note: Using old PWM mode also means periodical mode. So SRCSEL and
MODE is ignored in this situation. Only old PWM mode with 32 KHz clock
source (however could not work in the system sleep-mode).
0: New PWM mode
1: Old PWM mode
14:9 STOP_BITPOS Note: Using old PWM mode also means periodical mode. So SRCSEL
om N
and MODE is ignored in this situation. Only old PWM mode with 32 KHz
clock source (however could not work in the system sleep-mode).
8 GUARD_VALUE PWM1 output value when guard time.
x.c DE
7 IDLE_VALUE PWM1 output value when idle state.
6:4 RESV1 Select Random Generator mode
3 CLKSEL Select PWM1 clock
0: CLK= 100KHz
2:0
ne FI
CLKDIV
1: CLK= 40MHz
Select PWM1 clock scale.
000: CLK Hz
syn ON
001: CLK/2 Hz
010: CLK/4 Hz
011: CLK/8 Hz
100: CLK/16 Hz
101: CLK/32 Hz
110: CLK/64 Hz
111: CLK/128 Hz
C
g@ K
PWM1_HDUR 0000000
10005054 PWM1 High Duration register
ATION 1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
an E
Name RESV
Type RO
rw IAT
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name HDURATION
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
PWM1_LDUR 0000000
10005058 PWM1 Low Duration register
ATION 1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV
Type RO
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name LDURATION
Type RW
EO
US L
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
.tw TIA
31:16 RESV RESERVED
15:0 LDURATION PWM1 pulse duration based on the current clock when PWM output is
low. If duration =N, need to program N-1 in this register.
Note: The duration of PWM must not be 0.
om N
PWM1_GDUR 0000000
1000505C PWM1 Guard Duration register
x.c DE
ATION 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit
Name
Type
15ne FI14 13 12 11 10 9 8
GUARD_DURATION
RW
7 6 5 4 3 2 1 0
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
syn ON
Bit(s) Name Description
31:16 RESV RESERVED
15:0 GUARD_DURATIO
N
C
g@ K
PWM1_SEND 0000000
10005070 PWM1 Send Data0 register
_DATA0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
an E
Name SEND_DATA0[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
rw IAT
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SEND_DATA0[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
PWM1_SEND 0000000
10005074 PWM1 Send Data1 register
_DATA1 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SEND_DATA1[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Name SEND_DATA1[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
US L
Bit(s) Name Description
31:0 SEND_DATA1 PWM1 local buffer0 of pulse sequence data to be generated.
.tw TIA
Note: This value should be written only in periodically FIFO mode. In other
mode, this buffer is for internal memory access.
PWM1_WAVE 0000000
10005078 PWM1 Wave Number register
_NUM 0
om N
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV
x.c DE
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name WAVE_NUM
Type RW
Reset 0ne FI 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
PWM1_DATA 0000000
1000507C PWM1 Data Width register
g@ K
_WIDTH 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV[18:3]
an E
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw IAT
12:0 DATA_WIDTH The PWM1 pulse data width in the old PWM mode.
R ME
PWM1_THRE 0000000
10005080 PWM1 Thresh register
SH 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV[18:3]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RESV[2:0] THRESH
Type RO RW
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
31:13 RESV RESERVED
US L
12:0 THRESH The PWM1 pulse data high/low switching threshold in the old PWM
mode.
.tw TIA
PWM1_SEND 0000000
10005084 PWM1 Send Wave Number register
_WAVENUM 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
om N
Name RESV
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
x.c DE
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SEND_WAVENUM
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit(s)
31:16
ne FI
Name
RESV
Description
RESERVED
15:0 SEND_WAVENUM The number by which PWM1 has already generated from the specified
syn ON
data source in the periodical mode.
00007E0
10005090 PWM2_CON PWM2 Control register
0
C
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV0
Type RO
g@ K
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
OL
GU
an E
D_P IDL
AR CL
WM E_V
Name STOP_BITPOS D_V RESV1 KS CLKDIV
_M AL
AL EL
rw IAT
OD UE
UE
E
Type RW RW RW RW RO RW RW
Reset 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0
MODE is ignored in this situation. Only old PWM mode with 32 KHz clock
source (however could not work in the system sleep-mode).
0: New PWM mode
1: Old PWM mode
14:9 STOP_BITPOS Note: Using old PWM mode also means periodical mode. So SRCSEL
and MODE is ignored in this situation. Only old PWM mode with 32 KHz
clock source (however could not work in the system sleep-mode).
8 GUARD_VALUE PWM2 output value when guard time.
7 IDLE_VALUE PWM2 output value when idle state.
6:4 RESV1 Select Random Generator mode
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
3 CLKSEL Select PWM2 clock
0: CLK= 100KHz
EO
1: CLK= 40MHz
US L
2:0 CLKDIV Select PWM2 clock scale.
000: CLK Hz
.tw TIA
001: CLK/2 Hz
010: CLK/4 Hz
011: CLK/8 Hz
100: CLK/16 Hz
101: CLK/32 Hz
110: CLK/64 Hz
111: CLK/128 Hz
om N
x.c DE
PWM2_HDUR 0000000
10005094 PWM2 High Duration register
ATION 1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV
Type
Reset
Bit
0
15
ne FI 0
14
0
13
0
12
0
11
0
10
0
9
0
8
RO
0
7
0
6
0
5
0
4
0
3
0
2 1
0 0
0
Name HDURATION
syn ON
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
15:0 HDURATION PWM2 pulse duration based on the current clock when PWM output is
high. If duration =N, need to program N-1 in this register.
Note: The duration of PWM must not be 0.
g@ K
an E
PWM2_LDUR 0000000
10005098 PWM2 Low Duration register
ATION 1
rw IAT
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name LDURATION
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
far D
PWM2_GDUR 0000000
1000509C PWM2 Guard Duration register
ATION 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Name RESV
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EO
US L
Name GUARD_DURATION
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit(s) Name Description
31:16 RESV RESERVED
15:0 GUARD_DURATIO
N
om N
x.c DE
PWM2_SEND 0000000
100050B0 PWM2 Send Data0 register
_DATA0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SEND_DATA0[31:16]
Type RW
Reset
Bit
Name
0
15
ne FI 0
14
0
13
0
12
0
11
0
10
0
9
0
8
0 0
SEND_DATA0[15:0]
7 6
0
5
0
4
0
3
0
2 1
0 0
0
Type RW
syn ON
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
PWM2_SEND 0000000
100050B4 PWM2 Send Data1 register
_DATA1 0
an E
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SEND_DATA1[31:16]
Type RW
rw IAT
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SEND_DATA1[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
PWM2_WAVE 0000000
100050B8 PWM2 Wave Number register
_NUM 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Name WAVE_NUM
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
US L
Bit(s) Name Description
31:16 RESV RESERVED
.tw TIA
15:0 WAVE_NUM The number by which PWM2 will generate from the pulse data
repeatedly.
Note: If WAVE_NUM=0, the waveform generation will not stop until it is
disabled.
om N
PWM2_DATA 0000000
100050BC PWM2 Data Width register
_WIDTH 0
x.c DE
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV[18:3]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name
Type
Reset 0
ne FI
RESV[2:0]
RO
0 0 0 0 0 0 0 0
DATA_WIDTH
RW
0 0 0 0 0 0 0
syn ON
Bit(s) Name Description
31:13 RESV RESERVED
12:0 DATA_WIDTH The PWM2 pulse data width in the old PWM mode.
C
PWM2_THRE 0000000
100050C0 PWM2 Thresh register
SH 0
g@ K
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV[18:3]
Type RO
an E
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name
rw IAT
RESV[2:0] THRESH
Type RO RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
12:0 THRESH The PWM2 pulse data high/low switching threshold in the old PWM
mode.
R ME
PWM2_SEND 0000000
100050C4 PWM2 Send Wave Number register
_WAVENUM 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SEND_WAVENUM
Type RO
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
31:16 RESV RESERVED
US L
15:0 SEND_WAVENUM The number by which PWM2 has already generated from the specified
data source in the periodical mode.
.tw TIA
00007E0
100050D0 PWM3_CON PWM3 Control register
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
om N
Name RESV0
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
x.c DE
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
OL
GU
D_P IDL
AR CL
WM E_V
Name STOP_BITPOS D_V RESV1 KS CLKDIV
_M AL
AL EL
ODne FI UE
UE
E
Type RW RW RW RW RO RW RW
Reset 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0
syn ON
Bit(s) Name Description
31:16 RESV0 RESERVED
15 OLD_PWM_MODE Use old PWM mode
Note: Using old PWM mode also means periodical mode. So SRCSEL and
C
MODE is ignored in this situation. Only old PWM mode with 32 KHz clock
source (however could not work in the system sleep-mode).
0: New PWM mode
1: Old PWM mode
g@ K
14:9 STOP_BITPOS Note: Using old PWM mode also means periodical mode. So SRCSEL
and MODE is ignored in this situation. Only old PWM mode with 32 KHz
clock source (however could not work in the system sleep-mode).
an E
000: CLK Hz
001: CLK/2 Hz
010: CLK/4 Hz
R ME
011: CLK/8 Hz
100: CLK/16 Hz
101: CLK/32 Hz
110: CLK/64 Hz
111: CLK/128 Hz
PWM3_HDUR 0000000
100050D4 PWM3 High Duration register
ATION 1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Name RESV
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EO
US L
Name HDURATION
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
.tw TIA
Bit(s) Name Description
31:16 RESV RESERVED
15:0 HDURATION PWM3 pulse duration based on the current clock when PWM output is
high. If duration =N, need to program N-1 in this register.
Note: The duration of PWM must not be 0.
om N
x.c DE
PWM3_LDUR 0000000
100050D8 PWM3 Low Duration register
ATION 1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV
Type
Reset
Bit
0
15
ne FI 0
14
0
13
0
12
0
11
0
10
0
9
0
8
RO
0
7
0
6
0
5
0
4
0
3
0
2 1
0 0
0
Name LDURATION
syn ON
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
15:0 LDURATION PWM3 pulse duration based on the current clock when PWM output is
low. If duration =N, need to program N-1 in this register.
Note: The duration of PWM must not be 0.
g@ K
an E
PWM3_GDUR 0000000
100050DC PWM3 Guard Duration register
ATION 0
rw IAT
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name GUARD_DURATION
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
far D
PWM3_SEND 0000000
100050F0 PWM3 Send Data0 register
_DATA0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SEND_DATA0[31:16]
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SEND_DATA0[15:0]
EO
US L
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit(s) Name Description
31:0 SEND_DATA0 PWM3 local buffer0 of pulse sequence data to be generated.
Note: This value should be written only in periodically FIFO mode. In other
mode, this buffer is for internal memory access.
om N
PWM3_SEND 0000000
100050F4 PWM3 Send Data1 register
_DATA1 0
x.c DE
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name SEND_DATA1[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15ne FI14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SEND_DATA1[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
syn ON
Bit(s) Name Description
31:0 SEND_DATA1 PWM3 local buffer0 of pulse sequence data to be generated.
Note: This value should be written only in periodically FIFO mode. In other
mode, this buffer is for internal memory access.
C
PWM3_WAVE 0000000
100050F8 PWM3 Wave Number register
g@ K
_NUM 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
an E
RESV
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
rw IAT
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name WAVE_NUM
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
PWM3_DATA 0000000
100050FC PWM3 Data Width register
_WIDTH 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV[18:3]
Type RO
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RESV[2:0] DATA_WIDTH
Type RO RW
EO
US L
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
31:13 RESV RESERVED
12:0 DATA_WIDTH The PWM3 pulse data width in the old PWM mode.
PWM3_THRE 0000000
om N
10005100 PWM3 Thresh register
SH 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
x.c DE
Name RESV[18:3]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RESV[2:0] THRESH
Type
Reset 0
ne FI
RO
0 0 0 0 0 0 0 0
RW
0 0 0 0 0 0 0
PWM3_SEND 0000000
10005104 PWM3 Send Wave Number register
_WAVENUM 0
g@ K
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV
Type RO
an E
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SEND_WAVENUM
rw IAT
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
PWM_EN_ST 0000000
1000520C PWM Enable Status register
ATUS 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RESV[27:12]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PW PW PW PW
Name RESV[11:0]
M3_ M2_ M1_ M0_
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
EN_ EN_ EN_ EN_
ST ST ST ST
Type RO RO RO RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
US L
Bit(s) Name Description
.tw TIA
31:4 RESV RESERVED
3 PWM3_EN_ST PWM3 enable status
2 PWM2_EN_ST PWM2 enable status
1 PWM1_EN_ST PWM1 enable status
0 PWM0_EN_ST PWM0 enable status
om N
x.c DE
ne FI
syn ON
C
g@ K
an E
rw IAT
far D
R ME
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.18 Frame Engine
EO
2.18.1 Registers
US L
SDM Changes LOG
.tw TIA
Revision Date Author Change Log
0.1 2013/5/27 PeterCT WU Initialization
om N
Address Name Widt Register Function
h
10100800 TX_BASE_PTR 32 TX Ring #0 Base Pointer
x.c DE
_0
TX_MAX_CNT_
10100804 0 32 TX Ring #0 Maximum Count
10100808 TX_CTX_IDX_0 32 TX Ring #0 CPU pointer
1010080C TX_DTX_IDX_0
ne FI 32 TX Ring #0 DMA poitner
TX_MAX_CNT_
10100824 2 32 TX Ring #2 Maximum Count
TX_MAX_CNT_
10100834 3 32 TX Ring #3 Maximum Count
rw IAT
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
G
10100A10 FREEQ_THRES 32 Free Queue Threshold
10100A20 INT_STATUS 32 Interrupt Status
EO
US L
10100A28 INT_MASK 32 Interrupt Mask
10100A80 PDMA_SCH 32 Scheduler Configuration for Q0&Q1
.tw TIA
10100A84 PDMA_WRR 32 Scheduler Configuration for Q2&Q3
10100C00 SDM_CON 32 Switch DMA Control
10100C04 SDM_RING 32 Switch DMA Rx Ring
10100C08 SDM_TRING 32 Switch DMA TX Ring
SDM_MAC_AD
10100C0C RL 32 Switch MAC Address LSB
om N
10100C10 SDM_MAC_AD 32 Switch MAC Address MSB
RH
10100D00 SDM_TPCNT 32 Switch DMA Tx Packet Count
x.c DE
10100D04 SDM_TBCNT 32 Switch DMA TX Byte Count
10100D08 SDM_RPCNT 32 Switch DMA RX Packet Count
10100D0C SDM_RBCNT 32 Switch DMA RX Byte Count
10100D10 SDM_CS_ERR
ne FI 32 Switch DMA RX Checksum Error
syn ON
TX_BASE_PT 0000000
10100800 TX Ring #0 Base Pointer
R_0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name TX_BASE_PTR[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
C
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TX_BASE_PTR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
g@ K
31:0 TX_BASE_PTR Point to the base address of TX Ring #0 (4-DW aligned address)
rw IAT
TX_MAX_CNT 0000000
10100804 TX Ring #0 Maximum Count
_0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
far D
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name
R ME
TX_MAX_CNT
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
EO
Type
US L
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
.tw TIA
Name TX_CTX_IDX
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0
om N
x.c DE
TX_DTX_IDX_ 0000000
1010080C TX Ring #0 DMA poitner
0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
Bit
Name
15
ne FI14 13 12 11 10 9 8 7 6
TX_DTX_IDX
5 4 3 2 1 0
Type RO
syn ON
Reset 0 0 0 0 0 0 0 0 0 0 0 0
TX_BASE_PT 0000000
10100810 TX Ring #1 Base Pointer
R_1 0
g@ K
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name TX_BASE_PTR[31:16]
an E
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw IAT
Name TX_BASE_PTR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
TX_MAX_CNT 0000000
10100814 TX Ring #1 Maximum Count
_1 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TX_MAX_CNT
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
11:0 TX_MAX_CNT The maximum number of TXD count in TX Ring #0
EO
US L
TX_CTX_IDX_ 0000000
.tw TIA
10100818 TX Ring #1 CPU pointer
1 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
om N
Name TX_CTX_IDX
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0
x.c DE
Bit(s) Name Description
11:0 TX_CTX_IDX Point to the next TXD CPU wants to use
1010081C
ne FI
TX_DTX_IDX_
TX Ring #1 DMA poitner
0000000
1 0
syn ON
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TX_DTX_IDX
C
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0
TX_BASE_PT 0000000
rw IAT
Name TX_BASE_PTR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R ME
TX_MAX_CNT 0000000
10100824 TX Ring #2 Maximum Count
_2 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TX_MAX_CNT
EO
US L
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit(s) Name Description
11:0 TX_MAX_CNT The maximum number of TXD count in TX Ring #0
TX_CTX_IDX_ 0000000
om N
10100828 TX Ring #2 CPU pointer
2 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
x.c DE
Name
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TX_CTX_IDX
Type RW
Reset
ne FI 0 0 0 0 0 0 0 0 0 0 0 0
TX_DTX_IDX_ 0000000
1010082C TX Ring #2 DMA poitner
C
2 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
g@ K
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TX_DTX_IDX
an E
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0
rw IAT
TX_BASE_PT 0000000
10100830 TX Ring #3 Base Pointer
R_3 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R ME
Name TX_BASE_PTR[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TX_BASE_PTR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
TX_MAX_CNT 0000000
EO
10100834 TX Ring #3 Maximum Count
US L
_3 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
.tw TIA
Name
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TX_MAX_CNT
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0
om N
Bit(s) Name Description
x.c DE
11:0 TX_MAX_CNT The maximum number of TXD count in TX Ring #0
TX_CTX_IDX_ 0000000
10100838 TX Ring #3 CPU pointer
Bit
Name
31
ne FI
3
30 29 28 27 26 25 24 23 22 21 20 19 18 17
0
16
Type
syn ON
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TX_CTX_IDX
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0
C
TX_DTX_IDX_ 0000000
an E
Name
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TX_DTX_IDX
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0
far D
RX_BASE_PT 0000000
10100900 RX Ring #0 Base Pointer
R_0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RX_BASE_PTR[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Name RX_BASE_PTR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
US L
Bit(s) Name Description
31:0 RX_BASE_PTR Point to the base address of RX Ring #0 (4-DW aligned address)
.tw TIA
RX_MAX_CNT 0000000
10100904 RX Ring #0 Maximum Count
_0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
om N
Name
Type
Reset
x.c DE
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TX_MAX_CNT
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0
Bit(s)
11:0
ne FI
Name
TX_MAX_CNT
Description
The maximum number of RXD count in RX Ring #0
syn ON
RX_CRX_IDX_ 0000000
10100908 RX Ring #0 CPU pointer
0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
C
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TX_CTX_IDX
g@ K
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0
an E
RX_DRX_IDX_ 0000000
1010090C RX Ring #0 DMA poitner
0 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
far D
Name
Type
Reset
R ME
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RX_DRX_IDX
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
RX_BASE_PT 0000000
10100910 RX Ring #1 Base Pointer
R_1 0
EO
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
US L
Name RX_BASE_PTR[31:16]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RX_BASE_PTR[15:0]
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
31:0 RX_BASE_PTR Point to the base address of RX Ring #0 (4-DW aligned address)
x.c DE
RX_MAX_CNT 0000000
10100914 RX Ring #1 Maximum Count
_1 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
ne FI
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
syn ON
Name TX_MAX_CNT
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0
RX_CRX_IDX_ 0000000
10100918 RX Ring #1 CPU pointer
1 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
an E
Name
Type
rw IAT
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TX_CTX_IDX
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0
RX_DRX_IDX_ 0000000
1010091C RX Ring #1 DMA poitner
1 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RX_DRX_IDX
Type RO
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Reset 0 0 0 0 0 0 0 0 0 0 0 0
EO
11:0 RX_DRX_IDX Point to the next RXD DMA wants to use
US L
.tw TIA
1C00020
10100A00 PDMA_INFO PDMA Information
4
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name INDEX_WIDTH BASE_PTR_WIDTH
Type RO RO
om N
Reset 1 1 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RX_RING_NUM TX_RING_NUM
x.c DE
Type RO RO
Reset 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0
PDMA_GLO_ 0000005
10100A04 PDMA Global Configuration
CFG 0
g@ K
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name HDR_SEG_LEN
Type RW
Reset
an E
0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TX_ RX_ TX_
BIG RX_ TX_
rw IAT
WB DM DM
_EN PDMA_BT DM DM
Name _D A_ A_
DIA _SIZE A_E A_E
DO BU BU
N N N
NE SY SY
Type RW RW RW RO RW RO RW
Reset 0 1 0 1 0 0 0 0
far D
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
2: 16 DWORDs (64-bytes)
3: Reserved
EO
3 RX_DMA_BUSY 0: RX_DMA is not busy
US L
1: RX_DMA is busy
2 RX_DMA_EN 0: Diable RX_DMA (when disabled, RX_DMA will finish the current receiving
.tw TIA
packet, then stop)
1: Enable RX_DMA
1 TX_DMA_BUSY 0: TX_DMA is not busy
1: TX_DMA is busy
0 TX_DMA_EN 0: Disable TX_DMA (when disabled, TX_DMA will finish the current sending
packet, then stop)
om N
1: Enable TX_DMA
x.c DE
DELAY_INT_C 0000000
10100A0C Delay Interrupt Configuration
FG 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
TX
DL
ne FI
Y_I TXMAX_PINT TXMAX_PTIME
NT_
EN
syn ON
Type RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RX
DL
Name Y_I RXMAX_PINT RXMAX_PTIME
C
NT_
EN
Type RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
g@ K
When the pending time is equal or greater than TXMAX_PTIME x 20us or the
number of pended TX_DONE is equal or greater than TXMAX_PINT 9see
above), an final TX_DLY_INT is generated.
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
number of pended RX_DONE is equal or greater than RXMAX_PINT 9see
above), an finalRX_DLY_INT is generated.
EO
[Note] reset to 0 can disable pending interrupt time check.
US L
.tw TIA
FREEQ_THRE 0000000
10100A10 Free Queue Threshold
S 2
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
om N
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name FREEQ_THRES
Type RW
x.c DE
Reset 0 0 1 0
C C C C C C
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TX_ TX_ TX_ TX_
an E
DO DO DO DO
Name NE_ NE_ NE_ NE_
rw IAT
31 RX_COHERENT RX_DMA finds data coherent event while checking ddone bit.
30 RX_DLY_INT Summary of the whole PDMA Rx related interrupts.
R ME
29 TX_COHERENT TX_DMA finds data coherent event while checking ddone bit.
28 TX_DLY_INT Summary of the whole PDMA Tx related interrupts.
17 RX_DONE_INT1 Rx ring #1 packet receive interrupt
16 RX_DONE_INT0 Rx ring #0 packet receive interrupt
3 TX_DONE_INT3 Tx ring #3 packet transmit interrupt
2 TX_DONE_INT2 Tx ring #2 packet transmit interrupt
1 TX_DONE_INT1 Tx ring #1 packet transmit interrupt
0 TX_DONE_INT0 Tx ring #0 packet transmit interrupt
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0000000
10100A28 INT_MASK Interrupt Mask
0
EO
US L
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
RX_ TX_ RX_ RX_
RX_ TX_
.tw TIA
CO CO DO DO
DL DL
Name HE
Y_I
HE
Y_I
NE_ NE_
RE RE INT INT
NT NT
NT NT 1 0
Type RW RW RW RW RW RW
Reset 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TX_ TX_ TX_ TX_
om N
DO DO DO DO
Name NE_ NE_ NE_ NE_
INT INT INT INT
x.c DE
3 2 1 0
Type RW RW RW RW
Reset 0 0 0 0
1: Enable interrupt
3 TX_DONE_INT3 Tx ring #3 packet transmit interrupt
0: Disable interrupt
1: Enable interrupt
2 TX_DONE_INT2 Tx ring #2 packet transmit interrupt
0: Disable interrupt
far D
1: Enable interrupt
1 TX_DONE_INT1 Tx ring #1 packet transmit interrupt
R ME
0: Disable interrupt
1: Enable interrupt
0 TX_DONE_INT0 Tx ring #0 packet transmit interrupt
0: Disable interrupt
1: Enable interrupt
0000000
10100A80 PDMA_SCH Scheduler Configuration for Q0&Q1
0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
SCH_MOD
Name E
Type RW
EO
Reset
US L
0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name
.tw TIA
Type
Reset
om N
01: Strict priority, Q3>Q2,Q1>Q0
10: Mixed mode, Q3>WRR(Q2,Q1,Q0)
11: Mixed mode, Q3>Q2>WRR(Q1,Q0)
x.c DE
0000000
10100A84 PDMA_WRR Scheduler Configuration for Q2&Q3
0
Bit
Name
31
ne FI 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Type
Reset
syn ON
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name SCH_WT_Q3 SCH_WT_Q2 SCH_WT_Q1 SCH_WT_Q0
Type RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0
C
0007810
10100C00 SDM_CON Switch DMA Control
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
UN
PO
PD LO TC _D UD TC
RT_ IPC
Name REV0 MA
MA
OP O_8 RO PC PC
S
_FC _EN 1xx P_E S S
far D
P
N
Type RO RW RW RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1
R ME
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name EXT_VLAN
Type RW
Reset 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
0: Disable
1: Enable
EO
22 PORT_MAP RX Ring Selection
US L
The received frame will be collected into the corresponding PDMA RX Ring
based on the source port priority tag.
.tw TIA
0: Priority Tag (SDMRRING[7:0])
1: Source Port (SDM_RRING[12:8])
21 LOOP_EN Frame Engine Loop-back Mode Enable
20 TCO_81xx Special tag Recongization Enable
When this bit is set, PDI(0x81xx) is recognized by the first byte (0x81) only.
The second byte could be used for the specilqa purpose like the incoming
om N
source port.
19 UN_DROP_EN Drop Unknonwn MAC Address
x.c DE
0: Disable
1: Enable
18 UDPCS UDP Packet Checksum RX Offload Enable
0: disable, checksum result is showed on RX descriptor
1: enable, drop checksum error packet
17 ne FI
TCPCS TCP Packet Checksum RX Offload Enable
0: disable, checksum result is showed on RX descriptor
1: enable, drop checksum error packet
syn ON
16 IPCS IP Header Checksum RX Offload Enable
0: disable, checksum result is showed on RX descriptor
1: enable, drop checksum error packet
15:0 EXT_VLAN Outer VLAN Protocol ID
The specific vlaue is used to recognize the outer VLAN protocol ID only. Per
inner VLAN or the general VLAN-tagged frame, the value PID=0x8100 is the
C
0000000
10100C04 SDM_RING Switch DMA Rx Ring
0
an E
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
QU QU QU QU
rw IAT
Type RW RW RW RW RW RW RW RW RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
18 QUE2_RING_FC Pause Switch Queue 2 by RX Ring##
When RX Ring# reaches the reserved free threshold(FREEQ_THRES), the
EO
queue 3 to CPU will be paused.
US L
1: RX Ring #0
0: RX Ring #1
.tw TIA
17 QUE1_RING_FC Pause Switch Queue 1 by RX Ring##
When RX Ring# reaches the reserved free threshold(FREEQ_THRES), the
queue 3 to CPU will be paused.
1: RX Ring #0
0: RX Ring #1
16 QUE0_RING_FC Pause Switch Queue 0 by RX Ring##
om N
When RX Ring# reaches the reserved free threshold(FREEQ_THRES), the
queue 3 to CPU will be paused.
1: RX Ring #0
x.c DE
0: RX Ring #1
12 PORT4_RING Source Port 4 to RX Ring##
The received frames from the source port 4 will be sent to RX Ring#
[Note] To use the source port, the special tag between FE and SW should be
enabled.
ne FI 1: RX Ring #0
0: RX Ring #1
11 PORT3_RING Source Port 3 to RX Ring##
syn ON
The received frames from the source port 4 will be sent to RX Ring#
[Note] To use the source port, the special tag between FE and SW should be
enabled.
1: RX Ring #0
0: RX Ring #1
10 PORT2_RING Source Port 2 to RX Ring##
C
The received frames from the source port 4 will be sent to RX Ring#
[Note] To use the source port, the special tag between FE and SW should be
enabled.
1: RX Ring #0
g@ K
0: RX Ring #1
9 PORT1_RING Source Port 1 to RX Ring##
an E
The received frames from the source port 4 will be sent to RX Ring#
[Note] To use the source port, the special tag between FE and SW should be
enabled.
rw IAT
1: RX Ring #0
0: RX Ring #1
8 PORT0_RING Source Port 0 to RX Ring##
The received frames from the source port 4 will be sent to RX Ring#
[Note] To use the source port, the special tag between FE and SW should be
enabled.
1: RX Ring #0
far D
0: RX Ring #1
7 PRI7_RING Priority 7 to RX Ring##
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
0: RX Ring #1
4 PRI4_RING Priority 4 to RX Ring##
EO
US L
The received frames with priority tag 4 will be sent to RX Ring#
1: RX Ring #0
0: RX Ring #1
.tw TIA
3 PRI3_RING Priority 3 to RX Ring##
The received frames with priority tag 3 will be sent to RX Ring#
1: RX Ring #0
0: RX Ring #1
2 PRI2_RING Priority 2 to RX Ring##
The received frames with priority tag 2 will be sent to RX Ring#
om N
1: RX Ring #0
0: RX Ring #1
x.c DE
1 PRI1_RING Priority 1to RX Ring##
The received frames with priority tag 1 will be sent to RX Ring#
1: RX Ring #0
0: RX Ring #1
0 PRI10_RING Priority 0 to RX Ring##
ne FI The received frames with priority tag 0 will be sent to RX Ring#
1: RX Ring #0
0: RX Ring #1
syn ON
0000000
10100C08 SDM_TRING Switch DMA TX Ring
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
Bit.0: WAN port Queue#0
19:16 RING0_WAN_FC Pause TX Ring 0 by WAN Port
EO
US L
TX Ring# will be paused when the corresponding switch egress queue on
WAN port is congested.
Bit.3: WAN port Queue#3
.tw TIA
Bit.2: WAN port Queue#2
Bit.1: WAN port Queue#1
Bit.0: WAN port Queue#0
15:12 RING3_LAN_FC Pause TX Ring 3 by LAN Port
TX Ring# will be paused when the corresponding switch egress queue on
WAN port is congested.
Bit.3: LAN port Queue#3
om N
Bit.2: LAN port Queue#2
Bit.1: LAN port Queue#1
x.c DE
Bit.0: LAN port Queue#0
11:8 RING2_LAN_FC Pause TX Ring 2 by LAN Port
TX Ring# will be paused when the corresponding switch egress queue on
WAN port is congested.
Bit.3: LAN port Queue#3
ne FI Bit.2: LAN port Queue#2
Bit.1: LAN port Queue#1
Bit.0: LAN port Queue#0
7:4 RING1_LAN_FC Pause TX Ring 1 by LAN Port
syn ON
TX Ring# will be paused when the corresponding switch egress queue on
WAN port is congested.
Bit.3: LAN port Queue#3
Bit.2: LAN port Queue#2
Bit.1: LAN port Queue#1
Bit.0: LAN port Queue#0
C
SDM_MAC_A 0000000
10100C0C Switch MAC Address LSB
DRL 0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name MAC_ADDR_LSB[31:16]
Type RW
far D
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name MAC_ADDR_LSB[15:0]
R ME
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
SDM_MAC_A 0000000
10100C10 Switch MAC Address MSB
DRH 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
EO
US L
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name MAC_ADDR_MSB
Type RW
.tw TIA
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
0000000
10100D00 SDM_TPCNT Switch DMA Tx Packet Count
0
x.c DE
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name TX_PCNT[31:16]
Type RC
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15ne FI14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TX_PCNT[15:0]
Type RC
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
syn ON
Bit(s) Name Description
31:0 TX_PCNT Transmit Packet Count
C
0000000
10100D04 SDM_TBCNT Switch DMA TX Byte Count
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
g@ K
Name TX_BCNT[31:16]
Type RC
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
an E
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name TX_BCNT[15:0]
Type
rw IAT
RC
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
10100D08 SDM_RPCNT Switch DMA RX Packet Count
R ME
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RX_PCNT[31:16]
Type RC
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name RX_PCNT[15:0]
Type RC
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
31:0 RX_PCNT Receive Packet Count
EO
US L
0000000
.tw TIA
10100D0C SDM_RBCNT Switch DMA RX Byte Count
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name RX_BCNT[31:16]
Type RC
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
om N
Name RX_BCNT[15:0]
Type RC
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
x.c DE
Bit(s) Name Description
31:0 RX_BCNT Receive Byte Count
10100D10
ne FI
SDM_CS_ERR Switch DMA RX Checksum Error
0000000
0
syn ON
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name CS_ERR_CNT[31:16]
Type RC
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name CS_ERR_CNT[15:0]
C
Type RC
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
2.19 Switch Controller
EO
2.19.1 Registers
US L
ESW Changes LOG
.tw TIA
Revision Date Author Change Log
0.1 2013/5/29 PeterCT WU Initialization
om N
Address Name Widt Register Function
h
10110000 ISR 32 Interrupt Status
x.c DE
10110004 IMR 32 Interrupt Mask
10110008 FCT0 32 Flow Control Threshold 0
1011000C FCT1 32 Flow Control Threshold 1
10110010 PFC0 32 Priority Flow Control 0
10110014
10110018
ne FI
PFC1
PFC2
32
32
Priority Flow Control 1
Priority Flow Control 2
1011001C GQS0 32 Global Queue Status 0
syn ON
10110020 GQS1 32 Global Queue Status 1
10110024 ATS 32 Address Table Search
10110028 ATS0 32 Address Table Status 0
1011002C ATS1 32 Address Table Status 1
C
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
10110090 POC0 32 Port Control 0
10110094 POC1 32 Port Control 1
10110098 POC2 32 Port Control 2
EO
US L
1011009C SGC 32 Switch Global Control
101100A0 STRT 32 Switch Reset
.tw TIA
101100A4 LEDP0 32 LED Port0
101100A8 LEDP1 32 LED Port1
101100AC LEDP2 32 LED Port2
101100B0 LEDP3 32 LED Port3
101100B4 LEDP4 32 LED Port4
101100B8 WDTR 32 Watch Dog Trigger Reset
om N
101100BC DES 32 Debug Signal
101100C0 PCR0 32 PHY Control Register 0
x.c DE
101100C4 PCR1 32 PHY Control Register 1
101100C8 FPA1 32 Force P5P6 Ability
101100CC FCT2 32 Flow Control Threshold 2
101100D0 QSS0 32 Queue Status 0
101100D4
101100D8
ne FI
QSS1
DEC
32
32
Queue Status 1
Debug Control
101100DC MTI 32 Memory Test Information
syn ON
101100E0 PPC 32 Packet Counter
101100E4 SGC2 32 Switch Global Control 2
101100E8 P0PC 32 Port 0 Packet Counter
101100EC P1PC 32 Port 1 Packet Counter
C
P0_ING_THRE
10110128 S 32 Port 0 Ingress Rate Limit Threshold
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
P5_ING_THRE
1011013C S 32 Port 5 Ingress Rate Limit Threshold
EO
10110144 P23_EG_CTRL 32 Port 2/3 Egress Rate Limit Control
US L
10110148 P45_EG_CTRL 32 Port 4/5 Egress Rate Limit Control
1011014C PCRI 32 Packet Counter Recycle Indication
.tw TIA
10110150 P0TPC 32 Port 0 TX Packet Counter
10110154 P1TPC 32 Port 1 TX Packet Counter
10110158 P2TPC 32 Port 2 TX Packet Counter
1011015C P3TPC 32 Port 3 TX Packet Counter
10110160 P4TPC 32 Port 4 TX Packet Counter
om N
10110164 P5TPC 32 Port 5 TX Packet Counter
10110168 LEDC 32 LED Control
x.c DE
0000000
10110000 ISR Interrupt Status
0
Bit 31
ne FI 30 29
WA
28
WA
27 26 25 24 23 22 21 20 19 18 17 16
TC TC
HA MU GL LA LA LA LA LA
HD HD PO
syn ON
S_I BC ST_ OB N_ N_ N_ N_ N_
OG OG RT_
NT _ST DR AL_ QU QU QU QU QU
Name REV0 1_T 0_T
RU
ST_
OR OP QU E_F E_F E_F E_F E_F
MR MR CH
DE M _LA E_F ULL ULL ULL ULL ULL
_EX _EX G
R N ULL _6 _5 _4 _3 _2
PIR PIR
ED ED
W1 W1 W1 W1 W1 W1 W1 W1 W1 W1 W1 W1
C
Type RO
C C C C C C C C C C C C
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LA LA
g@ K
N_ N_
QU QU
Name
E_F E_F
an E
ULL ULL
_1 _0
W1 W1
Type
rw IAT
C C
Reset 0 0
_EXPIRED This bit indicating that P5 don't transmit packet for 3 seconds when P5 need
to transmit packet. Write one clear.
[Note] This feature is only valid when port 5 Giga MAC is implemented.
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
The device is undergoing broadcast storm. Write one clear.
24 MUST_DROP_LAN Queue exhausted
EO
US L
The global queue is used up and all packets are dropped. Write one clear.
23 GLOBAL_QUE_FUL Global Queue Full.
L
.tw TIA
Write one clear.
20 LAN_QUE_FULL_6 Port 6 out queue full. Write one clear.
[Note]: This feature is only valid when port 5 Giga MAC is implemented.
19 LAN_QUE_FULL_5 Port 5 out queue full. Write one clear.
18 LAN_QUE_FULL_4 Port 4 out queue full. Write one clear.
17 LAN_QUE_FULL_3 Port 3 out queue full. Write one clear.
om N
16 LAN_QUE_FULL_2 Port 2 out queue full. Write one clear.
15 LAN_QUE_FULL_1 Port 1 out queue full. Write one clear.
x.c DE
14 LAN_QUE_FULL_0 Port 0 out queue full. Write one clear.
ne FI FFFFFF
10110004 IMR Interrupt Mask
FF
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
WA WA
syn ON
TC TC
HA MU GL LA LA LA LA LA
HD HD PO
S_I BC ST_ OB N_ N_ N_ N_ N_
OG OG RT_
NT _ST DR AL_ QU QU QU QU QU
Name 1_T 0_T
RU
ST_
OR OP QU
REV1
E_F E_F E_F E_F E_F
MR MR CH
DE M _LA E_F ULL ULL ULL ULL ULL
_EX _EX G
R N ULL _6 _5 _4 _3 _2
PIR PIR
C
ED ED
Type RW RW RW RW RW RW RW RW RW RW RW RW RW
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
g@ K
LA LA
N_ N_
QU QU
Name
an E
E_F E_F
ULL ULL
_1 _0
rw IAT
Type RW RW
Reset 1 1
_EXPIRED This bit indicating that global queue block counts is less
than buf_starvation_th for 3 seconds. Write one clear.
27 HAS_INTRUDER Intruder Alert
This bit indicating that an unsecured packet is coming into a secured port.
Write one clear.
26 PORT_ST_CHG Port status change
Any port from link status change. Write one clear.
25 BC_STORM BC storm
The device is undergoing broadcast storm. Write one clear.
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
24 MUST_DROP_LAN Queue exhausted
The global queue is used up and all packets are dropped. Write one clear.
EO
US L
23 GLOBAL_QUE_FUL Global Queue Full.
L Write one clear.
.tw TIA
22:21 REV1 Port 6 out queue full. Write one clear.
[Note]: This feature is only valid when port 5 Giga MAC is implemented.
20 LAN_QUE_FULL_6 Port 6 out queue full. Write one clear.
[Note]: This feature is only valid when port 5 Giga MAC is implemented.
19 LAN_QUE_FULL_5 Port 5 out queue full. Write one clear.
18 LAN_QUE_FULL_4 Port 4 out queue full. Write one clear.
om N
17 LAN_QUE_FULL_3 Port 3 out queue full. Write one clear.
16 LAN_QUE_FULL_2 Port 2 out queue full. Write one clear.
x.c DE
15 LAN_QUE_FULL_1 Port 1 out queue full. Write one clear.
14 LAN_QUE_FULL_0 Port 0 out queue full. Write one clear.
10110008
ne FI
FCT0 Flow Control Threshold 0
FFC86E
5A
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
syn ON
Name FC_RLS_TH FC_SET_TH
Type RW RW
Reset 1 1 1 1 1 1 1 1 1 1 0 0 1 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DRO_RLS_TH DROP_SET_TH
Type RW RW
C
Reset 0 1 1 0 1 1 1 0 0 1 0 1 1 0 1 0
0000001
1011000C FCT1 Flow Control Threshold 1
4
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name PORT_TH
Type RW
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Reset 0 0 0 1 0 1 0 0
EO
7:0 PORT_TH Per Port Output Threshold
US L
When the global queue reaches the flow control or drop threshold on register
FCT0, per port output threshold will be checked to enable flow-control or
.tw TIA
packet-dop depending on per queue minimum reserved blocks of the register
PFC2.
0F00000
10110010 PFC0 Priority Flow Control 0
0
om N
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name MTCC_LMT TURN_OFF_FC
x.c DE
Type RW RW
Reset 1 1 1 1 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name VO_NUM CL_NUM BE_NUM BK_NUM
Type RW RW RW RW
Reset 0ne FI 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1: Enable
15:12 VO_NUM The proportional number of WRR for Voice Queue
After transmit exactly the number of packets then proceed to next queue. If
g@ K
3:0 BK_NUM The proportional number of WRR for Background Queue After transmit
exactly the number of packet then proceed to next queue.
0000155
10110014 PFC1 Priority Flow Control 1
far D
5
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R ME
CP
IGM
U_
P_T
US
Name E_
EN_TOS O_ EN_VLAN
CP
Q1_
U
EN
Type RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PRI
ORI PORT_PRI PORT_PRI PORT_PRI PORT_PRI PORT_PRI PORT_PRI PORT_PRI
Name
TY_ 6 5 4 3 2 1 0
OP
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
TIO
N
Type RW RW RW RW RW RW RW RW
Reset 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1
EO
US L
Bit(s) Name Description
.tw TIA
31 CPU_USE_Q1_EN CPU Port only use q1 enable
0: default priority resolution
1: packets forwarded to CPU port uses Best-Effor Queue
30:24 EN_TOS Port6 ~ port0 TOS_en.
Check TOS field of IP packets for priority resolution.
[Note] Port 5 function is only vlaid when port 5 Giga MAC is implemented
0: Disable
om N
1: Enable
23 IGMP_TO_CPU IGMP forward to CPU enable
x.c DE
0: IGMP message will be floode to all ports
1: IGMP message will be forwarded to CPU port only.
22:16 EN_VLAN Enable per port VLAN-tag VID membership and priority tag check.
[Note] Port 5 function is only vlaid when port 5 Giga MAC is implemented
0: disable.
15
ne FI
PRIORITY_OPTION
1: enable
Priority Resolution Option
0: 802.1p -> TOS -> Per port
syn ON
1: TOS -> 802.1p -> Per port
13:12 PORT_PRI6 Port priority
By setting this register to assign per port's default priority queue.
11:10 PORT_PRI5 Port priority
By setting this register to assign per port's default priority queue.
C
[Note] This feature is only valid when port 6 Giga MAC is implemented
9:8 PORT_PRI4 Port priority
By setting this register to assign per port's default priority queue.
g@ K
0303030
10110018 PFC2 Priority Flow Control 2
3
R ME
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name PRI_TH_VO PRI_TH_CL
Type RW RW
Reset 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name PRI_TH_BE PRI_TH_BK
Type RW RW
Reset 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
The minimum reserved packet block count which outout queue can store
when the flow-control /drop threshold of registers FTC0 and FCT1 is reached.
EO
If the queued blocks exceed the threshold, the incoming packet will be
US L
paused or dropped.
23:16 PRI_TH_CL Control Load Threshold
.tw TIA
The minimum reserved packet block count which outout queue can store
when the flow-control/drop threshold of registers FTC0 and FCT1 is reached.
If the queued blocks exceed the threshold, the incoming packet will be
paused or dropped.
15:8 PRI_TH_BE Best Effort threshold
The minimum reserved packet block count which outout queue can store
when the flow-control/drop threshold of registers FTC0 and FCT1 is reached.
om N
If the queued blocks exceed the threshold, the incoming packet will be
paused or dropped.
x.c DE
7:0 PRI_TH_BK Background Threshold (Lowest Priority)
The minimum reserved packet block count which outout queue can store
when the flow-control/drop threshold of registers FTC0 and FCT1 is reached.
If the queued blocks exceed the threshold, the incoming packet will be
paused or dropped.
ne FI
FA41016
syn ON
1011001C GQS0 Global Queue Status 0
E
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name PRI7_QUE PRI6_QUE PRI5_QUE PRI4_QUE PRI3_QUE PRI2_QUE PRI1_QUE PRI0_QUE
Type RW RW RW RW RW RW RW RW
Reset 1 1 1 1 1 0 1 0 0 1 0 0 0 0 0 1
C
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name EMPTY_CNT
Type RO
Reset 1 0 1 1 0 1 1 1 0
g@ K
0000000
10110020 GQS1 Global Queue Status 1
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name OUTQUE_FULL_VO OUTQUE_FULL_CL
Type RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Name OUTQUE_FULL_BE OUTQUE_FULL_BK
Type RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
US L
Bit(s) Name Description
31:24 OUTQUE_FULL_VO Congested Voice Queue
.tw TIA
The corresponding queue is congested
23:16 OUTQUE_FULL_CL Congested Control Load Queue
The corresponding queue is congested
15:8 OUTQUE_FULL_BE Congested Best Effort Queue
The corresponding queue is congested
7:0 OUTQUE_FULL_BK Congested Background Queue
om N
The corresponding queue is congested
x.c DE
0000000
10110024 ATS Address Table Search
4
Bit 31ne FI 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
syn ON
BE
SE
GIN
AT_ AR
_SE
LK CH
AR
Name UP_ _NX
CH
IDL T_A
_A
E DD
C
DD
R
R
W1 W1
Type RO
C C
Reset 1 0 0
g@ K
0000000
10110028 ATS0 Address Table Status 0
0
R ME
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
R_PORT_MAP[6:4
Name HASH_ADD_LU
]
Type RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R_
AT_ SE
MC
TA AR
_IN
Name R_PORT_MAP[3:0] R_VLD R_AGE_FIELD
GR
BL CH
E_E _R
ES
ND DY
S
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Type RO RO RO RO RO RC
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0
EO
Bit(s) Name Description
US L
31:22 HASH_ADD_LU Address table lookup address
18:12 R_PORT_MAP Port map
.tw TIA
The MAC existing in the bit =1.
10:7 R_VLD VLAN index
6:4 R_AGE_FIELD Aging field
2 R_MC_INGRESS MC Ingress
1 AT_TABLE_END Search to the end of address table
om N
0 SEARCH_RDY Data is ready (read clear)
x.c DE
0000000
1011002C ATS1 Address Table Status 1
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
ne FI
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
syn ON
Name MAC_AD_SER0
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0000000
10110030 ATS2 Address Table Status 2
0
an E
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name MAC_AD_SER0[31:16]
Type RO
rw IAT
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name MAC_AD_SER0[15:0]
Type RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0008000
10110034 WMAD0 WT_MAC_AD0
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
AT_
CF
W_PORT_MAP[6:
Name HASH_ADD_LU G_I
4]
DL
E
Type RO RO RW
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Reset 0 0 0 0 0 0 0 0 0 0 1 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
W_
W_ W_
SA_ MC
EO
MA MA
US L
FIL _IN
Name W_PORT_MAP[3:0] W_INDEX W_AGE_FIELD
TE GR
C_ C_
DO CM
R ES
NE D
.tw TIA
S
Type RW RW RW RW RW RO WO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
om N
19 AT_CFG_IDLE Address Table Configuration SM IDLE
18:12 W_PORT_MAP Write Port map
10:7 W_INDEX VLAN index
x.c DE
0: VLAN 0
1-14: ...
15: VLAN 15
6:4 W_AGE_FIELD Write Aging field
ne FI 3'b111: static address,
3'b001 - 3'b110: the entry is valid and will be aged out
2'b000: default, entry is invalid
3 SA_FILTER SA_FILTER
syn ON
0: default
1: The corresponding packet will be dropped when the SA is matched
2 W_MC_INGRESS Write MC Ingress
1 W_MAC_DONE MAC Write Done
0: default
C
1: the MAC write data is ready and write to MAC table now(self_clear)
an E
0000000
10110038 WMAD1 WT_MAC_AD1
rw IAT
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name W_MAC_15_0
far D
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
R ME
0000000
1011003C WMAD2 WT_MAC_AD2
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name W_MAC_47_16[31:16]
Type RW
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name W_MAC_47_16[15:0]
Type RW
EO
US L
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.tw TIA
31:0 W_MAC_47_16 Write MAC Address[47:16]
0000100
10110040 PVIDC0 PVID Configuration 0
1
om N
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name P1_PVID[11:4]
x.c DE
Type RW
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name P1_PVID[3:0] P0_PVID
Type RW RW
Reset 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1
Bit(s)
ne FI
Name Description
23:12 P1_PVID Port1 PVID Setting
syn ON
11:0 P0_PVID Port0 PVID Setting
0000100
10110044 PVIDC1 PVID Configuration 1
C
1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name P3_PVID[11:4]
g@ K
Type RW
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
an E
0000100
10110048 PVIDC2 PVID Configuration 2
R ME
1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name P5_PVID[11:4]
Type RW
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name P5_PVID[3:0] P4_PVID
Type RW RW
Reset 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
23:12 P5_PVID Port5 PVID Setting
[Note] This feature is only valid when port 5 Giga MAC is implemented.
EO
US L
11:0 P4_PVID Port4 PVID Setting
.tw TIA
7502000
1011004C PVIDC3 PVID Configuration 3
1
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name QUE3_PRIT QUE2_PRIT QUE1_PRIT QUE0_PRIT
Type RW RW RW RW
om N
Reset 1 1 1 1 0 1 0 0 0 0 1 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name P6_PVID
x.c DE
Type RW
Reset 0 0 0 0 0 0 0 0 0 0 0 1
0000200
C
Type RW
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
an E
0000400
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
23:12 VID3 VLAN Field Identifier for VLAN 3
11:0 VID2 VLAN Field Identifier for VLAN 2
EO
US L
.tw TIA
0000600
10110058 VLANI2 VLAN Identifier 2
5
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name VID5[11:4]
Type RW
Reset 0 0 0 0 0 0 0 0
om N
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name VID5[3:0] VID4
Type RW RW
x.c DE
Reset 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 1
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name VID7[3:0] VID6
Type RW RW
g@ K
Reset 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1
0000A00
10110060 VLANI4 VLAN Identifier 4
9
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
far D
Name VID9[11:4]
Type RW
Reset 0 0 0 0 0 0 0 0
R ME
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name VID9[3:0] VID8
Type RW RW
Reset 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
0000C00
10110064 VLANI5 VLAN Identifier 5
B
EO
US L
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name VID11[11:4]
Type
.tw TIA
RW
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name VID11[3:0] VID10
Type RW RW
Reset 1 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1
om N
Bit(s) Name Description
23:12 VID11 VLAN Field Identifier for VLAN 11
x.c DE
11:0 VID10 VLAN Field Identifier for VLAN 10
0000E00
10110068 VLANI6
ne FI VLAN Identifier 6
D
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name VID13[11:4]
Type RW
syn ON
Reset 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name VID13[3:0] VID12
Type RW RW
Reset 1 1 1 0 0 0 0 0 0 0 0 0 1 1 0 1
C
0001000
1011006C VLANI7 VLAN Identifier 7
F
rw IAT
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name VID15[11:4]
Type RW
Reset 0 0 0 0 0 0 0 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name VID15[3:0] VID14
far D
Type RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
R ME
FFFFFF
10110070 VMSC0 VLAN Member Port Configuration 0
FF
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name VLAN_MEMSET_3 VLAN_MEMSET_2
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Type RW RW
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name VLAN_MEMSET_1 VLAN_MEMSET_0
EO
US L
Type RW RW
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
.tw TIA
Bit(s) Name Description
31:24 VLAN_MEMSET_3 VLAN 3 Member Port
23:16 VLAN_MEMSET_2 VLAN 2 Member Port
15:8 VLAN_MEMSET_1 VLAN 1 Member Port
7:0 VLAN_MEMSET_0 VLAN 0 Member Port
om N
x.c DE
FFFFFF
10110074 VMSC1 VLAN Member Port Configuration 1
FF
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name VLAN_MEMSET_7 VLAN_MEMSET_6
Type ne FI RW RW
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name VLAN_MEMSET_5 VLAN_MEMSET_4
Type RW RW
syn ON
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
FFFFFF
10110078 VMSC2 VLAN Member Port Configuration 2
FF
rw IAT
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name VLAN_MEMSET_11 VLAN_MEMSET_10
Type RW RW
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name VLAN_MEMSET_9 VLAN_MEMSET_8
Type RW RW
far D
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
FFFFFF
1011007C VMSC3 VLAN Member Port Configuration 3
FF
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name VLAN_MEMSET_15 VLAN_MEMSET_14
Type RW RW
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
EO
US L
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name VLAN_MEMSET_13 VLAN_MEMSET_12
Type RW RW
.tw TIA
Reset 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
om N
15:8 VLAN_MEMSET_13 VLAN 13 Member Port
7:0 VLAN_MEMSET_12 VLAN 12 Member Port
x.c DE
0000000
10110080 POA Port Ability Offset
0
Bit 31ne FI 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
G1_ G0_
Name LIN LIN LINK G1_TXC G0_TXC XFC
K K
Type RO RO RO RO RO RO
syn ON
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name DUPLEX G1_SPD G0_SPD SPEED
Type RO RO RO RO
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
C
0: Link down
30 G0_LINK Port 5 Link Status
an E
[Note] This feature is only valid when port 5 giga MAC is implemented.
1: Link up
0: Link down
rw IAT
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
[Note]: Port5 funciton is only valid when port 5 Giga MAC is implemented.
0: half duplex
EO
1: full duplex
US L
8:7 G1_SPD MII port 6 Speed:Mode
10: 1000M
.tw TIA
01: 100M
00: 10M
6:5 G0_SPD MII port 5 Speed:Mode
[Note] This feature is only valid when port 5 Giga MAC is implemented
10: 1000M
01: 100M
00: 10M
om N
4:0 SPEED Port4 ~ port0 Speed Mode
0: 10M
x.c DE
1: 100M
0000000
10110084
Bit 31
ne FI
FPA
30 29 28
Force Port4 - Port0 Ability
27 26 25 24 23 22 21 20 19 18 17
0
16
Name FORCE_MODE FORCE_LINK FORCE_XFC
syn ON
Type RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
XT
AL_
Name FORCE_DPX FORCE_SPD
CO
MP
C
Type RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0
g@ K
1: force mode. Auto-negotiation status is ignored. All the port ability are
forced according to the following fields of the register FPA.
rw IAT
This field is valid only FORCE_MDOE is set. The final resolution is reported
to POA register.
0: default OFF
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
This field is valid only FORCE_MDOE is set. The final resolution is reported
to POA register.
EO
1: 100M
US L
0: 10M
.tw TIA
0000000
10110088 PTS Port Status
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Name
Type
om N
Reset
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
x.c DE
G1_ G0_
TX TX
Name C_S C_S SECURED_ST
TAT TAT
US US
Type RO RO RO
Reset ne FI 0 0 0 0 0 0 0 0 0
1: error, no TXC
6:0 SECURED_ST Security Status
0: no alert
g@ K
027F7F7
1011008C SOCPC SoC Port Control
rw IAT
F
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
CR
C_P
CPU_SELE
Name AD DISBC2CPU
CTION
DIN
G
Type
far D
RW RW RW
Reset 1 0 0 1 1 1 1 1 1 1
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R ME
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
24:23 CPU_SELECTION CPU Selection
00b: Port 6
EO
01b: Port 0
US L
10b: Port 4
11b: Port 5
.tw TIA
22:16 DISBC2CPU Disable BC to CPU
When this bit = 1, BC frames from the corresponding port will not be forward
to CPU.
[Note] Port5 funciton is only valid when port 5 Giga MAC is implemented.
0: Includes CPU port.
1: Excludes CPU port
om N
14:8 DISMC2CPU Disable MC to CPU
When this bit =1, MC frames from the corresponding port will not forward to
CPU.
x.c DE
[Note] Port5 funciton is only valid when port 5 Giga MAC is implemented.
0: Includes CPU port.
1: Excludes CPU port
6:0 DISUN2CPU Disable UN to CPU
When this bit =1, Unkonwn frames from the corresponding port will not
ne FI forward to CPU.
[Note] Port5 funciton is only valid when port 5 Giga MAC is implemented.
0: Includes CPU port.
1: Excludes CPU port
syn ON
3F807F7
10110090 POC0 Port Control 0
F
C
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
DIS DIS
_G _G
HASH_AD MII_ MII_
Name DIS_PORT DISRMC2_CPU
g@ K
DR_SHIFT PO PO
RT_ RT_
1 0
Type RW RW RW RW RW
an E
Reset 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
rw IAT
MA
C_F
CP_
Name EN_FC EN_BP
OP
TIO
N
Type RW RW RW
Reset 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1
far D
31:30 HASH_ADDR_SHIF Address table hashing algorithm option for member set index
T
29 DIS_GMII_PORT_1 Disable port 6
0: port enable
1: port disable
28 DIS_GMII_PORT_0 Disable port 5
[Note] This feature is only valid when port 5 Giga MAC is implemented.
0: port enable
1: port disable
27:23 DIS_PORT Disable phy port
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
Bit(s) Name Description
0: port enable
1: port disable
EO
22:16 DISRMC2_CPU Unknown Reserved Multicast Frame Excludes CPU
US L
[Note] Port5 funciton is only valid when port 5 Giga MAC is implemented.
0: Unknown Reserved Multicast Forward Rule (SGC.RMC_RULE)
.tw TIA
1: Excludes CPU port
14:8 EN_FC Apply 802.3x status after Auto-negotiation
This field can individually control the 802.3x capability after Auto-negotiation
is done.
[Note] Port5 funciton is only valid when port 5 Giga MAC is implemented.
0: ignore the AN stats for 802.3x capability
1: follow the AN status for 802.3x capability
om N
7 MAC_FCP_OPTION Multicast Flow control/Backpressure option
0: When all ports are fc/bp disable, the switch will use drop_threshold to drop
x.c DE
frames only. If not, the switch will use fc_threshold and drop_threshold.
1: When only the destination TX port is fc/bp disable, the switch will use
drop_threshold to drop frames only . If not, that TX port uses fc_threshold and
drop_threshold.
6:0 EN_BP Apply back pressure capability
ne FI [Note] Port5 funciton is only valid when port 5 Giga MAC is implemented.
0: ignore the back pressure mode (default OFF)
1: apply back pressure based on SGC.BP_MODE.
syn ON
0000000
10110094 POC1 Port Control 1
0
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C
[Note] Port5 funciton is only valid when port 5 Giga MAC is implemented.
0: default enabled
1: disable Source MAC learning
6:0 SA_SECURED_PO SA secured mode
RT [Note*1]: Must set dis_learn and sa_secured at the same time.
[Note*2] Port5 funciton is only valid when port 5 Giga MAC is implemented.
0: don't care SA match,
1: the packets' SA needs match, otherwise discard the packets
FO
Y
MT7628 PROGRAMMING GUIDE Confidential B
NL
00007F0
10110098 POC2 Port Control 2
0
EO
Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
US L
G1_ G0_
ML
TX TX
D2
C_ C_ IPV6_MUL
.tw TIA
Name CH CH
CP
T_RULE
DIS_UC_PAUSE
U_E
EC EC
N
K K
Type RW RW RW RW RW
Reset 0 0 0 0 0 0 0 0 0 0 0 0
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PE
om N
R_V
LA