Skip to content

Commit 04dd110

Browse files
danieldegrassekartben
authored andcommitted
soc: nxp: imxrt: fix PDRV field setting for drive strength
In the IOMUXC controller, the PDRV field uses 0b0 to set the pin drive to high, and 0b1 to set the pin to normal drive. Fix the pinctrl_soc.h definitions for the iMXRT11xx parts to use the correct setting for this register, based on the documentation for the pin control binding Note that for PDRV type pins, this commit effectively switches their drive strength setting. Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
1 parent ab6141c commit 04dd110

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

soc/nxp/imxrt/imxrt118x/pinctrl_soc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ extern "C" {
5656
IF_ENABLED(DT_PROP(node_id, bias_pull_up), \
5757
(MCUX_IMX_PULL_PULLUP << MCUX_IMX_PULL_SHIFT) |) \
5858
(MCUX_IMX_NOPULL(node_id) << MCUX_IMX_PULL_SHIFT) | \
59-
(DT_ENUM_IDX_OR(node_id, drive_strength, 0) << MCUX_IMX_PDRV_SHIFT) | \
59+
((!DT_ENUM_IDX_OR(node_id, drive_strength, 0)) << MCUX_IMX_PDRV_SHIFT) | \
6060
(DT_PROP(node_id, drive_open_drain) << MCUX_IMX_ODE_SHIFT) | \
6161
(DT_PROP(node_id, input_enable) << MCUX_IMX_INPUT_ENABLE_SHIFT)
6262

soc/nxp/imxrt/imxrt11xx/pinctrl_soc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ extern "C" {
5858
IF_ENABLED(DT_PROP(node_id, bias_pull_up), \
5959
(MCUX_IMX_PULL_PULLUP << MCUX_IMX_PULL_SHIFT) |) \
6060
(MCUX_IMX_NOPULL(node_id) << MCUX_IMX_PULL_SHIFT) | \
61-
(DT_ENUM_IDX_OR(node_id, drive_strength, 0) << MCUX_IMX_PDRV_SHIFT) | \
61+
((!DT_ENUM_IDX_OR(node_id, drive_strength, 0)) << MCUX_IMX_PDRV_SHIFT) | \
6262
(DT_PROP(node_id, drive_open_drain) << MCUX_IMX_ODE_SHIFT) | \
6363
(DT_PROP(node_id, input_enable) << MCUX_IMX_INPUT_ENABLE_SHIFT)
6464

0 commit comments

Comments
 (0)