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.

TPS6594-Q1: TPS6594-Q1 Device Revision ID

Part Number: TPS6594-Q1

Tool/software:

I have a query regarding the TI PMIC TPS6594 driver code which I got from this github repo. https://github.com/TexasInstruments/ti-pmic-lld

We have this PMIC_TPS6594X_DEV_REV_ID_PG_2_0 macro which is the macro for device revision ID. This is present in the current driver implementation inside pmic_core_tps6594x.h header file. In this file, the revision ID mentioned is 0x41.



However, for part number TPS6594Q1 the revision id is 0x82 as identified from the slvuci2.pdf file.


Is a driver code available for this hardware with revision id 0x82? I have attached the reference documents below.

slvuci2 1.pdftps6594-q1.pdf

  • Hello Team,
    Can you please provide a response asap since this could be a blocker for delivering a major milestone for us. 

  • Hi Akhil,

    Let me assign this to driver code expert to help you.

    Br, Jari

  • Hi Akhil,

    Thank you for your patience as we try to find the solution to your query.

    The driver that you obtained from the GitHub repository should be applicable to all TPS6594x PMIC devices because the register map (i.e., register addresses and bit fields) is the same across all TPS6594x PMICs. 

    However, since there is a difference in the revision ID value between the driver and the slvuci2.pdf file, there could be a warning status code returned by the Pmic_init() API, and the PMIC handle will not be initialized correctly.

    Do you encounter any error return codes or issues when running your application code? More specifically, do you encounter the PMIC_ST_WARN_INV_DEVICE_ID error when calling the Pmic_init() API? If so, we can update the driver so that it can support your device revision ID.

    Best regards,
    John Bui

  • Hello John Bui,

    Thank you for the information! It is exactly as you have described above. My Pmic_Init() did fail and returned PMIC_ST_WARN_INV_DEVICE_ID (-35). On further debugging, I found out that there is an issue with the Device Revision ID. Hence, I raised this query. It would mean a lot to us if you can update the driver files. Once again thanking you for your quick response.

    Regards,
    Akhil M

  • Hi Akhil, 

    I have made changes to the driver. These updates will be pushed to GitHub soon once they have gone through internal review. 

    Best regards,

    John Bui

  • Hello John,

    I hope you are having a good day. Thank you for the update. Please do let me know when the changes are pushed to Github.

    Thanks and regards,
    Akhil M

  • Hi Akhil, 

    I appreciate your response. To help us to get a better understanding of the issue you are facing, I had a couple inquiries to ask. Would it be possible for you to share the Logic capture/waveform of the communication between your MCU and PMIC? I want to make sure that the reads/writes are as expected and that there isn't any corrupted data. 

    Additionally, could you share what the value of pmicDevRev (struct member of the PMIC handle) is after you have called the Pmic_init() API?

    When calling Pmic_init(), the device revision ID is obtained in the below helper function and compared against expected value (PMIC_TPS6594X_DEV_REV_ID_PG_2_0 for the TPS6594x PMIC). 

    if pmicDevRev does not equal PMIC_TPS6594X_DEV_REV_ID_PG_2_0, I would like to know what its actual value is. 

    Thank you for your time,

    John Bui

  • Hi Akhil,

    While I await your response, I have released an experimental version of the TPS6594x driver. 

    TexasInstruments/ti-pmic-lld at device/leo-hera-experimental

    This version does not validate that the target PMIC is on the bus, and therefore does not check the device revision ID. 

    Please note that this is a temporary solution to your issue; I believe there is an underlying cause as to why you are receiving the PMIC_ST_WARN_INV_DEVICE_ID error.

    If you encounter any problems or issues with this experimental version, please let me know in addition to sending waveform captures and the value of pmicDevRev. 

    Thank you for your time,

    John Bui

  • Hello John,

    I apologize for the delayed response; I was on vacation. We have no means to share the Logic capture/waveform of the communication between the MCU and PMIC as of today, but I believe that it can be shared at a later time. Thank you for sharing the code. I will test with the above temporary implementation and share the results soon.
    Thank you and Have a Merry Christmas and a wonderful year ahead!

    With Regards,
    Akhil

  • Hello John,

    The value of the pmicDevRev with the temporary fix is 0x41.

  • Hi Akhil,

    Thanks for confirming the pmicDevRev value.

    My Pmic_Init() did fail and returned PMIC_ST_WARN_INV_DEVICE_ID (-35). On further debugging, I found out that there is an issue with the Device Revision ID.

    I searched all occurrences of PMIC_ST_WARN_INV_DEVICE_ID within the driver; it is only used two times within the driver source code - both of which in pmic_core.c.

    From the code seen above, PMIC_ST_WARN_INV_DEVICE_ID is returned when PMIC device type is LP8764x and the PMIC device revision is not equal to 0x43 (as shown in the screenshot below). 

    Additionally, the PMIC_ST_WARN_INV_DEVICE_ID error is returned When the PMIC device type is TPS6594x and the PMIC device revision is not equal to 0x41 (as shown in the screenshot below).

    The value of the pmicDevRev with the temporary fix is 0x41.

    Given that your PMIC device type is TPS6594, and you obtained a value of 0x41 for pmicDevRev (and the driver expects a value of 0x41), the PMIC_ST_WARN_INV_DEVICE_ID error shouldn't have been returned.

    Could you try seeing what the value of pmicDevRev is when using the original driver that you linked in your first thread post? 

    Merry Christmas and happy new year,

    John Bui

  • Hello John,

    Sorry for the delayed response I was engaged in testing and milestone activities for this driver. Unfortunantely, it was a small misunderstanding from my end. The original pmic_core.c file works as expected. I misunderstood getting 0x41 as the revision ID. In the driver code , a right shift is being done to the 0x82 which will result in 0x41.

    Apologies for the confusion and thank you very much for your valuable time and support.

    We can close this issue and in short the original PMIC driver works fine as is.