arch/arm/src/imxrt: Corrects some IOMUX controls.

This commit is contained in:
Jake Choy 2018-05-15 10:16:57 -06:00 committed by Gregory Nutt
parent c82724d462
commit 034ab467e6
3 changed files with 12 additions and 11 deletions

View File

@ -140,15 +140,15 @@
*/
#define GPIO_ALT_SHIFT (27) /* Bits 27-29: Peripheral alternate function */
#define GPIO_ALT_MASK (15 << GPIO_ALT_SHIFT)
# define GPIO_ALT0 (0 << GPIO_ALT_SHIFT) /* Alternate function 1 */
# define GPIO_ALT1 (1 << GPIO_ALT_SHIFT) /* Alternate function 2 */
# define GPIO_ALT2 (2 << GPIO_ALT_SHIFT) /* Alternate function 3 */
# define GPIO_ALT3 (3 << GPIO_ALT_SHIFT) /* Alternate function 4 */
# define GPIO_ALT4 (4 << GPIO_ALT_SHIFT) /* Alternate function 5 */
#define GPIO_ALT_MASK (7 << GPIO_ALT_SHIFT)
# define GPIO_ALT0 (0 << GPIO_ALT_SHIFT) /* Alternate function 0 */
# define GPIO_ALT1 (1 << GPIO_ALT_SHIFT) /* Alternate function 1 */
# define GPIO_ALT2 (2 << GPIO_ALT_SHIFT) /* Alternate function 2 */
# define GPIO_ALT3 (3 << GPIO_ALT_SHIFT) /* Alternate function 3 */
# define GPIO_ALT4 (4 << GPIO_ALT_SHIFT) /* Alternate function 4 */
/* Alternate function 5 is GPIO */
# define GPIO_ALT6 (6 << GPIO_ALT_SHIFT) /* Alternate function 1 */
# define GPIO_ALT7 (7 << GPIO_ALT_SHIFT) /* Alternate function 1 */
# define GPIO_ALT6 (6 << GPIO_ALT_SHIFT) /* Alternate function 6 */
# define GPIO_ALT7 (7 << GPIO_ALT_SHIFT) /* Alternate function 7 */
/* Interrupt edge/level configuration
*

View File

@ -241,9 +241,10 @@ int imxrt_iomux_configure(uintptr_t padctl, iomux_pinset_t ioset)
/* Select CMOS input or Schmitt Trigger input */
regval = 0;
if ((ioset & IOMUX_SCHMITT_TRIGGER) != 0)
{
regval |= PADCTL_SRE;
regval |= PADCTL_HYS;
}
/* Select drive strength */
@ -291,7 +292,7 @@ int imxrt_iomux_configure(uintptr_t padctl, iomux_pinset_t ioset)
if ((ioset & IOMUX_SLEW_FAST) != 0)
{
regval |= PADCTL_HYS;
regval |= PADCTL_SRE;
}
/* Write the result to the specified Pad Control register */

View File

@ -119,7 +119,7 @@
* .... .... .... .SS.
*/
#define IOMUX_SPEED_SHIFT (2) /* Bits 2-3: Speed */
#define IOMUX_SPEED_SHIFT (1) /* Bits 1-2: Speed */
#define IOMUX_SPEED_MASK (3 << IOMUX_SPEED_SHIFT)
# define IOMUX_SPEED_LOW (SPEED_LOW << IOMUX_SPEED_SHIFT) /* Low frequency (50 MHz) */
# define IOMUX_SPEED_MEDIUM (SPEED_MEDIUM << IOMUX_SPEED_SHIFT) /* Medium frequency (100, 150 MHz) */