Ticket #2181 (closed defect: invalid)

Opened 10 years ago

Last modified 2 years ago

[andy-tracking] Not charging according to kernel when charging from a stupid charger

Reported by: TimoJyrinki Owned by: openmoko-kernel
Priority: normal Milestone:
Component: kernel Version:
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: no PatchReviewResult:


As a regression from stable-tracking/stable etc., the kernel says Neo is not charging when charging from a stupid charger like a portable USB battery or a car charger. Ie. /sys/class/power_supply/battery/status (and uevent) say Not Charging. However, on IRC another user stated he can measure that in reality it charges fine (and even more so if forcing the usb current limit, as usual). So somehow kernel isn't picking this up.

If charging from laptop it shows fine.

Using andy-tracking de473ca893c9285a on top of daily testing. The actual USB charger I'm using is from Proporta.com.


dmesg.txt (15.3 KB) - added by TimoJyrinki 10 years ago.
dump_regs (784 bytes) - added by TimoJyrinki 10 years ago.
dump-decoded (21.0 KB) - added by werner 10 years ago.
Decoded dump (svn.openmoko.org/developers/werner/greg/ds.pl)

Change History

comment:1 Changed 10 years ago by lindi

The other user was me. Please let me know if there is something else I could test. (Is there a way to subscribe to a trac ticket without having to actually add a comment?)

comment:2 Changed 10 years ago by andy

What is the limit shown in

cat /sys/class/i2c-adapter/i2c-0/0-0073/pcf50633-mbc/usb_curlim

when you have the dumb charger... I guess it should be 100mA and then it's right that there is not enough current to power the device (which gets first dibs on the incoming power) and have some left for charging, at least not if backlight is up.

comment:3 Changed 10 years ago by TimoJyrinki

Like I (unclearly) stated, it's 100mA but changes to 500mA if I force it. Usually at this point the charging icon shows up and the kernel tells it's charging, but currently it does not. the usb_curlim does change to 500, but there is no indication that the charging would be happening.

comment:4 Changed 10 years ago by andy

OK so if I understood it the issue boils down to the UI indications (I guess it means charger change events) are not impacted by using the curlim forcing sysfs?

comment:5 Changed 10 years ago by TimoJyrinki

Yes. "UI indication" includes the /sys/class/power_supply/battery/status, which used to state "Charging" earlier (when echo 500 > force_usb_limit_dangerous was made), but with the current andy-tracking it says "Not charging" even though apparently it is.

So functionality-wise everything should be ok, but it's not getting indicated via kernel.

comment:6 Changed 10 years ago by lindi

Just for the record I can no longer reproduce this with andy-tracking b8b36e5e. Here's what I did:

0) capacity is 98%
1) status is "Discharging"
2) connect dumb usb battery
3) status is "Not charging"
4) force 500mA
5) status is "Charging"
6) pretty soon capacity rises to 99%

Timo, can you retry with these exact steps? Maybe when 500mA is not forced the 100mA is consumed by the processor and nothing is left for charging the battery?

comment:7 Changed 10 years ago by TimoJyrinki

Hmm, does not look too good here. I do now get "Charging" as soon as I plug the dumb charger in. Yes, even at 100mA. But even if I change to 500mA with the force_usb_dangerous option, it seems the capacity is only dropping. I left it charging for an hour but it does seem to really be pulling current even though the kernel indicates so.

Using andy-tracking 0f58c86e19a. Changing to non-dumb charger (ie. a laptop) works and charges.

comment:8 Changed 10 years ago by werner

Could you please do a
# cat /sys/class/i2c-adapter/i2c-0/0-0073/dump_regs
when the system is supposedly charging from a "dumb" charger at
500mA, yet the capacity is dropping ? That would help to determine
what exactly the PMU thinks it's doing at that time.

  • Werner

comment:9 Changed 10 years ago by andy

Timo also the dmesg might be useful, it'll show PMU interrupt events. There was a patch some weeks ago aimed at solving exactly this. What kind of battery is in there, the shipping GTA02 one?

Changed 10 years ago by TimoJyrinki

Changed 10 years ago by TimoJyrinki

comment:10 Changed 10 years ago by TimoJyrinki

There you go, taken a short while after attaching the dump charger + echo 500 > force_usb_dangerous and seeing that the capacity still drops. The shipping GTA02 battery (from July, ie. first shipments).

comment:11 Changed 10 years ago by werner

Thanks ! There seems to be a problem with the cut-off current:

48 MBCC6 = 0x00 -- MBC charger control 6

cutoffcur -- cutoff current level (full in CV), 1/32*Ichg

0.0000 (0x00)

4d MBCS3 = 0x50 -- MBC charger status 3

ilim -- battery charge current > cutoffcur level

1 (0x1)

I'll attach the full decoded register dump.

  • Werner

Changed 10 years ago by werner

Decoded dump (svn.openmoko.org/developers/werner/greg/ds.pl)

comment:12 Changed 10 years ago by werner

Oops no. The cutoff current is fine but usbok isn't.
Could it be that the "dumb" charger delivers considerably less than 5V ?

  • Werner

comment:13 Changed 10 years ago by andy

I can see the USB insertion at +12370s in the dmesg log, there is no USB removal subsequently. And in the register dump, I can see the MBC recognizes that USB power is present, but is says that USB power is not "OK". OK would have meant that USB power is >50mV above the current battery level.

So it does seem something is wrong with your charger, it sends out something less than ~4.3V when it should be a great source of 5.0VDC.

comment:14 Changed 10 years ago by andy

  • Status changed from new to closed
  • Resolution set to invalid

Closing this as invalid, if you charger is actually definitely putting out 5V then will reopen.

comment:15 Changed 2 years ago by JustDox

Does Viagra Super Active Work <a href=http://cial5mg.xyz/where-to-order-cialis.php>Where To Order Cialis</a> Kjop Priligy Compra Viagra En Espana <a href=http://xenical.ccrpdc.com/buy-cheap-generic-xenical.php>Buy Cheap Generic Xenical</a> Real Viagra Pills Canadian Pharmacy Online Cialis <a href=http://kama1.xyz/buy-kamagra-usa.php>Buy Kamagra Usa</a> Amoxicillin Liquid Cancer Amoxicillin Genital Tract <a href=http://zol1.xyz/buy-generic-zoloft.php>Buy Generic Zoloft</a> My Canadian Pharmacy Meds Achat Cialis Lilly <a href=http://zol1.xyz/zoloft-order.php>Zoloft Order</a> Viagra Gratis A Los Parados Buy Synthroid From Mexico <a href=http://kama1.xyz/where-can-i-buy-kamagra.php>Where Can I Buy Kamagra</a> Amoxil Dosing Chart Mg Kg Viagra A Los 20 Anos <a href=http://kama1.xyz/cheap-kamagra-usa.php>Cheap Kamagra Usa</a> Achat Propecia Canada Dove Comprare Cialis Online Forum <a href=http://cial1.xyz/cialis-on-line.php>Cialis On Line</a> Viagra From Europe Precio Cialis Farmacia Espana <a href=http://kama1.xyz/kamagra-buy-online.php>Kamagra Buy Online</a> Achete Du Cialis En France Livraisons Rapide Overnight Delivery Valtrex <a href=http://cial5mg.xyz/cialis-online-buy.php>Cialis Online Buy</a> Topamax Safe Medications Online <a href=http://cial5mg.xyz/cialis-to-buy.php>Cialis To Buy</a> Cheap Progesterone For Sale Mastercard Clomid Prescription Overnight <a href=http://cial5mg.xyz/online-cialis.php>Online Cialis</a> Discount Programs For Accutane Ciprodex Discount <a href=http://viag1.xyz/low-price-viagra.php>Low Price Viagra</a> Stendra Erectile Dysfunction Purchase Generic Bentyl Dicyclomine Muscle Spasms Medication Tablet <a href=http://kama1.xyz/prices-kamagra.php>Prices Kamagra</a> Comprar Sildenafil Soft 100mg Achat Viagra Generique En Ligne En Limoges <a href=http://cial5mg.xyz/cialis-cheap.php>Cialis Cheap</a> Propecia Cost Months Is Amoxillin In Penicillin Family <a href=http://zol1.xyz/zoloft-generic-name.php>Zoloft Generic Name</a> Cialis Pharmacie Andorre Keflex Without A Prescription <a href=http://zol1.xyz/brand-zoloft-online.php>Brand Zoloft Online</a> Levitra Soft Tabs Online How Long Does It Take For Zithromax To Work <a href=http://cial5mg.xyz/fast-delivery-cialis.php>Fast Delivery Cialis</a> Prospecto Finasteride Propecia Viagra Et Angor <a href=http://cial1.xyz/buy-cheap-cialis-on-line.php>Buy Cheap Cialis On Line</a> Comprare Viagra Sicuro On Line Propecia Tasmania <a href=http://cial5mg.xyz/generic-cialis-pricing.php>Generic Cialis Pricing</a> Maximum Dose Of Amoxicillin Per Day Viagra Belgique Prescription <a href=http://viag1.xyz/fast-shipping-viagra.php>Fast Shipping Viagra</a> Keflex Amoxicillin 500 Mg Generic <a href=http://viag1.xyz/sildenafil.php>Sildenafil</a> Fedex Isotretinoin Tablet Cheap Genereic Viagara <a href=http://viagra.ccrpdc.com/viagra-online-stores.php>Viagra Online Stores</a> Buygenericlevitraonlineusa Viagra Preiswert Bestellen <a href=http://zol1.xyz/implicane-online.php>Implicane Online</a> Kamagra Oral Jelly Cost Acticin In Internet Without Dr Approval <a href=http://strattera.ccrpdc.com/order-strattera-in-usa.php>Order Strattera In Usa</a> Medication Zithromax Amoxil For Ear Infections <a href=http://cial5mg.xyz/buy-cheap-cialis-on-line.php>Buy Cheap Cialis On Line</a> Amoxicillin For Cats No Prescription Does Propecia Regrow Hair <a href=http://viag1.xyz/buy-viagra-online.php>Buy Viagra Online</a> Buy Effexor Online No Prescription Domperidone Illegal <a href=http://kama1.xyz/buy-kamagra-online.php>Buy Kamagra Online</a> Cialis Generika Bewertung Next Day Pills Com Viagra Online Canada <a href=http://cial1.xyz>Buy Cialis</a> Commander Levitra Viagra Cialis Wirkung <a href=http://viag1.xyz/buy-cheap-viagra-200mg.php>Buy Cheap Viagra 200mg</a> List Legitimate Online Pharmacies Medical Information <a href=http://cial1.xyz/buy-generic-cialis-online.php>Buy Generic Cialis Online</a> Comprare Cialis Germania Venta De Cialis En Internet <a href=http://kama1.xyz/buy-kamagra-usa.php>Buy Kamagra Usa</a> Herbal Viagra Retailers Levitra Commander <a href=http://viag1.xyz/cost-of-viagra.php>Cost Of Viagra</a> Priligy Dapoxetina Commenti Amoxicillin Information <a href=http://cial5mg.xyz/map.php>Shop Cialis Online</a> Avis Cialis Viagra Cytotec Diu Pharmacie En Ligne <a href=http://viag1.xyz/viagra-sample.php>Viagra Sample</a> Formula De Kamagra Cheap Ciali Pills <a href=http://cytotec.ccrpdc.com/cheapest-cytotec.php>Cheapest Cytotec</a> Online Pharmacies In India Cialis Dosierung <a href=http://antabuse.ccrpdc.com/map.php>Disulfiram</a> Pills Liberty Gabapentin Keflex Doseage Strep Throat <a href=http://cial5mg.xyz/mail-order-cialis.php>Mail Order Cialis</a> Cialis Economico Cialis Tratamiento Prolongado <a href=http://priligy.ccrpdc.com/pastilla-priligy.php>Pastilla Priligy</a> Kamagra Oral Order Prednisone Online From Canada <a href=http://cial1.xyz/cialis-5mg.php>Cialis 5mg</a> Generique Nolvadex Clomid Moins D Ovulation <a href=http://viag1.xyz/sildenafil-generic.php>Sildenafil Generic</a> Dapoxetina Shopping Cialis Levitra Sales Viagra <a href=http://cial5mg.xyz/cialis-generic.php>Cialis Generic</a> Buy Real Viagra Online Cephalexin Capsule 250 <a href=http://viag1.xyz/brand-viagra-online.php>Brand Viagra Online</a> Amoxicillin No Rx Trusted Online Pharmacy Cialis <a href=http://viag1.xyz/cheap-cheap-viagra.php>Cheap Cheap Viagra</a> Healthy Man Generic Viagra Suppliers Drug Interaction Between Keflex And Osmotics <a href=http://zol1.xyz/buy-cheap-zoloft-pills.php>Buy Cheap Zoloft Pills</a> Rash From Amoxicillin isotretinoin 20mg <a href=http://zol1.xyz/shop-zoloft-online.php>Shop Zoloft Online</a> Cialis Acquisto In Italia Pharmacy Stores In Canada <a href=http://cytotec.ccrpdc.com/best-cytotec-online.php>Best Cytotec Online</a> Compra Cialis Barcelona Cephalexin Adverse Reactions <a href=http://viag1.xyz/best-generic-viagra.php>Best Generic Viagra</a> Daily Cialis Professional

Note: See TracTickets for help on using tickets.