Q: What is the preocedure to Enable PWM on imx8mm-evk?

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

Q: What is the preocedure to Enable PWM on imx8mm-evk?

Jump to solution
2,132 Views
autoamp
Contributor III

Hi,

On my evk am trying to enable PWM for controlling LEDs,

After going through post IMX8MM-EVK-pwm-output 

I have made following changes,

  • in dts file
pinctrl_pwm1: pwm1grp {
		fsl,pins = <
			MX8MM_IOMUXC_GPIO1_IO01_PWM1_OUT  0x16
		>;
	};

	pinctrl_pwm2: pwm2grp {
		fsl,pins = <
			MX8MM_IOMUXC_GPIO1_IO13_PWM2_OUT  0x16
		>;
	};

	pinctrl_pwm3: pwm3grp {
		fsl,pins = <
			MX8MM_IOMUXC_GPIO1_IO14_PWM3_OUT  0x16
		>;
	};

	pinctrl_pwm4: pwm4grp {
		fsl,pins = <
			MX8MM_IOMUXC_GPIO1_IO15_PWM4_OUT  0x16
		>;
	};
.
.
.
.
&pwm1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm1>;
	status = "okay";
};

&pwm2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm2>;
	status = "okay";
};

&pwm3 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm3>;
	status = "okay";
};

&pwm4 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm4>;
	status = "okay";
};

Kernel Configs enabled:

Symbol: LEDS_PWM [=y]                                                                                                                                      
  │ Type  : tristate                                                                                                                                           
  │ Prompt: PWM driven LED Support                                                                                                                             
  │   Location:                                                                                                                                                
  │     -> Device Drivers                                                                                                                                       
  │ (9)   -> LED Support (NEW_LEDS [=y])                                                                                                                       
  │   Defined at drivers/leds/Kconfig:513                                                                                                                       
  │   Depends on: NEW_LEDS [=y] && LEDS_CLASS [=y] && PWM [=y]

For starters am planning to Control PWM signal from sysfs..

What is the procedure to up the PWM imx8mm-evk? Is there any step-by-step guide available?

Why there is no proper documentation available like application note from NXP??

 

Labels (1)
Tags (2)
0 Kudos
1 Solution
2,062 Views
autoamp
Contributor III

Thanks for the response... Issue resolved alredy

View solution in original post

3 Replies
152 Views
NITIN26
Contributor I

Hello autoamp,

I am Nitin B S who is also trying to enable PWM in imx8m plus evk through sysfs. I am activating my pwmchip and pwmchannel and running the code. The code is being executing as expected but when i connect the LED to board the results are not being reflected in my LED it is not even turning on. 

I am connecting my LED as shown in the config below to pin number 32(PWM4).

Can you please help me regarding the issue.

Thanks and Regards

Nitin B S

GPIO Image.PNG

0 Kudos
2,063 Views
autoamp
Contributor III

Thanks for the response... Issue resolved alredy

2,068 Views
Rita_Wang
NXP TechSupport
NXP TechSupport
0 Kudos