Skip to content
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

Conversation

lucien-nxp
Copy link
Contributor

@lucien-nxp lucien-nxp commented Nov 7, 2024

  1. add new iopctl driver for RT 3 digital platforms
  2. use iopctl name as pin config IP in dts files for RT500/600
  3. adapt new driver for RT500/600

@zephyrbot
Copy link
Collaborator

zephyrbot commented Nov 7, 2024

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

Name Old Revision New Revision Diff
hal_nxp zephyrproject-rtos/hal_nxp@3c64cd6 (master) zephyrproject-rtos/hal_nxp#460 zephyrproject-rtos/hal_nxp#460/files

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

@zephyrbot zephyrbot added manifest manifest-hal_nxp DNM This PR should not be merged (Do Not Merge) labels Nov 7, 2024
@lucien-nxp lucien-nxp force-pushed the develop/change-pinctrl-model-for-RT3-digital-platforms branch 2 times, most recently from 2e45a34 to eeb7a35 Compare November 7, 2024 16:47
@lucien-nxp
Copy link
Contributor Author

Hi @hakehuang,
Could you help test all the cases on RT500/600 platforms? Because I added new iopctrl driver for RT5/600 platforms, needing to ensure all the pin setting worked.

@hakehuang
Copy link
Collaborator

hakehuang commented Nov 8, 2024

Could you help test all the cases on RT500/600 platforms? Because I added new iopctrl driver for RT5/600 platforms, needing to ensure all the pin setting worked.

@Lucien-Zhao one issues found in testing.
tests/subsys/pm/power_mgmt_soc/pm.soc

west build -p -b mimxrt595_evk/mimxrt595s/cm33 -T tests/subsys/pm/power_mgmt_soc -s pm.soc
*** Booting Zephyr OS build v4.0.0-rc2-131-geeb7a35728cf ***
Running TESTSUITE power_mgmt
===================================================================
START - test_pm_dummyinit
I: PM dummy single-thread test started for one cycle
I: About to enter light sleep
PM >
I: Wake from Light Sleep
PM <
I: PM sleep residency 0.003 seconds
I: About to enter deep Sleep
PM >
R Wake from Deep Sleep
PM <
I: PM sleep residency 1.104 seconds
I: PM dummy single-thread completed
 PASS - test_pm_dummyinit in 1.128 seconds
===================================================================
START - test_pm_multithread
I: Thread task A init
I: Thread task B init
I: PM multi-thread test started for cycles: 2
I: Suspend...
I: About to enter light sleep
PM >
I: Wake from Light Sleep
PM <
I: PM sleep residency 0.004 seconds
I: Resume
I: Suspend...

which is ok in v4.0-rc2

2024-11-03 08:03:56,698 - twister - DEBUG - DEVICE: *** Booting Zephyr OS build v4.0.0-rc2 ***
2024-11-03 08:03:56,701 - twister - DEBUG - DEVICE: Running TESTSUITE power_mgmt
2024-11-03 08:03:56,707 - twister - DEBUG - DEVICE: ===================================================================
2024-11-03 08:03:56,709 - twister - DEBUG - DEVICE: START - test_pm_dummyinit
2024-11-03 08:03:56,714 - twister - DEBUG - DEVICE: I: PM dummy single-thread test started for one cycle
2024-11-03 08:03:56,716 - twister - DEBUG - DEVICE: I: About to enter light sleep
2024-11-03 08:03:56,718 - twister - DEBUG - DEVICE: PM >
2024-11-03 08:03:56,719 - twister - DEBUG - DEVICE: I: Wake from Light Sleep
2024-11-03 08:03:56,720 - twister - DEBUG - DEVICE: PM <
2024-11-03 08:03:56,723 - twister - DEBUG - DEVICE: I: PM sleep residency 0.004 seconds
2024-11-03 08:03:57,811 - twister - DEBUG - DEVICE: I: About to enter deep Sleep
2024-11-03 08:03:57,813 - twister - DEBUG - DEVICE: PM >
2024-11-03 08:03:57,813 - twister - DEBUG - DEVICE: �R Wake from Deep Sleep
2024-11-03 08:03:57,814 - twister - DEBUG - DEVICE: PM <
2024-11-03 08:03:57,817 - twister - DEBUG - DEVICE: I: PM sleep residency 1.103 seconds
2024-11-03 08:03:57,820 - twister - DEBUG - DEVICE: I: PM dummy single-thread completed
2024-11-03 08:03:57,824 - twister - DEBUG - DEVICE: PASS - test_pm_dummyinit in 1.128 seconds
2024-11-03 08:03:57,830 - twister - DEBUG - DEVICE: ===================================================================
2024-11-03 08:03:57,832 - twister - DEBUG - DEVICE: START - test_pm_multithread
2024-11-03 08:03:57,834 - twister - DEBUG - DEVICE: I: Thread task A init
2024-11-03 08:03:57,836 - twister - DEBUG - DEVICE: I: Thread task B init
2024-11-03 08:03:57,840 - twister - DEBUG - DEVICE: I: PM multi-thread test started for cycles: 2
2024-11-03 08:03:57,842 - twister - DEBUG - DEVICE: I: Suspend...
2024-11-03 08:03:57,845 - twister - DEBUG - DEVICE: I: About to enter light sleep
2024-11-03 08:03:57,845 - twister - DEBUG - DEVICE: PM >
2024-11-03 08:03:57,847 - twister - DEBUG - DEVICE: I: Wake from Light Sleep
2024-11-03 08:03:57,848 - twister - DEBUG - DEVICE: PM <
2024-11-03 08:03:57,851 - twister - DEBUG - DEVICE: I: PM sleep residency 0.003 seconds
2024-11-03 08:03:57,852 - twister - DEBUG - DEVICE: I: Resume
2024-11-03 08:03:57,853 - twister - DEBUG - DEVICE: I: Suspend...
2024-11-03 08:03:58,364 - twister - DEBUG - Waiting for a DUT to run mimxrt595_evk/mimxrt595s/cm33/tests/arch/arm/arm_irq_advanced_features/arch.arm.irq_advanced_features.secure_fw
2024-11-03 08:03:58,942 - twister - DEBUG - DEVICE: I: About to enter deep sleep
2024-11-03 08:03:58,944 - twister - DEBUG - DEVICE: PM >
2024-11-03 08:03:58,945 - twister - DEBUG - DEVICE: �R Wake from Deep Sleep
2024-11-03 08:03:58,945 - twister - DEBUG - DEVICE: PM <
2024-11-03 08:03:58,947 - twister - DEBUG - DEVICE: I: PM sleep residency 1.104 seconds
2024-11-03 08:03:58,948 - twister - DEBUG - DEVICE: I: Resume
2024-11-03 08:03:58,950 - twister - DEBUG - DEVICE: I: Suspend...
2024-11-03 08:03:58,952 - twister - DEBUG - DEVICE: I: About to enter light sleep
2024-11-03 08:03:58,953 - twister - DEBUG - DEVICE: PM >
2024-11-03 08:03:58,955 - twister - DEBUG - DEVICE: I: Wake from Light Sleep
2024-11-03 08:03:58,956 - twister - DEBUG - DEVICE: PM <
2024-11-03 08:03:58,959 - twister - DEBUG - DEVICE: I: PM sleep residency 0.003 seconds
2024-11-03 08:03:58,960 - twister - DEBUG - DEVICE: I: Resume
2024-11-03 08:03:58,961 - twister - DEBUG - DEVICE: I: Suspend...
2024-11-03 08:04:00,048 - twister - DEBUG - DEVICE: I: About to enter deep sleep
2024-11-03 08:04:00,051 - twister - DEBUG - DEVICE: PM >
2024-11-03 08:04:00,051 - twister - DEBUG - DEVICE: �R Wake from Deep Sleep
2024-11-03 08:04:00,051 - twister - DEBUG - DEVICE: PM <
2024-11-03 08:04:00,055 - twister - DEBUG - DEVICE: I: PM sleep residency 1.104 seconds
2024-11-03 08:04:00,056 - twister - DEBUG - DEVICE: I: Resume
2024-11-03 08:04:00,058 - twister - DEBUG - DEVICE: I: PM multi-thread completed
2024-11-03 08:04:00,061 - twister - DEBUG - DEVICE: I: PM state[0] entry counter 0
2024-11-03 08:04:00,064 - twister - DEBUG - DEVICE: I: PM state[0] exit counter 0
2024-11-03 08:04:00,067 - twister - DEBUG - DEVICE: I: PM state[1] entry counter 2
2024-11-03 08:04:00,070 - twister - DEBUG - DEVICE: I: PM state[1] exit counter 2
2024-11-03 08:04:00,072 - twister - DEBUG - DEVICE: I: PM state[2] entry counter 2
2024-11-03 08:04:00,075 - twister - DEBUG - DEVICE: I: PM state[2] exit counter 2
2024-11-03 08:04:00,078 - twister - DEBUG - DEVICE: I: PM state[3] entry counter 0
2024-11-03 08:04:00,081 - twister - DEBUG - DEVICE: I: PM state[3] exit counter 0
2024-11-03 08:04:00,084 - twister - DEBUG - DEVICE: I: PM state[4] entry counter 0
2024-11-03 08:04:00,087 - twister - DEBUG - DEVICE: I: PM state[4] exit counter 0
2024-11-03 08:04:00,090 - twister - DEBUG - DEVICE: I: PM state[5] entry counter 0
2024-11-03 08:04:00,093 - twister - DEBUG - DEVICE: I: PM state[5] exit counter 0
2024-11-03 08:04:00,096 - twister - DEBUG - DEVICE: I: PM state[6] entry counter 0
2024-11-03 08:04:00,099 - twister - DEBUG - DEVICE: I: PM state[6] exit counter 0
2024-11-03 08:04:00,103 - twister - DEBUG - DEVICE: PASS - test_pm_multithread in 2.300 seconds
2024-11-03 08:04:00,109 - twister - DEBUG - DEVICE: ===================================================================
2024-11-03 08:04:00,111 - twister - DEBUG - DEVICE: START - test_pm_singlethread
2024-11-03 08:04:00,115 - twister - DEBUG - DEVICE: I: PM single-thread test started for cycles: 2
2024-11-03 08:04:00,118 - twister - DEBUG - DEVICE: I: About to enter light sleep
2024-11-03 08:04:00,119 - twister - DEBUG - DEVICE: PM >
2024-11-03 08:04:00,121 - twister - DEBUG - DEVICE: I: Wake from Light Sleep
2024-11-03 08:04:00,122 - twister - DEBUG - DEVICE: PM <
2024-11-03 08:04:00,125 - twister - DEBUG - DEVICE: I: PM sleep residency 0.004 seconds
2024-11-03 08:04:01,212 - twister - DEBUG - DEVICE: I: About to enter deep Sleep
2024-11-03 08:04:01,214 - twister - DEBUG - DEVICE: PM >
2024-11-03 08:04:01,215 - twister - DEBUG - DEVICE: �R Wake from Deep Sleep
2024-11-03 08:04:01,215 - twister - DEBUG - DEVICE: PM <
2024-11-03 08:04:01,218 - twister - DEBUG - DEVICE: I: PM sleep residency 1.104 seconds
2024-11-03 08:04:01,221 - twister - DEBUG - DEVICE: I: About to enter light sleep
2024-11-03 08:04:01,222 - twister - DEBUG - DEVICE: PM >
2024-11-03 08:04:01,224 - twister - DEBUG - DEVICE: I: Wake from Light Sleep
2024-11-03 08:04:01,224 - twister - DEBUG - DEVICE: PM <
2024-11-03 08:04:01,228 - twister - DEBUG - DEVICE: I: PM sleep residency 0.003 seconds
2024-11-03 08:04:01,232 - twister - DEBUG - DEVICE: I: About to enter deep Sleep
2024-11-03 08:04:02,317 - twister - DEBUG - DEVICE: PM >
2024-11-03 08:04:02,317 - twister - DEBUG - DEVICE: (J��k�$
2024-11-03 08:04:02,317 - twister - DEBUG - DEVICE: �TV�.H*[YY
2024-11-03 08:04:02,317 - twister - DEBUG - DEVICE: PM <
2024-11-03 08:04:02,321 - twister - DEBUG - DEVICE: I: PM sleep residency 1.104 seconds
2024-11-03 08:04:02,323 - twister - DEBUG - DEVICE: I: PM single-thread completed
2024-11-03 08:04:02,326 - twister - DEBUG - DEVICE: I: PM state[0] entry counter 0
2024-11-03 08:04:02,329 - twister - DEBUG - DEVICE: I: PM state[0] exit counter 0
2024-11-03 08:04:02,332 - twister - DEBUG - DEVICE: I: PM state[1] entry counter 2
2024-11-03 08:04:02,335 - twister - DEBUG - DEVICE: I: PM state[1] exit counter 2
2024-11-03 08:04:02,338 - twister - DEBUG - DEVICE: I: PM state[2] entry counter 2
2024-11-03 08:04:02,341 - twister - DEBUG - DEVICE: I: PM state[2] exit counter 2
2024-11-03 08:04:02,344 - twister - DEBUG - DEVICE: I: PM state[3] entry counter 0
2024-11-03 08:04:02,346 - twister - DEBUG - DEVICE: I: PM state[3] exit counter 0
2024-11-03 08:04:02,349 - twister - DEBUG - DEVICE: I: PM state[4] entry counter 0
2024-11-03 08:04:02,352 - twister - DEBUG - DEVICE: I: PM state[4] exit counter 0
2024-11-03 08:04:02,355 - twister - DEBUG - DEVICE: I: PM state[5] entry counter 0
2024-11-03 08:04:02,358 - twister - DEBUG - DEVICE: I: PM state[5] exit counter 0
2024-11-03 08:04:02,361 - twister - DEBUG - DEVICE: I: PM state[6] entry counter 0
2024-11-03 08:04:02,364 - twister - DEBUG - DEVICE: I: PM state[6] exit counter 0
2024-11-03 08:04:02,368 - twister - DEBUG - DEVICE: PASS - test_pm_singlethread in 2.287 seconds
2024-11-03 08:04:02,374 - twister - DEBUG - DEVICE: ===================================================================
2024-11-03 08:04:02,377 - twister - DEBUG - DEVICE: TESTSUITE power_mgmt succeeded
2024-11-03 08:04:02,380 - twister - DEBUG - DEVICE: ------ TESTSUITE SUMMARY START ------
2024-11-03 08:04:02,389 - twister - DEBUG - DEVICE: SUITE PASS - 100.00% [power_mgmt]: pass = 3, fail = 0, skip = 0, total = 3 duration = 5.715 seconds
2024-11-03 08:04:02,395 - twister - DEBUG - DEVICE: - PASS - [power_mgmt.test_pm_dummyinit] duration = 1.128 seconds
2024-11-03 08:04:02,401 - twister - DEBUG - DEVICE: - PASS - [power_mgmt.test_pm_multithread] duration = 2.300 seconds
2024-11-03 08:04:02,407 - twister - DEBUG - DEVICE: - PASS - [power_mgmt.test_pm_singlethread] duration = 2.287 seconds
2024-11-03 08:04:02,410 - twister - DEBUG - DEVICE: ------ TESTSUITE SUMMARY END ------
2024-11-03 08:04:02,417 - twister - DEBUG - DEVICE: ===================================================================
2024-11-03 08:04:02,420 - twister - DEBUG - DEVICE: RunID: 2ca94cd99d32772cca64e36338e240ec
2024-11-03 08:04:02,426 - twister - DEBUG - DEVICE: PROJECT EXECUTION SUCCESSFUL

Comment on lines 18 to 21
#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
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated. Thank you.

Copy link
Collaborator

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

Copy link
Contributor Author

@lucien-nxp lucien-nxp Nov 11, 2024

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?

Copy link
Collaborator

Choose a reason for hiding this comment

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

https://github.com/zephyrproject-rtos/zephyr/blob/main/doc/releases/migration-guide-4.1.rst#L1

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

Copy link
Contributor Author

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.

@lucien-nxp lucien-nxp force-pushed the develop/change-pinctrl-model-for-RT3-digital-platforms branch from eeb7a35 to 1bfbe48 Compare November 11, 2024 06:47
@lucien-nxp
Copy link
Contributor Author

lucien-nxp commented Nov 11, 2024

Could you help test all the cases on RT500/600 platforms? Because I added new iopctrl driver for RT5/600 platforms, needing to ensure all the pin setting worked.

@Lucien-Zhao one issues found in testing. tests/subsys/pm/power_mgmt_soc/pm.soc

west build -p -b mimxrt595_evk/mimxrt595s/cm33 -T tests/subsys/pm/power_mgmt_soc -s pm.soc
*** Booting Zephyr OS build v4.0.0-rc2-131-geeb7a35728cf ***
Running TESTSUITE power_mgmt
===================================================================
START - test_pm_dummyinit
I: PM dummy single-thread test started for one cycle
I: About to enter light sleep
PM >
I: Wake from Light Sleep
PM <
I: PM sleep residency 0.003 seconds
I: About to enter deep Sleep
PM >
R Wake from Deep Sleep
PM <
I: PM sleep residency 1.104 seconds
I: PM dummy single-thread completed
 PASS - test_pm_dummyinit in 1.128 seconds
===================================================================
START - test_pm_multithread
I: Thread task A init
I: Thread task B init
I: PM multi-thread test started for cycles: 2
I: Suspend...
I: About to enter light sleep
PM >
I: Wake from Light Sleep
PM <
I: PM sleep residency 0.004 seconds
I: Resume
I: Suspend...

which is ok in v4.0-rc2

2024-11-03 08:03:56,698 - twister - DEBUG - DEVICE: *** Booting Zephyr OS build v4.0.0-rc2 ***
2024-11-03 08:03:56,701 - twister - DEBUG - DEVICE: Running TESTSUITE power_mgmt
2024-11-03 08:03:56,707 - twister - DEBUG - DEVICE: ===================================================================
2024-11-03 08:03:56,709 - twister - DEBUG - DEVICE: START - test_pm_dummyinit
2024-11-03 08:03:56,714 - twister - DEBUG - DEVICE: I: PM dummy single-thread test started for one cycle
2024-11-03 08:03:56,716 - twister - DEBUG - DEVICE: I: About to enter light sleep
2024-11-03 08:03:56,718 - twister - DEBUG - DEVICE: PM >
2024-11-03 08:03:56,719 - twister - DEBUG - DEVICE: I: Wake from Light Sleep
2024-11-03 08:03:56,720 - twister - DEBUG - DEVICE: PM <
2024-11-03 08:03:56,723 - twister - DEBUG - DEVICE: I: PM sleep residency 0.004 seconds
2024-11-03 08:03:57,811 - twister - DEBUG - DEVICE: I: About to enter deep Sleep
2024-11-03 08:03:57,813 - twister - DEBUG - DEVICE: PM >
2024-11-03 08:03:57,813 - twister - DEBUG - DEVICE: �R Wake from Deep Sleep
2024-11-03 08:03:57,814 - twister - DEBUG - DEVICE: PM <
2024-11-03 08:03:57,817 - twister - DEBUG - DEVICE: I: PM sleep residency 1.103 seconds
2024-11-03 08:03:57,820 - twister - DEBUG - DEVICE: I: PM dummy single-thread completed
2024-11-03 08:03:57,824 - twister - DEBUG - DEVICE: PASS - test_pm_dummyinit in 1.128 seconds
2024-11-03 08:03:57,830 - twister - DEBUG - DEVICE: ===================================================================
2024-11-03 08:03:57,832 - twister - DEBUG - DEVICE: START - test_pm_multithread
2024-11-03 08:03:57,834 - twister - DEBUG - DEVICE: I: Thread task A init
2024-11-03 08:03:57,836 - twister - DEBUG - DEVICE: I: Thread task B init
2024-11-03 08:03:57,840 - twister - DEBUG - DEVICE: I: PM multi-thread test started for cycles: 2
2024-11-03 08:03:57,842 - twister - DEBUG - DEVICE: I: Suspend...
2024-11-03 08:03:57,845 - twister - DEBUG - DEVICE: I: About to enter light sleep
2024-11-03 08:03:57,845 - twister - DEBUG - DEVICE: PM >
2024-11-03 08:03:57,847 - twister - DEBUG - DEVICE: I: Wake from Light Sleep
2024-11-03 08:03:57,848 - twister - DEBUG - DEVICE: PM <
2024-11-03 08:03:57,851 - twister - DEBUG - DEVICE: I: PM sleep residency 0.003 seconds
2024-11-03 08:03:57,852 - twister - DEBUG - DEVICE: I: Resume
2024-11-03 08:03:57,853 - twister - DEBUG - DEVICE: I: Suspend...
2024-11-03 08:03:58,364 - twister - DEBUG - Waiting for a DUT to run mimxrt595_evk/mimxrt595s/cm33/tests/arch/arm/arm_irq_advanced_features/arch.arm.irq_advanced_features.secure_fw
2024-11-03 08:03:58,942 - twister - DEBUG - DEVICE: I: About to enter deep sleep
2024-11-03 08:03:58,944 - twister - DEBUG - DEVICE: PM >
2024-11-03 08:03:58,945 - twister - DEBUG - DEVICE: �R Wake from Deep Sleep
2024-11-03 08:03:58,945 - twister - DEBUG - DEVICE: PM <
2024-11-03 08:03:58,947 - twister - DEBUG - DEVICE: I: PM sleep residency 1.104 seconds
2024-11-03 08:03:58,948 - twister - DEBUG - DEVICE: I: Resume
2024-11-03 08:03:58,950 - twister - DEBUG - DEVICE: I: Suspend...
2024-11-03 08:03:58,952 - twister - DEBUG - DEVICE: I: About to enter light sleep
2024-11-03 08:03:58,953 - twister - DEBUG - DEVICE: PM >
2024-11-03 08:03:58,955 - twister - DEBUG - DEVICE: I: Wake from Light Sleep
2024-11-03 08:03:58,956 - twister - DEBUG - DEVICE: PM <
2024-11-03 08:03:58,959 - twister - DEBUG - DEVICE: I: PM sleep residency 0.003 seconds
2024-11-03 08:03:58,960 - twister - DEBUG - DEVICE: I: Resume
2024-11-03 08:03:58,961 - twister - DEBUG - DEVICE: I: Suspend...
2024-11-03 08:04:00,048 - twister - DEBUG - DEVICE: I: About to enter deep sleep
2024-11-03 08:04:00,051 - twister - DEBUG - DEVICE: PM >
2024-11-03 08:04:00,051 - twister - DEBUG - DEVICE: �R Wake from Deep Sleep
2024-11-03 08:04:00,051 - twister - DEBUG - DEVICE: PM <
2024-11-03 08:04:00,055 - twister - DEBUG - DEVICE: I: PM sleep residency 1.104 seconds
2024-11-03 08:04:00,056 - twister - DEBUG - DEVICE: I: Resume
2024-11-03 08:04:00,058 - twister - DEBUG - DEVICE: I: PM multi-thread completed
2024-11-03 08:04:00,061 - twister - DEBUG - DEVICE: I: PM state[0] entry counter 0
2024-11-03 08:04:00,064 - twister - DEBUG - DEVICE: I: PM state[0] exit counter 0
2024-11-03 08:04:00,067 - twister - DEBUG - DEVICE: I: PM state[1] entry counter 2
2024-11-03 08:04:00,070 - twister - DEBUG - DEVICE: I: PM state[1] exit counter 2
2024-11-03 08:04:00,072 - twister - DEBUG - DEVICE: I: PM state[2] entry counter 2
2024-11-03 08:04:00,075 - twister - DEBUG - DEVICE: I: PM state[2] exit counter 2
2024-11-03 08:04:00,078 - twister - DEBUG - DEVICE: I: PM state[3] entry counter 0
2024-11-03 08:04:00,081 - twister - DEBUG - DEVICE: I: PM state[3] exit counter 0
2024-11-03 08:04:00,084 - twister - DEBUG - DEVICE: I: PM state[4] entry counter 0
2024-11-03 08:04:00,087 - twister - DEBUG - DEVICE: I: PM state[4] exit counter 0
2024-11-03 08:04:00,090 - twister - DEBUG - DEVICE: I: PM state[5] entry counter 0
2024-11-03 08:04:00,093 - twister - DEBUG - DEVICE: I: PM state[5] exit counter 0
2024-11-03 08:04:00,096 - twister - DEBUG - DEVICE: I: PM state[6] entry counter 0
2024-11-03 08:04:00,099 - twister - DEBUG - DEVICE: I: PM state[6] exit counter 0
2024-11-03 08:04:00,103 - twister - DEBUG - DEVICE: PASS - test_pm_multithread in 2.300 seconds
2024-11-03 08:04:00,109 - twister - DEBUG - DEVICE: ===================================================================
2024-11-03 08:04:00,111 - twister - DEBUG - DEVICE: START - test_pm_singlethread
2024-11-03 08:04:00,115 - twister - DEBUG - DEVICE: I: PM single-thread test started for cycles: 2
2024-11-03 08:04:00,118 - twister - DEBUG - DEVICE: I: About to enter light sleep
2024-11-03 08:04:00,119 - twister - DEBUG - DEVICE: PM >
2024-11-03 08:04:00,121 - twister - DEBUG - DEVICE: I: Wake from Light Sleep
2024-11-03 08:04:00,122 - twister - DEBUG - DEVICE: PM <
2024-11-03 08:04:00,125 - twister - DEBUG - DEVICE: I: PM sleep residency 0.004 seconds
2024-11-03 08:04:01,212 - twister - DEBUG - DEVICE: I: About to enter deep Sleep
2024-11-03 08:04:01,214 - twister - DEBUG - DEVICE: PM >
2024-11-03 08:04:01,215 - twister - DEBUG - DEVICE: �R Wake from Deep Sleep
2024-11-03 08:04:01,215 - twister - DEBUG - DEVICE: PM <
2024-11-03 08:04:01,218 - twister - DEBUG - DEVICE: I: PM sleep residency 1.104 seconds
2024-11-03 08:04:01,221 - twister - DEBUG - DEVICE: I: About to enter light sleep
2024-11-03 08:04:01,222 - twister - DEBUG - DEVICE: PM >
2024-11-03 08:04:01,224 - twister - DEBUG - DEVICE: I: Wake from Light Sleep
2024-11-03 08:04:01,224 - twister - DEBUG - DEVICE: PM <
2024-11-03 08:04:01,228 - twister - DEBUG - DEVICE: I: PM sleep residency 0.003 seconds
2024-11-03 08:04:01,232 - twister - DEBUG - DEVICE: I: About to enter deep Sleep
2024-11-03 08:04:02,317 - twister - DEBUG - DEVICE: PM >
2024-11-03 08:04:02,317 - twister - DEBUG - DEVICE: (J��k�$
2024-11-03 08:04:02,317 - twister - DEBUG - DEVICE: �TV�.H*[YY
2024-11-03 08:04:02,317 - twister - DEBUG - DEVICE: PM <
2024-11-03 08:04:02,321 - twister - DEBUG - DEVICE: I: PM sleep residency 1.104 seconds
2024-11-03 08:04:02,323 - twister - DEBUG - DEVICE: I: PM single-thread completed
2024-11-03 08:04:02,326 - twister - DEBUG - DEVICE: I: PM state[0] entry counter 0
2024-11-03 08:04:02,329 - twister - DEBUG - DEVICE: I: PM state[0] exit counter 0
2024-11-03 08:04:02,332 - twister - DEBUG - DEVICE: I: PM state[1] entry counter 2
2024-11-03 08:04:02,335 - twister - DEBUG - DEVICE: I: PM state[1] exit counter 2
2024-11-03 08:04:02,338 - twister - DEBUG - DEVICE: I: PM state[2] entry counter 2
2024-11-03 08:04:02,341 - twister - DEBUG - DEVICE: I: PM state[2] exit counter 2
2024-11-03 08:04:02,344 - twister - DEBUG - DEVICE: I: PM state[3] entry counter 0
2024-11-03 08:04:02,346 - twister - DEBUG - DEVICE: I: PM state[3] exit counter 0
2024-11-03 08:04:02,349 - twister - DEBUG - DEVICE: I: PM state[4] entry counter 0
2024-11-03 08:04:02,352 - twister - DEBUG - DEVICE: I: PM state[4] exit counter 0
2024-11-03 08:04:02,355 - twister - DEBUG - DEVICE: I: PM state[5] entry counter 0
2024-11-03 08:04:02,358 - twister - DEBUG - DEVICE: I: PM state[5] exit counter 0
2024-11-03 08:04:02,361 - twister - DEBUG - DEVICE: I: PM state[6] entry counter 0
2024-11-03 08:04:02,364 - twister - DEBUG - DEVICE: I: PM state[6] exit counter 0
2024-11-03 08:04:02,368 - twister - DEBUG - DEVICE: PASS - test_pm_singlethread in 2.287 seconds
2024-11-03 08:04:02,374 - twister - DEBUG - DEVICE: ===================================================================
2024-11-03 08:04:02,377 - twister - DEBUG - DEVICE: TESTSUITE power_mgmt succeeded
2024-11-03 08:04:02,380 - twister - DEBUG - DEVICE: ------ TESTSUITE SUMMARY START ------
2024-11-03 08:04:02,389 - twister - DEBUG - DEVICE: SUITE PASS - 100.00% [power_mgmt]: pass = 3, fail = 0, skip = 0, total = 3 duration = 5.715 seconds
2024-11-03 08:04:02,395 - twister - DEBUG - DEVICE: - PASS - [power_mgmt.test_pm_dummyinit] duration = 1.128 seconds
2024-11-03 08:04:02,401 - twister - DEBUG - DEVICE: - PASS - [power_mgmt.test_pm_multithread] duration = 2.300 seconds
2024-11-03 08:04:02,407 - twister - DEBUG - DEVICE: - PASS - [power_mgmt.test_pm_singlethread] duration = 2.287 seconds
2024-11-03 08:04:02,410 - twister - DEBUG - DEVICE: ------ TESTSUITE SUMMARY END ------
2024-11-03 08:04:02,417 - twister - DEBUG - DEVICE: ===================================================================
2024-11-03 08:04:02,420 - twister - DEBUG - DEVICE: RunID: 2ca94cd99d32772cca64e36338e240ec
2024-11-03 08:04:02,426 - twister - DEBUG - DEVICE: PROJECT EXECUTION SUCCESSFUL

Hi @hakehuang ,
I tested on my local using this branch and there is no error in output log. Could you help re-test the case on RT500? Below is log on my local:

PASS - test_pm_singlethread in 2.288 seconds

TESTSUITE power_mgmt succeeded

------ TESTSUITE SUMMARY START ------

SUITE PASS - 100.00% [power_mgmt]: pass = 3, fail = 0, skip = 0, total = 3 duration = 5.717 seconds

  • PASS - [power_mgmt.test_pm_dummyinit] duration = 1.128 seconds
  • PASS - [power_mgmt.test_pm_multithread] duration = 2.301 seconds
  • PASS - [power_mgmt.test_pm_singlethread] duration = 2.288 seconds

------ TESTSUITE SUMMARY END ------

===================================================================
PROJECT EXECUTION SUCCESSFUL

@hakehuang
Copy link
Collaborator

hakehuang commented Nov 12, 2024

I tested on my local using this branch and there is no error in output log. Could you help re-test the case on RT500? Below is log on my local:
@lucien-nxp
can you share full log, I will re-test once rc3 testing is done

@lucien-nxp
Copy link
Contributor Author

lucien-nxp commented Nov 12, 2024

I tested on my local using this branch and there is no error in output log. Could you help re-test the case on RT500? Below is log on my local:
@lucien-nxp
can you share full log, I will re-test once rc3 testing is done

Details log show below:

*** Booting Zephyr OS build v4.0.0-rc3-3-g1bfbe4880fab ***
Running TESTSUITE power_mgmt
===================================================================
START - test_pm_dummyinit
I: PM dummy single-thread test started for one cycle
I: About to enter light sleep
PM >
I: Wake from Light Sleep
PM <
I: PM sleep residency 0.003 seconds
I: About to enter deep Sleep
PM >
�%é�º�k«�$–®«��TV�.H*[YY¸
PM <
I: PM sleep residency 1.104 seconds
I: PM dummy single-thread completed
 PASS - test_pm_dummyinit in 1.128 seconds
===================================================================
START - test_pm_multithread
I: Thread task A init
I: Thread task B init
I: PM multi-thread test started for cycles: 2
I: Suspend...
I: About to enter light sleep
PM >
I: Wake from Light Sleep
PM <
I: PM sleep residency 0.003 seconds
I: Resume
I: Suspend...
I: About to enter deep sleep
PM >
�%é�º�k«�$–®«��TV�.H*[YY¸
PM <
I: PM sleep residency 1.104 seconds
I: Resume
I: Suspend...
I: About to enter light sleep
PM >
I: Wake from Light Sleep
PM <
I: PM sleep residency 0.003 seconds
I: Resume
I: Suspend...
I: About to enter deep sleep
PM >
�%é�º�k«�$–®«��TV�.H*[YY¸
PM <
I: PM sleep residency 1.104 seconds
I: Resume
I: PM multi-thread completed
I: PM state[0] entry counter 0

I: PM state[0] exit counter 0

I: PM state[1] entry counter 2

I: PM state[1] exit counter 2

I: PM state[2] entry counter 2

I: PM state[2] exit counter 2

I: PM state[3] entry counter 0

I: PM state[3] exit counter 0

I: PM state[4] entry counter 0

I: PM state[4] exit counter 0

I: PM state[5] entry counter 0

I: PM state[5] exit counter 0

I: PM state[6] entry counter 0

I: PM state[6] exit counter 0

 PASS - test_pm_multithread in 2.301 seconds
===================================================================
START - test_pm_singlethread
I: PM single-thread test started for cycles: 2
I: About to enter light sleep
PM >
I: Wake from Light Sleep
PM <
I: PM sleep residency 0.003 seconds
I: About to enter deep Sleep
PM >
�%é�º�k«�$–®«��TV�.H*[YY¸
PM <
I: PM sleep residency 1.104 seconds
I: About to enter light sleep
PM >
I: Wake from Light Sleep
PM <
I: PM sleep residency 0.004 seconds
I: About to enter deep Sleep
PM >
�%é�º�k«�$–®«��TV�.H*[YY¸
PM <
I: PM sleep residency 1.104 seconds
I: PM single-thread completed
I: PM state[0] entry counter 0

I: PM state[0] exit counter 0

I: PM state[1] entry counter 2

I: PM state[1] exit counter 2

I: PM state[2] entry counter 2

I: PM state[2] exit counter 2

I: PM state[3] entry counter 0

I: PM state[3] exit counter 0

I: PM state[4] entry counter 0

I: PM state[4] exit counter 0

I: PM state[5] entry counter 0

I: PM state[5] exit counter 0

I: PM state[6] entry counter 0

I: PM state[6] exit counter 0

 PASS - test_pm_singlethread in 2.288 seconds
===================================================================
TESTSUITE power_mgmt succeeded

------ TESTSUITE SUMMARY START ------

SUITE PASS - 100.00% [power_mgmt]: pass = 3, fail = 0, skip = 0, total = 3 duration = 5.717 seconds
 - PASS - [power_mgmt.test_pm_dummyinit] duration = 1.128 seconds
 - PASS - [power_mgmt.test_pm_multithread] duration = 2.301 seconds
 - PASS - [power_mgmt.test_pm_singlethread] duration = 2.288 seconds

------ TESTSUITE SUMMARY END ------

===================================================================
PROJECT EXECUTION SUCCESSFUL

@lucien-nxp lucien-nxp force-pushed the develop/change-pinctrl-model-for-RT3-digital-platforms branch from 1bfbe48 to b04ad88 Compare November 12, 2024 07:42
@hakehuang
Copy link
Collaborator

@lucien-nxp ok, I find I need power cycle the board after flash to make this case pass.

*** Booting Zephyr OS build v4.0.0-rc3-3-gb04ad88b5fa1 ***
Running TESTSUITE power_mgmt
===================================================================
START - test_pm_dummyinit
I: PM dummy single-thread test started for one cycle
I: About to enter light sleep
PM >
I: Wake from Light Sleep
PM <
I: PM sleep residency 0.004 seconds
I: About to eTV.H*[YY▒ Sleep
PM <k▒$▒▒▒
I: PM sleep residency 1.104 seconds
I: PM dummy single-thread completed
 PASS - test_pm_dummyinit in 1.128 seconds
===================================================================
START - test_pm_multithread
I: Thread task A init
I: Thread task B init
I: PM multi-thread test started for cycles: 2
I: Suspend...
I: About to enter light sleep
PM >
I: Wake from Light Sleep
PM <
I: PM sleep residency 0.003 seconds
I: Resume
I: Suspend...
I: About to eTV.H*[YY▒ sleep
PM <▒$▒▒▒
I: PM sleep residency 1.103 seconds
I: Resume
I: Suspend...
I: About to enter light sleep
PM >
I: Wake from Light Sleep
PM <
I: PM sleep residency 0.003 seconds
I: Resume
I: Suspend...
I: About to eTV.H*[YY▒ sleep
PM <▒$▒▒▒
I: PM sleep residency 1.104 seconds
I: Resume
I: PM multi-thread completed
I: PM state[0] entry counter 0

I: PM state[0] exit counter 0

I: PM state[1] entry counter 2

I: PM state[1] exit counter 2

I: PM state[2] entry counter 2

I: PM state[2] exit counter 2

I: PM state[3] entry counter 0

I: PM state[3] exit counter 0

I: PM state[4] entry counter 0

I: PM state[4] exit counter 0

I: PM state[5] entry counter 0

I: PM state[5] exit counter 0

I: PM state[6] entry counter 0

I: PM state[6] exit counter 0

 PASS - test_pm_multithread in 2.300 seconds
===================================================================
START - test_pm_singlethread
I: PM single-thread test started for cycles: 2
I: About to enter light sleep
PM >
I: Wake from Light Sleep
PM <
I: PM sleep residency 0.003 seconds
I: About to eTV.H*[YY▒leep                                                                                                                             |
PM <▒k▒$▒▒▒                                                                                                                                            |
I: PM sleep residency 1.104 seconds
I: About to enter light sleep
PM >
I: Wake from Light Sleep
PM <
I: PM sleep residency 0.004 seconds
I: About to enter deep Sleep
PM >        TV.H*[YY▒                                                                                                                                  |
PM <k▒$▒▒▒                                                                                                                                             |
I: PM sleep residency 1.104 seconds
I: PM single-thread completed
I: PM state[0] entry counter 0

I: PM state[0] exit counter 0

I: PM state[1] entry counter 2

I: PM state[1] exit counter 2

I: PM state[2] entry counter 2

I: PM state[2] exit counter 2

I: PM state[3] entry counter 0

I: PM state[3] exit counter 0

I: PM state[4] entry counter 0

I: PM state[4] exit counter 0

I: PM state[5] entry counter 0

I: PM state[5] exit counter 0

I: PM state[6] entry counter 0

I: PM state[6] exit counter 0

 PASS - test_pm_singlethread in 2.287 seconds
===================================================================
TESTSUITE power_mgmt succeeded

------ TESTSUITE SUMMARY START ------

SUITE PASS - 100.00% [power_mgmt]: pass = 3, fail = 0, skip = 0, total = 3 duration = 5.715 seconds
 - PASS - [power_mgmt.test_pm_dummyinit] duration = 1.128 seconds
 - PASS - [power_mgmt.test_pm_multithread] duration = 2.300 seconds
 - PASS - [power_mgmt.test_pm_singlethread] duration = 2.287 seconds

------ TESTSUITE SUMMARY END ------

===================================================================
PROJECT EXECUTION SUCCESSFUL

@hakehuang hakehuang self-requested a review November 12, 2024 12:23
hakehuang
hakehuang previously approved these changes Nov 12, 2024
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];
Copy link
Collaborator

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

Copy link
Contributor Author

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.

@lucien-nxp lucien-nxp force-pushed the develop/change-pinctrl-model-for-RT3-digital-platforms branch 2 times, most recently from ef48459 to dcf5c29 Compare November 14, 2024 03:15
@zephyrbot zephyrbot added the Release Notes To be mentioned in the release notes label Nov 14, 2024
@zephyrbot zephyrbot requested a review from dkalowsk November 14, 2024 03:16
@@ -39,6 +39,26 @@ LVGL
Device Drivers and Devicetree
*****************************

* The :dtcompatible:`nxp,lpc-iocon` and `nxp,rt-iocon-pinctrl` driver won't be used
Copy link
Collaborator

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):

``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``

Copy link
Contributor Author

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]>
@lucien-nxp lucien-nxp force-pushed the develop/change-pinctrl-model-for-RT3-digital-platforms branch from dcf5c29 to 0d357bb Compare November 15, 2024 02:48
@danieldegrasse
Copy link
Collaborator

@lucien-nxp, @mmahadevan108 and I discussed internally and we think there might be value to continuing to use the existing IOCON driver, and updating the pin control data for LPC5* parts that use the IOCON driver as well. What are your thoughts on this approach?

@lucien-nxp
Copy link
Contributor Author

@lucien-nxp, @mmahadevan108 and I discussed internally and we think there might be value to continuing to use the existing IOCON driver, and updating the pin control data for LPC5* parts that use the IOCON driver as well. What are your thoughts on this approach?

Yes, IOPCTL driver is only added for RT 3 digital platforms. IOCON driver will be existed and serviced for LPC platforms.

@danieldegrasse
Copy link
Collaborator

danieldegrasse commented Nov 18, 2024

Yes, IOPCTL driver is only added for RT 3 digital platforms. IOCON driver will be existed and serviced for LPC platforms.

Sure, what I'm asking is if we could continue using the IOCON driver for the RT 3 digit platforms. It seems we could, right? We would need to update pin control macros for the LPC platforms, but that should not be too difficult. The reason for this request is that it would result in one fewer pin control driver to maintain.

We could store all the relevant pin data like so:

pins[31:27]: pin offset (0-31)
pins[26:25]: pin type (4 possible values)
pins[24:21] pin controller index (0-16)

It seems like with a scheme like this we would easily be able to store everything related to the pin data without creating a new driver, right?

@lucien-nxp
Copy link
Contributor Author

lucien-nxp commented Nov 19, 2024

Yes, IOPCTL driver is only added for RT 3 digital platforms. IOCON driver will be existed and serviced for LPC platforms.

Sure, what I'm asking is if we could continue using the IOCON driver for the RT 3 digit platforms. It seems we could, right? We would need to update pin control macros for the LPC platforms, but that should not be too difficult. The reason for this request is that it would result in one fewer pin control driver to maintain.

We could store all the relevant pin data like so:

pins[31:27]: pin offset (0-31)
pins[26:25]: pin type (4 possible values)
pins[24:21] pin controller index (0-16)

It seems like with a scheme like this we would easily be able to store everything related to the pin data without creating a new driver, right?

  1. pin offset range isn't from 0-31, it represents the offset of the instance base address(Multiple port interfaces may share one instance). So 4 bit can't cover all the possibility. From the current NPI it seems that at least 0xFFF is needed to represent all the offset possibilities.
  2. On IOCON IP, there are three pin type registers. However, there is no similar type on IOPCTL IP. On RT700, there are three iopctl instances, and based on current iocon driver, we can't support multi-instances cases.
  3. Yes, we keep one pinctrl driver can reduce our maintenance effort. However, when I first supported the RT700, I found that the RT500/600 used IOCON blinding, and I was confused because the IP iopctl were designed on the RT500/600, it's not user friendly and was inconsistent with the manual description. In the long run, I think it is necessary to separate the driver of the 3-digit IOPCTL, in case there may be other changes to the IP in the future that will not be compatible with IOCON driver.

@danieldegrasse
Copy link
Collaborator

pin offset range isn't from 0-31, it represents the offset of the instance base address(Multiple port interfaces may share one instance). So 4 bit can't cover all the possibility. From the current NPI it seems that at least 0xFFF is needed to represent all the offset possibilities.

It does currently yes. However if we moved to encoding the instance in a separate set of bits, we could encode pin offset in 0-31, right? I'm not aware of a IOCON or IOPCTL IP block with more than 32 pins per instance. Some IOCON blocks encode all pins as a continuous block, but we could easily define those pins as multiple separate blocks that just happened to be contiguous, right?

On IOCON IP, there are three pin type registers. However, there is no similar type on IOPCTL IP. On RT700, there are three iopctl instances, and based on current iocon driver, we can't support multi-instances cases.

Correct- I am suggesting that we update the IOCON driver to handle both the 3 pin type registers of the IOCON IP and multi-instance case of the IOPCTL on the RT700. Based on what I can tell, it should be possible, right?

Yes, we keep one pinctrl driver can reduce our maintenance effort. However, when I first supported the RT700, I found that the RT500/600 used IOCON blinding, and I was confused because the IP iopctl were designed on the RT500/600, it's not user friendly and was inconsistent with the manual description. In the long run, I think it is necessary to separate the driver of the 3-digit IOPCTL, in case there may be other changes to the IP in the future that will not be compatible with IOCON driver.

So this is a deeper question. When I first encountered the IOPCTL IP on the RT500/RT600, it looked a lot like an evolution of the IOCON IP, which is why I reused the driver. I guess my view is that we should support as many IP types with the IOCON driver as possible- if we revise the IOPCTL IP again, then perhaps we need to define an IOPCTL driver for that IP revision. Do you think we would revise the IOPCTL IP without renaming it though? We renamed the IOCON IP to IOPCTL on the RT500/RT600, and the only major IP change I am aware of was the removal of the I/D/A type pins.

@Raymond0225
Copy link
Collaborator

pin offset range isn't from 0-31, it represents the offset of the instance base address(Multiple port interfaces may share one instance). So 4 bit can't cover all the possibility. From the current NPI it seems that at least 0xFFF is needed to represent all the offset possibilities.

It does currently yes. However if we moved to encoding the instance in a separate set of bits, we could encode pin offset in 0-31, right? I'm not aware of a IOCON or IOPCTL IP block with more than 32 pins per instance. Some IOCON blocks encode all pins as a continuous block, but we could easily define those pins as multiple separate blocks that just happened to be contiguous, right?

On IOCON IP, there are three pin type registers. However, there is no similar type on IOPCTL IP. On RT700, there are three iopctl instances, and based on current iocon driver, we can't support multi-instances cases.

Correct- I am suggesting that we update the IOCON driver to handle both the 3 pin type registers of the IOCON IP and multi-instance case of the IOPCTL on the RT700. Based on what I can tell, it should be possible, right?

Yes, we keep one pinctrl driver can reduce our maintenance effort. However, when I first supported the RT700, I found that the RT500/600 used IOCON blinding, and I was confused because the IP iopctl were designed on the RT500/600, it's not user friendly and was inconsistent with the manual description. In the long run, I think it is necessary to separate the driver of the 3-digit IOPCTL, in case there may be other changes to the IP in the future that will not be compatible with IOCON driver.

So this is a deeper question. When I first encountered the IOPCTL IP on the RT500/RT600, it looked a lot like an evolution of the IOCON IP, which is why I reused the driver. I guess my view is that we should support as many IP types with the IOCON driver as possible- if we revise the IOPCTL IP again, then perhaps we need to define an IOPCTL driver for that IP revision. Do you think we would revise the IOPCTL IP without renaming it though? We renamed the IOCON IP to IOPCTL on the RT500/RT600, and the only major IP change I am aware of was the removal of the I/D/A type pins.

I agree that we should optimize IOCON driver to cover LPC and RTxxx SOCs. For long term, it is much better to maintain 1 driver instead of 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Pinctrl DNM This PR should not be merged (Do Not Merge) manifest manifest-hal_nxp platform: NXP Drivers NXP Semiconductors, drivers platform: NXP NXP Release Notes To be mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants