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/PROCESSOR-SDK-AM57X: I2C configuration

Part Number: PROCESSOR-SDK-AM57X
Other Parts Discussed in Thread: TMDSEVM572X, AM5728

Tool/software: Linux

Hi team,

I am using AM572x Evaluation Module with TMDSEVM572x Camera Module. I loaded the Linux Processor SDK.

Can you please tell me how to find the Address of I2C5_SCL and I2C5_SDA in the driver program? How to configure that ? As in this Kit "P18_3" and "P18_4" pins were used for I2C5 communication and i want to configure different Expansion Header pins for I2C.

Thanks.

  • The software team have been notified. They will respond here.
  • Hi,

    As far as I understand you want to change the pinmux settings of the P18 header.

    In order to change the expansion header pins, you need to set the correct pinmux registers. I'll give an example with P18_4 (I2C5_SCL).
    P18_4 is connected to device pad F12, if you search for F12 in AM5728 Data Manual, you'll see that the signal name associated with F12 ball is mcasp1_axr1. Now, if you check Chapter 18 Control Module and search for mcasp1_axr1, you'll see that the pinmux register associated with it is CTRL_CORE_PAD_MCASP1_AXR1 with physicall address 0x4A0036B8 (see CTRL_CORE_PAD_MCASP1_AXR1[3:0]MCASP1_AXR1_MUXMODE for the available pinmux configurations).

    In a similar manner you can find the pinmux registers associated with any of the expansion header pins.

    Hope this helps.

    Best Regards,
    Yordan
  • Hi Yordan,

    Thanks for the reply. I got the point. I have also gone through PinMux tool.

    So if i want to use P16_10 as I2C5_SCL which is connected to device pad P6. And if i go with it's signal name is "gpmc_a4".

    Then I checked the CTRL_CORE_PAD_GPMC_A4 having address 0x4A00 3450.

    Then where i need to change this address in program? Any other steps are required?

    Thanks.

  • Hi,

    You need to modify the device tree file.
    For example see what is done for arch/arm/boot/dts/am5xx-evm.dts, look at &dra7_pmx_core node.

    Best Regards,
    Yordan
  • Hi Yordan,

    I need to know that is am57xx-evm.dts only file for necessary changes?

    Also i can't see the previous I2C5 pin definition which are being used by P18 expansion Header.

    Please Elaborate.

    Thanks. 

  • Hi,
    Any update on that will be appreciated.
  • Hi,

    You need to add:
    i2c5_pins_default: i2c5_pins_default {
    pinctrl-single,pins = <
    0x2b4 (PIN_INPUT| MUX_MODE10) /* mcasp1_axr0.i2c5_sda */
    0x2b8 (PIN_INPUT| MUX_MODE10) /* mcasp1_axr1.i2c5_scl */
    >;
    };

    &i2c5 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&i2c5_pins_default>;
    clock-frequency = <400000>;
    };

    You should also make sure the I2C driver is enabled in the defconfig file. By default it should be.

    Then you should have the i2c in /dev/.

    Best Regards,
    Yordan
  • Hi Yordan,

    The pin address that you described is for P18 Header. As i told earlier that i am using gpmc_a4 and gpmc_a5 as I2C5_SCl and I2C5_SDA.

    So added the following lines in "am57xx-evm.dts"

    i2c5_pins_default: i2c5_pins_default {
    pinctrl-single,pins = <
        0x50 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_a4.i2c5_sda*/
        0x54 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_a5.i2c5_scl */

    >;

    }

    and following lines in "am57xx-evm-common.dts"

    &i2c5 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&i2c5_pins_default>;
    clock-frequency = <400000>;

    };

    But still its not working.

    Also it's showing 


    pin 20 (4a003450.0): (MUX UNCLAIMED) (GPIO UNCLAIMED)
    pin 21 (4a003454.0): (MUX UNCLAIMED) (GPIO UNCLAIMED)

     


    Am i doing something wrong?

  • Hi,

    You also neet to have a look at u-boot sources, mux_data.h. The GPMC_A4 & GPMC_A5 pins are used for VIN3a..
    I've described this here:
    e2e.ti.com/.../2145500
    The two threads seem related.

    Best Regards,
    Yordan