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: How to Modify GPIO and Boot it from eMMC

Part Number: PROCESSOR-SDK-AM62X

Hi,

For the previous forum, I had asked about how to modify GPIO and boot it from SD card, and I already solved my problem.

Now, I had continue to work on how to modify GPIO and boot it from eMMC, is there any possible way or reference to do so?  From my information, we need to build the required files, tiboot3.bin, tispl.bin, u-boot.img and am62x-tisdk-base.ext4. 

So, my question is, is this directory: /home/$USER/ti-processor-sdk-linux-am62xx-evm-08.04.01.03/board-support/u-boot-2021.01+gitAUTOINC+2dd2e1d366-g2dd2e1d366/arch/arm/dts where the k3-am62x-sk-common.dtsi needs to be modify?

If is, how do we build the dtb files, as 'make dtbs' does not work for u-boot.

After building the dtb files, where should we replace it to?

  • Hello,
    It looks like you posted two separate inquiry:
    1/. GPIO in u-boot: depending on your user case, it is possible to add your code to control GPIO in u-boot after configuring gpio pinmux...But out-of-box (i.e. as currently supported in Linux kernel) gpio driver @u-boot is not fully enabled/tested on AM62x...
    2/. eMMC flashing
    - Linux SDK
    software-dl.ti.com/.../UG-Memory.html
    - eMMC flashing with USB-DFU
    e2e.ti.com/.../faq-sk-am62-how-to-flash-emmc-using-usb-dfu-on-am62x-sk-e2
    Best,
    -Hong

  • Does it mean that from now there still no examples on controlling GPIO in u-boot? 

    Is there any way to build and flash the modified files into the AM62x board directly instead of making AM62x board as a storage device and copy the dtb files manually inside the boot folder of the AM62x board?

  • Hello,
    I'm attaching a log file on "gpio" cmd @u-boot I captured on AM62x-SK
    - The u-boot is based off SDK 8.6 release (www.ti.com/.../08.06.00.42)
    - a simple u-boot patch to enable "gpio" cmd
    Hopefully it is helpful for your user case.
    Best,
    -Hong

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/0247.am62x_5F00_gpio.patch

    U-Boot SPL 2021.01-00001-g45cb7e4-dirty (Mar 14 2023 - 22:58:17 -0500)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    SPL initial stack usage: 13424 bytes
    Trying to boot from MMC2
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Warning: Detected image signing certificate on GP device. Skipping certificate to prevent boot failure. This will fail if the image was also encrypted
    Loading Environment from MMC... *** Warning - No MMC card found, using default environment
    
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.8(release):v2.8-226-g2fcd408bb3-dirty
    NOTICE:  BL31: Built : 05:06:58, Feb 24 2023
    
    U-Boot SPL 2021.01-00001-g45cb7e4-dirty (Mar 14 2023 - 22:57:08 -0500)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    Trying to boot from MMC2
    
    
    U-Boot 2021.01-00001-g45cb7e4-dirty (Mar 14 2023 - 22:57:08 -0500)
    
    SoC:   AM62X SR1.0 GP
    Model: Texas Instruments AM625 SK
    EEPROM not available at 0x50, trying to read at 0x51
    Board: AM62-SKEVM rev E2
    DRAM:  2 GiB
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2
    Loading Environment from MMC... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Net:   eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  2  0
    => dm tree
     Class     Index  Probed  Driver                Name
    -----------------------------------------------------------
     root          0  [ + ]   root_driver           root_driver
     simple_bus    0  [ + ]   simple_bus            |-- bus@f0000
     simple_bus    1  [ + ]   simple_bus            |   |-- bus@4000000
     pinctrl       0  [ + ]   single-pinctrl        |   |   |-- pinctrl@4084000
     remoteproc    0  [   ]   k3_m4                 |   |   `-- m4fss@5000000
     simple_bus    2  [ + ]   simple_bus            |   |-- bus@2b000000
     syscon        0  [ + ]   syscon                |   |   `-- syscon@43000000
     soc           0  [ + ]   soc_ti_k3             |   |       `-- chipid@14
     syscon        1  [   ]   syscon                |   |-- syscon@100000
     simple_bus    3  [ + ]   simple_bus            |   |-- bus@48000000
     mailbox       0  [ + ]   k3-secure-proxy       |   |   |-- mailbox@4d000000
     dma           0  [   ]   ti-udma               |   |   |-- dma-controller@485c0100
     dma           1  [   ]   ti-udma               |   |   `-- dma-controller@485c0000
     firmware      0  [ + ]   ti_sci                |   |-- system-controller@44043000
     power_doma    0  [ + ]   ti-sci-pm-domains     |   |   |-- power-controller
     clk           0  [ + ]   ti-sci-clk            |   |   |-- clock-controller
     reset         0  [   ]   ti-sci-reset          |   |   |-- reset-controller
     sysreset      0  [   ]   ti-sci-sysreset       |   |   `-- sysreset-controller
     pinctrl       1  [ + ]   single-pinctrl        |   |-- pinctrl@f4000
     pinconfig     0  [ + ]   pinconfig             |   |   |-- main-uart0-pins-default
     pinconfig     1  [   ]   pinconfig             |   |   |-- main-i2c0-pins-default
     pinconfig     2  [   ]   pinconfig             |   |   |-- main-i2c1-pins-default
     pinconfig     3  [   ]   pinconfig             |   |   |-- main-i2c2-pins-default
     pinconfig     4  [ + ]   pinconfig             |   |   |-- main-mmc0-pins-default
     pinconfig     5  [ + ]   pinconfig             |   |   |-- main-mmc1-pins-default
     pinconfig     6  [   ]   pinconfig             |   |   |-- usr-led-pins-default
     pinconfig     7  [ + ]   pinconfig             |   |   |-- main-mdio1-pins-default
     pinconfig     8  [ + ]   pinconfig             |   |   |-- main-rgmii1-pins-default
     pinconfig     9  [ + ]   pinconfig             |   |   |-- main-rgmii2-pins-default
     pinconfig    10  [   ]   pinconfig             |   |   |-- vdd-sd-dv-pins-default
     pinconfig    11  [   ]   pinconfig             |   |   |-- extcon-usb0-gpio-id-pins-default
     pinconfig    12  [   ]   pinconfig             |   |   |-- main-usb1-pins-default
     pinconfig    13  [   ]   pinconfig             |   |   `-- ospi0-pins-default
     serial        0  [ + ]   omap_serial           |   |-- serial@2800000
     i2c           0  [   ]   i2c_omap              |   |-- i2c@20000000
     i2c           1  [   ]   i2c_omap              |   |-- i2c@20010000
     gpio          0  [   ]   pca953x               |   |   `-- gpio@22
     gpio          1  [   ]   ti_dm6441_gpio        |   |-- gpio@600000
     gpio          2  [   ]   ti_dm6441_gpio        |   |-- gpio@601000
     mmc           0  [ + ]   am654_sdhci           |   |-- mmc@fa10000
     blk           0  [ + ]   mmc_blk               |   |   `-- mmc@fa10000.blk
     mmc           1  [ + ]   am654_sdhci           |   |-- mmc@fa00000
     blk           1  [   ]   mmc_blk               |   |   `-- mmc@fa00000.blk
     mmc           2  [ + ]   am654_sdhci           |   |-- mmc@fa20000
     blk           2  [   ]   mmc_blk               |   |   `-- mmc@fa20000.blk
     nop           0  [   ]   dwc3-ti               |   |-- dwc3-usb@f900000
     usb           0  [   ]   dwc3-generic-periphe  |   |   `-- usb@31000000
     nop           1  [   ]   dwc3-ti               |   |-- dwc3-usb@f910000
     usb           0  [   ]   dwc3-generic-host     |   |   `-- usb@31100000
     simple_bus    4  [   ]   simple_bus            |   |-- bus@fc00000
     spi           0  [   ]   cadence_spi           |   |   `-- spi@fc40000
     spi_flash     0  [   ]   jedec_spi_nor         |   |       `-- flash@0
     misc          0  [ + ]   am65_cpsw_nuss        |   `-- ethernet@8000000
     eth           0  [ + ]   am65_cpsw_nuss_port   |       `-- ethernet@8000000port@1
     regulator     0  [   ]   regulator_fixed       |-- regulator-0
     regulator     1  [   ]   regulator_fixed       |-- regulator-1
     regulator     2  [   ]   regulator_fixed       |-- regulator-2
     regulator     3  [   ]   regulator_fixed       |-- fixed-regulator-sd
     regulator     4  [   ]   gpio regulator        |-- gpio-regulator-TLV71033
     firmware      1  [   ]   psci                  `-- psci
    => gpio
    gpio - query and control gpio pins
    
    Usage:
    gpio <input|set|clear|toggle> <pin>
        - input/set/clear/toggle the specified pin
    gpio status [-a] [<bank> | <pin>]  - show [all/claimed] GPIOs
    => gpio status -a
    Bank gpio@22_:
    gpio@22_0: input: 1 [ ]
    gpio@22_1: input: 1 [ ]
    gpio@22_2: input: 1 [ ]
    gpio@22_3: output: 1 [ ]
    gpio@22_4: input: 0 [ ]
    gpio@22_5: input: 0 [ ]
    gpio@22_6: input: 0 [ ]
    gpio@22_7: input: 1 [ ]
    gpio@22_8: input: 1 [ ]
    gpio@22_9: input: 1 [ ]
    gpio@22_10: input: 1 [ ]
    gpio@22_11: input: 0 [ ]
    gpio@22_12: input: 1 [ ]
    gpio@22_13: input: 0 [ ]
    gpio@22_14: input: 0 [ ]
    gpio@22_15: input: 0 [ ]
    gpio@22_16: input: 1 [ ]
    gpio@22_17: input: 1 [ ]
    gpio@22_18: input: 0 [ ]
    gpio@22_19: input: 0 [ ]
    gpio@22_20: input: 1 [ ]
    gpio@22_21: input: 1 [ ]
    gpio@22_22: input: 1 [ ]
    gpio@22_23: input: 0 [ ]
    0: input: 0 [ ]
    1: input: 0 [ ]
    2: input: 0 [ ]
    3: input: 0 [ ]
    4: input: 0 [ ]
    5: input: 0 [ ]
    6: input: 0 [ ]
    7: input: 0 [ ]
    8: input: 0 [ ]
    9: input: 0 [ ]
    10: input: 0 [ ]
    11: input: 0 [ ]
    12: input: 0 [ ]
    13: input: 0 [ ]
    14: input: 0 [ ]
    15: input: 1 [ ]
    16: input: 1 [ ]
    17: input: 1 [ ]
    18: input: 1 [ ]
    19: input: 1 [ ]
    20: input: 1 [ ]
    21: input: 1 [ ]
    22: input: 1 [ ]
    23: input: 0 [ ]
    24: input: 0 [ ]
    25: input: 0 [ ]
    26: input: 0 [ ]
    27: input: 0 [ ]
    28: input: 0 [ ]
    29: input: 0 [ ]
    30: input: 0 [ ]
    31: output: 0 [ ]
    32: input: 0 [ ]
    33: input: 0 [ ]
    34: input: 0 [ ]
    35: input: 0 [ ]
    36: input: 0 [ ]
    37: input: 0 [ ]
    38: input: 0 [ ]
    39: input: 0 [ ]
    40: input: 0 [ ]
    41: input: 0 [ ]
    42: input: 0 [ ]
    43: input: 0 [ ]
    44: input: 0 [ ]
    45: input: 0 [ ]
    46: input: 0 [ ]
    47: input: 0 [ ]
    48: input: 0 [ ]
    49: input: 0 [ ]
    50: input: 0 [ ]
    51: input: 0 [ ]
    52: input: 0 [ ]
    53: input: 0 [ ]
    54: input: 0 [ ]
    55: input: 0 [ ]
    56: input: 0 [ ]
    57: input: 0 [ ]
    58: input: 0 [ ]
    59: input: 0 [ ]
    60: input: 0 [ ]
    61: input: 0 [ ]
    62: input: 0 [ ]
    63: input: 0 [ ]
    64: input: 0 [ ]
    65: input: 0 [ ]
    66: input: 0 [ ]
    67: input: 0 [ ]
    68: input: 0 [ ]
    69: input: 0 [ ]
    70: input: 0 [ ]
    71: input: 0 [ ]
    72: input: 0 [ ]
    73: input: 0 [ ]
    74: input: 0 [ ]
    75: input: 0 [ ]
    76: input: 0 [ ]
    77: input: 0 [ ]
    78: input: 0 [ ]
    79: input: 0 [ ]
    80: input: 0 [ ]
    81: input: 0 [ ]
    82: input: 0 [ ]
    83: input: 0 [ ]
    84: input: 0 [ ]
    85: input: 1 [ ]
    86: input: 0 [ ]
    0: input: 0 [ ]
    1: input: 0 [ ]
    2: input: 1 [ ]
    3: input: 0 [ ]
    4: input: 0 [ ]
    5: input: 0 [ ]
    6: input: 0 [ ]
    7: input: 1 [ ]
    8: input: 0 [ ]
    9: input: 0 [ ]
    10: input: 0 [ ]
    11: input: 0 [ ]
    12: input: 0 [ ]
    13: input: 1 [ ]
    14: input: 0 [ ]
    15: input: 0 [ ]
    16: input: 0 [ ]
    17: input: 0 [ ]
    18: input: 0 [ ]
    19: input: 0 [ ]
    20: input: 1 [ ]
    21: input: 0 [ ]
    22: input: 0 [ ]
    23: input: 0 [ ]
    24: input: 0 [ ]
    25: input: 0 [ ]
    26: input: 1 [ ]
    27: input: 1 [ ]
    28: input: 1 [ ]
    29: input: 1 [ ]
    30: input: 0 [ ]
    31: input: 0 [ ]
    32: input: 1 [ ]
    33: input: 1 [ ]
    34: input: 1 [ ]
    35: input: 1 [ ]
    36: input: 1 [ ]
    37: input: 1 [ ]
    38: input: 1 [ ]
    39: input: 1 [ ]
    40: input: 0 [ ]
    41: input: 1 [ ]
    42: input: 1 [ ]
    43: input: 1 [ ]
    44: input: 1 [ ]
    45: input: 1 [ ]
    46: input: 0 [ ]
    47: input: 1 [ ]
    48: input: 0 [ ]
    49: input: 0 [ ]
    50: input: 0 [ ]
    51: input: 0 [ ]
    52: input: 0 [ ]
    53: input: 0 [ ]
    54: input: 0 [ ]
    55: input: 0 [ ]
    56: input: 0 [ ]
    57: input: 0 [ ]
    58: input: 0 [ ]
    59: input: 0 [ ]
    60: input: 0 [ ]
    61: input: 0 [ ]
    62: input: 0 [ ]
    63: input: 0 [ ]
    64: input: 0 [ ]
    65: input: 0 [ ]
    66: input: 0 [ ]
    67: input: 0 [ ]
    68: input: 0 [ ]
    69: input: 0 [ ]
    70: input: 0 [ ]
    71: input: 0 [ ]
    72: input: 0 [ ]
    73: input: 0 [ ]
    74: input: 0 [ ]
    75: input: 0 [ ]
    76: input: 0 [ ]
    77: input: 0 [ ]
    78: input: 0 [ ]
    79: input: 0 [ ]
    80: input: 0 [ ]
    81: input: 0 [ ]
    82: input: 0 [ ]
    83: input: 0 [ ]
    84: input: 0 [ ]
    85: input: 0 [ ]
    86: input: 0 [ ]
    87: input: 0 [ ]
    =>