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]
Message-ID: <fd4bef0bb64e4b6fbdf74cbebaa12de3@asem.it>
Date:   Wed, 3 Apr 2019 15:49:03 +0000
From:   Flavio Suligoi <f.suligoi@...m.it>
To:     Alexandre Belloni <alexandre.belloni@...tlin.com>
CC:     Alessandro Zummo <a.zummo@...ertech.it>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        "linux-rtc@...r.kernel.org" <linux-rtc@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 2/2] rtc: pcf2127: add battery-low INTn generation

> > > On 03/04/2019 16:52:45+0200, Flavio Suligoi wrote:
> > > > The pcf2127 has an automatic battery-low detection function.
> > > >
> > > > In case of battery-low event, an interrupt generation through
> > > > the pin INTn (active low) can be enabled, setting the flag BLIE
> > > > in the register Control_3.
> > > >
> > > > This function is activated by the "battery-low-hw-alarm" DT
> property.
> > > >
> > > > Example of use for an NXP i.MX7D board:
> > > >
> > > > &i2c3 {
> > > > 	clock-frequency = <100000>;
> > > > 	pinctrl-names = "default";
> > > > 	pinctrl-0 = <&pinctrl_i2c3>;
> > > > 	status = "okay";
> > > >
> > > > 	pcf2127@51 {
> > > > 		compatible = "nxp,pcf2127";
> > > > 		reg = <0x51>;
> > > > 		battery-low-hw-alarm;
> > > > 		status = "okay";
> > > > 	};
> > > > };
> > > >
> > >
> > > So I'm curious, how do you then use that signal? I have a (not yet
> sent)
> > > series adding alarm support for the pcf2127. The issue having BLIE is
> > > that then this will prevent the alarm to work properly.
> > >
> > > So my guess is that you have nINT connected to an LED or something
> that
> > > the user can see?
> > >
> >
> > I'm working on our custom embedded board with an NXP i.MX7D,
> > developed here, in Asem (www.asem.it).
> > The nINT pin is connected to a GPIO of the MX7 and then
> > used by an applicative sw, to generate an alarm for the user.
> >
> 
> Then, you should probably not enable BLIE because this will cause issues
> with the alarm functionnality.. It is certainly enough to use
> RTC_VL_READ periodically.

We use the nINT signaling solution because of this pin, in addition
to be used by the CPU, can be also connected to an external connector,
available for the final user.
Anyway, even if the BLIE is set, the sw low voltage alarm works,
with the message (displayed about every 12 minutes):

rtc-pcf2127-i2c 2-0051: low voltage detected, check/replace RTC battery.

What kind of issues did you find with BLIE enabled?

Flavio

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ