i.mx8dxl - unable to control IMX8DXL_SNVS_TAMPER_OUT4_LSIO_GPIO2_IO08_IN

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.mx8dxl - unable to control IMX8DXL_SNVS_TAMPER_OUT4_LSIO_GPIO2_IO08_IN

Jump to solution
385 Views
davisroman3
Contributor III
Hi,
 
There is a gpio on our custom hardware that we're unable to control despite our best efforts. 
 
I attempted to reproduce this issue on the i.mx8dxl evk and I'm able to very easily reproduce.
 
$ mkdir imx-yocto-bsp
$ repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-langdale -m imx-6.1.1-1.0.0.xml
$ repo sync
 
Apply the following two patches:
 
1. Include libgpiod-tools into the image:

 

diff -Nupr a/sources/poky/meta/recipes-core/images/core-image-minimal.bb b/sources/poky/meta/recipes-core/images/core-image-minimal.bb
--- a/sources/poky/meta/recipes-core/images/core-image-minimal.bb	2024-01-31 15:39:57.730338254 -0800
+++ b/sources/poky/meta/recipes-core/images/core-image-minimal.bb	2024-01-31 15:40:11.398375777 -0800
@@ -10,3 +10,7 @@ inherit core-image
 
 IMAGE_ROOTFS_SIZE ?= "8192"
 IMAGE_ROOTFS_EXTRA_SPACE:append = "${@bb.utils.contains("DISTRO_FEATURES", "systemd", " + 4096", "", d)}"
+
+IMAGE_INSTALL += " \
+                   libgpiod-tools \
+                 "

 

 
2. Update the imx8dxl-evk.dts device tree:

 

diff --git a/arch/arm64/boot/dts/freescale/imx8dxl-evk.dts b/arch/arm64/boot/dts/freescale/imx8dxl-evk.dts
index 123516843d3a..c12ab61d4fbc 100644
--- a/arch/arm64/boot/dts/freescale/imx8dxl-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8dxl-evk.dts
@@ -765,6 +765,7 @@ IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIORHB_PAD	0x000514a0
 			IMX8DXL_COMP_CTL_GPIO_1V8_3V3_GPIORHK_PAD	0x000014a0
 			IMX8DXL_SPI3_CS0_ADMA_ACM_MCLK_OUT1		0x0600004c
 			IMX8DXL_SNVS_TAMPER_OUT1_LSIO_GPIO2_IO05_IN	0x0600004c
+			IMX8DXL_SNVS_TAMPER_OUT4_LSIO_GPIO2_IO08_IN     0x20000000
 		>;
 	};
 
@@ -1033,3 +1034,7 @@ IMX8DXL_ENET0_RGMII_TXD0_CONN_USDHC1_VSELECT	0x00000021
 		>;
 	};
 };
+
+&lsio_gpio2 {
+        status = "okay";
+};

 

 
$ bitbake core-image-minimal
 
Flash sd card and boot the target.
 
Using the i.mx8dxl evk schematic, attach an oscilloscope to pin 16 of U56.
 
 davisroman3_0-1706764343404.png
 
Proceed with toggling the gpio:
 
root@imx8dxla1-lpddr4-evk:~# gpioset gpiochip2 8=1
root@imx8dxla1-lpddr4-evk:~# gpioset gpiochip2 8=0 
root@imx8dxla1-lpddr4-evk:~# gpioset gpiochip2 8=1 
root@imx8dxla1-lpddr4-evk:~# gpioset gpiochip2 8=0
 
Result: No state changes will be seen on gpio
 
Additionally, I tested on the latest bsp, LF6.1.55_2.2.0, and the results are the same.
 
Please let me know what you think.
0 Kudos
Reply
1 Solution
365 Views
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @davisroman3 ,

I hope you are doing well.

This is a problem, because as you can see in reference manual, the LSIO_GPIO2_IO08 is only an input pin:

Alejandro_Salas_0-1706813605627.png

There is not a way to use it as output.

 

Also in Mux register of SNVS_TAMPER_OUT4 you can see is only for IN:

Alejandro_Salas_1-1706813694240.png

I am not pretty sure why, but all the pines muxed with SNVS_TAMPER are only for Input mode.

 

I hop this can helps.

 

Best regards. 

 

Salas.

View solution in original post

0 Kudos
Reply
1 Reply
366 Views
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @davisroman3 ,

I hope you are doing well.

This is a problem, because as you can see in reference manual, the LSIO_GPIO2_IO08 is only an input pin:

Alejandro_Salas_0-1706813605627.png

There is not a way to use it as output.

 

Also in Mux register of SNVS_TAMPER_OUT4 you can see is only for IN:

Alejandro_Salas_1-1706813694240.png

I am not pretty sure why, but all the pines muxed with SNVS_TAMPER are only for Input mode.

 

I hop this can helps.

 

Best regards. 

 

Salas.

0 Kudos
Reply