-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Add iopctl driver for RT 3 digital platforms #81086
base: main
Are you sure you want to change the base?
Add iopctl driver for RT 3 digital platforms #81086
Conversation
lucien-nxp
commented
Nov 7, 2024
•
edited
Loading
edited
- add new iopctl driver for RT 3 digital platforms
- use iopctl name as pin config IP in dts files for RT500/600
- adapt new driver for RT500/600
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
2e45a34
to
eeb7a35
Compare
Hi @hakehuang, |
@Lucien-Zhao one issues found in testing.
which is ok in v4.0-rc2
|
drivers/pinctrl/pinctrl_iopctl.c
Outdated
#if DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) > 1 | ||
(uint32_t *)DT_REG_ADDR(DT_NODELABEL(iopctl1)), | ||
#endif | ||
#if DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) > 2 |
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.
why not just check if node exists? this looks fragile
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.
Updated. Thank you.
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.
We may want to add a note in the migration guide for 4.1 that this binding has been renamed, and that the Kconfig for the RT500/RT600 pin control has changed to PINCTRL_NXP_IOPCTL
from PINCTRL_NXP_IOCON
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.
Yes, which doc should I update? Could you tell me the file path?
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.
Look at the migration guide for 4.0 to get an idea of what to add- you would place this under the "Device Drivers and Devicetree" section
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.
Thank you. Changes have been recorded in migration-guide-4.1.
eeb7a35
to
1bfbe48
Compare
Hi @hakehuang , PASS - test_pm_singlethread in 2.288 secondsTESTSUITE power_mgmt succeeded ------ TESTSUITE SUMMARY START ------ SUITE PASS - 100.00% [power_mgmt]: pass = 3, fail = 0, skip = 0, total = 3 duration = 5.717 seconds
------ TESTSUITE SUMMARY END ------ =================================================================== |
|
Details log show below:
|
1bfbe48
to
b04ad88
Compare
@lucien-nxp ok, I find I need power cycle the board after flash to make this case pass.
|
int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt, uintptr_t reg) | ||
{ | ||
for (uint8_t i = 0; i < pin_cnt; i++) { | ||
uint32_t pin_mux = pins[i]; |
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.
Do we need to have a mask here as well? It seems like we should not be writing all the bits of the pinmux setting, since the upper bits are used for the pin/offset
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.
Yes, I have added code to use masked value to write into iopctl register. Thank you.
ef48459
to
dcf5c29
Compare
doc/releases/migration-guide-4.1.rst
Outdated
@@ -39,6 +39,26 @@ LVGL | |||
Device Drivers and Devicetree | |||
***************************** | |||
|
|||
* The :dtcompatible:`nxp,lpc-iocon` and `nxp,rt-iocon-pinctrl` driver won't be used |
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.
Take a look at how dtcompatible is used in other examples (IE 4.0 release notes):
zephyr/doc/releases/migration-guide-4.0.rst
Line 121 in f7ff830
``litex,eth0`` to :dtcompatible:`litex,liteeth`. (:github:`75433`) |
You need to enclose the old (unavailable) DT bindings in double backticks, like so:
``nxp,rt-iocon-pinctrl``
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.
Thank you for pointing out the issue. I have updated it in migration guide, thank you.
RT3 digital platforms won't reuse lpc_iocon driver, new iopctl driver have been developed for iopctl IP. Due to RT700 have multi iopctl instances, add code to handle the index value recorded in new pinctrl header file Signed-off-by: Lucien Zhao <[email protected]>
Change pin register name from iocon to iopctl Delete pin type mask macro, there is no need to add these macros to adapt iocon IP structure. Signed-off-by: Lucien Zhao <[email protected]>
track hal_nxp 460 PR Signed-off-by: Lucien Zhao <[email protected]>
dcf5c29
to
0d357bb
Compare