lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 20 Jul 2020 12:23:58 +0100
From:   miguelborgesdefreitas@...il.com
To:     a.zummo@...ertech.it
Cc:     baruch@...s.co.il, linux@...linux.org.uk,
        alexandre.belloni@...tlin.com, robh+dt@...nel.org,
        shawnguo@...nel.org, s.hauer@...gutronix.de, kernel@...gutronix.de,
        festevam@...il.com, linux-imx@....com,
        miguelborgesdefreitas@...il.com, devicetree@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2 0/3] rtc: pcf8523: imx6qdl-cubox-i: Make DSM for battery switch-over configurable from DT and enable it for the cubox-i

From: Miguel Borges de Freitas <miguelborgesdefreitas@...il.com>

The pcf8523 has two configurable modes for the battery switch-over
functionality: (i) the default mode and (ii) the direct switching mode.
For the default mode to work (at the moment the only driver option), a
filtering circuit consisting of a series resistor of 1 kOhm and
a capacitor of 3.3 microF must be added to the VDD pin input to guarantee
a voltage drop of less 0.7V/ms for the oscillator operation reliability
(see pp.54 of the datasheet). Some boards (e.g. the cubox-i) do not
include such circuitry and are designed to work only in direct switching
mode. In fact, this is the recommended mode in the datasheet for hw
designs where VDD is always expected to be higher than VBAT. If DSM is not
enabled, after a power cycle, the voltage drop may be too high causing the
oscillator to stop working momentarily and the REG_SECONDS_OS bit to be
set. This causes userspace applications such as timedatectl and hwclock to
fail when obtaining the RTC time (RTC_RD_TIME: Invalid argument).
Hence, this patch set makes DSM configurable for the pcf8523 RTC in the
device-tree and enables it for the board where this issue was detected
- the cubox-i.
Note that if the RTC comes from an inconsistent state, the software reset
will override any power management options set during the probe phase.
Thus, pm is also enforced in pcf8523_start_rtc.

Changes in v2:
- Added extended commit message for git history
- Separate dt bindings documentation into a single patch

Miguel Borges de Freitas (3):
  dt-bindings: rtc: pcf8523: add DSM pm option for battery switch-over
  rtc: pcf8523: Make DSM for battery switch-over configurable from DT
  ARM: dts: imx6qdl-cubox-i: enable DSM for the RTC

 Documentation/devicetree/bindings/rtc/nxp,pcf8523.txt |  7 ++++++-
 Documentation/devicetree/bindings/rtc/rtc.yaml        |  7 +++++++
 arch/arm/boot/dts/imx6qdl-cubox-i.dtsi                |  1 +
 drivers/rtc/rtc-pcf8523.c                             | 13 ++++++++++---
 4 files changed, 24 insertions(+), 4 deletions(-)

-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ