imx8mm pwm

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

imx8mm pwm

477 Views
mj_2
Contributor I

Hi, I have a question about imx8mm pwm.

(dts)

&pwm1 {

pinctrl-names = "default";
status = "okay";

};

&gpio1 {

pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio1>;
status = "okay";

pwm_en {

gpio-hog;
gpios = <1 GPIO_ACTIVE_HIGH>;
output-high;
line-name = "bkl pwm en";

};

};

pinctrl_gpio1: gpio1_grp {

fsl,pins = <
MX8MM_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x140 /* GPIO0 / CSI0 PWR */
MX8MM_IOMUXC_GPIO1_IO06_GPIO1_IO6 0x140 /* GPIO2 / CSI0 RST */
MX8MM_IOMUXC_GPIO1_IO15_GPIO1_IO15 0x140 /* TEST# */
MX8MM_IOMUXC_GPIO1_IO01_PWM1_OUT 0x140
>;

};

(Result)

The following pwm command is executed. However, the signal from the pwm port doesn't work. 

cat /sys/class/pwm/pwmchip0/npwm

echo 0 > /sys/class/pwm/pwmchip0/export

ll /sys/class/pwm/pwmchip0/pwm0/

echo 10000 > /sys/class/pwm/pwmchip0/pwm0/period

echo 2000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle

echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable

0 Kudos
Reply
0 Replies