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.

AM5718: GPIOs are not working as expected

Guru 10295 points

Part Number: AM5718

Hi Support Team,


Our customer has asked us if some GPIOs are not working as expected as shown below,
and could you please tell us the possible causes and how to investigate the causes.
I would appreciate your confirmation and response.


【Problems】
-For some GPIOs, the gpio/value setting and the output voltage do not match.
(The output voltage does not go High even though it is set to High.)
-Some GPIOs can be controlled as expected, and some cannot be controlled.

【Details】
The attached text shows the information in # cat /sys/kernel/debug/gpio.

/mnt/home/program/build_cross # echo 0 > /sys/class/gpio/gpio167/value
/mnt/home/program/build_cross # echo 1 > /sys/class/gpio/gpio167/value
/mnt/home/program/build_cross # cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 0-31, parent: platform/4ae10000.gpio, gpio-0-31:
 gpio-5   (                    |sysfs               ) in  lo
 gpio-14  (                    |sysfs               ) in  lo
 gpio-22  (                    |sysfs               ) in  lo
 gpio-23  (                    |sysfs               ) in  lo
 gpio-24  (                    |sysfs               ) in  lo
 gpio-25  (                    |sysfs               ) in  lo

gpiochip1: GPIOs 32-63, parent: platform/48055000.gpio, gpio-32-63:
 gpio-54  (                    |sysfs               ) in  lo

gpiochip2: GPIOs 64-95, parent: platform/48057000.gpio, gpio-64-95:
 gpio-92  (                    |sysfs               ) out lo
 gpio-93  (                    |sysfs               ) out hi

gpiochip3: GPIOs 96-127, parent: platform/48059000.gpio, gpio-96-127:
 gpio-102 (                    |sysfs               ) out hi
 gpio-105 (                    |sysfs               ) out hi
 gpio-106 (                    |sysfs               ) out hi
 gpio-107 (                    |sysfs               ) out hi
 gpio-108 (                    |sysfs               ) out hi

gpiochip4: GPIOs 128-159, parent: platform/4805b000.gpio, gpio-128-159:
 gpio-146 (                    |sysfs               ) in  hi IRQ
 gpio-147 (                    |sysfs               ) out hi

gpiochip5: GPIOs 160-191, parent: platform/4805d000.gpio, gpio-160-191:
 gpio-167 (                    |sysfs               ) out hi
 gpio-170 (                    |sysfs               ) in  lo
 gpio-180 (                    |sysfs               ) out hi
 gpio-187 (                    |sysfs               ) in  lo
 gpio-188 (                    |sub-lcd-backlight   ) out lo
 gpio-191 (                    |vtt_fixed           ) out hi

gpiochip6: GPIOs 192-223, parent: platform/48051000.gpio, gpio-192-223:
 gpio-194 (                    |sysfs               ) in  lo
 gpio-195 (                    |sysfs               ) out hi
 gpio-198 (                    |sysfs               ) out hi
 gpio-203 (                    |sysfs               ) in  hi
 gpio-206 (                    |sysfs               ) out hi
 gpio-207 (                    |sysfs               ) out hi
 gpio-209 (                    |sysfs               ) in  lo
 gpio-216 (                    |sysfs               ) in  lo
 gpio-219 (                    |sysfs               ) in  lo

gpiochip7: GPIOs 224-255, parent: platform/48053000.gpio, gpio-224-255:

gpiochip9: GPIOs 502-503, parent: platform/50000000.gpmc, omap-gpmc:

gpiochip8: GPIOs 504-511, parent: platform/48070000.i2c:tps659038@58:tps659038_gpio, 48070000.i2c:tps659038@58:tps659038_gpio, can sleep:
/mnt/home/program/build_cross #

Although we have not confirmed the output of all GPIOs, there are some pins
whose GPIO output does not follow the settings.

At the moment, GPIO7_6 (GPIO198) is set to out hi.
If we measure the output voltage, we can see that it is low.

# echo 1 > /sys/class/gpio/gpio198/value
Even if I do something like this, the output voltage does not change.

To eliminate the influence of peripheral circuits, the series resistor near the GPIO pin is removed,
and the voltage is measured on the GPIO pin side.

GPIO4_9 (GPIO105) and GPIO7_14 (GPIO206) output High as expected.

# echo 0 > /sys/class/gpio/gpio105/value
So, we can confirm that the output switches from High to Low.


【Other Customers' status】
1. The version of the SDK
 ti-processor-sdk-linux-am57xx-evm-06.03.00.106
 linux 4.19

2.The following register values for each GPIO pin
-GPIO7_6 (T7) gpmc_a3 pin
Table 18-1098. CTRL_CORE_PAD_GPMC_A3
gpmc_a3=00040102

-GPIO4_9 (F5) vin2a_d8 pin
Table 18-1196. CTRL_CORE_PAD_VIN2A_D8
vin2a_d8=0004000e

-GPIO7_14 (A26) spi2_sclk pin
Table 18-1480. CTRL_CORE_PAD_SPI2_SCLK
spi2_sclk=0004000e

3. Register value of GPIO_DATAOUT after executing the following command.
    # echo 1 > /sys/class/gpio/gpio198/value   
   GPIO_DATAOUT: 0x0000C048

If you need other information, please let me know.

Best regards,
Kanae


  • Hi Support Team,

    I need to report this to my customer.

    So please let me know when you will reply to my question,
    at least a schedule.

    Best regards,
    Kanae

  • Hi Kanae,

    This could be due to mux settings being incorrect. You can check the file in U-Boot:

    board/ti/am57xx/mux_data.h

    Example:

    {GPMC_A12, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_a12.gpio2_2 */
    {GPMC_A13, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_a13.gpio2_3 */
    {GPMC_A14, (M14 | PIN_INPUT_PULLUP)}, /* gpmc_a14.gpio2_4 */
    {GPMC_A15, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_a15.gpio2_5 */
    {GPMC_A16, (M14 | PIN_INPUT_PULLDOWN)}, /* gpmc_a16.gpio2_6 */

    Please verify that for every pin that you want to configure as GPIO if the pin mux is set correctly.

    - Keerthy

  • Hi Keerthy,

    Thank you for your reply.

    I will share the information with my customer and
    post the customer's confirm results in this thread.

    Best regards,
    Kanae