Apalis V1.0B & Ixora V1.1B GPIOs pull-down state impossible?

Hi,
In our application is desired to have GPIO1 and GPIO2 [from Ixora POV] configured as inputs with pull-downs.

So my steps were:

  1. Find out which pins are are the ones that need configuration on apalis and ixora datasheet and git.
    device-trees/imx8-apalis-v1.1.dtsi at toradex_5.4-2.1.x-imx · toradex/device-trees · GitHub

GPIO1 - GPIO_MXM3_1 - pin 1 - 0.8 - gpio488 - IMX8QM_M40_GPIO0_00_LSIO_GPIO0_IO08

GPIO2 - GPIO_MXM3_3 - pin 3 - 0.9 - gpio489 - IMX8QM_M40_GPIO0_01_LSIO_GPIO0_IO09

		/* Apalis GPIO1 */
		pinctrl_gpio1: gpio1grp {
			fsl,pins = <
				IMX8QM_M40_GPIO0_00_LSIO_GPIO0_IO08		0x06000021
			>;
		};

		/* Apalis GPIO2 */
		pinctrl_gpio2: gpio2grp {
			fsl,pins = <
				IMX8QM_M40_GPIO0_01_LSIO_GPIO0_IO09		0x06000021
			>;
		};
  1. Usage of following link in confrontation with apalis and ixora datasheet to find out which pins do I need to modify and in which mode I want them to operate.
    pads-imx8qxp.h - include/dt-bindings/pinctrl/pads-imx8qxp.h - Linux source code (v6.0.9) - Bootlin

  2. In order to figure out what pinCONFIG hex value I need to use in Device Tree I downloaded tool from NXP Config Tools for i.MX v9

  3. So resulting Device Tree looked like this.

    gpio1grp { 
    fsl,pins = <0x09 0x03 0x6000041>; 
    phandle = <0x17f>; 
    }; 
    
    gpio2grp { 
    fsl,pins = <0x0a 0x03 0x6000041>; 
    phandle = <0x180>; 
    };
    

    /* Here are pins for IXORA GPIO1-0x09 a GPIO2-0x0a /
    /
    Format: fsl,pins = ; /
    /
    Configured as pull-up in/out low-drive 0x06000021 /
    /
    Possible: pull-down in/out low-drive 0x06000041 */

  4. This was also verified from linux after boot-up /proc/device-tree/scu/pinctrl/apalis-imx8qm/gpio1grp/
    Values matched expected.

But for some reason gpios 0 8 (gpio1) and 0 9 (gpio2) still act like if there is pull-up configured… using gpiod or sysfs approach showed same results while configured as input. Both have high state. Also in U-boot is visible that gpio line is configured as input but its state is 1 (high).

Using external pull-downs (3k9) helped but why is this not possible from SW?

Hi @radimpavlik and Welcome to the Toradex Community!

Could you provide the exact version of the software of your SoM?
Could you share your devicetree and dmesg.log in text format?

Thanks and best regards,
Jaski

At the moment we do not use BSP provided by Toradex.
So could you please recommend what version to try in order to eliminate doubts and how to quickly approach it?

Device Tree used:
imx8qm-apalis-v1.1-ixora-v1.1-verca.dtb

Data

Hello @radimpavlik,

We recommend to use our Toradex BSP and test the GPIOs once more. Please use our latest Stable release BSP 5.0.

Thank you and Regards,
Janani.