i.MX53: Incomplete GPIO Pullup Definitions in iomux-mx53.h

cancel
Showing results for 
Search instead for 
Did you mean: 

i.MX53: Incomplete GPIO Pullup Definitions in iomux-mx53.h

634 Views
Specialist I

This concerns the programming of the GPIO pins by the Linux 2.6.35_11.09.01 and 2.6.35_maintain kernels (at least).

In order to enable a pullup or pulldown on a GPIO port, all three of the PKE, PUE and PUS fields have to be filled in.

There are some obviously wrong ones in the configuration files, where someone has missed adding either or both of PKE and PUE. There are others that have PKE and PUE, but miss specifying the resistor (so that defaults to 100k or 360k pull down).


That means it looks like someone has intended to add or change a pullup on a pin, but because the definition is incomplete the pin will actually be floating.

Had they not tried to use these definitions the pad would default to NO_PAD_CTRL, which is meant to mean to leave the power-up default pullup or pulldown. That doesn't work in most of the distributions because of the bug with the NO_PAD_CTRL definition, but that's a different problem listed here.

https://community.freescale.com/thread/384191

These pullup programming problems are visible in the following files:

http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/arch/arm/plat-mxc/include/mach/iomu...
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/arch/arm/plat-mxc/include/mach/iomu...

There 8 combinations of designating PKE, PUE and one of the four PUS settings. Only three make sense, which is "none", "PKE" (for Keep) or PKE, PUE and a PUS value. Here are the ones that don't match that pattern:

#define MX53_UART_PAD_CTRL     (PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_DSE_HIGH | \
                                PAD_CTL_SRE_FAST | PAD_CTL_HYS)

Missing a PUS value, so it defaults to a pulldown. This may be intentional or may not.

#define MX53_WEIM_PAD_CTRL       (PAD_CTL_PKE | PAD_CTL_PUS_100K_UP | \
                                  PAD_CTL_DSE_HIGH)

Missing PUE. Used by EMI_WEIM_D16 through D31, and also A23, but not any of the other address lines.

#define MX53_I2C_PAD_CTRL_1      (PAD_CTL_SRE_FAST | PAD_CTL_ODE | \
                                  PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP | \
                                  PAD_CTL_HYS)

Missing PKE and PUE. Used inconsistently with some (but not all) I2Cn_SCL and I2Cn_SDA definitions. "MX53_I2C_PAD_CTRL_2" has PKE and PUE.

#define MX53_CAN_PAD_CTRL     (PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_DSE_HIGH | \                          PAD_CTL_HYS)

    Missing a PUS value.

#define MX53_WEIM_NAND_PAD_CTRL_1      (PAD_CTL_PKE | PAD_CTL_PUS_100K_UP | PAD_CTL_DSE_HIGH)

Missing PUE. Used by EMI_NAND_WEIM_DA_1 to EMI_NAND_WEIM_DA_7, but not 8 to 15

#define MX53_PAD_EIM_D20__GPIO3_20     (_MX53_PAD_EIM_D20__GPIO3_20 | MUX_PAD_CTRL(PAD_CTL_PUS_100K_UP))

Missing PKE and PUE. These definitions are meant to use "pre-cooked" ones like "MX53_SDHC_PAD_CTRL" and not a "_PUS_" definition on its own.

#define MX53_PAD_PATA_DATA5__GPIO2_5   (_MX53_PAD_PATA_DATA5__GPIO2_5 | MUX_PAD_CTRL(PAD_CTL_PUS_100K_UP))

Missing PKE and PUE. Ditto.

Tom

Labels (2)
0 Kudos
1 Reply

6 Views
NXP TechSupport
NXP TechSupport

Please try to use this iomux-mx53.h file from LTIB 1308.

Have a great day,

Victor

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 Kudos