Commit 7c7ce3600ae97b08f281a6b61aa4abb0b56b0658

Authored by Mark Kettenis
Committed by Kever Yang
1 parent 4977cf67de

rockchip: rk3399: Fix enabling boot-on regulators

The new common rockchip pinctrl driver does not support explicit
requests for a particular pinctrl function.  As a result, the
board_init() function bails out early before enabling the boot-on
regulators.  Fix this by simply removing the request for pwm0, pwm2
and pwm3.  The generic DM code already does the necessary
configuration if necessary.

Reported-by: Levin Du <djw@t-chip.com.cn>
Signed-of-by: Mark Kettenis <kettenis@openbsd.org>

Showing 1 changed file with 1 additions and 31 deletions Side-by-side Diff

board/rockchip/evb_rk3399/evb-rk3399.c
... ... @@ -11,38 +11,8 @@
11 11  
12 12 int board_init(void)
13 13 {
14   - struct udevice *pinctrl, *regulator;
  14 + struct udevice *regulator;
15 15 int ret;
16   -
17   - /*
18   - * The PWM do not have decicated interrupt number in dts and can
19   - * not get periph_id by pinctrl framework, so let's init them here.
20   - * The PWM2 and PWM3 are for pwm regulater.
21   - */
22   - ret = uclass_get_device(UCLASS_PINCTRL, 0, &pinctrl);
23   - if (ret) {
24   - debug("%s: Cannot find pinctrl device\n", __func__);
25   - goto out;
26   - }
27   -
28   - /* Enable pwm0 for panel backlight */
29   - ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_PWM0);
30   - if (ret) {
31   - debug("%s PWM0 pinctrl init fail! (ret=%d)\n", __func__, ret);
32   - goto out;
33   - }
34   -
35   - ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_PWM2);
36   - if (ret) {
37   - debug("%s PWM2 pinctrl init fail!\n", __func__);
38   - goto out;
39   - }
40   -
41   - ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_PWM3);
42   - if (ret) {
43   - debug("%s PWM3 pinctrl init fail!\n", __func__);
44   - goto out;
45   - }
46 16  
47 17 ret = regulators_enable_boot_on(false);
48 18 if (ret)