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.

TPS65982: Configuring the controller to sink 20v instead of 5V(current behaviour)

Part Number: TPS65982

Hi All, 

I have a custom embedded board where there are two USB type C ports and they both are showing the default 5v sink. However, I wanted to configure the USB controller and the PD controller to sink 20v instead.  From the Host Interface Technical Reference Manual and the USB PD Power Negotiations Application Report(SLVA842), my findings are as below-

  • The Power Delivery controller is responsible for configuring the sink/source voltage of the controller.
  • The PD controller provides I2C interface to the host through which the registers offered by the controller can be read/write. 
  • The PD controller uses power-data objects(PDOs) to format the data between the source and the sink during a power negotiation. 
  • The PDOs are arranged in a format which would then be transmitted to the Tx Sink Register(in our case)
  • The Tx Sink Register is written using I2C protocol provided by the PD controller.
  • The steps can be verified by the status register of the PD controller. 

The register address for TX Sink Register= 0x33(which I have to write the Data to)

However, the Unique Address Interface described in (slvuan1a) narrows down an I2C protocol in which a unique address is required and register number is required as well.  I am understanding that to write the Data to the Register 0x33, my Register Number is 0x33. But, I am not sure what is the unique address stated here? 

My Questions-

1. If my understanding described above is correct? 

2. What is the unique address? If its the slave address, then which documentation can help me find the default address. 

3. A more clarity on Unique address vs Register address will be helpful. 

Hoping to hear on this soon. 

~Thanks

Sid

  • Hi Siddharth,

    Answers to your queries are as follows:

    1. Yes, your understanding is correct. Just to add one more thing, you can directly program the Tx Sink Register using the configuration tool instead of over the I2C using an external controller.
    2. The default address of the controller depends on the resistance connected on the I2C_ADDR pin of the TPS65982.
    3. Uniques address is basically the I2C slave address offered by the PD controller and register address is the address of the register you're going to update.

    Thanks,

    Rahul 

  • Hi Rahul, 

    Can you tell me more about this configuration tool? Do you happen to have a tutorial or a start-up guide to it?

    Also, could you please quote the source of the I2C Address Setting snippet. 

    Best.

    Siddharth

  • Hi Siddharth,

    You can download the Configuration utility from "www.ti.com/.../tps6598x-config". It comes with a user guide which can be assessed in its Documents menu.

    The source of I2C Address Setting is the, TPS65982 datasheet available at www.ti.com/.../tps65982.pdf.

    You can check section 8.5.2.3 for more details.

    Thanks,
    Rahul

  • Hi Rahul, 

    I was reading the user guide of the configuration tool and it says that to use the configuration utility it requires Aardvark I2C/SPI Host Adapter. I am using a custom board which has a USB type-C port and I do not have Hose Adapter. Can you suggest me another way to configure the TPS65982 chip ?

    Best

    Siddharth. 

  • Hi Siddharth,

    Unfortunately, there's no other way apart from Aardvark if you want to directly program it from TI's configuration utility.

    However, you can save the generated bin file and use some other tool to dump the bin file to SPI flash.


    Thanks,
    Rahul

  • Hi Rahul

    Thanks for writing. Since I am trying to figure out a way around the Aardvark and trying to configure the USB type C over I2C. Here is my understanding below-

    1. To make any changes in the configuration of TPS65982 a firmware image has to be uploaded in the region1 and region2 of the SPI Flash.
    2. The .bin file could be generated from the configuration tool and then it has to be written to both of the regions? Right?


    Questions-
    1. Could you please valid my understandings and do you know of any tool to dump the bin file to SPI flash ?
    2. Can I access a single register over I2C or uploading the .bin file is the only way ?
    3. This question is regarding the I2c addressing screenshot you have shared. I tried to estimate the I2C address according to the datasheet. But, not sure if its the right one. The I2C ADDR pin is grounded. Could you please share an example of decoding the address ?

    Best
    Siddharth.
  • Hi Siddharth,

    Both the point you mentioned in the starting of your mail is correct.

    Answers to your questions are as follows:
    1. There're couple of two tools I know of: Aardvark and Dedi Prog
    2. You can access registers over I2C but, some of the registers are not supposed to be updated dynamically or they might cause unpredictable behaviour.
    3. If the I2C_ADDR pin is grounded then the addresses should be 0x38 for I2C1 and 0x20 for I2C2 assuing DEBUG_CTLx lines are grounded.

    Thanks,
    Rahul
  • Hi Rahul,

    The DebugCtl pins are connected to 10K pull up which is connected to the LDO_3V3 line.

    How will the i2c address will change now?

    If you can give me an example that would really be helpful. Or if you can verify my understanding for address decoding that would be helpful as well.

    E.g. the i2c address for port 1. If performing a Read the i2c address comes out to be 01110001.

    About the i2c port 2 where debug ctl2 and ctl1, I am not able to understand how are they being used.

    Best

    Siddharth.

  • Hi Siddharth,

    In the I2C2 address will be 0x38 same as I2C1 address as both the DebugCtl lines are pulled high. In the table given in above reply the Bit5 and Bit4 will depend on the logic state of DebugCtl pins, which could be either 1 or 0.

    I2C2 address will be as follows:

    DEBUG_CTL2 DEBUG_CTL1 I2C2 ADDRESS
    0 0 0x20
    0 1 0x28
    1 0 0x30
    1 1 0x38

    The example given by you has the I2C address of 0x30 which is 7 bit effective I2C address. the last one which you see in your example is the R/W bit which indicated of I2C master wants to read or write.

    Thanks,

    Rahul

  • Thanks, Rahul. I was including the read/write bit in the address and was getting confused. Thanks, this helps a lot.