Hello,
I am using Solidrun Pulse with iMX8M Plus on it. I have built OS based on instructions from this repository. But I can not get any of the GPIO pins working as simple GPIO pin.
As additional explanation - below as attachment you can find two of many patches which I applied just for the testing purposes but they simply not working. After the building I can find that file imx8mp-solidrun.dts in the build directory have been affected by the patches, so there is no doubt that patching gone well but I am still unable toggle the pin, nor to get logical 0 or 1 from it by following these instructions.
So can I get just simple example of the patch which makes any of the mikroBUS pins (preferably UART ones) functional as GPIO input pin?
The issue is that you have defined those pins in 2 locations. The pin mux driver will then only assign them to one function. If the group that the pins are assigned to is then owned by another driver the kernel will not allow userspace to control them as they are allocated to a driver.
Hi jnettlet,
thanks for fast response. I haven’t applied both patches in the same time, but beside that - can you send me an example of proper patch how to set MX8MP_IOMUXC_UART3_RXD__GPIO5_IO26 as GPIO controllable from user space.
And then to expose the pin to sysfs you need to export it with echo 154 > /sys/class/gpio/export as per the instructions on developer.solid-run.com. The gpio can then be controlled in /sys/class/gpio/gpio154
RROR: u-boot-imx-2021.04-r0 do_patch: Applying '0011-proposal.patch' failed:
stdout: can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-pulse.dts b/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-pulse.dts
|index 32e43400de96..a928e50c9fc2 100644
|--- a/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-pulse.dts
|+++ b/arch/arm64/boot/dts/freescale/imx8mp-hummingboard-pulse.dts
I was patching totally different file imx8mp-solidrun.dts.- the one created here. Then later I patch that file.
I can not even find imx8mp-hummingboard-pulse.dts. So where that file coming from - I can not find it the linux-imx repository. Where I can find it ?
P.S.
The most similar one which I can see is linux-imx/arch/arm64/boot/dts/freescale/imx8mq-hummingboard-pulse.dts - but that is imx8mq
those patches are for the linux kernel. The patched kernel should be in your build/tmp/work directory, which should include the device-tree files for the iMX8MP som and hummingboard.
I don’t get where is the imx8mp-hummingboard-pulse.dts. In general - if I want to patch some file it must exist somewhere - in this particular case I want to patch imx8mp-hummingboard-pulse.dts but I can not find it - it is not in the build directory. Or can you tell me where I should put the patch which you proposed?
For example the file which I was patching imx8mp-solidrun.dts is in build/tmp/work/imx8mpsolidrun-poky-linux/u-boot-imx/2021.04-r0/git/arch/arm/dts.
The file does not exist in the meta repository for yocto. We provide a patch series for NXP’s BSP that adds our board support. The device-tree files are created when yocto does the bitbake build for the kernel package. Therefore your will only find the file in your yocto build directory.