English
Language : 

MEC1404 Datasheet, PDF (107/572 Pages) Microchip Technology – Keyboard and Embedded Controller Products for Notebook PC
MEC140X/1X
EXAMPLE 4-1: LPC RUNTIME (CONFIGURATION PORT) ADDRESSING
CONFIGURATION PORT
LPC I/O ADDRESS
EC/HOST
ADDRESS
REGISTER
002Eh
002Fh
F_3000h
F_3001h
INDEX
DATA
Note: The Logical Device number for the matching device is located in the Frame field of the BAR. The Frame
field is mapped to bits [15:10] of the EC/Host Address space. In this example bits[15:10] = 00_1100 = Ch.
The system host will use I/O transactions to access the Configuration and Runtime registers. To access the Runtime
registers, the host must configure the I/O Base Address Registers (IO_BARs), which are accessible via the Configura-
tion Port first. The Configuration Port, Logical Device Ch, is located at the Base I/O Address programmed in the BAR
Configuration register located at offset 60h.
For illustration purposes only, lets examine two types of logical devices (these may or may not reside in this design).
EXAMPLE 4-2: KEYBOARD CONTROLLER
The Keyboard Controller (8042 Interface) Base Address Register has 60h in the LPC Address field, the Frame field is
01h, and the MASK field is 04h. Because of the single ‘1b’ bit in MASK, the BAR will match LPC I/O patterns in the form
‘0000_0000_0110_0x00b’, so both 60h and 64h will be matched and claimed by the LPC Controller.
EXAMPLE 4-3: 16550 UART
If a standard 16550 UART was located at LPC I/O address 238h, then the UART Receive buffer would appear at
address 238h and the Line Status register at 23Dh. If the BAR for the UART was set to 0238_8047h, then the UART
will be matched at I/O address 238h.
The following table illustrates the I/O Address Mapping for each logical device implemented in the MEC140X/1X.
TABLE 4-7: LPC I/O REGISTER MAP
Logical Device
BAR LPC
Host Address
Example
BAR LPC
Host
Address
LPC
Address
Mask
Offsets
Claimed
Register Name
LPC Interface (Con- 2 Byte Bound-
figuration Port)
ary
EMI 0
16 Byte
Boundary
002Eh
0060h
1 BAR+0 INDEX
+1 DATA
F BAR+0 Host-to-EC Mailbox
+1 EC-to-Host Mailbox
+2 EC Address LSB
+3 EC Address MSB
+4 EC Data Byte 0
+5 EC Data Byte 1
+6 EC Data Byte 2
+7 EC Data Byte 3
+8 Interrupt Source LSB
+9 Interrupt Source MSB
+A Interrupt Mask LSB
+B Interrupt Mask MSB
+C Application ID
 2015 - 2016 Microchip Technology Inc.
DS00001956D-page 107