Simtec Electronics


Simtec Electronics Power management Unit Registers

ProductIPSTCPMU
Date22/4/2008
ReferenceRGSTRS001
AuthorVRS, DJAS
Version1.35

Contents

©2007, 2008 Simtec Electronics


Introduction

The Simtec Power Management Unit (IPSTCPMU) is accessed by an I2C bus. The unit is single byte addressed at 0x6b. The unit controls the power and miscellaneous GPIO.

The PMU has the ability to generate an internal IRQ (Note: this is NOT a CPU IRQ) which may be configured by unmasking GPIO marked as input. The IRQ will not have any effect (beyond being readable in the IRQ status register) unless the global IRQ enable is set.

If an unmasked PMU IRQ is generated the unit will assert its CPU IRQ line to alert the main processor (which may be used by the CPU as a wakeup source). In addition the PMU will turn the power on if the system is not already on.

V1.1 Registers

The first version of the PMU was never released and will never be found in products.

V1.2 Registers

Register
Number Width Read Value Write Value EEP
DecHex
0 0 4 Ident "SBPM" -
1 1 1 PMU Version (2) -
2 2 1 DDC Enable state Non zero to enable DDC
3 3 1 - Guard byte to Power off
4 4 1 - Guard byte to reset system
5 5 1 Global Wake on status Non zero to enable Wake Y
6 6 1 Wake on LAN enabled Non zero to enable WOL Y
7 7 1 Wake on Ring enabled Non zero to enable WOR Y
8 8 1 - System beep value is freq
9 9 6 PMU Unique ID bytes Unique ID bytes (Write once) Y
10 A 1 - Guard byte to sleep
192 - 255 C0 - FF 1 EEPROM memory EEPROM memory

The guard byte value is 85 (0x55).

Registers marked EEP are stored and set on powerup.

Unique ID is writable once if its never been set before.

Global wakeup is non zero to enable wakeup sources.

Wakeup is defined as enabling power (if not already on) and signalling the CPU with an IRQ.

EEPROM memory on the V1 devices included the write once memory for the uid and all the settings memory as there were 64 bytes total, on the V2 devices its 64bytes of unterrupted user space.

V1.3 Registers

Version 1.3 is backwards compatible, the protocol version register has been updated to 30 (0x1E) to indicate the additional capabilities.

A minor protocol version increase to 31 (0x1F) was perfomed to add the both edge polarity registers.

A minor protocol version increase to 32 (0x20) was performed to add the ability to change the both-edge polarity register. Also the version register gained an extra byte to indicate board specific version information.

The version 1.33 PMU system has a more sophisticated IRQ handling system. An internal IRQ will interrupt the main processor assuming the global IRQ enable (register 5) is set. This also allows for flexible board wake up, as all the processor requires in order to wake the system up is an IRQ. The general purpose nature of this system means that, in addition to the wakeup function, interrupts can be generated whilst running (if configured for it) perhaps to indicate voltage margin conditions etc.

Register
Number Width Read Value Write Value EEP
Dec Hex
01 0 4 Ident "SBPM" -
1 1 2 PMU Version -
21 2 1 DDC Enable state Non zero to enable DDC
31 3 1 - Guard byte to Power off 3
41 4 1 - Guard byte to reset system 3
5 5 1 Global IRQ enable status Non zero to enable IRQs Y
61 6 1 Wake on LAN enabled Non zero to enable WOL Y
71 7 1 Wake on Ring enabled Non zero to enable WOR Y
81 8 1 - System beep value is freq
91 9 6 PMU Unique ID bytes Unique ID bytes (Write once) Y
101 A 1 - Guard byte to sleep 3
11 B 1 PMU Status of last op. -
125 C 5 Hardware specific information. -
136 D 4 Implementation specific. Implementation specific.
20 14 n GPIO present bits -
21 15 n GPIO Pullup settings GPIO Pullup settings Y
22 16 n Data Direction bitmask DDR - 1 for out 0 for in Y
23 17 n Current GPIO status Bits to set on
24 18 n Current GPIO status Bits to clear off
25 19 n GPIO IRQ source mask GPIO IRQ source mask Y
26 1A n GPIO IRQ edge/level GPIO IRQ edge or level Y
27 1B n GPIO IRQ polarity GPIO IRQ source polarity Y
28 1C n GPIO IRQ status Clear pending IRQ
29 1D n GPIO delay mask GPIO delay mask Y
30 1E 1 GPIO delay value (dS) GPIO delay value Y
312 1F n GPIO edge IRQ both edges GPIO IRQ both edges Y
322 20 n GPIO first IRQ status Clear status
332 21 n GPIO unmasked IRQ status -
395 27 4 ADC Max deflection and VREF value -
40 28 1 ADC present -
41 29 1 ADC IRQ source mask ADC IRQ source mask Y
42 2A 1 ADC IRQ status Clear pending IRQ
43 2B 1 ADC compare polarity ADC compare polarity Y
44 2C 2 ADC 0 value -
45 2D 2 ADC 1 value -
46 2E 2 ADC 2 value -
47 2F 2 ADC 3 value -
48 30 2 ADC 4 value -
49 31 2 ADC 5 value -
50 32 2 ADC 6 value -
51 33 2 ADC 7 value -
525 34 2 ADC 0 Threshold value ADC 0 Threshold value Y
535 35 2 ADC 1 Threshold value ADC 1 Threshold value Y
545 36 2 ADC 2 Threshold value ADC 2 Threshold value Y
555 37 2 ADC 3 Threshold value ADC 3 Threshold value Y
565 38 2 ADC 4 Threshold value ADC 4 Threshold value Y
575 39 2 ADC 5 Threshold value ADC 5 Threshold value Y
585 3A 2 ADC 6 Threshold value ADC 6 Threshold value Y
595 3B 2 ADC 7 Threshold value ADC 7 Threshold value Y
647 40 2 WDG: Power-on/Reset. Current and reset values in seconds. WDG: Power-on/Reset. Current value and optionally reset value in seconds. Y
657 41 1 Bus heartbeat reset value in seconds. 0 is disabled. Bus heartbeat reset value in seconds. 0 to disable heartbeat, nonzero to enable it at a given periodicity. N
668 42 1 Maximum watchdog recoveries before the PMU locks down. 0 is disabled. Maximum number of times the watchdog is permitted to recover the system before it locks out the IRQs and powers down the board. Write a 0 to disable this feature. N
128 1 6 Scratchpad (DEBUG) Scratchpad (DEBUG)

Note 1: These registers are the same as those in protocol version 1.2

Note 2: These registers were introduced in protocol version 1.31.

Note 3: The guard byte value is 85 (0x55)

Note 4: This register was made read/write in protocol version 1.32 and was read-only prior to that.

Note 5: These registers were made available in protocol version 1.32.

Note 6: This register was made available in protocol version 1.33.

Note 7: This register was made available in protocol version 1.34.

Note 8: This register was made available in protocol version 1.35.

General registers

The version register first byte gives the protocol version, the second byte is the implementation version of the PMU.

The hardware specific information register returns data about the PMU hardware itself. The first byte indicates what kind of hardware is implementing the PMU and the rest of the response is hardware specific. This register is reserved for Simtec debug.

GPIO registers

ADC registers

Watchdog (WDG) registers

Bus heartbeat register

Suggested watchdog usage

It is recommended that the following sequence be used when the watchdogs are desired.

  1. The PO/R reset value is set to something sensible such as 2 minutes.
  2. ABLE's startup will cause the PO/R to stop as it will address the PMU.
  3. Just before you start Linux, enable the bus heartbeat at something like ten seconds.
  4. This means that in 2 minutes and 10 seconds the board will reset. Assuming your Linux installation gets the PMU driver up by then (trivial if it is built into the kernel) this won't be an issue.
  5. Every 10 seconds, the bus heartbeat will raise an IRQ to the processor. The driver will probe the PMU to ask what happened, which will stop the PO/R watchdog.
  6. If you suspend the board, it would be sensible to disable the bus heartbeat before suspend, otherwise the heartbeat will wake the processor up again.

Simtec Electronics

Web http://www.simtec.co.uk/
Email info@simtec.co.uk
Telephone +44 (0)1772 978010
Fax +44 (0)1772 816426
Mail Simtec Electronics,
Avondale Drive,
Tarleton,
Preston,
Lancs
PR4 6AX
United Kingdom