Change default pin state on imx6q

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Change default pin state on imx6q

253 Views
user123412
Contributor I

By default, most pins on imx6q are set as inputs with 100k internal pull up. In order for my board to boot, I need to set a certain pin (SD1_DAT0__GPIO1_IO16) to be low as early as possible. However, when I try to do this in SPL, the GPIO state remains high all of the time even though I am doing this:  

iomux_v3_cfg_t const pads[] = {
   MX6Q_PAD_SD1_DAT0__GPIO1_IO16 | MUX_PAD_CTRL(WEAK_PULLDOWN) |
                                   MUX_MODE_SION,
   MX6Q_PAD_GPIO_1__USB_OTG_ID | MUX_PAD_CTRL(NO_PAD_CTRL),
};
imx_iomux_v3_setup_multiple_pads(pads, ARRAY_SIZE(pads));
gpio_request(IMX_GPIO_NR(1, 16), "gpio_tag");
gpio_direction_output(IMX_GPIO_NR(1, 16), 0);
 
 
Is there some way to change the default state of this pin?
0 Kudos
1 Reply

201 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello, I hope you are doing well.

This configuration is defined on device tree when is assigned a value for IOMUX and Pad Control Register for the GPIO or even with "default-state" using a LED sub-node property.

Best regards.

0 Kudos