Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Aug 2020 11:05:48 +0200
From:      Bernd Walter <ticso@cicely7.cicely.de>
To:        Emmanuel Vadot <manu@bidouilliste.com>
Cc:        ticso@cicely.de, "freebsd-arm@freebsd.org" <arm@freebsd.org>, Bernd Walter <ticso@cicely7.cicely.de>
Subject:   Re: Pinebook Pro battery fuel-gauge driver..
Message-ID:  <20200817090548.GA59918@cicely7.cicely.de>
In-Reply-To: <20200816145845.4586b7003e4ad1e885c0199d@bidouilliste.com>
References:  <CA6993CD-66BA-49A3-9BCA-15A713637A4F@gmail.com> <20200815113239.GC14057@cicely7.cicely.de> <20200816145845.4586b7003e4ad1e885c0199d@bidouilliste.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Aug 16, 2020 at 02:58:45PM +0200, Emmanuel Vadot wrote:
> On Sat, 15 Aug 2020 13:32:39 +0200
> Bernd Walter <ticso@cicely7.cicely.de> wrote:
> 
> > On Fri, Aug 14, 2020 at 06:23:33PM +0200, Søren Schmidt wrote:
> > > Hi
> > > 
> > > Now that we have display and all working I hacked up a driver for the cw2015 chip that can tell how much battery is left so I know when to seek an outlet :)
> > 
> > Cool - too bad this is different hardware to my older Allwinner based
> > Pinebook.
> 
> axp81x driver supports battery status.

Yes - found it after changing a few Mails with Søren Schmidt.
[52]pinebook# sysctl dev.axp8xx_pmu
dev.axp8xx_pmu.0.batchargecurrentstep: 5
dev.axp8xx_pmu.0.batcurrentcapacity: 0
dev.axp8xx_pmu.0.batmaxcapacity: 0
dev.axp8xx_pmu.0.batcapacitypercent: 100
dev.axp8xx_pmu.0.batdischargecurrent: 1862
dev.axp8xx_pmu.0.batchargecurrent: 1000
dev.axp8xx_pmu.0.batvolt: 4191000
dev.axp8xx_pmu.0.batchargestate: 1
dev.axp8xx_pmu.0.batcharging: 0
dev.axp8xx_pmu.0.bat: 1
dev.axp8xx_pmu.0.vbus: 0
dev.axp8xx_pmu.0.acin: 1
dev.axp8xx_pmu.0.%parent: iicbus1
dev.axp8xx_pmu.0.%pnpinfo: name=pmic@3a3 compat=x-powers,axp803
dev.axp8xx_pmu.0.%location: addr=0x746
dev.axp8xx_pmu.0.%driver: axp8xx_pmu
dev.axp8xx_pmu.0.%desc: X-Powers AXP803 Power Management Unit
dev.axp8xx_pmu.%parent: 


[55]pinebook# sysctl -d dev.axp8xx_pmu
dev.axp8xx_pmu: 
dev.axp8xx_pmu.0.batchargecurrentstep: Battery Charging Current Step, 0: 200mA, 1: 400mA, 2: 600mA, 3: 800mA, 4: 1000mA, 5: 1200mA, 6: 1400mA, 7: 1600mA, 8: 1800mA, 9: 2000mA, 10: 2200mA, 11: 2400mA, 12: 2600mA, 13: 2800mA
dev.axp8xx_pmu.0.batcurrentcapacity: Battery Current Capacity
dev.axp8xx_pmu.0.batmaxcapacity: Battery Maximum Capacity
dev.axp8xx_pmu.0.batcapacitypercent: Battery Capacity Percentage
dev.axp8xx_pmu.0.batdischargecurrent: Average Battery Discharging Current
dev.axp8xx_pmu.0.batchargecurrent: Average Battery Charging Current
dev.axp8xx_pmu.0.batvolt: Battery Voltage
dev.axp8xx_pmu.0.batchargestate: Battery Charge State
dev.axp8xx_pmu.0.batcharging: Battery Charging
dev.axp8xx_pmu.0.bat: Battery Present
dev.axp8xx_pmu.0.vbus: VBUS Present
dev.axp8xx_pmu.0.acin: ACIN Present
dev.axp8xx_pmu.0.%parent: parent device
dev.axp8xx_pmu.0.%pnpinfo: device identification
dev.axp8xx_pmu.0.%location: device location relative to parent
dev.axp8xx_pmu.0.%driver: device driver name
dev.axp8xx_pmu.0.%desc: device description
dev.axp8xx_pmu.%parent: parent class

I wasn't aware of this.

-- 
B.Walter <bernd@bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200817090548.GA59918>