FTM PWM with i.MX 8QuadXPlus

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FTM PWM with i.MX 8QuadXPlus

261 Views
ritesh_sol
Contributor I

Hi, 

We are trying to get flex-timer as pwm, ftm-pwm with iMX8X with below device tree for FTM0 but unable to get any activity on pin. Not sure if i did some mistake or missed anything.

create ftm node under &dma_subsys as below 


+ ftm_pwm0: pwm@5a8a0000 {
+ compatible = "fsl,vf610-ftm-pwm";
+ reg = <0x5A8A0000 0x1000>;
+ #pwm-cells = <3>;
+ clock-names = "ftm_sys", "ftm_ext", "ftm_fix", "ftm_cnt_clk_en", "ipg";
+ clocks = <&ftm0_lpcg 0>,
+ <&ftm0_lpcg 0>,
+ <&ftm0_lpcg 0>,
+ <&ftm0_lpcg 0>,
+ <&ftm0_lpcg 1>;
+ assigned-clocks = <&clk IMX_SC_R_FTM_0 IMX_SC_PM_CLK_PER>;
+ assigned-clock-rates = <24000000>;
+ /*power-domains = <&pd IMX_SC_R_LCD_0_PWM_0>;*/
+ big-endian;
+ status = "disabled";
+ };
+
+ ftm0_lpcg: clock-controller@5aca0000 {
+ compatible = "fsl,imx8qxp-lpcg";
+ reg = <0x5aca0000 0x10000>;
+ #clock-cells = <1>;
+ clocks = <&clk IMX_SC_R_FTM_0 IMX_SC_PM_CLK_PER>,
+ <&dma_ipg_clk>;
+ bit-offset = <0 16>;
+ clock-output-names = "ftm0_lpcg_clk",
+ "ftm0_lpcg_ipg_clk";
+ power-domains = <&pd IMX_SC_R_FTM_0>;
+ status = "okay";
+ };

 

PinMux/IOMUX 

+ pinctrl_ftm_pwm_0: pwm4 {
+ fsl,pins = <
+ IMX8QXP_UART2_RX_ADMA_FTM_CH0 0x61 
+ >;
+ };

Enabling PWM 

+&ftm_pwm0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_ftm_pwm_0>;
+ #pwm-cells = <3>;

+status = "okay";
+};

 

output

# lsmod
Module Size Used by
pwm_fsl_ftm 16384 1

I can also see device as below. We tried all channel and not able to see any change on pin. 

/sys/devices/platform/bus@5a000000/5a8a0000.pwm/pwm/pwmchip4#

 

I am hoping if anyone already tried same or can refer to any documentation which can help us getting up ftm as pwm. 

 

 

0 Kudos
1 Reply

227 Views
jimmychan
NXP TechSupport
NXP TechSupport

I think the below 0x1000 should change to 0x10000

reg = <0x5A8A0000 0x1000>;

0 Kudos