我想把imx6原来的pwm背光从pwm1改到pwm2上,用示波器测试一下connector端子上的波形
/*
* 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);
这是clock.c里面关于pwm的一些设置,我把(3 << MXC_CCM_CCGRx_CG8_OFFSET)里的CG8改成了CG9,想要把原来的pwm1改成pwm2来输出。同时我还修改了board-mx6dl_sabresd.h和board-mx6dl_sabresd.c
/* DISP_PWM */
MX6DL_PAD_SD1_DAT2__PWM2_PWMO,
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);
现在pwm2没有输出波形,感觉board文件没什么可以修改的了,我怀疑是不是clock.c里还有什么需要修改,没弄太明白,希望大神能解答一下 谢谢!
|