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.

Linux/TMDSLCDK138: No GPIO access

Part Number: TMDSLCDK138
Other Parts Discussed in Thread: OMAPL138

Tool/software: Linux

Hello,

I have a TMDSLCDK138 board with the original Arago sdk included in the sdcard of the evaluation kit.

The problem is that I can't use the GPIO because I don't have the /sys/class/gpio folder...

Do I have to recompile the sdk by adding the GPIO in the kernel?

Thank you in advance !

  • Hello,

    Can you have a look in '/sys/class/gpio/' folder ?

    Cheers,
    --Prabhakar Lad
  • Hello,

    I edited my post it is /sys/class/gpio and not /usr/class/gpio ... I don't have the GPIO folder.

    Thank you for helping me
  • Hello,

    Then you will have to rebuild the kernel with CONFIG_GPIO_SYSFS=y and CONFIG_SYSFS=y.

    Cheers,
    --Prabhakar Lad
  • Great, thank you !
  • Hello,

    Do you have a link on where I can start?
    Because I tried to recompile the meta-ti with Yocto/Openembedded, but for the MACHINE, omapl138 does not exist... And I don't know where to begin. Where do I have to do this ? "CONFIG_GPIO_SYSFS=y and CONFIG_SYSFS=y." I searched on the forum and TI website but found nothing interesting...

    Thank you !

  • Hello,

    Not sure about yocto, It should be in the linux source refer this link [1]

    [1]

    Cheers,

    --Prabhakar Lad

  • Yocto is not mandatory to compile/rebuild the kernel.

    Traditionally you use "git" to clone the source code from a git repository or download as a separate package and then use "make" build system to configur the build .


    If you are using the evaluation kit most probably you are using pre-built binaries.
    a1. Check if sysfs is mounted - "ls /sys/" if you find any directories under /sys that means sysfs is enabled and mounted.
    a2. If not, then try doing "mount -t sysfs sysfs /sys"

    a3. if it fails then check if sysfs is enabled by doing "zcat /proc/config.gz | grep CONFIG_SYSFS" you will see CONFIG_SYSFS=Y if it's enabled
    a4. CHeck if GPIO_SYSFS is enabled by doing "zcat /proc/config.gz | grep CONFIG_GPIO_SYSFS"

    ----
    If either SYSFS is not enabled or GPIO_SYSFS is not enabled then you need to rebuild the kernel.
    -------

    Below link you'll find a video presentation on how to get the source code and re-build the kernel : Look for "OMAPL1 Linux Boot Up Procedure"
    processors.wiki.ti.com/.../OMAPL1_PSP_WebEx_Presentations

    when you do "make da850_omapl13x_*_defconfig* " as mentioned in the presentation it creates a default ".config" file which is used for the kernel build.
    You need to modify this by doing "make menuconfig" and then press "/" to search and type "CONFIG_GPIO_SYSFS" it will list the location of the config option where you need to set teh value to "Y".
    Do the same for "CONFIG_SYSFS" if not enabled.

    Use the updated kernel image.

    Regards,
    RK

  • Thank you !

    sysfs is enabled I have this :

    root@omapl138-lcdk:~# ls /sys/
    block     class     devices   fs        module
    bus       dev       firmware  kernel    power
    root@omapl138-lcdk:~# zcat /proc/config.gz |grep CONFIG_GPIO_SYSFS
    # CONFIG_GPIO_SYSFS is not set
    root@omapl138-lcdk:~# zcat /proc/config.gz | grep CONFIG_SYSFS
    # CONFIG_SYSFS_DEPRECATED is not set
    CONFIG_SYSFS=y

    It seems I really don't have GPIOs enabled..

    I have a look at your link and I let you know !

  • I can't play the videos there is a problem with webex... Is there another way for seeing them? Or a link with the instructions without the video ?

    Thank you in advance