some questions about imx6 pwm backlight

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

some questions about imx6 pwm backlight

1,215 Views
paull
Contributor I

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?

Tags (2)
0 Kudos
Reply
2 Replies

728 Views
igorpadykov
NXP Employee
NXP Employee

Hi paul

I think modifications are correct. Could pwm2 signals

be used somewhere else ? One can attach jtag debugger

and check registers, if they are set correctly with these

modifications.

Best regards

igor

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

Note: If this post answers your question, please click the Correct Answer button. Thank you!

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

0 Kudos
Reply

728 Views
paull
Contributor I

Sorry,i have made a rookie mistake.The header file should be "board-mx6q_sabresd",not board-mx6dl_sabresd.And i have got the correct wave via PWM2.Thank you!

0 Kudos
Reply