]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: board: evb_rk3399: initialize pwm0 for dispaly backlight
authorEric Gao <eric.gao@rock-chips.com>
Tue, 2 May 2017 10:23:55 +0000 (18:23 +0800)
committerSimon Glass <sjg@chromium.org>
Wed, 10 May 2017 19:37:22 +0000 (13:37 -0600)
Enable pwm0 for display of rk3399 evb board. The PWM do not have decicated
interrupt number in dts and can not get periph_id by pinctrl framework. So
init them here.

Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
board/rockchip/evb_rk3399/evb-rk3399.c

index e83dedbc5bc501e399584319ecffde5db2b4a686..f63f003209a0ec381eedcf401e244434dfe7c745 100644 (file)
@@ -29,6 +29,13 @@ int board_init(void)
                goto out;
        }
 
+       /* Enable pwm0 for panel backlight */
+       ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_PWM0);
+       if (ret) {
+               debug("%s PWM0 pinctrl init fail! (ret=%d)\n", __func__, ret);
+               goto out;
+       }
+
        ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_PWM2);
        if (ret) {
                debug("%s PWM2 pinctrl init fail!\n", __func__);