Using parallel LCD interface pins as GPIO

We have a board designed by the Digi custom dev group based on the imx6UL SOM. They started with the SBC Pro as a reference design looks like, and have 3 of the GPIOs we requested be connected to our custom peripheral routed to pins labeled thusly on the schematic:

LCD_RESET (A19)
LCD_CLK (C21)
LCD_HSYNC (B21)

These were obviously part of the parallel LCD interface on the reference design. I need to reconfigure these now so I can use them for the intended purpose, i.e. GPIO. Unfortunately I’m not sure where to start. I suspect the first thing is to make changes to the device tree somehow. Any clues would really be appreciated.

Thx - KDP

cc6ul HRM is here:

https://www.digi.com/resources/documentation/digidocs/90001523/#reference/module/r_lga_signals_multiplex_cc6ul.htm?Highlight=a19

For example the first pin in your list is LCD_RESET (A19):
A19 LGA_ A19
LCD_RESET

LCD_RESET
ALT0: LCDIF_RESET
ALT1: LCDIF_CS
ALT2: CA7_MX6UL_EVENTI
ALT3: SAI3_TX_DATA
ALT4: WDOG1_WDOG_ANY
ALT5: GPIO3_IO04
ALT6:
ALT7:
ALT8: ECSPI2_SS3

So it is GPIO3_IO04, unless configured as something else.
So technically if you disable parallel LCD in your device tree and rebuild, the pins should automatically become available as LCD.
If this pin is not defined in the device tree, it should automatically become a GPIO, but you can also explicitly define it in hoggrp in a manner similar to the below example:
&iomuxc {
pinctrl-names = “default”;
pinctrl-0 = <&pinctrl_hog>;

   pinctrl_hog: hoggrp {
          fsl,pins = &lt;
                 MX6UL_PAD_CSI_DATA00__GPIO4_IO21       0x17059  /* User Button */
                 MX6UL_PAD_GPIO1_IO00__GPIO1_IO00       0x1b0b0 /* Led 2 */
          &gt;;
   };

   [...]

};

Please use SmartIOMUX tool https://ftp1.digi.com/support/smartiomux/index.html and it will help you figure out proper device tree settings.

1 Like

Thank you very much. That should get us going.