blob: 05042dab1c6c908fbd91cd7833da543012c5a4aa [file] [log] [blame]
Svyatoslav Ryhel75fec412024-01-23 19:16:18 +02001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * (C) Copyright 2010
4 * NVIDIA Corporation <www.nvidia.com>
5 */
6
7#ifndef _TEGRA_DC_H
8#define _TEGRA_DC_H
9
10#ifndef __ASSEMBLY__
11#include <linux/bitops.h>
12#endif
13
14/* arch-tegra/dc exists only because T124 uses it */
15#include <asm/arch-tegra/dc.h>
16
Svyatoslav Ryhelbae46f32024-01-23 19:16:19 +020017#define TEGRA_DC_A "dc@54200000"
18#define TEGRA_DC_B "dc@54240000"
Svyatoslav Ryhel75fec412024-01-23 19:16:18 +020019#define TEGRA_DSI_A "dsi@54300000"
20#define TEGRA_DSI_B "dsi@54400000"
21
22struct tegra_dc_plat {
23 struct udevice *dev; /* Display controller device */
24 struct dc_ctlr *dc; /* Display controller regmap */
Svyatoslav Ryhelbae46f32024-01-23 19:16:19 +020025 bool pipe; /* DC number: 0 for A, 1 for B */
Svyatoslav Ryheld16c1052024-01-23 19:16:23 +020026 ulong scdiv; /* Shift clock divider */
Svyatoslav Ryhel75fec412024-01-23 19:16:18 +020027};
28
29/* This holds information about a window which can be displayed */
30struct disp_ctl_win {
31 enum win_color_depth_id fmt; /* Color depth/format */
32 unsigned int bpp; /* Bits per pixel */
33 phys_addr_t phys_addr; /* Physical address in memory */
34 unsigned int x; /* Horizontal address offset (bytes) */
35 unsigned int y; /* Veritical address offset (bytes) */
36 unsigned int w; /* Width of source window */
37 unsigned int h; /* Height of source window */
38 unsigned int stride; /* Number of bytes per line */
39 unsigned int out_x; /* Left edge of output window (col) */
40 unsigned int out_y; /* Top edge of output window (row) */
41 unsigned int out_w; /* Width of output window in pixels */
42 unsigned int out_h; /* Height of output window in pixels */
43};
44
45#endif /* _TEGRA_DC_H */