Using FlexTimer module on iMX7D for additional PWMs


I have an application where I would like to use one of the iMX7D’s flextimer modules to generate additional PWM outputs. A total of 6 PWM outputs are required. Are the flextimer modules supported through a userspace library or the sysfs interface? Are there any reference examples available?

Thank you.

So far we haven’t used FlexTimer as PWM output on Colibri iMX7. However, there is a driver for Vybrid (drivers/pwm/pwm-fsl-ftm.c). The register map looks very similar, so the driver might work out of the box. You would have to create a proper device tree node in the i.MX 7 device tree with the adjusted register address/interrupts… Clocks seem to miss completely, so you would have to add them to the clock tree at include/dt-bindings/clock/imx7d-clock.h/arch/arm/mach-imx/clk-imx7d.c.