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?