pwm driver for uboot on imx8m plus

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

pwm driver for uboot on imx8m plus

3,959 Views
dennis3
Contributor V

I'm attempting to add a pwm signal during u-boot.  This is as uboot as distributed w/ Android 11 (1.2.0) sources or version 2020-05.04.70. The driver listed in the imx8mp.dtsi for pwm controller is

compatible = "fsl,imx8mp-pwm", "fsl,imx27-pwm";

There doesn't appear to be an imx8mp-pwm driver in the sources.  There is an imx27-pwm driver but adding CONFIG_PWM_IMX=y to the config to select it results in compile errors because there are #defines for PWM regs in the regs-imx.h for imx5 and imx6 but not imx8m.

Is there a patch in subsequent versions of uboot to properly support pwm on the imx8m plus?

Labels (1)
0 Kudos
Reply
8 Replies

1,019 Views
clemntnxp
Contributor I

Hello,

 

I'm waiting for this feature too.

Is a patch available now ?

Thanks.

0 Kudos
Reply

441 Views
jakub_zigacek
NXP Employee
NXP Employee

Hello @clemntnxp , @dennis3 , @caozhixian , @ufnguru  and @weidong_sun,

this patch is for Win10IoT BSP-1.5.1 and it enables PWM signal on LVDS_BL_PWM in Uboot. It is basically taken from i.MX8MM uboot pwm support. Hope that it can help somebody.

Best Regards, Jakub

0 Kudos
Reply

3,941 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello @dennis3 

See below,please!

------------------------------

1. Configuring PWM In linux kernel

drivers/pwm/Kconfig:

config PWM_IMX27
      tristate "i.MX27 PWM support"
      depends on ARCH_MXC
help
         Generic PWM framework driver for i.MX27 and later i.MX SoCs.

         To compile this driver as a module, choose M here: the module
will be called pwm-imx27.

In Makefile:

obj-$(CONFIG_PWM_IMX27) += pwm-imx27.o

2. In i.MX8MP device tree

--imx8mp.dtsi(for example , pwm2 )

pwm2: pwm@30670000 {
compatible = "fsl,imx8mp-pwm", "fsl,imx27-pwm";
reg = <0x30670000 0x10000>;
interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX8MP_CLK_PWM2_ROOT>,
<&clk IMX8MP_CLK_PWM2_ROOT>;
clock-names = "ipg", "per";
#pwm-cells = <2>;
status = "disabled";
};

---In imx8mp-evk.dts:

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

So i.MX8MP-EVK has supported PWM .

 

Have a great day!

Regards,

weidong

 

 

 

0 Kudos
Reply

3,939 Views
dennis3
Contributor V

Thank you for the reply.  I think you might be looking at the Linux kernel instead of uboot.  Yes, we already have pwm working fine in the Linux kernel.  in u-boot however, when I enable PWM, there is a compile error (see my original comments). 

0 Kudos
Reply

2,193 Views
ufnguru
Contributor I

Did you ever get the pwm to work?

 

0 Kudos
Reply

2,154 Views
dennis3
Contributor V

Probably not.  I think we moved on from the issue and didn't worry about uboot support.  uboot version has moved on quite a number of versions since we had this issue though as we this was with Android 11 and now we're on Android 13.

0 Kudos
Reply

3,932 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello @dennis3 ,

 

I confirmed it with design team.

i.MX8 pwm driver is not supported in u-boot.

if you wants to use it, you will have to add it to u-boot by referring to pwm driver in linux.

 

Hope the information is helpful to you.

Have a great day!

Regards,

weidong

0 Kudos
Reply

1,710 Views
caozhixian
Contributor I

Can you provide corresponding patches to support uboot using PWM?

0 Kudos
Reply