-
Notifications
You must be signed in to change notification settings - Fork 8.2k
soc: kinetis: full pinctrl enablement for Kinetis boards #43560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
soc: kinetis: full pinctrl enablement for Kinetis boards #43560
Conversation
|
@hakehuang Could you run CI on this PR, specifically targeting Kinetis boards? I want to make sure all the pinmux settings are correct. |
|
@danieldegrasse CI is running will feedback tomorrow. |
henrikbrixandersen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you. I know it's still in draft, but I took the liberty to review it anyway :)
I noticed that in some drivers you conditionally use pinctrl, others you always use it regardless if it is enabled or not. I take it the conditional ones are due to the same drivers being in use in other SoC families (e.g. i.MX RT)?
Anyways, for drivers that unconditionally use the pinctrl API, I think the Kconfig symbols needs to depend on CONFIG_PINCTRL?
|
@danieldegrasse on frdm_k64f I meet two driver test error.
for spi case, you need short the sin and sout which are: ptd2 - ptd3 the two above cases are OK in mainline weekly testing which is zephyr-v3.0.0-838-gc050d1f2ec. |
|
@henrikbrixandersen Thanks for the feedback. That is why some drivers have conditional pinctrl enablement- once full iMX.RT support is merged, that should be dropped. As far as the Kconfig symbols, I think that rather than depending on |
|
@hakehuang I reproduced and fixed the ADC test failure, but I cannot reproduce the SPI failure. I tried testing with and without the |
I will re-run CI based your updates, and feedback |
@danieldegrasse All CI testing PASS. except frdm_kl25z |
|
@hakehuang I have updated the LPSCI UART peripheral driver for the KL25Z to support pinctrl, which should fix the CI failure. Can you retry CI on that board? |
running. @danieldegrasse all PASS. |
Remove unnecessary usage of pinmux driver for kinetis boards with ethernet Signed-off-by: Daniel DeGrasse <[email protected]>
Enable pinctrl support for mcux flexcan driver Signed-off-by: Daniel DeGrasse <[email protected]>
Remove flexcan pinmux configuration for kinetis boards, as flexcan driver uses pinctrl Signed-off-by: Daniel DeGrasse <[email protected]>
Enable pinctrl for kinetis adc16 mcux driver Signed-off-by: Daniel DeGrasse <[email protected]>
adc16 driver supports pinctrl, so remove unused pinmux from kinetis boards Signed-off-by: Daniel DeGrasse <[email protected]>
Enable pinctrl for kinetis lpsci uart driver Signed-off-by: Daniel DeGrasse <[email protected]>
Remove lpuart pinmux setting for all kinetis boards, as lpuart driver supports pinctrl. Signed-off-by: Daniel DeGrasse <[email protected]>
Enable pinctrl for mcux lpi2c driver Signed-off-by: Daniel DeGrasse <[email protected]>
remove pinmux for lpi2c devices on kinetis boards, as these boards support pinctrl Signed-off-by: Daniel DeGrasse <[email protected]>
Enable pinctrl for lpspi driver Signed-off-by: Daniel DeGrasse <[email protected]>
Add dts binding and pinctrl definition for flexio in twr_ke18f. This allows ke18f pinmux code to apply pinctrl selections for flexio. Signed-off-by: Daniel DeGrasse <[email protected]>
LPSPI peripheral driver supports pinctrl. Move twr_ke18f pinmux to use pinmux for lpspi, and apply dynamic pinctrl states in order to select correct chip select pin. Also add pinmux settings to LPSPI for RT1060, so that LPSPI peripheral driver will continue to work. Signed-off-by: Daniel DeGrasse <[email protected]>
Enable pinctrl support for mcux pwm capture pwt driver Signed-off-by: Daniel DeGrasse <[email protected]>
Remove pinmux configuration for kinetis boards using pwt, as this driver supports pinctrl Signed-off-by: Daniel DeGrasse <[email protected]>
enable pinctrl for adc12 driver Signed-off-by: Daniel DeGrasse <[email protected]>
Remove pinmux configuration for kinetis boards using adc12, as pinctrl is supported by driver Signed-off-by: Daniel DeGrasse <[email protected]>
Add pinctrl support for mcux acmp sensor driver Signed-off-by: Daniel DeGrasse <[email protected]>
Remove pinmux usage for acmp peripheral on kinetis boards, as mcux_acmp driver supports pinctrl Signed-off-by: Daniel DeGrasse <[email protected]>
add pinctrl support to dac_mcux_dac32 driver Signed-off-by: Daniel DeGrasse <[email protected]>
dac32 driver supports pinctrl. Remove pinmux usage on kinetis boards with this IP. Signed-off-by: Daniel DeGrasse <[email protected]>
add pinctrl support for kinetis tpm driver Signed-off-by: Daniel DeGrasse <[email protected]>
tpm driver supports pinctrl. Remove pinmux usage for kinetis boards. Signed-off-by: Daniel DeGrasse <[email protected]>
Remove pinmux file where possible, and remove all pinmux driver usage where file cannot be removed. All kinetis boards no longer use pinmux driver. Signed-off-by: Daniel DeGrasse <[email protected]>
disable pinmux driver for nxp kinetis SOCs, since all boards use pinctrl Signed-off-by: Daniel DeGrasse <[email protected]>
gmarull
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, great work
This PR enables pinctrl for all drivers used by NXP Kinetis SOCs, and disables pinmux drivers for in tree Kinetis boards. The in tree pinmux driver is still present, but is no longer enabled at the SOC level. All in tree Kinetis boards should now be converted for pinctrl support.
Dependent on #42238 for pinctrl support in the MCUX LPUART driver.