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 Id | Usage Name | Usage Types |
|---|---|---|
| 0x46-4F | Reserved | |
| 0x50 | Vendor Current State | DV |
| 0x51 | Current State | NAry |
| 0x52 | Cleared | Sel |
| 0x53 | Failed | Sel |
| 0x54 | Running | Sel |
| 0x55 | Expired | Sel |
| 0x56 | Signaled | Sel |
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 Id | Usage Name | Usage Types |
|---|---|---|
| 0x00 | Undefined | |
| 0x01 | Year | DV |
| 0x02 | Month | DV |
| 0x03 | Day | DV |
| 0x04 | Hour | DV |
| 0x05 | Minute | DV |
| 0x06 | Second | DV |
| 0x07 | Millisecond | DV |
| 0x08-F | Reserved | |
| 0x10 | Time Zone Offset From UTC | DV |
| 0x11 | Daylight Savings Time Observed | DF |
| 0x12 | Daylight Savings Time Active | DF |
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 Name | Usage Types | Usage Description |
|---|---|---|
| Hour | DV | Standard UTC hour |
| Minute | DV | Standard UTC minute |
| Second | DV | Standard UTC second |
| Millisecond | DV | Standard 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. 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 Id | Usage Name | Usage Types |
|---|---|---|
| 0x14 | System Wake Timer | CA |
| 0x15 | System Real Time Clock | CA |
| 0xF0 | Timer Expiration: External Power | DV |
| 0xF1 | Timer Expiration: Internal Power | DV |
| 0xF2 | Power Source Change Minimum Expiration | DV |
| 0xF3 | Lowest System Wakeable Power State | NAry |
| 0xF4 | S1 | Sel |
| 0xF5 | S2 | Sel |
| 0xF6 | S3 | Sel |
| 0xF7 | S4 | Sel |
| 0xF8 | S5 | Sel |
| 0xF9-FFFF | Reserved |
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
-
Upon configuration, the wake timer immediately begins counting-down (i.e. while in S0).
-
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’
-
If the system is in Sx, and the wake timer expires, the system is signalled to wake.
-
If the system is in S0, and the wake timer expires, no wake is signalled.
-
If the system enters Sx with an expired wake timer, the system is immediately signalled to wake.
-
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)
-
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 Name | Usage Types | Usage Description |
|---|---|---|
| System Real Time Clock | CA | The 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.
|
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.
|