Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #68383

Bug#972345: linux: Please enable CONFIG_RTC_DRV_PCF85063 on arm64

From Cyril Brulebois <cyril@debamax.com>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#972345: linux: Please enable CONFIG_RTC_DRV_PCF85063 on arm64
Date 2020-10-16 17:20 +0200
Message-ID <B0zGp-6VN-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Source: linux
Version: 4.19.146-1
Severity: normal
Tags: patch

Hi,

While preparing a product based on a Raspberry Pi Compute Module 3+
embedded on a carrier board, I've stumbled upon an RTC module that's not
enabled in the current arm64 kernel on buster, that's required for the
PCF85063* family:
  https://www.nxp.com/search?keyword=PCF85063&start=0

I've tested two approaches:
 - Hackingly building it as a module (rebuilding only the drivers/rtc
   directory, shipping the resulting .ko and calling depmod myself);
 - and having it built-in instead, this time going for a full build of
   the linux source package, cross-building it for arm64 on amd64.

In both cases, some actions are required to activate the RTC:

    modprobe i2c-dev
    modprobe rtc-pcf85063
    echo pcf85063 0x51 > /sys/class/i2c-adapter/i2c-1/new_device

This means that the kernel initialization happens too early for the
kernel itself reading the RTC time and using it to define system time:

    [    3.889684] hctosys: unable to open rtc device (rtc0)
    [   10.577352] rtc-pcf85063 1-0051: rtc core: registered rtc-pcf85063 as rtc0

But after the write to “…/new_device”, one can set system time from the
RTC manually with:

    hwclock -s     # aka. --hctosys

I've also verified that systemd-timesyncd manages to update the RTC
upon successful NTP synchronization.


For now, I've only tested this with a buster userspace, on top of the
buster branch of linux.git; please let me know if you require applying
it on top of unstable and testing the resulting linux-image package
before considering applying this patch to buster (I would understand,
but I'd be rather happy to skip an extra build).

Because of the required I²C dance, I don't think it makes much of a
difference to enable it with =y or =m (I've learned about some
interesting facts in #855203); my most recent attempt was a full
(cross-)build with =y, hence the proposed patch.


Thanks for considering,
Cyril.
-- 
Cyril Brulebois -- Debian Consultant @ DEBAMAX -- https://debamax.com/

Back to linux.debian.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Bug#972345: linux: Please enable CONFIG_RTC_DRV_PCF85063 on arm64 Cyril Brulebois <cyril@debamax.com> - 2020-10-16 17:20 +0200
  Bug#972345: marked as done (linux: Please enable CONFIG_RTC_DRV_PCF85063  on arm64) "Debian Bug Tracking System" <owner@bugs.debian.org> - 2020-12-03 19:10 +0100

csiph-web