I2C over HID Penmount Touch

Hi,
you can find the PenMount Device Driver Users Guide for Linux Kernel under this link.

I have changed a couple of things in the “imx8dx.dtsi” as I have added a new pin connector under iomuxc

&iomuxc {
  pinctrl_penmount_conn: penmountconnectorgrp {
     fsl,pins = <IMX8QXP_QSPI0B_DATA2_LSIO_GPIO3_IO20          0x4000021>,
                 <IMX8QXP_QSPI0B_SS1_B_LSIO_GPIO3_IO24       0x21>;
  };
};

and removing the Atmel MXT touchscreen.

&iomuxc {
  pinctrl_atmel_conn: atmelconnectorgrp {
     fsl,pins = <IMX8QXP_QSPI0B_DATA2_LSIO_GPIO3_IO20          0x4000021>,
                 <IMX8QXP_QSPI0B_SS1_B_LSIO_GPIO3_IO24       0x21>;
  }
}

I actually do not know if this is right to do so. Nevertheless, I have added as well under i2c1 node the following:

&i2c1 {
   #address-cells <1>; // not changed
   #size-cells = <0>; // not changed
   clock-frequency = <400000>; // changed from 100000
   pinctrl-names = "default"; // not changed
   pinctrl-0 = <&pintctrl_i2c1>;  // not changed
   // all what is in this penmount is new based on the atmel_mxt_ts
   penmount: touchscree@41 {
     compatible = "penmount,pm2504";
     reg = <0x41>;
     pinctrl-names = "default";
     pinctrl-0 = <&pinctrl_penmount_conn>;
     interrupt-parent = <&lsio_gpio3>;
     interrupts = <20 IRQ_TYPE_EDGE_FALLING>; /* SODIMM 107 */ 
     reset-gpios = <&lsio_gpio3 24 GPIO_ACTIVE_LOW>;  /* SODIMM 106 */
     status = "disabled"; 
   };
};

as well I have created a .dtsi file for the penmount-connector:

&penmount {
   status = "okay";
}

&i2c1 {
  status = "okay";
}

and still I could not achieve the touch signal on the Penmount touchscreen. I am pretty sure I’m doing something wrong, and it can be conceptually not understanding something right.

last point I have checked the user guide that I shared, you can see that the device should work over hid_i2c, is there any comment regarding this? or it does not matter? since the shared dts configuration is quite different of what I am trying to do here.

Best regards

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

Thank you for reaching out with your question about configuring the PenMount touchscreen on the iMX8X module. Let’s go through some steps to help you troubleshoot and verify your setup:

  1. Device Tree Configuration: Your modifications to the imx8dx.dtsi file should accurately reflect the hardware setup. Double-check the pin numbers and configurations to ensure they match your PenMount device’s requirements. Ensure that the pinctrl settings and I2C configurations are correct.

  2. HID over I2C: The PenMount touchscreen may require the hid_i2c driver, which is a standard Linux driver for HID devices over I2C. Verify that this driver is enabled in your kernel configuration. You can check if the driver is loaded by running lsmod | grep hid_i2c.

  3. I2C Device Detection: Use I2C tools to confirm that the device is detected on the I2C bus. Run i2cdetect -y <bus_number> to see if the device appears at the expected address (0x41 in your case). If it does not appear, there may be an issue with the I2C bus configuration or the physical connection.

  4. Kernel Logs: Check the kernel logs for any messages related to I2C or the touchscreen. Use dmesg | grep i2c or dmesg | grep penmount to find relevant log entries that might indicate what is going wrong.

  5. Driver Compatibility: Ensure that the PenMount device is compatible with the hid_i2c driver. You may need to consult the PenMount documentation to confirm compatibility with Linux and the specific driver.

  6. Status Property: In your device tree, the status property for the PenMount device is set to “disabled”. Change this to “okay” to enable the device.

By following these steps, you should be able to diagnose and resolve the issue with your PenMount touchscreen. If the device is not recognized, further investigation into the compatibility of the device with the Linux kernel and the hid_i2c driver may be necessary.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Device Tree Documentation Overview | Toradex Developer Center.

using i2cdetect it shows me the following: i2cdetect -y -r 1

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- 41 -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- 62 -- -- -- -- -- UU -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Hi any update?

Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           5.15.148-6.7.0-devel+git.bfdbfb2c85fb #1 SMP PREEMPT Thu Jun 20 15:59:41 UTC 2024
Kernel command line:      root=PARTUUID=35906500-02 ro rootwait console=tty1 console=ttyLP3,115200 consoleblank=0 earlycon video=imxdpufb5:off video=imxdpufb6:off video=imxdpufb7:off
Distro name:              NAME="TDX Wayland with XWayland"
Distro version:           VERSION_ID=6.7.0-devel-20240704105404-build.0
Distro variant:           -
Hostname:                 colibri-imx8x-06843586
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Colibri iMX8DX on Colibri Evaluation Board V3
Toradex version:          0052 V1.0D
Serial number:            06843586
Processor arch:           aarch64
------------------------------------------------------------