2019-05-29 14:17:56 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
2017-09-02 11:28:54 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) Fuzhou Rockchip Electronics Co.Ltd
|
|
|
|
* Author:
|
|
|
|
* Mark Yao <mark.yao@rock-chips.com>
|
|
|
|
* Sandy Huang <hjc@rock-chips.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/clk.h>
|
2019-07-16 06:42:19 +00:00
|
|
|
#include <linux/component.h>
|
2017-09-02 11:28:54 +00:00
|
|
|
#include <linux/mfd/syscon.h>
|
|
|
|
#include <linux/of_graph.h>
|
2019-12-24 14:38:58 +00:00
|
|
|
#include <linux/phy/phy.h>
|
2018-02-05 12:47:49 +00:00
|
|
|
#include <linux/pinctrl/devinfo.h>
|
2019-07-16 06:42:19 +00:00
|
|
|
#include <linux/platform_device.h>
|
2017-09-02 11:28:54 +00:00
|
|
|
#include <linux/pm_runtime.h>
|
|
|
|
#include <linux/regmap.h>
|
|
|
|
#include <linux/reset.h>
|
2020-03-05 15:59:40 +00:00
|
|
|
|
2019-07-16 06:42:19 +00:00
|
|
|
#include <drm/drm_atomic_helper.h>
|
2019-08-26 15:26:29 +00:00
|
|
|
#include <drm/drm_bridge.h>
|
2019-07-16 06:42:19 +00:00
|
|
|
#include <drm/drm_dp_helper.h>
|
|
|
|
#include <drm/drm_of.h>
|
|
|
|
#include <drm/drm_panel.h>
|
|
|
|
#include <drm/drm_probe_helper.h>
|
2020-03-05 15:59:40 +00:00
|
|
|
#include <drm/drm_simple_kms_helper.h>
|
2017-09-02 11:28:54 +00:00
|
|
|
|
|
|
|
#include "rockchip_drm_drv.h"
|
|
|
|
#include "rockchip_drm_vop.h"
|
|
|
|
#include "rockchip_lvds.h"
|
|
|
|
|
|
|
|
#define DISPLAY_OUTPUT_RGB 0
|
|
|
|
#define DISPLAY_OUTPUT_LVDS 1
|
|
|
|
#define DISPLAY_OUTPUT_DUAL_LVDS 2
|
|
|
|
|
2019-12-24 14:38:55 +00:00
|
|
|
struct rockchip_lvds;
|
|
|
|
|
2017-09-02 11:28:54 +00:00
|
|
|
#define connector_to_lvds(c) \
|
|
|
|
container_of(c, struct rockchip_lvds, connector)
|
|
|
|
|
|
|
|
#define encoder_to_lvds(c) \
|
|
|
|
container_of(c, struct rockchip_lvds, encoder)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* rockchip_lvds_soc_data - rockchip lvds Soc private data
|
2019-12-24 14:38:55 +00:00
|
|
|
* @probe: LVDS platform probe function
|
2019-12-24 14:38:54 +00:00
|
|
|
* @helper_funcs: LVDS connector helper functions
|
2017-09-02 11:28:54 +00:00
|
|
|
*/
|
|
|
|
struct rockchip_lvds_soc_data {
|
2019-12-24 14:38:55 +00:00
|
|
|
int (*probe)(struct platform_device *pdev, struct rockchip_lvds *lvds);
|
2019-12-24 14:38:54 +00:00
|
|
|
const struct drm_encoder_helper_funcs *helper_funcs;
|
2017-09-02 11:28:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct rockchip_lvds {
|
|
|
|
struct device *dev;
|
|
|
|
void __iomem *regs;
|
|
|
|
struct regmap *grf;
|
|
|
|
struct clk *pclk;
|
2019-12-24 14:38:58 +00:00
|
|
|
struct phy *dphy;
|
2017-09-02 11:28:54 +00:00
|
|
|
const struct rockchip_lvds_soc_data *soc_data;
|
|
|
|
int output; /* rgb lvds or dual lvds output */
|
|
|
|
int format; /* vesa or jeida format */
|
|
|
|
struct drm_device *drm_dev;
|
|
|
|
struct drm_panel *panel;
|
|
|
|
struct drm_bridge *bridge;
|
|
|
|
struct drm_connector connector;
|
|
|
|
struct drm_encoder encoder;
|
|
|
|
struct dev_pin_info *pins;
|
|
|
|
};
|
|
|
|
|
2019-12-24 14:38:53 +00:00
|
|
|
static inline void rk3288_writel(struct rockchip_lvds *lvds, u32 offset,
|
|
|
|
u32 val)
|
2017-09-02 11:28:54 +00:00
|
|
|
{
|
|
|
|
writel_relaxed(val, lvds->regs + offset);
|
|
|
|
if (lvds->output == DISPLAY_OUTPUT_LVDS)
|
|
|
|
return;
|
2019-12-24 14:38:54 +00:00
|
|
|
writel_relaxed(val, lvds->regs + offset + RK3288_LVDS_CH1_OFFSET);
|
2017-09-02 11:28:54 +00:00
|
|
|
}
|
|
|
|
|
2019-12-24 14:38:53 +00:00
|
|
|
static inline int rockchip_lvds_name_to_format(const char *s)
|
2017-09-02 11:28:54 +00:00
|
|
|
{
|
|
|
|
if (strncmp(s, "jeida-18", 8) == 0)
|
|
|
|
return LVDS_JEIDA_18;
|
|
|
|
else if (strncmp(s, "jeida-24", 8) == 0)
|
|
|
|
return LVDS_JEIDA_24;
|
|
|
|
else if (strncmp(s, "vesa-24", 7) == 0)
|
|
|
|
return LVDS_VESA_24;
|
|
|
|
|
|
|
|
return -EINVAL;
|
|
|
|
}
|
|
|
|
|
2019-12-24 14:38:53 +00:00
|
|
|
static inline int rockchip_lvds_name_to_output(const char *s)
|
2017-09-02 11:28:54 +00:00
|
|
|
{
|
|
|
|
if (strncmp(s, "rgb", 3) == 0)
|
|
|
|
return DISPLAY_OUTPUT_RGB;
|
|
|
|
else if (strncmp(s, "lvds", 4) == 0)
|
|
|
|
return DISPLAY_OUTPUT_LVDS;
|
|
|
|
else if (strncmp(s, "duallvds", 8) == 0)
|
|
|
|
return DISPLAY_OUTPUT_DUAL_LVDS;
|
|
|
|
|
|
|
|
return -EINVAL;
|
|
|
|
}
|
|
|
|
|
2019-12-24 14:38:57 +00:00
|
|
|
static const struct drm_connector_funcs rockchip_lvds_connector_funcs = {
|
|
|
|
.fill_modes = drm_helper_probe_single_connector_modes,
|
|
|
|
.destroy = drm_connector_cleanup,
|
|
|
|
.reset = drm_atomic_helper_connector_reset,
|
|
|
|
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
|
|
|
|
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
|
|
|
|
};
|
|
|
|
|
|
|
|
static int rockchip_lvds_connector_get_modes(struct drm_connector *connector)
|
|
|
|
{
|
|
|
|
struct rockchip_lvds *lvds = connector_to_lvds(connector);
|
|
|
|
struct drm_panel *panel = lvds->panel;
|
|
|
|
|
|
|
|
return drm_panel_get_modes(panel, connector);
|
|
|
|
}
|
|
|
|
|
|
|
|
static const
|
|
|
|
struct drm_connector_helper_funcs rockchip_lvds_connector_helper_funcs = {
|
|
|
|
.get_modes = rockchip_lvds_connector_get_modes,
|
|
|
|
};
|
|
|
|
|
|
|
|
static int
|
|
|
|
rockchip_lvds_encoder_atomic_check(struct drm_encoder *encoder,
|
|
|
|
struct drm_crtc_state *crtc_state,
|
|
|
|
struct drm_connector_state *conn_state)
|
|
|
|
{
|
|
|
|
struct rockchip_crtc_state *s = to_rockchip_crtc_state(crtc_state);
|
|
|
|
|
|
|
|
s->output_mode = ROCKCHIP_OUT_MODE_P888;
|
|
|
|
s->output_type = DRM_MODE_CONNECTOR_LVDS;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-12-24 14:38:53 +00:00
|
|
|
static int rk3288_lvds_poweron(struct rockchip_lvds *lvds)
|
2017-09-02 11:28:54 +00:00
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
u32 val;
|
|
|
|
|
|
|
|
ret = clk_enable(lvds->pclk);
|
|
|
|
if (ret < 0) {
|
|
|
|
DRM_DEV_ERROR(lvds->dev, "failed to enable lvds pclk %d\n", ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
ret = pm_runtime_get_sync(lvds->dev);
|
|
|
|
if (ret < 0) {
|
|
|
|
DRM_DEV_ERROR(lvds->dev, "failed to get pm runtime: %d\n", ret);
|
|
|
|
clk_disable(lvds->pclk);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
val = RK3288_LVDS_CH0_REG0_LANE4_EN | RK3288_LVDS_CH0_REG0_LANE3_EN |
|
|
|
|
RK3288_LVDS_CH0_REG0_LANE2_EN | RK3288_LVDS_CH0_REG0_LANE1_EN |
|
|
|
|
RK3288_LVDS_CH0_REG0_LANE0_EN;
|
|
|
|
if (lvds->output == DISPLAY_OUTPUT_RGB) {
|
|
|
|
val |= RK3288_LVDS_CH0_REG0_TTL_EN |
|
|
|
|
RK3288_LVDS_CH0_REG0_LANECK_EN;
|
2019-12-24 14:38:53 +00:00
|
|
|
rk3288_writel(lvds, RK3288_LVDS_CH0_REG0, val);
|
|
|
|
rk3288_writel(lvds, RK3288_LVDS_CH0_REG2,
|
|
|
|
RK3288_LVDS_PLL_FBDIV_REG2(0x46));
|
|
|
|
rk3288_writel(lvds, RK3288_LVDS_CH0_REG4,
|
|
|
|
RK3288_LVDS_CH0_REG4_LANECK_TTL_MODE |
|
|
|
|
RK3288_LVDS_CH0_REG4_LANE4_TTL_MODE |
|
|
|
|
RK3288_LVDS_CH0_REG4_LANE3_TTL_MODE |
|
|
|
|
RK3288_LVDS_CH0_REG4_LANE2_TTL_MODE |
|
|
|
|
RK3288_LVDS_CH0_REG4_LANE1_TTL_MODE |
|
|
|
|
RK3288_LVDS_CH0_REG4_LANE0_TTL_MODE);
|
|
|
|
rk3288_writel(lvds, RK3288_LVDS_CH0_REG5,
|
|
|
|
RK3288_LVDS_CH0_REG5_LANECK_TTL_DATA |
|
|
|
|
RK3288_LVDS_CH0_REG5_LANE4_TTL_DATA |
|
|
|
|
RK3288_LVDS_CH0_REG5_LANE3_TTL_DATA |
|
|
|
|
RK3288_LVDS_CH0_REG5_LANE2_TTL_DATA |
|
|
|
|
RK3288_LVDS_CH0_REG5_LANE1_TTL_DATA |
|
|
|
|
RK3288_LVDS_CH0_REG5_LANE0_TTL_DATA);
|
2017-09-02 11:28:54 +00:00
|
|
|
} else {
|
|
|
|
val |= RK3288_LVDS_CH0_REG0_LVDS_EN |
|
|
|
|
RK3288_LVDS_CH0_REG0_LANECK_EN;
|
2019-12-24 14:38:53 +00:00
|
|
|
rk3288_writel(lvds, RK3288_LVDS_CH0_REG0, val);
|
|
|
|
rk3288_writel(lvds, RK3288_LVDS_CH0_REG1,
|
|
|
|
RK3288_LVDS_CH0_REG1_LANECK_BIAS |
|
|
|
|
RK3288_LVDS_CH0_REG1_LANE4_BIAS |
|
|
|
|
RK3288_LVDS_CH0_REG1_LANE3_BIAS |
|
|
|
|
RK3288_LVDS_CH0_REG1_LANE2_BIAS |
|
|
|
|
RK3288_LVDS_CH0_REG1_LANE1_BIAS |
|
|
|
|
RK3288_LVDS_CH0_REG1_LANE0_BIAS);
|
|
|
|
rk3288_writel(lvds, RK3288_LVDS_CH0_REG2,
|
|
|
|
RK3288_LVDS_CH0_REG2_RESERVE_ON |
|
|
|
|
RK3288_LVDS_CH0_REG2_LANECK_LVDS_MODE |
|
|
|
|
RK3288_LVDS_CH0_REG2_LANE4_LVDS_MODE |
|
|
|
|
RK3288_LVDS_CH0_REG2_LANE3_LVDS_MODE |
|
|
|
|
RK3288_LVDS_CH0_REG2_LANE2_LVDS_MODE |
|
|
|
|
RK3288_LVDS_CH0_REG2_LANE1_LVDS_MODE |
|
|
|
|
RK3288_LVDS_CH0_REG2_LANE0_LVDS_MODE |
|
|
|
|
RK3288_LVDS_PLL_FBDIV_REG2(0x46));
|
|
|
|
rk3288_writel(lvds, RK3288_LVDS_CH0_REG4, 0x00);
|
|
|
|
rk3288_writel(lvds, RK3288_LVDS_CH0_REG5, 0x00);
|
2017-09-02 11:28:54 +00:00
|
|
|
}
|
2019-12-24 14:38:53 +00:00
|
|
|
rk3288_writel(lvds, RK3288_LVDS_CH0_REG3,
|
|
|
|
RK3288_LVDS_PLL_FBDIV_REG3(0x46));
|
|
|
|
rk3288_writel(lvds, RK3288_LVDS_CH0_REGD,
|
|
|
|
RK3288_LVDS_PLL_PREDIV_REGD(0x0a));
|
|
|
|
rk3288_writel(lvds, RK3288_LVDS_CH0_REG20,
|
|
|
|
RK3288_LVDS_CH0_REG20_LSB);
|
|
|
|
|
|
|
|
rk3288_writel(lvds, RK3288_LVDS_CFG_REGC,
|
|
|
|
RK3288_LVDS_CFG_REGC_PLL_ENABLE);
|
|
|
|
rk3288_writel(lvds, RK3288_LVDS_CFG_REG21,
|
|
|
|
RK3288_LVDS_CFG_REG21_TX_ENABLE);
|
2017-09-02 11:28:54 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-12-24 14:38:53 +00:00
|
|
|
static void rk3288_lvds_poweroff(struct rockchip_lvds *lvds)
|
2017-09-02 11:28:54 +00:00
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
u32 val;
|
|
|
|
|
2019-12-24 14:38:53 +00:00
|
|
|
rk3288_writel(lvds, RK3288_LVDS_CFG_REG21,
|
|
|
|
RK3288_LVDS_CFG_REG21_TX_ENABLE);
|
|
|
|
rk3288_writel(lvds, RK3288_LVDS_CFG_REGC,
|
|
|
|
RK3288_LVDS_CFG_REGC_PLL_ENABLE);
|
2017-09-02 11:28:54 +00:00
|
|
|
val = LVDS_DUAL | LVDS_TTL_EN | LVDS_CH0_EN | LVDS_CH1_EN | LVDS_PWRDN;
|
|
|
|
val |= val << 16;
|
2019-12-24 14:38:54 +00:00
|
|
|
ret = regmap_write(lvds->grf, RK3288_LVDS_GRF_SOC_CON7, val);
|
2017-09-02 11:28:54 +00:00
|
|
|
if (ret != 0)
|
|
|
|
DRM_DEV_ERROR(lvds->dev, "Could not write to GRF: %d\n", ret);
|
|
|
|
|
|
|
|
pm_runtime_put(lvds->dev);
|
|
|
|
clk_disable(lvds->pclk);
|
|
|
|
}
|
|
|
|
|
2019-12-24 14:38:56 +00:00
|
|
|
static int rk3288_lvds_grf_config(struct drm_encoder *encoder,
|
|
|
|
struct drm_display_mode *mode)
|
2017-09-02 11:28:54 +00:00
|
|
|
{
|
|
|
|
struct rockchip_lvds *lvds = encoder_to_lvds(encoder);
|
|
|
|
u8 pin_hsync = (mode->flags & DRM_MODE_FLAG_PHSYNC) ? 1 : 0;
|
|
|
|
u8 pin_dclk = (mode->flags & DRM_MODE_FLAG_PCSYNC) ? 1 : 0;
|
|
|
|
u32 val;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
/* iomux to LCD data/sync mode */
|
|
|
|
if (lvds->output == DISPLAY_OUTPUT_RGB)
|
|
|
|
if (lvds->pins && !IS_ERR(lvds->pins->default_state))
|
|
|
|
pinctrl_select_state(lvds->pins->p,
|
|
|
|
lvds->pins->default_state);
|
|
|
|
val = lvds->format | LVDS_CH0_EN;
|
|
|
|
if (lvds->output == DISPLAY_OUTPUT_RGB)
|
|
|
|
val |= LVDS_TTL_EN | LVDS_CH1_EN;
|
|
|
|
else if (lvds->output == DISPLAY_OUTPUT_DUAL_LVDS)
|
|
|
|
val |= LVDS_DUAL | LVDS_CH1_EN;
|
|
|
|
|
|
|
|
if ((mode->htotal - mode->hsync_start) & 0x01)
|
|
|
|
val |= LVDS_START_PHASE_RST_1;
|
|
|
|
|
|
|
|
val |= (pin_dclk << 8) | (pin_hsync << 9);
|
|
|
|
val |= (0xffff << 16);
|
2019-12-24 14:38:54 +00:00
|
|
|
ret = regmap_write(lvds->grf, RK3288_LVDS_GRF_SOC_CON7, val);
|
2019-12-24 14:38:56 +00:00
|
|
|
if (ret)
|
2017-09-02 11:28:54 +00:00
|
|
|
DRM_DEV_ERROR(lvds->dev, "Could not write to GRF: %d\n", ret);
|
2019-12-24 14:38:56 +00:00
|
|
|
|
|
|
|
return ret;
|
2017-09-02 11:28:54 +00:00
|
|
|
}
|
|
|
|
|
2019-12-24 14:38:53 +00:00
|
|
|
static int rk3288_lvds_set_vop_source(struct rockchip_lvds *lvds,
|
|
|
|
struct drm_encoder *encoder)
|
2017-09-02 11:28:54 +00:00
|
|
|
{
|
|
|
|
u32 val;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
ret = drm_of_encoder_active_endpoint_id(lvds->dev->of_node, encoder);
|
|
|
|
if (ret < 0)
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
val = RK3288_LVDS_SOC_CON6_SEL_VOP_LIT << 16;
|
|
|
|
if (ret)
|
|
|
|
val |= RK3288_LVDS_SOC_CON6_SEL_VOP_LIT;
|
|
|
|
|
2019-12-24 14:38:54 +00:00
|
|
|
ret = regmap_write(lvds->grf, RK3288_LVDS_GRF_SOC_CON6, val);
|
2017-09-02 11:28:54 +00:00
|
|
|
if (ret < 0)
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-12-24 14:38:53 +00:00
|
|
|
static void rk3288_lvds_encoder_enable(struct drm_encoder *encoder)
|
2017-09-02 11:28:54 +00:00
|
|
|
{
|
|
|
|
struct rockchip_lvds *lvds = encoder_to_lvds(encoder);
|
|
|
|
struct drm_display_mode *mode = &encoder->crtc->state->adjusted_mode;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
drm_panel_prepare(lvds->panel);
|
2019-12-24 14:38:56 +00:00
|
|
|
|
2019-12-24 14:38:53 +00:00
|
|
|
ret = rk3288_lvds_poweron(lvds);
|
2017-09-02 11:28:54 +00:00
|
|
|
if (ret < 0) {
|
2019-12-24 14:38:56 +00:00
|
|
|
DRM_DEV_ERROR(lvds->dev, "failed to power on LVDS: %d\n", ret);
|
2017-09-02 11:28:54 +00:00
|
|
|
drm_panel_unprepare(lvds->panel);
|
2019-12-24 14:38:56 +00:00
|
|
|
return;
|
2017-09-02 11:28:54 +00:00
|
|
|
}
|
2019-12-24 14:38:56 +00:00
|
|
|
|
|
|
|
ret = rk3288_lvds_grf_config(encoder, mode);
|
|
|
|
if (ret) {
|
|
|
|
DRM_DEV_ERROR(lvds->dev, "failed to configure LVDS: %d\n", ret);
|
|
|
|
drm_panel_unprepare(lvds->panel);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = rk3288_lvds_set_vop_source(lvds, encoder);
|
|
|
|
if (ret) {
|
|
|
|
DRM_DEV_ERROR(lvds->dev, "failed to set VOP source: %d\n", ret);
|
|
|
|
drm_panel_unprepare(lvds->panel);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2017-09-02 11:28:54 +00:00
|
|
|
drm_panel_enable(lvds->panel);
|
|
|
|
}
|
|
|
|
|
2019-12-24 14:38:53 +00:00
|
|
|
static void rk3288_lvds_encoder_disable(struct drm_encoder *encoder)
|
2017-09-02 11:28:54 +00:00
|
|
|
{
|
|
|
|
struct rockchip_lvds *lvds = encoder_to_lvds(encoder);
|
|
|
|
|
|
|
|
drm_panel_disable(lvds->panel);
|
2019-12-24 14:38:53 +00:00
|
|
|
rk3288_lvds_poweroff(lvds);
|
2017-09-02 11:28:54 +00:00
|
|
|
drm_panel_unprepare(lvds->panel);
|
|
|
|
}
|
|
|
|
|
2019-12-24 14:38:58 +00:00
|
|
|
static int px30_lvds_poweron(struct rockchip_lvds *lvds)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
ret = pm_runtime_get_sync(lvds->dev);
|
|
|
|
if (ret < 0) {
|
|
|
|
DRM_DEV_ERROR(lvds->dev, "failed to get pm runtime: %d\n", ret);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Enable LVDS mode */
|
|
|
|
return regmap_update_bits(lvds->grf, PX30_LVDS_GRF_PD_VO_CON1,
|
|
|
|
PX30_LVDS_MODE_EN(1) | PX30_LVDS_P2S_EN(1),
|
|
|
|
PX30_LVDS_MODE_EN(1) | PX30_LVDS_P2S_EN(1));
|
|
|
|
}
|
|
|
|
|
|
|
|
static void px30_lvds_poweroff(struct rockchip_lvds *lvds)
|
|
|
|
{
|
|
|
|
regmap_update_bits(lvds->grf, PX30_LVDS_GRF_PD_VO_CON1,
|
|
|
|
PX30_LVDS_MODE_EN(1) | PX30_LVDS_P2S_EN(1),
|
|
|
|
PX30_LVDS_MODE_EN(0) | PX30_LVDS_P2S_EN(0));
|
|
|
|
|
|
|
|
pm_runtime_put(lvds->dev);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int px30_lvds_grf_config(struct drm_encoder *encoder,
|
|
|
|
struct drm_display_mode *mode)
|
|
|
|
{
|
|
|
|
struct rockchip_lvds *lvds = encoder_to_lvds(encoder);
|
|
|
|
|
|
|
|
if (lvds->output != DISPLAY_OUTPUT_LVDS) {
|
|
|
|
DRM_DEV_ERROR(lvds->dev, "Unsupported display output %d\n",
|
|
|
|
lvds->output);
|
|
|
|
return -EINVAL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Set format */
|
|
|
|
return regmap_update_bits(lvds->grf, PX30_LVDS_GRF_PD_VO_CON1,
|
|
|
|
PX30_LVDS_FORMAT(lvds->format),
|
|
|
|
PX30_LVDS_FORMAT(lvds->format));
|
|
|
|
}
|
|
|
|
|
|
|
|
static int px30_lvds_set_vop_source(struct rockchip_lvds *lvds,
|
|
|
|
struct drm_encoder *encoder)
|
|
|
|
{
|
|
|
|
int vop;
|
|
|
|
|
|
|
|
vop = drm_of_encoder_active_endpoint_id(lvds->dev->of_node, encoder);
|
|
|
|
if (vop < 0)
|
|
|
|
return vop;
|
|
|
|
|
|
|
|
return regmap_update_bits(lvds->grf, PX30_LVDS_GRF_PD_VO_CON1,
|
|
|
|
PX30_LVDS_VOP_SEL(1),
|
|
|
|
PX30_LVDS_VOP_SEL(vop));
|
|
|
|
}
|
|
|
|
|
|
|
|
static void px30_lvds_encoder_enable(struct drm_encoder *encoder)
|
|
|
|
{
|
|
|
|
struct rockchip_lvds *lvds = encoder_to_lvds(encoder);
|
|
|
|
struct drm_display_mode *mode = &encoder->crtc->state->adjusted_mode;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
drm_panel_prepare(lvds->panel);
|
|
|
|
|
|
|
|
ret = px30_lvds_poweron(lvds);
|
|
|
|
if (ret) {
|
|
|
|
DRM_DEV_ERROR(lvds->dev, "failed to power on LVDS: %d\n", ret);
|
|
|
|
drm_panel_unprepare(lvds->panel);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = px30_lvds_grf_config(encoder, mode);
|
|
|
|
if (ret) {
|
|
|
|
DRM_DEV_ERROR(lvds->dev, "failed to configure LVDS: %d\n", ret);
|
|
|
|
drm_panel_unprepare(lvds->panel);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = px30_lvds_set_vop_source(lvds, encoder);
|
|
|
|
if (ret) {
|
|
|
|
DRM_DEV_ERROR(lvds->dev, "failed to set VOP source: %d\n", ret);
|
|
|
|
drm_panel_unprepare(lvds->panel);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
drm_panel_enable(lvds->panel);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void px30_lvds_encoder_disable(struct drm_encoder *encoder)
|
|
|
|
{
|
|
|
|
struct rockchip_lvds *lvds = encoder_to_lvds(encoder);
|
|
|
|
|
|
|
|
drm_panel_disable(lvds->panel);
|
|
|
|
px30_lvds_poweroff(lvds);
|
|
|
|
drm_panel_unprepare(lvds->panel);
|
|
|
|
}
|
|
|
|
|
2019-12-24 14:38:57 +00:00
|
|
|
static const
|
|
|
|
struct drm_encoder_helper_funcs rk3288_lvds_encoder_helper_funcs = {
|
|
|
|
.enable = rk3288_lvds_encoder_enable,
|
|
|
|
.disable = rk3288_lvds_encoder_disable,
|
|
|
|
.atomic_check = rockchip_lvds_encoder_atomic_check,
|
|
|
|
};
|
|
|
|
|
2019-12-24 14:38:58 +00:00
|
|
|
static const
|
|
|
|
struct drm_encoder_helper_funcs px30_lvds_encoder_helper_funcs = {
|
|
|
|
.enable = px30_lvds_encoder_enable,
|
|
|
|
.disable = px30_lvds_encoder_disable,
|
|
|
|
.atomic_check = rockchip_lvds_encoder_atomic_check,
|
|
|
|
};
|
|
|
|
|
2019-12-24 14:38:55 +00:00
|
|
|
static int rk3288_lvds_probe(struct platform_device *pdev,
|
|
|
|
struct rockchip_lvds *lvds)
|
|
|
|
{
|
|
|
|
struct resource *res;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
|
|
|
lvds->regs = devm_ioremap_resource(lvds->dev, res);
|
|
|
|
if (IS_ERR(lvds->regs))
|
|
|
|
return PTR_ERR(lvds->regs);
|
|
|
|
|
|
|
|
lvds->pclk = devm_clk_get(lvds->dev, "pclk_lvds");
|
|
|
|
if (IS_ERR(lvds->pclk)) {
|
|
|
|
DRM_DEV_ERROR(lvds->dev, "could not get pclk_lvds\n");
|
|
|
|
return PTR_ERR(lvds->pclk);
|
|
|
|
}
|
|
|
|
|
|
|
|
lvds->pins = devm_kzalloc(lvds->dev, sizeof(*lvds->pins),
|
|
|
|
GFP_KERNEL);
|
|
|
|
if (!lvds->pins)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
|
|
|
lvds->pins->p = devm_pinctrl_get(lvds->dev);
|
|
|
|
if (IS_ERR(lvds->pins->p)) {
|
|
|
|
DRM_DEV_ERROR(lvds->dev, "no pinctrl handle\n");
|
|
|
|
devm_kfree(lvds->dev, lvds->pins);
|
|
|
|
lvds->pins = NULL;
|
|
|
|
} else {
|
|
|
|
lvds->pins->default_state =
|
|
|
|
pinctrl_lookup_state(lvds->pins->p, "lcdc");
|
|
|
|
if (IS_ERR(lvds->pins->default_state)) {
|
|
|
|
DRM_DEV_ERROR(lvds->dev, "no default pinctrl state\n");
|
|
|
|
devm_kfree(lvds->dev, lvds->pins);
|
|
|
|
lvds->pins = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = clk_prepare(lvds->pclk);
|
|
|
|
if (ret < 0) {
|
|
|
|
DRM_DEV_ERROR(lvds->dev, "failed to prepare pclk_lvds\n");
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-12-24 14:38:58 +00:00
|
|
|
static int px30_lvds_probe(struct platform_device *pdev,
|
|
|
|
struct rockchip_lvds *lvds)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
/* MSB */
|
|
|
|
ret = regmap_update_bits(lvds->grf, PX30_LVDS_GRF_PD_VO_CON1,
|
|
|
|
PX30_LVDS_MSBSEL(1),
|
|
|
|
PX30_LVDS_MSBSEL(1));
|
|
|
|
if (ret)
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
/* PHY */
|
|
|
|
lvds->dphy = devm_phy_get(&pdev->dev, "dphy");
|
|
|
|
if (IS_ERR(lvds->dphy))
|
|
|
|
return PTR_ERR(lvds->dphy);
|
|
|
|
|
|
|
|
phy_init(lvds->dphy);
|
|
|
|
if (ret)
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
phy_set_mode(lvds->dphy, PHY_MODE_LVDS);
|
|
|
|
if (ret)
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
return phy_power_on(lvds->dphy);
|
|
|
|
}
|
|
|
|
|
2017-09-02 11:28:54 +00:00
|
|
|
static const struct rockchip_lvds_soc_data rk3288_lvds_data = {
|
2019-12-24 14:38:55 +00:00
|
|
|
.probe = rk3288_lvds_probe,
|
2019-12-24 14:38:54 +00:00
|
|
|
.helper_funcs = &rk3288_lvds_encoder_helper_funcs,
|
2017-09-02 11:28:54 +00:00
|
|
|
};
|
|
|
|
|
2019-12-24 14:38:58 +00:00
|
|
|
static const struct rockchip_lvds_soc_data px30_lvds_data = {
|
|
|
|
.probe = px30_lvds_probe,
|
|
|
|
.helper_funcs = &px30_lvds_encoder_helper_funcs,
|
|
|
|
};
|
|
|
|
|
2017-09-02 11:28:54 +00:00
|
|
|
static const struct of_device_id rockchip_lvds_dt_ids[] = {
|
|
|
|
{
|
|
|
|
.compatible = "rockchip,rk3288-lvds",
|
|
|
|
.data = &rk3288_lvds_data
|
|
|
|
},
|
2019-12-24 14:38:58 +00:00
|
|
|
{
|
|
|
|
.compatible = "rockchip,px30-lvds",
|
|
|
|
.data = &px30_lvds_data
|
|
|
|
},
|
2017-09-02 11:28:54 +00:00
|
|
|
{}
|
|
|
|
};
|
|
|
|
MODULE_DEVICE_TABLE(of, rockchip_lvds_dt_ids);
|
|
|
|
|
|
|
|
static int rockchip_lvds_bind(struct device *dev, struct device *master,
|
|
|
|
void *data)
|
|
|
|
{
|
|
|
|
struct rockchip_lvds *lvds = dev_get_drvdata(dev);
|
|
|
|
struct drm_device *drm_dev = data;
|
|
|
|
struct drm_encoder *encoder;
|
|
|
|
struct drm_connector *connector;
|
|
|
|
struct device_node *remote = NULL;
|
|
|
|
struct device_node *port, *endpoint;
|
2017-09-21 00:13:56 +00:00
|
|
|
int ret = 0, child_count = 0;
|
2017-09-02 11:28:54 +00:00
|
|
|
const char *name;
|
|
|
|
u32 endpoint_id;
|
|
|
|
|
|
|
|
lvds->drm_dev = drm_dev;
|
|
|
|
port = of_graph_get_port_by_id(dev->of_node, 1);
|
|
|
|
if (!port) {
|
|
|
|
DRM_DEV_ERROR(dev,
|
|
|
|
"can't found port point, please init lvds panel port!\n");
|
|
|
|
return -EINVAL;
|
|
|
|
}
|
|
|
|
for_each_child_of_node(port, endpoint) {
|
2017-09-21 00:13:56 +00:00
|
|
|
child_count++;
|
2017-09-02 11:28:54 +00:00
|
|
|
of_property_read_u32(endpoint, "reg", &endpoint_id);
|
|
|
|
ret = drm_of_find_panel_or_bridge(dev->of_node, 1, endpoint_id,
|
|
|
|
&lvds->panel, &lvds->bridge);
|
2018-05-23 19:07:16 +00:00
|
|
|
if (!ret) {
|
|
|
|
of_node_put(endpoint);
|
2017-09-02 11:28:54 +00:00
|
|
|
break;
|
2018-05-23 19:07:16 +00:00
|
|
|
}
|
2017-09-02 11:28:54 +00:00
|
|
|
}
|
2017-09-21 00:13:56 +00:00
|
|
|
if (!child_count) {
|
|
|
|
DRM_DEV_ERROR(dev, "lvds port does not have any children\n");
|
|
|
|
ret = -EINVAL;
|
|
|
|
goto err_put_port;
|
|
|
|
} else if (ret) {
|
2017-09-02 11:28:54 +00:00
|
|
|
DRM_DEV_ERROR(dev, "failed to find panel and bridge node\n");
|
2017-09-21 00:13:56 +00:00
|
|
|
ret = -EPROBE_DEFER;
|
2017-09-02 11:28:54 +00:00
|
|
|
goto err_put_port;
|
|
|
|
}
|
|
|
|
if (lvds->panel)
|
|
|
|
remote = lvds->panel->dev->of_node;
|
|
|
|
else
|
|
|
|
remote = lvds->bridge->of_node;
|
|
|
|
if (of_property_read_string(dev->of_node, "rockchip,output", &name))
|
|
|
|
/* default set it as output rgb */
|
|
|
|
lvds->output = DISPLAY_OUTPUT_RGB;
|
|
|
|
else
|
2019-12-24 14:38:53 +00:00
|
|
|
lvds->output = rockchip_lvds_name_to_output(name);
|
2017-09-02 11:28:54 +00:00
|
|
|
|
|
|
|
if (lvds->output < 0) {
|
|
|
|
DRM_DEV_ERROR(dev, "invalid output type [%s]\n", name);
|
|
|
|
ret = lvds->output;
|
|
|
|
goto err_put_remote;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (of_property_read_string(remote, "data-mapping", &name))
|
|
|
|
/* default set it as format vesa 18 */
|
|
|
|
lvds->format = LVDS_VESA_18;
|
|
|
|
else
|
2019-12-24 14:38:53 +00:00
|
|
|
lvds->format = rockchip_lvds_name_to_format(name);
|
2017-09-02 11:28:54 +00:00
|
|
|
|
|
|
|
if (lvds->format < 0) {
|
|
|
|
DRM_DEV_ERROR(dev, "invalid data-mapping format [%s]\n", name);
|
|
|
|
ret = lvds->format;
|
|
|
|
goto err_put_remote;
|
|
|
|
}
|
|
|
|
|
|
|
|
encoder = &lvds->encoder;
|
|
|
|
encoder->possible_crtcs = drm_of_find_possible_crtcs(drm_dev,
|
|
|
|
dev->of_node);
|
|
|
|
|
2020-03-05 15:59:40 +00:00
|
|
|
ret = drm_simple_encoder_init(drm_dev, encoder, DRM_MODE_ENCODER_LVDS);
|
2017-09-02 11:28:54 +00:00
|
|
|
if (ret < 0) {
|
|
|
|
DRM_DEV_ERROR(drm_dev->dev,
|
|
|
|
"failed to initialize encoder: %d\n", ret);
|
|
|
|
goto err_put_remote;
|
|
|
|
}
|
|
|
|
|
2019-12-24 14:38:54 +00:00
|
|
|
drm_encoder_helper_add(encoder, lvds->soc_data->helper_funcs);
|
2017-09-02 11:28:54 +00:00
|
|
|
|
|
|
|
if (lvds->panel) {
|
|
|
|
connector = &lvds->connector;
|
|
|
|
connector->dpms = DRM_MODE_DPMS_OFF;
|
|
|
|
ret = drm_connector_init(drm_dev, connector,
|
|
|
|
&rockchip_lvds_connector_funcs,
|
|
|
|
DRM_MODE_CONNECTOR_LVDS);
|
|
|
|
if (ret < 0) {
|
|
|
|
DRM_DEV_ERROR(drm_dev->dev,
|
|
|
|
"failed to initialize connector: %d\n", ret);
|
|
|
|
goto err_free_encoder;
|
|
|
|
}
|
|
|
|
|
|
|
|
drm_connector_helper_add(connector,
|
|
|
|
&rockchip_lvds_connector_helper_funcs);
|
|
|
|
|
2018-07-09 08:40:07 +00:00
|
|
|
ret = drm_connector_attach_encoder(connector, encoder);
|
2017-09-02 11:28:54 +00:00
|
|
|
if (ret < 0) {
|
|
|
|
DRM_DEV_ERROR(drm_dev->dev,
|
|
|
|
"failed to attach encoder: %d\n", ret);
|
|
|
|
goto err_free_connector;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = drm_panel_attach(lvds->panel, connector);
|
|
|
|
if (ret < 0) {
|
|
|
|
DRM_DEV_ERROR(drm_dev->dev,
|
|
|
|
"failed to attach panel: %d\n", ret);
|
|
|
|
goto err_free_connector;
|
|
|
|
}
|
|
|
|
} else {
|
drm/bridge: Extend bridge API to disable connector creation
Most bridge drivers create a DRM connector to model the connector at the
output of the bridge. This model is historical and has worked pretty
well so far, but causes several issues:
- It prevents supporting more complex display pipelines where DRM
connector operations are split over multiple components. For instance a
pipeline with a bridge connected to the DDC signals to read EDID data,
and another one connected to the HPD signal to detect connection and
disconnection, will not be possible to support through this model.
- It requires every bridge driver to implement similar connector
handling code, resulting in code duplication.
- It assumes that a bridge will either be wired to a connector or to
another bridge, but doesn't support bridges that can be used in both
positions very well (although there is some ad-hoc support for this in
the analogix_dp bridge driver).
In order to solve these issues, ownership of the connector should be
moved to the display controller driver (where it can be implemented
using helpers provided by the core).
Extend the bridge API to allow disabling connector creation in bridge
drivers as a first step towards the new model. The new flags argument to
the bridge .attach() operation allows instructing the bridge driver to
skip creating a connector. Unconditionally set the new flags argument to
0 for now to keep the existing behaviour, and modify all existing bridge
drivers to return an error when connector creation is not requested as
they don't support this feature yet.
The change is based on the following semantic patch, with manual review
and edits.
@ rule1 @
identifier funcs;
identifier fn;
@@
struct drm_bridge_funcs funcs = {
...,
.attach = fn
};
@ depends on rule1 @
identifier rule1.fn;
identifier bridge;
statement S, S1;
@@
int fn(
struct drm_bridge *bridge
+ , enum drm_bridge_attach_flags flags
)
{
... when != S
+ if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) {
+ DRM_ERROR("Fix bridge driver to make connector optional!");
+ return -EINVAL;
+ }
+
S1
...
}
@ depends on rule1 @
identifier rule1.fn;
identifier bridge, flags;
expression E1, E2, E3;
@@
int fn(
struct drm_bridge *bridge,
enum drm_bridge_attach_flags flags
) {
<...
drm_bridge_attach(E1, E2, E3
+ , flags
)
...>
}
@@
expression E1, E2, E3;
@@
drm_bridge_attach(E1, E2, E3
+ , 0
)
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tested-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200226112514.12455-10-laurent.pinchart@ideasonboard.com
2020-02-26 11:24:29 +00:00
|
|
|
ret = drm_bridge_attach(encoder, lvds->bridge, NULL, 0);
|
2017-09-02 11:28:54 +00:00
|
|
|
if (ret) {
|
|
|
|
DRM_DEV_ERROR(drm_dev->dev,
|
|
|
|
"failed to attach bridge: %d\n", ret);
|
|
|
|
goto err_free_encoder;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pm_runtime_enable(dev);
|
|
|
|
of_node_put(remote);
|
|
|
|
of_node_put(port);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
err_free_connector:
|
|
|
|
drm_connector_cleanup(connector);
|
|
|
|
err_free_encoder:
|
|
|
|
drm_encoder_cleanup(encoder);
|
|
|
|
err_put_remote:
|
|
|
|
of_node_put(remote);
|
|
|
|
err_put_port:
|
|
|
|
of_node_put(port);
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void rockchip_lvds_unbind(struct device *dev, struct device *master,
|
|
|
|
void *data)
|
|
|
|
{
|
|
|
|
struct rockchip_lvds *lvds = dev_get_drvdata(dev);
|
2019-12-24 14:38:54 +00:00
|
|
|
const struct drm_encoder_helper_funcs *encoder_funcs;
|
2017-09-02 11:28:54 +00:00
|
|
|
|
2019-12-24 14:38:54 +00:00
|
|
|
encoder_funcs = lvds->soc_data->helper_funcs;
|
|
|
|
encoder_funcs->disable(&lvds->encoder);
|
2017-09-02 11:28:54 +00:00
|
|
|
if (lvds->panel)
|
|
|
|
drm_panel_detach(lvds->panel);
|
|
|
|
pm_runtime_disable(dev);
|
|
|
|
drm_connector_cleanup(&lvds->connector);
|
|
|
|
drm_encoder_cleanup(&lvds->encoder);
|
|
|
|
}
|
|
|
|
|
|
|
|
static const struct component_ops rockchip_lvds_component_ops = {
|
|
|
|
.bind = rockchip_lvds_bind,
|
|
|
|
.unbind = rockchip_lvds_unbind,
|
|
|
|
};
|
|
|
|
|
|
|
|
static int rockchip_lvds_probe(struct platform_device *pdev)
|
|
|
|
{
|
|
|
|
struct device *dev = &pdev->dev;
|
|
|
|
struct rockchip_lvds *lvds;
|
|
|
|
const struct of_device_id *match;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
if (!dev->of_node)
|
|
|
|
return -ENODEV;
|
|
|
|
|
|
|
|
lvds = devm_kzalloc(&pdev->dev, sizeof(*lvds), GFP_KERNEL);
|
|
|
|
if (!lvds)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
|
|
|
lvds->dev = dev;
|
|
|
|
match = of_match_node(rockchip_lvds_dt_ids, dev->of_node);
|
|
|
|
if (!match)
|
|
|
|
return -ENODEV;
|
|
|
|
lvds->soc_data = match->data;
|
|
|
|
|
|
|
|
lvds->grf = syscon_regmap_lookup_by_phandle(dev->of_node,
|
|
|
|
"rockchip,grf");
|
|
|
|
if (IS_ERR(lvds->grf)) {
|
|
|
|
DRM_DEV_ERROR(dev, "missing rockchip,grf property\n");
|
|
|
|
return PTR_ERR(lvds->grf);
|
|
|
|
}
|
|
|
|
|
2019-12-24 14:38:55 +00:00
|
|
|
ret = lvds->soc_data->probe(pdev, lvds);
|
|
|
|
if (ret) {
|
|
|
|
DRM_DEV_ERROR(dev, "Platform initialization failed\n");
|
2017-09-02 11:28:54 +00:00
|
|
|
return ret;
|
|
|
|
}
|
2019-12-24 14:38:55 +00:00
|
|
|
|
|
|
|
dev_set_drvdata(dev, lvds);
|
|
|
|
|
2017-09-02 11:28:54 +00:00
|
|
|
ret = component_add(&pdev->dev, &rockchip_lvds_component_ops);
|
|
|
|
if (ret < 0) {
|
|
|
|
DRM_DEV_ERROR(dev, "failed to add component\n");
|
|
|
|
clk_unprepare(lvds->pclk);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int rockchip_lvds_remove(struct platform_device *pdev)
|
|
|
|
{
|
|
|
|
struct rockchip_lvds *lvds = dev_get_drvdata(&pdev->dev);
|
|
|
|
|
|
|
|
component_del(&pdev->dev, &rockchip_lvds_component_ops);
|
|
|
|
clk_unprepare(lvds->pclk);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct platform_driver rockchip_lvds_driver = {
|
|
|
|
.probe = rockchip_lvds_probe,
|
|
|
|
.remove = rockchip_lvds_remove,
|
|
|
|
.driver = {
|
|
|
|
.name = "rockchip-lvds",
|
|
|
|
.of_match_table = of_match_ptr(rockchip_lvds_dt_ids),
|
|
|
|
},
|
|
|
|
};
|