GPIO pin set as INPUT, resistance to GND > 100Kohm?

Hi,
I’m playing with

SODIMM_133 = GPIO2.IO26
LINUX FSYS GPIO = 58
VIOLA = PIN_10 (X9)

I need to have high impedance when configured as input and I find 50 Kohm. I wonder if it is possible to increase that value either from sysfs or rebuilding kernel and/or device tree?

Lots of pins on Colibri iMX7 use pull-ups/downs by default. This can be influenced via pin muxing.

Pin muxing can be influenced through the device tree, so yes you have to rebuild the device tree. In the device tree imx7-colibri.dtsi file pinmux for GPIO2_IO26 is currently set to 0x14 which is according to the Device Tree Customization article chapter Pinmux (iMX7) a 100kOhm pull-down.

You can disable pulls generally by removing bit 4, so using 0x4 in the device tree really should make it High-Z.

Many thanks @stefan.tx, is there a documented way to replace only the device tree without re-flashing everything using the modified easy installer tarball?

You can simply replace the device tree in the ....boot.tar.xz file. See also Toradex Easy Installer Kernel Update.

Yes but this is going to re-flash everything erasing my root filesystem, I was wondering if there was a sequence of u-boot commands to do only this

I realised that I can simply mount the BOOT drive with Toradex Easy Installer and replace the device tree file or simply overwrite directly in /boot/firmware/

I did set 0x04 to MX7D_PAD_EPDC_GDRL__GPIO2_IO26 - Pull Enable field to 0 - but I still got 60 Kohm (instead of 50 Kohm)

Device tree file located at /dev/mmcblk0p1
That partition mounted as /run/media/root/BOOT/ at Linux.
So you can just replace that file using Linux cp commands.

Alternatively you can put new device tree file to SD card and update emmcboot variables to point to it.

replace
load mmc 0:1 ${fdt_addr_r} ${soc}-colibri-mmc-${fdt_board}.dtb 
with 
load mmc 1:1 ${fdt_addr_r} ${soc}-colibri-mmc-${fdt_board}.dtb 
assuming that new dtb file located at first SD card partition.

The best result I achieved is 40 ohm when configured as OUTPUT,LOW and 60 Kohm when configured as INPUT with 0x03 to MX7D_PAD_EPDC_GDRL__GPIO2_IO26 - isn’t really possible to go beyond 60 Kohm?

How are you measuring the input resistance?

I’m using a multimeter and measuring the resistance from GPIO2_IO26 pin to a GND pin

In most cases this will give you meaningless numbers (do not use autorange, manually cycle through ranges and compare results). Digital input is an constant current device not a resistor. According to the imx7 datasheet input current is typically at 5uA (when pull-up/down is disabled).