we have used Colibri i.MX7D 1GB (eMMC) in a custom-designed product many times.
Since I tried BSP 5.6.0 I experience a strange behaviour of GPIO15 (pin 178 of SODIMM):
pin is fully controllable as output via u-boot from serial console
pin goes high when kernel boots, then goes low a few seconds after “root login” appears on serial console
if I try to control pin from my application or by using “old sysfs method”, I see it assigned to the correct driver, set as output and being “hi”/“lo” in /sys/kernel/debug/gpio, but no change in hardware status. If set it as an input and apply a voltage, I see the value changing in /sys/kernel/debug/gpio.
doing the same with GPIO14 (pin 188) works without issues from user space/application
older BSP (with 5.4.91 kernel, I think it was BSP 5.4.x) works perfectly
I tried with both custom device tree and Toradex eval-v3 device tree, same issue
I tried with both custom kernel and Toradex Minimal Image 5.6.0 from Tezi, same issue
Any suggestions?
HW: Colibri iMX7D 1GB V1.1A on custom carrier board or Viola Carrier Board
SW: BSP 5.6.0
install a custom-built image based on BSP 5.6.0 build 18 minimal
put an old precompiled Kernel form BSP 5.4 ( Linux colibri-imx7-emmc-06949105 5.4.129-5.4.0-devel+git.cb88cc157bfb ) with its modules into bootfs/rootfs of the module (zImage in /boot and modules in /lib/modules)
and it works.
We managed to resume production by manual modification of our carrier board PCB to use another GPIO but we’d like to fix this issue for next production batch.
I’ve tested our downstream minimal image on the BSP 5.6.0 and I was indeed able to check the behavior you presented here. However, I think the problem is more linked to which kernel version you’re using. I’ve been able to control the GPIO 15 normally using the BSP 5.6.0 Upstream Kernel.
The version I used was:
TDX Wayland with XWayland Upstream 5.6.0+build.18 (dunfell)
Colibri-iMX7-eMMC_Reference-Minimal-Image-upstream
Can you please test with this version? Would this be a plausible solution for you at the moment? I forwarded this point to our team to see how we could deal with this so that customers willing to use Downstream Kernel are able to use this GPIO pin if needed.
thanks for testing with other kernel versions. I think we’ll try the upstream/mainline kernel and if everything works fine, we’ll stuck with that for the moment.
BTW, let us know how it goes with downstream kernel issue.
just finished adjusting my Yocto build to work with upstream kernel.
Without running repo sync, it compiled upstream kernel 5.4.161+gitAUTOINC+ed9c66090d-r0 (downstream was also 5.4.161) and GPIO works fine.
We’ll test other peripherals and performance and hope to find them OK.
I’ll keep you updated on the status of the Downstream Kernel.
How are you trying to use gpio-poweroff so that I can try to reproduce it on my side? By the way, did you check our article post about it? GPIO (Linux) | Toradex Developer Center. There is a mention to enabling CONFIG_POWER_RESET_GPIO. Did you check if the upstream kernel has this enabled?
I got feedback from our team that the fix for this GPIO issue will be available on the nextDownstream Kernel nightly release. If you want, you could give it a try.
Otherwise, is there anything else that we could help you with? Or could we mark this issue as solved?
sorry for not providing any other feedback. With mainline kernel everything works fine but I had to modify our application software as root device will change name (eMMC is no more /dev/mmcblk0) and other minor changes. I’ll give a try to new downstream kernel and if it works fine, I’ll go back to downstream kernel as we have other devices around.
We’ll decide if we’ll have an application software with different settings based on which kernel is installed (mainline/downstream) or if we’ll stick with downstream.
If the fix on downstream kernel works, I’ll consider everything fixed.
Thanks for the update. Please keep me updated about your current status. Also, remember that the fix will still be on the nightly release only. Later it will migrate to other future releases.