The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/device-tree/Bindings/iommu/mediatek,iommu.txt

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 * Mediatek IOMMU Architecture Implementation
    2 
    3   Some Mediatek SOCs contain a Multimedia Memory Management Unit (M4U), and
    4 this M4U have two generations of HW architecture. Generation one uses flat
    5 pagetable, and only supports 4K size page mapping. Generation two uses the
    6 ARM Short-Descriptor translation table format for address translation.
    7 
    8   About the M4U Hardware Block Diagram, please check below:
    9 
   10               EMI (External Memory Interface)
   11                |
   12               m4u (Multimedia Memory Management Unit)
   13                |
   14           +--------+
   15           |        |
   16       gals0-rx   gals1-rx    (Global Async Local Sync rx)
   17           |        |
   18           |        |
   19       gals0-tx   gals1-tx    (Global Async Local Sync tx)
   20           |        |          Some SoCs may have GALS.
   21           +--------+
   22                |
   23            SMI Common(Smart Multimedia Interface Common)
   24                |
   25        +----------------+-------
   26        |                |
   27        |             gals-rx        There may be GALS in some larbs.
   28        |                |
   29        |                |
   30        |             gals-tx
   31        |                |
   32    SMI larb0        SMI larb1   ... SoCs have several SMI local arbiter(larb).
   33    (display)         (vdec)
   34        |                |
   35        |                |
   36  +-----+-----+     +----+----+
   37  |     |     |     |    |    |
   38  |     |     |...  |    |    |  ... There are different ports in each larb.
   39  |     |     |     |    |    |
   40 OVL0 RDMA0 WDMA0  MC   PP   VLD
   41 
   42   As above, The Multimedia HW will go through SMI and M4U while it
   43 access EMI. SMI is a bridge between m4u and the Multimedia HW. It contain
   44 smi local arbiter and smi common. It will control whether the Multimedia
   45 HW should go though the m4u for translation or bypass it and talk
   46 directly with EMI. And also SMI help control the power domain and clocks for
   47 each local arbiter.
   48   Normally we specify a local arbiter(larb) for each multimedia HW
   49 like display, video decode, and camera. And there are different ports
   50 in each larb. Take a example, There are many ports like MC, PP, VLD in the
   51 video decode local arbiter, all these ports are according to the video HW.
   52   In some SoCs, there may be a GALS(Global Async Local Sync) module between
   53 smi-common and m4u, and additional GALS module between smi-larb and
   54 smi-common. GALS can been seen as a "asynchronous fifo" which could help
   55 synchronize for the modules in different clock frequency.
   56 
   57 Required properties:
   58 - compatible : must be one of the following string:
   59         "mediatek,mt2701-m4u" for mt2701 which uses generation one m4u HW.
   60         "mediatek,mt2712-m4u" for mt2712 which uses generation two m4u HW.
   61         "mediatek,mt6779-m4u" for mt6779 which uses generation two m4u HW.
   62         "mediatek,mt7623-m4u", "mediatek,mt2701-m4u" for mt7623 which uses
   63                                                      generation one m4u HW.
   64         "mediatek,mt8167-m4u" for mt8167 which uses generation two m4u HW.
   65         "mediatek,mt8173-m4u" for mt8173 which uses generation two m4u HW.
   66         "mediatek,mt8183-m4u" for mt8183 which uses generation two m4u HW.
   67 - reg : m4u register base and size.
   68 - interrupts : the interrupt of m4u.
   69 - clocks : must contain one entry for each clock-names.
   70 - clock-names : Only 1 optional clock:
   71   - "bclk": the block clock of m4u.
   72   Here is the list which require this "bclk":
   73   - mt2701, mt2712, mt7623 and mt8173.
   74   Note that m4u use the EMI clock which always has been enabled before kernel
   75   if there is no this "bclk".
   76 - mediatek,larbs : List of phandle to the local arbiters in the current Socs.
   77         Refer to bindings/memory-controllers/mediatek,smi-larb.txt. It must sort
   78         according to the local arbiter index, like larb0, larb1, larb2...
   79 - iommu-cells : must be 1. This is the mtk_m4u_id according to the HW.
   80         Specifies the mtk_m4u_id as defined in
   81         dt-binding/memory/mt2701-larb-port.h for mt2701, mt7623
   82         dt-binding/memory/mt2712-larb-port.h for mt2712,
   83         dt-binding/memory/mt6779-larb-port.h for mt6779,
   84         dt-binding/memory/mt8167-larb-port.h for mt8167,
   85         dt-binding/memory/mt8173-larb-port.h for mt8173, and
   86         dt-binding/memory/mt8183-larb-port.h for mt8183.
   87 
   88 Example:
   89         iommu: iommu@10205000 {
   90                 compatible = "mediatek,mt8173-m4u";
   91                 reg = <0 0x10205000 0 0x1000>;
   92                 interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_LOW>;
   93                 clocks = <&infracfg CLK_INFRA_M4U>;
   94                 clock-names = "bclk";
   95                 mediatek,larbs = <&larb0 &larb1 &larb2 &larb3 &larb4 &larb5>;
   96                 #iommu-cells = <1>;
   97         };
   98 
   99 Example for a client device:
  100         display {
  101                 compatible = "mediatek,mt8173-disp";
  102                 iommus = <&iommu M4U_PORT_DISP_OVL0>,
  103                          <&iommu M4U_PORT_DISP_RDMA0>;
  104                 ...
  105         };

Cache object: e7bf94d561eff1b9db8d6e84b8387b20


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.