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 extension, how to the names in dts match the schematic

Part Number: PROCESSOR-SDK-AM69
Other Parts Discussed in Thread: SK-AM69

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

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
&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";
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    &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 {
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    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

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    => 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
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    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
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • 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:

    • do_psdk_setup=env default -f -a; saveenv

    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