Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This driver implements 16-bit PWMs by using flex-io module. The driver uses one flex-io timer as a trigger for the rest of the timers (generating frequency of the pwm), and the other drivers generate the duty pulse. This method provides 7 PWM outputs per flex-io module. Using both flex-io modules, one can obtain 14 PWM outputs.
There are a few other alternatives for using flex-io to generate PWM
This driver is easily extendable later for both of the above.
An alternative way to generate PWM is to use LPTPM timer modules on IMX9. But LPTPM modules are muxed to the same pins with I2C and SPI blocks, so if one needs to use all of those, LPTPM won't have enough pins available. I will however also provide a driver for LPTPM PWM generation later.
Impact
Enables PWM generation from FLEX-IO outputs for IMX9 platform
Testing
Tested on NXPs i.MX93 EVK board w. a logic analyzer