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.

Linux: uboot driver for TCA9539 and TCA9546

Other Parts Discussed in Thread: TCA9539, PCF8575

Tool/software: Linux

Hello,

I am trying to bring up TCA9546(switch) and TCA9539(I2C expander) in uboot, so that i can bring up some peripherals connected via I2C switch(TCA9546)-->I2C expander(TCA9539). where can i get sample uboot drivers for both TCA9539 tand TCA9546 . Currently I am using psdk 3.04.

Thanks,

Arun

  • Former Member
    0 Former Member
    Hi,
    Please refer this and let me know if it helps? You need to port these driver to u-boot.
    www.ti.com/.../slvc564

    Regards,
    Somnath
  • Former Member
    0 Former Member in reply to Former Member
    Hi,
    Can you please get back on this issue and let us know if you need any further help?

    Regards,
    Somnath
  • Hi Somnath,

    I have added driver for both TCA9546 and TCA9539 in u-boot and dts entries as well.
    currently, the I2C switch(TCA9546) is showing on proper bus but I2C expander(TCA9539) is showing on bus -1.

    u-boot logs,
    => i2c bus
    Bus 0: i2c@48070000 (active 0)
    58: tps659038@58, offset len 1, flags 0
    20: gpio@20, offset len 1, flags 0
    21: gpio@21, offset len 0, flags 0
    70: i2cswitch@70, offset len 1, flags 0

    Bus -1: i2c@1
    74: tca9539@74, offset len 1, flags 0

    Can you help me on this?

    Thanks,
    Arun
  • Former Member
    0 Former Member in reply to Arun Dasari
    Hi,
    Can you send the changes in dts file, after you added support for TCA9539 and TCA9546?

    Regards,
    Somnath
  • dts entry for switch and expander,

    i2cswitch@70 {
    compatible = "ti,tca9546";
    #address-cells = <1>;
    #size-cells = <0>;
    reg = <0x70>;

    i2c@1 {
    #address-cells = <1>;
    #size-cells = <0>;
    reg = <1>;

    tca9539@74 {
    compatible = "ti,tca9539";
    reg = <0x74>;
    gpio-controller;
    #gpio-cells = <2>;
    };
    };
    };

    Please let me know if anything wrong in dts entries



    Thanks,
    Arun

  • Former Member
    0 Former Member in reply to Arun Dasari
    Hi,
    Please refer the file "arch/arm/dts/dra7-evm.dts".
    You will see the example of how devices connected to i2c1 bus.

    &i2c1 {
    status = "okay";
    clock-frequency = <400000>;

    tps659038: tps659038@58 {
    compatible = "ti, tps659038";
    reg = <0x58>;
    .......
    .......
    }

    pcf_lcd: gpio@20 {
    compatible = "nxp,pcf8575";
    reg = <0x20>;
    .......
    .......
    }
    }

    You will need to add your devices here, if you haven't already done that.
    Let em know if you need any other help.

    Regards,
    Somnath
  • Former Member
    0 Former Member in reply to Former Member
    Hi,
    We haven't heard back from you, I'm assuming you were able to resolve your issue.
    If not, just post a reply below (or create a new thread if the thread has locked due to time-out).

    Regards,
    Somnath
  • Former Member
    0 Former Member in reply to Former Member
    Hi,
    We haven't heard back from you, I'm assuming you were able to resolve your issue.
    If not, just post a reply below (or create a new thread if the thread has locked due to time-out).

    Regards,
    Somnath
  • Hi Somnath,

    Issue is resolved. Thanks for the support.

    Thanks,
    Arun