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.

[参考译文] SK-AM62B:在 A53 提供的 AM625 评估板上使用 MCU_I2C0/WKUP_I2C0

Guru**** 2538930 points
Other Parts Discussed in Thread: TPIC2810, AM625SIP, AM625

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1567098/sk-am62b-using-mcu_i2c0-wkup_i2c0-on-am625-evaluation-board-from-the-a53

器件型号:SK-AM62B
主题中讨论的其他器件:TPIC2810AM625SIPAM625

工具/软件:

大家好、我们 尝试使用 AM62x 评估板上的 MCU_I2C0、我使用 am62x_EVM 的默认内置配置、并通过在器件树中将状态设置为“OK"来“来启用两条 I2C 总线。 我们还有想要在上使用此功能的定制硬件、它表现出与 AM62x 评估板完全相同的问题。

使用这些外设时、除了在设备树中启用这些项目(通过 status =“okay";)“)之外、还需要执行哪些步骤?

对于驱动程序探测的两条 I2C 总线、我们可以开发该区域、但器件不会提供时钟或数据。 驱动程序不会输出任何错误、它的作用就像没有任何错误一样。 我发现的唯一奇怪的是、在总线上运行 i2cdetect 似乎需要很长时间、在尝试探测每个地址时几乎超时。 其他 I2C 总线(如 SOC_I2C0)工作时没有任何问题、我知道它们使用同一个驱动器。

其中一条未正常运行的 I2C 总线(配置了 TPIC2810 的评估板上的 WKUP_I2C0)的寄存器转储如下:

Address,Hex,Value
0,0,0x0000080C
4,4,0x00005040
8,8,0x00000000
12,C,0x00000000
16,10,0x00000001
20,14,0x00000000
24,18,0x00000000
28,1C,0x00000000
32,20,0x00000000
36,24,0x00000000
40,28,0x00000000
44,2C,0x00000000
48,30,0x00000000
52,34,0x0000636F
56,38,0x00000000
60,3C,0x00000000
64,40,0x00000000
68,44,0x00000000
72,48,0x00000000
76,4C,0x00000000
80,50,0x00000000
84,54,0x00000000
88,58,0x00000000
92,5C,0x00000000
96,60,0x00000000
100,64,0x00000000
104,68,0x00000000
108,6C,0x00000000
112,70,0x00000000
116,74,0x00000000
120,78,0x00000000
124,7C,0x00000000
128,80,0x00000000
132,84,0x00000000
136,88,0x00000000
140,8C,0x00000000
144,90,0x00000001
148,94,0x00000000
152,98,0x00000000
156,9C,0x000000BF
160,A0,0x00000000
164,A4,0x00008000
168,A8,0x00000000
172,AC,0x000003FF
176,B0,0x00000017
180,B4,0x0000000D
184,B8,0x0000000F
188,BC,0x000001E0
192,C0,0x00008000
196,C4,0x00000000
200,C8,0x00000000
204,CC,0x00000000
208,D0,0x00000000
212,D4,0x00000000
216,D8,0x00000000
220,DC,0x00000000
224,E0,0x00000000
228,E4,0x00000000
232,E8,0x00000000
236,EC,0x00000000
240,F0,0x00000000
244,F4,0x00000000
248,F8,0x00000000
252,FC,0x00000000

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Jeremiah、

    1) 请分享你的引导日志,显示 I2C 总线被探测

    2) 请共享您的器件树修改

    3) 您使用的是哪个版本的 Linux SDK?

    4) 您使用的引导流程是什么? SBL? SPL?

    有关引导流程的更多信息、请参阅 AM62x Academy 的多核模块:

    https://dev.ti.com/tirex/explore/node?node=A__AZdBTlT8UK2hNwHKXaPieQ__AM62-ACADEMY__uiYMDcq__LATEST

    此致、

    Nick

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    1) I2C 驱动程序无错误地探测并创建了/dev/i2c 器件、但 I2C 总线上的器件无法探测(TMP42X 传感器和 AT24x EEPROM 都无法探测)。

    2) 修改了 R5 器件树、将 AM625 非 SIP 的 DDR 配置替换为 SDK 中 AM625SIP 的 DDR 配置、我们包括内置函数 k3-am625.dtsi、并将 MCU_i2c0 状态设置为等于“正常“。 我们还使用 wkup_uart0 在评估板上使用 GPIO 扩展器尝试了这种方法、观察到与评估板完全相同的行为。

    3) 我们正在将 buildroot 2025 与最新版本的 Linux 和 Uboot 配合使用、除了 am62x 评估板的 buildroot defconfig 中包含的修改或修补程序之外、我们没有进行任何修改或修补程序。

    4) 我们正在使用 Uboot SPL、唯一的更改是在 R5 和 A53 SPL 中启用 DEBUG_UART。

    附加了定制硬件的 DTS、我们仅将此 DTS 用于 Linux 映像、uboot、其他所有内容仍使用与内置程序中配置的 DTS 相同的 DTS。但是、我当前是 WFH、不在实验室中、因此无法共享引导日志、但是星期一我将引导电路板并上传日志:

    #include "k3-am625.dtsi"
    
    #include <dt-bindings/gpio/gpio.h>
    
    / {
    	aliases {
    		serial2 = &main_uart0;
    		mmc0 = &sdhci0;
    		mmc1 = &sdhci1;
    		ethernet0 = &cpsw_port1;
    	};
    
    	chosen {
    		stdout-path = "serial2:115200n8";
    	};
    
    	memory@80000000 {
    		/* 512MB RAM */
    		reg = <0x00000000 0x80000000 0x00000000 0x20000000>;
    		device_type = "memory";
    		bootph-pre-ram;
    	};
    
    	reserved-memory {
    		#address-cells = <2>;
    		#size-cells = <2>;
    		ranges;
    
    		ramoops@9ca00000 {
    			compatible = "ramoops";
    			reg = <0x00 0x9ca00000 0x00 0x00100000>;
    			record-size = <0x8000>;
    			console-size = <0x8000>;
    			ftrace-size = <0x00>;
    			pmsg-size = <0x8000>;
    		};
    
    		/* global cma region */
    		linux,cma {
    			compatible = "shared-dma-pool";
    			reusable;
    			size = <0x00 0x8000000>;
    			linux,cma-default;
    		};
    
    		secure_tfa_ddr: tfa@9e780000 {
    			reg = <0x00 0x9e780000 0x00 0x80000>;
    			alignment = <0x1000>;
    			no-map;
    		};
    
    		secure_ddr: optee@9e800000 {
    			reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */
    			alignment = <0x1000>;
    			no-map;
    		};
    
    		wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9db00000 {
    			compatible = "shared-dma-pool";
    			reg = <0x00 0x9db00000 0x00 0xc00000>;
    			no-map;
    		};
    	};
    
    	tlv320_mclk: clk-0 {
    		#clock-cells = <0>;
    		compatible = "fixed-clock";
    		clock-frequency = <12288000>;
    	};
    };
    
    &main_uart0 {
    	bootph-all;
    	status = "okay";
    };
    
    &mcu_i2c0 {
    	status = "okay";
    
    	temp_u123 {   /* TI TMP42X sensor */
    		status = "okay";
    		compatible = "ti,tmp422";
    		reg = <0x4C>;
    
    		/* channels removed for proprietary data */
    	};
    
    	eeprom_u123 { /* AT 24 EEPROM */
    		status = "okay";
    		compatible = "atmel,24c02";
    		reg = <0x50>;
    	};
    };
    
    /* sdhci0 and sdhci1 removed for proprietary data */
    
    /* cpsw3g removed for proprietary data */
    
    /* The below nodes are magically make things work, leave them alone */
    
    &mailbox0_cluster0 {
    	mbox_m4_0: mbox-m4-0 {
    		ti,mbox-rx = <0 0 0>;
    		ti,mbox-tx = <1 0 0>;
    	};
    };
    
    /* The following device tree items are reserved for TI FW usage */
    
    &mcu_gpio0 {
    	status = "reserved";
    };
    
    &mcu_gpio_intr {
    	status = "reserved";
    };
    
    &wkup_uart0 {
    	/* WKUP UART0 is used by DM firmware */
    	bootph-pre-ram;
    	status = "reserved";
    };
    &main_uart1 {
    	/* Main UART1 is used by TIFS firmware */
    	bootph-pre-ram;
    	status = "reserved";
    };