V4.0.x fails to create /dev/rtc0 on Winbook TW100 when CONFIG_PINCTRL_BAYTRAIL is set, bisected to commit 7486341
On a Winbook TW100 BayTrail tablet, kernel 4.0 and later do not create /dev/rtc0 when CONFIG_PINCTRL_BAYTRAIL is set in the configuration. Removing this option from the config creates a real-time clock; however, it is no longer possible to get the tablet to sleep using the power button. Only complete shutdown works.
This problem was bisected to the following commit:
commit 7486341a98f26857f383aec88ffa10950087c3a1
Author: Li, Aubrey <[email protected]> Date: Wed Mar 11 16:09:00 2015 +0800
x86/platform, acpi: Bypass legacy PIC and PIT in ACPI hardware reduced mode
On a platform in ACPI Hardware-reduced mode, the legacy PIC and PIT may not be initialized even though they may be present in silicon. Touching these legacy components causes unexpected results on the system.
On the Bay Trail-T(ASUS-T100) platform, touching these legacy components blocks platform hardware low idle power state(S0ix) during system suspend. So we should bypass them in ACPI hardware reduced mode.
The commit message says that this change was needed for the ASUS-T100 tablet. It appears that not all BayTrail systems are the same.
The complete dmesg output is at http://pastebin.com/x9gFKci2 and the configuration file is attached.
Thanks,
Larry
Quoted 4 lines · Larry Finger
On a Winbook TW100 BayTrail tablet, kernel 4.0 and later do not create
/dev/rtc0whenCONFIG_PINCTRL_BAYTRAILis set in the configuration. Removing this option from the config creates a real-time clock; however, it is no longer possible to get the tablet to sleep using the power button. Only complete shutdown works.This problem was bisected to the following commit:
in "hardware reduced mode" (e.g. tablets) on Baytrail the RTC is not actually enabled/initialized by the firmware; talking to it may appear to work but it's really not a good idea (and breaks things likes suspend/resume etc).
Quoted 8 lines · Arjan van de Ven
Quoted 4 lines · Larry Finger
On a Winbook TW100 BayTrail tablet, kernel 4.0 and later do not create
/dev/rtc0whenCONFIG_PINCTRL_BAYTRAILis set in the configuration. Removing this option from the config creates a real-time clock; however, it is no longer possible to get the tablet to sleep using the power button. Only complete shutdown works.This problem was bisected to the following commit:
in "hardware reduced mode" (e.g. tablets) on Baytrail the RTC is not actually enabled/initialized by the firmware; talking to it may appear to work but it's really not a good idea (and breaks things likes suspend/resume etc).
(or in other words, many of the legacy PC things are not supposed to be there)
what did you want to use rtc0 for?
A message that is not in the archive (sent off-list or not yet received): CANC45uWh5-jYLqoFgvfynC0n7t31fae1gp2DUn-bwky24trAPg@mail.gmail.com
Quoted 5 lines · Porteus Kiosk
Hello Arjan,
We need it for setting up the time in the hardware clock through the 'hwclock' command.
Thank you.
hmm thinking about it after coffee... there is an RTC that can be exposed to userspace. hrmpf. Wonder why its not there for you