Skip to content

MT6582 dev#71

Draft
akku1139 wants to merge 33 commits into
TeamYogaBlade2:mainlinefrom
Swer15:draft
Draft

MT6582 dev#71
akku1139 wants to merge 33 commits into
TeamYogaBlade2:mainlinefrom
Swer15:draft

Conversation

@akku1139

Copy link
Copy Markdown
Member

No description provided.

Swer15 and others added 26 commits July 19, 2026 19:40
mt6572/6582 SoCs utilize an earlier version of the IOMMU which
shares the same v1 architecture but has minor hardware differences
compared to mt2701.

Introduce mtk_iommu_type to distinguish between mt2701 and mt6572/6582
variants and apply the necessary logic.

Finally, add a platform data for the mt6572 SoC.

Signed-off-by: rva3 <rva333@protonmail.com>
Currently the driver silently fails to bind devices and DRM subsystem
(which is the primary IOMMU user on MediaTek SoCs) falls back to PA mode.

Fix this by providing of_xlate callback, which lets the driver actually
bind devices and use VA mode.

The fix can be verified by reading overlay engine input address.
Before:
~ # devmem 0x14007040 32
0xBB900000

After:
~ # devmem 0x14007040 32
0x00000000

Signed-off-by: Roman Vivchar <rva333@protonmail.com>
Add platform data for the mt6572 SoC.

Signed-off-by: rva3 <rva333@protonmail.com>
The mt65xx SoC family uses an earlier version of the SMI, which we refer
to as gen 0. Unlike gen 1 or gen 2, gen 0 requires simultaneous access to
two distinct MMIO ranges: an AO base for IOMMU configuration and ext base
for OSTD, FIFO, and bandwidth limiter setup.

Remove the union in struct mtk_smi to allow simultaneous use of
smi_ao_base and base. Refactor the probe function into a switch statement
to handle the different generation requirements cleanly.

Signed-off-by: rva3 <rva333@protonmail.com>
Add platform data for the SMI common on the mt6572 SoC.

Signed-off-by: rva3 <rva333@protonmail.com>
The mt65xx SoC family utilizes a larb design that incorporates features
from both gen 1 and gen 2 architectures.

Introduce a specific configuration callback for this generation, which
implements the port security configuration typical for gen 1 while
including the ostd settings found in gen 2. Additionally, add a bandwidth
calibration flag for some of the gen 0 SoCs.

Signed-off-by: rva3 <rva333@protonmail.com>
Add a compatible string for the mt6572 SMI LARB.

Signed-off-by: Roman Vivchar <rva333@protonmail.com>
MediaTek mt65xx family SoCs have no auto restart, however, they still
support the WRRD mode in the hardware. Because auto_restart is set to 0,
the WRRD mode will be never enabled, leading to read errors using i2cget
with explicit register.

Fix this by removing auto_restart check from the WRRD enable path.

Signed-off-by: rva3 <rva333@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants