AnsweredAssumed Answered

Some IMX6UL GPIOs not working for me

Question asked by Jose Argao on Apr 17, 2018
Latest reply on Apr 18, 2018 by igorpadykov

I am working with a Pico-Pi-IMX6UL board for a project that requires many GPIO pins for interfacing with devices. I read the hardware manual and pinctrl documentation, and wanted to configure the following pins in the Expansion Header as GPIOS:

JP8_29 (CSI_DATA00, GPIO4_IO21)

JP8_31 (CSI_DATA01, GPIO4_IO22)

JP8_32 (CSI_DATA03, GPIO4_IO24)

JP8_33 (CSI_DATA02, GPIO4_IO23)

JP8_35 (CSI_VSYNC, GPIO4_IO19)

JP8_36 (SNVS_TAMPER2, GPIO5_IO02)

JP8_37 (UART1_CTS , GPIO1_IO18)

NOTE: The hardware manual for the expansion header states that UART1_CTS is GPIO4_IO18 but this conflicts with imx6ul-pinfunc.h (#define MX6UL_PAD_UART1_CTS_B__GPIO1_IO18 0x008C 0x0318 0x0000 0x5 0x0)

 

I made the following edits to imx6ul-pico.dtsi:

 

 

                pinctrl_ext_gpio_hobbit: ext-gpio-grp-hobbit {

                        fsl,pins = <

                                MX6UL_PAD_CSI_VSYNC__GPIO4_IO19 0x79            /* GPIO_P24 */

                                MX6UL_PAD_CSI_DATA00__GPIO4_IO21 0x79           /* GPIO_P26 */

                                MX6UL_PAD_CSI_DATA01__GPIO4_IO22 0x79           /* GPIO_P28 */

                                MX6UL_PAD_CSI_DATA02__GPIO4_IO23 0x79           /* GPIO_P30 */

                                MX6UL_PAD_CSI_DATA03__GPIO4_IO24 0x79           /* GPIO_P32 */

                                MX6UL_PAD_SNVS_TAMPER2__GPIO5_IO02 0x79         /* GPIO_P48 */

                                MX6UL_PAD_UART1_CTS_B__GPIO1_IO18 0x79          /* GPIO_P34 */

                        >;

                };

 

Since I plan to use the GPIOs from the kernel, I also edited baseboard_pico_hobbit.dtsi to prevent other drivers from grabbing them:

 

- removed the entire "ads7846@0" section because it was using GPIO_P48

- removed the entire "gpio-edm" section because it was using GPIO_P24, GPIO_P26, GPIO_P28, GPIO_P30, GPIO_P34

- removed the entire "edt-ft5x06@38" section because it was using GPIO_P32

 

Following the above, I was able to successfully use the following pins as GPIOs: JP8_29, JP8_31, JP8_35, JP8_36, JP8_37

 

The following pins did not work as GPIOs. That is, I was able to get a handle on them with gpio_request but writing to them did not work. Even exporting them to sysfs did not work: JP8_32, JP8_33

 

I am wondering why these two pins in particular did not work as the others. Did I miss something? Any advice would be appreciated.

Outcomes