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.

PROCESSOR-SDK-AM62X: Am62x EVM I2C devices

Part Number: PROCESSOR-SDK-AM62X


Hi Team,

I am trying to communicate with I2C devices i.e., temperature sensors and LED Driver but when I run "I2Cdetect -l " I could not see both devices getting detected. 

     

Could you please let me know what changes I need to do to access both devices. 

I am using default image available in https://www.ti.com/tool/PROCESSOR-SDK-AM62X.

Regards,

Kumar Ashutosh

  • Hi Kumar,

    I am routing your query to our Linux I2C expert for comments.

  • Hi Ashutosh,

    This is my understanding of why SoC_I2C1 is not showing temperature sensors at slave address set to 0x48 and 0x49.

    I am attaching here a segment of how SoC_I2C1 is defined in the device tree files.

    &main_i2c1 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_i2c1_pins_default>;
    	clock-frequency = <100000>;
    
    	exp1: gpio@22 {
    		compatible = "ti,tca6424";
    		reg = <0x22>;
    		gpio-controller;
    		#gpio-cells = <2>;
    		gpio-line-names = "GPIO_CPSW2_RST", "GPIO_CPSW1_RST",
    				   "PRU_DETECT", "MMC1_SD_EN",
    				   "VPP_LDO_EN", "EXP_PS_3V3_En",
    				   "EXP_PS_5V0_En", "EXP_HAT_DETECT",
    				   "GPIO_AUD_RSTn", "GPIO_eMMC_RSTn",
    				   "UART1_FET_BUF_EN", "WL_LT_EN",
    				   "GPIO_HDMI_RSTn", "CSI_GPIO1",
    				   "CSI_GPIO2", "PRU_3V3_EN",
    				   "HDMI_INTn", "TEST_GPIO2",
    				   "MCASP1_FET_EN", "MCASP1_BUF_BT_EN",
    				   "MCASP1_FET_SEL", "UART1_FET_SEL",
    				   "TSINT#", "IO_EXP_TEST_LED";
    
    		interrupt-parent = <&main_gpio1>;
    		interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
    		interrupt-controller;
    		#interrupt-cells = <2>;
    
    		pinctrl-names = "default";
    		pinctrl-0 = <&main_gpio1_ioexp_intr_pins_default>;
    	};
    
    	sii9022: sii9022@3b {
    		#sound-dai-cells = <0>;
    		compatible = "sil,sii9022";
    		reg = <0x3b>;
    
    		clocks = <&hdmi_mstrclk>;
    		clock-names = "mclk";
    
    		interrupt-parent = <&exp1>;
    		interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
    
    		sil,i2s-data-lanes = < 0 >;
    
    		ports {
    			#address-cells = <1>;
    			#size-cells = <0>;
    
    			port@0 {
    				reg = <0>;
    
    				sii9022_in: endpoint {
    					remote-endpoint = <&dpi1_out>;
    				};
    			};
    
    			port@1 {
    				reg = <1>;
    
    				sii9022_out: endpoint {
    					remote-endpoint = <&hdmi_connector_in>;
    				};
    			};
    		};
    	};
    
    	tlv320aic3106: audio-codec@1b {
    		#sound-dai-cells = <0>;
    		compatible = "ti,tlv320aic3106";
    		reg = <0x1b>;
    		ai3x-micbias-vg = <1>;		/* 2.0V */
    		status = "okay";
    
    		/* Regulators */
    		AVDD-supply = <&vcc_3v3_sys>;
    		IOVDD-supply = <&vcc_3v3_sys>;
    		DRVDD-supply = <&vcc_3v3_sys>;
    		DVDD-supply = <&vcc_1v8>;
    	};
    };

    So the above declaration states that considering I2C1 bus, only three such slaves will be addressed/detected. They are 0x22, 0x3b and 0x1b

    And the rest we need to add if we want to probe them.

    As far as wakeup I2C0 is concerned I would suggest you to make the node enabled.

    This can be done by stating status to "okay"

    To further comment on SoC_I2C1 please wait for comments from the assigned expert.

    Regards,

    Vaibhav

  • I don't have any further comments on top of what Vaibhav has already said. In general, you need to tell Linux that something exists before you can expect to communicate with it.

    Feel free to reply if you have followup questions.

    Regards,

    Nick