Skip to content

Commit 4f2f299

Browse files
committed
Merge tag 'v6.3-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into soc/drivers
mtk-svs: smaller coding style changes mtk-mutex: - add support for mt8365 display and mt8195 VPP mutex - add support for more then 32 mods - use module_platform_driver instead of open coding mtk-mmsys: - add support for mt8195 RSZ switching - add remove function - use module_platform_driver instead of open coding - split out mt8173 routing table from the legacy table - bump up resets in mt8173 to 64 - add support for mt6795 (Helio X10) - clean-up IS_REACHABLE code for cmdq * tag 'v6.3-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: (25 commits) soc: mediatek: Kconfig: Add MTK_CMDQ dependency to MTK_MMSYS soc: mediatek: mutex: Use dev_err_probe() soc: mediatek: mtk-mmsys: Add support for MT6795 Helio X10 soc: mediatek: mtk-mmsys: Change MT8173 num_resets to 64 soc: mediatek: mtk-mmsys: Split out MT8173 mmsys DDP routing table soc: mediatek: Cleanup ifdefs for IS_REACHABLE(CONFIG_MTK_CMDQ) soc: mediatek: cmdq: Add inline functions for !CONFIG_MTK_CMDQ soc: mediatek: mtk-mutex: Use module_platform_driver() macro soc: mediatek: mtk-mutex: Replace max handles number with definition soc: mediatek: mtk-mutex: Compress of_device_id array entries soc: mediatek: mtk-mmsys: Add MODULE_DEVICE_TABLE() to allow auto-load soc: mediatek: mtk-mmsys: Compress of_device_id array entries soc: mediatek: mtk-mmsys: Use module_platform_driver() macro soc: mediatek: mtk-mmsys: Add .remove() callback dt-bindings: soc: mediatek: add display mutex for MT8365 SoC dt-bindings: soc: mediatek: specify which compatible requires clocks property soc: mediatek: mtk-svs: add thermal voltage compensation if needed soc: mediatek: mtk-svs: fix passing zero to 'PTR_ERR' soc: mediatek: mtk-svs: delete node name check soc: mediatek: mutex: support MT8195 VPPSYS ... Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 04523ac + 5ce5e0d commit 4f2f299

File tree

11 files changed

+596
-254
lines changed

11 files changed

+596
-254
lines changed

Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ properties:
3535
- mediatek,mt8188-disp-mutex
3636
- mediatek,mt8192-disp-mutex
3737
- mediatek,mt8195-disp-mutex
38+
- mediatek,mt8195-vpp-mutex
39+
- mediatek,mt8365-disp-mutex
3840

3941
reg:
4042
maxItems: 1
@@ -70,12 +72,30 @@ properties:
7072
4 arguments defined in this property. Each GCE subsys id is mapping to
7173
a client defined in the header include/dt-bindings/gce/<chip>-gce.h.
7274

75+
allOf:
76+
- if:
77+
properties:
78+
compatible:
79+
contains:
80+
enum:
81+
- mediatek,mt2701-disp-mutex
82+
- mediatek,mt2712-disp-mutex
83+
- mediatek,mt6795-disp-mutex
84+
- mediatek,mt8173-disp-mutex
85+
- mediatek,mt8186-disp-mutex
86+
- mediatek,mt8186-mdp3-mutex
87+
- mediatek,mt8192-disp-mutex
88+
- mediatek,mt8195-disp-mutex
89+
then:
90+
required:
91+
- clocks
92+
93+
7394
required:
7495
- compatible
7596
- reg
7697
- interrupts
7798
- power-domains
78-
- clocks
7999

80100
additionalProperties: false
81101

drivers/soc/mediatek/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ config MTK_MMSYS
7676
tristate "MediaTek MMSYS Support"
7777
default ARCH_MEDIATEK
7878
depends on HAS_IOMEM
79+
depends on MTK_CMDQ || MTK_CMDQ=n
7980
help
8081
Say yes here to add support for the MediaTek Multimedia
8182
Subsystem (MMSYS).

drivers/soc/mediatek/mt8173-mmsys.h

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

drivers/soc/mediatek/mt8195-mmsys.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,19 @@
146146
#define MT8195_VDO1_MIXER_SOUT_SEL_IN 0xf68
147147
#define MT8195_MIXER_SOUT_SEL_IN_FROM_DISP_MIXER 0
148148

149+
/* VPPSYS1 */
150+
#define MT8195_VPP1_HW_DCM_1ST_DIS0 0x150
151+
#define MT8195_VPP1_HW_DCM_1ST_DIS1 0x160
152+
#define MT8195_VPP1_HW_DCM_2ND_DIS0 0x1a0
153+
#define MT8195_VPP1_HW_DCM_2ND_DIS1 0x1b0
154+
#define MT8195_SVPP2_BUF_BF_RSZ_SWITCH 0xf48
155+
#define MT8195_SVPP3_BUF_BF_RSZ_SWITCH 0xf74
156+
157+
/* VPPSYS1 HW DCM client*/
158+
#define MT8195_SVPP1_MDP_RSZ BIT(25)
159+
#define MT8195_SVPP2_MDP_RSZ BIT(4)
160+
#define MT8195_SVPP3_MDP_RSZ BIT(5)
161+
149162
static const struct mtk_mmsys_routes mmsys_mt8195_routing_table[] = {
150163
{
151164
DDP_COMPONENT_OVL0, DDP_COMPONENT_RDMA0,

0 commit comments

Comments
 (0)