diff mbox series

[v2,7/9] imx8mm_evk: spl: enable pwm clock

Message ID 20220316152746.47768-8-tommaso.merciai@amarulasolutions.com
State Superseded
Delegated to: Stefano Babic
Headers show
Series imx8mm: add pwm-imx backlight support | expand

Commit Message

Tommaso Merciai March 16, 2022, 3:27 p.m. UTC
Enable pwm1 clock into spl

Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
---
Changes since v1:
 - Fix enable_pwm_clk call

 board/freescale/imx8mm_evk/spl.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Fabio Estevam March 16, 2022, 11:55 p.m. UTC | #1
Hi Tommaso,

On Wed, Mar 16, 2022 at 12:28 PM Tommaso Merciai
<tommaso.merciai@amarulasolutions.com> wrote:
>
> Enable pwm1 clock into spl

Please improve the commit log and explain why you need to enable the
PWM clock in SPL.

What is the PWM use case in PWM that you plan to use?
Fabio Estevam March 17, 2022, 12:48 a.m. UTC | #2
On Wed, Mar 16, 2022 at 8:55 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Hi Tommaso,
>
> On Wed, Mar 16, 2022 at 12:28 PM Tommaso Merciai
> <tommaso.merciai@amarulasolutions.com> wrote:
> >
> > Enable pwm1 clock into spl
>
> Please improve the commit log and explain why you need to enable the
> PWM clock in SPL.
>
> What is the PWM use case in PWM that you plan to use?

I meant: "What is the PWM use case in SPL that you plan to use?"
Tommaso Merciai March 17, 2022, 7:34 a.m. UTC | #3
On Wed, Mar 16, 2022 at 09:48:57PM -0300, Fabio Estevam wrote:
> On Wed, Mar 16, 2022 at 8:55 PM Fabio Estevam <festevam@gmail.com> wrote:
> >
> > Hi Tommaso,
> >
> > On Wed, Mar 16, 2022 at 12:28 PM Tommaso Merciai
> > <tommaso.merciai@amarulasolutions.com> wrote:
> > >
> > > Enable pwm1 clock into spl
> >
> > Please improve the commit log and explain why you need to enable the
> > PWM clock in SPL.
> >
> > What is the PWM use case in PWM that you plan to use?
> 
> I meant: "What is the PWM use case in SPL that you plan to use?"

Hi Fabio,
You mean is better to move the clock enable into board_late_init function?
I plan to provide support for display panel at u-boot level in particular
I plan to use lcdif->mipi_dsi->sn65dsi84->display video pipeline.
Let me know.

Thanks,
Tommaso
Fabio Estevam March 17, 2022, 10:55 a.m. UTC | #4
Hi Tommaso,

On Thu, Mar 17, 2022 at 4:34 AM Tommaso Merciai
<tommaso.merciai@amarulasolutions.com> wrote:

> Hi Fabio,
> You mean is better to move the clock enable into board_late_init function?

Yes, you would only need PWM support in U-Boot proper, not in SPL, so better to
turn on the PWM clock inside U-Boot proper.

> I plan to provide support for display panel at u-boot level in particular
> I plan to use lcdif->mipi_dsi->sn65dsi84->display video pipeline.

Ok, great. It would be great to have i.MX8MM display driver in kernel
mainline and U-Boot mainline.
Tommaso Merciai March 17, 2022, 12:40 p.m. UTC | #5
On Thu, Mar 17, 2022 at 07:55:40AM -0300, Fabio Estevam wrote:
> Hi Tommaso,
> 
> On Thu, Mar 17, 2022 at 4:34 AM Tommaso Merciai
> <tommaso.merciai@amarulasolutions.com> wrote:
> 
> > Hi Fabio,
> > You mean is better to move the clock enable into board_late_init function?
> 
> Yes, you would only need PWM support in U-Boot proper, not in SPL, so better to
> turn on the PWM clock inside U-Boot proper.

Hi Fabio,
Ok, I move the function on board_late_init in v3.

Thanks,
Tommaso

> 
> > I plan to provide support for display panel at u-boot level in particular
> > I plan to use lcdif->mipi_dsi->sn65dsi84->display video pipeline.
> 
> Ok, great. It would be great to have i.MX8MM display driver in kernel
> mainline and U-Boot mainline.
diff mbox series

Patch

diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c
index 4ef7f6f180..cf173b885f 100644
--- a/board/freescale/imx8mm_evk/spl.c
+++ b/board/freescale/imx8mm_evk/spl.c
@@ -135,6 +135,10 @@  void board_init_f(ulong dummy)
 
 	init_uart_clk(1);
 
+#ifdef CONFIG_PWM_IMX
+	enable_pwm_clk(0, 1);
+#endif
+
 	board_early_init_f();
 
 	timer_init();