IMX6UL Linux Does not Control GPIO1_IO05 Correctly

cancel
Showing results for 
Search instead for 
Did you mean: 

IMX6UL Linux Does not Control GPIO1_IO05 Correctly

53 Views
Contributor I

Hello all, 

First off, I'm still pretty new to embedded devices and really just working at this level of software, so I'm sorry if anything here seems like a stupid question.

I've got a custom Imx6ul board based on the 9x9 evk (interestingly the u-boot only works if i target it at the 14x14, but that's a topic for another time...). 

I have been using gpio pins 0, 1, 2, 3, and 4 for like i normally would in linux using sysfs. This made it a surprise to me when setting gpio 5 did not work like expected.

linux would throw no errors, and doing cat /sys/class/gpio/gpio5/value would even display whatever I set it to; however, testing with a multimeter revealed to me that pin 5 was actually pulling low regardless of what I set it to with sysfs.

From what I've read, I must change the dts/dtsi where it configures the pin's function. In my case, gpio 5 appears to be set to do the voltage select for usdhc 1.

	pinctrl_usdhc1: usdhc1grp {
		fsl,pins = <
			MX6UL_PAD_SD1_CMD__USDHC1_CMD     	0x17059
			MX6UL_PAD_SD1_CLK__USDHC1_CLK     	0x10059
			MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 	0x17059
			MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 	0x17059
			MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 	0x17059
			MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 	0x17059
			MX6UL_PAD_UART1_RTS_B__GPIO1_IO19       0x17059 /* SD1 CD */
			MX6UL_PAD_GPIO1_IO05__USDHC1_VSELECT    0x17059 /* SD1 VSELECT */
			MX6UL_PAD_GPIO1_IO09__GPIO1_IO09        0x17059 /* SD1 RESET */
		>;
	};

 

Here are some things I don't understand :

 

  1. What is the difference between using MX6UL_PAD_GPIO1_IO05__GPIO1_IO05  and MX6UL_PAD_GPIO1_IO05__USDHC1_VSELECT to refer to that pin?
  2. What exactly is the function of setting the pin to 0x17059 in the device tree? I've looked at the IMX6UL reference manual, and it's my understanding that this sets the registers of that define the how the pin functions. So what would I want to set it to if I wanted to use it like a normal gpio pin?
  3. I'm using usdhc1 for a wifi module, do I need to configure another pin to do the voltage select?

I'm sure there's more, but that's what i'm confused about right now. 

Thanks for any help you can give!

 

Tags (3)
0 Kudos
1 Reply

45 Views
NXP TechSupport
NXP TechSupport
0 Kudos