Some IMX6UL GPIOs not working for me

cancel
Showing results for 
Search instead for 
Did you mean: 

Some IMX6UL GPIOs not working for me

Jump to solution
538 Views
joseargao
Contributor I

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.

Labels (2)
0 Kudos
1 Solution
235 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Jose

one can try attach jtag or printf CSI_DATA02,3 iomux registers, described in

Chapter 30 IOMUX Controller (IOMUXC) i.MX6UL Reference Manual

In such way one can find which module (like sai,sim or spi) currently owns these

pads. Other option - carefully check uboot/linux sources to find module which uses them.

TechNexion (TechNexion Ltd - Innovators Of Technology) · GitHub 

http://www.nxp.com/docs/en/reference-manual/IMX6ULRM.pdf

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
236 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Jose

one can try attach jtag or printf CSI_DATA02,3 iomux registers, described in

Chapter 30 IOMUX Controller (IOMUXC) i.MX6UL Reference Manual

In such way one can find which module (like sai,sim or spi) currently owns these

pads. Other option - carefully check uboot/linux sources to find module which uses them.

TechNexion (TechNexion Ltd - Innovators Of Technology) · GitHub 

http://www.nxp.com/docs/en/reference-manual/IMX6ULRM.pdf

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos