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.

[FAQ] SK-AM62: Steps to enable Expansion Header I2C and power

Part Number: SK-AM62

Hello,

I'm using the E3 SK-AM62 which has an I2C switch between the I2C-2 pins on the Expansion header and also uses a load switch on to enable 3.3V on the expansion header.

I've been having a hard time getting the load switch enabled and talking to this I2C switch. I'm currently on the 08.03.00.19 SDK.

Load switch:

This is on the IO expander on I2C-1 at address 0x22. There is a driver that has already claimed the device here, but it only has one chip GPIO (gpiochip289) associated with it, and I can't really figure out what this is connected to. In either case, the IO expander does not seem to have any of the IO that's described in the users guide actually enabled or configured. How do you actually turn on the load switches on the EVM to enable 3.3V out on the expansion header?

I2C Switch

There is a new I2C switch on I2C-2 to switch between the CSI connector and the user expansion connector. The schematic describes this at I2C address 0x71 but nothing is there, I cannot get i2cdetect to find any device there and it doesn't seem to be timing out which would indicate a bus issue/ driver contention. Any ideas on why I can't talk to this switch at all?

Will there be a how to guide that explains this better in the future?

Munan

  • Hello Munan

    Thank you for the query.

    Let me check internally and update you.

    Could you please help me understand the use case to assign the thread to the right expert.

    Regards,

    Sreenivasa

  • Hi Shreenivasa,

    The use case is that I'm trying to connect some external I2C RTC peripherals using the User Expansion Header on the I2C-2 bus.

    Munan

  • Hello Munan

    Thank you for the input.

    Let me check internally and assign to the expert.

    Please expect a delay as i assign the thread to the expert.

    Regards,

    Sreenivasa

  • Hi Munan,

    As shown in the schematics, the Expansion header 3v3 and 5v5 are controlled by the GPIO pins of the IO Expander (I2C1 Address 0x22),  EXP_PS_3V3_EN is P05 and EXP_PS_5V0_EN is P06.

    You can control the GPIO EXP_PS_3V3_EN and EXP_PS_5V0_EN in Linux sysfs:

    root@am62xx-evm:~# cd /sys/class/gpio/
    root@am62xx-evm:/sys/class/gpio# ls -l
    total 0
    --w------- 1 root root 4096 May 30 16:56 export
    lrwxrwxrwx 1 root root    0 May 30 16:56 gpiochip289 -> ../../devices/platform/bus@f0000/20010000.i2c/i2c
    -1/1-0022/gpio/gpiochip289
    lrwxrwxrwx 1 root root    0 May 30 16:56 gpiochip313 -> ../../devices/platform/bus@f0000/601000.gpio/gpio
    /gpiochip313
    lrwxrwxrwx 1 root root    0 May 30 16:56 gpiochip401 -> ../../devices/platform/bus@f0000/600000.gpio/gpio
    /gpiochip401
    lrwxrwxrwx 1 root root    0 May 30 16:56 gpiochip488 -> ../../devices/platform/bus@f0000/bus@f0000:bus@40
    

    So "gpiochip289" is the IO Expander on I2C1.

    For P05, 289+5=294, then to control the 3v3 pin:

    root@am62xx-evm:/sys/class/gpio# echo 294 > export
    root@am62xx-evm:/sys/class/gpio# cd gpio294
    root@am62xx-evm:/sys/class/gpio/gpio294# ls
    active_low  device  direction  edge  power  subsystem  uevent  value
    root@am62xx-evm:/sys/class/gpio/gpio294# cat direction
    in
    root@am62xx-evm:/sys/class/gpio/gpio294# echo out > direction
    root@am62xx-evm:/sys/class/gpio/gpio294# cat value
    0
    root@am62xx-evm:/sys/class/gpio/gpio294# echo 1 > value
    

    The I2C2 bus is disabled in kernel device tree, so you would get timeout on i2cdetect command. If you want ot use I2C2, you would have to enable I2C2 in k3-am625-sk.dts, i2cdetect should work.

  • Hi Bin,

    Thanks for the feedback, this all seems to work as described. 

    Munan