Extension Connector X27 Gpio configure Ixora-iMX-6

Hi,

We are interfacing dot matrix led to x27 connector of Ixora-iMX6 evaluation board. Using bit-bang method , we want to send data and clock to dot matrix led.

I have used below gpio’s of x27 connector ;

GPIO2_IO04 as data line

GPIO2_IO05 as clock line

GPIO2_IO06 as chip select

GPIO2_IO07 as control line

Now i want to toggle above gpio’s. as a initial plan, i have tried using sysfs to toggle gpio’s.
But none of the above 4 gpio’s are toggling using below commands;

echo 36 > /sys/class/gpio/export

cd /sys/class/gpio/gpio36

echo “out” > direction

echo 1 > value

cat value

0

I am using imx6q-apalis-ixora.dtb file. Any pointer on above issue.

Regards,
Suju

Do you access the Pin 13 of X27 on Iris for GPIO 36/GPIO2_IO04? Which image/kernel version do you use? GPIO 36 should already have been exported.

root@apalis-imx6:/sys/class/gpio# ls
export       gpio37       gpio39       gpiochip0    gpiochip160  gpiochip32   gpiochip96
gpio36       gpio38       gpio6        gpiochip128  gpiochip192  gpiochip64   unexport

Yes, its been exported already, i can see below logs;

ls /sys/class/gpio/

export gpio37 gpio39 gpiochip0 gpiochip160 gpiochip32 gpiochip96

gpio36 gpio38 gpio6 gpiochip128 gpiochip192 gpiochip64 unexport

But out value can’t able to change. Its always ‘0’.

echo “out” > direction

echo 1 > value

cat value

0
regards,

Suju

Hi. Have you measured the output voltage (or connected one output to an input pin)? My mx6 always states the value of an output pin as “0” no matter if its high or low.

Does the output actually change for you? Did you check with an oscilloscope or do you just rely on output of “cat”? Note that SION bit needs to be set to be able to read back value of an output GPIO. One would have to set something like below in the device tree. We do not set this by default in our device tree.

MX6QDL_PAD_NANDF_D4__GPIO2_IO04    ((1 << 30) | PAD_CTRL_HYS_PU)

As per the iMX6 TRM,

A limited option exists to override the default pad functionality and force the input path
to be active (ipp_ibe==1’b1) regardless of the value driven by the corresponding module.
This can be done by setting the SION (Software Input On) bit in the
IOMUXC_SW_MUX_CTL register (when available) to “1”.

Uses include:

LoopBack - Module x drives the pad and also receives pad value as an input.
GPIO Capture - Module x drives the pad and the value is captured by GPIO.

Thanks for the quick response . Yes, its working after setting SION bit.

Regards,

Suju

Sorry, but did you change your query on using GPIO6_IO10?. I was in the process of replying but now it seems your query is resolved?

Ya , i found how to add it. Thanks anyhow