summaryrefslogtreecommitdiff
path: root/include/drm/bridge/fsl_imx_ldb.h
blob: ade80fb22fd53932b9fbfcae2ca57f4deae397d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright 2020 NXP
 */

#ifndef __FSL_IMX_LDB__
#define __FSL_IMX_LDB__

#include <drm/drm_bridge.h>

#define LDB_CH_NUM	2

struct ldb_channel {
	struct ldb *ldb;

	struct drm_bridge bridge;

	struct drm_panel *panel;
	struct drm_bridge *next_bridge;

	struct device_node *child;
	int chno;
	u32 bus_format;
	bool is_valid;
};

struct ldb {
	struct regmap *regmap;
	struct device *dev;
	struct ldb_channel *channel[LDB_CH_NUM];
	unsigned int ctrl_reg;
	u32 ldb_ctrl;
	int output_port;
	bool dual;
};

int ldb_bind(struct ldb *ldb, struct drm_encoder **encoder);

#endif /* __FSL_IMX_LDB__ */