Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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.

AM625: Assistance Needed for SPI Driver and GPIO Configuration Issues on AM62x E3 Evaluation Board

Part Number: AM625
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Dear TI Support Team,

root@am62xx-evm:/# cd libgpiod-2.0
root@am62xx-evm:/libgpiod-2.0# LS
-sh: LS: command not found
root@am62xx-evm:/libgpiod-2.0# ls
COPYING      LICENSES     NEWS    TODO        autogen.sh      autostuff  config.log  configure.ac  include         lib  man    tools
Doxyfile.in  Makefile.am  README  aclocal.m4  autom4te.cache  bindings   configure   configure~    index_FDS.html  m4   tests
root@am62xx-evm:/libgpiod-2.0# sudo ./autogen.sh
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'autostuff'.
libtoolize: copying file 'autostuff/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: aclocal --force -I m4
autoreconf: running: /usr/bin/autoconf --force
configure.ac:75: warning: The macro 'AC_HEADER_STDC' is obsolete.
configure.ac:75: You should run autoupdate.
../autoconf-2.72e/lib/autoconf/headers.m4:663: AC_HEADER_STDC is expanded from...
configure.ac:75: the top level
configure.ac:203: error: Unexpanded AX_ macro found. Please install GNU autoconf-archive.
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: error: /usr/bin/autoconf failed with exit status: 1
root@am62xx-evm:/libgpiod-2.0#


I am currently working on the AM62x E3 evaluation board and am encountering issues with the SPI driver. Specifically, the spidev device is not appearing in the /dev/ directory. We have enabled SPI in the Device Tree Source (DTS) file and compiled it, following the guide provided on the TI website. However, the spidev device node still does not show up.

To further diagnose this issue, I would like to rule out any potential hardware-related problems. My plan is to configure the SPI pins as GPIO output pins and toggle them to check the voltage levels. If the voltage levels change, it would suggest that the issue lies within the Device Tree Binary (DTB) configuration.

To achieve this, I used TI’s SysConfig tool to configure the SPI pins as output pins with pull-down settings. The tool generated the corresponding DTSI file, and I integrated the pin configuration into the DTS file. The file compiled successfully, but I now need assistance toggling the GPIO pins through application code or commands to verify the voltage levels on the SPI0 pins.

Here’s what I have tried so far:

Accessing GPIO through sysfs:
I attempted to access the /sys/class/gpio directory to toggle the GPIO pins, but the directory is missing. Upon further research, I found that the sysfs interface for GPIO control has been deprecated, and suggestions point towards using libgpiod.

Using libgpiod:
I downloaded the libgpiod library from GitHub and tried to compile and build it locally. However, I encountered errors when executing the ./autogen.sh script. I have attached the error details for reference.

Could you please guide me on how to properly toggle the GPIO pins using application code, particularly to check the voltage levels on the SPI0 pins? Earlier, we used sysfs to easily export and control GPIOs, but with the deprecation of sysfs, I am uncertain about the correct method to proceed.

Your assistance would be greatly appreciated.

Thank you!

Best regards,
Raj

  • Hi Raj,

    Each pin has its own MUXMODE for different applications. For SPI pins, if the MUXMODE is 0, then they will support SPI.

    My plan is to configure the SPI pins as GPIO output pins and toggle them to check the voltage levels.

    If you want to use a pin as a GPIO, then you'll have to define it as GPIO in the device tree by setting the MUXMODE to 7.

    Upon further research, I found that the sysfs interface for GPIO control has been deprecated, and suggestions point towards using libgpiod.

    The new way is using Chardev interface: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1260373/faq-transitioning-the-gpio-userspace-interface-from-sysfs-to-chardev

    Depending on which SDK version you are using, the command flags are different so check the command's help menu with --help first.

    I downloaded the libgpiod library from GitHub and tried to compile and build it locally.

    Since this is not a TI product or software, we are not able to provide assistance with this on the E2E forums.

    For configuring the device tree to support GPIOs, you can refer to this E2E thread: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1268671/sk-am62-using-the-gpios-in-the-40-pin-user-expansion-port/4804378

    Best Regards,

    Anshu

  • Hai Anshu,

    I have loaded the default Debian image on my AM62x evaluation board and successfully installed gpiod using the following command:
    #sudo apt install gpiod
    After installation, I confirmed that the GPIO chips were detected by running gpiodetect, which displayed the available GPIO chip details.

    Following your previous advice, I used the SysConfig tool to configure the SPI pins as GPIO in mode 7. However, when I run gpioinfo, it shows all the GPIO pins as inputs with an active-high state by default. For my application, I need to toggle one of the GPIO pins.

    I attempted to set a pin to low with the following command:
    #gpioset gpiochip1 19=0
    When I run this command, the pin does get configured as an output, but its state does not change as expected. The voltage levels remain the same, and the pin does not go low. I tried executing the command with sudo as well, but the issue persists.

    This behavior occurs even with the default TI image. I suspect it could be related to a hardware configuration issue, as the voltage levels are not responding to changes in the command.

    Please find attached the relevant DTSI code for reference. Could you help me identify what might be causing this problem and guide me in resolving it?

    Even I have tried with the TI default image also , same issue I am facing. 

    Thank you for your assistance.

    /* in side of pmx0 i have added this lines */
    mygpio1_pins_default: mygpio1-pins-default {
            	pinctrl-single,pins = <
            	        AM62X_IOPAD(0x01d0, PIN_OUTPUT_PULLUP, 7) /* (A15) UART0_CTSn.GPIO1_22 */
                           AM62X_IOPAD(0x0088, PIN_OUTPUT, 7) /* (L24) GPMC0_OEn_REn.GPIO0_33 */
                 		AM62X_IOPAD(0x01b4, PIN_OUTPUT_PULLDOWN, 7) /* (A13) SPI0_CS0.GPIO1_15 */
    			AM62X_IOPAD(0x01bc, PIN_OUTPUT_PULLDOWN, 7) /* (A14) SPI0_CLK.GPIO1_17 */
    			AM62X_IOPAD(0x01c0, PIN_OUTPUT_PULLDOWN, 7) /* (B13) SPI0_D0.GPIO1_18 */
    			AM62X_IOPAD(0x01c4, PIN_OUTPUT_PULLDOWN, 7) /* (B14) SPI0_D1.GPIO1_19 */
    			AM62X_IOPAD(0x00ac, PIN_OUTPUT_PULLDOWN, 7) /* (l21) */
    			
            >;
    	};
    	
    	
    /*	out side of pmx0 i have added the node details*/
    &main_gpio0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mygpio1_pins_default>;
        status = "okay";
    };
    	

  • Hi Raj,

    Can you share the output of gpioinfo and gpiodetect? I want to know which module gpiochip1 is pointing to.

    gpiodetect will show which GPIO module is assigned to which chip. For GPIO1_19, you should be looking for an address of 0x601000.

    The device tree configuration seems fine right now.



    Best Regards,

    Anshu

  • Hai Anshu,

    Thank you for your support. I wanted to share the current issues we're encountering with the AM62x E3 evaluation board and request your guidance on addressing them.

    1. GPIO State Synchronization Issue
    We’ve been able to toggle the GPIO pins successfully on the hardware, as confirmed by observing the state changes with an oscilloscope. However, we’re seeing a discrepancy in the software, as the GPIO states are not updating accordingly. To aid in troubleshooting, I have attached the output of the gpiodetect and gpioinfo commands. The hardware appears to be functioning correctly, as confirmed by the signals on the SPI lines, so we suspect a potential software-related issue.

    Could you provide guidance on how to ensure proper synchronization of GPIO states in the software? Any insights on additional configuration steps we may need to check would be greatly appreciated.

    2. Enabling SPI on AM62x E3 Evaluation Board
    In addition, we are unable to locate the SPI device under the /dev directory. Could you provide instructions on enabling SPI functionality on the AM62x E3 evaluation board, including any necessary kernel module configurations or device tree adjustments?

    Your assistance on these matters would be invaluable to us.

    Thank you for your time and support.

    Best Regards

    Raj

    root@am62xx-evm:~# gpiodetect
    gpiochip0 [600000.gpio] (92 lines)
    gpiochip1 [601000.gpio] (52 lines)
    gpiochip2 [1-0022] (24 lines)
    root@am62xx-evm:~# gpioinfo
    gpiochip0 - 92 lines:
             line   0:      unnamed       unused   input  active-high
             line   1:      unnamed       unused   input  active-high
             line   2:      unnamed       unused   input  active-high
             line   3:      unnamed       unused   input  active-high
             line   4:      unnamed       unused   input  active-high
             line   5:      unnamed       unused   input  active-high
             line   6:      unnamed       unused   input  active-high
             line   7:      unnamed       unused   input  active-high
             line   8:      unnamed       unused   input  active-high
             line   9:      unnamed       unused   input  active-high
             line  10:      unnamed       unused   input  active-high
             line  11:      unnamed       unused   input  active-high
             line  12:      unnamed       unused   input  active-high
             line  13:      unnamed       unused   input  active-high
             line  14:      unnamed       unused   input  active-high
             line  15:      unnamed       unused   input  active-high
             line  16:      unnamed       unused   input  active-high
             line  17:      unnamed       unused   input  active-high
             line  18:      unnamed       unused   input  active-high
             line  19:      unnamed       unused   input  active-high
             line  20:      unnamed       unused  output  active-high
             line  21:      unnamed       unused   input  active-high
             line  22:      unnamed       unused   input  active-high
             line  23:      unnamed       unused   input  active-high
             line  24:      unnamed       unused   input  active-high
             line  25:      unnamed       unused   input  active-high
             line  26:      unnamed       unused   input  active-high
             line  27:      unnamed       unused   input  active-high
             line  28:      unnamed       unused   input  active-high
             line  29:      unnamed       unused   input  active-high
             line  30:      unnamed       unused   input  active-high
             line  31:      unnamed   "tlv71033"  output  active-high [used]
             line  32:      unnamed       unused   input  active-high
             line  33:      unnamed       unused   input  active-high
             line  34:      unnamed       unused   input  active-high
             line  35:      unnamed       unused   input  active-high
             line  36:      unnamed       unused   input  active-high
             line  37:      unnamed       unused   input  active-high
             line  38:      unnamed       unused   input  active-high
             line  39:      unnamed       unused   input  active-high
             line  40:      unnamed       unused   input  active-high
             line  41:      unnamed       unused   input  active-high
             line  42:      unnamed       unused   input  active-high
             line  43:      unnamed       unused   input  active-high
             line  44:      unnamed       unused   input  active-high
             line  45:      unnamed       unused   input  active-high
             line  46:      unnamed       unused   input  active-high
             line  47:      unnamed       unused   input  active-high
             line  48:      unnamed       unused   input  active-high
             line  49:      unnamed       unused   input  active-high
             line  50:      unnamed       unused   input  active-high
             line  51:      unnamed       unused   input  active-high
             line  52:      unnamed       unused   input  active-high
             line  53:      unnamed       unused   input  active-high
             line  54:      unnamed       unused   input  active-high
             line  55:      unnamed       unused   input  active-high
             line  56:      unnamed       unused   input  active-high
             line  57:      unnamed       unused   input  active-high
             line  58:      unnamed       unused   input  active-high
             line  59:      unnamed       unused   input  active-high
             line  60:      unnamed       unused   input  active-high
             line  61:      unnamed       unused   input  active-high
             line  62:      unnamed       unused   input  active-high
             line  63:      unnamed       unused   input  active-high
             line  64:      unnamed       unused   input  active-high
             line  65:      unnamed       unused   input  active-high
             line  66:      unnamed       unused   input  active-high
             line  67:      unnamed       unused   input  active-high
             line  68:      unnamed       unused   input  active-high
             line  69:      unnamed       unused   input  active-high
             line  70:      unnamed       unused   input  active-high
             line  71:      unnamed       unused   input  active-high
             line  72:      unnamed       unused   input  active-high
             line  73:      unnamed       unused   input  active-high
             line  74:      unnamed       unused   input  active-high
             line  75:      unnamed       unused   input  active-high
             line  76:      unnamed       unused   input  active-high
             line  77:      unnamed       unused   input  active-high
             line  78:      unnamed       unused   input  active-high
             line  79:      unnamed       unused   input  active-high
             line  80:      unnamed       unused   input  active-high
             line  81:      unnamed       unused   input  active-high
             line  82:      unnamed       unused   input  active-high
             line  83:      unnamed       unused   input  active-high
             line  84:      unnamed       unused   input  active-high
             line  85:      unnamed       unused   input  active-high
             line  86:      unnamed       unused   input  active-high
             line  87:      unnamed       unused   input  active-high
             line  88:      unnamed       unused   input  active-high
             line  89:      unnamed       unused   input  active-high
             line  90:      unnamed       unused   input  active-high
             line  91:      unnamed       unused   input  active-high
    gpiochip1 - 52 lines:
             line   0:      unnamed       unused   input  active-high
             line   1:      unnamed       unused   input  active-high
             line   2:      unnamed       unused   input  active-high
             line   3:      unnamed       unused   input  active-high
             line   4:      unnamed       unused   input  active-high
             line   5:      unnamed       unused   input  active-high
             line   6:      unnamed       unused   input  active-high
             line   7:      unnamed       unused   input  active-high
             line   8:      unnamed       unused   input  active-high
             line   9:      unnamed       unused   input  active-high
             line  10:      unnamed       unused   input  active-high
             line  11:      unnamed       unused   input  active-high
             line  12:      unnamed       unused   input  active-high
             line  13:      unnamed       unused   input  active-high
             line  14:      unnamed       unused   input  active-high
             line  15:      unnamed       unused   input  active-high
             line  16:      unnamed       unused   input  active-high
             line  17:      unnamed       unused   input  active-high
             line  18:      unnamed       unused   input  active-high
             line  19:      unnamed       unused   input  active-high
             line  20:      unnamed       unused   input  active-high
             line  21:      unnamed       unused   input  active-high
             line  22:      unnamed       unused   input  active-high
             line  23:      unnamed       unused   input  active-high
             line  24:      unnamed       unused   input  active-high
             line  25:      unnamed       unused   input  active-high
             line  26:      unnamed       unused   input  active-high
             line  27:      unnamed       unused   input  active-high
             line  28:      unnamed       unused   input  active-high
             line  29:      unnamed       unused   input  active-high
             line  30:      unnamed       unused   input  active-high
             line  31:      unnamed       unused   input  active-high
             line  32:      unnamed       unused   input  active-high
             line  33:      unnamed       unused   input  active-high
             line  34:      unnamed       unused   input  active-high
             line  35:      unnamed       unused   input  active-high
             line  36:      unnamed       unused   input  active-high
             line  37:      unnamed       unused   input  active-high
             line  38:      unnamed       unused   input  active-high
             line  39:      unnamed       unused   input  active-high
             line  40:      unnamed       unused   input  active-high
             line  41:      unnamed       unused   input  active-high
             line  42:      unnamed       unused   input  active-high
             line  43:      unnamed       unused   input  active-high
             line  44:      unnamed       unused   input  active-high
             line  45:      unnamed       unused   input  active-high
             line  46:      unnamed       unused   input  active-high
             line  47:      unnamed       unused   input  active-high
             line  48:      unnamed       unused   input  active-high
             line  49:      unnamed "am62-sk:green:heartbeat_none" output 
    active-high [used]
             line  50:      unnamed       unused   input  active-high
             line  51:      unnamed       unused   input  active-high
    gpiochip2 - 24 lines:
             line   0: "GPIO_CPSW2_RST" unused input active-high
             line   1: "GPIO_CPSW1_RST" unused input active-high
             line   2: "PRU_DETECT"       unused   input  active-high
             line   3: "MMC1_SD_EN" "regulator-3" output active-high [used]
             line   4: "VPP_LDO_EN"       unused   input  active-high
             line   5: "EXP_PS_3V3_En" unused input active-high
             line   6: "EXP_PS_5V0_En" unused input active-high
             line   7: "EXP_HAT_DETECT" unused input active-high
             line   8: "GPIO_AUD_RSTn" unused input active-high
             line   9: "GPIO_eMMC_RSTn" unused input active-high
             line  10: "UART1_FET_BUF_EN" unused input active-high
             line  11:   "WL_LT_EN"       unused   input  active-high
             line  12: "GPIO_HDMI_RSTn" unused input active-high
             line  13:  "CSI_GPIO1"       unused   input  active-high
             line  14:  "CSI_GPIO2"       unused   input  active-high
             line  15: "PRU_3V3_EN"       unused   input  active-high
             line  16:  "HDMI_INTn"  "interrupt"   input  active-high [used]
             line  17: "PD_I2C_IRQ"       unused   input  active-high
             line  18: "MCASP1_FET_EN" unused input active-high
             line  19: "MCASP1_BUF_BT_EN" unused input active-high
             line  20: "MCASP1_FET_SEL" unused output active-high
             line  21: "UART1_FET_SEL" unused input active-high
             line  22:     "TSINT#"       unused   input  active-high
             line  23: "IO_EXP_TEST_LED" unused input active-high
    
    
    
    
    
    		root@am62xx-evm:~# gpioset gpiochip1 19=1 root@am62xx-evm:~# gpioinfo
    gpiochip0 - 92 lines:
             line   0:      unnamed       unused   input  active-high
             line   1:      unnamed       unused   input  active-high
             line   2:      unnamed       unused   input  active-high
             line   3:      unnamed       unused   input  active-high
             line   4:      unnamed       unused   input  active-high
             line   5:      unnamed       unused   input  active-high
             line   6:      unnamed       unused   input  active-high
             line   7:      unnamed       unused   input  active-high
             line   8:      unnamed       unused   input  active-high
             line   9:      unnamed       unused   input  active-high
             line  10:      unnamed       unused   input  active-high
             line  11:      unnamed       unused   input  active-high
             line  12:      unnamed       unused   input  active-high
             line  13:      unnamed       unused   input  active-high
             line  14:      unnamed       unused   input  active-high
             line  15:      unnamed       unused   input  active-high
             line  16:      unnamed       unused   input  active-high
             line  17:      unnamed       unused   input  active-high
             line  18:      unnamed       unused   input  active-high
             line  19:      unnamed       unused   input  active-high
             line  20:      unnamed       unused  output  active-high
             line  21:      unnamed       unused   input  active-high
             line  22:      unnamed       unused   input  active-high
             line  23:      unnamed       unused   input  active-high
             line  24:      unnamed       unused   input  active-high
             line  25:      unnamed       unused   input  active-high
             line  26:      unnamed       unused   input  active-high
             line  27:      unnamed       unused   input  active-high
             line  28:      unnamed       unused   input  active-high
             line  29:      unnamed       unused   input  active-high
             line  30:      unnamed       unused   input  active-high
             line  31:      unnamed   "tlv71033"  output  active-high [used]
             line  32:      unnamed       unused   input  active-high
             line  33:      unnamed       unused   input  active-high
             line  34:      unnamed       unused   input  active-high
             line  35:      unnamed       unused   input  active-high
             line  36:      unnamed       unused   input  active-high
             line  37:      unnamed       unused   input  active-high
             line  38:      unnamed       unused   input  active-high
             line  39:      unnamed       unused   input  active-high
             line  40:      unnamed       unused   input  active-high
             line  41:      unnamed       unused   input  active-high
             line  42:      unnamed       unused   input  active-high
             line  43:      unnamed       unused   input  active-high
             line  44:      unnamed       unused   input  active-high
             line  45:      unnamed       unused   input  active-high
             line  46:      unnamed       unused   input  active-high
             line  47:      unnamed       unused   input  active-high
             line  48:      unnamed       unused   input  active-high
             line  49:      unnamed       unused   input  active-high
             line  50:      unnamed       unused   input  active-high
             line  51:      unnamed       unused   input  active-high
             line  52:      unnamed       unused   input  active-high
             line  53:      unnamed       unused   input  active-high
             line  54:      unnamed       unused   input  active-high
             line  55:      unnamed       unused   input  active-high
             line  56:      unnamed       unused   input  active-high
             line  57:      unnamed       unused   input  active-high
             line  58:      unnamed       unused   input  active-high
             line  59:      unnamed       unused   input  active-high
             line  60:      unnamed       unused   input  active-high
             line  61:      unnamed       unused   input  active-high
             line  62:      unnamed       unused   input  active-high
             line  63:      unnamed       unused   input  active-high
             line  64:      unnamed       unused   input  active-high
             line  65:      unnamed       unused   input  active-high
             line  66:      unnamed       unused   input  active-high
             line  67:      unnamed       unused   input  active-high
             line  68:      unnamed       unused   input  active-high
             line  69:      unnamed       unused   input  active-high
             line  70:      unnamed       unused   input  active-high
             line  71:      unnamed       unused   input  active-high
             line  72:      unnamed       unused   input  active-high
             line  73:      unnamed       unused   input  active-high
             line  74:      unnamed       unused   input  active-high
             line  75:      unnamed       unused   input  active-high
             line  76:      unnamed       unused   input  active-high
             line  77:      unnamed       unused   input  active-high
             line  78:      unnamed       unused   input  active-high
             line  79:      unnamed       unused   input  active-high
             line  80:      unnamed       unused   input  active-high
             line  81:      unnamed       unused   input  active-high
             line  82:      unnamed       unused   input  active-high
             line  83:      unnamed       unused   input  active-high
             line  84:      unnamed       unused   input  active-high
             line  85:      unnamed       unused   input  active-high
             line  86:      unnamed       unused   input  active-high
             line  87:      unnamed       unused   input  active-high
             line  88:      unnamed       unused   input  active-high
             line  89:      unnamed       unused   input  active-high
             line  90:      unnamed       unused   input  active-high
             line  91:      unnamed       unused   input  active-high
    gpiochip1 - 52 lines:
             line   0:      unnamed       unused   input  active-high
             line   1:      unnamed       unused   input  active-high
             line   2:      unnamed       unused   input  active-high
             line   3:      unnamed       unused   input  active-high
             line   4:      unnamed       unused   input  active-high
             line   5:      unnamed       unused   input  active-high
             line   6:      unnamed       unused   input  active-high
             line   7:      unnamed       unused   input  active-high
             line   8:      unnamed       unused   input  active-high
             line   9:      unnamed       unused   input  active-high
             line  10:      unnamed       unused   input  active-high
             line  11:      unnamed       unused   input  active-high
             line  12:      unnamed       unused   input  active-high
             line  13:      unnamed       unused   input  active-high
             line  14:      unnamed       unused   input  active-high
             line  15:      unnamed       unused   input  active-high
             line  16:      unnamed       unused   input  active-high
             line  17:      unnamed       unused   input  active-high
             line  18:      unnamed       unused   input  active-high
             line  19:      unnamed       unused  output  active-high
             line  20:      unnamed       unused   input  active-high
             line  21:      unnamed       unused   input  active-high
             line  22:      unnamed       unused   input  active-high
             line  23:      unnamed       unused   input  active-high
             line  24:      unnamed       unused   input  active-high
             line  25:      unnamed       unused   input  active-high
             line  26:      unnamed       unused   input  active-high
             line  27:      unnamed       unused   input  active-high
             line  28:      unnamed       unused   input  active-high
             line  29:      unnamed       unused   input  active-high
             line  30:      unnamed       unused   input  active-high
             line  31:      unnamed       unused   input  active-high
             line  32:      unnamed       unused   input  active-high
             line  33:      unnamed       unused   input  active-high
             line  34:      unnamed       unused   input  active-high
             line  35:      unnamed       unused   input  active-high
             line  36:      unnamed       unused   input  active-high
             line  37:      unnamed       unused   input  active-high
             line  38:      unnamed       unused   input  active-high
             line  39:      unnamed       unused   input  active-high
             line  40:      unnamed       unused   input  active-high
             line  41:      unnamed       unused   input  active-high
             line  42:      unnamed       unused   input  active-high
             line  43:      unnamed       unused   input  active-high
             line  44:      unnamed       unused   input  active-high
             line  45:      unnamed       unused   input  active-high
             line  46:      unnamed       unused   input  active-high
             line  47:      unnamed       unused   input  active-high
             line  48:      unnamed       unused   input  active-high
             line  49:      unnamed "am62-sk:green:heartbeat_none" output 
    active-high [used]
             line  50:      unnamed       unused   input  active-high
             line  51:      unnamed       unused   input  active-high
    gpiochip2 - 24 lines:
             line   0: "GPIO_CPSW2_RST" unused input active-high
             line   1: "GPIO_CPSW1_RST" unused input active-high
             line   2: "PRU_DETECT"       unused   input  active-high
             line   3: "MMC1_SD_EN" "regulator-3" output active-high [used]
             line   4: "VPP_LDO_EN"       unused   input  active-high
             line   5: "EXP_PS_3V3_En" unused input active-high
             line   6: "EXP_PS_5V0_En" unused input active-high
             line   7: "EXP_HAT_DETECT" unused input active-high
             line   8: "GPIO_AUD_RSTn" unused input active-high
             line   9: "GPIO_eMMC_RSTn" unused input active-high
             line  10: "UART1_FET_BUF_EN" unused input active-high
             line  11:   "WL_LT_EN"       unused   input  active-high
             line  12: "GPIO_HDMI_RSTn" unused input active-high
             line  13:  "CSI_GPIO1"       unused   input  active-high
             line  14:  "CSI_GPIO2"       unused   input  active-high
             line  15: "PRU_3V3_EN"       unused   input  active-high
             line  16:  "HDMI_INTn"  "interrupt"   input  active-high [used]
             line  17: "PD_I2C_IRQ"       unused   input  active-high
             line  18: "MCASP1_FET_EN" unused input active-high
             line  19: "MCASP1_BUF_BT_EN" unused input active-high
             line  20: "MCASP1_FET_SEL" unused output active-high
             line  21: "UART1_FET_SEL" unused input active-high
             line  22:     "TSINT#"       unused   input  active-high
             line  23: "IO_EXP_TEST_LED" unused input active-high root@am62xx-evm:~#
    
    
    
    
    root@am62xx-evm:~# gpioset gpiochip1 19=0 root@am62xx-evm:~# gpioinfo
    gpiochip0 - 92 lines:
             line   0:      unnamed       unused   input  active-high
             line   1:      unnamed       unused   input  active-high
             line   2:      unnamed       unused   input  active-high
             line   3:      unnamed       unused   input  active-high
             line   4:      unnamed       unused   input  active-high
             line   5:      unnamed       unused   input  active-high
             line   6:      unnamed       unused   input  active-high
             line   7:      unnamed       unused   input  active-high
             line   8:      unnamed       unused   input  active-high
             line   9:      unnamed       unused   input  active-high
             line  10:      unnamed       unused   input  active-high
             line  11:      unnamed       unused   input  active-high
             line  12:      unnamed       unused   input  active-high
             line  13:      unnamed       unused   input  active-high
             line  14:      unnamed       unused   input  active-high
             line  15:      unnamed       unused   input  active-high
             line  16:      unnamed       unused   input  active-high
             line  17:      unnamed       unused   input  active-high
             line  18:      unnamed       unused   input  active-high
             line  19:      unnamed       unused   input  active-high
             line  20:      unnamed       unused  output  active-high
             line  21:      unnamed       unused   input  active-high
             line  22:      unnamed       unused   input  active-high
             line  23:      unnamed       unused   input  active-high
             line  24:      unnamed       unused   input  active-high
             line  25:      unnamed       unused   input  active-high
             line  26:      unnamed       unused   input  active-high
             line  27:      unnamed       unused   input  active-high
             line  28:      unnamed       unused   input  active-high
             line  29:      unnamed       unused   input  active-high
             line  30:      unnamed       unused   input  active-high
             line  31:      unnamed   "tlv71033"  output  active-high [used]
             line  32:      unnamed       unused   input  active-high
             line  33:      unnamed       unused   input  active-high
             line  34:      unnamed       unused   input  active-high
             line  35:      unnamed       unused   input  active-high
             line  36:      unnamed       unused   input  active-high
             line  37:      unnamed       unused   input  active-high
             line  38:      unnamed       unused   input  active-high
             line  39:      unnamed       unused   input  active-high
             line  40:      unnamed       unused   input  active-high
             line  41:      unnamed       unused   input  active-high
             line  42:      unnamed       unused   input  active-high
             line  43:      unnamed       unused   input  active-high
             line  44:      unnamed       unused   input  active-high
             line  45:      unnamed       unused   input  active-high
             line  46:      unnamed       unused   input  active-high
             line  47:      unnamed       unused   input  active-high
             line  48:      unnamed       unused   input  active-high
             line  49:      unnamed       unused   input  active-high
             line  50:      unnamed       unused   input  active-high
             line  51:      unnamed       unused   input  active-high
             line  52:      unnamed       unused   input  active-high
             line  53:      unnamed       unused   input  active-high
             line  54:      unnamed       unused   input  active-high
             line  55:      unnamed       unused   input  active-high
             line  56:      unnamed       unused   input  active-high
             line  57:      unnamed       unused   input  active-high
             line  58:      unnamed       unused   input  active-high
             line  59:      unnamed       unused   input  active-high
             line  60:      unnamed       unused   input  active-high
             line  61:      unnamed       unused   input  active-high
             line  62:      unnamed       unused   input  active-high
             line  63:      unnamed       unused   input  active-high
             line  64:      unnamed       unused   input  active-high
             line  65:      unnamed       unused   input  active-high
             line  66:      unnamed       unused   input  active-high
             line  67:      unnamed       unused   input  active-high
             line  68:      unnamed       unused   input  active-high
             line  69:      unnamed       unused   input  active-high
             line  70:      unnamed       unused   input  active-high
             line  71:      unnamed       unused   input  active-high
             line  72:      unnamed       unused   input  active-high
             line  73:      unnamed       unused   input  active-high
             line  74:      unnamed       unused   input  active-high
             line  75:      unnamed       unused   input  active-high
             line  76:      unnamed       unused   input  active-high
             line  77:      unnamed       unused   input  active-high
             line  78:      unnamed       unused   input  active-high
             line  79:      unnamed       unused   input  active-high
             line  80:      unnamed       unused   input  active-high
             line  81:      unnamed       unused   input  active-high
             line  82:      unnamed       unused   input  active-high
             line  83:      unnamed       unused   input  active-high
             line  84:      unnamed       unused   input  active-high
             line  85:      unnamed       unused   input  active-high
             line  86:      unnamed       unused   input  active-high
             line  87:      unnamed       unused   input  active-high
             line  88:      unnamed       unused   input  active-high
             line  89:      unnamed       unused   input  active-high
             line  90:      unnamed       unused   input  active-high
             line  91:      unnamed       unused   input  active-high
    gpiochip1 - 52 lines:
             line   0:      unnamed       unused   input  active-high
             line   1:      unnamed       unused   input  active-high
             line   2:      unnamed       unused   input  active-high
             line   3:      unnamed       unused   input  active-high
             line   4:      unnamed       unused   input  active-high
             line   5:      unnamed       unused   input  active-high
             line   6:      unnamed       unused   input  active-high
             line   7:      unnamed       unused   input  active-high
             line   8:      unnamed       unused   input  active-high
             line   9:      unnamed       unused   input  active-high
             line  10:      unnamed       unused   input  active-high
             line  11:      unnamed       unused   input  active-high
             line  12:      unnamed       unused   input  active-high
             line  13:      unnamed       unused   input  active-high
             line  14:      unnamed       unused   input  active-high
             line  15:      unnamed       unused   input  active-high
             line  16:      unnamed       unused   input  active-high
             line  17:      unnamed       unused   input  active-high
             line  18:      unnamed       unused   input  active-high
             line  19:      unnamed       unused  output  active-high
             line  20:      unnamed       unused   input  active-high
             line  21:      unnamed       unused   input  active-high
             line  22:      unnamed       unused   input  active-high
             line  23:      unnamed       unused   input  active-high
             line  24:      unnamed       unused   input  active-high
             line  25:      unnamed       unused   input  active-high
             line  26:      unnamed       unused   input  active-high
             line  27:      unnamed       unused   input  active-high
             line  28:      unnamed       unused   input  active-high
             line  29:      unnamed       unused   input  active-high
             line  30:      unnamed       unused   input  active-high
             line  31:      unnamed       unused   input  active-high
             line  32:      unnamed       unused   input  active-high
             line  33:      unnamed       unused   input  active-high
             line  34:      unnamed       unused   input  active-high
             line  35:      unnamed       unused   input  active-high
             line  36:      unnamed       unused   input  active-high
             line  37:      unnamed       unused   input  active-high
             line  38:      unnamed       unused   input  active-high
             line  39:      unnamed       unused   input  active-high
             line  40:      unnamed       unused   input  active-high
             line  41:      unnamed       unused   input  active-high
             line  42:      unnamed       unused   input  active-high
             line  43:      unnamed       unused   input  active-high
             line  44:      unnamed       unused   input  active-high
             line  45:      unnamed       unused   input  active-high
             line  46:      unnamed       unused   input  active-high
             line  47:      unnamed       unused   input  active-high
             line  48:      unnamed       unused   input  active-high
             line  49:      unnamed "am62-sk:green:heartbeat_none" output 
    active-high [used]
             line  50:      unnamed       unused   input  active-high
             line  51:      unnamed       unused   input  active-high
    gpiochip2 - 24 lines:
             line   0: "GPIO_CPSW2_RST" unused input active-high
             line   1: "GPIO_CPSW1_RST" unused input active-high
             line   2: "PRU_DETECT"       unused   input  active-high
             line   3: "MMC1_SD_EN" "regulator-3" output active-high [used]
             line   4: "VPP_LDO_EN"       unused   input  active-high
             line   5: "EXP_PS_3V3_En" unused input active-high
             line   6: "EXP_PS_5V0_En" unused input active-high
             line   7: "EXP_HAT_DETECT" unused input active-high
             line   8: "GPIO_AUD_RSTn" unused input active-high
             line   9: "GPIO_eMMC_RSTn" unused input active-high
             line  10: "UART1_FET_BUF_EN" unused input active-high
             line  11:   "WL_LT_EN"       unused   input  active-high
             line  12: "GPIO_HDMI_RSTn" unused input active-high
             line  13:  "CSI_GPIO1"       unused   input  active-high
             line  14:  "CSI_GPIO2"       unused   input  active-high
             line  15: "PRU_3V3_EN"       unused   input  active-high
             line  16:  "HDMI_INTn"  "interrupt"   input  active-high [used]
             line  17: "PD_I2C_IRQ"       unused   input  active-high
             line  18: "MCASP1_FET_EN" unused input active-high
             line  19: "MCASP1_BUF_BT_EN" unused input active-high
             line  20: "MCASP1_FET_SEL" unused output active-high
             line  21: "UART1_FET_SEL" unused input active-high
             line  22:     "TSINT#"       unused   input  active-high
             line  23: "IO_EXP_TEST_LED" unused input active-high root@am62xx-evm:~#
    
    
    
    /* These are the commands for the toggling but in the software it is not updating
    
    
    root@am62xx-evm:~# sudo echo 0 > /sys/class/gpio/gpio417/value root@am62xx-evm:~# root@am62xx-evm:~# clear
    
    root@am62xx-evm:~# sudo echo 1 > /sys/class/gpio/gpio417/value root@am62xx-evm:~# cat /sys/class/gpio/gpio417/value
    0
    root@am62xx-evm:~# sudo echo 1 > /sys/class/gpio/gpio383/value root@am62xx-evm:~# sudo echo 1 > /sys/class/gpio/gpio384/value root@am62xx-evm:~# sudo echo 1 > /sys/class/gpio/gpio385/value root@am62xx-evm:~# sudo echo 1 > /sys/class/gpio/gpio386/value root@am62xx-evm:~# sudo echo 1 > /sys/class/gpio/gpio387/value root@am62xx-evm:~# cat /sys/class/gpio/gpio383/value
    0
    root@am62xx-evm:~# cat /sys/class/gpio/gpio384/value
    0
    root@am62xx-evm:~# cat /sys/class/gpio/gpio385/value
    0
    root@am62xx-evm:~# cat /sys/class/gpio/gpio386/value
    0
    root@am62xx-evm:~# cat /sys/class/gpio/gpio387/value
    
    
    /*The output value not changing after the changing of value to 1 of each gpio pin . it is not updating*/
    
    

  • Hi Raj,

    we’re seeing a discrepancy in the software, as the GPIO states are not updating accordingly.

    How was the gpio number calculated for the sysfs commands?

    In addition, we are unable to locate the SPI device under the /dev directory. Could you provide instructions on enabling SPI functionality on the AM62x E3 evaluation board, including any necessary kernel module configurations or device tree adjustments

    Please create separate E2E thread for this item. If you search through the E2E forums, there are examples on how to do this.

    Best Regards,

    Anshu