This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3359 and TPS65910 shutdown and power up issues

Other Parts Discussed in Thread: TPS65910, AM3359, TPS65218

I am seeing some weird boot up problems as well as some late shutdown problems. The system is an Android system based off the AM335x starter kit design. It has an AM3359 processor and a TPS65910 PMIC.

Issues:

1. Intermittently, on late shutdown just around the time pm_power_off() is called the device will lock up and not shutdown. pm_power_off is setup write DEV_OFF to the PMIC. I have tried debugging this it seems that the I2C bus is not locked up nor is the system completely frozen. Some parts of the system still function, but the I2C bus is not accessible for some reason.

Once it is in this frozen state you can do a PWRON long press which will force a reboot and it recovers.

2. On rare occasions, the device cannot boot at all. It cannot get to u-boot or even u-boot SPL. The PMIC appears to be outputting MPU and Core voltage, but the processor does not seem to start.

Once it is in this state it will never boot up without disconnecting the battery.

- PWRON long press to the PMIC does not resolve the issue. The device will shutdown after holding for 15 seconds, but the next boot is still bad.

- Warm reset to the CPU also has no effect.

It seems to point to the PMIC. The PMIC seems to be in an invalid unrecoverable state. I was thinking at first hat maybe some registers in the PMIC were mis-programmed, and it would not boot after this. I verified on a working device the PMIC registers are not reset until battery power is removed. To figure this out we tried to access the I2C bus from another master while the device was in a bad state. It seems that when in these bad states the PMIC is not accessible from I2C, so it seems to be much worse than register mis-programming.

I assume there is a hardware problem. But not sure what to look for. Maybe there is a hardware problem with the PMIC? I check the errata and implemented the "DCDC o/p voltage" errata. This did not help.

Thanks for any help.

Addiitonal info:

Kernel 3.2.0

Android 4.2

  • Hi James,

    From your description everything points to some I2C issue. I suggest you investigate in this direction. We cannot help much on hardware without seeing the schematic.
  • Biser Gatchev-XID said:
    Hi James,

    From your description everything points to some I2C issue.

    But in the boot-up scenario, I2C is not necessary for the PMIC to boot the system. In that case the system is not even able to boot to u-boot SPL. This seems to point to an issue with the PMIC and not I2C. Do you agree with that? Or do you believe an I2C issue would not allow the PMIC to start booting the device? Seems like an I2C issue should not mess up the core functions of the PMIC. 

    I do not know exactly how the PMIC behaves. It is possible that a bad I2C transaction causes the PMIC to get stuck and even the core functions of the PMIC get broken. Its seems that this should not be the case, though. I would hope that if the device shutdowns mid I2C transaction that the PMIC would end the transaction and recover. If that is not the case then a PWRON long press could always have the potential to lock up a device into an unrecoverable state. This would be a design flaw in the PMIC when powered from battery.

  • James Maki said:

    1. Intermittently, on late shutdown just around the time pm_power_off() is called the device will lock up and not shutdown. pm_power_off is setup write DEV_OFF to the PMIC. I have tried debugging this it seems that the I2C bus is not locked up nor is the system completely frozen. Some parts of the system still function, but the I2C bus is not accessible for some reason.

    I'm using the same Kernel and Android and experience the same problem. The hardware is roughly based on the BBB, but we use the TPS65218, so there are at least some differences. I'm still not quite sure if rtc_power_off() is even reached. My last debug output is somewhere in the usb_disconnect / device_del part. It happens in about 1/100 shutdowns. Booting the system is fine. Have you made any progress regarding the shutdown problem?

  • CM_,

    Yes I have solved both of my issues.

    On the shutdown side there is an ugly i2c kernel design bug. Using an i2c PMIC inside the pm_power_off hook is not guaranteed to work since the bus can become deadlocked during shutdown. To work around you need to make sure the i2c bus is free at shutdown time.

    -James 

  • Thanks for your response, James.

    I've checked my pm_power_off hook but I don't use the I2C bus there. Since I use the TPS65218, the only thing that happens in this function is the setup of the ALARM2 register to pull down the PMIC_POWER_EN pin. This pin is connected to the PMIC PWR_EN and starts the power off sequence of the PMIC. I also tried to bypass the android shutdown by calling hardcore shutdown, but without success.
    Because I can't rule out software or hardware bugs in our own design/patches, I've made a comparison with the beaglebone:

    Stock BeagleBoneBlack, stock TI ANDROIDEVKIT-JB-AM335X, on about 30 shutdowns the BBB froze two times. I used "am start -a android.intent.action.ACTION_REQUEST_SHUTDOWN" to shut down the BBB because the default android sdk lacks of power button handling.