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.
Hello,
I am using TDA4 EVM. In the CP part of the EVM, a TCA6424A GPIO expander is used to control 2 USER LEDs (P26 & P27). Below screenshot is from the Schematics of the CP. As per the given infomration:
If the i2cset/i2cget has to be used to control these LEDs, the below commands are formed:
i2cset -f -y 0 0x21 <Command> <Data>
i2cget -f -y 0 0x21 <Command>
But from the datasheet of TCA6424A, it specifies Slave address as a field in the Write or Read sequence as shown below:
Where to include this Slave address in the i2cset/i2cget commands? Could you please give a sample command to control one GPIO pin using TCA6424A?
Thanks & Regards,
Gurudath
Hello,
You are right that communication to TCA6424A should be initialized by sending its address (either 0x22 or 0x23 depending on ADDR pin state) during the first byte transfer. I'm not totally sure how this needs to be included in the i2cset/i2cget commands, though. I will flag this post for someone from our TDA4 team to review, since they should be more familiar with the operation of that EVM.
Regards,
Max
Hi Gurudath,
I just responded to your other thread. The i2c numbering for main i2c is different and the i2c address was wrong as well.
https://e2e.ti.com/support/processors/f/791/p/883721/3272808#3272808
Regards,
Vishal
Hello Max,
It is ok for me to write a C function or similar. Please guide me further.
Thanks & Regards,
Gurudath
Hi Gurudath,
Linux Kernel already has support for this GPIO exapnder. (drivers/gpio/gpio-pca953x.c)
Also you can look at other drivers that use pins from this GPIO exapnder in EVM dts file (k3-j721e-common-proc-board.dts)
Regards,
Vishal