How to use sodimm 133/135 as a GPIO reset pin and GPIO interrupt pin respectively?

Hello all,

I am trying to use GPIO sodimm 135 and 133 as interrupt pin and reset pin respectively for a edt-ft5x06 touch panel of a HY101CTP screen. I am using a Colibri IMX6 and a Colibri evaluation board Rev 3.2 and the 2.8.3. Colibri-iMX6_LXDE-Image.

I have made all the modification needed ( Device tree, and kernel customization) to make it work with the HY101CTP. Everything is working well when i use available pins like for example:
MX6QDL_PAD_EIM_CS1__GPIO2_IO24 PAD_CTRL_HYS_PD /* SODIMM 107 /
MX6QDL_PAD_SD2_DAT1__GPIO1_IO14 PAD_CTRL_HYS_PD /
SODIMM 106 */

When i am trying to use pin 133 and 135, please find my device tree modification below :

	polytouch: edt-ft5x06@38 {
		compatible = "edt,edt-ft5406","edt,edt-ft5x06";
		reg = <0x38>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_ft5x06>;
		interrupt-parent = <&gpio2>;
		interrupts = <2 IRQ_TYPE_EDGE_FALLING>; /* SODIMM 135 */
		reset-gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; /* SODIMM 133 */
		touchscreen-size-x = <1024>;
		touchscreen-size-y = <600>;
	};
...
		pinctrl_ft5x06: ft5x06 {
			fsl,pin = <
				MX6QDL_PAD_NANDF_D2__GPIO2_IO02	PAD_CTRL_HYS_PU /* SODIMM 135 */
				MX6QDL_PAD_NANDF_D3__GPIO2_IO03	PAD_CTRL_HYS_PU /* SODIMM 133 */
			>;
		};

I get the following error When i launch the module:
[ 53.753456] edt_ft5x06 2-0038: touchscreen probe failed

Please not that I have also commented the following line of imx6qdl-colibri.dtsi

	/*pinctrl_usbc_id_1: usbc_id-1 {
		fsl,pins = <
			 USBC_ID 
			MX6QDL_PAD_NANDF_D2__GPIO2_IO02		PAD_CTRL_HYS_PU
		>;
	};*/

and the following line of imx6dl-colibri-eval-v3.dts:

/*&pinctrl_usbc_id_1*/

I don’t understand why it is not working. The problem seems to be due to Pin 135 used as an interrupt pin. Is the pin use elsewhere ? Did i do something wrong ?

For the moment i am using a Colibri evaluation board, but i plan to use a Viola board and so edit the Device tree to be able to use all the GPIO available on the Viola Carrier Board. So i need to understand how to use/reconfigure pins to set them up as a GPIO.

Thank you in advance for your help, Best regards.
Rkdm

hi @rkdm

You did everything correct. The only difference I see between the working and non working pins in, the working pins are defined as pulldown and the non working as pullup. Could you change the SODIMM133 and SODIMM135 also to Pulldown and check if the Issue is solved?

Best regards, Jaski

Hi @jaski.tx ,

Thank you for your answer, yes my mistake, i have modified the pin to pulldown with no sucess the error still the same, the pin 133 is correctly pulled down but i have noticed that the pin 135 is not pulled down i can measure 3.3v on this pin.

I confirmed that i a have modified my device tree according the following modification, recompile it and update it with run update_fdt as usual :

		pinctrl_ft5x06: ft5x06 {
			fsl,pin = <
				MX6QDL_PAD_NANDF_D2__GPIO2_IO02	 PAD_CTRL_HYS_PD /* SODIMM 135 */
				MX6QDL_PAD_NANDF_D3__GPIO2_IO03	 PAD_CTRL_HYS_PD /* SODIMM 133 */
			>;
		};

I have no clue why this pin is not pulled down. Maybe it share with something else. JP2 is removed so it should not be connected to USB id.

Thank you for your help, Best regards
Rkdm

Could you take out the jumper on Connector X11 and then measure if the Voltage is still 3.3V on the Pin SODIMM135?

Hi @jaski.tx

It doesn’t change anythings. The voltage still 3.3v on Sodimm135 (i have made the same test on the viola board also with the same result ).

Best regards
Rkdm

Just for your information the pincrtl for the ft5x06 is declared in gpio node :

	gpio {
		pinctrl_pcap_1: pcap-1 {
			fsl,pins = <
				MX6QDL_PAD_GPIO_9__GPIO1_IO09	PAD_CTRL_HYS_PU /* SODIMM 28 */
				MX6QDL_PAD_SD4_DAT2__GPIO2_IO10	PAD_CTRL_HYS_PU /* SODIMM 30 */
			>;
		};

		pinctrl_mxt_ts: mxt-ts {
			fsl,pins = <
				MX6QDL_PAD_EIM_CS1__GPIO2_IO24	PAD_CTRL_HYS_PD /* SODIMM 107 */
				MX6QDL_PAD_SD2_DAT1__GPIO1_IO14	PAD_CTRL_HYS_PD /* SODIMM 106 */
			>;
		};
		pinctrl_ft5x06: ft5x06 {
			fsl,pin = <
				MX6QDL_PAD_NANDF_D2__GPIO2_IO02	PAD_CTRL_HYS_PD /* SODIMM 135 */
				MX6QDL_PAD_NANDF_D3__GPIO2_IO03	PAD_CTRL_HYS_PD /* SODIMM 133 */
			>;
		};
	};

Hi @rkdm

The error is the missing s in the property fsl, pins. You see the error when you type the following command in the console, once linux is started: dmesg | grep iomuxc

Best regards, Jaski

Hi @jaski.tx

Sorry for the late answer.
Thanks you for your help everything is working well. I had another issue due to wrong pin configuration. GPIO_ACTIVE was set to HIGH instead of LOW, careless mistake…

Best regards
Romain K.

Perfect that it worked. Thanks for the feedback.