AnsweredAssumed Answered

some questions about imx6 pwm backlight

Question asked by paul L on Jan 5, 2016
Latest reply on Jan 5, 2016 by paul L

The PWM1 was used for the backlight called pwm-backlight.0.And now i want to move the backlight function to PWM2.I have modified 3 source file:

 

1.clock.c (change CG8 to CG9)

/*

              * We use pwm1 to drive LVDS panel pwm backlight

              * to support bootloader splashimage by default,

              * so we need to enable the clock to keep the

              * backlight on.

              */

             (machine_is_mx6q_sabresd() ?

             (3 << MXC_CCM_CCGRx_CG9_OFFSET) : 0) |

#endif

             1 << MXC_CCM_CCGRx_CG6_OFFSET |

             1 << MXC_CCM_CCGRx_CG4_OFFSET, MXC_CCM_CCGR4);

     __raw_writel(1 << MXC_CCM_CCGRx_CG0_OFFSET, MXC_CCM_CCGR5);

 

     __raw_writel(0, MXC_CCM_CCGR6);

 

     /* S/PDIF */

     clk_set_parent(&spdif0_clk[0], &pll3_pfd_454M);

 

2.board-mx6dl_sabresd.h

/* DISP_PWM */

     MX6DL_PAD_SD1_DAT2__PWM2_PWMO,

3.board-mx6dl_sabresd.c

 

static struct platform_pwm_backlight_data mx6_sabresd_pwm_backlight_data =

{

     .pwm_id = 1,

     .max_brightness = 248,

     .dft_brightness = 128,

     .pwm_period_ns = 50000,

};

 

 

imx6q_add_mxc_pwm_backlight(1, &mx6_sabresd_pwm_backlight_data);

 

 

And then i cannot detect the wave via an oscilloscope,are there any other files needed to be set?

Outcomes