IMX6 IOMUX module allows to configure pad settings, in particular - resistor pull up / down options.
Please use Chapter 36 [IOMUX Controller (IOMUXC)] of the i.MX6 (Q) Reference Manual for more details.
" ...pad control registers (IOMUXC_SW_PAD_CTL_PAD_<PAD_NAME> or
IOMUXC_SW_PAD_CTL_GRP_<GROUP NAME>) to configure specific pad
settings of each pad, or a predefined group of pads."
Default settings are provided in Table 4-1 (Pin Assignments), column "Pad Settings".
I tried to do like this:
mxc_iomux_v3_setup_pad(IOMUX_PAD(0x0710, 0x0328, 5, 0x0000, 0, 0) | MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP));
and also tried this:
mxc_iomux_v3_setup_pad(IOMUX_PAD(0x0710, 0x0328, 5, PAD_CTL_PUS_22K_UP, 0, 0) | MUX_PAD_CTRL(NO_PAD_CTRL));
they are not work, and even worse, made the GPIO come to about 1.4V voltage, and keeping generate interrupt automatically.
I'v found this:
--------------------------------------------------------------------------------------------------------------------------
#define IOMUX_PAD(_pad_ctrl_ofs, _mux_ctrl_ofs, _mux_mode, _sel_input_ofs, \
_sel_input, _pad_ctrl) \
(((iomux_v3_cfg_t)(_mux_ctrl_ofs) << MUX_CTRL_OFS_SHIFT) | \
((iomux_v3_cfg_t)(_mux_mode) << MUX_MODE_SHIFT) | \
((iomux_v3_cfg_t)(_pad_ctrl_ofs) << MUX_PAD_CTRL_OFS_SHIFT) | \
((iomux_v3_cfg_t)(_pad_ctrl) << MUX_PAD_CTRL_SHIFT) | \
((iomux_v3_cfg_t)(_sel_input_ofs) << MUX_SEL_INPUT_OFS_SHIFT) | \
((iomux_v3_cfg_t)(_sel_input) << MUX_SEL_INPUT_SHIFT))
#define _MX6Q_PAD_GPIO_7__GPIO_1_7 \
IOMUX_PAD(0x0610, 0x0240, 5, 0x0000, 0, 0)
#define PAD_CTL_PUS_100K_DOWN (0 << 14)
#define PAD_CTL_PUS_47K_UP (1 << 14)
#define PAD_CTL_PUS_100K_UP (2 << 14)
#define PAD_CTL_PUS_22K_UP (3 << 14)
-------------------------------------------------------------------------------------------------------------------------
so then how can I use it?
thx!