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.

AM67A: How to enable and use I2C4 in the main domain in AM67A.

Part Number: AM67A

Tool/software:

I am using Beagly AI board based on AM67A. In that board, only Main domain I2C available from the 40-pin header is I2C4. 

1. Is there someone who have used it for I2C communication?

2. Is it possible to use it for I2C communication? if so how to enable it and use it?

  • Hi Wikum,

    You will need to enable i2c4 in the device tree or through a device tree overlay.

    Below is an example (although it should be correct).

    #include "k3-pinctrl.h"
    
    /dts-v1/;
    /plugin/;
    
    /dts-v1/;
    /plugin/;
    
    &cbass_main {
        main_i2c4: i2c@fe80000 {
            compatible = "ti,am64-i2c", "ti,omap4-i2c";
            reg = <0x00 0x0fe80000 0x00 0x100>;
            interrupts = <&main_gpio_intr 178 IRQ_TYPE_LEVEL_HIGH>;
            #address-cells = <1>;
            #size-cells = <0>;
            clocks = <&k3_clks 257 2>;
            clock-names = "fck";
            power-domains = <&k3_pds 257 TI_SCI_PD_EXCLUSIVE>;
        };
    };
    
    &main_pmx {
        main_i2c4_pins_default: main-i2c4-default-pins {
    		pinctrl-single,pins = <
    			J722S_IOPAD(0x00a8, PIN_INPUT_PULLUP, 1) /* (R27) GPMC0_CSn0.I2C4_SCL */
    			J722S_IOPAD(0x00ac, PIN_INPUT_PULLUP, 1) /* (P21) GPMC0_CSn1.I2C4_SDA */
    		>;
    	};
    };
    
    &main_i2c4 {
    	symlink = "hat/main_i2c4";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_i2c4_pins_default>;
    	clock-frequency = <100000>;
    	bootph-all;
    	status = "okay";
    };

    Best,
    Jared

  • Hi Jared,
    Thanks for your reply, 
    In the J722 guide base address of the I2C4 is different from 02040000, do you know the reason for it?

     

  • Hi Wikum,

    It's simply where the memory map is.

    Best,
    Jared

  • There are still issues.

    Thread continues here:  RE: AM67A: Enable i2c4 on AM67