linux/drivers/gpu/drm/tidss/tidss_oldi.h
Aradhya Bhatia 7246e09299 drm/tidss: Add OLDI bridge support
The AM62x and AM62Px SoCs feature 2 OLDI TXes each, which makes it
possible to connect them in dual-link or cloned single-link OLDI display
modes. The current OLDI support in tidss_dispc.c can only support for
a single OLDI TX, connected to a VP and doesn't really support
configuration of OLDIs in the other modes. The current OLDI support in
tidss_dispc.c also works on the principle that the OLDI output can only
be served by one, and only one, DSS video-port. This isn't the case in
the AM62Px SoC, where there are 2 DSS controllers present that share the
OLDI TXes.

Having their own devicetree and their own bridge entity will help
support the various display modes and sharing possiblilities of the OLDI
hardware.

For all these reasons, add support for the OLDI TXes as DRM bridges.

Signed-off-by: Aradhya Bhatia <a-bhatia1@ti.com>
Signed-off-by: Aradhya Bhatia <aradhya.bhatia@linux.dev>
Tested-by: Michael Walle <mwalle@kernel.org> # on am67a
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://lore.kernel.org/r/20250528122544.817829-5-aradhya.bhatia@linux.dev
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
2025-06-26 12:37:24 +03:00

43 lines
918 B
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2025 - Texas Instruments Incorporated
*
* Aradhya Bhatia <a-bhatia1@ti.com>
*/
#ifndef __TIDSS_OLDI_H__
#define __TIDSS_OLDI_H__
#include "tidss_drv.h"
struct tidss_oldi;
/* OLDI PORTS */
#define OLDI_INPUT_PORT 0
#define OLDI_OUTPUT_PORT 1
/* Control MMR Registers */
/* Register offsets */
#define OLDI_PD_CTRL 0x100
#define OLDI_LB_CTRL 0x104
/* Power control bits */
#define OLDI_PWRDOWN_TX(n) BIT(n)
/* LVDS Bandgap reference Enable/Disable */
#define OLDI_PWRDN_BG BIT(8)
enum tidss_oldi_link_type {
OLDI_MODE_UNSUPPORTED,
OLDI_MODE_SINGLE_LINK,
OLDI_MODE_CLONE_SINGLE_LINK,
OLDI_MODE_SECONDARY_CLONE_SINGLE_LINK,
OLDI_MODE_DUAL_LINK,
OLDI_MODE_SECONDARY_DUAL_LINK,
};
int tidss_oldi_init(struct tidss_device *tidss);
void tidss_oldi_deinit(struct tidss_device *tidss);
#endif /* __TIDSS_OLDI_H__ */