1*2a0a8d87SAngeloGioacchino Del Regno /* SPDX-License-Identifier: GPL-2.0-only */ 2*2a0a8d87SAngeloGioacchino Del Regno 3*2a0a8d87SAngeloGioacchino Del Regno #ifndef __SOC_MEDIATEK_MT8173_MMSYS_H 4*2a0a8d87SAngeloGioacchino Del Regno #define __SOC_MEDIATEK_MT8173_MMSYS_H 5*2a0a8d87SAngeloGioacchino Del Regno 6*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_DISP_REG_CONFIG_DISP_OVL0_MOUT_EN 0x040 7*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_DISP_REG_CONFIG_DISP_OVL1_MOUT_EN 0x044 8*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_DISP_REG_CONFIG_DISP_OD_MOUT_EN 0x048 9*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_DISP_REG_CONFIG_DISP_GAMMA_MOUT_EN 0x04c 10*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_DISP_REG_CONFIG_DISP_UFOE_MOUT_EN 0x050 11*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_DISP_REG_CONFIG_DISP_COLOR0_SEL_IN 0x084 12*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_DISP_REG_CONFIG_DISP_COLOR1_SEL_IN 0x088 13*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_DISP_REG_CONFIG_DISP_AAL_SEL_IN 0x08c 14*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_DISP_REG_CONFIG_DISP_UFOE_SEL_IN 0x0a0 15*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_DISP_REG_CONFIG_DSI0_SEL_IN 0x0a4 16*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_DISP_REG_CONFIG_DPI_SEL_IN 0x0ac 17*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_DISP_REG_CONFIG_DISP_RDMA0_SOUT_SEL_IN 0x0b0 18*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_DISP_REG_CONFIG_DISP_RDMA1_SOUT_EN 0x0c8 19*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_DISP_REG_CONFIG_DISP_COLOR0_SOUT_SEL_IN 0x0bc 20*2a0a8d87SAngeloGioacchino Del Regno 21*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_AAL_SEL_IN_MERGE BIT(0) 22*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_COLOR0_SEL_IN_OVL0 BIT(0) 23*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_COLOR0_SOUT_MERGE BIT(0) 24*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_DPI0_SEL_IN_MASK GENMASK(1, 0) 25*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_DPI0_SEL_IN_RDMA1 BIT(0) 26*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_DSI0_SEL_IN_UFOE BIT(0) 27*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_GAMMA_MOUT_EN_RDMA1 BIT(0) 28*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_OD0_MOUT_EN_RDMA0 BIT(0) 29*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_OVL0_MOUT_EN_COLOR0 BIT(0) 30*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_OVL1_MOUT_EN_COLOR1 BIT(0) 31*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_UFOE_MOUT_EN_DSI0 BIT(0) 32*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_UFOE_SEL_IN_RDMA0 BIT(0) 33*2a0a8d87SAngeloGioacchino Del Regno #define MT8173_RDMA0_SOUT_COLOR0 BIT(0) 34*2a0a8d87SAngeloGioacchino Del Regno 35*2a0a8d87SAngeloGioacchino Del Regno static const struct mtk_mmsys_routes mt8173_mmsys_routing_table[] = { 36*2a0a8d87SAngeloGioacchino Del Regno { 37*2a0a8d87SAngeloGioacchino Del Regno DDP_COMPONENT_OVL0, DDP_COMPONENT_COLOR0, 38*2a0a8d87SAngeloGioacchino Del Regno MT8173_DISP_REG_CONFIG_DISP_OVL0_MOUT_EN, 39*2a0a8d87SAngeloGioacchino Del Regno MT8173_OVL0_MOUT_EN_COLOR0, MT8173_OVL0_MOUT_EN_COLOR0 40*2a0a8d87SAngeloGioacchino Del Regno }, { 41*2a0a8d87SAngeloGioacchino Del Regno DDP_COMPONENT_OD0, DDP_COMPONENT_RDMA0, 42*2a0a8d87SAngeloGioacchino Del Regno MT8173_DISP_REG_CONFIG_DISP_OD_MOUT_EN, 43*2a0a8d87SAngeloGioacchino Del Regno MT8173_OD0_MOUT_EN_RDMA0, MT8173_OD0_MOUT_EN_RDMA0 44*2a0a8d87SAngeloGioacchino Del Regno }, { 45*2a0a8d87SAngeloGioacchino Del Regno DDP_COMPONENT_UFOE, DDP_COMPONENT_DSI0, 46*2a0a8d87SAngeloGioacchino Del Regno MT8173_DISP_REG_CONFIG_DISP_UFOE_MOUT_EN, 47*2a0a8d87SAngeloGioacchino Del Regno MT8173_UFOE_MOUT_EN_DSI0, MT8173_UFOE_MOUT_EN_DSI0 48*2a0a8d87SAngeloGioacchino Del Regno }, { 49*2a0a8d87SAngeloGioacchino Del Regno DDP_COMPONENT_COLOR0, DDP_COMPONENT_AAL0, 50*2a0a8d87SAngeloGioacchino Del Regno MT8173_DISP_REG_CONFIG_DISP_COLOR0_SOUT_SEL_IN, 51*2a0a8d87SAngeloGioacchino Del Regno MT8173_COLOR0_SOUT_MERGE, 0 /* SOUT to AAL */ 52*2a0a8d87SAngeloGioacchino Del Regno }, { 53*2a0a8d87SAngeloGioacchino Del Regno DDP_COMPONENT_RDMA0, DDP_COMPONENT_UFOE, 54*2a0a8d87SAngeloGioacchino Del Regno MT8173_DISP_REG_CONFIG_DISP_RDMA0_SOUT_SEL_IN, 55*2a0a8d87SAngeloGioacchino Del Regno MT8173_RDMA0_SOUT_COLOR0, 0 /* SOUT to UFOE */ 56*2a0a8d87SAngeloGioacchino Del Regno }, { 57*2a0a8d87SAngeloGioacchino Del Regno DDP_COMPONENT_OVL0, DDP_COMPONENT_COLOR0, 58*2a0a8d87SAngeloGioacchino Del Regno MT8173_DISP_REG_CONFIG_DISP_COLOR0_SEL_IN, 59*2a0a8d87SAngeloGioacchino Del Regno MT8173_COLOR0_SEL_IN_OVL0, MT8173_COLOR0_SEL_IN_OVL0 60*2a0a8d87SAngeloGioacchino Del Regno }, { 61*2a0a8d87SAngeloGioacchino Del Regno DDP_COMPONENT_AAL0, DDP_COMPONENT_COLOR0, 62*2a0a8d87SAngeloGioacchino Del Regno MT8173_DISP_REG_CONFIG_DISP_AAL_SEL_IN, 63*2a0a8d87SAngeloGioacchino Del Regno MT8173_AAL_SEL_IN_MERGE, 0 /* SEL_IN from COLOR0 */ 64*2a0a8d87SAngeloGioacchino Del Regno }, { 65*2a0a8d87SAngeloGioacchino Del Regno DDP_COMPONENT_RDMA0, DDP_COMPONENT_UFOE, 66*2a0a8d87SAngeloGioacchino Del Regno MT8173_DISP_REG_CONFIG_DISP_UFOE_SEL_IN, 67*2a0a8d87SAngeloGioacchino Del Regno MT8173_UFOE_SEL_IN_RDMA0, 0 /* SEL_IN from RDMA0 */ 68*2a0a8d87SAngeloGioacchino Del Regno }, { 69*2a0a8d87SAngeloGioacchino Del Regno DDP_COMPONENT_UFOE, DDP_COMPONENT_DSI0, 70*2a0a8d87SAngeloGioacchino Del Regno MT8173_DISP_REG_CONFIG_DSI0_SEL_IN, 71*2a0a8d87SAngeloGioacchino Del Regno MT8173_DSI0_SEL_IN_UFOE, 0, /* SEL_IN from UFOE */ 72*2a0a8d87SAngeloGioacchino Del Regno }, { 73*2a0a8d87SAngeloGioacchino Del Regno DDP_COMPONENT_OVL1, DDP_COMPONENT_COLOR1, 74*2a0a8d87SAngeloGioacchino Del Regno MT8173_DISP_REG_CONFIG_DISP_OVL1_MOUT_EN, 75*2a0a8d87SAngeloGioacchino Del Regno MT8173_OVL1_MOUT_EN_COLOR1, MT8173_OVL1_MOUT_EN_COLOR1 76*2a0a8d87SAngeloGioacchino Del Regno }, { 77*2a0a8d87SAngeloGioacchino Del Regno DDP_COMPONENT_GAMMA, DDP_COMPONENT_RDMA1, 78*2a0a8d87SAngeloGioacchino Del Regno MT8173_DISP_REG_CONFIG_DISP_GAMMA_MOUT_EN, 79*2a0a8d87SAngeloGioacchino Del Regno MT8173_GAMMA_MOUT_EN_RDMA1, MT8173_GAMMA_MOUT_EN_RDMA1 80*2a0a8d87SAngeloGioacchino Del Regno }, { 81*2a0a8d87SAngeloGioacchino Del Regno DDP_COMPONENT_RDMA1, DDP_COMPONENT_DPI0, 82*2a0a8d87SAngeloGioacchino Del Regno MT8173_DISP_REG_CONFIG_DISP_RDMA1_SOUT_EN, 83*2a0a8d87SAngeloGioacchino Del Regno RDMA1_SOUT_MASK, RDMA1_SOUT_DPI0 84*2a0a8d87SAngeloGioacchino Del Regno }, { 85*2a0a8d87SAngeloGioacchino Del Regno DDP_COMPONENT_OVL1, DDP_COMPONENT_COLOR1, 86*2a0a8d87SAngeloGioacchino Del Regno MT8173_DISP_REG_CONFIG_DISP_COLOR1_SEL_IN, 87*2a0a8d87SAngeloGioacchino Del Regno COLOR1_SEL_IN_OVL1, COLOR1_SEL_IN_OVL1 88*2a0a8d87SAngeloGioacchino Del Regno }, { 89*2a0a8d87SAngeloGioacchino Del Regno DDP_COMPONENT_RDMA1, DDP_COMPONENT_DPI0, 90*2a0a8d87SAngeloGioacchino Del Regno MT8173_DISP_REG_CONFIG_DPI_SEL_IN, 91*2a0a8d87SAngeloGioacchino Del Regno MT8173_DPI0_SEL_IN_MASK, MT8173_DPI0_SEL_IN_RDMA1 92*2a0a8d87SAngeloGioacchino Del Regno } 93*2a0a8d87SAngeloGioacchino Del Regno }; 94*2a0a8d87SAngeloGioacchino Del Regno 95*2a0a8d87SAngeloGioacchino Del Regno #endif /* __SOC_MEDIATEK_MT8173_MMSYS_H */ 96