MT6582 dev#71
Draft
akku1139 wants to merge 33 commits into
Draft
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.