1*d687e056SYongqiang Niu /* SPDX-License-Identifier: GPL-2.0-only */
2*d687e056SYongqiang Niu 
3*d687e056SYongqiang Niu #ifndef __SOC_MEDIATEK_MT8192_MMSYS_H
4*d687e056SYongqiang Niu #define __SOC_MEDIATEK_MT8192_MMSYS_H
5*d687e056SYongqiang Niu 
6*d687e056SYongqiang Niu #define MT8192_MMSYS_OVL_MOUT_EN		0xf04
7*d687e056SYongqiang Niu #define MT8192_DISP_OVL1_2L_MOUT_EN		0xf08
8*d687e056SYongqiang Niu #define MT8192_DISP_OVL0_2L_MOUT_EN		0xf18
9*d687e056SYongqiang Niu #define MT8192_DISP_OVL0_MOUT_EN		0xf1c
10*d687e056SYongqiang Niu #define MT8192_DISP_RDMA0_SEL_IN		0xf2c
11*d687e056SYongqiang Niu #define MT8192_DISP_RDMA0_SOUT_SEL		0xf30
12*d687e056SYongqiang Niu #define MT8192_DISP_CCORR0_SOUT_SEL		0xf34
13*d687e056SYongqiang Niu #define MT8192_DISP_AAL0_SEL_IN			0xf38
14*d687e056SYongqiang Niu #define MT8192_DISP_DITHER0_MOUT_EN		0xf3c
15*d687e056SYongqiang Niu #define MT8192_DISP_DSI0_SEL_IN			0xf40
16*d687e056SYongqiang Niu #define MT8192_DISP_OVL2_2L_MOUT_EN		0xf4c
17*d687e056SYongqiang Niu 
18*d687e056SYongqiang Niu #define MT8192_DISP_OVL0_GO_BLEND			BIT(0)
19*d687e056SYongqiang Niu #define MT8192_DITHER0_MOUT_IN_DSI0			BIT(0)
20*d687e056SYongqiang Niu #define MT8192_OVL0_MOUT_EN_DISP_RDMA0			BIT(0)
21*d687e056SYongqiang Niu #define MT8192_OVL2_2L_MOUT_EN_RDMA4			BIT(0)
22*d687e056SYongqiang Niu #define MT8192_DISP_OVL0_GO_BG				BIT(1)
23*d687e056SYongqiang Niu #define MT8192_DISP_OVL0_2L_GO_BLEND			BIT(2)
24*d687e056SYongqiang Niu #define MT8192_DISP_OVL0_2L_GO_BG			BIT(3)
25*d687e056SYongqiang Niu #define MT8192_OVL1_2L_MOUT_EN_RDMA1			BIT(4)
26*d687e056SYongqiang Niu #define MT8192_OVL0_MOUT_EN_OVL0_2L			BIT(4)
27*d687e056SYongqiang Niu #define MT8192_RDMA0_SEL_IN_OVL0_2L			0x3
28*d687e056SYongqiang Niu #define MT8192_RDMA0_SOUT_COLOR0			0x1
29*d687e056SYongqiang Niu #define MT8192_CCORR0_SOUT_AAL0				0x1
30*d687e056SYongqiang Niu #define MT8192_AAL0_SEL_IN_CCORR0			0x1
31*d687e056SYongqiang Niu #define MT8192_DSI0_SEL_IN_DITHER0			0x1
32*d687e056SYongqiang Niu 
33*d687e056SYongqiang Niu static const struct mtk_mmsys_routes mmsys_mt8192_routing_table[] = {
34*d687e056SYongqiang Niu 	{
35*d687e056SYongqiang Niu 		DDP_COMPONENT_OVL_2L0, DDP_COMPONENT_RDMA0,
36*d687e056SYongqiang Niu 		MT8192_DISP_OVL0_2L_MOUT_EN, MT8192_OVL0_MOUT_EN_DISP_RDMA0,
37*d687e056SYongqiang Niu 		MT8192_OVL0_MOUT_EN_DISP_RDMA0
38*d687e056SYongqiang Niu 	}, {
39*d687e056SYongqiang Niu 		DDP_COMPONENT_OVL_2L2, DDP_COMPONENT_RDMA4,
40*d687e056SYongqiang Niu 		MT8192_DISP_OVL2_2L_MOUT_EN, MT8192_OVL2_2L_MOUT_EN_RDMA4,
41*d687e056SYongqiang Niu 		MT8192_OVL2_2L_MOUT_EN_RDMA4
42*d687e056SYongqiang Niu 	}, {
43*d687e056SYongqiang Niu 		DDP_COMPONENT_DITHER, DDP_COMPONENT_DSI0,
44*d687e056SYongqiang Niu 		MT8192_DISP_DITHER0_MOUT_EN, MT8192_DITHER0_MOUT_IN_DSI0,
45*d687e056SYongqiang Niu 		MT8192_DITHER0_MOUT_IN_DSI0
46*d687e056SYongqiang Niu 	}, {
47*d687e056SYongqiang Niu 		DDP_COMPONENT_OVL_2L0, DDP_COMPONENT_RDMA0,
48*d687e056SYongqiang Niu 		MT8192_DISP_RDMA0_SEL_IN, MT8192_RDMA0_SEL_IN_OVL0_2L,
49*d687e056SYongqiang Niu 		MT8192_RDMA0_SEL_IN_OVL0_2L
50*d687e056SYongqiang Niu 	}, {
51*d687e056SYongqiang Niu 		DDP_COMPONENT_CCORR, DDP_COMPONENT_AAL0,
52*d687e056SYongqiang Niu 		MT8192_DISP_AAL0_SEL_IN, MT8192_AAL0_SEL_IN_CCORR0,
53*d687e056SYongqiang Niu 		MT8192_AAL0_SEL_IN_CCORR0
54*d687e056SYongqiang Niu 	}, {
55*d687e056SYongqiang Niu 		DDP_COMPONENT_DITHER, DDP_COMPONENT_DSI0,
56*d687e056SYongqiang Niu 		MT8192_DISP_DSI0_SEL_IN, MT8192_DSI0_SEL_IN_DITHER0
57*d687e056SYongqiang Niu 	}, {
58*d687e056SYongqiang Niu 		DDP_COMPONENT_RDMA0, DDP_COMPONENT_COLOR0,
59*d687e056SYongqiang Niu 		MT8192_DISP_RDMA0_SOUT_SEL, MT8192_RDMA0_SOUT_COLOR0,
60*d687e056SYongqiang Niu 		MT8192_RDMA0_SOUT_COLOR0
61*d687e056SYongqiang Niu 	}, {
62*d687e056SYongqiang Niu 		DDP_COMPONENT_CCORR, DDP_COMPONENT_AAL0,
63*d687e056SYongqiang Niu 		MT8192_DISP_CCORR0_SOUT_SEL, MT8192_CCORR0_SOUT_AAL0,
64*d687e056SYongqiang Niu 		MT8192_CCORR0_SOUT_AAL0
65*d687e056SYongqiang Niu 	}, {
66*d687e056SYongqiang Niu 		DDP_COMPONENT_OVL0, DDP_COMPONENT_OVL_2L0,
67*d687e056SYongqiang Niu 		MT8192_MMSYS_OVL_MOUT_EN, MT8192_DISP_OVL0_GO_BG,
68*d687e056SYongqiang Niu 		MT8192_DISP_OVL0_GO_BG
69*d687e056SYongqiang Niu 	}, {
70*d687e056SYongqiang Niu 		DDP_COMPONENT_OVL_2L0, DDP_COMPONENT_RDMA0,
71*d687e056SYongqiang Niu 		MT8192_MMSYS_OVL_MOUT_EN, MT8192_DISP_OVL0_2L_GO_BLEND,
72*d687e056SYongqiang Niu 		MT8192_DISP_OVL0_2L_GO_BLEND
73*d687e056SYongqiang Niu 	}
74*d687e056SYongqiang Niu };
75*d687e056SYongqiang Niu 
76*d687e056SYongqiang Niu #endif /* __SOC_MEDIATEK_MT8192_MMSYS_H */
77