Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

I2C-Address: 0x40 (7-bit)

Register

Name

Access

Description

Default Value

0x01

REG_ID

read

ID-Register

0x96

0x02

REG_CONTROL

write

Restart and boot with BOOT_MODE=
0x01 - Serial Download
0x02 - uSDHC1 8-bit eMMC 5.1

0x04 - Shutdown (Hard)
0x05 - Reboot from BOOT_SEL pins

-

0x03

REG_CONFIG

-

-

-

0x04

REG_PIN_CONFIG

write

<Pin> <Parameter>
Parameter for GPIO:

0x01: Input, NoPull
0x10: Input, PullDown
0x11: Input, PullUp

0x20: Output PushPull, init low level
0x21: Output PushPull, init high level
0x40: Output, OpenDrain, init low level
0x41: Output, OpenDrain, init high level

0x80: IRQ Rising Edge
0x81: IRQ Falling Edge
0x82: IRQ Any Edge

-

0x05

REG_PIN_SET

write

<Pin> <Level>

-

0x06

REG_PIN_GET

write
read

<Pin>
Level of pin.

-

0x07

REG_PWM_CONFIG

write

<Pin> <Duty Cycle [%]>

-

0x08

REG_ALTERNATE_
FUNCTION

write

Set Pin to specific alternate function.
For available alternate functions for pins refer to the list of configurable GPIO pins below.

<Pin> <Alternate Function>

Alternate Functions:
0x00: GPIO (Default: Input, NoPull)
0x01: PWM (Default: disabled)

0x09

REG_ADC_READ

read

Read ADC value:

0x00 - ADC_VOLT_MON (=5V_SLEEP/2)

-

0x0A

REG_INT_STATUS0

read

Read INT_STATUS register, clear it and reset EC_IRQ#_OD to “1”

0x01: GPIO4
0x02: GPIO5
0x04: GPIO6GPIO11
0x08: GPIO11GPIO12
0x10: GPIO12GPIO13
0x20: GPIO13RTC_INT#
0x40: RTCSMB_INT#ALERT#
0x80: SMBUSB0_EN_ALERT#OC#

0x00

0x0B

REG_INT_ENABLE0

r/w

Read or update IRQ Enable Register.

Same signals as in REG_INT_STATUS0.

0x00

0x0C

REG_INT_STATUS1

read

Read INT_STATUS2 register, clear it and reset EC_IRQ#_OD to “1” if all interrupts are read.

0x01: USB0USB1_EN_OC#
0x02: USB1USB2_EN_OC#
0x04: USB2_EN_OC#
0x08: CPU_IRQ#

0x00

0x0D

REG_INT_ENABLE1

r/w

Read or update IRQ Enable Register.

Same signals as in REG_INT_STATUS1.

0x00

0x0E

REG_INT_STATUS2

-

-

0x0F

REG_INT_ENABLE2

-

-

 

0x10

REG_SHUTDOWN_DELAY

r/w

Read/write delay in 10ms steps before powering off during soft shutdown/restart.

(0x01 = 10ms, 0xFF = 2550 ms)

0x80

REG_SECO_CODE0

read

Read bits [7:0] of SECO_CODE.
0x45 - RE58-1AA1-2611-E0
0x46 - RE58-1AA2-1611-E0
0x00 - RE58-1AA0-0100-C0

-

0x81

REG_SECO_CODE1

read

Read bits [11:8] of SECO_CODE.

0x90

REG_RAM_CODE

read

Read RAM_CODE [3:0].

0x4 - 4GB RAM

-

0xF0

REG_VERSION

read

Read firmware version

0x01

...

Pin#

Name

Default Configuration

IRQ

Alternate Function

0

GPIO4

Input, NoPull

(tick)

1

GPIO5

Input, NoPull

(tick)

PWM

2

GPIO6GPIO11

Input, NoPull

(tick)

3

GPIO11GPIO12

Input, NoPull

(tick)

4

GPIO12GPIO13

Input, NoPull

(tick)

5GPIO13

Input, NoPull

(tick)

6

RTC_INT#

(IRQ only)

(tick)

76

SMB_ALERT#

(IRQ only)

(tick)

87

USB0_EN_OC#

Output, OpenDrain, init low level

(tick)

98

USB1_EN_OC#

Output, OpenDrain, init low level

(tick)

109

USB2_EN_OC#

Output, OpenDrain, init low level

(tick)

1110

CPU_IRQ#

(IRQ only)

(tick)*

1211

USB_HUB_RST#

Output, PushPull, init low level

1312

WIFI_PWRDWN#

Output, PushPull, init low level

1413

BATLOW#

Input, NoPull

1514

CHARGING#

Input, NoPull

1615

CHARGER_PRSNT#

Input, NoPull

1716

RESET_OUT#

Output, PushPull, init low level, set high ~100ms after startup (-> SMARC Spec.)

...