Skip to content

Conversation

@danieldegrasse
Copy link
Contributor

@danieldegrasse danieldegrasse commented Mar 23, 2022

This PR enables the pin control API for all in tree iMX RT boards and drivers. It includes the following changes:

  • driver level pinctrl enablement for all drivers used by iMX RT SOCs
  • new pinctrl driver for RT11xx series, based on the RT10xx series pinctrl driver
  • updates to the RT10xx series pinctrl driver to support GPR register, which is required for some pinmux settings
  • updates to iMX RT GPIO driver to enable pinmux selection, by leveraging pinctrl driver nodes

Dependent upon #43293 for missing GPIO definitions in RT1170 devicetree

@github-actions
Copy link

github-actions bot commented Mar 23, 2022

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
hal_nxp zephyrproject-rtos/hal_nxp@da6c141 zephyrproject-rtos/hal_nxp@dcfcee4 zephyrproject-rtos/[email protected]

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@danieldegrasse danieldegrasse mentioned this pull request Mar 23, 2022
29 tasks
@danieldegrasse
Copy link
Contributor Author

@hakehuang Can you run CI against this PR? It should only need to be tested on iMX RT boards

@hakehuang
Copy link
Contributor

hakehuang commented Mar 24, 2022

@hakehuang Can you run CI against this PR? It should only need to be tested on iMX RT boards

@danieldegrasse , I run regression on below boards, no issue found, all cases PASS.

mimxrt1010
mimxrt1015
mimxrt1024
mimxrt1060
mimxrt1064
mimxrt1170

Copy link
Member

@gmarull gmarull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, I have a couple of minor questions

gmarull
gmarull previously approved these changes Mar 24, 2022
@github-actions github-actions bot removed the DNM This PR should not be merged (Do Not Merge) label Mar 24, 2022
gmarull
gmarull previously approved these changes Mar 25, 2022
MaureenHelm
MaureenHelm previously approved these changes Mar 25, 2022
Copy link
Member

@MaureenHelm MaureenHelm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@danieldegrasse danieldegrasse added the DNM This PR should not be merged (Do Not Merge) label Mar 25, 2022
Update nxp hal revision in west.yml to include new pinctrl definition
header files.

Signed-off-by: Daniel DeGrasse <[email protected]>
Add pinctrl definitions for all iMX RT based boards

Signed-off-by: Daniel DeGrasse <[email protected]>
iMX.RT parts use a GPR register for some pinmux settings. Update pinctrl
driver to support this GPR register definition.

Signed-off-by: Daniel DeGrasse <[email protected]>
RT11xx series has similar pin configuration peripheral to RT10xx, with
some differences in register layout. Create new pinctrl definition
header file, and reuse existing driver code for RT10xx.

Signed-off-by: Daniel DeGrasse <[email protected]>
Enable pinctrl for mcux_12b1msps_sar adc driver

Signed-off-by: Daniel DeGrasse <[email protected]>
enable pinctrl for mcux lpc lpadc driver

Signed-off-by: Daniel DeGrasse <[email protected]>
Enable pinctrl for nxp imx_pwm driver

Signed-off-by: Daniel DeGrasse <[email protected]>
Enable pinctrl for flexspi driver. Note that when flexspi is being using
in XIP mode, pinctrl settings are not required and will not be applied.
Pinctrl settings are only required when the flexspi device being used is
not the one used for XIP.

Signed-off-by: Daniel DeGrasse <[email protected]>
Enable pinctrl for mcux_csi video driver

Signed-off-by: Daniel DeGrasse <[email protected]>
add pinctrl support for display_mcux_elcdif driver

Signed-off-by: Daniel DeGrasse <[email protected]>
Enable pinctrl driver for usdhc. USDHC driver uses custom pinctrl states
for fast, slow, and medium signal frequencies, as well as pin pull for
SD detection.

Signed-off-by: Daniel DeGrasse <[email protected]>
In order for pinctrl support to be complete, RT series GPIO driver must
support pinmuxing within the driver level. RT series pinmux settings do
not correspond directly to gpio port/pin numbers, so use DTS mappings to
pinctrl nodes to select and apply pinmux settings in the gpio driver.

Signed-off-by: Daniel DeGrasse <[email protected]>
Add backlight gpios property to mcux display driver, so that the driver
can correctly initialize the backlight gpio control.

Signed-off-by: Daniel DeGrasse <[email protected]>
add support for resetting phy at boot via GPIO reset pin.

Signed-off-by: Daniel DeGrasse <[email protected]>
Enable soc ethernet ref clock output at the SOC level instead of board
level, since it is required for all iMX.RT SOCs

Signed-off-by: Daniel DeGrasse <[email protected]>
imx.rt boards support pinctrl. Remove pinmux settings

Signed-off-by: Daniel DeGrasse <[email protected]>
All iMX RT 1xxx boards are now expected to use pin control, so the USDHC
pinmuxing callbacks can be removed.

Signed-off-by: Daniel DeGrasse <[email protected]>
@danieldegrasse danieldegrasse dismissed stale reviews from MaureenHelm and gmarull via 40526f8 March 25, 2022 19:11
@github-actions github-actions bot removed the DNM This PR should not be merged (Do Not Merge) label Mar 25, 2022
@dleach02 dleach02 requested review from MaureenHelm and gmarull March 25, 2022 19:36
@dleach02 dleach02 merged commit 8c115a2 into zephyrproject-rtos:main Mar 25, 2022
@dleach02 dleach02 deleted the imxrt-pinctrl branch March 25, 2022 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants