17b7ad5c3SSimon Glass /* 27b7ad5c3SSimon Glass * Copyright (c) 2015 Google, Inc 37b7ad5c3SSimon Glass * Copyright 2014 Rockchip Inc. 47b7ad5c3SSimon Glass * 57b7ad5c3SSimon Glass * SPDX-License-Identifier: GPL-2.0+ 67b7ad5c3SSimon Glass */ 77b7ad5c3SSimon Glass 87b7ad5c3SSimon Glass #include <common.h> 97b7ad5c3SSimon Glass #include <clk.h> 107b7ad5c3SSimon Glass #include <display.h> 117b7ad5c3SSimon Glass #include <dm.h> 127b7ad5c3SSimon Glass #include <edid.h> 137b7ad5c3SSimon Glass #include <regmap.h> 147b7ad5c3SSimon Glass #include <syscon.h> 157b7ad5c3SSimon Glass #include <video.h> 167b7ad5c3SSimon Glass #include <asm/gpio.h> 177b7ad5c3SSimon Glass #include <asm/hardware.h> 187b7ad5c3SSimon Glass #include <asm/io.h> 197b7ad5c3SSimon Glass #include <asm/arch/clock.h> 207b7ad5c3SSimon Glass #include <asm/arch/cru_rk3288.h> 217b7ad5c3SSimon Glass #include <asm/arch/grf_rk3288.h> 227b7ad5c3SSimon Glass #include <asm/arch/edp_rk3288.h> 237b7ad5c3SSimon Glass #include <asm/arch/hdmi_rk3288.h> 247b7ad5c3SSimon Glass #include <asm/arch/vop_rk3288.h> 257b7ad5c3SSimon Glass #include <dm/device-internal.h> 267b7ad5c3SSimon Glass #include <dm/uclass-internal.h> 277b7ad5c3SSimon Glass #include <dt-bindings/clock/rk3288-cru.h> 287b7ad5c3SSimon Glass #include <power/regulator.h> 297b7ad5c3SSimon Glass 307b7ad5c3SSimon Glass DECLARE_GLOBAL_DATA_PTR; 317b7ad5c3SSimon Glass 327b7ad5c3SSimon Glass struct rk_vop_priv { 337b7ad5c3SSimon Glass struct rk3288_vop *regs; 347b7ad5c3SSimon Glass struct rk3288_grf *grf; 357b7ad5c3SSimon Glass }; 367b7ad5c3SSimon Glass 377b7ad5c3SSimon Glass void rkvop_enable(struct rk3288_vop *regs, ulong fbbase, 387b7ad5c3SSimon Glass int fb_bits_per_pixel, const struct display_timing *edid) 397b7ad5c3SSimon Glass { 407b7ad5c3SSimon Glass u32 lb_mode; 417b7ad5c3SSimon Glass u32 rgb_mode; 427b7ad5c3SSimon Glass u32 hactive = edid->hactive.typ; 437b7ad5c3SSimon Glass u32 vactive = edid->vactive.typ; 447b7ad5c3SSimon Glass 457b7ad5c3SSimon Glass writel(V_ACT_WIDTH(hactive - 1) | V_ACT_HEIGHT(vactive - 1), 467b7ad5c3SSimon Glass ®s->win0_act_info); 477b7ad5c3SSimon Glass 487b7ad5c3SSimon Glass writel(V_DSP_XST(edid->hsync_len.typ + edid->hback_porch.typ) | 497b7ad5c3SSimon Glass V_DSP_YST(edid->vsync_len.typ + edid->vback_porch.typ), 507b7ad5c3SSimon Glass ®s->win0_dsp_st); 517b7ad5c3SSimon Glass 527b7ad5c3SSimon Glass writel(V_DSP_WIDTH(hactive - 1) | 537b7ad5c3SSimon Glass V_DSP_HEIGHT(vactive - 1), 547b7ad5c3SSimon Glass ®s->win0_dsp_info); 557b7ad5c3SSimon Glass 567b7ad5c3SSimon Glass clrsetbits_le32(®s->win0_color_key, M_WIN0_KEY_EN | M_WIN0_KEY_COLOR, 577b7ad5c3SSimon Glass V_WIN0_KEY_EN(0) | V_WIN0_KEY_COLOR(0)); 587b7ad5c3SSimon Glass 597b7ad5c3SSimon Glass switch (fb_bits_per_pixel) { 607b7ad5c3SSimon Glass case 16: 617b7ad5c3SSimon Glass rgb_mode = RGB565; 627b7ad5c3SSimon Glass writel(V_RGB565_VIRWIDTH(hactive), ®s->win0_vir); 637b7ad5c3SSimon Glass break; 647b7ad5c3SSimon Glass case 24: 657b7ad5c3SSimon Glass rgb_mode = RGB888; 667b7ad5c3SSimon Glass writel(V_RGB888_VIRWIDTH(hactive), ®s->win0_vir); 677b7ad5c3SSimon Glass break; 687b7ad5c3SSimon Glass case 32: 697b7ad5c3SSimon Glass default: 707b7ad5c3SSimon Glass rgb_mode = ARGB8888; 717b7ad5c3SSimon Glass writel(V_ARGB888_VIRWIDTH(hactive), ®s->win0_vir); 727b7ad5c3SSimon Glass break; 737b7ad5c3SSimon Glass } 747b7ad5c3SSimon Glass 757b7ad5c3SSimon Glass if (hactive > 2560) 767b7ad5c3SSimon Glass lb_mode = LB_RGB_3840X2; 777b7ad5c3SSimon Glass else if (hactive > 1920) 787b7ad5c3SSimon Glass lb_mode = LB_RGB_2560X4; 797b7ad5c3SSimon Glass else if (hactive > 1280) 807b7ad5c3SSimon Glass lb_mode = LB_RGB_1920X5; 817b7ad5c3SSimon Glass else 827b7ad5c3SSimon Glass lb_mode = LB_RGB_1280X8; 837b7ad5c3SSimon Glass 847b7ad5c3SSimon Glass clrsetbits_le32(®s->win0_ctrl0, 857b7ad5c3SSimon Glass M_WIN0_LB_MODE | M_WIN0_DATA_FMT | M_WIN0_EN, 867b7ad5c3SSimon Glass V_WIN0_LB_MODE(lb_mode) | V_WIN0_DATA_FMT(rgb_mode) | 877b7ad5c3SSimon Glass V_WIN0_EN(1)); 887b7ad5c3SSimon Glass 897b7ad5c3SSimon Glass writel(fbbase, ®s->win0_yrgb_mst); 907b7ad5c3SSimon Glass writel(0x01, ®s->reg_cfg_done); /* enable reg config */ 917b7ad5c3SSimon Glass } 927b7ad5c3SSimon Glass 937b7ad5c3SSimon Glass void rkvop_mode_set(struct rk3288_vop *regs, 947b7ad5c3SSimon Glass const struct display_timing *edid, enum vop_modes mode) 957b7ad5c3SSimon Glass { 967b7ad5c3SSimon Glass u32 hactive = edid->hactive.typ; 977b7ad5c3SSimon Glass u32 vactive = edid->vactive.typ; 987b7ad5c3SSimon Glass u32 hsync_len = edid->hsync_len.typ; 997b7ad5c3SSimon Glass u32 hback_porch = edid->hback_porch.typ; 1007b7ad5c3SSimon Glass u32 vsync_len = edid->vsync_len.typ; 1017b7ad5c3SSimon Glass u32 vback_porch = edid->vback_porch.typ; 1027b7ad5c3SSimon Glass u32 hfront_porch = edid->hfront_porch.typ; 1037b7ad5c3SSimon Glass u32 vfront_porch = edid->vfront_porch.typ; 1047b7ad5c3SSimon Glass uint flags; 10585307835SJacob Chen int mode_flags; 1067b7ad5c3SSimon Glass 1077b7ad5c3SSimon Glass switch (mode) { 1087b7ad5c3SSimon Glass case VOP_MODE_HDMI: 1097b7ad5c3SSimon Glass clrsetbits_le32(®s->sys_ctrl, M_ALL_OUT_EN, 1107b7ad5c3SSimon Glass V_HDMI_OUT_EN(1)); 1117b7ad5c3SSimon Glass break; 1127b7ad5c3SSimon Glass case VOP_MODE_EDP: 1137b7ad5c3SSimon Glass default: 1147b7ad5c3SSimon Glass clrsetbits_le32(®s->sys_ctrl, M_ALL_OUT_EN, 1157b7ad5c3SSimon Glass V_EDP_OUT_EN(1)); 1167b7ad5c3SSimon Glass break; 11785307835SJacob Chen case VOP_MODE_LVDS: 11885307835SJacob Chen clrsetbits_le32(®s->sys_ctrl, M_ALL_OUT_EN, 11985307835SJacob Chen V_RGB_OUT_EN(1)); 12085307835SJacob Chen break; 1217b7ad5c3SSimon Glass } 1227b7ad5c3SSimon Glass 12385307835SJacob Chen if (mode == VOP_MODE_HDMI || mode == VOP_MODE_EDP) 12485307835SJacob Chen /* RGBaaa */ 12585307835SJacob Chen mode_flags = 15; 12685307835SJacob Chen else 12785307835SJacob Chen /* RGB888 */ 12885307835SJacob Chen mode_flags = 0; 12985307835SJacob Chen 13085307835SJacob Chen flags = V_DSP_OUT_MODE(mode_flags) | 1317b7ad5c3SSimon Glass V_DSP_HSYNC_POL(!!(edid->flags & DISPLAY_FLAGS_HSYNC_HIGH)) | 1327b7ad5c3SSimon Glass V_DSP_VSYNC_POL(!!(edid->flags & DISPLAY_FLAGS_VSYNC_HIGH)); 1337b7ad5c3SSimon Glass 1347b7ad5c3SSimon Glass clrsetbits_le32(®s->dsp_ctrl0, 1357b7ad5c3SSimon Glass M_DSP_OUT_MODE | M_DSP_VSYNC_POL | M_DSP_HSYNC_POL, 1367b7ad5c3SSimon Glass flags); 1377b7ad5c3SSimon Glass 1387b7ad5c3SSimon Glass writel(V_HSYNC(hsync_len) | 1397b7ad5c3SSimon Glass V_HORPRD(hsync_len + hback_porch + hactive + hfront_porch), 1407b7ad5c3SSimon Glass ®s->dsp_htotal_hs_end); 1417b7ad5c3SSimon Glass 1427b7ad5c3SSimon Glass writel(V_HEAP(hsync_len + hback_porch + hactive) | 1437b7ad5c3SSimon Glass V_HASP(hsync_len + hback_porch), 1447b7ad5c3SSimon Glass ®s->dsp_hact_st_end); 1457b7ad5c3SSimon Glass 1467b7ad5c3SSimon Glass writel(V_VSYNC(vsync_len) | 1477b7ad5c3SSimon Glass V_VERPRD(vsync_len + vback_porch + vactive + vfront_porch), 1487b7ad5c3SSimon Glass ®s->dsp_vtotal_vs_end); 1497b7ad5c3SSimon Glass 1507b7ad5c3SSimon Glass writel(V_VAEP(vsync_len + vback_porch + vactive)| 1517b7ad5c3SSimon Glass V_VASP(vsync_len + vback_porch), 1527b7ad5c3SSimon Glass ®s->dsp_vact_st_end); 1537b7ad5c3SSimon Glass 1547b7ad5c3SSimon Glass writel(V_HEAP(hsync_len + hback_porch + hactive) | 1557b7ad5c3SSimon Glass V_HASP(hsync_len + hback_porch), 1567b7ad5c3SSimon Glass ®s->post_dsp_hact_info); 1577b7ad5c3SSimon Glass 1587b7ad5c3SSimon Glass writel(V_VAEP(vsync_len + vback_porch + vactive)| 1597b7ad5c3SSimon Glass V_VASP(vsync_len + vback_porch), 1607b7ad5c3SSimon Glass ®s->post_dsp_vact_info); 1617b7ad5c3SSimon Glass 1627b7ad5c3SSimon Glass writel(0x01, ®s->reg_cfg_done); /* enable reg config */ 1637b7ad5c3SSimon Glass } 1647b7ad5c3SSimon Glass 1657b7ad5c3SSimon Glass /** 1667b7ad5c3SSimon Glass * rk_display_init() - Try to enable the given display device 1677b7ad5c3SSimon Glass * 1687b7ad5c3SSimon Glass * This function performs many steps: 1697b7ad5c3SSimon Glass * - Finds the display device being referenced by @ep_node 1707b7ad5c3SSimon Glass * - Puts the VOP's ID into its uclass platform data 1717b7ad5c3SSimon Glass * - Probes the device to set it up 1727b7ad5c3SSimon Glass * - Reads the EDID timing information 1737b7ad5c3SSimon Glass * - Sets up the VOP clocks, etc. for the selected pixel clock and display mode 1747b7ad5c3SSimon Glass * - Enables the display (the display device handles this and will do different 1757b7ad5c3SSimon Glass * things depending on the display type) 1767b7ad5c3SSimon Glass * - Tells the uclass about the display resolution so that the console will 1777b7ad5c3SSimon Glass * appear correctly 1787b7ad5c3SSimon Glass * 1797b7ad5c3SSimon Glass * @dev: VOP device that we want to connect to the display 1807b7ad5c3SSimon Glass * @fbbase: Frame buffer address 1817b7ad5c3SSimon Glass * @l2bpp Log2 of bits-per-pixels for the display 1827b7ad5c3SSimon Glass * @ep_node: Device tree node to process - this is the offset of an endpoint 1837b7ad5c3SSimon Glass * node within the VOP's 'port' list. 1847b7ad5c3SSimon Glass * @return 0 if OK, -ve if something went wrong 1857b7ad5c3SSimon Glass */ 1867b7ad5c3SSimon Glass int rk_display_init(struct udevice *dev, ulong fbbase, 1877b7ad5c3SSimon Glass enum video_log2_bpp l2bpp, int ep_node) 1887b7ad5c3SSimon Glass { 1897b7ad5c3SSimon Glass struct video_priv *uc_priv = dev_get_uclass_priv(dev); 1907b7ad5c3SSimon Glass const void *blob = gd->fdt_blob; 1917b7ad5c3SSimon Glass struct rk_vop_priv *priv = dev_get_priv(dev); 1927b7ad5c3SSimon Glass int vop_id, remote_vop_id; 1937b7ad5c3SSimon Glass struct rk3288_vop *regs = priv->regs; 1947b7ad5c3SSimon Glass struct display_timing timing; 1957b7ad5c3SSimon Glass struct udevice *disp; 1967b7ad5c3SSimon Glass int ret, remote, i, offset; 1977b7ad5c3SSimon Glass struct display_plat *disp_uc_plat; 198135aa950SStephen Warren struct clk clk; 1997b7ad5c3SSimon Glass 2007b7ad5c3SSimon Glass vop_id = fdtdec_get_int(blob, ep_node, "reg", -1); 2017b7ad5c3SSimon Glass debug("vop_id=%d\n", vop_id); 2027b7ad5c3SSimon Glass remote = fdtdec_lookup_phandle(blob, ep_node, "remote-endpoint"); 2037b7ad5c3SSimon Glass if (remote < 0) 2047b7ad5c3SSimon Glass return -EINVAL; 2057b7ad5c3SSimon Glass remote_vop_id = fdtdec_get_int(blob, remote, "reg", -1); 2067b7ad5c3SSimon Glass debug("remote vop_id=%d\n", remote_vop_id); 2077b7ad5c3SSimon Glass 2087b7ad5c3SSimon Glass for (i = 0, offset = remote; i < 3 && offset > 0; i++) 2097b7ad5c3SSimon Glass offset = fdt_parent_offset(blob, offset); 2107b7ad5c3SSimon Glass if (offset < 0) { 2117b7ad5c3SSimon Glass debug("%s: Invalid remote-endpoint position\n", dev->name); 2127b7ad5c3SSimon Glass return -EINVAL; 2137b7ad5c3SSimon Glass } 2147b7ad5c3SSimon Glass 2157b7ad5c3SSimon Glass ret = uclass_find_device_by_of_offset(UCLASS_DISPLAY, offset, &disp); 2167b7ad5c3SSimon Glass if (ret) { 2177b7ad5c3SSimon Glass debug("%s: device '%s' display not found (ret=%d)\n", __func__, 2187b7ad5c3SSimon Glass dev->name, ret); 2197b7ad5c3SSimon Glass return ret; 2207b7ad5c3SSimon Glass } 2217b7ad5c3SSimon Glass 2227b7ad5c3SSimon Glass disp_uc_plat = dev_get_uclass_platdata(disp); 2237b7ad5c3SSimon Glass debug("Found device '%s', disp_uc_priv=%p\n", disp->name, disp_uc_plat); 2247b7ad5c3SSimon Glass disp_uc_plat->source_id = remote_vop_id; 2257b7ad5c3SSimon Glass disp_uc_plat->src_dev = dev; 2267b7ad5c3SSimon Glass 2277b7ad5c3SSimon Glass ret = device_probe(disp); 2287b7ad5c3SSimon Glass if (ret) { 2297b7ad5c3SSimon Glass debug("%s: device '%s' display won't probe (ret=%d)\n", 2307b7ad5c3SSimon Glass __func__, dev->name, ret); 2317b7ad5c3SSimon Glass return ret; 2327b7ad5c3SSimon Glass } 2337b7ad5c3SSimon Glass 2347b7ad5c3SSimon Glass ret = display_read_timing(disp, &timing); 2357b7ad5c3SSimon Glass if (ret) { 2367b7ad5c3SSimon Glass debug("%s: Failed to read timings\n", __func__); 2377b7ad5c3SSimon Glass return ret; 2387b7ad5c3SSimon Glass } 2397b7ad5c3SSimon Glass 240*9ed68260SSimon Glass ret = clk_get_by_index(dev, 1, &clk); 241135aa950SStephen Warren if (!ret) 242135aa950SStephen Warren ret = clk_set_rate(&clk, timing.pixelclock.typ); 2437b7ad5c3SSimon Glass if (ret) { 2447b7ad5c3SSimon Glass debug("%s: Failed to set pixel clock: ret=%d\n", __func__, ret); 2457b7ad5c3SSimon Glass return ret; 2467b7ad5c3SSimon Glass } 2477b7ad5c3SSimon Glass 2487b7ad5c3SSimon Glass rkvop_mode_set(regs, &timing, vop_id); 2497b7ad5c3SSimon Glass 2507b7ad5c3SSimon Glass rkvop_enable(regs, fbbase, 1 << l2bpp, &timing); 2517b7ad5c3SSimon Glass 2527b7ad5c3SSimon Glass ret = display_enable(disp, 1 << l2bpp, &timing); 2537b7ad5c3SSimon Glass if (ret) 2547b7ad5c3SSimon Glass return ret; 2557b7ad5c3SSimon Glass 2567b7ad5c3SSimon Glass uc_priv->xsize = timing.hactive.typ; 2577b7ad5c3SSimon Glass uc_priv->ysize = timing.vactive.typ; 2587b7ad5c3SSimon Glass uc_priv->bpix = l2bpp; 2597b7ad5c3SSimon Glass debug("fb=%lx, size=%d %d\n", fbbase, uc_priv->xsize, uc_priv->ysize); 2607b7ad5c3SSimon Glass 2617b7ad5c3SSimon Glass return 0; 2627b7ad5c3SSimon Glass } 2637b7ad5c3SSimon Glass 2647b7ad5c3SSimon Glass static int rk_vop_probe(struct udevice *dev) 2657b7ad5c3SSimon Glass { 2667b7ad5c3SSimon Glass struct video_uc_platdata *plat = dev_get_uclass_platdata(dev); 2677b7ad5c3SSimon Glass const void *blob = gd->fdt_blob; 2687b7ad5c3SSimon Glass struct rk_vop_priv *priv = dev_get_priv(dev); 2697b7ad5c3SSimon Glass struct udevice *reg; 2707b7ad5c3SSimon Glass int ret, port, node; 2717b7ad5c3SSimon Glass 2727b7ad5c3SSimon Glass /* Before relocation we don't need to do anything */ 2737b7ad5c3SSimon Glass if (!(gd->flags & GD_FLG_RELOC)) 2747b7ad5c3SSimon Glass return 0; 2757b7ad5c3SSimon Glass 2767b7ad5c3SSimon Glass priv->grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF); 2777b7ad5c3SSimon Glass priv->regs = (struct rk3288_vop *)dev_get_addr(dev); 2787b7ad5c3SSimon Glass 2797b7ad5c3SSimon Glass /* lcdc(vop) iodomain select 1.8V */ 2807b7ad5c3SSimon Glass rk_setreg(&priv->grf->io_vsel, 1 << 0); 2817b7ad5c3SSimon Glass 2827b7ad5c3SSimon Glass /* 2837b7ad5c3SSimon Glass * Try some common regulators. We should really get these from the 2847b7ad5c3SSimon Glass * device tree somehow. 2857b7ad5c3SSimon Glass */ 2867b7ad5c3SSimon Glass ret = regulator_autoset_by_name("vcc18_lcd", ®); 2877b7ad5c3SSimon Glass if (ret) 2887b7ad5c3SSimon Glass debug("%s: Cannot autoset regulator vcc18_lcd\n", __func__); 2897b7ad5c3SSimon Glass ret = regulator_autoset_by_name("VCC18_LCD", ®); 2907b7ad5c3SSimon Glass if (ret) 2917b7ad5c3SSimon Glass debug("%s: Cannot autoset regulator VCC18_LCD\n", __func__); 2927b7ad5c3SSimon Glass ret = regulator_autoset_by_name("vdd10_lcd_pwren_h", ®); 2937b7ad5c3SSimon Glass if (ret) { 2947b7ad5c3SSimon Glass debug("%s: Cannot autoset regulator vdd10_lcd_pwren_h\n", 2957b7ad5c3SSimon Glass __func__); 2967b7ad5c3SSimon Glass } 2977b7ad5c3SSimon Glass ret = regulator_autoset_by_name("vdd10_lcd", ®); 2987b7ad5c3SSimon Glass if (ret) { 2997b7ad5c3SSimon Glass debug("%s: Cannot autoset regulator vdd10_lcd\n", 3007b7ad5c3SSimon Glass __func__); 3017b7ad5c3SSimon Glass } 3027b7ad5c3SSimon Glass ret = regulator_autoset_by_name("VDD10_LCD", ®); 3037b7ad5c3SSimon Glass if (ret) { 3047b7ad5c3SSimon Glass debug("%s: Cannot autoset regulator VDD10_LCD\n", 3057b7ad5c3SSimon Glass __func__); 3067b7ad5c3SSimon Glass } 3077b7ad5c3SSimon Glass ret = regulator_autoset_by_name("vcc33_lcd", ®); 3087b7ad5c3SSimon Glass if (ret) 3097b7ad5c3SSimon Glass debug("%s: Cannot autoset regulator vcc33_lcd\n", __func__); 3107b7ad5c3SSimon Glass 3117b7ad5c3SSimon Glass /* 3127b7ad5c3SSimon Glass * Try all the ports until we find one that works. In practice this 3137b7ad5c3SSimon Glass * tries EDP first if available, then HDMI. 3147b7ad5c3SSimon Glass */ 3157b7ad5c3SSimon Glass port = fdt_subnode_offset(blob, dev->of_offset, "port"); 3167b7ad5c3SSimon Glass if (port < 0) 3177b7ad5c3SSimon Glass return -EINVAL; 3187b7ad5c3SSimon Glass for (node = fdt_first_subnode(blob, port); 3197b7ad5c3SSimon Glass node > 0; 3207b7ad5c3SSimon Glass node = fdt_next_subnode(blob, node)) { 3217b7ad5c3SSimon Glass ret = rk_display_init(dev, plat->base, VIDEO_BPP16, node); 3227b7ad5c3SSimon Glass if (ret) 3237b7ad5c3SSimon Glass debug("Device failed: ret=%d\n", ret); 3247b7ad5c3SSimon Glass if (!ret) 3257b7ad5c3SSimon Glass break; 3267b7ad5c3SSimon Glass } 327b55e04a0SSimon Glass video_set_flush_dcache(dev, 1); 3287b7ad5c3SSimon Glass 3297b7ad5c3SSimon Glass return ret; 3307b7ad5c3SSimon Glass } 3317b7ad5c3SSimon Glass 3327b7ad5c3SSimon Glass static int rk_vop_bind(struct udevice *dev) 3337b7ad5c3SSimon Glass { 3347b7ad5c3SSimon Glass struct video_uc_platdata *plat = dev_get_uclass_platdata(dev); 3357b7ad5c3SSimon Glass 3367b7ad5c3SSimon Glass plat->size = 1920 * 1080 * 2; 3377b7ad5c3SSimon Glass 3387b7ad5c3SSimon Glass return 0; 3397b7ad5c3SSimon Glass } 3407b7ad5c3SSimon Glass 3417b7ad5c3SSimon Glass static const struct video_ops rk_vop_ops = { 3427b7ad5c3SSimon Glass }; 3437b7ad5c3SSimon Glass 3447b7ad5c3SSimon Glass static const struct udevice_id rk_vop_ids[] = { 3457b7ad5c3SSimon Glass { .compatible = "rockchip,rk3288-vop" }, 3467b7ad5c3SSimon Glass { } 3477b7ad5c3SSimon Glass }; 3487b7ad5c3SSimon Glass 3497b7ad5c3SSimon Glass U_BOOT_DRIVER(rk_vop) = { 3507b7ad5c3SSimon Glass .name = "rk_vop", 3517b7ad5c3SSimon Glass .id = UCLASS_VIDEO, 3527b7ad5c3SSimon Glass .of_match = rk_vop_ids, 3537b7ad5c3SSimon Glass .ops = &rk_vop_ops, 3547b7ad5c3SSimon Glass .bind = rk_vop_bind, 3557b7ad5c3SSimon Glass .probe = rk_vop_probe, 3567b7ad5c3SSimon Glass .priv_auto_alloc_size = sizeof(struct rk_vop_priv), 3577b7ad5c3SSimon Glass }; 358