summaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data/rcar-du.h
blob: a5f045e1d8fe273c7db4a56382594ed07ccd1b93 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
 * rcar_du.h  --  R-Car Display Unit DRM driver
 *
 * Copyright (C) 2013 Renesas Corporation
 *
 * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */

#ifndef __RCAR_DU_H__
#define __RCAR_DU_H__

#include <video/videomode.h>

enum rcar_du_output {
	RCAR_DU_OUTPUT_DPAD0,
	RCAR_DU_OUTPUT_DPAD1,
	RCAR_DU_OUTPUT_LVDS0,
	RCAR_DU_OUTPUT_LVDS1,
	RCAR_DU_OUTPUT_TCON,
	RCAR_DU_OUTPUT_MAX,
};

enum rcar_du_encoder_type {
	RCAR_DU_ENCODER_UNUSED = 0,
	RCAR_DU_ENCODER_NONE,
	RCAR_DU_ENCODER_VGA,
	RCAR_DU_ENCODER_LVDS,
};

struct rcar_du_panel_data {
	unsigned int width_mm;		/* Panel width in mm */
	unsigned int height_mm;		/* Panel height in mm */
	struct videomode mode;
};

struct rcar_du_connector_lvds_data {
	struct rcar_du_panel_data panel;
};

struct rcar_du_connector_vga_data {
	/* TODO: Add DDC information for EDID retrieval */
};

/*
 * struct rcar_du_encoder_data - Encoder platform data
 * @type: the encoder type (RCAR_DU_ENCODER_*)
 * @output: the DU output the connector is connected to (RCAR_DU_OUTPUT_*)
 * @connector.lvds: platform data for LVDS connectors
 * @connector.vga: platform data for VGA connectors
 *
 * Encoder platform data describes an on-board encoder, its associated DU SoC
 * output, and the connector.
 */
struct rcar_du_encoder_data {
	enum rcar_du_encoder_type type;
	enum rcar_du_output output;

	union {
		struct rcar_du_connector_lvds_data lvds;
		struct rcar_du_connector_vga_data vga;
	} connector;
};

struct rcar_du_platform_data {
	struct rcar_du_encoder_data *encoders;
	unsigned int num_encoders;
};

#endif /* __RCAR_DU_H__ */