You are on page 1of 128

Application Note

Tegra Embedded Controller


Interface Specification 1.0

October6,2009
DA_04649001_11

Tegra Embedded Controller Interface Specification 1.0

Notice
ALL NVIDIA DESIGN SPECIFICATIONS, REFERENCE BOARDS, FILES, DRAWINGS,
DIAGNOSTICS, LISTS, AND OTHER DOCUMENTS (TOGETHER AND SEPARATELY, "MATERIALS")
ARE BEING PROVIDED "AS IS." NVIDIA MAKES NO WARRANTIES, EXPRESS, IMPLIED,
STATUTORY, OR OTHERWISE WITH RESPECT TO THE MATERIALS, AND ALL EXPRESS OR
IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED
WARRANTY OR CONDITION OF TITLE, MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS
FOR A PARTICULAR PURPOSE AND ON-INFRINGEMENT, ARE HEREBY EXCLUDED TO THE
MAXIMUM EXTENT PERMITTED BY LAW. NVIDIA RETAIN ALL TITLE, RIGHTS AND INTERESTS
(INCLUDING WITHOUT LIMITATION, ALL INTELLECTUAL PROPERTY RIGHTS) IN ALL MATERIALS.
Information furnished is believed to be accurate and reliable. However, NVIDIA Corporation
assumes no responsibility for the consequences of use of such information or for any
infringement of patents or other rights of third parties that may result from its use. No license is
granted by implication or otherwise under any patent or patent rights of NVIDIA Corporation.
Specifications mentioned in this publication are subject to change without notice. This
publication supersedes and replaces all information previously supplied. NVIDIA Corporation
products are not authorized for use as critical components in life support devices or systems
without express written approval of NVIDIA Corporation.
Trademarks
NVIDIA and the NVIDIA logo are trademarks or registered trademarks of NVIDIA Corporation in
the United States and other countries. Other company and product names may be trademarks of
the respective companies with which they are associated.

Copyright

2009byNVIDIACorporation.Allrightsreserved.

NVIDIACorporation
2701SanTomasExpressway
SantaClara,CA95050
www.nvidia.com

ii

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

Table of Contents

1.Introduction ............................................................................................................................. 11
2.SystemConnectivity ............................................................................................................... 12
3.SMBusOverview..................................................................................................................... 13
4.Packets ...................................................................................................................................... 14
4.1.PacketFields.................................................................................................................... 14
4.1.1.CommandField...................................................................................................... 14
4.1.2.SubcommandField............................................................................................... 16
4.1.3.PacketLengthField ............................................................................................... 16
4.1.4.StatusField.............................................................................................................. 16
4.1.5.PayloadField .......................................................................................................... 17
5.SMBusMessages ..................................................................................................................... 18
5.1.RequestPacketFormat................................................................................................... 18
5.2.ResponsePacketFormat................................................................................................ 20
5.3.EventPacketFormat ...................................................................................................... 22
6.RequestandResponsePackets.............................................................................................. 25
6.1.SystemStatus .................................................................................................................. 26
6.1.1.GetSystemStatusResponse................................................................................. 28
6.1.2.AcknowledgeSystemStatusRequest ................................................................. 30
6.1.3.AcknowledgeSystemStatusResponse............................................................... 30
6.1.4.ConfigureEventReportingRequest.................................................................... 31
6.1.5.ConfigureEventReportingResponse................................................................. 31
6.1.6.ConfigureWakeRequest ...................................................................................... 32
6.2.BatteryInformation ........................................................................................................ 33
6.2.1.GetSlotStatusandCapacityGaugeResponse .................................................. 37
6.2.2.GetVoltageResponse............................................................................................ 39
6.2.3.GetRemainingTimetoEmptyResponse........................................................... 40
6.2.4.GetCurrentResponse ........................................................................................... 41
6.2.5.GetAverageCurrentResponse............................................................................ 42
6.2.6.GetAveragingTimeIntervalResponse.............................................................. 43
6.2.7.GetRemainingCapacityResponse...................................................................... 44
6.2.8.GetLastFullChargeCapacityResponse............................................................ 45
6.2.9.GetDesignCapacityResponse ............................................................................ 46
6.2.10.GetCriticalCapacityResponse.......................................................................... 47

DA_04649001_11
6October2009

iii

Tegra Embedded Controller Interface Specification 1.0

6.2.11.GetTemperatureResponse ................................................................................ 48
6.2.12.GetManufacturerResponse ............................................................................... 49
6.2.13.GetModelResponse............................................................................................ 50
6.2.14.GetTypeResponse .............................................................................................. 51
6.2.15.SetRemainingCapacityAlarmRequest........................................................... 52
6.2.16.SetRemainingCapacityAlarmResponse ........................................................ 52
6.2.17.GetRemainingCapacityAlarmResponse ....................................................... 53
6.2.18.SetConfigurationRequest .................................................................................. 54
6.2.19.SetConfigurationResponse ............................................................................... 54
6.2.20.GetConfigurationResponse .............................................................................. 55
6.2.21.ConfigureEventReportingRequest.................................................................. 56
6.2.22.ConfigureEventReportingResponse............................................................... 56
6.2.23.ConfigureWakeRequest .................................................................................... 57
6.2.24.ConfigureWakeResponse.................................................................................. 57
6.3.GPIOControl................................................................................................................... 58
6.3.1.ConfigurePinRequest .......................................................................................... 61
6.3.2.ConfigurePinResponse(scalar) .......................................................................... 62
6.3.3.SetPinRequest(scalar) ......................................................................................... 63
6.3.4.SetPinResponse(scalar)....................................................................................... 63
6.3.5.SetPinRequest(vector) ........................................................................................ 64
6.3.6.SetPinResponse(vector)...................................................................................... 64
6.3.7.GetPinRequest(scalar) ........................................................................................ 65
6.3.8.GetPinResponse(scalar)...................................................................................... 65
6.3.9.GetPinRequest(vector) ....................................................................................... 66
6.3.10.GetPinResponse(vector)................................................................................... 66
6.3.11.ConfigureEventReportingRequest(scalar).................................................... 67
6.3.12.ConfigureEventReportingResponse(scalar) ................................................. 67
6.3.13.ConfigureEventReportingRequest(vector) ................................................... 68
6.3.14.ConfigureEventReportingResponse(vector) ................................................ 68
6.3.15.AcknowledgeEventReportRequest(scalar)................................................... 69
6.3.16.AcknowledgeEventReportResponse(scalar) ................................................ 69
6.3.17.AcknowledgeEventReportRequest(vector) .................................................. 70
6.3.18.AcknowledgeEventReportResponse(vector) ............................................... 70
6.3.19.GetEventReportRequest(scalar) ..................................................................... 71
6.3.20.GetEventReportResponse(scalar) .................................................................. 71
6.3.21.GetEventReportRequest(vector) .................................................................... 72
6.3.22.GetEventReportResponse(vector).................................................................. 72
6.3.23.ConfigureWakeRequest(scalar) ...................................................................... 73
6.3.24.ConfigureWakeResponse(scalar).................................................................... 73
6.3.25.ConfigureWakeRequest(vector)...................................................................... 74
6.3.26.ConfigureWakeResponse(vector) ................................................................... 74
6.4.SleepStateControl ......................................................................................................... 75
6.4.1.GlobalConfigureEventReportingRequest....................................................... 78
6.4.2.GlobalConfigureEventReportingResponse .................................................... 78
6.5.KeyboardControl ........................................................................................................... 79
6.5.1.ConfigureWakeRequest ...................................................................................... 82
6.5.2.ConfigureWakeResponse.................................................................................... 82

iv

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.5.3.ConfigureWakeKeyReportingRequest............................................................ 83
6.5.4.ConfigureWakeKeyReportingResponse ......................................................... 83
6.6.AuxiliaryDeviceControl............................................................................................... 84
6.6.1.SendCommandResponse .................................................................................... 89
6.6.2.ReceiveNBytesResponse .................................................................................... 89
6.6.3.ConfigureWakeRequest ...................................................................................... 90
6.6.4.ConfigureWakeResponse.................................................................................... 90
6.7.SystemControl................................................................................................................ 91
6.7.1.ResetEC................................................................................................................... 92
6.7.2.SelfTest ................................................................................................................... 92
6.7.3.NoOperation(Noop)........................................................................................... 92
6.7.4.GetCapabilities ...................................................................................................... 92
6.7.5.GenericConfiguration........................................................................................... 99
6.7.6.FirmwareUpdate................................................................................................. 105
6.7.7.FirmwareRead ..................................................................................................... 114
7.AsynchronousEventPackets............................................................................................... 118
7.1.SystemEvent ................................................................................................................. 118
7.2.BatteryEvent ................................................................................................................. 118
7.3.KeyboardEvents........................................................................................................... 119
7.4.AuxiliaryDeviceEvents .............................................................................................. 121
7.5.GPIOEvents .................................................................................................................. 123
8.ECBehavioralRules.............................................................................................................. 124
AppendixAListofCommands ........................................................................................... 126

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

List of Tables

TABLE 1COMMAND FIELD STRUCTURE......................................................................................... 15


TABLE 2STATUS FIELD STRUCTURE............................................................................................... 17
TABLE 3SMBUS PACKET PROTOCOL DIAGRAM ELEMENTS..................................................... 18
TABLE 4REQUEST SYSTEM STATUS................................................................................................ 26
TABLE 5RESPONSE GET SYSTEM STATUS..................................................................................... 28
TABLE 6SYSTEM STATE FLAGS........................................................................................................ 28
TABLE 7OEM SYSTEM STATE FLAGS.............................................................................................. 29
TABLE 8 ACKNOWLEDGE SYSTEM STATUS REQUEST............................................................... 30
TABLE 9 CONFIGURE EVENT REPORTING REQUEST .................................................................. 31
TABLE 10 CONFIGURE WAKE REQUEST......................................................................................... 32
TABLE 11REQUEST BATTERY INFORMATION .............................................................................. 35
TABLE 12GET SLOT STATUS AND CAPACITY GAUGE RESPONSE ........................................... 37
TABLE 13BATTERY SLOT STATUS................................................................................................... 38
TABLE 14GET VOLTAGE RESPONSE................................................................................................ 39
TABLE 15GET REMAINING TIME TO EMPTY RESPONSE ............................................................ 40
TABLE 16GET CURRENT RESPONSE ................................................................................................ 41
TABLE 17GET AVERAGE CURRENT RESPONSE ............................................................................ 42
TABLE 18GET AVERAGING INTERVAL RESPONSE ...................................................................... 43
TABLE 19GET REMAINING CAPACITY RESPONSE ....................................................................... 44
TABLE 20GET LAST FULL CHARGE CAPACITY RESPONSE........................................................ 45
TABLE 21GET DESIGN CAPACITY RESPONSE ............................................................................... 46
TABLE 22GET CRITICAL CAPACITY RESPONSE ........................................................................... 47
TABLE 23GET TEMPERATURE RESPONSE...................................................................................... 48
TABLE 24GET MANUFACTURER RESPONSE.................................................................................. 49
TABLE 25GET MODEL RESPONSE .................................................................................................... 50
TABLE 26GET TYPE RESPONSE......................................................................................................... 51
TABLE 27SET REMAINING CAPACITY ALARM REQUEST .......................................................... 52
TABLE 28GET REMAINING CAPACITY ALARM RESPONSE........................................................ 53
TABLE 29SET CONFIGURATION REQUEST..................................................................................... 54
TABLE 30BATTERY CONFIGURATION SETTINGS ........................................................................ 54
TABLE 31GET CONFIGURATION RESPONSE.................................................................................. 55
TABLE 32 ENABLE EVENT REPORTING REQUEST ....................................................................... 56
TABLE 33BATTERY EVENT TYPE..................................................................................................... 56
TABLE 34 CONFIGURE WAKE REQUEST......................................................................................... 57
TABLE 35 GPIO CONTROL REQUESTS ............................................................................................. 61
TABLE 36REQUEST GPIO CONFIGURE PIN (SCALAR).................................................................. 61
TABLE 37REQUEST GPIO SET PIN (SCALAR) ................................................................................. 63
TABLE 38REQUEST GPIO SET PIN (VECTOR) ................................................................................. 64
TABLE 39REQUEST GPIO GET PIN (SCALAR)................................................................................. 65
TABLE 40RESPONSE GPIO GET PIN (SCALAR)............................................................................... 65

vi

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

TABLE 41REQUEST GPIO GET PIN (VECTOR) ................................................................................ 66


TABLE 42RESPONSE GPIO GET PIN (VECTOR) .............................................................................. 66
TABLE 43REQUEST GPIO CONFIGURE EVENT REPORTING (SCALAR).................................... 67
TABLE 44REQUEST GPIO CONFIGURE EVENT REPORTING (VECTOR).................................... 68
TABLE 45REQUEST GPIO ACKNOWLEDGE EVENT REPORT (SCALAR)................................... 69
TABLE 46REQUEST GPIO ACKNOWLEDGE EVENT REPORT (VECTOR) .................................. 70
TABLE 47REQUEST GPIO GET EVENT REPORT (SCALAR).......................................................... 71
TABLE 48RESPONSE GPIO GET EVENT REPORT (SCALAR)........................................................ 71
TABLE 49REQUEST GPIO GET EVENT REPORT (VECTOR).......................................................... 72
TABLE 50RESPONSE GET EVENT REPORT (VECTOR).................................................................. 72
TABLE 51REQUEST GPIO CONFIGURE WAKE (SCALAR) ............................................................ 73
TABLE 52REQUEST GPIO CONFIGURE WAKE (VECTOR)............................................................ 74
TABLE 53EVENT REPORTING COMMANDS ................................................................................... 76
TABLE 54REQUEST SLEEP CONTROL COMMAND........................................................................ 77
TABLE 55 GLOBAL CONFIGURE EVENT REPORTING REQUEST ............................................... 78
TABLE 56REQUEST KEYBOARD COMMAND ................................................................................. 81
TABLE 57 CONFIGURE WAKE REQUEST......................................................................................... 82
TABLE 58KEYBOARD EVENT TYPE ................................................................................................. 82
TABLE 59 CONFIGURE WAKE REQUEST......................................................................................... 83
TABLE 60FINAL PS/2 INTERFACE STATE PER COMMAND ......................................................... 86
TABLE 61REQUEST AUXILIARY DEVICE COMMAND.................................................................. 87
TABLE 62READ BYTE RESPONSE ..................................................................................................... 89
TABLE 63SEND SAMPLE RESPONSE ................................................................................................ 89
TABLE 64 CONFIGURE WAKE REQUEST......................................................................................... 90
TABLE 65AUXILIARY DEVICE EVENT TYPE.................................................................................. 90
TABLE 66REQUEST SYSTEM CONTROL.......................................................................................... 91
TABLE 67RESPONSE GET EC INTERFACE SPEC VERSION .......................................................... 93
TABLE 68RESPONSE GET SYSTEM CAPABILITIES ....................................................................... 94
TABLE 69SYSTEM CAPABILITIES BITS ........................................................................................... 95
TABLE 70OEM SYSTEM CAPABILITIES BITS ................................................................................. 95
TABLE 71RESPONSE GET SYSTEM CONFIGURATION ................................................................. 96
TABLE 72SYSTEM CONFIGURATION BITS ..................................................................................... 97
TABLE 73OEM SYSTEM CONFIGURATION BITS ........................................................................... 97
TABLE 74GET EC PRODUCT NAME RESPONSE ............................................................................. 98
TABLE 75GET EC FIRMWARE VERSION RESPONSE..................................................................... 99
TABLE 76GENERIC CONFIGURATION PACKAGE HEADER ...................................................... 101
TABLE 77REQUEST INITIALIZE GENERIC CONFIGURATION................................................... 103
TABLE 78REQUEST SEND GENERIC CONFIGURATION BYTES................................................ 104
TABLE 79RESPONSE SEND GENERIC CONFIGURATION BYTES.............................................. 104
TABLE 80REQUEST FINALIZE GENERIC CONFIGURATION...................................................... 105
TABLE 81RESPONSE FINALIZE GENERIC CONFIGURATION.................................................... 105
TABLE 82FIRMWARE UPDATE PACKAGE HEADER ................................................................... 108
TABLE 83REQUEST INITIALIZE FIRMWARE UPDATE ............................................................... 110
TABLE 84REQUEST SEND FIRMWARE BYTES ............................................................................. 111
TABLE 85RESPONSE SEND FIRMWARE BYTES ........................................................................... 112
TABLE 86REQUEST FINALIZE FIRMWARE UPDATE .................................................................. 113
TABLE 87RESPONSE FINALIZE FIRMWARE UPDATE ................................................................ 113
TABLE 88REQUEST POLL FIRMWARE UPDATE .......................................................................... 114
TABLE 89RESPONSE POLL FIRMWARE UPDATE ........................................................................ 114
TABLE 90REQUEST GET FIRMWARE SIZE.................................................................................... 116
TABLE 91 GET FIRMWARE SIZE RESPONSE................................................................................. 116
TABLE 92REQUEST READ FIRMWARE BYTES............................................................................. 117
TABLE 93RESPONSE READ FIRMWARE BYTES........................................................................... 117
TABLE 94SYSTEM EVENT ................................................................................................................ 118
TABLE 95BATTERY EVENT, FIXED LENGTH ............................................................................... 118

DA_04649001_11
6October2009

vii

Tegra Embedded Controller Interface Specification 1.0

TABLE 96KEYBOARD EVENT, VARIABLE LENGTH ................................................................... 119


TABLE 97KEYBOARD EVENT, FIXED LENGTH (1-BYTE SCAN CODE)................................... 119
TABLE 98KEYBOARD EVENT, FIXED LENGTH (2-BYTE SCAN CODE)................................... 120
TABLE 99AUXILIARY DEVICE EVENT, VARIABLE LENGTH.................................................... 121
TABLE 100AUXILIARY DEVICE EVENT, FIXED LENGTH (2-BYTE PAYLOAD)..................... 122
TABLE 101AUXILIARY DEVICE ERROR EVENT, FIXED LENGTH............................................ 122
TABLE 102GPIO EVENT (SCALAR), FIXED LENGTH ................................................................... 123
TABLE 103GPIO EVENT (VECTOR), VARIABLE LENGTH .......................................................... 123

viii

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

List of Figures

FIGURE 1SYSTEM CONNECTIVITY .................................................................................................. 12


FIGURE 2REQUEST PACKET MAPPED TO SMBUS BLOCK READ OPERATION....................... 19
FIGURE 3RESPONSE PACKET MAPPED TO SMBUS BLOCK WRITE OPERATION ................... 20
FIGURE 4ACK PACKET MAPPED TO SMBUS BLOCK WRITE OPERATION .............................. 21
FIGURE 5VARIABLE LENGTH EVENT PACKET MAPPED TO SMBUS BLOCK WRITE
OPERATION ....................................................................................................................................... 22
FIGURE 6FIXED LENGTH EVENT PACKET MAPPED TO SMBUS WRITE BYTE OPERATION 22
FIGURE 7FIXED LENGTH EVENT PACKET MAPPED TO SMBUS WRITE WORD OPERATION
.............................................................................................................................................................. 23
FIGURE 8VARIABLE LENGTH EVENT PACKET WITH ERROR MAPPED TO SMBUS BLOCK
WRITE OPERATION.......................................................................................................................... 23
FIGURE 9FIXED LENGTH EVENT PACKET WITH ERROR MAPPED TO SMBUS WRITE BYTE
OPERATION ....................................................................................................................................... 24
FIGURE 10FIXED LENGTH EVENT PACKET WITH ERROR MAPPED TO SMBUS WRITE
WORD OPERATION .......................................................................................................................... 24
FIGURE 11AP POWER STATES AND POWER STATE TRANSITIONS .......................................... 75
FIGURE 12GENERIC CONFIGURATION PROCEDURE ................................................................. 102
FIGURE 13FIRMWARE UPDATE PROCEDURE.............................................................................. 109

DA_04649001_11
6October2009

ix

Tegra Embedded Controller Interface Specification 1.0

Revision History

Version

1.0

Date

Description

27Aug2009 Version1.0forinitialrelease.

DA_04649001_11
6October2009

1. Introduction
ThisspecificationdefinesacommunicationinterfacebetweenNVIDIATegra
ApplicationProcessor(AP)andanembeddedcontroller(EC)fornetbookapplications.
Usingtheinterface,theAPcandirecttheECtocarryoutcertainnetbooksystem
operations.TheAPcanalsoquerynetbooksysteminformationfromtheEC.
TheSystemManagementBus(SMBus)isusedastheunderlyingtransportlayerfor
communicationsbetweentheAPandEC.Allofthebusprotocolsutilizedinthis
documentarefullycompliantwithSMBusspecification.Therefore,noTegradedicated
SMBussegmentisrequiredintheNetbookarchitectureTegracanbeconnectedtoany
existingsegmentcontrolledbyEC.
FordetailedinformationonSMBusprotocols(includingthenotationusedforprotocol
depiction)seethefollowingspecification:

SystemManagementBus(SMBus)Specification,V2.0,August3,2000
http://smbus.org/specs/

11

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

2. System Connectivity
Figure1showstheconnectionsbetweenTegraAPandtheEC.Inthenetbooksystem,the
ECisresponsibleforcontrollingthekeyboard,touchpad,GPIOs,andbattery.In
addition,theECisresponsibleforwakinguptheAPfromdeepsleepinresponseto
certainevents(suchaskeypresses).TheAPsendscommandstotheEC,whichthen
carriesoutthedesiredoperations.
ThisspecificationidentifiesthecommunicationprotocolbetweentheAPandtheEC.It
alsospecifiestheformatofmessagessentviatheprotocol.TheECmustimplementthe
communicationprotocol,plustheoperationsdefinedbythevariousmessages.
Finally,someECoperationsmayneedtotakeplacewithouttheinvolvementoftheAP.
Batterycharging,hotkeyprocessing,backlightcontrol,andvolumecontrolarepossible
examples.Suchoperationsareoutsidethescopeofthisdocumentbutwillnevertheless
needtobedefinedandimplementedaccordingtotheplatformrequirements.

Figure1SystemConnectivity

Keyboard

GPI
EC

Touch
TouchPad
Pad

PS/2

SMBus
Master

EC_REQUEST#

SM BUS

Tegra
AP
SMBus
Slave

SM BUS
AP_WAKE#
Charger

Firmware
Storage

Battery

GPIOs

12

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

3. SMBus Overview
SomeimplementationsofnetbookECdonotsupportSMBusslavemodeoperations.To
avoidthislimitation,theECalwaysactsasanSMBusmasterincommunicationswiththe
AP.Correspondingly,theAPalwaysactsasanSMBusslave.
TotransferdatafromtheECtotheAP,theECsimplyperformsanSMBusblockwrite
operationdirectedtotheAP.
TotransferdatafromtheAPtotheEC,anactivelowsidebandsignal(EC_REQUEST#)is
used.ItisassertedbyTegraAPtonotifytheECthatarequestispending.Inresponse,
theECperformsanSMBusblockreadoperationfromtheAP.TheAPdeassertsthe
EC_REQUEST#signalbeforetheblockreadoperationcompletes.TheECisexpectedto
respondtolevelchangesintheEC_REQUEST#signalratherthantoedgessoastoavoid
missingthefirstrequestaftersystemstartup.
TheAPmaychoosetoenteralowpowersleepstateinordertominimizepower
consumption.Inthisstate,theAPwillbeunabletorespondtoanySMBustransactions.
TheAPnotifiestheEC(viaanSMBustransaction)beforeenteringthesleepstate,after
whichtheECmustceaseallfurtherSMBustransactionsinvolvingtheAP.
TheECmaybeconfiguredtowaketheAPinresponsetocertainevents.TowaketheAP,
theECassertsanactivelowsidebandsignal,AP_WAKE#.TheAPrespondstolevel
changesintheAP_WAKE#signal,sotheECmustkeepthesignalasserteduntiltheAP
confirmsthatitisawake.WhentheAPwakesup,itsignalsitsreadinesstoresume
SMBustransactionsbyassertingEC_REQUEST#andtherebyinitiatingadatatransferto
theEC.TheECthendeassertsAP_WAKE#andresumesnormalSMBusoperations,
startingwiththedatatransferinitiatedbytheassertionofEC_REQUEST#.
IfthesystemarchitectureallowsotherdevicesbesidestheECtowakeuptheAP,then
theECmustcontinuetomonitorEC_REQUEST#evenaftertheAPhasgonetosleep.If
theAPisawakenedduetosomenonECrelatedevent,assertionofEC_REQUEST#isthe
onlyindicationtotheECthatSMBusoperationsneedtoresume.
AnydeviceontheSMBushasaunique7bitaddress.TegraAPhasadefaultaddressof
1000_101b. 1Inthecasethatanotherdevicewiththataddressisconnectedtothesame
SMBussegment,thedefaultAPaddresscanbereprogrammed.Themechanismof
addressreprogrammingisbeyondthescopeofthisdocument.
AsanSMBusslavedevice,PacketErrorChecking(PEC)supportisoptionalfortheTegra
AP.ThemechanismforenablinganddisablingPECsupport,ifany,isbeyondthescope
ofthisdocument.

NVIDIAiscommunicatingwithSMBusWorkingGroupinordertoincludeTegrawiththis
addressintoSMBusdeviceassignmentlist.

DA_04649001_11
6October2009

13

Tegra Embedded Controller Interface Specification 1.0

4. Packets
TheSMBusblockreadandblockwriteoperationsbetweenAPandECtransportthree
typesofpackets:

Requests(fromAPtoEC)operationsinitiatedbytheAP
Responses(fromECtoAP)ECgeneratedresponsetoarequestpacket
Asynchronousevents(fromECtoAP)ECgeneratedevent

AllpacketscontainaCommandfield.Inaddition,Subcommand,PacketLength,Status,
andPayloadfieldsmayalsobepresent,dependingonthepackettype.

4.1. Packet Fields


4.1.1. Command Field
Thecommandfieldisonebyteinsizeandencodescoreinformationaboutthepacket,as
showninTable1.EventPacketscanbevariablelengthorfixedlength;whereasRequest
PacketsandResponsePacketsarealwaysvariablelength.
TheRequestorTagisassignedbytheAPforeachRequestPacketandechoedbackbythe
ECaspartofthecorrespondingResponsePacket.Itisusedtodemuxthepacketstream
receivedfromtheEC,suchthateachResponsePacketcanbeconnectedtoitsoriginating
RequestPacketandroutedbacktotheappropriaterequestor.Whengeneratinga
Responsepacket,theECcopiestheCommandfieldfromtheRequestPacketintothe
ResponsePacketverbatim,thusensuringthattheRequestorTagisechoedbacktotheAP
unchanged.
TheCommandTypefieldindicatesthegeneralcategoryofoperationtobecarriedout.
TheSubcommandfield(Section4.1.2)providesfurtherinformationabouttheintended
operation.
Note:SomeCommandTypeandEventTypevalueshavebeensetasideforOEM
definedextensions.Toensurecompatibilitywithfuturerevisionsofthisdocument,
OEMsshouldnotuseanyofthereservedCommandTypeorEventTypevalues.

14

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

Table1CommandFieldStructure
Command Field
Bit(s)

7:7

Description

PacketType

0bResponsePacketorRequestPacket

1bEventPacket

forEventPackets(PacketTypeis1b)
6:5

TransferType
0hFixedlengthtransfer,Commandfield+1byte
1hFixedlengthtransfer,Commandfield+2bytes
2hVariablelengthtransfer,asspecifiedbyPacketLengthfield(Section
4.1.3)
3hReserved

4:4

3:0

ErrorFlag

0bSuccessfulcompletion;noerroroccurred

1bAnerroroccurred,asspecifiedbytheStatusfield(Section4.1.4)

EventType
0hKeyboard
1hAuxiliaryDevice0(PS/2port0)
2hAuxiliaryDevice1(PS/2port1)
3hAuxiliaryDevice2(PS/2port2)
4hAuxiliaryDevice3(PS/2port3)
5hSystem
6hGPIO(scalar)
7hGPIO(vector)
8hBattery
dhOEMdefined
ehOEMdefined
OthersReserved

forRequestPacketsandResponsePackets(PacketTypeis0b)
6:4

RequestorTagvalueassignedbyAPandechoedbackbyEC

DA_04649001_11
6October2009

15

Tegra Embedded Controller Interface Specification 1.0

3:0

CommandType
1hSystemStatus
2hBatteryInformation
3hGPIOControl
4hSleepStateControl
5hKeyboard
6hAuxiliaryDevice
7hECControl
dhOEMdefined
ehOEMdefined
OthersReserved

4.1.2. Sub-command Field


TheSubcommandfieldisonebyteinsizeandfurtherrefinestheCommandType.The
structureandcontentsoftheSubcommandfielddependontheCommandType.Sub
commandvaluesaredetailedinSections6and7below.
WhengeneratingaResponsePacket,theECcopiestheSubcommandfieldverbatim
fromtheassociatedRequestPacket.

4.1.3. Packet Length Field


ThePacketLengthfieldisonebyteinsizeandencodesthesizeofthepacket(inbytes).
ThePacketLengthfieldmustalwaysbespecifiedforvariablelengthpackets(Transfer
Typeis2h),butmustnotbespecifiedforfixedlengthpackets(TransferTypeis0hor1h).
DuetothestructureoftheSMBusblockoperations,thePacketLengthiscomputed
differentlyforblockreadoperations(i.e.,Requestpackets)thanforblockwrite
operations(i.e.,ResponsepacketsandEventpackets).SeeSection5fordetailsofthe
SMBusblockoperations.Packetlengthcanneverbezero.

4.1.4. Status Field


TheStatusfieldindicateswhethertherequestedoperationcouldbecompleted
successfully.ResponsePacketsarerequiredtocontaintheStatusfield,whereasRequest
PacketsnevercontaintheStatusfield,andEventPacketscontaintheStatusfieldonly
whentheErrorFlagisnonzero.Legalvaluesaretabulatedbelow.
Note:SomeStatusvalueshavebeensetasideforOEMdefinedextensions.Toensure
compatibilitywithfuturerevisionsofthisdocument,OEMsshouldnotuseanyof
thereservedStatusvalues.

16

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

Table2StatusFieldStructure
Status Field
Bit(s)

7:0

Description

Status
00hSuccessfulcompletion
01hPS/2AuxiliaryPorttimeouterror
02hPS/2AuxiliaryPortparityerror
03hHardwareresourcetemporarilyunavailable,i.e.,requesteddata
fromanemptyslot(=notconnectedbattery)
04hInvalidcommand(orsubcommand)
05hInvalidsize.Packetsizeisincorrectforthespecifiedoperation
06hInvalidparameter.Payloaddataisincorrectforthespecified
operation
07hUnsupportedconfiguration.Requestedconfigurationsarenot
supportedbytheEChardwareand/orfirmware.
08hChecksumerror
09hDevicewriteerror
0ahDevicereaderror
0bhDataoverflowerror
0chDataunderflowerror
0dhInvalidstateerror.TheECisnotintheproperstatetocarryoutthe
requestedoperation
d0hefhOEMdefinederrors
ffhErrorReport:anyotherreasonthandescribedabove
OthersReserved

4.1.5. Payload Field


ThePayloadfieldcanbevariablelengthorfixedlengthdependingontheTransferType
settingintheCommandfield.ThecontentofthePayloadfielddependsonthePacket
Type,CommandType,SubcommandType,andEventType.Thesizeofthepayload
fieldcanbeinferredfromthePacketType,TransferType,andPacketLength.

DA_04649001_11
6October2009

17

Tegra Embedded Controller Interface Specification 1.0

5. SMBus Messages
ThissectiondescribestheSMBusmessagescorrespondingtothethreepackettypes
(Request,Response,andEvent).
ThelargestSMBusoperationis34bytesinlength.ThiscorrespondstoaBlockWrite
operationwithaByteCountof32(Subcommand,Status,and30bytePayload)andPEC.
Thisallowsfor30bytesofabatterysidentificationstringtobereported.

5.1. Request Packet Format


RequestpacketsarealwayssentfromtheAPtotheECusingSMBusblockread
operations.TheECalwaysactsasanSMBusmasterandtheAPalwaysactsasanSMBus
slave.
Note:TheSMBusCommandmustbethevalue0x1.Also,therequestortagvaluein
the(Request)commandfieldmustbenonzero.
ThediagramsinthefollowingsectionsfollowtheconventionsetoutintheSMBus
Specification(Version2.0,August3,2000).FromFigure51ofthatspec,thetoprowis
thenumberofbitsineachfield,andthemiddlerowcontainstheSMBusfieldnames.
Greyboxesindicateslavetomastertransfers,whereaswhiteboxesindicatemasterto
slavetransfers.Abbreviationsareshowninthefollowingtable.
Table3SMBusPacketProtocolDiagramElements
Abbreviation

FullName

StartCondition

Sr

RepeatedStartCondition

Rd

Read(bitvalueof1)

Write(bitvalueof0)

Acknowledge(0forACK,1forNACK)

StopCondition

PEC

PacketErrorCode

Finally,thebottomrowinthediagramgivestheECInterfacefieldnames.IftheEC
Interfacerequiresaspecificconstantvalueinagivenfield,theconstantisshownrather
thanthefieldname.

18

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

Figure2RequestPacketMappedtoSMBusBlockReadOperation
1

SlaveAddress

Wr

Command

Sr

SlaveAddress

Rd

TegraSMBus
Address

0x1

TegraSMBus
Address

ByteCount

DataByte1

DataByte2

DataByte3

PacketLength
(N)

Request
Command

Subcommand

Payload

DataByteN

PEC 2

Payload

0 3

2PacketErrorCode(PEC)byteandfollowingAcknowledgebitareoptional.PECbyteis
calculatedovertheentiremessageasdefinedbySMBusspecification.
3IfthePECispresent,thentheprecedingAcknowledgewillbeanACK,otherwiseitwillbea
NACK.

DA_04649001_11
6October2009

19

Tegra Embedded Controller Interface Specification 1.0

5.2. Response Packet Format


ResponsepacketsarealwayssentfromtheECtotheAPusingSMBusblockwrite
operations.TheECalwaysactsasanSMBusmasterandtheAPalwaysactsasanSMBus
slave.Thecommandandsubcommandfieldsarecopiedverbatimfromthe
correspondingRequestpacket.
Insomecases,theResponsesimplyneedstoindicatewhethertheRequestsucceededor
failed;nopayloaddataisneededorsupplied.ThisspecialcaseofaResponsepacketis
calledanAckpacket.
Note:Therequestortagvalueinthe(Response)commandfieldmustbenonzero.
Figure3ResponsePacketMappedtoSMBusBlockWriteOperation

SlaveAddress

Wr

Command

ByteCount

DataByte1

TegraSMBus
Address

Response
Command

PacketLength
(N)

Sub
Command

DataByte2

DataByte3

Status

Payload

DataByteN

PEC2

Payload

20

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

Figure4AckPacketMappedtoSMBusBlockWriteOperation

SlaveAddress

Wr

Command

ByteCount

DataByte1

TegraSMBus
Address

Response
Command

PacketLength
(N)

Sub
Command

DataByte2

PEC2

Status

DA_04649001_11
6October2009

21

Tegra Embedded Controller Interface Specification 1.0

5.3. Event Packet Format


EventPacketsarealwayssentfromtheECtotheAPandcanbeeithervariablelengthor
fixedlength.VariablelengthpacketsaresentusingtheSMBusblockwriteoperation.
FixedlengthpacketsaresentusingtheSMBuswritebyteorSMBuswriteword
operation,dependingonthepayloadsize(onebyteortwobytes).TheECalwaysactsas
anSMBusmasterandtheAPalwaysactsasanSMBusslave.
Note:IftheErrorFlagisnonzero,thentheStatusfieldreplacesthefirstbyteofthe
Payloadfield.
Figure5VariableLengthEventPacketMappedtoSMBusBlockWriteOperation

SlaveAddress

Wr

Command

ByteCount

DataByte1

TegraSMBus
Address

Event
Command

PacketLength
(N)

Payload

DataByte2

DataByte3

Payload

Payload

DataByteN

PEC2

Payload

Figure6FixedLengthEventPacketMappedtoSMBusWriteByteOperation

SlaveAddress

Wr

Command

DataByte1

PEC2

TegraSMBus
Address

Event
Command

Payload

22

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

Figure7FixedLengthEventPacketMappedtoSMBusWriteWordOperation

SlaveAddress

Wr

Command

DataByte1

DataByte2

TegraSMBus
Address

Event
Command

Payload

Payload

PEC2

Figure8VariableLengthEventPacketwithErrorMappedtoSMBusBlockWrite
Operation

SlaveAddress

Wr

Command

ByteCount

DataByte1

TegraSMBus
Address

Event
Command 4

PacketLength
(N)

Status

DataByte2

DataByte3

Payload

Payload

DataByteN

PEC2

Payload

4TheErrorFlagintheCommandFieldwillbesetinthispacket,indicatingthatanerrorhas
occurredandthattheStatusFieldwillreplacethefirstbyteofthePayload.

DA_04649001_11
6October2009

23

Tegra Embedded Controller Interface Specification 1.0

Figure9FixedLengthEventPacketwithErrorMappedtoSMBusWriteByte
Operation

SlaveAddress

Wr

Command

DataByte1

PEC2

TegraSMBus
Address

Event
Command4

Status

Figure10FixedLengthEventPacketwithErrorMappedtoSMBusWriteWord
Operation

SlaveAddress

Wr

Command

DataByte1

DataByte2

TegraSMBus
Address

Event
Command4

Status

Payload

PEC2

24

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6. Request and Response Packets


ThesupportedcommandsandsubcommandsforRequestpacketsfromtheAPare
summarizedinthefollowingsections,alongwiththecorrespondingResponsepackets
fromtheEC.
TheECisrequiredtosendaresponseforeveryrequestthatitreceives.Ifan
unrecognizedorunsupportedcommandorsubcommandisreceived,anAckpacket
withaStatusofInvalidCommandmustbereported.
TheECmustignoreallreservedbitsintherequestpacketsthatitreceives.Similarly,the
ECmustsetallreservedbitstozerointheresponsepacketsandeventpacketsthatit
sends.

DA_04649001_11
6October2009

25

Tegra Embedded Controller Interface Specification 1.0

6.1. System Status


ThisrequestisusedtoquerythestatusoftheEC.Itisalsoallowedtoconveyrequests
fromtheECtotheAP,includingrequeststhattheAPpowerdownorenteritssleep
state.
ThesystemstatuscanbequeriedmanuallyusingtheGetSystemStatuscommand.When
eventreportingisenabledviatheConfigureEventReportingcommand,theEC
automaticallysendsaSystemEventpacket(seeSection7.1)wheneverthesystemstatus
changes.Eventreportingisinitiallydisabledafterreset.
SomeofthesystemstatusfieldspersistuntilclearedviatheAcknowledgeSystemStatus
command.TheseincludetheAPPowerDownRequest,APSuspendRequest,andAP
RestartRequestfields,bywhichtheECtriggersapowerstatechangeontheAP.
Note:TheacknowledgeindicatesthattheAPhasreceivedtherequestandwillbegin
processingit,notthatprocessingoftherequesthasbeencompleted.Similarly,the
ECResetNotificationfieldisusedbytheECtoalerttheAPthataresethasoccurred.
ThisfieldissetbydefaultwhentheECbootsupandpersistsuntilacknowledgedby
theAP.TheECwillreportaStatusofSuccessiftheAPacknowledgesanon
persistentsystemstatusfieldorapersistentstatusfieldthatisalreadycleared.
TheAPcanalsobeawakenedfromitssleepstateduetochangesinthesystemstatus.
TheConfigureWakecommandcontrolswhetherthisfunctionalityisenabled.Further
discussionofsleepcontrolcanbefoundinSection6.4.
Thesystemstatuscommandsandsubcommandsaretabulatedbelow.

Table4RequestSystemStatus
SMBus Protocol Byte

Description

Note

CommandByte

01h

SystemStatus

ByteCount

01h

DataByte1(SubCommand) 7:0

00hGetSystemStatus
01hConfigureEventReporting
02hAcknowledgeSystemStatus
fdhConfigureWake

26

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

DataByte2DataByteN

Forsubcommand01h,configuration
setting
Forsubcommand02h,systemeventtypes
Forsubcommandfdh,configuration
setting
Otherwise,nodatabytes

DA_04649001_11
6October2009

27

Tegra Embedded Controller Interface Specification 1.0

6.1.1. Get System Status Response


Table5ResponseGetSystemStatus
SMBus Protocol Byte

Description

Note

CommandByte

01h

SystemStatus

ByteCount

06h

DataByte1(SubCommand) 00h

GetSystemStatus

DataByte2(Status)

00h

Successful

DataByte3

SystemStateBits70

SeeTable6

DataByte4

SystemStateBits158

DataByte5

OEMSystemStateBits SeeTable7
70

DataByte6

OEMSystemStateBits
158

Table6SystemStateFlags
System State Bit(s)

15:5
4

Description

Reserved(00h)
ECResetNotification
0bNoECResethasoccurred
1bAnECResethasoccurred
Notificationpersistsuntilacknowledged

APPowerDownRequest
0bECdoesNOTrequestthatAPpowerdown
1bECrequeststhatAPpowerdown
Requestpersistsuntilacknowledged

APSuspendRequest
0bECdoesNOTrequestthatAPentersuspendstate
1bECrequeststhatAPentersuspendstate
Requestpersistsuntilacknowledged

28

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

APRestartRequest
0bECdoesNOTrequestthatAPrestart
1bECrequeststhatAPrestart
Requestpersistsuntilacknowledged

ACPresent
0bNoAC(BatteryPower)
1bACPresent
Noacknowledgerequired

Table7OEMSystemStateFlags
System State Bit(s)

15:0

Description

OEMdefined

DA_04649001_11
6October2009

29

Tegra Embedded Controller Interface Specification 1.0

6.1.2. Acknowledge System Status Request


Table8AcknowledgeSystemStatusRequest
SMBus Protocol Byte

Description

Note

CommandByte

01h

SystemStatus

ByteCount

05h

DataByte1(SubCommand) 02h

AcknowledgeSystemStatus

DataByte2

SystemStateFlagBits SeeTable6.Eachbitvaluecontrolsthe
70
correspondingSystemStateFlag.

DataByte3

SystemStateFlagBits
158

DataByte4

OEMSystemState
FlagBits70

DataByte5

OEMSystemState
FlagBits158

0bDonotacknowledge
1bAcknowledge
SeeTable7.Eachbitvaluecontrolsthe
correspondingOEMSystemStateFlag.
0bDonotacknowledge
1bAcknowledge

6.1.3. Acknowledge System Status Response


ResponsetoanAcknowledgeSystemStatusRequestisanAckpacket.

30

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.1.4. Configure Event Reporting Request


Table9ConfigureEventReportingRequest
SMBus Protocol Byte

Description

Note

CommandByte

01h

SystemStatus

ByteCount

06h

DataByte1(SubCommand) 01h

ConfigureEventReporting

DataByte2

ConfigurationAction

0hDisableeventreporting
1hEnableeventreporting

DataByte3

SystemStateFlag
MaskBits70

SeeTable6.Eachmaskbitcontrolswhether
theConfigurationActionisappliedtothe
correspondingSystemStateFlag.

DataByte4

SystemStateFlag
MaskBits158

DataByte5

OEMSystemState
FlagMaskBits70

DataByte6

OEMSystemState
FlagMaskBits158

0bDonotapplyConfigurationAction
1bApplyConfigurationAction
SeeTable7.Eachmaskbitcontrolswhether
theConfigurationActionisappliedtothe
correspondingOEMSystemStateFlag.
0bDonotapplyConfigurationAction
1bApplyConfigurationAction

6.1.5. Configure Event Reporting Response


ResponsetoaConfigureEventReportingRequestisanAckpacket.

DA_04649001_11
6October2009

31

Tegra Embedded Controller Interface Specification 1.0

6.1.6. Configure Wake Request

Table10ConfigureWakeRequest
SMBus Protocol Byte

Description

Note

CommandByte

01h

SystemStatus

ByteCount

06h

DataByte1(SubCommand) fdh

ConfigureWake

DataByte2

ConfigurationAction 0hDisablewakeforevent
1hEnablewakeforevent

DataByte3

SystemEventType
MaskBits70

DataByte4

SystemEventType
MaskBits158

DataByte5

OEMSystemEvent
TypeMaskBits70

DataByte6

OEMSystemEvent
TypeMaskBits158

SeeTable6.Eachmaskbitcontrolswhether
theConfigurationActionisappliedtothe
correspondingSystemEventType.
0bDonotapplyConfigurationAction
1bApplyConfigurationAction
SeeTable7.Eachmaskbitcontrolswhether
theConfigurationActionisappliedtothe
correspondingOEMSystemEventType.
0bDonotapplyConfigurationAction
1bApplyConfigurationAction

32

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.2. Battery Information


ThisrequestisusedtoqueryinformationaboutbatteriesconnectedtotheEC.TheEC
canbeconfiguredtonotifytheAPwhencertainbatteryeventsoccur,suchaswhena
batteryisinsertedorremoved,whenthechargingstatechanges,orwhenalowpower
thresholdisreached.NotificationstaketheformofBatteryEventpacketssentfromthe
ECtotheAP.
Thenumberofbatteryslotsinthesystem(andthereforethemaximumnumberof
batteriesthatcanbeinstalled)isreportedviatheGetSystemConfiguration(Section
6.7.4).Mostbatterycommandsarespecifictoagivenbatteryslot,andtheslotnumberis
encodedinthecommand.Itisillegaltoreferenceaslotnumbergreaterthanthe
maximumreportedbyECCapabilities.
Ifacommandisdirectedtoalegalslotnumber,butforwhichthebatteryisnotcurrently
present,aStatusofHardwareResourceTemporarilyUnavailable(seeTable2).
TheBatteryEventpacketisdocumentedinSection7.2.TheConfigureEventReporting
commandscontrolwhenBatteryEventpacketsaresent.Thesameinformationcanbe
polledbytheAPviatheGetSlotStatusandCapacityGaugecommand.Eventreporting
isinitiallydisabledafterreset.
BatteryeventscanalsotriggerwakingtheAPfromitssleepstate.Furtherdiscussionof
sleepcontrolcanbefoundinSection6.4.TheroleoftheConfigureWakecommandis
describedthere.
TheSetRemainingCapacityAlarmisusedtosetathresholdfordetectinglowbattery
power.Whentheremainingcapacityfallsbelowthethresholdvalue,theRemaining
CapacityAlarmbitoftheBatterySlotStatusissettoone.TheBatterySlotStatuscanbe
obtainedviatheGetSlotStatusandCapacityGaugecommandor(ifnotificationsare
enabledviaEnableEventReporting)theBatteryEventpacket.Normally,these
notificationsareonlysentwhentheremainingcapacitycrossesthethreshold,butifthe
capacityisalreadybelowthethresholdatthetimewhennotificationsareenabled,then
theECwillproceedtosendthenotification.
TheECmaynotallowthesystemtooperateoncethebatterycapacityreachessome
criticallowthreshold;theAPcanquerythisthresholdvalueviatheGetCriticalCapacity
command.SettingtheRemainingCapacityAlarmthresholdatorbelowtheCritical
Capacitythresholddisablesthealarm.
BatterycapacityinformationcanbereportedinunitsofmAhor10mWh,dependingon
thesettingspecifiedviatheSetConfigurationcommand.
Note:TheECisnotresponsibleforconvertinguserspecifiedsettingswhenthe
capacityunitschange.UnlesstheAPrespecifiesthesettingsinthenewunits,theEC
willcontinuetousetheoriginalsettingvaluebutwiththenewunits.Forexample,5

DA_04649001_11
6October2009

33

Tegra Embedded Controller Interface Specification 1.0

mAhwillbecome5*10mWh.ThisconversionissueaffectstheSetRemaining
CapacityAlarmandGetRemainingCapacityAlarmcommands.
Thebatterycommandsandsubcommandsaretabulatedbelow.Theresponseforeach
subcommandisdetailedintheensuingsubsections.

34

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

Table11RequestBatteryInformation
SMBus Protocol Byte

Description

Note

CommandByte

02h

BatteryInformation

ByteCount

DataByte1(SubCommand) 7:5

BatterySlotTag
0hBatterySlot0
1hBatterySlot1
2hBatterySlot2
3hBatterySlot3
OthersReserved

4:0

BatteryOperations
00hGetSlotStatusandCapacity
Gauge
01hGetVoltage
02hGetRemainingTimetoEmpty
03hGetCurrent
04hGetAverageCurrent
05hGetAveragingTimeInterval
06hGetRemainingCapacity
07hGetLastFullChargeCapacity
08hGetDesignCapacity
09hGetCriticalCapacity
0ahGetTemperature
0bhGetManufacturerName
0chGetModel
0dhGetType
0ehSetRemainingCapacityAlarm
0fhGetRemainingCapacityAlarm
10hSetConfiguration
11hGetConfiguration
12hConfigureEventReporting
1dhConfigureWake
OthersReserved

DA_04649001_11
6October2009

35

Tegra Embedded Controller Interface Specification 1.0

DataByte2DataByteN

Forsubcommand0eh,alarmthreshold
value
Forsubcommand10h,configuration
setting
Forsubcommand12h,configuration
setting
Forsubcommand1dh,configuration
setting
Otherwise,nodatabytes

36

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.2.1. Get Slot Status and Capacity Gauge Response


Table12GetSlotStatusandCapacityGaugeResponse
SMBus Protocol Byte

Description

Note

CommandByte

02h

BatteryInformation

ByteCount

04h

DataByte1(SubCommand) 7:5

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

4:0

00h

DataByte2(Status)

00h

Successful

DataByte3

BatterySlotStatus

SeeTable13

DataByte4

BatteryCapacityGauge Batterysrelativeremainingcapacityin%

DA_04649001_11
6October2009

37

Tegra Embedded Controller Interface Specification 1.0

Table13BatterySlotStatus
Status Bit(s)

7:4
3

Description

Reserved(0h)
RemainingCapacityAlarm
0bNoalarm
1bAlarmisset

2:1

Chargingstate
00bBatteryisidle(selfdischarging)
01bBatteryisbeingcharged
10bBatteryisbeingdischarged(poweringthesystem)
11bReserved

PresentState
0bBatteryisnotpresentintherespectiveslot
1bBatteryispresentintherespectiveslot

38

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.2.2. Get Voltage Response


Table14GetVoltageResponse
SMBus Protocol Byte

Description

Note

CommandByte

02h

BatteryInformation

ByteCount

04h

DataByte1(SubCommand) 7:5

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

4:0

01h

DataByte2(Status)

00h

Successful

DataByte3

PresentVoltage
Bits70

Batteryspresentvoltage(16bitunsigned
value,inmV)

DataByte4

PresentVoltage
Bits158

DA_04649001_11
6October2009

39

Tegra Embedded Controller Interface Specification 1.0

6.2.3. Get Remaining Time to Empty Response


Table15GetRemainingTimetoEmptyResponse
SMBus Protocol Byte

Description

Note

CommandByte

02h

BatteryInformation

ByteCount

04h

DataByte1(SubCommand) 7:5

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

4:0

02h

DataByte2(Status)

00h

Successful

DataByte3

TimetoEmptyBits70 Estimatedremainingtimetoemptyfor
dischargingbatteryatpresentrate(16bit
TimetoEmptyBits15 unsignedvalue,inminutes)
8
0FFFFhifbatteryisnotdischarging

DataByte4

40

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.2.4. Get Current Response


Table16GetCurrentResponse
SMBus Protocol Byte

Description

Note

CommandByte

02h

BatteryInformation

ByteCount

04h

DataByte1(SubCommand) 7:5

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

4:0

03h

DataByte2(Status)

00h

Successful

DataByte3

PresentCurrent
Bits70

Batteryspresentcurrentattheterminals(16
bitsignedvalue,inmA)

DataByte4

PresentCurrent
Bits158

0to32,767ifcharging
0to32,768ifdischarging

DA_04649001_11
6October2009

41

Tegra Embedded Controller Interface Specification 1.0

6.2.5. Get Average Current Response


Table17GetAverageCurrentResponse
SMBus Protocol Byte

Description

Note

CommandByte

02h

BatteryInformation

ByteCount

04h

DataByte1(SubCommand) 7:5

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

4:0

04h

DataByte2(Status)

00h

Successful

DataByte3

RateBits70

Batterysaveragecurrentattheterminals
(16bitsignedvalue,inmA)

DataByte4

RateBits158

0to32,767ifcharging
0to32,768ifdischarging

42

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.2.6. Get Averaging Time Interval Response


Table18GetAveragingIntervalResponse
SMBus Protocol Byte

Description

Note

CommandByte

02h

BatteryInformation

ByteCount

04h

DataByte1(SubCommand) 7:5

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

4:0

05h

DataByte2(Status)

00h

Successful

DataByte3

TimeInterval
Bits70

Timeintervaloverwhichaveragedvalues
arecomputed(16bitunsignedvalue,in
msec).

DataByte4

TimeInterval
Bits158

DA_04649001_11
6October2009

43

Tegra Embedded Controller Interface Specification 1.0

6.2.7. Get Remaining Capacity Response


Table19GetRemainingCapacityResponse
SMBus Protocol Byte

Description

Note

CommandByte

02h

BatteryInformation

ByteCount

04h

DataByte1(SubCommand) 7:5

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

4:0

06h

DataByte2(Status)

00h

Successful

DataByte3

CapacityBits70

Batterysremainingcapacity(16bitunsigned
value,inCapacityUnits)

DataByte4

CapacityBits158

44

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.2.8. Get Last Full Charge Capacity Response


Table20GetLastFullChargeCapacityResponse
SMBus Protocol Byte

Description

Note

CommandByte

02h

BatteryInformation

ByteCount

04h

DataByte1(SubCommand) 7:5

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

4:0

07h

DataByte2(Status)

00h

Successful

DataByte3

CapacityBits70

DataByte4

CapacityBits158

Batteryscapacitywhenfullychargedlast
time(16bitunsignedvalue,inCapacity
Units)

DA_04649001_11
6October2009

45

Tegra Embedded Controller Interface Specification 1.0

6.2.9. Get Design Capacity Response


Table21GetDesignCapacityResponse
SMBus Protocol Byte

Description

Note

CommandByte

02h

BatteryInformation

ByteCount

04h

DataByte1(SubCommand) 7:5

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

4:0

08h

DataByte2(Status)

00h

Successful

DataByte3

CapacityBits70

Batterysdesigncapacity(16bitunsigned
value,inCapacityUnits)

DataByte4

CapacityBits158

46

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.2.10. Get Critical Capacity Response


Table22GetCriticalCapacityResponse
SMBus Protocol Byte

Description

Note

CommandByte

02h

BatteryInformation

ByteCount

04h

DataByte1(SubCommand) 7:5

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

4:0

09h

DataByte2(Status)

00h

Successful

DataByte3

CapacityBits70

Batteryscriticalcapacity(16bitunsigned
value,inCapacityUnits)

DataByte4

CapacityBits158

DA_04649001_11
6October2009

47

Tegra Embedded Controller Interface Specification 1.0

6.2.11. Get Temperature Response


Table23GetTemperatureResponse
SMBus Protocol Byte

Description

Note

CommandByte

02h

BatteryInformation

ByteCount

04h

DataByte1(SubCommand) 7:5

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

4:0

0ah

DataByte2(Status)

00h

Successful

DataByte3

TemperatureBits70

Batterystemperature(16bitunsignedvalue,
in0.1K)

DataByte4

TemperatureBits158

48

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.2.12. Get Manufacturer Response


Table24GetManufacturerResponse
SMBus Protocol Byte

Description

Note

CommandByte

02h

BatteryInformation

ByteCount

N=03h20h

DataByte1(SubCommand) 7:5

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

4:0

0bh

DataByte2(Status)

00h

Successful

DataByte3DataByteN

ASCIIstring

Manufacturernameisupto30characters
(maynotbenullterminated)

DA_04649001_11
6October2009

49

Tegra Embedded Controller Interface Specification 1.0

6.2.13. Get Model Response


Table25GetModelResponse
SMBus Protocol Byte

Description

Note

CommandByte

02h

BatteryInformation

ByteCount

N=03h20h

DataByte1(SubCommand) 7:5

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

4:0

0ch

DataByte2(Status)

00h

Successful

DataByte3DataByteN

ASCIIstring

Batterymodelisupto30characters(maynot
benullterminated)

50

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.2.14. Get Type Response


Table26GetTypeResponse
SMBus Protocol Byte

Description

Note

CommandByte

02h

ByteCount

N=03h20h

DataByte1(SubCommand) 7:5

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

4:0

0dh

DataByte2(Status)

00h

Successful

DataByte3DataByteN

ASCIIstring

Batterytype(commonlybatterychemistry)is
upto30characters(maynotbenull
terminated).

DA_04649001_11
6October2009

51

Tegra Embedded Controller Interface Specification 1.0

6.2.15. Set Remaining Capacity Alarm Request


Table27SetRemainingCapacityAlarmRequest
SMBus Protocol Byte

Description

Note

CommandByte

02h

BatteryInformation

ByteCount

04h

DataByte1(SubCommand) 7:5

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

4:0

0eh

DataByte3

CapacityBits70

Thresholdforremainingcapacityalarm(16
bitunsignedvalue,inCapacityUnits)

DataByte4

CapacityBits158

6.2.16. Set Remaining Capacity Alarm Response


ResponsetoaSetBatteryLowCapacityAlarmRequestisanAckpacket.

52

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.2.17. Get Remaining Capacity Alarm Response


Table28GetRemainingCapacityAlarmResponse
SMBus Protocol Byte

Description

Note

CommandByte

02h

BatteryInformation

ByteCount

04h

DataByte1(SubCommand) 7:5

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

4:0

0fh

DataByte2(Status)

00h

Successful

DataByte3

CapacityBits70

Thresholdforremainingcapacityalarm(16
bitunsignedvalue,inCapacityUnits)

DataByte4

CapacityBits158

DA_04649001_11
6October2009

53

Tegra Embedded Controller Interface Specification 1.0

6.2.18. Set Configuration Request


Table29SetConfigurationRequest
SMBus Protocol Byte

Description

Note

CommandByte

02h

BatteryInformation

ByteCount

02h

DataByte1(SubCommand) 7:5

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

4:0
DataByte2

10h

ConfigurationSetting SeeTable30

Table30BatteryConfigurationSettings
Battery Configuration
Bit(s)

Description

7:1

Reserved(0b)

CapacityUnits
0bcapacityvaluesarereportedinunitsofmAh
1bcapacityvaluesarereportedinunitsof10mWh
InitialsettinginmAh(0b).

6.2.19. Set Configuration Response


ResponsetoaSetBatteryConfigurationRequestisanAckpacket.

54

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.2.20. Get Configuration Response


Table31GetConfigurationResponse
SMBus Protocol Byte

Description

Note

CommandByte

02h

BatteryInformation

ByteCount

03h

DataByte1(SubCommand) 7:5

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

4:0

11h

DataByte2(Status)

00h

Successful

DataByte3

ConfigurationSetting SeeTable30

DA_04649001_11
6October2009

55

Tegra Embedded Controller Interface Specification 1.0

6.2.21. Configure Event Reporting Request


Table32EnableEventReportingRequest
SMBus Protocol Byte

Description

Note

CommandByte

02h

BatteryInformation

ByteCount

02h

DataByte1(SubCommand) 7:5

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

4:0

12h

DataByte2

ConfigurationAction

0hDisableeventreporting
1hEnableeventreporting

DataByte3

BatteryEventMask

SeeTable33.Eachmaskbitvaluecontrols
whethertheConfigurationActionisapplied
tothespecifiedBatteryEventType.
0bDonotapplyConfigurationAction
1bApplyConfigurationAction

Table33BatteryEventType
System State Bit(s)

7:3

Description

Reserved(00h)

RemainingCapacityAlarm

ChargingState

PresentState

6.2.22. Configure Event Reporting Response


ResponsetoaConfigureEventReportingRequestisanAckpacket.

56

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.2.23. Configure Wake Request

Table34ConfigureWakeRequest
SMBus Protocol Byte

Description

Note

CommandByte

02h

BatteryInformation

ByteCount

03h

DataByte1(SubCommand) 7:5

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

4:0

1dh

DataByte2

ConfigurationAction

0hDisablewakeforevent
1hEnablewakeforevent

DataByte3

BatteryEventMask

SeeTable33.Eachmaskbitcontrolswhether
theConfigurationActionisappliedtothe
correspondingBatteryEventType.
0bDisablewakeforevent
1bEnablewakeforevent

6.2.24. Configure Wake Response


ResponsetoaConfigureWakeRequestisanAckpacket.

DA_04649001_11
6October2009

57

Tegra Embedded Controller Interface Specification 1.0

6.3. GPIO Control


ThisrequestisusedtoconfigureGPIOoperation,allowingtheAPtocontroldevices
connectedtotheECsGPIOpins.TheGPIOpinscanbeconfiguredasinputsoroutputs,
andnotificationscanbesenttotheAPwhenevercertaininputsignalchangesoccur.
SelectionofthephysicalECGPIOpinstobecontrolledbytheAP,thecapabilitiesof
thosepins,theirinitialconfiguration,themappingoflogicalGPIOnumberstophysical
ECGPIOpins,andthemappingoflogicalsignallevelstosignalpolarityatthephysical
pinsisoutsidethescopeofthisdocument.Theseplatformspecificdetailsarelefttothe
systemintegratortodefineandtheECfirmwaredevelopertoimplement.
TheECreportsthetotalnumberofGPIOpinscontrollablebytheAPviatheGetSystem
Configurationrequest(Section6.7.4).LegallogicalGPIOnumbersrangefromzerotoone
lessthanthetotalnumberofAPcontrollableGPIOpins.
Note:ThemaximumnumberofGPIOpinsiseffectivelylimitedto232;thisis
governedbythemaximumpayloadlengthforanSMBusblockread(32bytes)and
themaximumoverheadforavectortypecommand(3bytes;SetPinRequest),thus
limitingthebitvectorlengthto29bytesor232bits.
TheConfigurePincommandisusedtoselectthepinsoperationmodeasinput,output,
tristate(highimpedance),orunused.Forinputpins,atriggertypeisalsospecified;
wheneverthetriggereventoccurs,anotificationissenttotheAP,providedthatevent
reportingisenabled(detailsbelow).
Note:SettingpinsasunusedallowstheECtoreclaimthepinforitsownpurposes;
ifalsonotneededbytheEC,thepinandassociatedhardwarelogiccanbepowered
down.Ifanunsupportedpinconfigurationisspecified,theUnsupported
Configurationerror(Table2)isreportedintheresponseandthepinconfigurationis
notchanged.
TheoutputdrivelevelofGPIOpinscanbesetusingtheSetPincommand.ForGPIO
pinsconfiguredasoutputs,thenewdrivelevelgoesintoeffectimmediately.Fornon
outputGPIOpins,theoutputdrivelevelislatchedandgoesintoeffectifthepinislater
reconfiguredasanoutput.
Note:Theoutputdrivelevelsarejustlogicalvalues;thesystemintegratorand/orEC
firmwaredeveloperdetermineshowtheselogicalvaluesmaptooutputsignal
polarity(i.e.,lowversushighforpushpullpins,lowversushighimpedancefor
opendrainpins).
TheinputstateofeachGPIOcanalsobereadusingtheGetPincommand.Forpushpull
outputpins,thereportedvalueistheoutputdrivelevel.Forinputpinsandopendrain
outputpins,thereportedvalueistheinputsignallevel.Forunusedandtristatedpins,
thereportedvalueisundefined.

58

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

Note:Theinputsignallevelsarejustlogicalvalues;thesystemintegratorand/orEC
firmwaredeveloperdetermineshowtheselogicalvaluesmaptoinputsignal
polarity.
TheECcanbeconfiguredtodetectcertaininputeventsviatheEventTriggerType
settingoftheConfigurePincommand.Edgetriggeredeventsarelatchedwhenthey
occur,allowingthemtobereportedlater.Thelatchisclearedandreenabledwhenthe
edgetriggeredeventiseventuallyreported.Leveltriggeredeventsarenotlatched;only
thecurrent(live)stateofaleveltriggercanbereported.Thus,whileitspossibleto
haveanunreportededgetriggeredevent,thereisnosuchthingasanunreportedlevel
triggeredevent.
Ifautoreportingisenabled(byspecifyingReportEnableas01hwiththeConfigure
EventReportingcommand),theECsendsaGPIOEventpacketwhenatriggerevent
occurs.ForagivenGPIOpin,eachtriggereventmustbeacknowledged(bythe
AcknowledgeEventReportcommand)beforethenextonecanbereported.Unnecessary
acknowledgecommandsareignored.Autoreportingcanbecancelledusingthe
ConfigureEventReportingcommandandsettingReportEnableto00h.TheDisable
EventReportingcommandcancelsautoreporting.Autoreportingisinitiallydisabled
afterreset.
TheAPcanalsoexplicitlyquerytheECfortriggereventsviatheGetEventReport
command.Foredgetriggeredeventsthelatchedstateisreported,whereasforlevel
triggeredeventsthecurrent(live)triggerstateisreported.Ifnotriggerisenabledfora
givenGPIOpin,thenazero(i.e.,notriggereventdetected)isreported.
Ifanunreportededgetriggeredeventisalreadypendingwheneventreportingis
enabled,itisreportedbysendingaGPIOEventpacket.Sincetherecanbenounreported
leveltriggerinterrupts,thecorrespondingsituationcannotariseforleveltriggerevents.
GPIOtriggereventscanalsowakingtheAPfromitssleepstate.Furtherdiscussionof
sleepcontrolcanbefoundinSection6.4.TheroleoftheConfigureWakecommandis
describedthere.
ManyGPIOoperationscomeintwoflavorsscalarandvector.Scalaroperationsapply
toasingleGPIOpin,whereasvectoroperationsapplytomultipleGPIOpins.Forscalar
operations,thelogicalGPIOpinnumberisspecifiedexplicitly.Forvectoroperations,the
setoflogicalGPIOnumbersisspecifiedindirectlyviaabitvector.ForeachlogicalGPIO
numberN,theNthbitofthebitvectorissetto1;allotherbitsaresetto0.
Thebitsinthebitvectorarenumberedinincreasingorderfromtheleastsignificantbit
(LSB)tomostsignificantbit(MSB)withineachbyte,andstartingfromthefirstbyteof
thebitvector.Thus,bit0ofthevectoristheLSBofthefirstbyte,bit7istheMSBofthe
firstbyte,andbit8istheLSBofthe2ndbyte,andsoon.Thenumberofbitsinthebit
vectordoesnothavetomatchthenumberofGPIOpinsontheEC(asreportedbythe
GetSystemConfigurationrequest,Section6.7.4).Ifthebitvectorisshort,themissing

DA_04649001_11
6October2009

59

Tegra Embedded Controller Interface Specification 1.0

upperbitsareassumedtobezero.Ifthebitvectorislong,theexcessupperbitsmustbe
ignoredforrequestsandmustbesettozeroforresponses.
FormatoftheRequestandResponsepacketsaregivenbelow.

60

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

Table35GPIOControlRequests
SMBus Protocol Byte

Description

Note

CommandByte

03h

GPIOControl

ByteCount

DataByte1(SubCommand) 7:0

Scalarsubcommands
00hConfigurePin
01hSetPin(scalar)
02hGetPin(scalar)
03hConfigureEventReporting
(scalar)
04hAcknowledgeEventReport
(scalar)
06hGetEventReport(scalar)
1dhConfigureWake(scalar)
Vectorsubcommands
21hSetPin(vector)
22hGetPin(vector)
23hConfigureEventReporting
(vector)
24hAcknowledgeEventReport
(vector)
26hGetEventReport(vector)
3dhConfigureWake(vector)
OthersReserved

DataByte2DataByteN

Forallsubcommands,parameterdata
Forscalarsubcommands,pinnumber
Forvectorsubcommands,bitvector

6.3.1. Configure Pin Request


Table36RequestGPIOConfigurePin(scalar)
SMBus Protocol Byte

Description

Note

CommandByte

03h

GPIOControl

ByteCount

DA_04649001_11
6October2009

61

Tegra Embedded Controller Interface Specification 1.0

DataByte1(SubCommand) 00h

ConfigurePin(scalar)

DataByte2

Mode

7:5

00hInput
01hOutput
02hTristate
03hUnused
4:2

EventTriggerType
00hnone
01hrisingedge
02hfallingedge
03hanyedge
04hlolevel
05hhilevel
06hlevelchange

1:0

PullEnable
00hnopullenabled
01hpulldownenabled
10hpullupenabled

DataByte3

7:6

OutputDriveType
00hPushpull
01hOpendrain

5:5

SchmittTrigger
00hDisable
01hEnable

DataByte4

LogicalGPIOnumber

6.3.2. Configure Pin Response (scalar)


ResponsetoaConfigurePin(scalar)RequestisanAckpacket.TheInvalidConfigurationerror
codeisreturnediftheECcannotaccommodatetherequestedpinconfiguration.

62

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.3.3. Set Pin Request (scalar)


Table37RequestGPIOSetPin(scalar)
SMBus Protocol Byte

Description

Note

CommandByte

03h

GPIOControl

ByteCount

DataByte1(SubCommand) 01h
DataByte2

SetPin(scalar)

PinDriveLevel
00hLogicallow
01hLogicalhigh

DataByte3

LogicalGPIOnumber

6.3.4. Set Pin Response (scalar)

ResponsetoaSetPin(scalar)RequestisanAckpacket.

DA_04649001_11
6October2009

63

Tegra Embedded Controller Interface Specification 1.0

6.3.5. Set Pin Request (vector)

Table38RequestGPIOSetPin(vector)
SMBus Protocol Byte

Description

Note

CommandByte

03h

GPIOControl

ByteCount

DataByte1(SubCommand) 21h
DataByte2

SetPin(vector)

PinDriveLevel
00hLogicallow
01hLogicalhigh

DataByte3DataByteN

BitVectorofGPIOpinstoset
0bDonotsetpinlevel
1bSetpinlevel

6.3.6. Set Pin Response (vector)

ResponsetoaSetPin(vector)RequestisanAckpacket.

64

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.3.7. Get Pin Request (scalar)

Table39RequestGPIOGetPin(scalar)
SMBus Protocol Byte

Description

Note

CommandByte

03h

GPIOControl

ByteCount

DataByte1(SubCommand) 02h
DataByte2

GetPin(scalar)

LogicalGPIOnumber

6.3.8. Get Pin Response (scalar)


Table40ResponseGPIOGetPin(scalar)

SMBus Protocol Byte

Description

Note

CommandByte

03h

GPIOControl

ByteCount

DataByte1(SubCommand) 02h

GetPin(scalar)

DataByte2(Status)

Successful

DataByte3

00h

PinLevel
0bLogicallow
1bLogicalhigh
Forinputandoutputpins,valueindicates
currentlogicallevelatthepin.Forother
pinconfigurations,valueisundefined.

DA_04649001_11
6October2009

65

Tegra Embedded Controller Interface Specification 1.0

6.3.9. Get Pin Request (vector)

Table41RequestGPIOGetPin(vector)
SMBus Protocol Byte

Description

Note

CommandByte

03h

GPIOControl

ByteCount

DataByte1(SubCommand) 22h
DataByte2DataByteN

GetPin(vector)

BitVectorofGPIOpinstoreport
0bDonotreportpinlevel
1bReportpinlevel

6.3.10. Get Pin Response (vector)


Table42ResponseGPIOGetPin(vector)
SMBus Protocol Byte

Description

Note

CommandByte

03h

GPIOControl

ByteCount

DataByte1(SubCommand) 22h

GetPin(vector)

DataByte2(Status)

Successful

DataByte3DataByteN

00h

BitVectorofPinLevels
0bLogicallow
1bLogicalhigh
Forinputandoutputpins,bitvalue
indicatescurrentlogicallevelatthepin.
Forotherpinconfigurations,bitvalueis
undefined.

66

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.3.11. Configure Event Reporting Request (scalar)

Table43RequestGPIOConfigureEventReporting(scalar)
SMBus Protocol Byte

Description

Note

CommandByte

03h

GPIOControl

ByteCount

DataByte1(SubCommand) 03h
DataByte2

ConfigureEventReporting(scalar)

ReportEnable
00hDisablereporting
01hEnablereporting

DataByte3

LogicalGPIOnumber

6.3.12. Configure Event Reporting Response (scalar)

ResponsetoaConfigureEventReporting(scalar)RequestisanAckpacket.

DA_04649001_11
6October2009

67

Tegra Embedded Controller Interface Specification 1.0

6.3.13. Configure Event Reporting Request (vector)

Table44RequestGPIOConfigureEventReporting(vector)
SMBus Protocol Byte

Description

Note

CommandByte

03h

GPIOControl

ByteCount

DataByte1(SubCommand) 23h
DataByte2

ConfigureEventReporting(vector)

ReportEnable
00hDisablereporting
01hEnablereporting

DataByte2DataByteN

BitVectorofGPIOpinsforwhichReport
Enableistobeapplied
0bDonotapply
1bApply

6.3.14. Configure Event Reporting Response (vector)

ResponsetoanEnableEventReporting(vector)RequestisanAckpacket.

68

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.3.15. Acknowledge Event Report Request (scalar)

Table45RequestGPIOAcknowledgeEventReport(scalar)
SMBus Protocol Byte

Description

Note

CommandByte

03h

GPIOControl

ByteCount

DataByte1(SubCommand) 04h
DataByte2

AcknowledgeEventReport(scalar)

LogicalGPIOnumber

6.3.16. Acknowledge Event Report Response (scalar)

ResponsetoanAcknowledgeEventReport(scalar)RequestisanAckpacket.

DA_04649001_11
6October2009

69

Tegra Embedded Controller Interface Specification 1.0

6.3.17. Acknowledge Event Report Request (vector)

Table46RequestGPIOAcknowledgeEventReport(vector)
SMBus Protocol Byte

Description

Note

CommandByte

03h

GPIOControl

ByteCount

DataByte1(SubCommand) 24h
DataByte2DataByteN

AcknowledgeEventReport(vector)

BitVectorofGPIOpinsforwhichevent
reportsaretobeacknowledged
0bDonotacknowledge
1bAcknowledge

6.3.18. Acknowledge Event Report Response (vector)

ResponsetoanEnableEventReporting(vector)RequestisanAckpacket.

70

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.3.19. Get Event Report Request (scalar)

Table47RequestGPIOGetEventReport(scalar)
SMBus Protocol Byte

Description

Note

CommandByte

03h

GPIOControl

ByteCount

DataByte1(SubCommand) 06h
DataByte2

GetEventReport(scalar)

LogicalGPIOnumber

6.3.20. Get Event Report Response (scalar)

Table48ResponseGPIOGetEventReport(scalar)

SMBus Protocol Byte

Description

Note

CommandByte

03h

GPIOControl

ByteCount

DataByte1(SubCommand) 06h

GetEventReport(scalar)

DataByte2(Status)

Successful

DataByte3

00h

TriggerEventStatus
0bNotriggereventdetected
1bTriggereventdetected

DA_04649001_11
6October2009

71

Tegra Embedded Controller Interface Specification 1.0

6.3.21. Get Event Report Request (vector)

Table49RequestGPIOGetEventReport(vector)
SMBus Protocol Byte

Description

Note

CommandByte

03h

GPIOControl

ByteCount

DataByte1(SubCommand) 26h
DataByte2DataByteN

GetEventReport(vector)

BitVectorofGPIOpinstoreport
0bDonotreporttriggerevent
1bReporttriggerevent

6.3.22. Get Event Report Response (vector)

Table50ResponseGetEventReport(vector)
SMBus Protocol Byte

Description

Note

CommandByte

03h

GPIOControl

ByteCount

DataByte1(SubCommand) 26h

GetEventReport(vector)

DataByte2(Status)

Successful

DataByte3DataByteN

00h

BitVectorofTriggerEventsdetected
0bNotriggereventdetected
1bTriggereventdetected

72

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.3.23. Configure Wake Request (scalar)

Table51RequestGPIOConfigureWake(scalar)
SMBus Protocol Byte

Description

Note

CommandByte

03h

GPIOControl

ByteCount

DataByte1(SubCommand) 1dh
DataByte2

ConfigureWake(scalar)

WakeEnable
00hDisablewake
01hEnablewake

DataByte3

LogicalGPIOnumber

6.3.24. Configure Wake Response (scalar)

ResponsetoaConfigureWake(scalar)RequestisanAckpacket.

DA_04649001_11
6October2009

73

Tegra Embedded Controller Interface Specification 1.0

6.3.25. Configure Wake Request (vector)

Table52RequestGPIOConfigureWake(vector)
SMBus Protocol Byte

Description

Note

CommandByte

03h

GPIOControl

ByteCount

DataByte1(SubCommand) 3dh
DataByte2

ConfigureWake(vector)

WakeEnable
00hDisablewake
01hEnablewake

DataByte2DataByteN

BitVectorofGPIOpinsforwhichWake
Enableistobeapplied
0bDonotapply
1bApply

6.3.26. Configure Wake Response (vector)

ResponsetoaConfigureWake(vector)RequestisanAckpacket.

74

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.4. Sleep State Control


Thesectiondescribesthetransitionbetweenpowerstates,andtherequeststhatdrivethe
process.ThelowlevelelectricalsignalingbetweentheAPandtheECduringthese
transitionsisdetailedinSection3.
Figure11showsthesupportedpowerstatesandtransitionsfortheAP.Thesolidlines
indicatestatetransitionsinitiatedbytheAPandcommunicatedtotheECviaRequest
PacketssentovertheSMBus.Thedashedlinesindicatestatetransitionsinitiatedfrom
outsidetheAP(butnotnecessarilybytheEC)andcommunicatedtotheAPviaside
bandsignals.Forexample,theECcantriggertheResume/Waketransitionbyasserting
theAP_WAKE#signal.Thesystemarchitecturemayincludeanynumberofwake
sourcesinthesystem,butonlydiscussionoftheECasawakesourceiswithinthescope
ofthisdocument.TriggeringforthePowerUptransition(regardlessofitssource)isalso
outsidethescopeofthisdocument.
Figure11APPowerStatesandPowerStateTransitions
Restart

PowerUp

Suspend/Sleep
Suspended/
Asleep

On

Off
PowerDown

Resume/Wake

TheAPinitiatesapowerstatechangebydisablingeventreporting,asitmaynotbeable
toprocess(asynchronous)Eventpacketswhilepreparingtoenterthenewpowerstate.
Table53liststhecommandsforenablinganddisablingreportingforeacheventtype.In
addition,theGlobalConfigureEventReportingcommandcanbeusedtoenableand
disablereportingforallevents.OncereportinghasbeendisabledforallECfunctional
units,theAPnotifiestheECofthepowerstatechangebyissuinganAPPowerDown,
APSuspend,orAPRestartcommand.TheECsendsaresponseforthecommandand
thenceasesfurtherSMBusoperationsinvolvingtheAP.

DA_04649001_11
6October2009

75

Tegra Embedded Controller Interface Specification 1.0

Table53EventReportingCommands
Event Type

Enable Reporting Command

Disable Reporting Command

System

ConfigureEventReporting
(Section6.1)

ConfigureEventReporting
(Section6.1)

Battery

ConfigureEventReporting
(Section6.1)

ConfigureEventReporting
(Section6.1)

GPIO

ConfigureEventReporting
(Section6.3)

ConfigureEventReporting
(Section6.3)

Keyboard

Enable(Section6.5)

Disable(Section6.5)

PS/2AuxiliaryDevice

AutoreceiveNBytes(Section
6.6)

CancelAutoreceive(Section
6.6)

ForthePowerDownandRestartcommands,theECnowreinitializesitsAPvisiblestate
inpreparationforthenextAPbootcycle.Inaddition,theECresetsitselfandreloadsits
firmwareafterthefirstPowerDownfollowingafirmwareupdateattempt(Section6.7.6).
Dependingonthesystemarchitecture,thePowerDownandRestartcommandsmay
performauxiliaryoperationssuchasshuttingoffthepowertotheAP,resettingtheAP,
orthelike.Anysuchauxiliaryoperationsaredeterminedbythesystemdesignerandare
outsidethescopeofthisdocument.
FortheSuspendcommand,theECbeginsmonitoringfordesignatedeventssuchthatthe
APcanbeawakenedwhenneeded.Whenawakeeventisdetected,theECwakestheAP
byassertingandholdingtheAP_WAKE#signal.TheECalsolatchesthewakeeventfor
subsequentreportingtotheAP.Thewakeevents(ifany)mustbespecifiedbytheAP
beforeissuingtheSuspendcommand.Ingeneral,thesametypesofeventsthatcanbe
reportedwithanEventpacketcanalsotriggerwakeupoftheAP.Eachmajorfunctional
unitintheECfirmwarehasaConfigureWakecommandforitsevents.Wakeisdisabled
foralleventsafterreset.
AssertingtheAP_WAKE#signalcausestheAPtowakeup.Whenreadytoresume
communicationswiththeEC,theAPinitiatesanormaldatatransfer,thefirststepof
whichistoasserttheEC_REQUEST#signal.OncetheECseesthissignal,itdeasserts
AP_WAKE#andresumesnormalSMBusoperationsinvolvingtheAP.Inordertoseethe
EC_REQUEST#signal,theECmustcontinuetomonitorthesignalevenwhentheAPis
asleep(orpowereddownorrestarting),unlessthesystemarchitectureimposessome
limitationsonwhenEC_REQUEST#canbeasserted.Forexample,iftheECcontrols
powertotheAP,thentheAPwontbeabletoassertEC_REQUEST#untilafterbeing
poweredupbytheEC;thus,theECneednotmonitorEC_REQUEST#untilafter
poweringuptheAP.Similarly,iftheECisthesoledevicecapableofwakingtheAP,
thentheECneednotmonitortheEC_REQUEST#signaluntilafteritassertsAP_WAKE#.
TheNonECWakeSupportcapabilitiesbit(Table70)mustbesetaccordingly.

76

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

AfterresumingSMBuscommunications,theAPmayissueanynumberofcommandsto
theEC.
Note:Eventreportingisstilldisabledatthispoint,astheAPmaynotyetbereadyto
process(asynchronous)eventpackets.Whenready,theAPrestartseventreporting
byissuingtheeventreportingcommandsinTable53and/ortheGlobalConfigure
EventReportingcommand.TheECwillthenreportthelatchedwakeeventby
sendingtheappropriateEventpackettotheAP,providedthatreportingisenabled
forthetypeofeventthattriggeredthewake.
ItislefttothesystemdesignerandECfirmwareimplementertodeterminewhethernon
wakeeventsaretobedetectedwhilereportingisdisabledortheAPisasleep,and
reportedlaterafterreportinghasbeenreenabled.Similarly,thesystemdesigner
specifieswhenwakeeventdetectionbeginsandend.Regardlessofwhendetection
begins,theECcannotassertAP_WAKE#untilaftersendingitsresponsefortheAP
Suspendcommand.
TheECfirmwareshouldbedesignedtominimizepowerconsumptionwhiletheAPis
asleeporpowereddown,sofarasispossiblewhilecarryingoutitsdutytodetectwake
events(ifanyareenabled)andmonitortheEC_REQUEST#signal(ifanydevicesother
thantheECcanwaketheAP).
Thepowercontrolcommandsaretabulatedbelow.AllofthesecommandsreturnanAck
packetasresponse.
Table54RequestSleepControlCommand
SMBus Protocol Byte

Description

Note

CommandByte

04h

Sleepcontrolcommand

ByteCount

01h

DataByte1(SubCommand)

00hGlobalConfigureEventReporting
01hAPPowerDown
02hAPSuspend
03hAPRestart
OthersReserved

DataByte2

Forsubcommand00h,configuration
setting
Otherwise,nodatabytes

DA_04649001_11
6October2009

77

Tegra Embedded Controller Interface Specification 1.0

6.4.1. Global Configure Event Reporting Request


Table55GlobalConfigureEventReportingRequest
SMBus Protocol Byte

Description

Note

CommandByte

04h

Sleepcontrolcommand

ByteCount

02h

DataByte1(SubCommand) 00h

GlobalConfigureEventReporting

DataByte2

ReportEvents

00hDisablereporting
01hEnablereporting

6.4.2. Global Configure Event Reporting Response


ResponsetoaGlobalConfigureEventReportingRequestisanAckpacket.

78

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.5. Keyboard Control


ThisrequestisusedtocontrolthekeyboardconnectedtotheEC.TheECisexpectedto
scanthekeymatrix,performdebouncingandphantomkeyprocessing,generate
make/breakscancodes,buffersthescancodes,andultimatelysendeachscancodetothe
APasaKeyboardEventpacket.Themake/breakscancodesarereportedusingScan
CodeSet1.TheECshouldperformnotypematicprocessing;drivercoderunningonthe
APwillsupplyanyneededautorepeatfunctionality.
InresponsetoaResetsubcommand,thekeyboardcontrollerwillloaddefaultsettings,
beginscanning,andsendscancodestotheAPviaKeyboardEventpackets.ADisable
subcommandstopskeyboardscanning,loadsdefaultsettings,andawaitsfurther
instructions.TheEnablesubcommandresumesscanningandreportingofscancodes
afteraDisablesubcommand.EachofthesubcommandsgeneratesanAckpacketin
response.
IftheECsoutputbuffer(forscancodes)overflows,theECwillreportaspecialscancode
denotingtheoverflowcondition.Thespecialscancodeis0xffforScanCodeSet1and
0x00forScanCodeSet2.AnyscancodesreportedtotheAPpriortotheoverflowmarker
mustbecorrect(i.e.,uncorrupted).Theoutputbuffermustbeclearedwhenanysub
commandisreceived,andnoKeyboardEventpacketscanbesentwhileasubcommand
isbeingprocessed.
Note:Whenscanningisenabled,theresponsepacketwillalwaysbesentpriortothe
firsteventpacket.Similarly,whenscanningisdisabled,thelasteventpacketwill
alwaysbesentpriortotheresponsepacket.
Onpowerup,theECwillbeinthedisablestate.Thatis,itwillbehaveasthougha
Resethadbeenperformed,immediatelyfollowedbyaDisable.NoKeyboardEvent
packetscanbesenttotheAPuntilaResetoranEnablesubcommandisreceived.
Bydefault,scancodesarereportedusingtheScanCodeSet1encoding.TheSetScan
CodeSetsubcommandissupportedforfutureexpansion;currently,onlyScanSet1is
supported.TheGetScanCodeSetsubcommandreportsthecurrentlyselectedscancode
setinthepayloadofitsResponsePacket.
KeyboardeventscanalsowaketheAPfromitssleepstate.Thewakecanbetriggeredby
anykeyorbyarestrictedsetofspecialkeys.ItislefttothesystemdesignerandEC
firmwareimplementertodeterminewhichkeysbelongtotherestrictedset,ifany.The
ECcanbeconfiguredtoreportthescancodeforthekeythattriggeredthewake.Inthis
case,thescancodeisplacedintheECsoutputbuffersuchthatitwillbereportedtothe
APafterthenextEnablecommandisreceived.Consequently,itisrequiredthatthe
EnablecommandnotcleartheECsoutputbuffer.
Finally,thesystemdesignerspecifieswhetherscanningisterminatedafterthewake
eventhasbeendetected,orwhethernormalscanningisresumedautomatically.Inthe
lattercase,scancodeswillbeplacedintheECsoutputbuffer,wheretheyllremainuntil

DA_04649001_11
6October2009

79

Tegra Embedded Controller Interface Specification 1.0

reportingisenabledviathesubsequentEnablecommand.Furtherdiscussionofsleep
controlcanbefoundinSection6.4.TheroleoftheConfigureWakecommandis
describedthere.

80

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

Table56RequestKeyboardCommand
SMBus Protocol Byte

Description

Note

CommandByte

05h

KBCcommand

ByteCount

02hforSetLEDsandSetscancodeset
01hotherwise

DataByte1(SubCommand) 7:0

ffhReset
f4hEnable
f5hDisable
f1hGetscancodeset
f0hSetscancodeset
edhSetLEDs
03hConfigureWake
04hConfigureWakeKeyReporting
OthersReserved

DataByte2

Forsubcommandf0h,scancodeset
01histheonlysupportedvalue
Forsubcommandedh,LEDindicators
7:3reserved,mustbezero
2:2scrolllockindicator(0=off,1=on)
1:1numlockindicator(0=off,1=on)
0:0capslockindicator(0=off,1=on)
Forsubcommand03h,configuration
setting
Forsubcommand04h,configuration
setting
Otherwise,nodatabyte

DA_04649001_11
6October2009

81

Tegra Embedded Controller Interface Specification 1.0

6.5.1. Configure Wake Request


Table57ConfigureWakeRequest
SMBus Protocol Byte

Description

Note

CommandByte

05h

KBCcommand

ByteCount

03h

DataByte1(SubCommand) 03h

ConfigureWake

DataByte2

ConfigurationAction

0hDisablewakeforevent
1hEnablewakeforevent

DataByte3

KeyboardEventType SeeTable59.Eachbitvaluecontrolswhether
Mask
theConfigurationActionisappliedtothe
correspondingKeyboardEventType.
0bDisablewakeforevent
1bEnablewakeforevent

Table58KeyboardEventType
System State Bit(s)

7:2

Description

Reserved(00h)

SpecialKeyPress

AnyKeyPress

6.5.2. Configure Wake Response


ResponsetoaConfigureWakeRequestisanAckpacket.

82

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.5.3. Configure Wake Key Reporting Request


Table59ConfigureWakeRequest
SMBus Protocol Byte

Description

Note

CommandByte

05h

KBCcommand

ByteCount

02h

DataByte1(SubCommand) 04h

ConfigureWakeKeyReporting

DataByte2

Specifieswhetherscancodeforwakekeyis
placedinkeyboardoutputbufferfor
reportedtoAP

ReportWakeKey

00hDonotreportscancode
01hReportscancode
Defaultis00h

6.5.4. Configure Wake Key Reporting Response


ResponsetoaConfigureWakeKeyReportingRequestisanAckpacket.

DA_04649001_11
6October2009

83

Tegra Embedded Controller Interface Specification 1.0

6.6. Auxiliary Device Control


ThisrequestisusedtocontrolPS/2devicesconnectedtotheEC,typicallyatouchpador
otherpointerdevice(e.g.,eraserhead).Hotpluggingisnotsupported;allPS/2devices
arerequiredtobepresentatsystemboottimeandtoremainpermanentlyinstalledwhile
thesystemisrunning.
CommandsexisttoreadandwritedatatoaspecifiedPS/2port.Thesendcommand
commandsendsonebyteofdatatothePS/2port,thenacceptsNbytesofdatafromthe
PS/2portandreportsthemtotheAP.ThereceivecommandacceptsNbytesofdatafrom
thePS/2portandreportsthemtotheAP.AnyPS/2buserrorsencounteredwhile
carryingoutthesecommandsmustbereportedtotheAPbysettingtheStatusFieldof
theResponsePacket.Inparticular,theECmustcheckforPS/2bustimeoutsforbothof
thesecommandsandreporttimeouterrorsviatheStatusField.
AnautoreceivecommandallowsstreamingdatafromaPS/2porttobereadbytheAP
withoutpolling.TheautoreceivecommandcausestheECtoreadauserspecified
numberofbytesofdatafromthePS/2portandsendthemtotheAP.Thedatais
transferredasasingleAuxiliaryDeviceEventpackettominimizeSMBusbandwidth
utilizationandtoaidinmaintainingdatastreamsynchronization.Oncethedataissent
totheAP,thecyclerepeatsautomaticallyuntilcanceled.
AuxiliaryDeviceeventscanalsobeusedtowaketheAPfromitssleepstate.Ifwakeis
enabled,theECenablesthespecifiedPS/2portandwaitsfortheattachedPS/2deviceto
begindrivingthebus.OncethePS/2devicebeginsdriving,theECimmediatelyinhibits
thebusandproceedstowaketheAP.TheECmustinhibitthebusbeforetransferofthe
firstbyteofdataiscomplete,thusforcingthePS/2devicetoretransmitfromthe
beginningwhenthePS/2portissubsequentlyreenabled(ascommandedbytheAP).
SincenoPS/2datawasreceivedbytheEC,nonecanbereportedtotheAP.Further
discussionofsleepcontrolcanbefoundinSection6.4.TheroleoftheConfigureWake
commandisdescribedthere.
TheAPwilltypicallyperformasequenceofreadandwriteoperationstoidentifythe
typeofdeviceattachedtoagivenPS/2port.Oncethedevicehasbeenidentified,theAP
willknowthesizeofdatapacketstransmittedbythedeviceinstreamingmode(for
example,3bytesforalegacyPS/2mouse).TheAPwillthenconfigurethePS/2devicefor
streamingoperationandinvokeautoreceive(specifyingthedevicespacketsizeasan
argument).Eventually,autoreceivemaybecancellediftheAPneedstostopor
reconfigurethePS/2device.
Oninitialpowerupandaftermostcommandshavebeencompleted(seeTable60),the
ECinhibitscommunicationoneachPS/2interface.Thiswillbereferredtoasthenon
acceptingstate.Theoneexceptionisfortheautoreceivecommand,whichleavesthe
PS/2interfaceintheacceptingstate.Intheacceptingstate,theECperformsthefollowing
sequenceofoperations:
1.

EnablePS/2interface.

84

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

2.

ReceiveNbytesofdatafromPS/2device(N=userspecifiedvalue).

3.

InhibitPS/2interface.

4.

SendthedatatotheAP.

5.

Waitfordatatransfertocomplete.

6.

Gotostep1.

Ifaparityerroroccursduringstep2ofthecycle,processingshouldcontinueasnormal
exceptthattheerrorwillbereportedinstep4.Inparticular,theErrorFlagmustbesetin
theCommandField,andtheStatusFieldmustbepopulatedwiththeproperstatuscode
(seeTable2).Aftertheerrorhasbeenreported,theacceptingstatecyclecontinuesasif
noerrorhadoccurred.
WhenanewcommandisreceivedonagivenPS/2port,autoreceivewillbecancelledon
thatport,ifitisineffect.Thenewcommandcannotbedelayedindefinitely.Thismeans
that,forexample,step2intheacceptingstatecyclemayhavetobeterminatedearlyif
thePS/2devicefailstotransmittheexpectedamountofdata.Inthiscase,thepartialdata
mustbediscarded(notsenttotheAP)andthePS/2interfaceinhibited.If,ontheother
hand,completedataisreceivedbytheEC,thensteps35canbecarriedoutnormally.
Eitherway,theacceptingstatecycleisnowterminated,anyfinaleventpackethas
alreadybeensenttotheAP,andthePS/2interfaceisinthenonacceptingstate.
Atthispoint,thenewlyreceivedcommandcanbeprocessedanditsresultingresponse
packetsentbacktotheAP.ThePS/2interfacewillentertheacceptingornonaccepting
state,dependingonthecommand.
Note:Whenautoreceiveisinitiated,theresponsepacketwillalwaysbesentpriorto
thefirsteventpacket.Similarly,whenautoreceiveisterminated,thelastevent
packetwillalwaysbesentpriortotheresponsepacket.
SinceAuxiliaryDeviceEventsarelikelytobethemostfrequentpacketsonthesystem,it
isimportanttominimizetransferoverheadandreduceSMBusbandwidthutilization
wherepossible.Oneoptimizationistoavoidsendingthefirstbyteofa3bytelegacyPS/2
mousesample.ThefirstbytecontainsthebuttonstateandX/Ymovementdirection,both
ofwhicharelikelytochangeslowlyrelativetotheX/Ylocationdatainbytes2and3.The
resulting2bytesamplecanbetransferredasafixedsizepacketwhichusestheSMBus
writewordoperation,thussavinganadditionalbyteofoverhead(PacketLength).This
optimizationisenabledanddisabledviatheSetCompressionsubcommand.
Compressiononlyappliestoautoreceiveevents.Thefirsteventpacketwillneverbe
compressed,becausethereisnovalidpreviousvalueforbyte1yet.
IfaPS/2parityerrorortimeouterroroccurs,itmustbereportedinthecorresponding
responseoreventpacket.

DA_04649001_11
6October2009

85

Tegra Embedded Controller Interface Specification 1.0

Table60FinalPS/2InterfaceStatePerCommand
Command

Final PS/2 State

Sendcommand

Nonaccepting

ReceiveNbytes

Nonaccepting

AutoreceiveNbytes

Accepting

Cancelautoreceive

Nonaccepting

AutoreceiveandcancelautoreceivecommandsreturnAckpackets;othercommands
returnResponsepacketsasdocumentedinthefollowingsubsections.

86

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

Table61RequestAuxiliaryDeviceCommand
SMBus Protocol Byte

Description

Note

CommandByte

06h

PS/2AuxiliaryDevicecommand

ByteCount

DataByte1(SubCommand) 7:6

PS/2portselect

0hPS/2port0
1hPS/2port1
2hPS/2port2
3hPS/2port3

5:0

01hSendcommand(sendonebyte,then
receiveNbytes)
02hReceiveNbytes
03hAutoreceiveNbytes
04hCancelautoreceive
05hSetcompression
3dhConfigureWake
OthersReserved

DataByte2

Forsubcommand01h,databytetowrite
todevice
Forsubcommand02h,N,numberofbytes
toreceive(1to15)
Forsubcommand03h,N,numberofbytes
toreceive(1to15)
Forsubcommand05h

0hDisableCompression

1hEnableCompression

Forsubcommand3dh,configuration
action
Otherwise,nodatabyte

DA_04649001_11
6October2009

87

Tegra Embedded Controller Interface Specification 1.0

DataByte3

Forsubcommand01h,N,numberofbytes
toreceive(0to15)
Forsubcommand3dh,auxiliarydevice
eventtypemask
Otherwise,nodatabyte

88

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.6.1. Send Command Response


Table62ReadByteResponse
SMBus Protocol Byte

Description

Note

CommandByte

06h

PS/2AuxiliaryDevicecommand

ByteCount

DataByte1(SubCommand) X1h

X=0hforPS/2port0
X=4hforPS/2port1
X=8hforPS/2port2
X=chforPS/2port3

DataByte2(Status)

00h

DataByte3DataByteM

Successful

Ndatabytesreadfromdevice

6.6.2. Receive N Bytes Response


Table63SendSampleResponse
SMBus Protocol Byte

Description

Note

CommandByte

06h

PS/2AuxiliaryDevicecommand

ByteCount

DataByte1(SubCommand) X2h

X=0hforPS/2port0
X=4hforPS/2port1
X=8hforPS/2port2
X=chforPS/2port3

DataByte2(Status)
DataByte3DataByteM

00h

Successful

Ndatabytesreadfromdevice

DA_04649001_11
6October2009

89

Tegra Embedded Controller Interface Specification 1.0

6.6.3. Configure Wake Request


Table64ConfigureWakeRequest
SMBus Protocol Byte

Description

Note

CommandByte

06h

PS/2AuxiliaryDevicecommand

ByteCount

02h

DataByte1(SubCommand) 7:6

PS/2portselect

0hPS/2port0
1hPS/2port1
2hPS/2port2
3hPS/2port3

5:0

3dh

DataByte2

ConfigurationAction

0hDisablewakeforevent
1hEnablewakeforevent

DataByte2

AuxiliaryDevice
EventTypeMask

SeeTable65.Eachbitvaluecontrolswhether
theConfigurationActionisappliedtothe
correspondingAuxiliaryDeviceEventType.
0bDonotapplyConfigurationAction
1bApplyConfigurationAction

Table65AuxiliaryDeviceEventType
System State Bit(s)

7:2
0

Description

Reserved(00h)
AnyAuxiliaryDeviceEvent

6.6.4. Configure Wake Response


ResponsetoaConfigureWakeRequestisanAckpacket.

90

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.7. System Control


ThisrequestisusedtoconfigureandcontroltheECitself,ratherthananyperipherals
connectedtotheEC.
Table66RequestSystemControl
SMBus Protocol Byte

Description

Note

CommandByte

07h

Systemcommand

ByteCount

DataByte1(SubCommand) 7:0

00hResetEC
01hSelfTest
02hNoop
10hGetECInterfaceSpecVersion
11hGetSystemCapabilities
12hGetSystemConfiguration
14hGetECProductName
15hGetECFirmwareVersion
20hInitializeGenericConfiguration
21hSendGenericConfigurationBytes
22hFinalizeGenericConfiguration
30hInitializefirmwareupdate
31hSendfirmwarebytes
32hFinalizefirmwareupdate
33hPollfirmwareupdate
40hGetfirmwaresize
41hReadfirmwarebytes
OthersReserved

DataByte2DataByteN

Nodataforsubcommands00h15h,20h,
22h,30h,32h,33h,40h,41h

DA_04649001_11
6October2009

91

Tegra Embedded Controller Interface Specification 1.0

6.7.1. Reset EC
ThiscommandtriggersafullresetoftheEC.TheECmustsendanAckPacketbefore
performingtheactualreset.
TheAPisresponsiblefordisablingeventsanddrainingResponsePacketqueuebefore
requestinganECreset.IftheAPfailstodoso,theECispermittedtocancelanypending
packetswaitingtobesenttotheAPsuchthattheresetcommandwillnotbestalled
indefinitelywaitingfortheAckPackettobesenttotheAP.

6.7.2. Self Test


ThecommandinitiatesaselftestontheEC.ImplementationoftheselftestisECvendor
specific.Aftertheselftesthascompleted,theECmustberestoredtoitspoweronreset
state,withtheexceptionthattheECisfreetoinitiateSMBustransferswiththeAP(it
doesnthavetowaituntiltheAPassertsEC_REQUEST#).TheECmustsendanAck
Packetreportingthesuccessorfailureoftheselftest.
Sincetheselftestwillgenerallycauseanypreexistingsystemstateinformationtobe
lost,theselftestisonlyallowedtobeperformedimmediatelyafterECreset.EC
Capabilitiesrequestsarealsopermittedbeforeperformingaselftest.

6.7.3. No Operation (No-op)


ThiscommandcausesnosideeffectsotherthantoreturnanAckPacket.Itcanbeused
bytheAPtoverifythattheECisstilloperatingandresponsive.

6.7.4. Get Capabilities


ThesecommandsrequestthecapabilitiesandconfigurationoftheECanditsfirmware.

92

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.7.4.1. Get EC Interface Spec Version Response

Table67ResponseGetECInterfaceSpecVersion
SMBus Protocol Byte

Description

Note

CommandByte

07h

Systemcommand

ByteCount

03h

DataByte1(SubCommand) 10h

GetECInterfaceSpecVersion

DataByte2(Status)

00h

Successful

DataByte3

VersionNumber
(10h=version1.0)

VersionofthisspecificationECiscompliant
with:themajorversionisspecifiedinthe
highnibble,theminorversioninthelow
nibble.
Forthisrevisionofthespec,theVersion
Numberis10h.

DA_04649001_11
6October2009

93

Tegra Embedded Controller Interface Specification 1.0

6.7.4.2. Get System Capabilities Response

Table68ResponseGetSystemCapabilities
SMBus Protocol Byte

Description

Note

CommandByte

07h

Systemcommand

ByteCount

07h

DataByte1(SubCommand) 11h

GetSystemCapabilities

DataByte2(Status)

00h

Successful

DataByte3

GPIOallocation

NumberofECGPIOscontrollableby
Tegra

DataByte4

SystemCapabilitiesBits SeeTable69
70

DataByte5

SystemCapabilitiesBits
158

DataByte6

OEMSystem
CapabilitiesBits70

DataByte7

OEMSystem
CapabilitiesBits158

SeeTable70

94

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

Table69SystemCapabilitiesBits
System Capabilities
Bit(s)

15:3
2

Description

Reserved(0b)
FixedSizeEventPacketsupport
0bNotsupported
1bSupported

NonECWakesupport(asperSection6.4)
0bNotsupported
1bSupported

RuntimeGenericConfigurationsupport(asperSection6.7.5)
0bNotsupported
1bSupported

Table70OEMSystemCapabilitiesBits
OEM System
Capabilities Bit(s)

15:0

Description

OEMDefined

DA_04649001_11
6October2009

95

Tegra Embedded Controller Interface Specification 1.0

6.7.4.3. Get System Configuration Response

Table71ResponseGetSystemConfiguration
SMBus Protocol Byte

Description

Note

CommandByte

07h

Systemcommand

ByteCount

06h

DataByte1(SubCommand) 12h

GetSystemConfiguration

DataByte2(Status)

00h

Successful

DataByte3

SystemConfiguration
Bits70

SeeTable72

DataByte4

SystemConfiguration
Bits158

DataByte5

OEMSystem
ConfigurationBits70

DataByte6

OEMSystem
ConfigurationBits158

SeeTable73

96

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

Table72SystemConfigurationBits
System Configuration
Bit(s)

Description

15:6

Reserved(0b)

5:4

NumberofPS/2Ports
0hOnePort
1hTwoPorts
2hThreePorts
3hFourPorts

3:0

NumberBatterySlots(=maximumnumberofbatteriesinthesystem)
0hNoBatterySlots
1hOneBatterySlot0
2hTwoBatterySlots1and2
3hThreeBatterySlots0,1and2
4hFourBatterySlots0,1,2and3
OthersReserved

Table73OEMSystemConfigurationBits
OEM System
Configuration Bit(s)

15:0

Description

OEMDefined

DA_04649001_11
6October2009

97

Tegra Embedded Controller Interface Specification 1.0

6.7.4.4. Get EC Product Name Response


ThiscommandreturnsauniquestringthatidentifiestheECsystemconfiguration,which
encompassestheECmanufacturer,ECmodelnumber,connectivity,andother
configurationparameters.Besidesgeneralreportingpurposes,thiscommandisused
duringthefirmwareupdateprocesstodeterminewhetheranewfirmwareversionis
compatiblewiththeexistingsystemconfiguration.SeeSection6.7.6formoredetails.
Table74GetECProductNameResponse
SMBus Protocol Byte

Description

Note

CommandByte

07h

Systemcommand

ByteCount

N=03h20h

DataByte1(SubCommand) 14h

GetECProductName

DataByte2(Status)

00h

Successful

DataByte3DataByteN

ASCIIstring

ECproductnameisupto30characters(may
notbenullterminated)

98

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.7.4.5. Get EC Firmware Version Response


Table75GetECFirmwareVersionResponse
SMBus Protocol Byte

Description

Note

CommandByte

07h

Systemcommand

ByteCount

N=03h20h

DataByte1(SubCommand) 02h

GetECFirmwareVersion

DataByte2(Status)

15h

Successful

DataByte3

MinorVersionbits70 MinorVersionNumber

DataByte4

MinorVersionbits15
8

DataByte5

MajorVersionbits70 MajorVersionNumber

DataByte6

MajorVersionbits15
8

6.7.5. Generic Configuration


TheECmayoptionallysupportruntimedownloadofconfigurationinformationfromthe
AP,asindicatedbytheRuntimeGenericConfigurationfieldreportedbytheGetSystem
Capabilitiescommand(seeTable69).Forexample,thelayoutofakeymatrixaswellas
thescancodevaluetobereportedforeachkeycouldbespecifiedatruntimeusingthis
mechanism.Thiscommandprovidesatransportmechanismforsuchinformation,but
doesnotspecifythecontentorinternalformatoftheinformation.Thedatacontentand
internalformataredefinedbytheECvendor.Ifsupported,thiscommandmustbe
permittedatanytimeafterECresetandbeforefirstuseofthefunctionalitybeing
configured.
Theconfigurationdataconsistsofaheaderandabody.TheheaderisusedbytheAPto
identifyandvalidatetheconfigurationinformation;onlythebodydataisactuallysentto
theEC.Theformatandcontentoftheheaderaredefinedbelow.Theheadercontainsa
ConfigurationIDparameter,whichidentifiesthetypeofconfigurationdatacontainedin
thebody.TheConfigurationIDvaluefromtheheaderispassedtotheECasan
argumenttotheInitializeGenericConfigurationcommand.
TheformatandcontentofthebodyaredefinedbytheECvendorandareopaquetothe
AP,exceptthatthebodymustcontainatrailingCRC32checksumvalue.Thechecksum

DA_04649001_11
6October2009

99

Tegra Embedded Controller Interface Specification 1.0

iscomputedusingtheCRC32algorithmfromIEEE802.3(x32+x26+x23+x22+x16+
x12+x11+x10+x8+x7+x5+x4+x2+x+1).
TheECvendorisresponsibleforprovidingtoolsanddocumentationtoassistsystem
integratorsingeneratingtheconfigurationinformation(bothcontentandformat).The
vendormaywishtoleveragepreexistingtoolsthatonlyaddresstheopaquebody
contentportionoftheconfigurationinformation.Inthiscase,theECvendoris
additionallyresponsibletoprovidetoolsanddocumentationtoassistsystemintegrators
intransformingtherawbodycontentintotheformatneededbytheGeneric
Configurationcommands.
TheheadercontentsaredetailedinTable76.TheheadercontainsatrailingCRC32
checksum(justlikethebody),allowingtheAPtovalidatetheintegrityoftheheader
contents.Integrityischeckedbycomputingarunningchecksumthatcoverstheheader
contents,excludingthetrailingchecksumbytes.Iftherunningchecksumvalueisnot
equaltothetrailingCRCvalue,thenintegrityhasbeencompromised.Iftheheaderis
foundtobeintact,thentheintegrityofthebodycanalsobecheckedinasimilarmanner.
TheremaininginformationintheheadercanbeusedbytheAPtoidentifythe
configurationdataandtodecidewhethertoproceedwiththeupdate.Specifically,the
GetECInterfaceSpecVersion,GetECProductName,andGetECFirmwareVersion
commandsprovideusefulinformationthattheAPcanthencomparewiththeheader
contents.Ingeneral,theECInterfaceSpecVersionandECProductNameintheheader
mustmatchthecorrespondingvaluesreportedbythecurrentlyrunningECfirmware;
otherwise,theAPwillrejecttheconfigurationinformation.
ConfigurationinformationisdownloadedtotheECina3stageprocessinitialize,send
bytes,andfinalizeasillustratedinFigure12.First,theInitiateGenericConfiguration
commandissent.ThispreparestheECtoreceivetheconfigurationdataandalsoresets
itsrunningchecksumvalue.Next,thebodycontentsaretransferredtotheECviaaseries
ofSendGenericConfigurationBytescommands.Eachsuchcommandreportsthe
cumulativenumberofbytesreceivedbytheEC.Asbytesarereceived,theECupdatesits
runningchecksumvalue.Onceallthebodydata(includingtrailingchecksum)havebeen
transferredinthismanner,theAPperformsaFinalizeGenericConfigurationcommand.
ThistriggerstheECtoperformanyfinalchecksontheconfigurationdata.Onerequired
checkisfortheECtoverifythattherunningchecksumvalueiszero,reportingaStatus
ofChecksumerrorotherwise.TheECmayoptionallyperformadditionalchecks,sinceit
hasgreaterknowledgeoftheinternalformatofthebodycontentsthandoestheAP.If
theECdetectsnoerror,itreportsaStatusofSuccesstotheAP.

100

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

Table76GenericConfigurationPackageHeader
Byte Number

Description

Note

03

MagicNumber

ASCIIstringcnfg;notnullterminated

ECInterfaceSpec
Version

Major/minorversion;sameformatasin
GetECInterfaceSpecVersionResponse,
Section6.7.4.1

Reserved

Mustbe00h

635

ECProductName

ASCIIstring;sameformatasinGetEC
ProductNameResponse,Section6.7.4.4

3639

ECFirmwareVersion

Major/minorversion;sameformatasin
GetECFirmwareVersionResponse,
Section6.7.4.5

4043

ConfigurationID

OEMdefinedvaluespecifyingthetypeof
configurationdatacontainedinthis
package.

4447

BodyLength

Lengthofopaquedataincludingits
trailingchecksum;firstbyteisleast
significant,lastbyteismostsignificant

4851

CRC

Checksumcomputedovertheabove
headerdata;firstbyteisleastsignificant,
lastbyteismostsignificant

DA_04649001_11
6October2009

101

Tegra Embedded Controller Interface Specification 1.0

Figure12GenericConfigurationProcedure
Start
Initialize
Generic
Config

Success?
y

Send
Generic
ConfigBytes
n

Success?
y

Alldata
sent?

Finalize
Generic
Config

Success?

End

102

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.7.5.1. Initialize Generic Configuration Request

Table77RequestInitializeGenericConfiguration
SMBus Protocol Byte

Description

Note

CommandByte

07h

SystemControl

ByteCount

DataByte1(SubCommand) 20h

InitializeGenericConfiguration

DataByte2

ConfigurationID

ConfigurationID
Bits70

DataByte3

ConfigurationID
Bits158

DataByte4

ConfigurationID
Bits2316

DataByte5

ConfigurationID
Bits3124

OEMdefinedvaluespecifyingthetypeof
configurationdatatofollow.

6.7.5.2. Initialize Generic Configuration Response


ResponsetoanInitializeGenericConfigurationrequestisanAckpacket.

DA_04649001_11
6October2009

103

Tegra Embedded Controller Interface Specification 1.0

6.7.5.3. Send Generic Configuration Bytes Request

Table78RequestSendGenericConfigurationBytes
SMBus Protocol Byte

Description

Note

CommandByte

07h

SystemControl

ByteCount

DataByte1(SubCommand) 21h
DataByte2DataByteN

SendGenericConfigurationBytes

Genericconfigurationdatabytes

6.7.5.4. Send Generic Configuration Bytes Response

Table79ResponseSendGenericConfigurationBytes

SMBus Protocol Byte

Description

Note

CommandByte

07h

SystemControl

ByteCount

DataByte1(SubCommand) 21h

SendGenericConfigurationBytes

DataByte2(Status)

00hSuccessful

08hChecksumerror
DataByte3

DataByte4

BytesReceived

CumulativeNumberofBytesReceived

Bits70

Firstbyteisleastsignificant;lastbyteis
mostsignificant.

BytesReceived
Bits158

DataByte5

BytesReceived
Bits2316

DataByte6

BytesReceived
Bits3124

104

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.7.5.5. Finalize Generic Configuration Request

Table80RequestFinalizeGenericConfiguration
SMBus Protocol Byte

Description

Note

CommandByte

07h

SystemControl

ByteCount

DataByte1(SubCommand) 22h

FinalizeGenericConfiguration

6.7.5.6. Finalize Generic Configuration Response

Table81ResponseFinalizeGenericConfiguration
SMBus Protocol Byte

Description

Note

CommandByte

07h

SystemControl

ByteCount

DataByte1(SubCommand) 22h

FinalizeGenericConfiguration

DataByte2(Status)

00hSuccessful

08hChecksumerror
09hDevicewriteerror
0bhDataoverflowerror
0chDataunderflowerror

6.7.6. Firmware Update


ThiscommandallowstheTegraAPtodownloadandinstallnewECfirmware.TheAP
seestheECfirmwareonlyasacontiguousblockofdata.TheECmanagesalldetailsasto
whereandhowtheECfirmwaredataisstored,whetherabackupcopyofthefirmwareis
maintained,etc.
Firmwareupdatetakesplaceinfivestages,asshowninFigure13:

DA_04649001_11
6October2009

105

Tegra Embedded Controller Interface Specification 1.0

1.

TheAPnotifiestheECtoprepareforfirmwareupdatebyissuingtheInitialize
FirmwareUpdatecommand.

2.

TheAPsendsthefirmwareimagetotheECthroughaseriesofSendFirmware
Bytescommands.

3.

TheAPcompletesthefirmwareupdatebyissuingtheFinishFirmwareUpdate
command.

4.

TheAPoptionallyreadsbackthenewfirmwareimagefromtheEC.SeeSection
6.7.7fordetails.

5.

TheAPpowersdownbyissuingtheConfigureGlobalEventReporting
commandtodisableeventreporting(optional),followedbytheAPPowerDown
command(notoptional).TheECthenresetsitselfandbeginsexecutingthenew
firmwareimageintimeforthenextsystemboot.

TheECisfreetorejectanyextraneouscommandsreceivedbetweensteps1and5above,
byrespondingwithanInvalidStateerror.TheECisalsofreetostopreportingevents
duringthefirmwareupdateprocess.Theserestrictionsareintendedtolimitthefootprint
oftheECsidefirmwareupdatecode,suchthatthecodecanfitentirelyintheECs
onboardmemory.Inthisway,firmwareupdatescanbesupportedevenforEC
architecturesthatnormallyexecutedirectlyoutofthefirmwaredatastore.
ThefirmwareupdatemustbedistributedbytheECfirmwaredeveloperasapackage
consistingofaheaderandabody.TheheaderisusedonlybytheAPandcontains
informationthatidentifiestheupdate.TheAPultimatelystripsofftheheaderandsends
onlythebodytotheEC.TheECmustwritetheentirebodycontentstoitsdatastore
(includingthetrailingchecksumvalue,discussedbelow).
Theheaderandbodyeachcontainatrailingchecksum,whichcanbeusedtoverifytheir
integrity.ThechecksumsarecomputedusingtheCRC32algorithmfromIEEE802.3(x32
+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1).Asidefromthe
trailingchecksum,thebodycontentsareentirelyopaquetotheAP.
TheheadercontentsaredetailedinTable82.Aftervalidatingtheheader,theAPcan
compareitscontentswithinformationreportedbythecurrentlyrunningfirmwareimage
beforedecidingwhethertoproceedwiththeupdate.Specifically,theGetECInterface
SpecVersion,GetECProductName,andGetECFirmwareVersioncommandsare
usefulforthispurpose.Ingeneral,theECInterfaceSpecVersionandECProductName
intheheadermustmatchthecorrespondingvaluesreportedbythecurrentlyrunning
ECfirmware;otherwise,theAPwillrejectthenewfirmwareimage.
OncetheAPdecidestoproceedwiththeupdate,itissuesanInitializeFirmwareUpdate
command.ThiscommandpreparestheECtoupdateitsfirmwarestore.TheEC
initializesitsrunningCRCvalueanditscounteroffirmwaredatabytesreceived.

106

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

Note:TheECmustrespondtotheAPwithinthecommunicationtimeoutperiod
specifiedinthisdocument(Section8).IfthestoragedevicefortheECfirmwareis
slow,though,storageoperationsperformedbytheECmaynotfinishbeforea
responseisduetotheAP.Toaccommodatethissituation,theAPentersapolling
loopafterreceivingaresponsefromtheEC(providedthattheECdoesntreportan
error).TheAPissuesthePollFirmwareUpdatecommand,towhichtheECreports
thatitisready,busy,orhasencounteredanerror.PollingcontinuesaslongastheEC
reportsbusy.WhenevertheECreportsreadyorthatithasencounteredanerror,
pollingterminates.UnliketheAP,theEChasdetailedknowledgeoftheparticular
storagedeviceinstalledinthesystem.TheECisencouragedtomakeuseofthis
informationtoreportanerrorifthestoragedevicedoesnotrespondwithina
suitableperiodoftime.
Next,theAPbeginssendingthebodycontentstotheECusingtheSendFirmwareBytes
command.Withthiscommand,theTegraAPtransfersbetween1and30bytesof
firmwaredatatotheEC.TheECmaintainsarunningcountofthenumberofdatabytes
receivedfromtheAP,whichitreportsbacktotheAPintheSendFirmwareBytes
responsepacket.TheAPcanusethisinformationtodeterminewhetheranypacketshave
beendropped.TheECmustalsocomputearunningCRCvalueoverthecumulatively
receiveddata(excludingthefinal4bytesreceived,i.e.,thetrailingCRCvalue),which
willbeusedtoverifytheintegrityofthereceivedfirmwaredata.
TheECmayoptionallybufferthereceiveddatabeforewritingittothedatastore.If
writingtothedatastore,itistheECsresponsibilitytoverifythecorrectnessofthe
writtendatabeforesendingaresponsebacktotheAP.Ifthewriteorsubsequent
verificationfails,theECwillreportaStatusvalueofDeviceWriteError.Afterthefirst
writeerror,theECisfreetofailanysubsequentSendFirmwareBytescommands.
OncetheAPhassentallofthebodycontents(includingthetrailingCRC)itissuesthe
FinalizeFirmwareUpdatecommandtocompletetheupdateprocess.Ifanyerrorswere
reportedbytheprecedingSendFirmwareBytescommands,FinalizeFirmwareUpdate
mustalsoreportanerror;otherwise,theECproceedstowriteanyremainingbuffered
datatoitsdatastoreandcheckthecumulativeCRCvalueagainstthetrailingCRCvalue
(final4bytesofthedownloadeddata).IftheCRCvaluesdonotmatch,thena
transmissionerrorhasoccurredandtheECreportsaStatusofChecksumError.
Finally,iftheamountofdatareceivedbytheEC(asreportedinitsresponsetothefinal
SendFirmwareBytescommand)doesntmatchthesizeofthebody,thentheupdatehas
failedregardlessoftheStatusreportedbyFinalizeFirmwareUpdate.
Finally,theAPagainpollstheECusingthePollFirmwareUpdatecommand,allowing
theECextratimetocompleteanyfinalstorageoperations.
TheAPcannowoptionallyreadbackthefirmwareimage(specifically,thebodycontents
includingtrailingCRC),presumingtheupdatesucceeded.TheAPisfreetoreturnto
InitializeFirmwareUpdateandrepeatthecyclefromthebeginning,regardlessof
whetherthepreviousattemptsucceededorfailed.Finally,wheneverafirmwareupdate

DA_04649001_11
6October2009

107

Tegra Embedded Controller Interface Specification 1.0

isattempted(whetheritsucceedsornot),theECisresponsibleforresettingitselfafter
thenextAPPowerDowncommandsothatthenewfirmwarewillbeloadedand
executedwhenthesystemissubsequentlybootedup.
Table82FirmwareUpdatePackageHeader
Byte Number

Description

Note

03

MagicNumber

ASCIIstringupdt;notnullterminated

ECInterfaceSpec
Version

Major/minorversion;sameformatasin
GetECInterfaceSpecVersionResponse,
Section6.7.4.1

Reserved

Mustbe00h

635

ECProductName

ASCIIstring;sameformatasinGetEC
ProductNameResponse,Section6.7.4.4

3639

ECFirmwareVersion

Major/minorversion;sameformatasin
GetECFirmwareVersionResponse,
Section6.7.4.5

4043

BodyLength

Lengthofopaquedataincludingits
trailingchecksum;firstbyteisleast
significant,lastbyteismostsignificant

4447

CRC

Checksumcomputedovertheabove
headerdata;firstbyteisleastsignificant,
lastbyteismostsignificant

108

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

Figure13FirmwareUpdateProcedure

DA_04649001_11
6October2009

109

Tegra Embedded Controller Interface Specification 1.0

6.7.6.1. Initialize Firmware Update Request

Table83RequestInitializeFirmwareUpdate
SMBus Protocol Byte

Description

Note

CommandByte

07h

SystemControl

ByteCount

DataByte1(SubCommand) 30h

InitializeFirmwareUpdate

6.7.6.2. Initialize Firmware Update Response


ResponsetoanInitializeFirmwareUpdaterequestisanAckpacket.

110

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.7.6.3. Send Firmware Bytes Request

Table84RequestSendFirmwareBytes
SMBus Protocol Byte

Description

Note

CommandByte

07h

SystemControl

ByteCount

DataByte1(SubCommand) 31h
DataByte2DataByteN

SendFirmwareBytes

Firmwaredatabytes

DA_04649001_11
6October2009

111

Tegra Embedded Controller Interface Specification 1.0

6.7.6.4. Send Firmware Bytes Response

Table85ResponseSendFirmwareBytes

SMBus Protocol Byte

Description

Note

CommandByte

07h

SystemControl

ByteCount

DataByte1(SubCommand) 31h

SendFirmwareBytes

DataByte2(Status)

00hSuccessful

08hChecksumerror
09hDevicewriteerror
0chDataunderflowerror
DataByte3

CumulativeNumberofBytesReceived

BytesReceived
Bits70

DataByte4

BytesReceived
Bits158

DataByte5

BytesReceived
Bits2316

DataByte6

BytesReceived
Bits3124

Firstbyteisleastsignificant;lastbyteis
mostsignificant.

112

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.7.6.5. Finalize Firmware Update Request

Table86RequestFinalizeFirmwareUpdate
SMBus Protocol Byte

Description

Note

CommandByte

07h

SystemControl

ByteCount

DataByte1(SubCommand) 32h

FinalizeFirmwareUpdate

6.7.6.6. Finalize Firmware Update Response

Table87ResponseFinalizeFirmwareUpdate
SMBus Protocol Byte

Description

Note

CommandByte

07h

SystemControl

ByteCount

DataByte1(SubCommand) 32h

FinalizeFirmwareUpdate

DataByte2(Status)

00hSuccessful

08hChecksumerror
09hDevicewriteerror
0bhDataoverflowerror
0chDataunderflowerror

DA_04649001_11
6October2009

113

Tegra Embedded Controller Interface Specification 1.0

6.7.6.7. Poll Firmware Update Request

Table88RequestPollFirmwareUpdate
SMBus Protocol Byte

Description

Note

CommandByte

07h

SystemControl

ByteCount

DataByte1(SubCommand) 33h

PollFirmwareUpdate

6.7.6.8. Poll Firmware Update Response

Table89ResponsePollFirmwareUpdate
SMBus Protocol Byte

Description

Note

CommandByte

07h

SystemControl

ByteCount

DataByte1(SubCommand) 33h

PollFirmwareUpdate

DataByte2(Status)

00hSuccessful

08hChecksumerror
09hDevicewriteerror
0bhDataoverflowerror
0chDataunderflowerror
DataByte3

ECreadyflag
00hECbusy
01hECready

6.7.7. Firmware Read


ThesecommandsenabletheAPtoreadafirmwareimageinstalledontheEC.TheEC
mustprovidethedataintheexactformasusedbytheSendFirmwareBytes,suchthata
readfollowedbyanupdate(write)willreturnthesystemexactlybacktoitsstarting

114

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

state.Thereadbackfirmwareimagemustcontainthesametrailingchecksumvalueas
originallyprovidedbytheAPwhentheimagewasinstalled.ThisenablestheAPto
verifytheintegrityofthereadbackimage.
Ifnofirmwareupdatehasbeenattemptedbeforethereadattempt,theECwillprovide
thecurrentlyexecutingfirmwareimage.Ifperformedafterasuccessfulfirmwareupdate,
theECwillprovidethenewlydownloadedfirmwareimage.Readingofthefirmware
imageisnotsupportedfollowinganunsuccessfulupdate;thedatareturnedbytheECis
undefinedinthiscase.
Tobeginreadingthefirmwareimage,theAPissuesaGetFirmwareSizecommand.This
returnsthesizeofthefirmwareimageinbytesandalsoresetstheECsreadpointer.
TheAPthenbeginsreadingthefirmwaredatabyinvokingtheReadFirmwareBytes
command,whichreturnsbetween1and30bytesofdata.Theresponsemustcontainat
leastonebyteoffirmwaredata,unlesstheentirefirmwareimagehasalreadybeen
transferred.Inthislattercase,theECreturnszerodatabytesalongwithaStatusofData
Underflow.Ifareaderroroccurs,theECreportsaStatusofDeviceReadError;thiserror
isstickyandremainsineffectuntilthenextGetFirmwareSizecommandisissued.

DA_04649001_11
6October2009

115

Tegra Embedded Controller Interface Specification 1.0

6.7.7.1. Get Firmware Size Request

Table90RequestGetFirmwareSize
SMBus Protocol Byte

Description

Note

CommandByte

07h

SystemControl

ByteCount

DataByte1(SubCommand) 40h

GetFirmwareSize

6.7.7.2. Get Firmware Size Response

Table91GetFirmwareSizeResponse
SMBus Protocol Byte

Description

Note

CommandByte

07h

SystemControl

ByteCount

DataByte1(SubCommand) 40h

GetFirmwareSize

DataByte2(Status)

00h

Successful

DataByte3

FirmwareSizeBits70 Firmwareimagesizeinbytes

DataByte4

Firstbyteisleastsignificant;lastbyteismost
FirmwareSizeBits15
significant.
8

DataByte5

FirmwareSizeBits23
16

DataByte6

FirmwareSizeBits31
24

116

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

6.7.7.3. Read Firmware Bytes Request

Table92RequestReadFirmwareBytes
SMBus Protocol Byte

Description

Note

CommandByte

07h

SystemControl

ByteCount

DataByte1(SubCommand) 41h

ReadFirmwareBytes

6.7.7.4. Read Firmware Bytes Response

Table93ResponseReadFirmwareBytes

SMBus Protocol Byte

Description

Note

CommandByte

07h

SystemControl

ByteCount

DataByte1(SubCommand) 41h

ReadFirmwareBytes

DataByte2(Status)

00hSuccessful

08hChecksumerror
0ahDevicereaderror
DataByte3DataByteN

Firmwaredatabytes

DA_04649001_11
6October2009

117

Tegra Embedded Controller Interface Specification 1.0

7. Asynchronous Event Packets


ThesupportedEventpacketssentfromtheECtotheAParesummarizedinthesections
below.

7.1. System Event


TheSystemEventissentwhenthereisachangeintheSystemStateBits.
Table94SystemEvent
SMBus Protocol Byte

Description

Note

CommandByte

c5h

SystemEvent,variablelength

ByteCount

02h

DataByte1

SystemStateBits70

SeeTable6

DataByte2

SystemStateBits158

DataByte3

OEMSystemStateBits
70

DataByte4

SeeTable7

OEMSystemStateBits
158

7.2. Battery Event


TheBatteryEventissentwhenthereisachangeintheBatterySlotStatusBits.Thefixed
lengthEventpacketformatisshownbelow;thevariablelengthformatisalsosupported.
Table95BatteryEvent,FixedLength
SMBus Protocol Byte

Description

Note

CommandByte

a8h

BatteryEvent,fixedlength

DataByte1

BatterySlot

0hforBatteryinSlot0
1hforBatteryinSlot1
2hforBatteryinSlot2
3hforBatteryinSlot3

DataByte2

BatterySlotStatus

SeeTable13

118

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

7.3. Keyboard Events


TheKeyboardEventissentwhenkeyeventsareenabledandwhenakeypresseventhas
occurred(seeSection6.5).Currently,eachEventpacketcontainsthecompletescancode
forexactlyonekeypressevent.
SinceKeyboardEventsoccurrelativelyfrequently,itisimportanttominimizeSMBus
bandwidthutilizationwherepossiblebyeliminatingdatatransferoverhead.Assuch,
thereisafixedlengthpacketformatthatallowsa1bytescancodetobetransferredwith
onebyteofoverhead(ratherthanthreebytesofoverheadforthevariablelengthformat).
Since1bytescancodesarethecommoncaseforScanSet1scancodes,usingfixedlength
packetsresultsinasignificantbandwidthsavings.Thevariablelengthformatprovides
forfullflexibilityindealingthewiththemultibyteScanSet1scancodes,whichoccur
lessfrequently.
Formultibytescancodes,thefirstbyteofthescancodeisreportedinthefirstbyteofthe
payload,andsoon.Forexample,theScanSet1makecodefortheleftarrowkeyis0xe0
0x4b,sothefirstbyteofthepayloadwouldbe0xe0andthesecondbyteofthepayload
wouldbe0x4b.
Table96KeyboardEvent,VariableLength
SMBus Protocol Byte

Description

Note

CommandByte

c0h

KeyboardEvent,variablelength

ByteCount

DataByte1N(Payload)

Scancodeforonekey;seeSection6.5fora
discussionofscancodeformats

Table97KeyboardEvent,FixedLength(1ByteScanCode)
SMBus Protocol Byte

Description

Note

CommandByte

80h

KeyboardEvent,fixedlength

DataByte1(Payload)

Singlebytescancodeforonekey;see
Section6.5foradiscussionofscancode
formats

DA_04649001_11
6October2009

119

Tegra Embedded Controller Interface Specification 1.0

Table98KeyboardEvent,FixedLength(2ByteScanCode)
SMBus Protocol Byte

Description

Note

CommandByte

a0h

KeyboardEvent,fixedlength

DataByte1(Payload)

Loworderbyteoftwobytescancodefor
onekey;seeSection6.5foradiscussionof
scancodeformats

DataByte2(Payload)

Highorderbyteoftwobytescancodefor
onekey;seeSection6.5foradiscussionof
scancodeformats

120

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

7.4. Auxiliary Device Events


TheAuxiliaryDeviceEventissentwhenautoreceiveisenabledforaPS/2portandthe
attachedPS/2deviceistransmittingastreamofdata(seeSection0).Currently,each
EventpacketcontainsexactlyonecompletesamplefromthePS/2device,wheresample
sizeisspecifiedbytheAP.
SinceAuxiliaryDeviceEventsarethemostfrequenteventsbeinggeneratedonthe
system,itisimportanttominimizeSMBusbandwidthutilizationwherepossibleby
eliminatingdatatransferoverhead.Assuch,thereisafixedlengthpacketformatthat
allowsa2bytesampletobetransferredwithonebyteofoverhead(ratherthanthree
bytesofoverheadforthevariablelengthformat).Usingthefixedlengthformatcanresult
insignificantSMBusbandwidthutilizationsavingsforlegacyPS/2micewhen
compressionisenabled.Thevariablelengthformatprovidesforfullflexibilitywhen
compressionisdisabled,thefirstbyteofthesamplechangesvalue,orthesamplesizeis
largerthan3bytes.
Finally,bothvariablelengthandfixedlengtherroreventsexiststonotifytheAPof
communicationortimingerrorwhileautoreceivingdatasamples.
Table99AuxiliaryDeviceEvent,VariableLength
SMBus Protocol Byte

Description

Note

CommandByte

cXh

AuxiliaryDeviceEvent,variablelength
X=1hforPS/2port0
X=2hforPS/2port1
X=3hforPS/2port2
X=4hforPS/2port3

ByteCount

DataByte1N(Payload)

Ndatabytes,whereNisspecifiedasthe
argumenttoautoreceivesubcommand

DA_04649001_11
6October2009

121

Tegra Embedded Controller Interface Specification 1.0

Table100AuxiliaryDeviceEvent,FixedLength(2BytePayload)
SMBus Protocol Byte

Description

Note

CommandByte

aXh

AuxiliaryDeviceEvent,variablelength
X=1hforPS/2port0
X=2hforPS/2port1
X=3hforPS/2port2
X=4hforPS/2port3

DataByte1(Payload)

Devicesamplebyte

DataByte2(Payload)

Devicesamplebyte

Table101AuxiliaryDeviceErrorEvent,FixedLength
SMBus Protocol Byte

Description

Note

CommandByte

8Xh

AuxiliaryDeviceEvent,fixedlengthwith
error
X=1hforPS/2port0
X=2hforPS/2port1
X=3hforPS/2port2
X=4hforPS/2port3

DataByte1(Status)

Errorcodeinformation

122

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

7.5. GPIO Events


TheGPIOEventsaresentwhentriggerautoreportingisenabled(seeEnableEvent
Reporting,Sections6.3.11and6.3.13)andatriggereventisdetectedonaGPIOpin.The
GPIOEventpacketscomeinscalarandvectorflavors.Notethatallthefixedlengthand
variablelengthvariantsaresupported,evenifnotexplicitlyshownhere.
ECfirmwareimplementersareonlyrequiredtosupportoneGPIOEventpackettype,
thoughSMBusbandwidthcanbeoptimizedbysupportingbothtypesandselecting
betweenthembasedonthenumberofoutstandingtriggereventstobereported.

Table102GPIOEvent(scalar),FixedLength
SMBus Protocol Byte

Description

Note

CommandByte

86h

GPIOEvent(scalar),fixedlength

DataByte1

LogicalGPIOnumberoftriggeredpin

Table103GPIOEvent(vector),VariableLength
SMBus Protocol Byte

Description

Note

CommandByte

C7h

GPIOEvent(vector),variablelength

ByteCount

DataByte1DataByteN

BitVectorofTriggerEventsdetected
0bNotriggereventdetected
1bTriggereventdetected

DA_04649001_11
6October2009

123

Tegra Embedded Controller Interface Specification 1.0

8. EC Behavioral Rules
ThissectiondescribesECbehavioralrequirementsandrecommendationsforproper
communicationwithTegraAPoverSMBusinterface.
AfterECpoweronreset,theECmustbereadytoreceiverequestsfromtheAP;however,
theECmustwaittoreceivethefirstrequestfromtheAPbeforeinitiatinganySMBus
transfersinvolvingtheAP.Inthisway,theAPsidedriverisguaranteedtobereadyto
acceptSMBustransfersfromtheEC.
ThissameprocessisrepeatedwhentheAPentersdeepsleep.OncenotifiedthattheAP
isenteringdeepsleep,theECmustholdanyfurtherSMBustransfersinvolvingtheAP
untilaftertheAPwakesupandinitiatesitsfirstrequest.NotethattheECisrequiredto
sendanacknowledgementfortheAPsdeepsleepnotificationbeforestoppingSMBus
communications.
ECshouldgenerallytransferpacketsinthefollowingpriorityorder(fromhightolow):
1.

Responsepackets

2.

Requestpackets

3.

Eventpackets

ThisshouldavoiddeadlockconditionssincetheResponsepacketqueueisguaranteedto
drainifnonewRequestpacketsarereceived.Itshouldalsoavoidstarvationsinceboth
RequestandResponsepacketsareprocessedbeforeEventpackets.Iftoomany
Request/Responsesareperformed,though,Eventpacketsmaybedelayed.TheEC
firmwaremusthandlethisconditiongracefully.AuxiliaryDeviceEventsalready
degradegracefully,becauseneweventscannotaccumulateuntilpreviouseventshave
alreadybeensenttotheAP.KeyboardEventsshouldalsodegradegracefullyasthereis
alreadyamechanisminplacetoindicateECinternalkeypressbufferoverflow.
TheAPmayNACKanSMBusoperationatanytimeifitisunabletoprocessthe
operationatthattime.TheECisrequiredtoretrytheNACKedoperationafteradelayof
10msec.Iftheoperationstillcannotbecompletedafter10retryattempts,theECmust
inhibitanyfurtherSMBusoperationsuntilsuchtimeastheAPmakesarequest.Oncethe
APmakesitsrequest,SMBusoperationsareonceagainenabledandtheECmustresume
retryingtheNACKedoperation.Thiscycleofretryingtheoperationandinhibitingthe
buscontinuesuntiltheoperationiscompletedsuccessfully.
AfterECPowerOnReset,ECmustbereadytoacceptTegrarequestmessagesover
SMBusandrespondtothemwiththefollowingtimeoutlimits:

AftertheEC_REQUESTsignalisasserted,theECisexpectedtoreadthepending
RequestPacketfromtheAPwithin20msec(typical),500msec(max).After600msec,
theAPwillconcludethatanerrorhasoccurred.

124

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

AftertheECreceivesaRequestPacket,theECmustsendacorrespondingResponse
PackettotheAPwithin20msec(typical),500msec(max).After600msec,theAP
willconcludethatanerrorhasoccurred.

TheECmustbeabletohandlethecasewheretheAPmakesadditionalrequestsbefore
theEChasyetsentresponsesforpreviousrequests.OnepossibleECimplementation
wouldbetoserializerequest/responsepairsbyignoringtheEC_REQUESTsignaluntil
aftersendingaresponseforthecurrentrequest;onlythenwouldthenextrequestberead
fromtheAP.ShouldtheECelecttoprocessmultiplerequestsconcurrently,requests
sharingacommonCommandTypemustbequeuedandprocessedsequentiallyinthe
orderreceived.

DA_04649001_11
6October2009

125

Tegra Embedded Controller Interface Specification 1.0

Appendix AList of Commands

Command

Sub-command

01hSystemStatus

00hGetSystemStatus
01hConfigureEventReporting
02hAcknowledgeSystemStatus
fdhConfigureWake

02hBatteryInformation

BatterySlotTag,bits7:5
0hBatterySlot0
1hBatterySlot1
2hBatterySlot2
3hBatterySlot3
OthersReserved
BatteryOperations,bits4:0
00hGetSlotStatusandCapacityGauge
01hGetVoltage
02hGetRemainingTimetoEmpty
03hGetCurrent
04hGetAverageCurrent
05hGetAveragingTimeInterval
06hGetRemainingCapacity
07hGetLastFullChargeCapacity
08hGetDesignCapacity
09hGetCriticalCapacity
0ahGetTemperature
0bhGetManufacturerName
0chGetModel
0dhGetType
0ehSetRemainingCapacityAlarm
0fhGetRemainingCapacityAlarm
10hSetConfiguration
11hGetConfiguration
12hConfigureEventReporting
1dhConfigureWake
OthersReserved

126

DA_04649001_11
6October2009

Tegra Embedded Controller Interface Specification 1.0

Command

Sub-command

03hGPIOControl

Scalarsubcommands
00hConfigurePin
01hSetPin(scalar)
02hGetPin(scalar)
03hConfigureEventReporting(scalar)
04hAcknowledgeEventReport(scalar)
06hGetEventReport(scalar)
1dhConfigureWake(scalar)
Vectorsubcommands
21hSetPin(vector)
22hGetPin(vector)
23hConfigureEventReporting(vector)
24hAcknowledgeEventReport(vector)
26hGetEventReport(vector)
3dhConfigureWake(vector)
OthersReserved

04hSleepControl

00hGlobalConfigureEventReporting
01hAPPowerDown
02hAPSuspend
03hAPRestart
OthersReserved

05hKeyboardControl

ffhReset
f4hEnable
f5hDisable
f1hGetscancodeset
f0hSetscancodeset
edhSetLEDs
03hConfigureWake
04hConfigureWakeKeyReporting
OthersReserved

DA_04649001_11
6October2009

127

Tegra Embedded Controller Interface Specification 1.0

Command

Sub-command

06hPS/2AuxiliaryDeviceControl

PS/2PortSelect,bits7:6

0hPS/2port0
1hPS/2port1
2hPS/2port2
3hPS/2port3
PS/2PortOperation,bits5:0
01hSendcommand(sendonebyte,thenreceiveNbytes)
02hReceiveNbytes
03hAutoreceiveNbytes
04hCancelautoreceive
05hSetcompression
3dhConfigureWake
OthersReserved

07hSystemControl

00hResetEC
01hSelfTest
02hNoop
10hGetECInterfaceSpecVersion
11hGetSystemCapabilities
12hGetSystemConfiguration
14hGetECProductName
15hGetECFirmwareVersion
20hInitializeGenericConfiguration
21hSendGenericConfigurationBytes
22hFinalizeGenericConfiguration
30hInitializefirmwareupdate
31hSendfirmwarebytes
32hFinalizefirmwareupdate
33hPollfirmwareupdate
40hGetfirmwaresize
41hReadfirmwarebytes
OthersReserved

128

DA_04649001_11
6October2009

You might also like