Merge tag 'u-boot-atmel-fixes-2021.01-b' of https://gitlab.denx.de/u-boot/custodians...
[platform/kernel/u-boot.git] / drivers / video / rockchip / rk_vop.c
index 1288608..6475b3e 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2015 Google, Inc
  * Copyright 2014 Rockchip Inc.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <display.h>
 #include <dm.h>
 #include <edid.h>
+#include <log.h>
 #include <regmap.h>
 #include <syscon.h>
 #include <video.h>
 #include <asm/gpio.h>
-#include <asm/hardware.h>
 #include <asm/io.h>
-#include <asm/arch/clock.h>
-#include <asm/arch/edp_rk3288.h>
-#include <asm/arch/vop_rk3288.h>
+#include <asm/arch-rockchip/clock.h>
+#include <asm/arch-rockchip/edp_rk3288.h>
+#include <asm/arch-rockchip/vop_rk3288.h>
 #include <dm/device-internal.h>
 #include <dm/uclass-internal.h>
+#include <linux/bitops.h>
+#include <linux/err.h>
 #include <power/regulator.h>
 #include "rk_vop.h"
 
@@ -119,10 +120,12 @@ static void rkvop_enable_output(struct udevice *dev, enum vop_modes mode)
                                V_EDP_OUT_EN(1));
                break;
 
+#if defined(CONFIG_ROCKCHIP_RK3288)
        case VOP_MODE_LVDS:
                clrsetbits_le32(&regs->sys_ctrl, M_ALL_OUT_EN,
                                V_RGB_OUT_EN(1));
                break;
+#endif
 
        case VOP_MODE_MIPI:
                clrsetbits_le32(&regs->sys_ctrl, M_ALL_OUT_EN,
@@ -314,7 +317,9 @@ static int rk_display_init(struct udevice *dev, ulong fbbase, ofnode ep_node)
        /* Set bitwidth for vop display according to vop mode */
        switch (vop_id) {
        case VOP_MODE_EDP:
+#if defined(CONFIG_ROCKCHIP_RK3288)
        case VOP_MODE_LVDS:
+#endif
                l2bpp = VIDEO_BPP16;
                break;
        case VOP_MODE_HDMI: