[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#972345: marked as done (linux: Please enable CONFIG_RTC_DRV_PCF85063 on arm64)



Your message dated Thu, 03 Dec 2020 18:00:12 +0000
with message-id <E1kksto-0000Q3-Hr@fasolo.debian.org>
and subject line Bug#972345: fixed in linux 5.10~rc6-1~exp1
has caused the Debian Bug report #972345,
regarding linux: Please enable CONFIG_RTC_DRV_PCF85063 on arm64
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
972345: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=972345
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
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/
From b187f0b521c18f65e077c99dd464290b125b47e5 Mon Sep 17 00:00:00 2001
From: Cyril Brulebois <cyril@debamax.com>
Date: Fri, 16 Oct 2020 13:22:39 +0200
Subject: [PATCH] Set CONFIG_RTC_DRV_PCF85063=y on arm64.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Tested successfully with PCF85063TP/PCF85063A on a carrier board with
Raspberry Pi Compute Module 3+, via I²C, on top of Linux 4.19.146, with
a buster userspace:

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

which results in:

    [   10.577352] rtc-pcf85063 1-0051: rtc core: registered rtc-pcf85063 as rtc0

Tested-by: Cyril Brulebois <cyril@debamax.com>
Signed-off-by: Cyril Brulebois <cyril@debamax.com>
---
 debian/changelog           | 6 ++++++
 debian/config/arm64/config | 1 +
 2 files changed, 7 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 9de6cef68fb2..087e48b0843f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+linux (4.19.146-2) UNRELEASED; urgency=medium
+
+  * Set CONFIG_RTC_DRV_PCF85063=y on arm64.
+
+ -- Cyril Brulebois <cyril@debamax.com>  Fri, 16 Oct 2020 12:42:59 +0200
+
 linux (4.19.146-1) buster; urgency=medium
 
   * New upstream stable update:
diff --git a/debian/config/arm64/config b/debian/config/arm64/config
index b9d806a3cbbf..dd9002e40de7 100644
--- a/debian/config/arm64/config
+++ b/debian/config/arm64/config
@@ -994,6 +994,7 @@ CONFIG_RTC_DRV_DS1307=y
 CONFIG_RTC_DRV_MAX77686=y
 CONFIG_RTC_DRV_RK808=y
 CONFIG_RTC_DRV_PCF8563=y
+CONFIG_RTC_DRV_PCF85063=y
 CONFIG_RTC_DRV_EFI=y
 CONFIG_RTC_DRV_CROS_EC=m
 CONFIG_RTC_DRV_PL031=y
-- 
2.20.1


--- End Message ---
--- Begin Message ---
Source: linux
Source-Version: 5.10~rc6-1~exp1
Done: Salvatore Bonaccorso <carnil@debian.org>

We believe that the bug you reported is fixed in the latest version of
linux, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 972345@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Salvatore Bonaccorso <carnil@debian.org> (supplier of updated linux package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 03 Dec 2020 15:42:50 +0100
Source: linux
Architecture: source
Version: 5.10~rc6-1~exp1
Distribution: experimental
Urgency: medium
Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
Changed-By: Salvatore Bonaccorso <carnil@debian.org>
Closes: 969139 972345
Changes:
 linux (5.10~rc6-1~exp1) experimental; urgency=medium
 .
   * New upstream release candidate
 .
   [ Romain Perier ]
   * Enable F2FS compression support (Closes: #969139)
 .
   [ Uwe Kleine-König ]
   * [arm64] Enable support for Kontron's sl28cpld Board Management Controller
   * [arm64] Enable support for NXP's PCF85063 RTC (Closes: #972345)
 .
   [ Salvatore Bonaccorso ]
   * udeb: Remove efivars from efi-modules.
   * [rt] Update to 5.10-rc6-rt13
 .
   [ Aurelien Jarno ]
   * [mips*] Increase RELOCATION_TABLE_SIZE to 0x180000.
Checksums-Sha1:
 bd148ef10018192869714f6d7bb66ede82b71817 199425 linux_5.10~rc6-1~exp1.dsc
 1d667130762046133779600cfcdc2298fa9bb95a 121425484 linux_5.10~rc6.orig.tar.xz
 90284e1491a3b6fd93af6dcf2ab8f995be181cec 1257184 linux_5.10~rc6-1~exp1.debian.tar.xz
 59a1dd379dad78b921bf44f770dfc9ca41bc0497 7378 linux_5.10~rc6-1~exp1_source.buildinfo
Checksums-Sha256:
 5fcc250ddfc563600ba223c8d084880831cdc1e834d402731054238b28721252 199425 linux_5.10~rc6-1~exp1.dsc
 c608857f974976dc3cd9f77d4aeb126a12c7e3e8fbf105e3b9757399c5df411e 121425484 linux_5.10~rc6.orig.tar.xz
 341f24112649acc809c702ab1701299d193b512c264327b7b3ab852ab4c7b749 1257184 linux_5.10~rc6-1~exp1.debian.tar.xz
 5e0f57019ca4b251c40903052fb868eba340007566988b0614115527b50cc4b2 7378 linux_5.10~rc6-1~exp1_source.buildinfo
Files:
 4009e82f548f819e16761e65fb18752b 199425 kernel optional linux_5.10~rc6-1~exp1.dsc
 95233281c45f12b47bb57ac5a1ea6841 121425484 kernel optional linux_5.10~rc6.orig.tar.xz
 41dc5bfe061382c1ef569d555509e6bb 1257184 kernel optional linux_5.10~rc6-1~exp1.debian.tar.xz
 53d552846f729c7ba0fd71c726796daf 7378 kernel optional linux_5.10~rc6-1~exp1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQKmBAEBCgCQFiEERkRAmAjBceBVMd3uBUy48xNDz0QFAl/I+jNfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDQ2
NDQ0MDk4MDhDMTcxRTA1NTMxRERFRTA1NENCOEYzMTM0M0NGNDQSHGNhcm5pbEBk
ZWJpYW4ub3JnAAoJEAVMuPMTQ89E4IkP/iGFCb63f91ETRTZwHVVVY+67oAo/iY6
ltoEOg5zMmJzZ3OYPDgentlV3jYydRk+5o55bn5d5+nKwPxeuzajs+iShYfHywj9
pfdkx7GpX6GlHVqj02pSCgosxmfwpI1Z2kVsOjqsHylZX3Ho2Y0lDFH3uoulv0WI
o9iX5Wu4sAKcTG1HGaiZr6SSzs3/Iv5sJt7qa4twZrqtBmfqHcl47V7GFAeGLpgk
K/JKfxQo5VLGZzuPWkFEyyA4o0rla6SeJ+opbtfivFczHfkqu84w4wHqiWUXn9eq
teUWWw5ndt9lKK6C3PMJMI7/KluqPZYUiBK4Ry5f8IqIFczYAXU6bMO9q5fbpgKb
I6VqEAar6lopI6vSF1sM+8aQb5daNbI+mlASzx6ZMm/imHXGd8db5fn9UxXP0vsi
AFyiRkLc4DjkH4K0pwj2utd/sFxfShNwv0o2DE74mJxahDo1Nm56jbMu83AbHWQG
n7hDr8vlJ3nrqxd/kk/jVKtZhEoXC0yCIsiQQAPMXfmtI5aJYA2dQdmEIDwXbFQO
CkGFEoz3LI+O0x6tIz1fIaNzngGSI+R8xpoZWlbJUerv8JHWeAcC5g1kuOWIofrl
lKcWgJWL7JtHKGQAw+1b47RP7d9sYSzQTehQDVz5q5m6oNw+M/PHjZckSYzsnEO4
nbCb/fFpjiJ3
=Pvjn
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: