AnsweredAssumed Answered

Problem Configuring GPIO L5.4 on I.MX6UL-EVK

Question asked by Jay Hunt on May 11, 2020
Latest reply on May 12, 2020 by Jay Hunt



I'm having problems configuring the GPIO on my imx6ul-evk... I've built L5.4.3 as follows:

$ repo init -u -b imx-linux-zeus -m imx-5.4.3-1.0.0.xml
$ repo sync  
$ DISTRO=fsl-imx-fb MACHINE=imx6ulevk source -b build-fb
//Added imx-test utilities to local.conf
$ bitbake core-image-base

I uploaded the core-image-base-imx6ulevk.wic.bz2 image on to the sdcard and booted the imx6ul-evk.  At the u-boot prompt I did: 

=>setenv fdt_file imx6ul-14x14-evk.dtb


and rebooted.


I'm using the imx6ul-14x14-evk.dtb that is the default for L5.4.3.1.


The problem is that when I try to configure GPIO using sysfs, with 

echo 115 > /sys/class/gpio/export

the GPIO port is not listed in $ ls /sys/class/gpio afterwards.

I'm having the same problem as in Simple GPIO Example - quandry  and usedBiyong Sun's example using memtool to check the IOMUX:


One important thing, you need to check the IOMUX you configured is correct for GPIO.


root@imx6qdlsolo:~# echo 115 > /sys/class/gpio/export
root@imx6qdlsolo:~# /unit_tests/memtool 0x20a8004 1
Reading 0x1 count starting at address 0x020A8004

0x020A8004:  0E050000


However the result I get is 

root@imx6ulevk:/unit_tests# ./memtool 0x20a8004 1
Reading 0x1 count starting at address 0x020A8004

0x020A8004: 00800400


I'm a bit new to linux on embedded systems ... where should I start to debug this?