Headquarters
4F-1, No.9, Prosperity Rd.,
Science-based Industrial Park,
Hsinchu City, Taiwan, R.O.C
TEL: 886-3-6662888
Copyright© 2011, ENE Technology Inc. All rights reserved.
ENE RESERVES THE RIGHT TO AMEND THIS DOCUMENT WITHOUT NOTICE AT ANY TIME. ENE
ASSUMES NO RESPONSIBILITY FOR ANY ERRORS APPEAR IN THE DOCUMENT, AND ENE DISCLAIMS
ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF ENE PRODUCTS
INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, OR
INFRINGEMENT OF ANY PATENTS, COPYRIGHTS OR OTHER INTELLECTUAL PROPERTY RIGHTS.
Taipei Office
4F, No.88, Bauchiau Rd.
Shindian City, Taipei,
Taiwan, R.O.C.
TEL: 886-2-89111525
FAX: 886-2-89111523
KB9012
Keyboard Controller
Data Sheet
Revision 0.9
June 2010
KB9012 Keyboard Controller Datasheet
ENE Technology Inc.
Confidential Document
Restricted Circulation
- This document is issued for only. Please do not transfer it to other companies.
- This document is the property of ENE Technology Corp. It should be returned once unused.
- Please do not make any copy of this document and deliver to others.
THIS DOCUMENT CONTAINS CONFIDEMTIAL
INFORMATION OF ENE PRODUCTS. ANY
UNAUTHORIZED USE OR DISCLOSURE COULD
IMPACT ENE’S COMPETITIVE ADVANTAGE.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
1. Draft with only pin-assignment and IO cells
1. Re-organize contents,
2. Update IO cell name / structure
3. Update Memory Map
4. Reserved all electronic character for design characteristic only
1. Update Block Diagram with GWG
2. Correct IO cells typo, remove BQCZT04HIV
3. Update power-fail flag in application appendix
4. Update Register files as following :
5. Update IKB HW command brief
6. Update Open-Drain PWM register
7. Modify SHDI registers for fixed clock source, SHI modes
8. Update WDT registers breathe LED flexible configuration
9. Update LPC MEM cycle map to XRAM illustration
10. Update XBI for e-flash operation and remove SHC description
11. Update GWG register as new-added functions
12. Update EC section registers for VC/PLC/ADC
13. Update SMB, extend previously banked-REGs, slave address
14. Update power-latch&voltage comparator in application appendix
1. Update STOP mode power consumption
2. Add KBC POR and ECRST# timing
1. Fix register typo, TCON W0C
2. Update PCON2 description
3. Update GPIO_MISC for SHDI pin-out enable for each ports
4. Fix WDTCFG description of WDT disable password
5. Update SHDI clock setting
6. Update XBIMISC IC trimming status
1. Update PS/2 Timing
2. Remove external SPI flashing timing
3. Update BQCZT04IV cell character
4. Update ESD information
5. Update thermal information
6. Update 9012A2 into P/N list and VC related setting. Please refer
ECN for details.
1. Update 9012A3 into P/N list and related changes. Please refer
ECN for details.
2. Remove 4.13.3 & 4.13.4 LPC/FWH Memory decode range ;
remove Bank0 0xFE90[3], 0xFE94[7:0], 0xFE95[2],[7]
Bank1 0xFE92[5:0], 0xFE93[5:0]
3. Refine WDT breath LED similar to non-embedded-flash product
4. Refine ECMISC , IOSCCR for power consumption control
5. Refine function select control of tables
SDI host two ports select is by GPIO_MISC[2:1]
GPIO5D/5E (Crystal) is by CLK32CR[5:4]
VCouts are by GPIOFSx
Vcins are by VCCR[1:0]
6. Revise application appendix to correspond latest setting
1. Refine hardware trap section, recover FDA trap in A3 version
Revision
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
CONTENT
CONTENT ................................................................................................................... II
1. GENERAL DESCRIPTION..................................................................................... 0
1.1 OVERVIEW ........................................................................................................... 0
1.2 FEATURES ........................................................................................................... 1
1.3 COMPARISON (KB930 VS . KB9012) .................................................................... 6
1.4 BLOCK DIAGRAM ................................................................................................. 7
2. PIN ASSIGNMENT AND DESCRIPTION .............................................................. 8
2.1 KB9012 128-PIN LQFP DIAGRAM TOP VIEW ....................................................... 8
2.2 KB9012 128 LFBGA BALL MAP ........................................................................ 9
2.3 KB9012 PIN ASSIGNMENT SIDE A ..................................................................... 10
2.4 KB9012 PIN ASSIGNMENT SIDE B ......................................................................11
2.5 KB9012 PIN ASSIGNMENT SIDE C ..................................................................... 12
2.6 KB9012 PIN ASSIGNMENT SIDE D ..................................................................... 13
2.7 I/O CELL DESCRIPTIONS .................................................................................... 14
2.7.1 I/O Buffer Table ....................................................................................... 14
2.7.2 I/O Buffer Characteristic Table.............................................................. 14
3. PIN DESCRIPTIONS ............................................................................................ 15
3.1 HARDWARE TRAP .............................................................................................. 15
3.2 PIN DESCRIPTIONS BY FUNCTIONS ..................................................................... 16
3.2.1 Low Pin Count I/F Descriptions. ........................................................... 16
3.2.2 PS/2 I/F Descriptions .............................................................................. 16
3.2.3 Internal Keyboard Encoder (IKB) Descriptions .................................. 16
3.2.4 SMBus Descriptions ............................................................................... 16
3.2.5 FAN Descriptions .................................................................................... 17
3.2.6 Pulse Width Modulation (PWM) Descriptions ..................................... 17
3.2.7 Analog-to-Digital Converter Descriptions ........................................... 17
3.2.8 Digital-to-Analog Converter Descriptions ........................................... 17
3.2.9 8051 External I/F Descriptions .............................................................. 17
3.2.10 External Clock Descriptions ............................................................... 18
3.2.11 Miscellaneous Signals Descriptions .................................................. 18
3.2.12 Voltage Comparator Pins Descriptions ............................................. 18
3.2.13 Power Pins Descriptions ..................................................................... 18
3.2.14 51ON Power Pins Descriptions .......................................................... 19
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
4. MODULE DESCRIPTIONS .................................................................................. 20
4.1 CHIP ARCHITECTURE ......................................................................................... 20
4.1.1 Power Planes........................................................................................... 20
4.1.2 Clock Domains ........................................................................................ 21
4.1.3 PCICLK and CLKRUN#........................................................................... 23
4.1.4 Internal Memory Map.............................................................................. 24
4.2 GPIO ................................................................................................................ 25
4.2.1 GPIO Function Description ................................................................... 25
4.2.2 GPIO Structures ...................................................................................... 29
4.2.3 GPIO Attribution Table ........................................................................... 30
4.2.4 GPIO Registers Descriptions (0xFC00~0xFC7F) ................................ 33
4.2.5 GPIO Programming Sample .................................................................. 48
4.3 KEYBOARD AND MOUSE CONTROL INTERFACE (KBC) ........................................ 49
4.3.1 KBC I/F Function Description ............................................................... 49
4.3.2 KBC Registers Description (0xFC80~0xFC8F) ................................... 50
4.4 ENE SERIAL BUS CONTROLLER (ESB).............................................................. 54
4.4.1 ESB Function Description ..................................................................... 54
4.4.2 ESB Registers Description (0xFC90~0xFC9F) ................................... 55
4.4.3 ESB Programming Sample .................................................................... 60
4.5 INTERNAL KEY BOARD (IKB) ENCODER .............................................................. 61
4.5.1 IKB Function Description ...................................................................... 61
4.5.2 IKB Registers Description (0xFCA0~0xFCAF).................................... 63
4.5.3 IKB Matrix Value Mapping Table ........................................................... 69
4.6 PECI ................................................................................................................. 72
4.6.1 PECI Functional Description ................................................................. 72
4.6.2 PECI Timing Setting ............................................................................... 73
4.6.3 PECI Register Description (0xFCD0~0xFCDF) ................................... 74
4.7 OWM ................................................................................................................ 78
4.7.1 OWM Functional Description ................................................................ 78
4.7.2 OWM Timing Setting Illustration .......................................................... 79
4.7.3 OWM Register Description (0xFCF0~0xFCFF) ................................... 80
4.8 PULSE WIDTH MODULATION (PWM) .................................................................. 83
4.8.1 PWM Function Description.................................................................... 83
4.8.2 PWM Duty Cycle Setting Illustration .................................................... 84
4.8.3 PWM Registers Description (0xFE00~0xFE1F) .................................. 87
4.9 FAN C ONTROLLER ............................................................................................. 90
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
4.9.1 Fan Function Description ...................................................................... 90
4.9.1.1 Fan Tachometer Monitor & Auto-FAN mode .................................... 91
4.9.1.2 FANPWM Setting & Fixed-FAN Mode ................................................ 92
4.9.2 Fan Registers Description (0xFE20~0xFE4F) ..................................... 93
4.9.3 Fan Programming Sample ..................................................................... 99
4.10 GENERAL PURPOSE TIMER (GPT) ................................................................. 100
4.10.1 GPT Function Description ................................................................. 100
4.10.2 GPT Registers Description (0xFE50~0xFE6F) ................................ 101
4.10.3 GPT Programming Sample ................................................................ 103
4.11 SDI HOST /DEVICE INTERFACE CONTROLLER .................................................. 104
4.11.1 SDI Host/Device Interface Description............................................. 104
4.11.2 SDI Host Interface Register Description (0xFE70~0xFE7F) .......... 106
4.11.3 SDI Device Interface Register Description (0xFE70~0xFE7F) ...... 108
4.11.4 SDI Programming Sample .................................................................. 111
4.12 WATCHDOG T IMER (WDT) ............................................................................. 112
4.12.1 WDT Function Description ................................................................ 112
4.12.2 Setting for WDT Breathing LED ........................................................ 113
4.12.3 WDT Registers Description (0xFE80~0xFE8F) ............................... 114
4.12.4 WDT Programming Sample ............................................................... 118
4.13 LOW PIN COUNT INTERFACE (LPC) ................................................................ 119
4.13.1 LPC Function Description ................................................................. 119
4.13.2 LPC I/O Decode Range ...................................................................... 119
4.13.3 Index-I/O Port ...................................................................................... 120
4.13.4 LPC to MEM cycle XRAM ................................................................... 121
4.13.5 Extended I/O Port (Debug Port, Port80) .......................................... 123
4.13.6 LPC Registers Description (0xFE90~0xFE9F for bank selection) 124
4.14 X-BUS INTERFACE (XBI) ................................................................................ 132
4.14.1 XBI Function Description .................................................................. 132
4.14.2 XBI Registers Description (0xFEA0~0xFEBF) ................................ 133
4.15 CONSUMER IR CONTROLLER (CIR) ................................................................ 138
4.15.1 CIR Function Description .................................................................. 138
4.15.2 CIR Block Diagram ............................................................................. 140
4.15.3 CIR Remote Protocol.......................................................................... 141
4.15.3.1 Philips RC5 Protocol ........................................................................................ 141
4.15.3.2 Philips RC6 Protocol ........................................................................................ 142
4.15.3.3 NEC Protocol .................................................................................................... 142
4.15.4 CIR Automatic Carrier Frequency Detection and Modulation ...... 143
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
4.15.5 CIR Registers Description (0xFEC0~0xFECF) ................................ 145
4.15.6 CIR Programming Sample ................................................................. 149
4.16 GENERAL WAVEFORM G ENERATOR (GWG) ................................................... 150
4.16.1 GWG Function Description ............................................................... 150
4.16.2 GWG Register Description (0xFED0~0xFEDF) ............................... 151
4.17 PS/2 INTERFACE (PS/2) ................................................................................ 153
4.17.1 PS/2 Interface Function Description ................................................ 153
4.17.2 PS/2 Interface Registers Description (0xFEE0~0xFEFF) .............. 153
4.18 EMBEDDED CONTROLLER (EC) ...................................................................... 157
4.18.1 EC Function Description ................................................................... 157
4.18.2 EC Command Program Sequence.................................................... 158
4.18.3 EC SCI Generation .............................................................................. 159
4.18.4 EC/KBC Clock Configuration ............................................................ 160
4.18.5.1 A/D Converter Control..................................................................... 161
4.18.5.2 A/D Panel Drive Mode ..................................................................... 162
4.18.6 D/A Converter Control........................................................................ 163
4.18.7 Power Management Control.............................................................. 164
4.18.8 EC Registers Description (0xFF00~0xFF2F) ................................... 165
4.19 GENERAL PURPOSE WAKE- UP C ONTROLLER (GPWU) ................................... 177
4.19.1 GPWU Function Description ............................................................. 177
4.19.2 GPWU Registers Description (0xFF30~0xFF7F) ............................ 178
4.19.3 GPWU Programming Sample ............................................................ 187
4.20 SYSTEM MANAGEMENT BUS CONTROLLER (SMBUS ) ..................................... 188
4.20.1 SMBus Function Description ............................................................ 188
4.20.2 SMBus Controller 0 Register Description (0xFF90~0xFFBF) ....... 192
4.20.3 SMBus Controller 1 Register Description (0xFFD0~0xFFFF) ....... 196
4.21 8051 MICROPROCESSOR ............................................................................... 201
4.21.1 8051 Microprocessor Function Description ................................... 201
4.21.2 8051 Microprocessor Instruction ..................................................... 202
4.21.3 8051 Interrupt Controller ................................................................... 207
4.21.4 Interrupt Enable/Flag Table ............................................................... 208
4.21.5 8051 Special Function Register (SFR) ............................................. 210
4.21.6 8051 Microprocessor Register Description .................................... 211
APPLICATION APPENDIX : .................................................................................. 218
A.1 ENE DEBUG INTERFACE , EDI .......................................................................... 218
A.1.1 Enable EDI ............................................................................................. 219
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
A.1.2 EDI Instructions .................................................................................... 219
A.1.3 Read Command .................................................................................... 220
A.1.4 Write Command .................................................................................... 220
A.1.5 Disable EDI Command......................................................................... 221
A.2 POWER -LATCH ................................................................................................ 222
A.3 VOLTAGE C OMPARATOR .................................................................................. 223
A.4 POWER FAIL FLAG BRIEF DESCRIPTION ........................................................... 225
A.5 EMBEDDED FLASH BRIEF DESCRIPTION ........................................................... 226
5. ELECTRICAL CHARACTERISTICS ................................................................. 227
5.1 ABSOLUTE MAXIMUM RATING ........................................................................... 227
5.2 DC ELECTRICAL CHARACTERISTICS ................................................................. 227
BQCZ16HIV ..................................................................................................... 227
BQC04HIV ....................................................................................................... 227
BQCW16HIV .................................................................................................... 228
BQC04HI .......................................................................................................... 228
BQC08HIV ....................................................................................................... 228
BQC04HIVPECI ............................................................................................... 229
BQCZT04IV (XCLKI, XCLKO, ADC/DAC) ..................................................... 230
5.3 A/D & D/A CHARACTERISTICS ......................................................................... 231
5.4 RECOMMEND OPERATION CONDITION ............................................................... 232
5.5 OPERATING CURRENT ...................................................................................... 232
5.6 PACKAGE T HERMAL I NFORMATION ................................................................... 232
5.7 AC ELECTRICAL CHARACTERISTICS ................................................................. 233
5.7.1 KBC POR and ECRST# ........................................................................ 233
5.7.2 LPC interface Timing ............................................................................ 234
5.7.3 PS/2 interface Timing ........................................................................... 236
5.7.4 SMBus interface Timing....................................................................... 237
6. PACKAGE INFORMATION ................................................................................ 238
6.1 LQFP 128-PIN OUTLINE DIAGRAM .................................................................. 238
6.1.1 Top View ................................................................................................. 238
6.1.2 Side View ............................................................................................... 239
6.1.3 Lead View............................................................................................... 240
6.1.4 LQFP Outline Dimensions ................................................................... 241
6.2 LFBGA 128-PIN OUTLINE DIAGRAM ............................................................... 242
6.2.1 Top View ................................................................................................. 242
6.2.2 Side View ............................................................................................... 243
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
6.2.3 Bottom View .......................................................................................... 244
6.2.4 LFBGA Outline Dimensions ................................................................ 245
6.3 PART N UMBER D ESCRIPTION............................................................................ 246
Copyright© 2011, ENE Technology Inc.
1. General Description
1.1 Overview
The ENE KB9012 is a customized IC based on KB9010 for specific application of minimizing
power-consumption. Several pins are provided for external power-latch to save power-consumption.
IO characteristic and cells are also improved.
The ENE KB901x series is embedded controller (EC) with embedded-Flash for notebook
platforms. In KB9012, the e-Flash is 128KB. The embedded controller contains industrial standard
8051 microprocessor and provides function of i8042 keyboard controller basically. KB9012 is
embedded LPC interface used to communicate with Host. The embedded controller also features
rich interfaces for general applications, such as PS/2 interface, Keyboard matrix encoder, PWM
controller, A/D converter, D/A converter, Fan controller, SMBus controller, GPIO controller, PECI
controller, one wire master, SPI controller, and extended interface (ENE Serial Bus) for more
applications, like capacitive touch button application and GPIO extender.
Compared with last generation of KB3926 series, KB9012 added PECI/OWM, another 2 SMBus,
another 2 Fan tachometers, enhanced SPI host/slave controller, internal oscillator for newest
application. KB9012 also improves structure of other modules including 8051, XBI, LPC, IKB, FAN,
WDT, GPIO, ESB, EDI. For detail improvement, please refer the related section.
KB9012 Keyboard Controller Datasheet
1.2 Features
LPC Low Pin Count Interface
SIRQ supporting IRQ1, IRQ12, SCI or SMI# interrupt and one programmable
IRQ provided.
I/O Address Decoding:
Legacy KBC I/O port 60h/64h
Programmable EC I/O port, 62h/66h(recommend)
I/O port 68h/6Ch (sideband)
2 Programmable 4-byte Index-I/O ports to access internal EC registers.
Memory Decoding:
Firmware Hub decode
LPC memory decode
Compatible with LPC specification v1.1
Support LPC interface re-direction to IKB for debugging
X-bus Bus Interface (XBI) : Flash Interface
Embedded 128KB flash support
The 64KB code memory can be mapped into system memory by one 16KB and
one 48KB programmable pages independently.
Enhanced pre-fetch mechanism.
8051 Microprocessor
Compatible with industrial 8051 instructions with 3 cycles.
8051 runs at 8/16/22 MHz, programmable.
256 bytes internal RAM. (special design) and 4KB tight-coupled SRAM
24 extended interrupt sources.
Two 16-bit timers.
Supports idle and stop mode.
Enhanced embedded debug interface.
Support Tx/Rx and support re-direction to IKB for debugging
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
8042 Keyboard Controller
8 standard 8042 commands processed by hardware.
Each hardware command can be optionally processed by firmware.
Pointing device multiplex mode support.
Fast GA20 and KB reset support.
PS/2 Controller
Support at most 3 external PS/2 devices.
External PS/2 device operation in firmware mode.
Internal Keyboard Matrix (IKB)
18x8 keyboard scan matrix.
Support W2K Internet and multimedia keys.
Support hotkey events defined.
Ghost key cancellation mechanism provided.
Enhanced de-bounce feature added
Embedded Controller (EC)
ACPI Spec 2.0 compliant.
5 standard EC commands supported directly by hardware.
Each hardware command can be processed by firmware optionally.
Programmable EC I/O ports, 62h/66h by default.
SMBus Host Controller
4 SMBus Interfaces with 2 SMBus Controllers
SMBus Spec 2.0 compliant.
Byte mode support.
Slave function support.
Digital-to-Analog Converter (DAC)
4 DAC channels with 8-bit resolution.
All pins of DAC can be alternatively configured as GPIO.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Analog-to-Digital Converter (ADC)
8 ADC channels with 10-bit resolution.
All pins of ADC can be alternatively configured as GPIO.
Pulse Width Modulator (PWM)
6 PWM channels are provided. (8-bit *2, 14-bit *2 and FANPWM(12-bit) *2)
Clock source selectable:.
1MHz/64KHz/4KHz/256Hz (for 8-bit PWM)
Peripheral clock or 1MHz (for 14-bit PWM)
Peripheral clock (for FANPWM)
Duty cycle programmable and cycle time up to 1 sec(for 8-bit PWM)
WatchDog Timer (WDT)
32.768KHz input clock.
10-bit counter with 32ms unit for watchdog reset.
Three watchdog reset mechanism.
Reset 8051
Reset whole chip, except GPIO.
Re set whole chip including GPIO.
WDT breathing LED
Real Time Clock
32.768KHz input clock.
24-bit timer support.
General Purpose Timer (GPT)
Two 16-bit and two 8-bit general purpose timer with 32.768KHz clock source.
General Purpose Wakeup (GPWU)
Those I/O with GPI (general purpose input) configuration can generate
interrupts or wakeup events, including pins named in GPXIOAxx.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
General Purpose Input/Output (GPIO)
All general purpose I/O can be programmed as input or output.
All output pins can be configured to be tri-state optionally.
All input pins are equipped with pull-up, high/low active and edge/level trigger
selection.
All pins of DAC can be configured as GPIO.
All pins of ADC can be configured as GPIO.
A specific pair of GPIO pins with signal pass-through feature.
GPIO50 for external lock signal set by firmware, un-locked by PCIRST# falling
FAN Controller
Two fan controllers with tachometer inputs.
Automatic fan control support.
12-bit FANPWM support.
Consumer IR (CIR)
Several protocols decoded/encoded by hardware.
Interrupt for CIR application.
Support wide/narrow band receiver.
Transmit/Receive simultaneously.
Remote power-on support.
ENE Serial Bus Interface (ESB)
A proprietary and flexible interface for extension with ENE KBC.
Firmware accesses ESB devices via internal memory address directly.
Interrupt capability.
ENE Debug Interface (EDI)
Flexible debug interface with IKB pins.
Keil-C development tool compatible
EDI detect frequency support 1M~8M
SPI Device Interface (SHDI)
A enhanced SPI host/device controller is embedded in the KBC.
Flexible design for SPI applications.
One Wire Master (OWM)
Embedded One Wire controller used to control one wire devices.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
PECI Interface
Support Intel PECI.
Support wide speed range from 2Kbps to 2Mbps.
Power Management
Sleep mode: 8051 program counter (PC) stops and enters idle mode.
Deep sleep mode: All clocks stop except external 32.768KHz OSC. 8051 enters
stop mode.
51ON power management function
MISC
Support General Waveform Generator to easily and accurately generate
us-scale to ms-scale specific waveform.
Support two voltage comparators. Two voltage input sources to compare with
internal DAC voltage value, and response the comparison result on two digital
outputs, used to detect abnormal situation (like over temperature and etc.).
Package
128-pin LQFP package, Lead Free (RoHS).
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Eight 10-bit ADC channels
32ms timer unit with 10bits control
32ms timer unit with 10bits control
6 sets
PWM0/1 – 8 bit
PWM2/3 – 14 bit
FANPWM0/1 – 12 bit
6 sets
PWM0/1 – 8 bit
PWM2/3 – 14 bit
FANPWM0/1 – 12 bit
Programmable Bi-direction I/O
GPIO pass through : 1 pair
Max 100 pins I/O
Programmable Bi-direction I/O
GPIO pass through : 1 pair
Max 106 pins I/O
All GPIO are bi-directional
All GPIO are wake-up enable
2 (Enhanced precision and 2
additional Tachometer Monitors)
2 (Enhanced precision and 2
additional Tachometer Monitors)
4 Interfaces with 2 controllers
Byte mode support
4 (F/W updated)
Byte mode support
Hardware encode/decode
IRQ and I/O port support
Carrier frequency calculation
TX with carrier modulation
Learning mode support
TX/RX simultaneously
Hardware encode/decode
IRQ and I/O port support
Carrier frequency calculation
TX with carrier modulation
Learning mode support
TX/RX simultaneously
Voltage Comparator (Different pin-out
compared with KB930)
General Waveform Generator
51ON Power Management
1.3 Comparison (KB930 vs. KB9012)
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
LPC I/F
8051
build-in with
2 16-bit timers
1 UART
24 extended interrupt channels
ENE Host BUS
XBI/XIO
ENE
2nd
BUS
4KB
SRAM
GPT
x 4
GPIO
x 106
EC
hardware
command
x 5
KBC
hardware
command
x 8
FAN
X 2
WDT
IKB
18 x 8
hardware
command
x 10
PS2
x 3
LPC/FWH
MEM cycles
EC
Port 80
Index
IO Cycles
KBC
IO Cycles
code
Fetching
Bus
Data
Bus
EC Index mode can accessing
full register space by this path
clock
control
DAC
x 4
16.384 Mhz
32.768 Khz
PMU
ADC
X 8
CIR
SPI I/F
ESB
PECI
OWM
SHDI
PWM
X 6
SMBx2
4 ports
PCI clock
32.768 Mhz
GWG
EDI
1.4 Block Diagram
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
2143658
7109
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
KSI1
KSI0
KSO15
KSO14
KSO13
KSO12
KSO11
KSO10
KSO9
KSO8
KSO7
KSO6
KSO5
KSO4
KSO3
KSO2
KSO1
KSO0
CLKRUN#
ECRST#
GPIO1A
GND
GPIO19
VCC
1112131415161718192021222324252627
28
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
293031
32
64
63
62
61
KSI5
KSI4
KSI3
KSI2
101
102
103
104
97
98
99
100
KB9012
128-LQFP
9695949392
91
90
8981888786
83
82
85
84
75
80
77
76
79
78
69
74
71
70
73
72
65
676668
KSI6
KSI7
AD0
AD1
GA20
KBRST#
SERIRQ
LFRAME#
LAD3
GPIO04
GPIO0A
LAD0
GPIO08
VCC
GPIO07
LAD1
PCIRST#
LAD2
PCICLK
GND
GPIO0D
GPIO0C
GPIO0B
SCI#
PWM0
VCC
PWM1
GND
PWM2
FANPWM0
FANPWM1
FANFB0
FANFB1
GPIO16
GPIO18
GPIO17
AD2
AD3
AVCC
DA0
DA3
DA2
DA1
AGND
AD4
AD5
SCL1
SDA1
KSO17
KSO16
SCL0
SDA0
PSDAT1
PSCLK1
PSDAT2
PSCLK2
PSDAT3
PSCLK3
GPIO50
GPIO52
GPIO53
GPIO54
GPIO55
GND
GPIO56
VCC
GPXIOA00
GPXIOA01
GPXIOA02
GPXIOA03
GPXIOA04
GPXIOA05
GPXIOA06
GPXIOA07
GPXIOA08
GPXIOA09
GPXIOA10
GPXIOA11
GPXIOD00
GPXIOD01
GPXIOD02
GPXIOD03
GPXIOD04
GPXIOD05
GPXIOD06
GPXIOD07
GND_0
VCC_0
GPIO5B
GPIO5C
GPIO57
V18R
VCC
GPIO58
GPIO5A
GPIO59
AD6
AD7
GPIO5D
GPIO5E
2. Pin Assignment and Description
2.1 KB9012 128-pin LQFP Diagram Top View
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
A1 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A12 A13
B1 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B12 B13
C1 C2 C12 C13
D1 D10 D9 D8 D7 D6 D5 D4 D2 D12 D13
E1 E10 E9 E8 E7 E6 E5 E4 E2 E12 E13
F1 F10 F9 F5 F4 F2 F12 F13
G1 G10 G9 G5 G4 G2 G12 G13
H1 H10 H9 H5 H4 H2 H12 H13
J1 J10 J9 J8 J7 J6 J5 J4 J2 J12 J13
K1 K10 K9 K8 K7 K6 K5 K4 K2 K12 K13
L1 L2 L12 L13
M1
M11 M10
M9 M8 M7 M6 M5 M4 M3 M2
M12 M13
N1 N11 N10 N9 N8 N7 N6 N5 N4 N3 N2 N12 N13
GPXIOA01 GPIO55 GPIO54 GPIO52 PSCLK3 SDA1 SDA0 SCL0 DA1 DA2 AGND
AD3 AD1
GPXIOA00 GPIO56 GPIO53 GPIO50 PSDAT3 GPIO40(AD6) GPIO41(AD7) SCL1 DA3 DA0 AVCC
AD2 AD0
GPXIOA02
GPXIOD00
GPXIOA04 GPXIOA05
GPXIOA08 GPXIOA06
GPXIOA11 GPXIOA10
GPXIOD02 GND
GPXIOD04GPXIOD07(PECI)
XCLKI (MOSI)
XCLKO (MISO)
V18R KBRST#
KSI5 KSI6
KSI3 KSI4
KSI1 KSI2
VCC ECRST#
KSO1 KSO0
KSO2 KSO3
KSO9 KSO8
KSO11 KSO10
GPIO1A GPIO08
VCC GPIO19
GPIO18
GND
GPXIOA03 PSDAT2 PSCLK1 AD5 KSO17 KSI0
KSI7
GPXIOA07 PSCLK2 PSDAT1 AD4 KSO16 KSO15
KSO14
GPXIOA09 GPXIOD01
GPXIOD05 GPXIOD03
GPXIOD06 GPIO57
KSO13
KSO12
KSO6
KSO7
KSO5
KSO4
VCC GPIO04 VCC VCC GND GND
GND
LFRAME# LAD1 GPIO0A VCC GPIO11 GPIO17
GPIO16
LAD2 PCIRST# CLKRUN# GPIO0C PWM1 PWM0
FANPWM0
FANFB0
LAD0 PCICLK SCI# GPIO0B GPIO0D GPIO07
FANPWM1
FANFB1
(SPICLK) GA20 SERIRQ
GPIO59 (SPICS#) LAD3
2.2 KB9012 128 LFBGA Ball Map
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
2.3 KB9012 Pin Assignment Side A
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
2.4 KB9012 Pin Assignment Side B
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
2.5 KB9012 Pin Assignment Side C
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
2.6 KB9012 Pin Assignment Side D
* Please note, crystal pad signal frequency should be lower than 1MHz.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Schmitt trigger, 16mA Output / Sink Current, Input / Output / Pull Up
Enable(40KΩ ) , 5 V Tolerance.
Schmitt trigger, 4mA Output / Sink Current, Input / Output / Pull Up
Enable(40KΩ ) , 5 V Tolerance
Schmitt trigger, 16mA Output / Sink Current, 5 V Tolerance, Input / Output / Pull
Up Enable
Schmitt trigger, 4mA Output / Sink Current, 5 V Tolerance, Input / Output
Enable
Schmitt trigger, 8mA Output / Sink Current, 5V Tolerance, Input / Output / Pull
Up Enable
Mixed Mode IO, PECI enable, with GPIO
GPIO: Schmitt trigger, 4mA Output / Sink Current,
PECI: 0.9V~1.2V
Mixed Mode IO, AE enable, with GPIO
GPIO: Schmitt trigger, 4mA Output / Sink Current, Input / Output / Pull Up
Enable
2.7 I/O Cell Descriptions
2.7.1 I/O Buffer Table
** Please note, the total current in each side on VCC or VSS of chip can not exceed over 48mA .
*** Please note, As BQCZT04IV with shared crystal pad, signal frequency should be lower than 1MHz.
2.7.2 I/O Buffer Characteristic Table
* 5V Tolerance, only if pull-high disable and output disable.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
While this trap is asserted to be low, the internal DPLL circuit uses other clock source
for reference, instead of 32KHz oscillator.
Low: test clock mode enable
High: normal mode using 32KHz oscillator.
While this trap is asserted to be low, some DPLL related signals can be output for
test.
Low: DPLL test mode enable.
High: DPLL test mode disable
TestMux Mode Trap
Low: Test mode
High: Normal operation
TP_PLL_Lock
(GPIO23,KSO3)
This trap is used for eFlash & EDI operation, , the 8051 will be held at reset state
LOW: Test Mode
HIGH: Normal operation
* Please note while TP_TMUX and TP_PLL_Lock keep low at the same time, a mechanism called FlashDirectAccess will
enable. That is, users can flush and program a SPI flash via specific IKB pins with external tool.
FlashDirectAccess:
The KBC provides a new interface to program SPI flash via IKB interface. With this feature, users can easily utilize 4 pins
from keyboard matrix (IKB) without disassembly whole machine. These 4 pins are connected directly to external SPI-Flash
interface. The following table shows the mapped pins while entering FlashDirectAccess mode.
EDI : For detail ENE Debug Interface, please refer the EDI section for enabling, instruction, and application.
(Input) EDI_CS, Transfer signal from terminal into KBC and though SPICS# to SPI_Flash
(Input) EDI_CLK, Transfer signal from terminal into KBC and though SPICLK to SPI_Flash
(Input) EDI_DIN, Transfer signal from terminal into KBC and though MOSI to SPI_Flash
(Output) EDI_DO, Transfer signal from terminal into KBC and though MISO to SPI_Flash
ENE
KBC
Terminal
SPI-Flash
P128, SPICS#
P120, MOSI
P119, MISO
P126, SPICLK
P59, KSI4
P60, KSI5
P61, KSI6
P62, KSI7
EDI_CS
EDI_CLK
EDI_DIN
EDI_DO
3. Pin Descriptions
3.1 Hardware Trap
Hardware trap pins are used to latch external signal at rising edge of ECRST# . The hardware
trap pins are for some special purpose which should be defined while boot-up. The following table
gives the collection of hardware trap pins. Please note, all the following hardware trap pins are
pull-high internally after reset.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
LPC frame control signal.
LPC module reset by this signal.
PS/2 port 1 clock
Muxed with SMBus port 2 clock
PS/2 port 1 data
Muxed with SMBus port 2 data
PS/2 port 2 clock
Muxed with SMBus port 3 clock
PS/2 port 2 data
Muxed with SMBus port 3 data
SMBus clock (interface 0)
SMBus clock (interface 1)
SMBus clock (interface 2)
Muxed with PS/2 port 1 clock
SMBus data (interface 2)
Muxed with PS/2 port 1 data
SMBus clock (interface 3)
Muxed with PS/2 port 2 clock
SMBus data (interface 3)
Muxed with PS/2 port 2 data
3.2 Pin Descriptions by Functions
3.2.1 Low Pin Count I/F Descriptions.
3.2.2 PS/2 I/F Descriptions
3.2.3 Internal Keyboard Encoder (IKB) Descriptions
3.2.4 SMBus Descriptions
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
10bit A/D converter input
10bit A/D converter input
10bit A/D converter input
10bit A/D converter input
8bit D/A converter output
8051 serial port, transmit port.
8051 serial port, receive port.
For different serial scheme, E51CLK will shift out clock.
3.2.5 FAN Descriptions
3.2.6 Pulse Width Modulation (PWM) Descriptions
3.2.7 Analog-to-Digital Converter Descriptions
3.2.8 Digital-to-Analog Converter Descriptions
3.2.9 8051 External I/F Descriptions
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
KBC will gate A20 address line
KBRST# is used to generate system reset.
SCI# asserts to the system for requesting service while
related events occur.
While ECRST# asserted, the KBC will reset globally.
One Wire Master input and output signal
PECI input and output signal
General Waveform Generator for 3D application
Used to indicate the power fail under Power Fail Voltage.
Used to indicate the power fail under Power Fail Voltage.
Voltage comparator input port0
Voltage comparator output port0
Voltage comparator input port1
Voltage comparator output port1
Power supply for digital plane.
Power ground for digital plane.
Power supply for analog plane.
Power ground for analog plane.
Connected to external Capacitor for internal 1.8V
Power supply for 51ON power management
Power ground for 51ON power management
3.2.10 External Clock Descriptions
(These pins are reserved for external CLK design structure, also could be set as GPIO function)
3.2.11 Miscellaneous Signals Descriptions
3.2.12 Voltage Comparator Pins Descriptions
3.2.13 Power Pins Descriptions
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
3.2.14 51ON Power Pins Descriptions
(The 51ON power management are with different power domain from main IC power)
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
This power provides power for all digital logic no matter what
power mode is.
This power provides power for all analog logic, such as A/D
and D/A converter.
The system inputs 3.3V power and the internal regulator
outputs 1.8V voltage. The 1.8V output should connect a
capacitor for stable purpose.
This power provides power for the power-latch circuit. It could
help to provide power saving management.
4. Module Descriptions
4.1 Chip Architecture
4.1.1 Power Planes
Power planes are ± 10% tolerance for recommend operation condition, The KBC provides
V1.8 power plane for different generation.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
PCI clock 33MHz for LPC I/F.
Main clock for 8051/peripheral. DPLL clock can be generated with or without XCLK for
reference. DPLL clock can be divided for different applications. Fig. 4-1 gives an example for
illustration.
External 32.768KHz for reference.
* While power on default, no matter what value CLKCFG[3:2], CLKCFG[6] are, the dividend (X,Y,Z) is always (4,
8, 16). The PCI clock is 66MHz, X= 66/4 = 16MHz, Y= 66/8 = 8Mhz , Z= 66/16 = 4MHz
Be noted that, these clock frequency is only valid after KBC correctly referring clock.
4.1.2 Clock Domains
Three clock sources, PCICLK, DPLL_CLK and XCLKI will be discussed in this section. A
summary is list in the following table.
The following figure shows more detail about the operation in the KBC. The external
32.768KHz is provided for two purposes. One is to provide an accurate reference for internal DPLL
module, and the other one is to provide another clock source for watchdog timer.
The possible (X,Y,Z) combination with exact clock value is summarized as the following table.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
PCICLK
0xFF1F[5]
PLLCFG2
0
1
External Source
0xFE8A[0]
Internal OSC
0xFE8A[1]
0xFE8A[2]
CLK32CR
0
1
10-bit
Divider
DPLL
& Clock
Generator
0xFF1F[4]
PLLCFG2
0
1
WDT
0
1
0xFE80[7]
WDTCFG
{
XBI, SPI Flash
8051, SRAM, GPT, GPIO
Peripheral
0xFF0D[5]
CLKCFG
Enable
0xFE8A[5:4]
CLK32CR
Pin 122 , Pin 123
00 : GPIO5D, GPIO5E
01 : GPIO5D, XCLKO as external clock input
10 : XLCKI, GPIO5E, where XLCKI is external clock input
11 : XLCKI, XCLKO, as crystal pads to external crystal
KBC
Pin 122
Pin 123
32k Source Pad Configuration
Note: Internal OSC of KB9012 application
Since KB9012 also provide internal OSC, the clock source selection is similar
to KBx930. Developer could choose clock source from internal-OSC, external
crystal, or host LPCLCK depending on different application and system status. As
following is simplified clocking distribution tree for setting.
Please note that, KB9012 also support external clock source without crystal
device. For correctly configuration, please contact your sales or technical
representative for the application note: Using External OSC Clock Source for ENE Keyboard
Controller.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
4.1.3 PCICLK and CLKRUN#
While system power-on, the host starts to drive CLKRUN# low for a while to inform the slaves
that a 33MHz PCICLK will be given. At this moment, CLKRUN# of KBC is in input mode. If the host
tries to stop the PCICLK for some purpose, the CLKRUN# will be de-asserted. In KB9012 design,
the KBC responses CLKRUN# signal according to LPC_CDCSR configuration. Please refer section
4.13.7 LPC Registers Description for KB9012 application. For more detail please refer to PCI Mobile
Design Guide version 1.1 .
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Space mapped to system BIOS
ENE serial bus controller
SPI host interface/
SPI device interface
General Waveform Generation
General purpose wakeup event
4.1.4 Internal Memory Map
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
4.2 GPIO
GPIOFSx is only for Output Function Selection, not for Input Function.
Example1 – GPIO14 is used as FANFB1, then
GPIO(GPIOFS10) 0xFC02 b‘4 must be 0,
GPIO(GPIOIE10) 0xFC62 b‘4 must be 1.
Example2 – PS/2 clock/data lines and SMBus clock/data are bi-directional.
They must be programmed as Output Function Selection = 1 and Input Enable = 1.
For other specific GPIO initialization, please refer the SW programming guide.
4.2.1 GPIO Function Description
The GPIO module is flexible for different applications. Each GPIO pin can be configured
as alternative input or alternative output mode. The alternative function can be selected by register
setting. A summary table is given as below for more detail.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
GPIOFS20.[5]
GPIO_MISC2[7]
GPIOFS20.[6]
GPIO_MISC2[7]
GPIOFS20.[7]
GPIO_MISC2[7]
GPIOFS28.[0]
GPIO_MISC2[7]
GPIOFS28.[3]
GPIO_MISC2[7]
GPIOFS28.[4]
GPIO_MISC2[7]
GPIOFS28.[5]
GPIO_MISC2[7]
GPIOFS28.[6]
GPIO_MISC2[7]
GPIOFS28.[7]
GPIO_MISC2[2]
GPIOFS30.[0]
GPIO_MISC2[2]
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
GPIOFS48.[2]
GPIO_MISC2[4]
GPIOFS48.[3]
GPIO_MISC2[4]
GPIOFS48.[4]
GPIO_MISC2[5]
GPIOFS48.[5]
GPIO_MISC2[5]
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
* In KB9012, these GPIO pins no more exist. The corresponding register bits do not work.
** Please Note in KB9012, the GPXIOAx / GPXIODx could be configured PU / OD pin by pin.
*** Please note, crystal pad signal frequency should be lower than 1MHz.
★ If DAC function selected, please do not set this register bit.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
4.2.2 GPIO Structures
In this section, the GPIO structure is illustrated as following diagram. The upper part is
alternative output circuit and the lower part is alternative input circuit. In the figure, GPIOFS is used
to enable alternative output. GPIOOD is for open-drain setting with output function. GPIOOE is the
switch for data output. As shown in the figure, the alternative input embedded with pull-high and
interrupt feature.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
GPIOFS20.[5]
GPIO_MISC2[7]
GPIOFS20.[6]
GPIO_MISC2[7]
GPIOFS20.[7]
GPIO_MISC2[7]
GPIOFS28.[0]
GPIO_MISC2[7]
4.2.3 GPIO Attribution Table
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
GPIOFS28.[3]
GPIO_MISC2[7]
GPIOFS28.[4]
GPIO_MISC2[7]
GPIOFS28.[5]
GPIO_MISC2[7]
GPIOFS28.[6]
GPIO_MISC2[7]
GPIOFS28.[7]
GPIO_MISC2[2]
GPIOFS30.[0]
GPIO_MISC2[2]
GPIOFS48.[2]
GPIO_MISC2[4]
GPIOFS48.[3]
GPIO_MISC2[4]
GPIOFS48.[4]
GPIO_MISC2[5]
GPIOFS48.[5]
GPIO_MISC2[5]
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
* Denotes that these pins do not exist in KB9012
** Please Note in KB9012, the GPXIOAx / GPXIODx could be configured PU / OD pin by pin.
*** Please note, crystal pad signal frequency should be lower than 1MHz.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Function Selection Register
GPIO00~GPIO07 Function Selection
bit[0]~bit[7] stand for GPIO00~GPIO07 separately
0: General purpose output function selected
1: Alternative output function selected.
Note: No GPIO02/03/06 in KB9012 IC.
GPIO08~GPIO0F Function Selection
bit[0]~bit[7] stand for GPIO08~GPIO0F separately
0: General purpose output function selected
1: Alternative output function selected.
Note: No GPIO09 in KB9012 IC.
GPIO10~GPIO17 Function Selection
bit[0]~bit[7] stand for GPIO10~GPIO17 separately
0: General purpose output function selected
1: Alternative output function selected.
GPIO18~GPIO1F Function Selection
bit[0]~bit[7] stand for GPIO18~GPIO1F separately
0: General purpose output function selected
1: Alternative output function selected.
Note: No GPIO1B/1C/1E/1F in KB9012 IC.
GPIO20~GPIO27 Function Selection
bit[0]~bit[7] stand for GPIO20~GPIO27 separately
0: General purpose output function selected
1: Alternative output function selected.
GPIO28~GPIO2F Function Selection
bit[0]~bit[7] stand for GPIO28~GPIO2F separately
0: General purpose output function selected
1: Alternative output function selected.
GPIO30~GPIO37 Function Selection
bit[0]~bit[7] stand for GPIO30~GPIO37 separately
0: General purpose output function selected
1: Alternative output function selected.
GPIO38~GPIO3F Function Selection
bit[0]~bit[7] stand for GPIO38~GPIO3F separately
0: General purpose output function selected
1: Alternative output function selected.
GPIO40~GPIO47 Function Selection
bit[0]~bit[7] stand for GPIO40~GPIO47 separately
0: General purpose output function selected
1: Alternative output function selected.
GPIO48~GPIO4F Function Selection
bit[0]~bit[7] stand for GPIO48~GPIO4F separately
0: General purpose output function selected
1: Alternative output function selected.
4.2.4 GPIO Registers Descriptions (0xFC00~0xFC7F)
In KB9012, new GPIOs are added. Related control registers are added for
ADC/DAC/CLK/GPXIOA/GPXIOD related GPIOs.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Function Selection Register
GPIO50~GPIO57 Function Selection
bit[0]~bit[7] stand for GPIO50~GPIO57 separately
0: General purpose output function selected
1: Alternative output function selected.
Note: No GPIO51 in KB9012 IC.
GPIO58~GPIO5F Function Selection
bit[0]~bit[7] stand for GPIO58~GPIO5F separately
0: General purpose output function selected
1: Alternative output function selected.
Note: No GPIO5F in KB9012 IC.
GPXIOA00~GPXIOA07 Function Selection
bit[0]~bit[7] stand for GPXIOA00~GPXIOA07 separately
0: General purpose output function selected
1: Alternative output function selected.
GPXIOA08~GPXIOA15 Function Selection
bit[0]~bit[7] stand for GPXIOA08~GPXIOA15 separately
0: General purpose output function selected
1: Alternative output function selected.
Note: No GPXIOA12/13/14/15 in KB9012 IC.
GPXIOD00~GPXIOD07 Function Selection
bit[0]~bit[7] stand for GPXIOD00~GPXIOD07 separately
0: General purpose output function selected
1: Alternative output function selected.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
GPIO00~GPIO07 Output Enable
bit[0]~bit[7] stand for GPIO00~GPIO07 separately
0: Output Disable
1: Output Enable
Note: No GPIO02/03/06 in KB9012 IC.
GPIO08~GPIO0F Output Enable
bit[0]~bit[7] stand for GPIO08~GPIO0F separately
0: Output Disable
1: Output Enable
Note: No GPIO09 in KB9012 IC.
GPIO10~GPIO17 Output Enable
bit[0]~bit[7] stand for GPIO10~GPIO17 separately
0: Output Disable
1: Output Enable
GPIO18~GPIO1F Output Enable
bit[0]~bit[7] stand for GPIO18~GPIO1F separately
0: Output Disable
1: Output Enable
Note: No GPIO1B/1C/1E/1F in KB9012 IC.
GPIO20~GPIO27 Output Enable
bit[0]~bit[7] stand for GPIO20~GPIO27 separately
0: Output Disable
1: Output Enable
GPIO28~GPIO2F Output Enable
bit[0]~bit[7] stand for GPIO28~GPIO2F separately
0: Output Disable
1: Output Enable
GPIO30~GPIO37 Output Enable
bit[0]~bit[7] stand for GPIO30~GPIO37 separately
0: Output Disable
1: Output Enable
GPIO38~GPIO3F Output Enable
bit[0]~bit[7] stand for GPIO3C~GPIO3F separately
0: Output Disable
1: Output Enable
GPIO40~47 Output Enable
bit[0]~bit[7] stand for GPIO40~GPIO47 separately
0: Output Disable
1: Output Enable
GPIO48~GPIO4F Output Enable
bit[0]~bit[7] stand for GPIO48~GPIO4F separately
0: Output Disable
1: Output Enable
GPIO50~GPIO57 Output Enable
bit[0]~bit[7] stand for GPIO50~GPIO57 separately
0: Output Disable
1: Output Enable
Note: No GPIO51 in KB9012 IC.
GPIO58~GPIO5F Output Enable
bit[0]~bit[7] stand for GPIO58~GPIO59 separately
0: Output Disable
1: Output Enable
Note: No GPIO5F in KB9012 IC.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
GPXIOA00~GPXIOA07 Output Enable
bit[0]~bit[7] stand for GPXIOA00~GPXIOA07 separately
0: Output Disable
1: Output Enable
GPXIOA08~GPXIOA15 Output Enable
bit[0]~bit[7] stand for GPXIOA08~GPXIOA15 separately
0: Output Disable
1: Output Enable
Note: No GPXIOA12/13/14/15 in KB9012 IC.
GPXIOD00~GPXIOD07 Output Enable
bit[0]~bit[7] stand for GPXIOD00~GPXIOD07 separately
0: Output Disable
1: Output Enable
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Output Data Port Register
GPIO00~GPIO07 Output Data Port for output function.
Bit[0]~bit[7] stand for GPIO00~GPIO07 separately
Note: No GPIO02/03/06 in KB9012 IC.
GPIO08~GPIO0F Output Data Port for output function.
Bit[0]~bit[7] stand for GPIO08~GPIO0F separately
Note: No GPIO09 in KB9012 IC.
GPIO10~GPIO17 Output Data Port for output function.
Bit[0]~bit[7] stand for GPIO10~GPIO17 separately
GPIO18~GPIO1F Output Data Port for output function.
Bit[0]~bit[7] stand for GPIO18~GPIO1F separately
Note: No GPIO1B/1C/1E/1F in KB9012 IC.
GPIO20~GPIO27 Output Data Port for output function.
Bit[0]~bit[7] stand for GPIO20~GPIO27 separately
GPIO28~GPIO2F Output Data Port for output function.
Bit[0]~bit[7] stand for GPIO28~GPIO2F separately
GPIO30~GPIO37 Output Data Port for output function.
Bit[0]~bit[7] stand for GPIO30~GPIO37 separately
GPIO38~GPIO3F Output Data Port for output function.
Bit[0]~bit[7] stand for GPIO38~GPIO3F separately
GPIO40~47 Output Data Port for output function.
Bit[0]~bit[7] stand for GPIO40~GPIO47 separately
GPIO48~GPIO4F Output Data Port for output function.
Bit[0]~bit[7] stand for GPIO48~GPIO4F separately
GPIO50~GPIO57 Output Data Port for output function.
Bit[0]~bit[7] stand for GPIO50~GPIO57 separately
Note: No GPIO51 in KB9012 IC.
GPIO58~GPIO5F Output Data Port for output function.
Bit[0]~bit[7] stand for GPIO58~GPIO5F separately
Note: No GPIO5F in KB9012 IC.
GPXIOA00~GPXIOA07 Output Data Port for output function.
Bit[0]~bit[7] stand for GPXIOA00~GPXIOA07 separately
GPXIOA08~GPXIOA15 Output Data Port for output function.
Bit[0]~bit[7] stand for GPXIOA08~GPXIOA15 separately
Note: No GPXIOA12/13/14/15 in KB9012 IC.
GPXIOD00~GPXIOD07 Output Data Port for output function.
Bit[0]~bit[7] stand for GPXIOD00~GPXIOD07 separately
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
GPIO00~GPIO07 Input Data Port for input function.
Bit[0]~bit[7] stand for GPIO00~GPIO07 separately
Note: No GPIO02/03/06 in KB9012 IC.
GPIO08~GPIO0F Input Data Port for input function.
Bit[0]~bit[7] stand for GPIO08~GPIO0F separately
Note: No GPIO09 in KB9012 IC.
GPIO10~GPIO17 Input Data Port for input function.
Bit[0]~bit[7] stand for GPIO10~GPIO17 separately
GPIO18~GPIO1F Input Data Port for input function.
Bit[0]~bit[7] stand for GPIO18~GPIO1F separately
Note: No GPIO1B/1C/1E/1F in KB9012 IC.
GPIO20~GPIO27 Input Data Port for input function.
Bit[0]~bit[7] stand for GPIO20~GPIO27 separately
GPIO28~GPIO2F Input Data Port for input function.
Bit[0]~bit[7] stand for GPIO28~GPIO2F separately
GPIO30~GPIO37 Input Data Port for input function.
Bit[0]~bit[7] stand for GPIO30~GPIO37 separately
GPIO38~GPIO3F Input Data Port for input function.
Bit[0]~bit[7] stand for GPIO38~GPIO3F separately
GPIO40~GPIO47 Input Data Port for input function.
Bit[0]~bit[7] stand for GPIO40~GPIO47 separately
GPIO48~GPIO4F Input Data Port for input function.
Bit[0]~bit[7] stand for GPIO48~GPIO4F separately
GPIO50~GPIO57 Input Data Port for input function.
Bit[0]~bit[7] stand for GPIO50~GPIO57 separately
Note: No GPIO51 in KB9012 IC.
GPIO58~GPIO5F Input Data Port for input function.
Bit[0]~bit[7] stand for GPIO58~GPIO5F separately
Note: No GPIO5F in KB9012 IC.
GPXIOA00~GPXIOA07 Input Data Port for input function.
Bit[0]~bit[7] stand for GPXIOA00~GPXIOA07 separately
GPXIOA08~GPXIOA15 Input Data Port for input function.
Bit[0]~bit[7] stand for GPXIOA08~GPXIOA15 separately
Note: No GPXIOA12/13/14/15 in KB9012 IC.
GPXIOD00~GPXIOD07 Input Data Port for input function.
Bit[0]~bit[7] stand for GPXIOD00~GPXIOD07 separately
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
GPIO00~GPIO07 Internal Pull-Up Resistor Enable for input
function
bit[0]~bit[7] stand for GPIO00~GPIO07 separately
0: Pull-Up resistor disable
1: Pull-Up resistor enable
Note: No GPIO02/03/06 in KB9012 IC.
GPIO08~GPIO0F Internal Pull-Up Resistor Enable for input
function
bit[0]~bit[7] stand for GPIO08~GPIO0F separately
0: Pull-Up resistor disable
1: Pull-Up resistor enable
Note: No GPIO09 in KB9012 IC.
GPIO10~GPIO17 Internal Pull-Up Resistor Enable for input
function
bit[0]~bit[7] stand for GPIO10~GPIO17 separately
0: Pull-Up resistor disable
1: Pull-Up resistor enable
GPIO18~GPIO1F Internal Pull-Up Resistor Enable for input
function
bit[0]~ bit[7] stand for GPIO18~GPIO1F separately
0: Pull-Up resistor disable
1: Pull-Up resistor enable
Note: No GPIO1B/1C/1E/1F in KB9012 IC.
GPIO20~GPIO27 Internal Pull-Up Resistor Enable for input
function
bit[0]~bit[7] stand for GPIO20~GPIO27 separately
0: Pull-Up resistor disable
1: Pull-Up resistor enable
GPIO28~GPIO2F Internal Pull-Up Resistor Enable for input
function
bit[0]~bit[7] stand for GPIO28~GPIO2F separately
0: Pull-Up resistor disable
1: Pull-Up resistor enable
GPIO30~GPIO37 Internal Pull-Up Resistor Enable for input
function
bit[0]~bit[7] stand for GPIO30~GPIO37 separately
0: Pull-Up resistor disable
1: Pull-Up resistor enable
GPIO38~GPIO3F Internal Pull-Up Resistor Enable for input
function
bit[0]~bit[7] stand for GPIO38~GPIO3F separately
0: Pull-Up resistor disable
1: Pull-Up resistor enable
GPIO40~47 Internal Pull-Up Resistor Enable for input function
bit[0]~bit[7] stand for GPIO40~GPIO47 separately
0: Pull-Up resistor disable
1: Pull-Up resistor enable
Note: No Pull-UP Resistor in GPIO44/45/46/47 in KB9012 IC.
GPIO48~GPIO4F Internal Pull-Up Resistor Enable for input
function
bit[0]~bit[7] stand for GPIO48~GPIO4F separately
0: Pull-Up resistor disable
1: Pull-Up resistor enable
Note: No Pull-UP Resistor in GPIO4A/4B/4E/4F in KB9012 IC.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
GPIO50~GPIO57 Internal Pull-Up Resistor Enable for input
function
bit[0]~bit[7] stand for GPIO50~57 separately
0: Pull-Up resistor disable
1: Pull-Up resistor enable
Note: No GPIO51 in KB9012 IC.
Note: No Pull-UP Resistor in GPIO50 in KB9012 IC.
GPIO58~GPIO5F Internal Pull-Up Resistor Enable for input
function
bit[0]~bit[7] stand for GPIO58~GPIO5F separately
0: Pull-Up resistor disable
1: Pull-Up resistor enable
Note: No GPIO5F in KB9012 IC.
GPXIOA00~GPXIOA07 Internal Pull-Up Resistor Enable for
input function
bit[0]~bit[7] stand for GPXIOA00~GPXIOA07 separately
0: Pull-Up resistor disable
1: Pull-Up resistor enable
GPXIOA08~GPXIOA15 Internal Pull-Up Resistor Enable for
input function
bit[0]~bit[7] stand for GPXIOA08~GPXIOA15 separately
0: Pull-Up resistor disable
1: Pull-Up resistor enable
Note: No GPXIOA12/13/14/15 in KB9012 IC.
GPXIOD00~GPXIOA07 Internal Pull-Up Resistor Enable for
input function
bit[0]~bit[7] stand for GPXIOD00~GPXIOA07 separately
0: Pull-Up resistor disable
1: Pull-Up resistor enable
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Open Drain Enable Register
GPIO00~GPIO07 Open Drain Enable for output function
bit[0]~bit[7] stand for GPIO00~GPIO07 separately
0: Open drain disable
1: Open drain enable.
Note: No GPIO02/03/06 in KB9012 IC.
GPIO08~GPIO0F Open Drain Enable for output function
bit[0]~bit[7] stand for GPIO08~GPIO0F separately
0: Open drain disable
1: Open drain enable.
Note: No GPIO09 in KB9012 IC.
GPIO10~GPIO17 Open Drain Enable for output function
bit[0]~bit[7] stand for GPIO10~GPIO17 separately
0: Open drain disable
1: Open drain enable.
GPIO18~GPIO1F Open Drain Enable for output function
bit[0]~bit[7] stand for GPIO18~GPIO1F separately
0: Open drain disable
1: Open drain enable.
Note: No GPIO1B/1C/1E/1F in KB9012 IC.
GPIO20~GPIO27 Open Drain Enable for output function
bit[0]~bit[7] stand for GPIO20~GPIO27 separately
0: Open drain disable
1: Open drain enable.
GPIO28~GPIO2F Open Drain Enable for output function
bit[0]~bit[7] stand for GPIO28~GPIO2F separately
0: Open drain disable
1: Open drain enable.
GPIO30~GPIO37 Open Drain Enable for output function
bit[0]~bit[7] stand for GPIO30~GPIO37 separately
0: Open drain disable
1: Open drain enable.
GPIO38~GPIO3F Open Drain Enable for output function
bit[0]~bit[7] stand for GPIO38~GPIO3F separately
0: Open drain disable
1: Open drain enable.
GPIO40~47 Open Drain Enable for output function
bit[0]~bit[7] stand for GPIO40~GPIO47 separately
0: Open drain disable
1: Open drain enable.
GPIO48~GPIO4F Open Drain Enable for output function
bit[0]~bit[7] stand for GPIO48~GPIO4F separately
0: Open drain disable
1: Open drain enable.
GPIO50~GPIO57 Open Drain Enable for output function
bit[0]~bit[7] stand for GPIO50~GPIO57 separately
0: Open drain disable
1: Open drain enable.
Note: No GPIO51 in KB9012 IC.
GPIO58~GPIO5F Open Drain Enable for output function
bit[0]~bit[7] stand for GPIO58~GPIO5F separately
0: Open drain disable
1: Open drain enable.
Note: No GPIO5F in KB9012 IC.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Open Drain Enable Register
GPXIOA00~GPXIOA07 Open Drain Enable for output
function
bit[0]~bit[7] stand for GPXIOA00~GPXIOA07 separately
0: Open drain disable
1: Open drain enable.
GPXIOA08~GPXIOA15 Open Drain Enable for output
function
bit[0]~bit[7] stand for GPXIOA08~GPXIOA15 separately
0: Open drain disable
1: Open drain enable.
Note: No GPXIOA12/13/14/15 in KB9012 IC.
GPXIOD00~GPXIOD07 Open Drain Enable for output
function
bit[0]~bit[7] stand for GPXIOD00~GPXIOD07 separately
0: Open drain disable
1: Open drain enable.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
GPIO00~GPIO07 Input Enable for input function
bit[0]~bit[7] stand for GPIO00~GPIO07 separately
0: GPIO input mode disable
1: GPIO input mode enable.
Note: No GPIO02/03/06 in KB9012 IC.
GPIO08~GPIOF Input Enable for input function
bit[0]~bit[7] stand for GPIO08~GPIO0F separately
0: GPIO input mode disable
1: GPIO input mode enable.
Note: No GPIO09 in KB9012 IC.
GPIO10~GPIO17 Input Enable for input function
bit[0]~bit[7] stand for GPIO10~GPIO17 separately
0: GPIO input mode disable
1: GPIO input mode enable.
GPIO18~GPIO1F Input Enable for input function
bit[0]~bit[7] stand for GPIO18~GPIO1F separately
0: GPIO input mode disable
1: GPIO input mode enable.
Note: No GPIO1B/1C/1E/1F in KB9012 IC.
GPIO20~GPIO27 Input Enable for input function
bit[0]~bit[7] stand for GPIO20~GPIO27 separately
0: GPIO input mode disable
1: GPIO input mode enable.
GPIO28~GPIO2F Input Enable for input function
bit[0]~bit[7] stand for GPIO28~GPIO2F separately
0: GPIO input mode disable
1: GPIO input mode enable.
GPIO30~GPIO37 Input Enable for input function
bit[0]~bit[7] stand for GPIO30~GPIO37 separately
0: GPIO input mode disable
1: GPIO input mode enable.
GPIO38~GPIO3F Input Enable for input function
bit[0]~bit[7] stand for GPIO38~GPIO3F separately
0: GPIO input mode disable
1: GPIO input mode enable.
GPIO40~GPIO47 Input Enable for input function
bit[0]~bit[7] stand for GPIO40~GPIO47 separately
0: GPIO input mode disable
1: GPIO input mode enable.
GPIO48~GPIO4F Input Enable for input function
bit[0]~bit[7] stand for GPIO48~GPIO4F separately
0: GPIO input mode disable
1: GPIO input mode enable.
GPIO50~GPIO57 Input Enable for input function
bit[0]~bit[7] stand for GPIO50~GPIO57 separately
0: GPIO input mode disable
1: GPIO input mode enable.
Note: No GPIO51 in KB9012 IC.
GPIO58~GPIO5F Input Enable for input function
bit[0]~bit[7] stand for GPIO58~GPIO5F separately
0: GPIO input mode disable
1: GPIO input mode enable.
Note: No GPIO5F in KB9012 IC.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
GPXIOA00~GPXIOA07 Input Enable for input function
bit[0]~bit[7] stand for GPXIOA00~GPXIOA07 separately
0: GPIO input mode disable
1: GPIO input mode enable.
GPXIOA08~GPXIOA15 Input Enable for input function
bit[0]~bit[7] stand for GPXIOA08~GPXIOA15separately
0: GPIO input mode disable
1: GPIO input mode enable.
Note: No GPXIOA12/13/14/15 in KB9012 IC.
GPXIOD00~GPXIOD07 Input Enable for input function
bit[0]~bit[7] stand for GPXIOD00~GPXIOD07 separately
0: GPIO input mode disable
1: GPIO input mode enable.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
GPIO_MISC Control Register
ESB_DAT(GPIO0C) output current selection
0: 4mA
1: 8mA
SPICLK(GPIO58) output current selection
0: 8mA
1: 16mA
ESB_CLK(GPIO0B) output current selection
0: 8mA
1: 16mA
GPIO17 / GPIO18 are featured with signal bypass function.
Signal input via GPIO17 can be directly passed through
GPIO18.
0: Pass through function disable
1: Pass through function enable
SHDI pin-out enable (GPXA00/01/02, GPXD00)
0: disable
1: enable
Also refer to SHICFG
SHDI pin-out enable (GPIO58/5A/5B/5C)
0: disable
1: enable
Also refer to SHICFG
Beep glue logic switch.
GPIO12 can be output a specific function as following formula.
GPIO12 = PWM2 ⊕ GPIO16(input) ⊕ GPIO17(input)
0: Beep glue logic function disable
1: Beep glue logic function enable
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
GPIO_MISC 2 Control Register
LPC bus redirection enable, will redirect LPC bus to relative
KSO pins:
0: Disable
1: Enable
PCICLK to GPIO25(KSO5)
PCIRST# to GPIO26(KSO6)
SERIRQ to GPIO27(KSO7)
LFRAME# to GPIO28(KSO8)
LAD3 to GPIO2B(KSO11)
LAD2 to GPIO2C(KSO12)
LAD1 to GPIO2D(KSO13)
LAD0 to GPIO2E(KSO14)
Select GPIO25(KSO5) output current 4mA/16mA
=0, Select Output Current 4mA for GPIO25(KSO5)
=1, Select Output Current 16mA for GPIO25(KSO5)
Enable SMBus port 3 (SCL3/SDA3)
0:Disable
1:Enable
Enable SMBus port 2 (SCL2/SDA2)
0:Disable
1:Enable
Enable E51 Tx/Rx to IKB interface for debugging
E51_TXD : Pin 30, GPIO16 -> Pin 55, GPIO30
E51_RXD : Pin 31, GPIo17 -> Pin 54, GPIO2F
GPX MISC Control Register
GPIO18 output power fail flag enable
0: Disable
1: Enable
GPXIOA03 output power fail flag enable
0: Disable
1: Enable
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Enable high drive IO cell for the specific GPIO,
GPIO55 (SCORLED#) enable
0: Disable (16mA)
1: Enable (20mA)
Enable high drive IO cell for the specific GPIO,
GPIO54 (WDT_LED#) enable
0: Disable (16mA)
1: Enable (20mA)
Enable high drive IO cell for the specific GPIO,
GPIO53 (CAPSLED#) enable
0: Disable (16mA)
1: Enable (20mA)
Enable high drive IO cell for the specific GPIO,
GPIO52 enable
0: Disable (16mA)
1: Enable (20mA)
Enable high drive IO cell for the specific GPIO,
GPIO4D enable
0: Disable (16mA)
1: Enable (20mA)
Enable high drive IO cell for the specific GPIO,
GPIO1A (NUMLED#) enable
0: Disable (16mA)
1: Enable (20mA)
GPIO Flash Direct Access Configuration
Configuration for FDA Mode
00: Disable
01: Reserved
10: Reserved
11: Reserved
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
1. Set function selection register.
GPIOFS00 (0xFC00) = 0x23 (0b 0010 0011)
2. Set related pins to be output enable.
GPIOOE00 (0xFC10) = 0x93 (0b 1001 0011)
3. Set related pins to be input enable.
GPIOIE00 (0xFC60) = 0x6C (0b 0110 1100)
* GPIO02/03/06 do not exist in KB9012 chip
4.2.5 GPIO Programming Sample
In this section gives some programming sample to control GPIO module. Please note,
ENE does not guarantee these codes in every field application. The following table describes
scenario of GPIO filed application.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Write data to keyboard/mouse
Write command to keyboard/mouse
Read data from keyboard/mouse
Read status from keyboard/mouse
Keyboard/Mouse Data Register
Keyboard/Mouse Command Register
4.3 Keyboard and Mouse Control Interface (KBC)
4.3.1 KBC I/F Function Description
The KBC is compatible with i8042 and responsible for keyboard/mouse accessing via
legacy 60h/64h ports. The port 60h is the data port and port 64h is the command port. The legacy
IRQ1 for keyboard devices and IRQ12 for mouse devices can be generated. The KBC interface
provides fast GA20 control for legacy application.
KBC data register can be accessed by host or KBC firmware. Writing this register will setup a
OBF (O utput B uffer F ull) flag, which can be clear by firmware. While the host issues I/O write to
60h/64h port, an IBF (I nput B uffer F ull) flag will assert. The interrupts can be programmed to issue
while the flag of IBF/OBF asserting.
The following table gives a summary about port 60h/64h accessing.
KBC data register, KBCDAT, keeps data from host or data written by KBC firmware.
KBC command register, KBCCMD , is used to keep the command from host. This register is
read only.
KBC status register, KBCSTS , keeps the status as the following table. For more detail please
refer to the section, KBC Registers Description.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
KBC Command Byte Register (KBC command 20h/60h)
PS/2 hardware mode enable
0: Disable
1: Enable
If the host issues command 20h via port 64h, and the KBC
returns data via port 60h. This bit will always be read as zero .
Scan code set2 conversion enable (PS/2 scan code set2
converts to set 1)
0: Disable
1: Enable
Disable Auxiliary device
0: Enable
1: Disable
Disable Keyboard device
0: Enable
1: Disable
Inhibit Override
0: Disable
1: Enable
System Flag (warm boot flag)
0: cold boot
1: warm boot
IRQ12 Enable
While KBCSTS[5]=1(Auxiliary Data Flag) and KBCSTS[0]=1
(OBF), then IRQ12 will issue.
0: Disable
1: Enable
IRQ1 Enable
While KBCSTS[5]=0 (Auxiliary Data Flag) and KBCSTS[0]=1
(OBF), then IRQ1 will issue.
0: Disable
1: Enable
4.3.2 KBC Registers Description (0xFC80~0xFC8F)
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Keyboard lock enable
0: Disable
1: Enable
Fast gate A20 control
0: Disable gate A20 control
1: Enable gate A20 control
KBC hardware command sets (90h~93h, D4h) enable.
0: Disable
1: Enable
KBC hardware command sets (60h, A7h~ABh, Adh~Aeh)
enable.
0: Disable
1: Enable
Keyboard lock flag status
0: keyboard not lock or not inhibit
1: keyboard lock or inhibit
KBC hardware command sets (A4h, A6h) enable.
0: Disable
1: Enable
IBF (KBCSTS[1]) interrupt enable. (IBF from 0 to 1)
0: Disable
1: Enable
OBF (KBCSTS[0]) interrupt enable (OBF from 1 to 0)
0: Disable
1: Enable
KBC Interrupt Pending Flag
Status of KBC command handled by firmware
While receiving KBC commands which need firmware to
handle, the hardware will set this bit. Then the firmware will deal
with all the following command until this bit is clear by firmware.
IBF interrupt pending flag
0: no IBF interrupt occurs
1: IBF interrupt occurs
OBF interrupt pending flag
0: no OBF interrupt occurs
1: OBF interrupt occurs
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
KBC Hardware Command Enable
KBC hardware command set (FEh) enable
0: Disable
1: Enable
KBC hardware command set (E0h) enable
0: Disable
1: Enable
KBC hardware command set (D3h) enable
0: Disable
1: Enable
KBC hardware command set (D2h) enable
0: Disable
1: Enable
KBC hardware command set (D1h) enable
0: Disable
1: Enable
KBC hardware command set (D0h) enable
0: Disable
1: Enable
KBC hardware command set (C0h) enable
0: Disable
1: Enable
KBC hardware command set (20h) enable
0: Disable
1: Enable
Command written to port 64h will be stored in this register
KBC Data Input/Output Buffer
Data written to this register to make OBF set (OBF=1).
The host read this register via port 60h.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Parity error
0: No parity error occurs in PS/2 protocol
1: Parity error occurs in PS/2 protocol.
Timeout
0: No timeout occurs in PS/2 protocol
1: Timeout occurs in PS/2 protocol.
Uninhibited
0: keyboard inhibited
1: keyboard not inhibited
Address (A2)
0: output buffer data from 60h
1: output buffer data from 64h
Read back port of KBCDAT, [0xFC85]
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
4.4 ENE Serial Bus Controller (ESB)
4.4.1 ESB Function Description
To extend the usage of the current design, an ENE Serial Bus interface is introduced. An
external ESB device can be controlled by firmware transparently. As the following table, 3 memory
address ranges are reserved for ESB devices.
In the ESB architecture, external ESB devices are supported. And each device can be
configured with interrupt capability. A figure gives the topology of ENE Serial Bus as following.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Loop back test enable
0: Disable
1: Enable
ESB clock divide factor selection.
00: 2Mhz
01: 4Mhz
10: 8Mhz
11: 16Mhz
External device access mode.
0 : Access external device via 4 predefined memory ranges.
(automatic mode)
1 : Access external devices via ESBCA , ESBCD and ESBRD
registers. (byte mode)
ESB clock output enable
0: Disable
1: Enable
ESB interrupt enable
0: Disable
1: Enable
ESB host queries device interrupt status automatically. (when
ESBCFG[3]=1)
0: Disable
1: Enable
ESB function enable
0: Disable
1: Enable
4.4.2 ESB Registers Description (0xFC90~0xFC9F)
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Device resume signal flag
0: no event
1: event occurs.
ESB bus timeout status
0: no timeout event
1: bus timeout
Device data received status.
0: no data received
1: data received.
ESB host busy flag.
0: not busy
1: host busy
Start to send command, command byte in ESBCD , 0xFC94
Write ― 0‖ will not work.
1 : send command
ESB access command type (while ESBCFG [3]=1)
00: interrupt query
01: read
10: write
11: Reserved
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
ESB Interrupt Enable of External Device
Device resume signal interrupt enable
0: Disable
1: Enable
Bus timeout interrupt enable
0: Disable
1: Enable
Device data received interrupt enable
0: Disable
1: Enable
Interrupt enable (IRQ3) of external ESB device.
0: Disable
1: Enable
Interrupt enable (IRQ2) of external ESB device.
0: Disable
1: Enable
Interrupt enable (IRQ1) of external ESB device.
0: Disable
1: Enable
Interrupt enable (IRQ0) of external ESB device.
0: Disable
1: Enable
External ESB device address to be accessed. (when
ESBCFG [4]=1)
The address is predefined according to different device.
Write data port to external ESB device (when ESBCFG [4]=1)
Read data port to external ESB device (when ESBCFG [4]=1)
If loop back test enabled (when ESBCFG [7]=1), the register will
be writable, otherwise, read-only.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
ESB Enable for External Device
Low clock mode enable (clock source 32KHz)
For performance and power saving consideration, while low
clock mode enabled, please set the query function off.
0: Disable
1: Enable
Enable external ESB device decoding address
0xFCC0~0xFCCF
0: Disable
1: Enable
Enable external ESB device decoding address
0xFCB0~0xFCBF
0: Disable
1: Enable
Enable external ESB device decoding address
0xFD00~0xFDFF.
0: Disable
1: Enable
ESB Interrupt Event Pending Flag for External Chip
Interrupt event pending flag of IRQ7 (cascade mode only)
0: no event
1: event occurs
Interrupt event pending flag of IRQ6 (cascade mode only)
0: no event
1: event occurs
I Interrupt event pending flag of IRQ5 (cascade mode only)
0: no event
1: event occurs
Interrupt event pending flag of IRQ4 (cascade mode only)
0: no event
1: event occurs
Interrupt event pending flag of IRQ3
0: no event
1: event occurs
Interrupt event pending flag of IRQ2
0: no event
1: event occurs
Interrupt event pending flag of IRQ1
0: no event
1: event occurs
Interrupt event pending flag of IRQ0
0: no event
1: event occurs
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
ESB Cascade Mode Configuration
Interrupt enable of IRQ7 for external chip
0: disable
1: enable
Interrupt enable of IRQ6 for external chip
0: disable
1: enable
Interrupt enable of IRQ5 for external chip
0: disable
1: enable
Interrupt enable of IRQ4 for external chip
0: disable
1: enable
Cascade mode enable
0: disable
1: enable
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
A device connecting to ESB master.
GPIOFS08[4:3] (0xFC01[4:3])= 11b ; ESB function selection pin
GPIOIE08[4] (0xFC61[4]) = 1b ; Set ESB_DAT pin IE
ESBCFG (0xFC90) = 0x69 ; ESB clock = Main CLOCK 32MHz
; ESB enable & automatic mode enable
ESBED (0xFC96) = 0x02 ; Enable ESB range 0xFCC0~0xFCCF
Now F/W can access ESB device via 0xFCC0~0xFCCF
4.4.3 ESB Programming Sample
In this section gives some programming sample to control ESB module. Please note, ENE
does not guarantee these codes in every field application. The following table describes scenario of
ESB filed application.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
4.5 Internal KeyBoard (IKB) Encoder
4.5.1 IKB Function Description
The KBC supports internal keyboard encoder (IKB) in the notebook system. Here is the
feature highlight of IKB module.
- Support 18x8 matrix.
- Keyboard scan output (KSO) 18 lines.
- Keyboard scan input (KSI) 8 lines
- KSO/KSI can be programmed to be GPIO
- KSO/KSI internal programmable pull-high feature supported.
- KSO/KSI can be used for redirection for LPC, 8051 Tx/Rx, EDI debug application
- Support half-HW mode & FW mode de-bounce setting
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Set LED.
Modify the status of LED by the following argument byte.
Normal sequence: ED FA WW FA (WW is setting to IKBLED [2:0])
ECHO.
Send EE back to the host after receiving this command.
Normal sequence: EE EE
Access Scan Code Set. Host uses the 1 st argument to specify the R/W operation.
If 1st argument equals 0x00, it‘s a read operation.
If 1st argument not equals 0x00, it‘s a write operation and KBC ignores the
argument. (Supports Set 2 scan code)
Normal sequence:
F0 FA 00 FA 02, (read scan code set as 2 )
F0 FA 02 FA (use set 2 scan code)
Get Device ID. Normal sequence: F2 FA AB 41
Set Typematic Rate.
Normal sequence: F3 FA WW FA (WW is setting to IKBTYPEC)
Enable.
Start scanning the key matrix and sending the scan code to the host
KBC is in disable mode after hardware rest. System BIOS should configure all
options of KBC and enable it.
Normal sequence: F4 FA
Disable.
When disabled, KBC can‘t TX key to PS2.
And KBC will keep the key until Enable or Reset or Default occurs.
Set Default.
Restore the default setting of typematic rate and LED status,
Normal sequence: F6 FA
Resend.
Re-transmit the last byte.
Normal sequence: FE WW (WW is the last byte of KBC sent to PS2 to be resent)
Reset.
Generate soft-reset to reset PS2 interface,
It will clear all internal flags of scan controller.
The scan, kgen, TX/RX state machine will go to idle and clear all buffers.
Table for IKB Hardware Command Brief:
* When these commands waiting RX argument, KBC can TX key to PS2.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
IKB scan controller test mode enable.
0: Disable
1: Enable
IKB PS/2 wait time setting. The IKB makes sure PS/2 bus idle
for specific time and then transmit the scan codes.
0: 8 μ s
1: 64μ s
IKB De-bounce function control for half-HW mode
0: Disable
1: Enable
Force controller to scan key matrix. Write ―1 ‖ to start.
IKB scan repeat enable.
Set this bit force the IKB controller to scan every 30ms.
0: Disable
1: Enable
Standard KB command hardware mode enable.
Once the IKB received standard KB command, the hardware
will handle it.
0: Disable
1: Enable
IKB scan controller enable.
0: Disable
1: Enable
4.5.2 IKB Registers Description (0xFCA0~0xFCAF)
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
NumLock key
0: Fn-Lock
1: NumLock =Fn-Lock
Flag of Fn-Shift (in hardware mode)
0: Fn-Shift not pressed
1: Fn-Shift pressed
Flag of Fn-Lock (in hardware mode)
0: Fn-Lock not pressed
1: Fn-Lock pressed
LED output polarity, CapLock/NumLock/ScrLock output
0: positive logic
1: negative logic
CapLock LED driving
H/W auto set or clear it, polarity depend on IKBLED[4]
NumLock LED driving
H/W auto set or clear it, polarity depend on IKBLED[4]
ScrLock LED driving
H/W auto set or clear it, polarity depend on IKBLED[4]
1st key repeat delay time selection.
00b: 250ms
01b: 500ms
10b: 750ms
11b: 1 sec
Typematic repeat characters per second.
1Fh: 2 char/sec 10h: 10 char/sec
1Bh: 3 char/sec 0Dh: 12 char/sec
18h: 4 char/sec 0Bh: 15 char/sec
17h: 5 char/sec 08h: 16 char/sec
15h: 6 char/sec 05h: 20 char/sec
13h: 8 char/sec 00h: 30 char/sec
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Enable F/W mode IKB de-bounce control for wait time cycle
0: disable
1: enable
Wait time cycle timing unit selection
(Only valid when IKBIE[7]=1, also refer IKBSFC[7:4] for details)
1: 1m sec pulse
0: 4m sec pulse
Interrupt enable. While the following commands handled by
hardware occur.
KB reset / KB disable / KB Enable / Non-standard hardware
mode command
0: Disable
1: Enable
IKB RX finished interrupt enable.
0: Disable
1: Enable
IKB TX finished interrupt enable.
0: Disable
1: Enable
IKB typmatic repeat timeout interrupt enable.
0: Disable
1: Enable
IKB scan code finished interrupt enable. (IKBHCFG[0]=0)
IKB break key (hotkey) interrupt enable. (IKBHCFG[0]=1)
0: Disable
1: Enable
IKB make key interrupt enable. (IKBHCFG[0]=0)
IKB make key (hotkey) interrupt enable. (IKBHCFG[0]=1)
0: Disable
1: Enable
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
IKB Interrupt Pending Flag
Force the IKB controller enter idle mode.
Write ―1 ‖ to enter idle mode.
IKBSADR (0xFCA9) valid flag.
0: no more valid IKBSADR
1: IKBSADR valid
Interrupt flag. While the following commands handled by
hardware occur.
KB reset / KB disable / KB enable
0: event is not active
1: event is active
IKB RX finished and non-standard hardware mode command
occurring interrupt flag.
0: event is not active
1: event is active
IKB TX finished interrupt flag.
0: event is not active
1: event is active
IKB typematic repeat timeout interrupt flag
0: event is not active
1: event is active
IKB scan code finished interrupt flag. (IKBHCFG[0]=0)
IKB break key (hotkey) interrupt flag. (IKBHCFG[0]=1)
0: event is not active
1: event is active
IKB make key interrupt flag. (IKBHCFG[0]=0)
IKB make key (hotkey) interrupt flag. (IKBHCFG[0]=1)
0: Disable
1: Enable
The IKB port to transmit data to PS/2 controller
Writing to this port, the data will be delivered to PS/2 controller.
After transmission completes and a TX finished interrupt
issues.
The IKB port to receive data from PS/2 controller.
After receiving data from PS/2 controller, a RX finished interrupt
issues.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
IKB Hardware Mode Configuration
IKB hotkey flag while hardware mode enable (IKBCFG[0]=1)
0: event is not active
1: event is active
IKB hotkey finish indicator
While KBC recognizes a hotkey, the KBC setup the hotkey flag
(IKBCFG[2]) to invoke firmware to handle. Firmware will write
― 1 ‖ to this bit after completing the hotkey event.
IKB hardware mode enable
0: Disable
1: Enable
IKB scan address of current key
KSO release (floating) time
Time = (value + 1) * 8μ s
KSO drive low time
Time = (value + 1) * 8μ s
IKB Make Key (hardware mode)
The scan controller places make key in this register.
If hotkey occurs, the register contains the matrix value.
IKB Break Key (hardware mode)
The scan controller places break key in this register.
If hotkey occurs, the register contains the matrix value.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
IKB Scan All key de-bounce control
De-bounce times for valid break key
000 : 1 times
¦
111 : 8 times
De-bounce times for valid make key
000 : 1 times
¦
111: 8 times
IKB Scan Function Control
The scan function will wait ―X‖ time after then scan all keys
again.
“ X‖ range 0~15m sec
0000 0m sec
¦
1111 15m sec
(F/W mode de-bounce, also refer IKBIE for wait time timing
base setting which could be 1ms base / 4ms base)
IKB PS2 KB Reset, Disable and Enable hardware command
interrupt pending flag status
00: No interrupt event
01: Reset command interrupt
10: Disable command interrupt
11: Enable command interrupt
Ghost key identification flag (IKBHCFG[0]=1)
0: No ghost key
1: Ghost key found
IKB make key scan flag. If this bit is set to ― 1‖ , all the make
keys will be ignored.
0: not over 5 make key occur at a time
1: over 5 make key occur at a time
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
4.5.3 IKB Matrix Value Mapping Table
In this section, the following tables show the mapping information between matrix value
and PS/2 set1 scan code. The first one is the standard keys mapping, and the second one is for
multimedia keys mapping.
Standard Keys
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Multimedia Keys
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
EC / SIO
Intel
Processor
PECI
PECI
Intel
Chipset
SMBUS
Conceptual Block Diagram
Not Intended to depict actual implementation
4.6 PECI
4.6.1 PECI Functional Description
The Platform Environment Control Interface (PECI) is a one-wire bus interface that provides
a communication channel between Intel processor and chipset components to external monitoring
devices. PECI could be used for real time control and implement Intel‘ s latest platform control
methodology.
The PECI is a subset of SST(Simple Serial Transport) application. The PECI specification
provides information for electrical requirements, platform topologies, power management handling,
bus device enumeration, commands and addressing for Intel based system.
Compared with ENE KB930, KB9012 is added with AWFCS application for PECI 3.0 implement
for latest Intel feature.
Figure 4.6.1 Example stream of 4 bits: “0101”
(Logic bit ‘ 0’ encodes as 1000 pulse; Logic bit ‘ 1’ encodes as 1110 pulse)
Figure 4.6.2 Conceptual Block Diagram for PECI application
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Select the source in PECICFG[7] for 32Mhz
or 4Mhz
1/4 bit timing could be selected in
PECICTL[7:5]
Quarter bit timing is
N * (Source Clock)
N is:
4 for PECICTL[7:5] = b000
|
|
11 for PECICTL[7:5] = b111
Bit clock rate, which logic bit ‗0‘ encodes as
1000 pulse; Logic bit ‗1‘ encodes as 1110
pulse
T
BIT =
Quarter bit timing * 4
Quarter bit timing (ns)
= source period * factor
T
BIT
(ns)=
Quarter bit timing * 4
Quarter bit timing (us)
= source period * factor
T
BIT
(us)=
Quarter bit timing * 4
4.6.2 PECI Timing Setting
Frequency setting table:
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
PECI function configuration
PECI operation frequency setting
0: 2Mhz ~ 16Khz
1: 250Khz ~ 2Khz
PECI output enable selection
0: normal mode
1: PECI output enable always high
PECI output data selection
0: normal mode
1: PECI output data always high for debugging
Slow clock at idle state disable (for low power)
0: enable
1: disable
PECI Interrupt Enable (total enable)
Increase cycle of quarter bit timing, then quarter bit timing will
be increased to 1T
0: disable
1: enable
PECI data input de-bounce enable
0: disable, monitor data 1/2bit timing point.
1: enable, monitor data from 1/2bit to 3/4bit timing.
PECI function enable, state machine will come back to idle
state, when this bit is disabled.
0: enable
1: disable
4.6.3 PECI Register Description (0xFCD0~0xFCDF)
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Quarter bit timing setting factor, timing unit is based on PECI
source clock (PECICFG[7] )
and it could form PECI bus frequency = 4 * quarter bit timing
000: Quarter bit timing = 4 * T
001: (4+1) = 5T
|
|
111: (4+7) = 11T
AW(Assured Write) FCS function enable for PECI 3.0
0: disable
1: enable
Restrict read FIFO data status path only for E51
0: disable (All path can read FIFO data)
1: enable (only 8051)
FIFO reset
Write 1 to clear all FIFO pointers and data.
Issue abort command
This bit will be auto clear when abort behavior finish.
The originator can't abort message when receives data state.
Issue package to client
This bit will be auto clear when package transfer finish.
The counter value of quarter bit timing for debugging
The overall counter is 9 bit length.
PECIST [7] : PECIQTB [7:0] = overall 9 bit counter value
TX active flag for transmitter state
RX active flag for receiver state
PECI bus line status for debugging
FIFO full flag for write/read state
FIFO empty flag for write/read state
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
PECI interrupt enable control
Interrupt Enable of Command complete
Interrupt Enable of Client Abort
Interrupt Enable of FCS fault
Interrupt Enable of FIFO half
Interrupt Enable of FIFO error
PECI interrupt status (event pending flag)
Interrupt Status of Command Complete
The protocol status is finish, so state machine come back idle
state then this bit will be set.
Interrupt Status of Client Abort
The client reply to FCS is a one's complement. That means
client will abort this message.
Interrupt Status of FCS fault
The client reply to FCS is not correct.
If FCS value is wrong then this bit will be set.
Interrupt Status of FIFO half
If FIFO half, this bit will be set.
That means FW must be write/read register PECIWD/PECIRD.
Interrupt Status of FIFO error
If full flag is set and write data to PECIWD, it will be set;
If empty flag is set and read data from PECIRD, it will be set.
This is the address of the PECI device targeted to receive a
message.
The Write Length byte in the PECI header is used to convey the
number of bytes the originator will send to the target device.
The length byte includes command and data byte.
The Read Length byte is used by the target to determine the
number of data bytes it must supply to the originator before
Returning the FCS over that data.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
PECI Write data. This includes both commands and data. All
commands require at least one Command byte with the
exception of Ping().
PECI Received (Read) data from client devices.
PECI Client Read FCS value
Read FCS value from client
The FCS value generated from originator
PECI t
bit
counter value observation
The counter value of quarter bit timing for debugging
The overall counter is 9 bit length.
PECIST [7] : PECIQTB [7:0] = overall 9 bit counter value
PECI FIFO write/read pointer observation
FIFO Read Pointer
FIFO read pointer points to the location in the FIFO to read from
next
FIFO Write Pointer
FIFO write pointer points to the location in the FIFO to write to
next
AW FCS value from originator
PECI Client Write FCS Value
Write FCS value from client
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
4.7 OWM
4.7.1 OWM Functional Description
OWM is called One Wire Bus Master Interface (GPIO0A) which could be used as simple host
interface, OWM device ID identification, and device power. OWM interface is featured as 1)
Bi-directional; 2) single-master/multi-slave; 3) half-duplex. OWM is physically implemented with
single open-drain master connected to one or more open-drain slave devices. Pull-up resistor is
commonly used to pull the bus to 3 or 5 V.
The OWM supports:
1. Dallas One Wire Bus Master and TI HDQ protocol.
2. Interrupt enable for Reset/Break, Read and Write command.
3. Separate 8-bit read and write buffers.
4. Configurable timing registers can be setting by F/W.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
Reset Time Low
(OWMRSTL)
Reset Time High
(OWMRSTH)
Write1 time
(OWMW1L)
Write Slot Timing (data = 1)
(OWMWT)
Write0 time
(OWMW0L)
Write Slot Timing (data = 0)
(OWMWT)
Dallas : Pull
Low time
(OWMRL)
Sample Data time
(OWMRS)
Read Data 1
Dallas : Pull
Low time
(OWMRL)
Read Slot Timing (data = 0)
(OWMRT)
Sample Data time
(OWMRS)
Read Data 0
4.7.2 OWM Timing Setting Illustration
Reset / Break Timing
Write Timing
Copyright© 2011, ENE Technology Inc.
Read Timing
Note : OWMRL is for Dallas only
KB9012 Keyboard Controller Datasheet
OWM bus master configuration
EN : One Wire Bus Master Interface Enable
0: Disable One Wire Bus Master Interface
1: Enable One Wire Bus Master Interface
TI/Dallas Mode Select
1: TI mode
0: Dallas mode
ETMOI : Enable Timeout Interrupt.
Interrupt occurs if timeout interrupt flag is set
0: Disable
1: Enable
EWRI : Enable Write Command Complete Interrupt.
Interrupt occurs if write command complete flag is set
0: Disable
1: Enable
ERDI : Enable Read Command Complete Interrupt.
Interrupt occurs if read command complete flag is set
0: Disable
1: Enable
ERSTI : Enable Reset/Break Completely Interrupt.
Interrupt occurs if reset/break complete flag is set
0: Disable
1: Enable
4.7.3 OWM Register Description (0xFCF0~0xFCFF)
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
BSY : One Wire Host Busy Status
0: Idle
1: Busy
PDR : Presence Detect Result. (for Dallas Only)
The detect result status of the presence detect when
reset/break complete interrupt occurs.
0: Not Exist
1: Exist
TMO: Timeout flag of read/write command for slave response.
0: No timeout event
1: Timeout event
WRC: Status flag of write command for operation completion
0: Write command not complete
1: Write command complete
RDC : Status flag of read command for operation completion
0: Read command not complete
1: Read command complete
RSTC: Status flag of reset/break for operation completion
0: Reset/Break command not complete
1: Reset/Break command complete
(Set when the reset high time reached after reset low time )
One Wire Interface Command
00: Reset /Break
01: Read
10: Write
11: No operation
OWM bus master write data buffer (transmit)
The transmit data buffer send to a slave device
OWM bus master read data buffer (receive)
The receive data buffer got from a slave device
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
OWM reset/break low timing
The Reset Time Low interval,,
Clock time base = 8us
OWM reset/break high timing
The Reset Time High interval
Clock time base = 8us
Write 1-bit Data time interval
Clock time base = 2us
Write 1 time interval
Clock time base = 1us
Write 0 time interval
Clock time base = 1us
Host Read 1-bit Data time, clock time base = 2us .
For Dallas only, Host to pull low time
Clock time base = 1us
The time interval for Host to check read data 0 or 1,
Clock time base = 1us.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
10%
50%
100%
PWM Duty-Cycle range from 0%~100%
(10% per scale in the illustrration)
4.8 Pulse Width Modulation (PWM)
4.8.1 PWM Function Description
The PWM supports 6 PWM channels:
1. two 8-bits PWM @ PWM0 (16mA) / PWM1(4mA)
2. two 14-bits PWM with pre-scaler @ PWM2(4mA) / PWM3(16mA)
3. two 12-bits PWM @ FANPWM0(4mA) / FANPWM1(4mA)
(Refer FAN section)
Pulse width modulation (PWM) is a powerful technique for controlling analog circuits with a
processor‘s digital outputs. PWM is employed in a wide variety of applications, ranging from
measurement and communications to power control and conversion. The duty cycle of PWM is
illustrated as the following figure.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
(PWM High Period Length+1)/(PWM Cycle Period Length+1) *100%
( PWM Cycle Length Register +1) * (PWM clock source)
PWMCFG[3:2] ( 0xFE00[3:2])
PWMCFG[7:6] ( 0xFE00[7:7])
PWMCFG[3:2] ( 0xFE00[3:2])
4 * (X+1) = 100ms , X = 24
(X+1) / (24+1) = 40%, X = 9
4.8.2 PWM Duty Cycle Setting Illustration
The following table summarizes the relationship about the applications with the definition in
the PWM registers description. The setting of PWM0/1(8 bits) and PWM2/3(14 bits) is different.
PWM0/1 (8 bits):
Example:
Set PWM0 with period = 100ms ( 10Hz ), with duty cycle = 40% ( 40ms )
Programming Model:
1. GPIOFS08[7] (0xFC01[7]) = 1b // Set GPIO function
2. PWMCFG[3:0] (0xFE00[3:0]) = 1101b // Set 4ms and enable PWM0
3. PWMCYC0 (0xFE02) = 0x18 // Set PWM period 100ms
4. PWMHIGH0 (0xFE01) = 0x09 // Set duty cycle 40%
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
(PWM High Period Length+1)/(PWM Cycle Period Length+1) *100%
( PWMCYC + 1 ) * 2 * ( 1 + Prescaler )/(Peripheral clock or fixed 1 MHz)
PWM High Period Length
PWMHIGH2H ( 0xFE08[5:0])
PWM Cycle Length
PWMCYC2H ( 0xFE0A [5:0])
PWMCFG2[5:0] ( 0xFE06[5:0])
PWM High Period Length
PWMHIGH3H ( 0xFE0C[5:0])
PWM Cycle Length
PWMCYC3H ( 0xFE0E [5:0])
PWMCFG3[5:0] ( 0xFE07[5:0])
PWMCFG2[5:0] ( 0xFE06[5:0])
PWM Cycle Length
PWMCYC2H ( 0xFE0A [5:0])
(X+1)*2*(1+0) / 11M = 1/800
X = 6874 , 0x1ADB
0b for peripheral @ 11MHz
PWM2/3 (14 bits):
Example:
Set PWM2 with 800hz pulse with peripheral clock @ 11Mhz
Note: Peripheral clock could be programmed by clock setting
Programming Model:
1. GPIOFS10[1] (0xFC01[7]) = 1b // Set GPIO function
2. PWMCFG2 (0xFE00) = 0x80 // Set peripheral clock, prescaler, enable PWM0
3. PWMCYC2H ( 0xFE0A ) = 0x1A // Set PWM frequency 800hz
4. PWMCYC2L ( 0xFE0B ) =0xDB // Set PWM frequency 800hz
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
high period length> cycle length
high period length = 0x00
and cycle length = 0x00
high period length = 0x00
and cycle length = 0xFF
high period length = 0xFF
and cycle length = 0x00
Switch to GPIO mode and output low
Special Cases:
When the related PWM setting meet some special condition, the PWM would response with specific
behavior as the following table.
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
PWM1 clock source selection
0: 0.976μ s (1μ s)
1: 62.5μ s (64μ s)
2: 250μ s (256μ s)
3: 3.99ms (4ms)
PWM1 Enable
0: Disable
1: Enable
PWM0 clock source selection
0: 0.976μ s (1μ s)
1: 62.5μ s (64μ s)
2: 250μ s (256μ s)
3: 3.99ms (4ms)
PWM0 Enable
0: Disable
1: Enable
High Period Length of PWM0.
This should be smaller than Cycle Length.
High Period Length of PWM1.
This should be smaller than Cycle Length.
4.8.3 PWM Registers Description (0xFE00~0xFE1F)
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
PWM Open Drain Configuration
PWM3 Open Drain Enable
0: Disable, Push-Pull PWM
1: Enable, Open Drain PWM
PWM2 Open Drain Enable
0: Disable, Push-Pull PWM
1: Enable, Open Drain PWM
PWM1 Open Drain Enable
0: Disable, Push-Pull PWM
1: Enable, Open Drain PWM
PWM0 Open Drain Enable
0: Disable, Push-Pull PWM
1: Enable, Open Drain PWM
PWM2 Enable
0: Disable
1: Enable
PWM2 pre-scaler clock selection
0: peripheral clock
1: 1MHz clock (fixed)
The 6-bit pre-scaler of PWM2
The pre-scalar value = register value + 1
PWM3 Enable
0: Disable
1: Enable
PWM3 pre-scaler clock selection
0: peripheral clock
1: 1MHz clock (fixed)
The 6-bit pre-scaler of PWM3
The pre-scaler value = register value + 1
PWM2 High Period Length (14-bit)
Higher 6 bits (of 14-bit)
PWM2 Cycle Length (14-bit)
Higher 6 bits (of 14-bit)
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
PWM3 High Period Length (14-bit)
Higher 6 bits (of 14-bit)
PWM3 Cycle Length (14-bit)
Higher 6 bits (of 14-bit)
Copyright© 2011, ENE Technology Inc.
KB9012 Keyboard Controller Datasheet
4.9 Fan Controller
4.9.1 Fan Function Description
The KBC provides 2 interfaces with speed monitor for fan control. There are two clock sources
for fan controller, one is based on peripheral clock and the other is set as 4 choices from
62.5us~7.8125us. The fan controller can be configured to control PWM known as FANPWM.
FANPWM could operate as automatic-FAN mode or Fixed-FAN mode.
The KBC uses the pin FANPWM0/1 to drive external fan device, and the fan device feedback
the speed via the pin FANFB0/1. The fan controller keeps the speed in the monitor register.
Copyright© 2011, ENE Technology Inc.