coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
dsi.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 /*
4  * This file is created based on MT8186 Functional Specification
5  * Chapter number: 6.9
6  */
7 
8 #ifndef SOC_MEDIATEK_MT8186_DSI_H
9 #define SOC_MEDIATEK_MT8186_DSI_H
10 
11 #include <soc/dsi_common.h>
12 
13 /* DSI features */
14 #define MTK_DSI_MIPI_RATIO_NUMERATOR 100
15 #define MTK_DSI_MIPI_RATIO_DENOMINATOR 100
16 #define MTK_DSI_DATA_RATE_MIN_MHZ 125
17 #define MTK_DSI_HAVE_SIZE_CON 1
18 #define PIXEL_STREAM_CUSTOM_HEADER 0xb
19 
20 /* MIPITX is SOC specific and cannot live in common. */
21 
22 /* MIPITX_REG */
23 struct mipi_tx_regs {
24  u32 reserved0[3];
25  u32 lane_con;
26  u32 reserved1[6];
27  u32 pll_pwr;
28  u32 pll_con0;
29  u32 pll_con1;
30  u32 pll_con2;
31  u32 pll_con3;
32  u32 pll_con4;
33  u32 reserved2[65];
35  u32 reserved3[63];
37  u32 reserved4[56];
39  u32 reserved5[6];
41  u32 reserved6[63];
43  u32 reserved7[63];
45 };
46 
47 check_member(mipi_tx_regs, pll_con4, 0x3c);
48 check_member(mipi_tx_regs, d3_sw_ctl_en, 0x544);
49 static struct mipi_tx_regs *const mipi_tx = (void *)MIPITX_BASE;
50 
51 /* Register values */
52 #define DSI_CK_CKMODE_EN BIT(0)
53 #define DSI_SW_CTL_EN BIT(0)
54 #define AD_DSI_PLL_SDM_PWR_ON BIT(0)
55 #define AD_DSI_PLL_SDM_ISO_EN BIT(1)
56 
57 #define RG_DSI_PLL_EN BIT(4)
58 #define RG_DSI_PLL_POSDIV (0x7 << 8)
59 
60 #endif
check_member(mipi_tx_regs, dsi_top_con, 0x40)
@ MIPITX_BASE
Definition: addressmap.h:41
static struct mipi_tx_regs *const mipi_tx
Definition: dsi.h:49
uint32_t u32
Definition: stdint.h:51
u32 d0_sw_ctl_en
Definition: dsi.h:32
u8 reserved0[40]
Definition: dsi.h:23
u32 d2_sw_ctl_en
Definition: dsi.h:30
u32 ck_sw_ctl_en
Definition: dsi.h:36
u32 ck_ckmode_en
Definition: dsi.h:34
u32 pll_con2
Definition: dsi.h:26
u32 d1_sw_ctl_en
Definition: dsi.h:38
u32 reserved3[63]
Definition: dsi.h:31
u32 reserved4[56]
Definition: dsi.h:33
u32 lane_con
Definition: dsi.h:21
u32 pll_pwr
Definition: dsi.h:23
u32 pll_con3
Definition: dsi.h:27
u8 reserved1[8]
Definition: dsi.h:26
u32 pll_con4
Definition: dsi.h:28
u32 pll_con1
Definition: dsi.h:25
u32 reserved7[63]
Definition: dsi.h:39
u32 pll_con0
Definition: dsi.h:24
u8 reserved2[4]
Definition: dsi.h:34
u32 reserved5[6]
Definition: dsi.h:35
u32 reserved6[63]
Definition: dsi.h:37
u32 d3_sw_ctl_en
Definition: dsi.h:40