MX23 Battery Charger Current Limit

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MX23 Battery Charger Current Limit

Jump to solution
7,079 Views
RobertSchwebel
Contributor IV

We are trying to get the charging unit on i.MX23 SoC to work. Principally it does its job.

The i.MX23 limits its current consumption to about 400 mA .. 500 mA from the 5V input, while the setting in the "CHARGE_4P2_ILIMIT=0x3ff" is 780 mA. The charging current for the LiPo battery "BATTCHRG_I=0x300" is set to 600 mA, but the battery does not draw this current (it only draws about 300 mA; this value is all right, because the battery is almost  full).

Problem is, when the system load increases (for example playing a movie with 100 % CPU load), not the overall SoC input current increases, the battery charge current decreases instead (without changing the register settings). Note: at this point of time the temperature monitor still reports sane SoC temperatures.


Is there a know limit for the input current? I did not find any hint in the "Chip Errata for the IMX23" document.

rsc+jbe

Labels (1)
Tags (1)
1 Solution
5,434 Views
arthur_lai
Senior Contributor II

Hi Robert,

Are you setting exactly 5V on the power supply? Can you check the actual voltage on the VDD5V pin (just checking the input capacitor should be fine)? There would be quite siginifcant drop on the power cable when the large and the voltage at the MX233 would be much lower then 5V.

In addition, the HEADROOM_ADJ field on HW_POWER_5VCTRL register should be 100b as suggested by the designer.

Thanks,

Arthur

View solution in original post

0 Kudos
Reply
30 Replies
1,470 Views
arthur_lai
Senior Contributor II

Hi Robert,

Are you using a power supply or connecting the board to a USB host when you are seeing a 500mA current on VDD5V?

In addition, can you dump to registers for the PMU to confirm the settings is what you expected?

Thanks,

Arthur

0 Kudos
Reply
1,470 Views
RobertSchwebel
Contributor IV

Hi Arthur,

We are using a power supply in that case; in fact, the MX23 does only have one pin for 5 V.

The original FSL power driver does directly call into the USB core in order to find out if there is an USB devices connected, without taking care of any abstraction or locking. For testing purposes, we currently fake this call to tell the power code to be always connected to a power supply and not to an USB device.

We have dumped the registers; even when setting both to 0x3ff (maximum value), the behaviour isn't different.

Another interesting observation: When we increase the system load, the charging current decreases, and also the current on the main supply decreases as well. This can be triggered by switching on some LEDs on our board. With each LED, the current decreases a bit (we expected that it would increase instead). When being idle, we see about 500 mA on the 5 V rail, and when being busy it drops down to 460 mA. We have no idea why it goes down.

rsc

0 Kudos
Reply
1,470 Views
michaelkoelbl
Contributor III

Hello Robert,

have you found a solution to distinguish between being connected to a charger or a PC (USB-Host)? I also must reduce charging current in case beeing not connected to a dedicated charger.

Regards,

Michael

0 Kudos
Reply
1,470 Views
arthur_lai
Senior Contributor II

Hi Robert,

Just want to confirm that you are using our BSP and is using DCDC with VDD4P2 as input, not using LDOs and the system supply.

And, how much is the charge current drop when you see the system current goes down to 460mA?

Thanks,

Arthur

0 Kudos
Reply
1,470 Views
RobertSchwebel
Contributor IV

Arthur,

We are using the mainline kernel, not the FSL BSP. In addition, we use the original FSL bootlets (unmodified) and the charging driver (ported to 3.11).

We in fact are using the DCDC converter (at least the bootlets output a corresponding message). But thans for the hint, we will check the bits again.

When the system current goes down, the charge current drops down to about 60 mA (depending on the state of the battery).

Robert

0 Kudos
Reply
1,470 Views
michaelkoelbl
Contributor III

Hello Robert,

we have a custom hardware (based on EVK) running with Freescale's 2.x kernel and now porting it to Mainline 3.x kernel. Its basically running but our battery isn't charged. We see no battery directory under /sys/class/power_supply/. Is battery charging already ported to 3.x kernel or do we need a patch? May be we don't have the right kernel configuration.

Thanks for any help.

Michael

0 Kudos
Reply
1,470 Views
mbergmann
Contributor II

Hi Michael,

as far as I know battery charging is not ported to 3.x kernel at the moment. You may check out Stefan Wahrens work on the mxs_power driver:

lategoodbye/linux-mxs-power · GitHub

Regards

Mike

0 Kudos
Reply
1,470 Views
Tarek
Senior Contributor I

I'm not expert in this area, but 500 mA is the current limits when charging from USB. "ie. connecting the device to a PC using USB".

Is there any configuration option to tell the device that this is not USB charging but an external charger?

0 Kudos
Reply
1,470 Views
RobertSchwebel
Contributor IV

Tarek,

It would indeed be interesting if there was a bit which needs to be set if we are on an external power supply and not on USB.

However, we didn't find such a bit yet, and the original FSL drivers do not contain it as well (so the current is also limited there).

rsc

0 Kudos
Reply
1,470 Views
RobertSchwebel
Contributor IV

Tarek,

In general this is true for USB, but according to the documentation, the MX23 should be able to draw up to 780 mA. The hardware in question has an USB port and a charger connector, and it is possible to detect if the 5 V comes from the USB port or from the charger. When running on the charger, we would like to charge as fast as possible, of course.

rsc

0 Kudos
Reply