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.
Tool/software:
Hi team,
Schematic access link: https://www.ti.com.cn/cn/lit/zip/sprr466,the pcb name of the board is PROC154E3, we changed the order of the GPIOs on the expander based on this design,
Here's the gpio extension in file k3-i784s4-evm.dts, sdk version is 09_01_00_06, However, there is only one expander in the schematic, and the address is 0x21,
under such circumstances, how to find the correspondence between the gpio pins in the dts and the gpio pins in the schematic
&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"; }; };
Looking forward to your response,thanks
Hi Ming,
For SK-AM69 board, please reference the k3-am69-sk.dts file: 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>; }; };
I think the confusion comes from using the device tree file for J784S4 EVM board to try to correlate with the SK-AM69 board. The naming of the board, SoC, and the software does add a bit of a complexity.
Regards,
Takuma
I see, thank you. At the same time I found another problem, the default device tree file has been changed to k3-am69-sk.dts, but it is still loaded 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 https://optee.readthedocs.io/en/latest/architecture/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
Hi Ming,
If using the default prebuilt SD card image, the boot partition contains a uEnv.txt file that sets up a couple of U-Boot environment variables. A suspicion I have is that one of the commands within this uEnv.txt is overwriting the changes, or resetting the changes. Like this line:
Otherwise, there is a different function within U-Boot environment that checks if board in use is SK or EVM and loads the appropriate device tree:
Regards,
Takuma