1 * Mediatek IOMMU Architecture Implementation
3 Some Mediatek SOCs contain a Multimedia Memory Management Unit (M4U) which
4 uses the ARM Short-Descriptor translation table format for address translation.
6 About the M4U Hardware Block Diagram, please check below:
8 EMI (External Memory Interface)
10 m4u (Multimedia Memory Management Unit)
12 SMI Common(Smart Multimedia Interface Common)
14 +----------------+-------
17 SMI larb0 SMI larb1 ... SoCs have several SMI local arbiter(larb).
21 +-----+-----+ +----+----+
23 | | |... | | | ... There are different ports in each larb.
25 OVL0 RDMA0 WDMA0 MC PP VLD
27 As above, The Multimedia HW will go through SMI and M4U while it
28 access EMI. SMI is a bridge between m4u and the Multimedia HW. It contain
29 smi local arbiter and smi common. It will control whether the Multimedia
30 HW should go though the m4u for translation or bypass it and talk
31 directly with EMI. And also SMI help control the power domain and clocks for
33 Normally we specify a local arbiter(larb) for each multimedia HW
34 like display, video decode, and camera. And there are different ports
35 in each larb. Take a example, There are many ports like MC, PP, VLD in the
36 video decode local arbiter, all these ports are according to the video HW.
39 - compatible : must be "mediatek,mt8173-m4u".
40 - reg : m4u register base and size.
41 - interrupts : the interrupt of m4u.
42 - clocks : must contain one entry for each clock-names.
43 - clock-names : must be "bclk", It is the block clock of m4u.
44 - mediatek,larbs : List of phandle to the local arbiters in the current Socs.
45 Refer to bindings/memory-controllers/mediatek,smi-larb.txt. It must sort
46 according to the local arbiter index, like larb0, larb1, larb2...
47 - iommu-cells : must be 1. This is the mtk_m4u_id according to the HW.
48 Specifies the mtk_m4u_id as defined in
49 dt-binding/memory/mt8173-larb-port.h.
52 iommu: iommu@10205000 {
53 compatible = "mediatek,mt8173-m4u";
54 reg = <0 0x10205000 0 0x1000>;
55 interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_LOW>;
56 clocks = <&infracfg CLK_INFRA_M4U>;
58 mediatek,larbs = <&larb0 &larb1 &larb2 &larb3 &larb4 &larb5>;
62 Example for a client device:
64 compatible = "mediatek,mt8173-disp";
65 iommus = <&iommu M4U_PORT_DISP_OVL0>,
66 <&iommu M4U_PORT_DISP_RDMA0>;