SODIMM #136 and #138 as GPIO on T20

I need to convert from PXA300 XT to a Colibri T20 in custom hardware. I just need 2 uarts and 32 GPIO in a headless device. So far so good, but the SODIMM pins #136 (to be used as GPIO out) and #138 (to be used as GPIO in) won’t come around. There is some conflict. From the T20 datasheet these pins are multiplexed, “Use with care, 2 SoC pins” - but how to resolve it?. Can it be done from application GPIO-lib, disable drivers in registry, or?. I tried the bootloader gpio.bootconf - is this just boot settings or is this persistent?
Thanks.

Dear @EmbedX

To make my explanation simpler, I will only write about SODIMM 136. But the same statements are true for SODIMM 138, too:

Multiplexing

SODIMM 136 is electrically connected to 2 pins of the Tegra2 CPU (SPI2_CS0_N and LCD_D18). This was done in order to achieve better compatibility with carrier boards designed for other Colibri modules.

To use this any functionality of this pin, you need to

  1. configure one of the two Tegra2-pins for the desired functionality
  2. make sure the other Tegra2-pin is configured as input.

Bootloader / Driver

In general configurations in Windows CE are done sequentially. This means, every pin configuration you define in the bootloader is actually applied to the hardware.
If any driver wants to use such a configured pin while booting Windows CE, it will simply override your bootloader setting - there is no locking mechanism to prevent this.

SODIMM 136, 138

Both pins are not used by any WinCe driver, unless you intentionally configured the display driver to use 24 bits per pixel. Therefore all settings you apply will remain permanent until the next reboot.

The following settings in the Bootloader config block will do the trick:

>set gpio.bootconf "[gpio_168] altfn=-1 [gpio_169] altfn=-1 [gpio_170] altfn=-1 [gpio_171] altfn=-1 pull=down [gpio_172] altfn=-1 [gpio_173] altfn=-1 [gpio_174] altfn=-1 [gpio_175] altfn=-1 [gpio_98] altfn=-1 dir=out lvl=0 [gpio_187] altfn=-1 dir=in [gpio_99] altfn=-1 dir=in [gpio_186] altfn=-1 dir=in"

>save gpio

Only the last 4 GPIO settings are for your purpose. The other ones are default settings defined by Toradex.

After this, you can use GPIO 98 (GPIO M2) as output, and GPIO 99 (GPIO M3) as input. A conversion table from numeric to alphanumeric can be found in the developer page article “GPIO Alphanumeric to GPIO Numeric Assignment”.

A good way to verify that the pin configuration was successful is to use the GPIOConfig Tool.

Regards, Andy

I will try it out. Thanks.

I will try it out. Thanks.