Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Summary:

Add new Usages to support configuring a system’s onboard RTC (Real-Time-Clock) and System Wake Timer.

Scenario:

CPU timers tend to drift and lack time-keeping capability during sleep/shutdown. An RTC (Real-Time-Clock, distinct from the CPU-Clock) is a dedicated, battery-powered device (typically integrated into motherboards/chipsets) to maintain a ‘wall-clock’ time+date with high precision. Commonly used to provide current time+date to the user, data timestamping, task-scheduling and a basis for authentication.

The pairing with a battery/super-capacitor, ensures accurate time+date is kept while the CPU is not running. While this device is very-accurate and typically factory-initialized, it still requires regular updates from the system to account for drift (e.g. using NTP), timezone changes and addition of leap-seconds. The system typically retrieves the current time from the device on returning to its working-state.

The system wake-timer device provides a CPU-external mechanism to signal a ‘wake’. It is commonly implemented as an ‘always on’ low-power hardware block in the chipset/SoC or directly into the platform’s power-management/wake controller.

When configured, the device will wake the system at the specified future time after the timer expires. This enables the system to save power by sleeping during idle periods and then resume to perform scheduled tasks.

Proposal:

Add to Table 9.1 – Generic Device Controls Page

Usage IdUsage NameUsage Types
0x46-4FReserved
0x50Vendor Current StateDV
0x51Current StateNAry
0x52ClearedSel
0x53FailedSel
0x54RunningSel
0x55ExpiredSel
0x56SignaledSel

Add a new section to Generic Device Controls with the following details.

Reviewer Note: These Usages are reminiscent of ‘23.3 Sensor State Event Usages’. New Usages have been declared since Sensor Events are expected to be used with Modifiers. Modifiers are not applicable to non-sensor scenarios, so new, dedicated Usages shall be created.

9.5 Device State

Some devices can fail requested operations (though the Report is successfully sent/received) because of underlying hardware faults, loss of backing resources, invalid configuration, or other device-specific conditions that are not visible through transport-level success alone. These usages allow the system to determine whether a requested operation succeeded, failed, or requires recovery.

Usage Name Usage Types Usage Description
Current State NAry The most-recent state
Cleared Sel State is uninitialized or recently reset/cleared.
Failed Sel

Failed to perform the most recent operation. (Note: HID-transport functionality is still clearly working)

Common for when the device is actually backed by another device that can experience failures

Expired Sel Expired (e.g. timer has completed)
Signaled Sel Signaled (e.g. external interrupt raised)
Running Sel Running (e.g. everything behaving normally)
Usage Name Usage Types Usage Description
Vendor Current State DV

Opaque state-value meaningful only to the device vendor.

Typically used in conjunction with ‘Current State’

Create new page ‘Time and Date’ (0x13).

Reviewer Note: These Usages are reminiscent of ‘23.15 Time Sensor Field Usages’. New Usages have been declared since Sensor Data Fields are expected to be used with Modifiers. Modifiers are not applicable to non-sensor scenarios, so new, dedicated Usages shall be created.

22 - Time and Date (0x13)

Common Usages to describe times and dates.

Usage IdUsage NameUsage Types
0x00Undefined
0x01YearDV
0x02MonthDV
0x03DayDV
0x04HourDV
0x05MinuteDV
0x06SecondDV
0x07MillisecondDV
0x08-FReserved
0x10Time Zone Offset From UTCDV
0x11Daylight Savings Time ObservedDF
0x12Daylight Savings Time ActiveDF

22.1 Date

Conventional UTC (proleptic Gregorian) calendar divisions.

Usage Name Usage Types Usage Description
Year DV

Standard UTC Gregorian calendar year.

Positive integers for AD and negative for BC.

0 is undefined in the Gregorian calendar.

Month DV Standard UTC Gregorian calendar month
Day DV Standard UTC Gregorian calendar day of the month

22.2 Time

22.2.1 Conventional UTC time (Coordinated Universal Time) divisions.

Usage NameUsage TypesUsage Description
HourDVStandard UTC hour
MinuteDVStandard UTC minute
SecondDVStandard UTC second
MillisecondDVStandard UTC millisecond

22.2.2 Time zone and Daylight Savings Time (DST).

Usage Name Usage Types Usage Description
Time Zone Offset From UTC DV

Minutes local time is behind (-) or ahead (+) of UTC+00:00

Offset = (localTime – UTC)
e.g. AEST timezone of UTC+10:00 is ahead +600 minutes.

e.g. EST timezone of UTC-05:00 is behind -300 minutes.

Daylight Savings Time Observed DF Indicates if DST is observed in current time zone
Daylight Savings Time Active DF

Indicates if time has been adjusted by system to apply DST.

Useful when the device is shared to coordinate applying/removing DST.

Add to Table 4.1 – Generic Desktop Page

Usage IdUsage NameUsage Types
0x14System Wake TimerCA
0x15System Real Time ClockCA
0xF0Timer Expiration: External PowerDV
0xF1Timer Expiration: Internal PowerDV
0xF2Power Source Change Minimum ExpirationDV
0xF3Lowest System Wakeable Power StateNAry
0xF4S1Sel
0xF5S2Sel
0xF6S3Sel
0xF7S4Sel
0xF8S5Sel
0xF9-FFFFReserved

Add 4.17 System Wake Timer

The system wake-timer device provides a CPU-external mechanism to signal a ‘wake’. It is commonly implemented as an ‘always on’ low-power hardware block in the chipset/SoC or directly into the platform’s power-management/wake controller.

When configured, the device will wake the system (via the above out-of-band means) at the specified future time after the timer expires. This enables the system to save power by sleeping during idle periods and then resume to perform scheduled tasks.

Separate wake configurations may be made for whether the system is running on External (i.e. AC/wall) power or Internal (i.e. DC/battery) power. It is up to the device to determine the power source and choose the right configuration, switching as necessary.

There is typically a single system wake timer available to the system.

Usage Name Usage Types Usage Description
System Wake Timer CA A configurable timer, capable of waking the system when in a low-power state.
Timer Expiration: External Power DV Timer expiration when device is connected to external (i.e. AC/wall) power.
Timer Expiration: Internal Power DV Timer expiration when device is connected to internal (i.e. DC/battery) power.
Power Source Change Minimum Expiration DV

Additional time the wake-timer must wait for, when the power-source changes (e.g. from external to internal) while the system is in Sx and the timer has already expired.

(e.g. System enters Sx while on external-power with internal-power timer expired. While in Sx, power-source changes to internal, must wait for additional period before signaling wake.)

4.17.1 Lowest System Wakeable Power State

By ACPI convention, S0 is the working-state, and S1-5 (i.e. Sx) is a low-power state, (where the larger the digit, the lower the power).

Usage Name Usage Types Usage Description
Lowest System Wakeable Power State NAry Indicates the lowest power state the system can enter and still be signaled awake.
S1 Sel Standard ACPI S1 sleep state
S2 Sel Standard ACPI S2 sleep state
S3 Sel Standard ACPI S3 sleep state
S4 Sel

Standard ACPI S4 (Hibernate) sleep state.

System context saved, hardware mostly off

S5 Sel

Standard ACPI S5 (soft off) sleep state.

System context lost, requires full reboot.

4.17.2 Timer Expiration Rules

  1. Upon configuration, the wake timer immediately begins counting-down (i.e. while in S0).

  2. A wake shall be signalled, ONLY when the system is in Sx (i.e. a non-working state). The lowest such state is defined by ‘Lowest System Wakeable Power State’

  3. If the system is in Sx, and the wake timer expires, the system is signalled to wake.

  4. If the system is in S0, and the wake timer expires, no wake is signalled.

  5. If the system enters Sx with an expired wake timer, the system is immediately signalled to wake.

  6. Once expired, the wake timer remains expired until it is cleared or re-configured. (i.e. entering S0 or signalling wake does NOT clear the timer)

  7. If the system changes power-source while in Sx, and the associated timer has already expired, ‘Power Source Change Minimum Expiration’ must additionally be waited before signalling to wake.

Add 4.18 System Real Time Clock (RTC)

CPU timers tend to drift and lack time-keeping capability during sleep/shutdown. An RTC (Real-Time-Clock, distinct from the CPU-Clock) is a dedicated, battery-powered device (typically integrated into motherboards/chipsets) to maintain a ‘wall-clock’ time+date with high precision. Commonly used to provide current time+date to the user, data timestamping, task-scheduling and a basis for authentication.

The pairing with a battery/super-capacitor, ensures accurate time+date is kept while the CPU is not running. While this device is typically factory-initialized, it requires regular system updates to account for drift (e.g. using NTP), timezone changes and addition of leap-seconds. The system typically retrieves the current time from the device on returning to its working-state.

There is typically a single RTC available to the system.

Usage NameUsage TypesUsage Description
System Real Time ClockCAThe system accessible RTC.

Sample Descriptor .wara:

The below sample describes a System Wake Timer and a System Real Time Clock.

System Wake Timer Reports:-

Report Type Report Id Description
Feature 1 Describes the lowest system power state this wake timer can wake the system.
Output 1

Wait timer configuration.

Setting a null-value clears the configuration, stopping any active countdown.

Must request corresponding Input report to validate configuration was applied successfully, as underlying hardware may fail

Input 1

Current wake-timer configuration.

Must be requested explicitly by system. Will NOT be sent as Interrupt.

Examine ‘Current State’ to determine if configuration was successfully applied.

  • Cleared (wake-timer is NOT running)

  • Failed (could NOT apply requested configuration, timer is NOT running)

  • Running (successfully applied configuration, timer is counting-down)

  • Expired (wake-timer has expired but NOT signaled a wake)

  • Signaled (expired wake has been signaled)

System Real Time Clock Reports:-

Output 3

Sets the RTC.

This device supports a resolution of 1 millisecond.

Must request corresponding Input report to validate configuration was applied successfully, as underlying hardware may fail.

Input 3

Retrieves the current RTC time.

Examine ‘Current State’ to determine if previously set time was successfully applied.

  • Failed (could NOT apply requested time, current time is invalid)

  • Running (successfully applied time)