Re: [linux-sunxi] [PATCH 2/4] power: add axp20x-battery driver

2016-07-05 Thread Bruno Prémont
On Tue, 5 Jul 2016 11:25:10 +0200 Maxime Ripard wrote: > On Tue, Jul 05, 2016 at 04:33:31PM +0800, Icenowy Zheng wrote: > > > > > > 05.07.2016, 13:26, "Michael Haas" : > > > Hi, > > > > > > nice work! Is this in any way related to Bruno Prémonts driver for the > > > axp20x? > > > > > > I've got

Re: [linux-sunxi] [PATCH 2/4] power: add axp20x-battery driver

2016-07-05 Thread Bruno Prémont
On Tue, 05 Jul 2016 16:47:38 +0800 Icenowy Zheng wrote: > I read the datasheet of axp20x, and then found that this driver does > not support backup RTC battery. > (But maybe backup battery do not need a driver -- at least on IBM PC > it has no driver) A driver is needed to enable/disable the RTC b

Re: [linux-sunxi] Charger/battery driver for axp20x being worked on?

2016-03-31 Thread Bruno Prémont
Hello Michael, On Thu, 31 Mar 2016 08:41:57 +0200 Michael Haas wrote: > Hello, > > (adding Bruno to CC) Thanks for CCing, as I currently catch up with mailing list rather sporadically! > On 03/31/2016 08:24 AM, Chen-Yu Tsai wrote: > >> > >> Is anyone working on that? If not, I'll get started.

[linux-sunxi] Re: [PATCH WIP] AXP20x drivers for RTC-battery, AC and Li-Ion battery

2015-08-08 Thread Bruno Prémont
; On 04-08-15 22:11, Bruno Prémont wrote: > > This is all my changes to port my original driver on top of Hans' work. > > > > Before anything of this can be merged a few steps are still needed: > > - split big patch in a series > > - rtc/ac supplies: document DT

[linux-sunxi] [PATCH WIP] AXP20x drivers for RTC-battery, AC and Li-Ion battery

2015-08-04 Thread Bruno Prémont
+= axp20x_usb_power.o axp20x_rtc_power.o axp20x_ac_power.o axp20x_fuel_gauge.o obj-$(CONFIG_MAX8925_POWER)+= max8925_power.o obj-$(CONFIG_WM831X_BACKUP)+= wm831x_backup.o obj-$(CONFIG_WM831X_POWER) += wm831x_power.o diff --git a/drivers/power/axp20x_ac_power.c b/drivers/power/axp2

[linux-sunxi] Re: [PATCH v3 resend 1/2] mfd: axp20x: Add missing registers, and mark more registers volatile

2015-08-02 Thread Bruno Prémont
On Sat, 1 Aug 2015 09:25:17 Hans de Goede wrote: > From: Bruno Prémont > > Add an extra set of registers which is necessary tu support the PMICs > battery charger function, and mark registers which contain status bits, > gpio status, and adc readings as volatile. > &

Re: [linux-sunxi] [PATCH 6/8] ARM: dts: axp209: Add usb_power_supply child node to the ax209 node

2015-07-30 Thread Bruno Prémont
On Fri, 31 Jul 2015 14:14:28 +0800 Chen-Yu Tsai wrote: > On Fri, Jul 31, 2015 at 1:51 PM, Bruno Prémont wrote: > > Hi ChenYu, > > > > On Fri, 31 Jul 2015 13:31:53 +0800 Chen-Yu Tsai wrote: > >> Hi Hans, > >> > >> On Wed, Jun 10, 2015 at 5:37 AM, Han

Re: [linux-sunxi] [PATCH 6/8] ARM: dts: axp209: Add usb_power_supply child node to the ax209 node

2015-07-30 Thread Bruno Prémont
Hi ChenYu, On Fri, 31 Jul 2015 13:31:53 +0800 Chen-Yu Tsai wrote: > Hi Hans, > > On Wed, Jun 10, 2015 at 5:37 AM, Hans de Goede wrote: > > Add a node representing the usb power supply part of the axp209 pmic, note > > that the usb power supply and the (to be added later) ac power supply will > >

[linux-sunxi] Re: [PATCH v3 4/4] power: Add an axp20x-usb-power driver

2015-06-27 Thread Bruno Prémont
s will need separate > > drivers. Each one needs its own devictree child-node so that other > > devicetree nodes can reference the right power-supply, and thus each one > > will get its own mfd-cell / platform_device and platform-driver. > > > > Cc: Brun

Re: [linux-sunxi] Re: sunxi-mali and FRAMEBUFFER issues

2015-02-18 Thread Bruno Prémont
Hi Simo, On Wed, 18 Feb 2015 07:15:22 +0200 Siarhei Siamashka wrote: > On Wed, 18 Feb 2015 07:08:42 +0200 Siarhei Siamashka wrote: > > On Fri, 13 Feb 2015 09:04:48 -0800 (PST) Simo Xefil wrote: > > There are surely plenty of ways to clear the framebuffer. And you can > > also even make a copy of t

Re: [linux-sunxi] Reported battery percentage lower than it should be

2015-01-14 Thread Bruno Prémont
On Tue, 13 January 2015 Dave McLaughlin wrote: > I am running Android sunxi-linux 3.4 and on boot up, with battery power > only, I see the following in the debug output. > > [0.148] boot1 version : 2.0.0 > [0.149] script installed early ok > [0.149] pmu type = 3 > [0.253] bat vol = 3894 mv > >

Re: [linux-sunxi] Re: Is it possible to select kernel on boot ?

2014-12-21 Thread Bruno Prémont
On Sun, 21 December 2014 nilsnu...@gmail.com wrote: > суббота, 20 декабря 2014 г., 14:50:44 UTC+3 пользователь arete74 написал: > > hi, with uboot mainline uboot you can use menu like lilo grub > > See the option extlinux > > > > My /boot/extlinux/extlinux.conf basically contains this:  > > > >

Re: [linux-sunxi] Re: Is it possible to select kernel on boot ?

2014-12-20 Thread Bruno Prémont
Hi, On Fri, 19 December 2014 nilsnu...@gmail.com wrote: > I use lilo on x86/64 PC from 2002. > Why it doesnt work on allwinner ? What is the problem ? > > > I want try mainline kernel, is it possible to select kernel on boot ? > > Something similar to lilo\grub. Lilo has its core bootloader par

Re: [linux-sunxi] OTG charging problem

2014-11-13 Thread Bruno Prémont
On Thu, 13 November 2014 Michal Suchanek wrote: > On 13 November 2014 18:18, Bruno Prémont wrote: > > On Thu, 13 November 2014 Michal Suchanek wrote: > >> I tried several Y cables with two A13 tablets. > >> > >> eg. OTG cable + mini-USB Y cable for powering U

Re: [linux-sunxi] OTG charging problem

2014-11-13 Thread Bruno Prémont
Hi Michal, On Thu, 13 November 2014 Michal Suchanek wrote: > I tried several Y cables with two A13 tablets. > > eg. OTG cable + mini-USB Y cable for powering USB disk from 2 ports + > mini USB hub > OTG Y cable with extra power connector + micro USB cable + micro USB hub > > First tablet w

Re: [linux-sunxi] Cubietruck, gmac freezing TCP connections when at gigabit speed

2014-11-11 Thread Bruno Prémont
On Sat, 08 November 2014 Bruno Prémont wrote: > Since I have my Cubietruck, be it with 3.4 kernels or with mainline > kernels I've been experiencing unstable TCP connections. > > The symptoms are stalling connections (usually SSH connections to the > Cubietruck) that have

Re: [linux-sunxi] Cubietruck, u-boot-2014.10, SATA drive power cut during boot

2014-11-10 Thread Bruno Prémont
Hi Hans, On Mon, 10 November 2014 Hans de Goede wrote: > On 11/08/2014 08:34 PM, Bruno Prémont wrote: > > Since updating my cubietruck to u-boot-2014.10 the SATA hard drive > > connected to it performs emergency head parking around the time > > uboot hands over control to

Re: [linux-sunxi] Re: Cubietruck, u-boot-2014.10, SATA drive power cut during boot

2014-11-09 Thread Bruno Prémont
On Sun, 09 November 2014 Ian Campbell wrote: > On Sat, 2014-11-08 at 20:34 +0100, Bruno Prémont wrote: > > Since updating my cubietruck to u-boot-2014.10 the SATA hard drive > > connected to it performs emergency head parking around the time > > uboot hands over control to

Re: [linux-sunxi] Cubietruck, gmac freezing TCP connections when at gigabit speed

2014-11-09 Thread Bruno Prémont
Hi, On Sun, 09 November 2014 Hans de Goede wrote: > On 11/09/2014 08:31 AM, Diego Roversi wrote: > > On Sat, 8 Nov 2014 20:44:48 +0100 Bruno Prémont wrote: > >> Since I have my Cubietruck, be it with 3.4 kernels or with mainline > >> kernels I've been exper

[linux-sunxi] Cubietruck, gmac freezing TCP connections when at gigabit speed

2014-11-08 Thread Bruno Prémont
Hi, Since I have my Cubietruck, be it with 3.4 kernels or with mainline kernels I've been experiencing unstable TCP connections. The symptoms are stalling connections (usually SSH connections to the Cubietruck) that have nearly no chance at recovering. When I tell GMAC to only advertise up to 10

[linux-sunxi] Cubietruck, u-boot-2014.10, SATA drive power cut during boot

2014-11-08 Thread Bruno Prémont
it would be nice if SATApower could be preserved along the different steps of boot process. On kernel side I'm using the following patch to protect the SATA drive during reboot: Author: Bruno Prémont Date: Wed Jul 9 22:50:43 2014 +0200 sd: Stop disks on reboot Some systems

[linux-sunxi] Re: [RFC Patch 1/4] mfd: AXP20x: Add power supply bindings documentation

2014-11-05 Thread Bruno Prémont
Hi Ezaul, On Tue, 04 November 2014 Ezaul Zillmer wrote: > Cubieboard2 + Kernel 3.18-rc3 > > [ 15.955655] axp20x-regulator axp20x-regulator: regulators node not found > [ 15.962580] LDO1: 1300 mV > [ 15.965732] LDO2: at 3000 mV > [ 15.969120] LDO3: at 2275 mV > [ 15.972314] LDO4: at 28

[linux-sunxi] Re: [RFC Patch 1/4] mfd: AXP20x: Add power supply bindings documentation

2014-11-04 Thread Bruno Prémont
Hi Maxime, On Tue, 04 November 2014 Maxime Ripard wrote: > On Mon, Nov 03, 2014 at 09:02:44PM +0100, Bruno Prémont wrote: > > Doing something like this?: > > > > --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts > > +++ b/arch/arm/boot/dts/sun7i-a20-cubietruc

[linux-sunxi] Re: [RFC Patch 2/4] mfd: AXP20x: Add power supply sub-driver

2014-11-04 Thread Bruno Prémont
On Thu, 23 October 2014 Edgar Toernig wrote: > > + getnstimeofday(&ts); > > + /* only query hardware if our data is stale */ > > + spin_lock(&devdata->lock); > > + if (!init && !(ts.tv_sec > devdata->next_check.tv_sec || > > + ts.tv_nsec > devdata->next_check.tv_sec)) { >

[linux-sunxi] Re: [RFC Patch 1/4] mfd: AXP20x: Add power supply bindings documentation

2014-11-04 Thread Bruno Prémont
Hi Maxime, On Tue, 21 October 2014 Maxime Ripard wrote: > On Tue, Oct 21, 2014 at 06:09:16PM +0200, Bruno Prémont wrote: > > On Tue, 21 October 2014 Lee Jones wrote: > > > On Mon, 20 Oct 2014, Bruno Prémont wrote: > > > > --- > > > > Note: the OCV va

[linux-sunxi] Re: [RFC Patch 1/4] mfd: AXP20x: Add power supply bindings documentation

2014-10-22 Thread Bruno Prémont
On Tue, 21 October 2014 Lee Jones wrote: > On Mon, 20 Oct 2014, Bruno Prémont wrote: > > --- > > Note: the OCV values seem to have some defaults build into the > > PMIC though may need adjustment if the used battery has a different > > open circuit voltage curve. >

[linux-sunxi] Re: [RFC Patch 2/4] mfd: AXP20x: Add power supply sub-driver

2014-10-21 Thread Bruno Prémont
On Tue, 21 Oct 2014 22:27:15 +0200 Maxime Ripard wrote: > On Mon, Oct 20, 2014 at 10:33:20PM +0200, Bruno Prémont wrote: > > Add driver for the power supply features of AXP20x PMIC. > > > > Covered features: > > - backup / RTC battery > > - VBUS/OTG power input

[linux-sunxi] Re: [PATCH v7 0/6] mfd: AXP20x: Add support for AXP202 and AXP209

2014-10-21 Thread Bruno Prémont
On Sun, 29 Jun 2014 20:23:51 +0200 Carlo Caione wrote: > During the merging of v6 several patches were left out. This v7 comprises > all the patches that are still pending. Any progress on this or reason why these are stuck? > //-- > > AXP209 and AXP202 are the PMUs (Power Management Unit) used

[linux-sunxi] [RFC Patch 0/4] mfd: AXP20x: Add power supply sub-driver

2014-10-21 Thread Bruno Prémont
This series adds a power-supply driver to cover backup/RTC battery charger, VBUS/OTG power in, AC power in and battery charger features supported by AXP20x PMIC. The DT bindings documentation patch depends on the following patch from Carlo Caione: http://lists.infradead.org/pipermail/linux-arm-k

[linux-sunxi] [RFC Patch 4/4] mfd: AXP20x: Add backup battery DTS entry for Cubietruck

2014-10-21 Thread Bruno Prémont
--- arch/arm/boot/dts/sun7i-a20-cubietruck.dts |4 + 1 files changed, 2 insertions(+), 0 deletion(-) diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts index a6c1a3c..efb65fb 100644 --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts +++

[linux-sunxi] [RFC Patch 2/4] mfd: AXP20x: Add power supply sub-driver

2014-10-21 Thread Bruno Prémont
31x_backup.o obj-$(CONFIG_WM831X_POWER) += wm831x_power.o diff --git a/drivers/power/axp20x_power.c b/drivers/power/axp20x_power.c new file mode 100644 index 000..9d6b8bc --- /dev/null +++ b/drivers/power/axp20x_power.c @@ -0,0 +1,1530 @@ +/* + * AC power input driver for X-Powers AXP20x PMICs +

[linux-sunxi] [RFC Patch 1/4] mfd: AXP20x: Add power supply bindings documentation

2014-10-20 Thread Bruno Prémont
--- Note: the OCV values seem to have some defaults build into the PMIC though may need adjustment if the used battery has a different open circuit voltage curve. As far as understood (these values are set in vendor driver but not mentioned in chip documentation) they represent charge percentage f

[linux-sunxi] [RFC Patch 3/4] mfd: AXP20x: Add power supply defconfig entries

2014-10-20 Thread Bruno Prémont
--- arch/arm/configs/multi_v7_defconfig |1 + arch/arm/configs/sunxi_defconfig |1 + 2 files changed, 2 insertions(+), 0 deletion(-) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 6e57d12..9737c26 100644 --- a/ar

Re: [linux-sunxi] [PATCHv2 3.4 4/4] sunxi: axp20x: Calculate moving average for ACIN voltage/current/power

2014-10-12 Thread Bruno Prémont
Hey Olliver, For mainline I wrote a driver for the power supply part some time ago and posted it here (it's referenced from the mainlining page on the WIKI). It covers ACIN, BATTERY and VBUS power supplies with both current and voltage measurements. For battery it could also provide temperature i

[linux-sunxi] Re: [Patch RFC] mfd: AXP20x: add power_supply driver

2014-10-03 Thread Bruno Prémont
Hello, On Fri, 3 Oct 2014 04:55:22 -0700 (PDT) Markus Rathgeb wrote: > Thank you for your work! > > Is there a git repository the changes could be found (to simplify merging / > cherry-picking)? > Is there some progress to get that mainline? I've been waiting for some feed-back from sunxi commu

Re: [linux-sunxi] Battery charge status not consistent

2014-09-20 Thread Bruno Prémont
e enough time to recover and thus presents a lower voltage for one of the first readings by AXP. Those pmu_bat_para* values are used under the name of "OCV" (which I understand as open-circuit-voltage in their context). Bruno > Dave... > > On Saturday, 20 September 2014 16:09

Re: [linux-sunxi] Battery charge status not consistent

2014-09-20 Thread Bruno Prémont
On Fri, 19 September 2014 Dave McLaughlin wrote: > With an A20 board I have found that if I power up with external DC > connected, the battery shows the correct charge percentage. If I run on > batter and make sure it never sleeps (through the app I am developing) it > discharges as expected. >

Re: [linux-sunxi] [Tool] AXP20x register decoding utility

2014-08-05 Thread Bruno Prémont
bdrivers (e.g. pek input driver, power_supply drivers, regulators, ...). Bruno > > On Mon, Aug 4, 2014 at 4:20 PM, Bruno Prémont > > wrote: > >> Hi, > >> > >> Attached code is a little program to decode AXP20x registers and present > >> their values

[linux-sunxi] [Tool] AXP20x register decoding utility

2014-08-04 Thread Bruno Prémont
Hi, Attached code is a little program to decode AXP20x registers and present their values in a readable way. By default it looks for AXP20x mfd driver's regmap in sysfs. Not all registers are being decoded yet (missing are e.g. GPIOs). Some undocumented registers are mentioned (e.g. OCV values,

[linux-sunxi] [Patch RFC] mfd: AXP20x: add power_supply driver

2014-08-04 Thread Bruno Prémont
m_power.o +obj-$(CONFIG_AXP20X_POWER) += axp20x_power.o obj-$(CONFIG_MAX8925_POWER)+= max8925_power.o obj-$(CONFIG_WM831X_BACKUP) += wm831x_backup.o obj-$(CONFIG_WM831X_POWER) += wm831x_power.o diff --git a/drivers/power/axp20x_power.c b/drivers/power/axp20x_power.c new file mod