MT6589 DRM and Blade panels#33
Draft
akku1139 wants to merge 90 commits into
Draft
Conversation
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>
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>
The mt65xx SoC family utilizes 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 mt65xx variants and apply the necessary logic. Signed-off-by: rva3 <rva333@protonmail.com>
Member
Author
|
maybe needed |
XXX: maybe we should drop this?.. Signed-off-by: rva3 <rva333@protonmail.com>
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Add a header for the IOMMU ports on the MediaTek MT6589 SoC. Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Add platform data for the SMI common on the MT6589 SoC. Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Make sure to drop the reference taken when looking up the SMI device during common probe on late probe failure (e.g. probe deferral) and on driver unbind. Fixes: 4740475 ("memory: mtk-smi: Add device link for smi-sub-common") Fixes: 038ae37 ("memory: mtk-smi: add missing put_device() call in mtk_smi_device_link_common") Cc: stable@vger.kernel.org # 5.16: 038ae37 Cc: stable@vger.kernel.org # 5.16 Cc: Yong Wu <yong.wu@mediatek.com> Cc: Miaoqian Lin <linmq006@gmail.com> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20251121164624.13685-2-johan@kernel.org Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Make sure to drop the reference taken when looking up the SMI device during larb probe on late probe failure (e.g. probe deferral) and on driver unbind. Fixes: cc8bbe1 ("memory: mediatek: Add SMI driver") Fixes: 038ae37 ("memory: mtk-smi: add missing put_device() call in mtk_smi_device_link_common") Cc: stable@vger.kernel.org # 4.6: 038ae37 Cc: stable@vger.kernel.org # 4.6 Cc: Yong Wu <yong.wu@mediatek.com> Cc: Miaoqian Lin <linmq006@gmail.com> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20251121164624.13685-3-johan@kernel.org Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Clean up device link creation by bailing out early in case the SMI platform device lookup fails. Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20251121164624.13685-4-johan@kernel.org Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Member
Author
|
TODO: mmsys (done by claude) mutex (done) ovl (done) dsi (done) drm main (done with mt2701_mmsys_driver_data) |
In MT6589, this IP is called "dispsys" for some reason. I don't know more than that. Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
It's in Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml now. Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
everyone will say "fixme" Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Member
Author
|
mmsys routing: |
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Member
Author
#define REG_SMI_SECUR_CON(x) (0x05C0+SMI_COMMON_AO_BASE+((x)<<2))
#define REG_SMI_SECUR_CON_OF_PORT(port) REG_SMI_SECUR_CON(((m4u_port_2_smi_port(port))>>3))
#define F_SMI_SECUR_CON_SECURE(port) ((1)<<(((m4u_port_2_smi_port(port))&0x7)<<2))
#define F_SMI_SECUR_CON_DOMAIN(port, val) (((val)&0x3)<<((((m4u_port_2_smi_port(port))&0x7)<<2)+1))
#define F_SMI_SECUR_CON_VIRTUAL(port) ((1)<<((((m4u_port_2_smi_port(port))&0x7)<<2)+3))
#define F_SMI_SECUR_CON_MASK(port) ((0xf)<<((((m4u_port_2_smi_port(port))&0x7)<<2))) |
Member
Author
/* Below are about mmu enable registers, they are different in SoCs */
/* gen1: mt2701 */
#define REG_SMI_SECUR_CON_BASE 0x5c0
/* every register control 8 port, register offset 0x4 */
#define REG_SMI_SECUR_CON_OFFSET(id) (((id) >> 3) << 2)
#define REG_SMI_SECUR_CON_ADDR(id) \
(REG_SMI_SECUR_CON_BASE + REG_SMI_SECUR_CON_OFFSET(id))linux/drivers/memory/mtk-smi.c Lines 65 to 72 in 6316de5 |
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
This reverts commit 6316de5.
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Member
Author
Member
Author
|
1369 page: |
Member
Author
|
drop too many ports needs fix |
Member
Author
|
1380: SMI_L1ARB6 |
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Member
Author
|
mt6589 m4u driver will support mt8135 in the future |
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Member
Author
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Member
Author
|
Member
Author
|
smi is ok
|
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.
thanks to rva3
https://github.com/mt6572-mainline/linux