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.

TUSB8020B-Q1: Programming of the HUB via SMBus

Part Number: TUSB8020B-Q1

Hi TI Team,

Our Customer is using the TUSB8020B-Q1 HUB in the custom design. It has one non-removable device connected to the downstream port 1 and one type A (removable device) port on downstream port 2. It is  currently connected via SMBus for configuring the HUB.  How do we configure this HUB via SMBus ? Can it be done from linux or it has to be done by a boot loader ? Is there any reference other than the H/W datasheet for software side programming ? 

Thanks,

John

  • Hi John,

    If the hub is in SMBUS mode, it can only be programmed by a SMBUS host (I2C host) connected to the hub.

    If the hub is in I2C EEPROM mode, it can be programmed by an attached EEPROM.

    It is not required for the hub to be programmed for normal operation, set SMBUSz = 1 and do not connect an EEPROM.

    Please be aware that the hub registers can be configured after a reset, but the hub cannot be reconfigured during normal operation.

    Regards,

    JMMN

  • Hi JMMN,

    Thanks for your prompt response , Our case the SMBus is set SMBUSz  = 0,  so it requires programming of the i2c host so how can we achieve this ? 

    I was able to get a dump of the register via the i2cdump. But unsure what all bits to touch in order to achieve functionality on the downstream ports. Given the assumption that the driver support is generic how do we program this SMBus ? 

    Attaching the i2cdump here for reference

    root@imx8qmmek:~# i2cdump -y 3 0x44
    No size specified (using byte-data access)
           0   1   2   3   4   5   6   7   8   9   a   b   c   d    e   f    0123456789abcdef
    00: 00 51 04 25 80 10 02 03 03 00 20 00 00 00 00 00   .Q?%?????. .....
    10: 02 00 9c 5c 00 20 0c 22 af 17 a6 12 27 2d 03 00     ?.?\. ?"????'-?.
    20: 09 04 18 00 00 06 06 06 00 00 00 00 00 00 00 00.  ???..???........
    30: 34 00 35 00 30 00 38 00 30 00 30 00 38 00 31 00   4.5.0.8.0.0.8.1.
    40: 42 00 42 00 31 00 32 00 00 00 00 00 00 00 00 00   B.B.1.2.........
    50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
    60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
    70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
    80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
    90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
    a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00.  ................
    b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
    c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
    d0: 1e 1e 1e 00 00 00 00 00 18 18 18 00 00 00 00 00  ???.....???.....
    e0: 04 04 04 00 00 00 00 00 77 77 77 00 00 00 00 00  ???.....www.....
    f0: 00 00 00 00 80 a0 00 00 01 00 00 00 00 00 00 00   ....??..?.......

  • Hi John,

    You will want to modify register 07h to set the non-removable port.  I also recommend that customers set DSPORTEcrEn in register 0Ah to prevent unexpected entry to USB 3.x compliance mode on the downstream ports.  After modifying the registers, setting the cfgactive bit in register F8h will allow the hub to connect to the host.

    This document although written for TUSB804x explains what many of the different register / bits are used for:

    https://www.ti.com/lit/ug/sllu311/sllu311.pdf

    Regards,

    JMMN

  • Hi JMMN,

    We were able to enable the downstream ports by setting 2 registers and clearing the cfgActive bit as well. 

    1. 7h set to 0x01 to describe the downstream port status in the Device Configuration Register  whether port 1/2 are removable or not.

    2. Ah set to 0x24 to describe compliance for 3.X as recommended

    3. Clear F8h to 0 by writing 0x01 to enable the port connect to host.

    Please find the log as below for confirmation 

    root@imx8qmmek:~# i2cset -y 3 0x44 0x07 0x01
    root@imx8qmmek:~# i2cset -y 3 0x44 0xa 0x24
    root@imx8qmmek:~# i2cset -y 3 0x44 0xf8 0x01
    root@imx8qmmek:~# [ 139.157792] usb 1-1: new high-speed USB device number 2 using cdns-usb3
    [ 139.183536] hub 1-1:1.0: USB hub found
    [ 139.187464] hub 1-1:1.0: 2 ports detected
    [ 139.309862] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using cdns-usb3
    [ 139.335218] hub 2-1:1.0: USB hub found
    [ 139.339097] hub 2-1:1.0: 2 ports detected
    [ 139.765870] usb 2-1.2: new SuperSpeed Gen 1 USB device number 3 using cdns-usb3
    [ 139.792092] usb-storage 2-1.2:1.0: USB Mass Storage device detected
    [ 139.799153] scsi host0: usb-storage 2-1.2:1.0
    [ 140.822788] scsi 0:0:0:0: Direct-Access SanDisk Ultra 1.00 PQ: 0 ANSI: 6
    [ 140.831882] sd 0:0:0:0: [sda] 120127488 512-byte logical blocks: (61.5 GB/57.3 GiB)
    [ 140.840448] sd 0:0:0:0: [sda] Write Protect is off
    [ 140.845664] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
    [ 140.891263] sda: sda1
    [ 140.896460] sd 0:0:0:0: [sda] Attached SCSI removable disk

    Next step is to figure out how to do this operation at every power cycle. Do you have any recommendations ? Eg : A init script to execute these or a I2C-SMBus host driver to configure the hub when invoked in the kernel.

  • Hi John,

    Yes, it looks like the hub is enumerating correctly.  I don't have any recommendations on how to load the registers at each power cycle, most user cases either use an on-board SMBUS host or a pre-programmed EEPROM.

    Regards,

    JMMN

  • Hi JMMN,

    Moving over to linux . HUB issue is resolved. Many thanks.