Hi Dave, On Sat, 20 September 2014 Dave McLaughlin <[email protected]> wrote: > The battery voltages I assume are set internally to the AXP209 as I don't > see any way to set these. I did find a listing for these.
On AXP209 you can just set the target charge voltage for the battery. What charging voltage is applied depends on the charge current. > Yes, this is the Android Linux 3.4 kernel. > > When I get the likes of 18% showing on the Android status bar and check the > actual voltage of the battery it reads much higher than what I expect to > get with the DC power applied at power up. The LI-ION batteries should have a voltage ranging between 3.3V (nearly empty) and 4.2V (full). The battery voltage should not be influenced by the presence of DC power (except for charging versus discharging or unused). But see below. The system power voltage can be different from all input voltages as the AXP does voltage conversion. > I checked dmesg and I saw that the prev reading was 78% and then this was > updated to 32% when a voltage change notification was received. I need to > track down where this lower value is coming from. Does it happen for each suspend oder just sporadically? If sporadically it might be a race condition where some AXP data got read before suspend, the rest after resume - ending up with incoherent data and maybe some 16bit words read half before suspend and half after resume. Just a wild guess without looking at the code. > I think I will leave the system ON to drain the battery and I will record > the battery voltage as it does so and see how this compares. > > If indeed the percentage value should be as per the pmu_bat_paraXX setting, > it still doesn't explain why powering up on battery gives such a low ready > than when on DC power. How fresh is your battery? The value of pmu_battery_rdc (represents battery internal resistance) might also influence the behavior. Current draw on the battery may very well influence the readings. If the (in-rush) drawn current is high battery may not have 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:35 UTC+7, Bruno Prémont wrote: > > > > What are the battery voltage readings for all those battery charge % > > cases? > > > > From your reporting with FEX I assume you are using 3.4 kernel or > > Android/Allwinner kernel (which one?). > > > > As far as I understood the whole battery charge monitoring the % is > > provided > > by AXP chip itself an based on the pmu_bat_paraXX settings. > > > > The remaining capacity though is calculated by the power_supply driver. > > > > Bruno > > > > > [pmu_para] > > > pmu_used = 1 > > > pmu_twi_addr = 52 > > > pmu_twi_id = 0 > > > pmu_irq_id = 32 > > > pmu_battery_rdc = 60 > > > pmu_battery_cap = 6600 > > > pmu_init_chgcur = 300 > > > pmu_earlysuspend_chgcur = 600 > > > pmu_suspend_chgcur = 1000 > > > pmu_resume_chgcur = 300 > > > pmu_shutdown_chgcur = 1000 > > > pmu_init_chgvol = 4200 > > > pmu_init_chgend_rate = 15 > > > pmu_init_chg_enabled = 1 > > > pmu_init_adc_freq = 100 > > > pmu_init_adc_freqc = 100 > > > pmu_init_chg_pretime = 50 > > > pmu_init_chg_csttime = 720 > > > pmu_bat_para1 = 0 > > > pmu_bat_para2 = 0 > > > pmu_bat_para3 = 0 > > > pmu_bat_para4 = 0 > > > pmu_bat_para5 = 5 > > > pmu_bat_para6 = 11 > > > pmu_bat_para7 = 13 > > > pmu_bat_para8 = 15 > > > pmu_bat_para9 = 19 > > > pmu_bat_para10 = 32 > > > pmu_bat_para11 = 50 > > > pmu_bat_para12 = 58 > > > pmu_bat_para13 = 71 > > > pmu_bat_para14 = 81 > > > pmu_bat_para15 = 89 > > > pmu_bat_para16 = 100 > > > pmu_usbvol_limit = 1 > > > pmu_usbcur_limit = 0 > > > pmu_usbvol = 4000 > > > pmu_usbcur = 0 > > > pmu_usbvol_pc = 4400 > > > pmu_usbcur_pc = 0 > > > pmu_pwroff_vol = 3300 > > > pmu_pwron_vol = 2900 > > > pmu_pekoff_time = 6000 > > > pmu_pekoff_en = 1 > > > pmu_peklong_time = 1500 > > > pmu_pekon_time = 1000 > > > pmu_pwrok_time = 64 > > > pmu_pwrnoe_time = 2000 > > > pmu_intotp_en = 1 > > > pmu_used2 = 0 > > > pmu_adpdet = port:PH02<0><default><default><default> > > > pmu_init_chgcur2 = 400 > > > pmu_earlysuspend_chgcur2 = 600 > > > pmu_suspend_chgcur2 = 1200 > > > pmu_resume_chgcur2 = 400 > > > pmu_shutdown_chgcur2 = 1200 > > > pmu_suspendpwroff_vol = 3300 > > > pmu_batdeten = 1 > > > > > > > > > -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
