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-AM69:GPIO 扩展、如何使 DTS 中的名称与原理图相匹配

Guru**** 1805680 points
Other Parts Discussed in Thread: SK-AM69
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1428897/processor-sdk-am69-gpio-extension-how-to-the-names-in-dts-match-the-schematic

器件型号:PROCESSOR-SDK-AM69
主题中讨论的其他器件:SK-AM69

工具与软件:

嗨、团队:

 原理图访问链接: https://www.ti.com.cn/cn/lit/zip/sprr466、the该电路板的 PCB 名称是 PROC154E3、我们根据此设计更改了扩展器上的 GPIO 顺序  

文件 k3-i784s4-evm.dts 中的 GPIO 扩展名、SDK 版本为 09_01_00_06 。但是、原理图中只有一个扩展器、地址为0x21。

在这种情况下、如何找到 DTS 中 GPIO 引脚与原理图中 GPIO 引脚之间的对应关系

&main_i2c0 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&main_i2c0_pins_default>;

	clock-frequency = <400000>;

	exp1: gpio@20 {
		compatible = "ti,tca6416";
		reg = <0x20>;
		gpio-controller;
		#gpio-cells = <2>;
		gpio-line-names = "PCIE1_2L_MODE_SEL", "PCIE1_4L_PERSTZ", "PCIE1_2L_RC_RSTZ",
				  "PCIE1_2L_EP_RST_EN", "PCIE0_4L_MODE_SEL", "PCIE0_4L_PERSTZ",
				  "PCIE0_4L_RC_RSTZ", "PCIE0_4L_EP_RST_EN", "PCIE1_4L_PRSNT#",
				  "PCIE0_4L_PRSNT#", "CDCI1_OE1/OE4", "CDCI1_OE2/OE3",
				  "AUDIO_MUX_SEL", "EXP_MUX2", "EXP_MUX3", "GESI_EXP_PHY_RSTZ";
	};

	exp2: gpio@22 {
		compatible = "ti,tca6424";
		reg = <0x22>;
		gpio-controller;
		#gpio-cells = <2>;
		gpio-line-names = "R_GPIO_RGMII1_RST", "ENET2_I2CMUX_SEL", "GPIO_USD_PWR_EN",
				  "USBC_PWR_EN", "USBC_MODE_SEL1", "USBC_MODE_SEL0",
				  "GPIO_LIN_EN", "R_CAN_STB", "CTRL_PM_I2C_OE#",
				  "ENET2_EXP_PWRDN", "ENET2_EXP_SPARE2", "CDCI2_RSTZ",
				  "USB2.0_MUX_SEL", "CANUART_MUX_SEL0", "CANUART_MUX2_SEL1",
				  "CANUART_MUX1_SEL1", "ENET1_EXP_PWRDN", "ENET1_EXP_RESETZ",
				  "ENET1_I2CMUX_SEL", "ENET1_EXP_SPARE2", "ENET2_EXP_RESETZ",
				  "USER_INPUT1", "USER_LED1", "USER_LED2";
	};
};

期待您的回复、谢谢

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

    尊敬的 Ming:

    对于 SK-AM69电路板、请参考 K3-AM69-SK.dts 文件: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am69-sk.dts?h=ti-linux-6.1.y

    &main_i2c0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_i2c0_pins_default>;
    	clock-frequency = <400000>;
    
    	exp1: gpio@21 {
    		compatible = "ti,tca6416";
    		reg = <0x21>;
    		gpio-controller;
    		#gpio-cells = <2>;
    		gpio-line-names	= "BOARDID_EEPROM_WP", "CAN_STB", "GPIO_uSD_PWR_EN",
    				"IO_EXP_MCU_RGMII_RST#", "IO_EXP_PCIe0_4L_PERST#",
    				"IO_EXP_PCIe1_M.2_RTSz", "IO_EXP_PCIe3_M.2_RTSz",
    				"PM_INA_BUS_EN", "ENET1_EXP_PWRDN", "EXP1_ENET_RSTz",
    				"ENET1_I2CMUX_SEL", "PCIe0_CLKREQ#", "PCIe1_M.2_CLKREQ#",
    				"PCIe3_M2_CLKREQ#", "PCIe0_PRSNT2#_1", "PCIe0_PRSNT2#_2";
    	};
    };
    
    &main_i2c1 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&main_i2c1_pins_default>;
    	clock-frequency = <400000>;
    
    	#address-cells = <1>;
    	#size-cells = <0>;
    
    	exp2: gpio@21 {
    		compatible = "ti,tca6408";
    		reg = <0x21>;
    		gpio-controller;
    		#gpio-cells = <2>;
    		gpio-line-names = "CSI_VIO_SEL", "CSI_MUX_SEL_2", "CSI2_RSTz",
    				"IO_EXP_CAM0_GPIO1", "IO_EXP_CAM1_GPIO1";
    	};
    
    	pca9543: i2c-mux@70 {
    		compatible = "nxp,pca9543";
    		#address-cells = <1>;
    		#size-cells = <0>;
    		reg = <0x70>;
    	};
    };
    

    我认为混淆来自使用 J784S4 EVM 板的器件树文件尝试与 SK-AM69板相关联。 板、SoC 和软件的命名确实增加了一些复杂性。

    此致、

    Takuma

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

    明白了、谢谢您。 同时我发现另一个问题、默认器件树文件已更改为 k3-am69-sk.dts、但仍加载 k3-i784s4-evm.dts  

    => print default_device_tree
    default_device_tree=ti/k3-j784s4-evm.dtb
    => setenv default_device_tree ti/ti-am69-sk.dtb
    => print default_device_tree                   
    default_device_tree=ti/ti-am69-sk.dtb
    => saveenv
    Saving Environment to MMC... Writing to redundant MMC(0)... OK
    U-Boot SPL 2023.04-00001-g482636812c (Oct 24 2024 - 15:28:24 +0800)
    EEPROM not available at 0x50, trying to read at 0x51
    Reading on-board EEPROM at 0x51 failed -121
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.2--v09.01.02 (Kool Koala)')
    SPL initial stack usage: 13408 bytes
    Trying to boot from MMC1
    Authentication passed
    Authentication passed
    Authentication passed
    Loading Environment from nowhere... OK
    init_env from device 17 not supported!
    Authentication passed
    Authentication passed
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.9(release):v2.9.0-614-gd7a7135d32-dirty
    NOTICE:  BL31: Built : 09:34:15, Aug 24 2023
    I/TC: 
    I/TC: OP-TEE version: 4.0.0 (gcc version 11.4.0 (GCC)) #1 Fri Oct 20 18:29:31 UTC 2023 aarch64
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check optee.readthedocs.io/.../porting_guidelines.html
    I/TC: Primary CPU initializing
    I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.2--v09.01.02 (Kool Koala)')
    I/TC: HUK Initialized
    I/TC: Activated SA2UL device
    I/TC: Enabled firewalls for SA2UL TRNG device
    I/TC: SA2UL TRNG initialized
    I/TC: SA2UL Drivers initialized
    I/TC: Primary CPU switching to normal world boot
    
    U-Boot SPL 2023.04-00001-g482636812c (Oct 24 2024 - 15:28:48 +0800)
    SYSFW ABI: 3.1 (firmware rev 0x0009 '9.1.2--v09.01.02 (Kool Koala)')
    Trying to boot from MMC1
    Authentication passed
    Authentication passed
    
    
    U-Boot 2023.04-00001-g482636812c (Oct 24 2024 - 15:28:48 +0800)
    
    SoC:   J784S4 SR1.0 HS-FS
    Model: Texas Instruments J784S4 EVM
    EEPROM not available at 0x50, trying to read at 0x51
    Reading on-board EEPROM at 0x51 failed -121
    Board: J784S4-EVM rev E1
    DRAM:  32 GiB
    idle-statesCore:  91 devices, 33 uclasses, devicetree: separate
    Flash: 0 Bytes
    MMC:   mmc@4f80000: 0, mmc@4fb0000: 1
    Loading Environment from MMC... OK
    In:    serial@2880000
    Out:   serial@2880000
    Err:   serial@2880000
    am65_cpsw_nuss ethernet@46000000: K3 CPSW: nuss_ver: 0x6BA02102 cpsw_ver: 0x6BA82102 ale_ver: 0x00293904 Ports:1 mdio_freq:1000000
    EEPROM not available at 0x50, trying to read at 0x51
    Reading on-board EEPROM at 0x51 failed -121
    Net:   Could not get PHY for ethernet@46000000port@1: addr 0
    am65_cpsw_nuss_port ethernet@46000000port@1: phy_connect() failed
    No ethernet found.
    
    Hit any key to stop autoboot:  0 
    => 
    => print default_device_tree 
    default_device_tree=ti/ti-am69-sk.dtb
    => boot
    switch to partitions #0, OK
    mmc0(part 0) is current device
    SD/MMC found on device 0
    Failed to load 'boot.scr'
    Can't set block device
    i2c_write: error waiting for data ACK (status=0x116)
    pca953x gpio@20: Error reading output register
    i2c_write: error waiting for data ACK (status=0x116)
    pca953x gpio@22: Error reading output register
    GPIO: 'gpio@22_17' not found
    Command 'gpio' failed: Error -22
    i2c_write: error waiting for data ACK (status=0x116)
    pca953x gpio@20: Error reading output register
    i2c_write: error waiting for data ACK (status=0x116)
    pca953x gpio@22: Error reading output register
    GPIO: 'gpio@22_16' not found
    Command 'gpio' failed: Error -22
    k3_r5f_rproc r5f@41000000: Core 1 is already in use. No rproc commands work
    72188 bytes read in 25 ms (2.8 MiB/s)
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Load Remote Processor 1 with data@addr=0x82000000 72188 bytes: Success!
    72188 bytes read in 25 ms (2.8 MiB/s)
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Load Remote Processor 2 with data@addr=0x82000000 72188 bytes: Success!
    72188 bytes read in 25 ms (2.8 MiB/s)
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Load Remote Processor 3 with data@addr=0x82000000 72188 bytes: Success!
    72188 bytes read in 25 ms (2.8 MiB/s)
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Load Remote Processor 4 with data@addr=0x82000000 72188 bytes: Success!
    72188 bytes read in 25 ms (2.8 MiB/s)
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Load Remote Processor 5 with data@addr=0x82000000 72188 bytes: Success!
    72188 bytes read in 26 ms (2.6 MiB/s)
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Load Remote Processor 6 with data@addr=0x82000000 72188 bytes: Success!
    72188 bytes read in 25 ms (2.8 MiB/s)
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Load Remote Processor 7 with data@addr=0x82000000 72188 bytes: Success!
    10489056 bytes read in 81 ms (123.5 MiB/s)
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Load Remote Processor 8 with data@addr=0x82000000 10489056 bytes: Success!
    10489056 bytes read in 71 ms (140.9 MiB/s)
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Load Remote Processor 9 with data@addr=0x82000000 10489056 bytes: Success!
    10489056 bytes read in 66 ms (151.6 MiB/s)
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Load Remote Processor 10 with data@addr=0x82000000 10489056 bytes: Success!
    10489056 bytes read in 57 ms (175.5 MiB/s)
    Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices
    Load Remote Processor 11 with data@addr=0x82000000 10489056 bytes: Success!
    21582336 bytes read in 110 ms (187.1 MiB/s)
    Failed to load '/boot/dtb/ti/k3-j784s4-evm.dtb'
    libfdt fdt_check_header(): FDT_ERR_BADMAGIC
    No FDT memory address configured. Please configure
    the FDT address via "fdt addr <address>" command.
    Aborting!
    ERROR: Did not find a cmdline Flattened Device Tree
    Could not find a valid device tree

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

    尊敬的 Ming:

    如果使用默认的预编译 SD 卡映像、引导分区将包含一个 uEnv.txt 文件、该文件设置了几个 U-Boot 环境变量。 我怀疑该 uEnv.txt 中的某个命令正在覆盖更改或重置更改。 如以下行所示:

    • do_psdk_setup=env 默认值-f -a;saveenv

    否则、U-Boot 环境中有一个不同的功能会检查使用的电路板是 SK 还是 EVM、并加载适当的器件树:

    此致、

    Takuma