-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'iommu-updates-v4.6' of git://git.kernel.org/pub/scm/linux/…
…kernel/git/joro/iommu Pull IOMMU updates from Joerg Roedel: - updates for the Exynos IOMMU driver to make use of default domains and to add support for the SYSMMU v5 - new Mediatek IOMMU driver - support for the ARMv7 short descriptor format in the io-pgtable code - default domain support for the ARM SMMU - couple of other small fixes all over the place * tag 'iommu-updates-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (41 commits) iommu/ipmmu-vmsa: Add r8a7795 DT binding iommu/mediatek: Check for NULL instead of IS_ERR() iommu/io-pgtable-armv7s: Fix kmem_cache_alloc() flags iommu/mediatek: Fix handling of of_count_phandle_with_args result iommu/dma: Fix NEED_SG_DMA_LENGTH dependency iommu/mediatek: Mark PM functions as __maybe_unused iommu/mediatek: Select ARM_DMA_USE_IOMMU iommu/exynos: Use proper readl/writel register interface iommu/exynos: Pointers are nto physical addresses dts: mt8173: Add iommu/smi nodes for mt8173 iommu/mediatek: Add mt8173 IOMMU driver memory: mediatek: Add SMI driver dt-bindings: mediatek: Add smi dts binding dt-bindings: iommu: Add binding for mediatek IOMMU iommu/ipmmu-vmsa: Use ARCH_RENESAS iommu/exynos: Support multiple attach_device calls iommu/exynos: Add Maintainers entry for Exynos SYSMMU driver iommu/exynos: Add support for v5 SYSMMU iommu/exynos: Update device tree documentation iommu/exynos: Add support for SYSMMU controller with bogus version reg ...
- Loading branch information
Showing
25 changed files
with
2,953 additions
and
414 deletions.
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
Documentation/devicetree/bindings/iommu/mediatek,iommu.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
* Mediatek IOMMU Architecture Implementation | ||
|
||
Some Mediatek SOCs contain a Multimedia Memory Management Unit (M4U) which | ||
uses the ARM Short-Descriptor translation table format for address translation. | ||
|
||
About the M4U Hardware Block Diagram, please check below: | ||
|
||
EMI (External Memory Interface) | ||
| | ||
m4u (Multimedia Memory Management Unit) | ||
| | ||
SMI Common(Smart Multimedia Interface Common) | ||
| | ||
+----------------+------- | ||
| | | ||
| | | ||
SMI larb0 SMI larb1 ... SoCs have several SMI local arbiter(larb). | ||
(display) (vdec) | ||
| | | ||
| | | ||
+-----+-----+ +----+----+ | ||
| | | | | | | ||
| | |... | | | ... There are different ports in each larb. | ||
| | | | | | | ||
OVL0 RDMA0 WDMA0 MC PP VLD | ||
|
||
As above, The Multimedia HW will go through SMI and M4U while it | ||
access EMI. SMI is a bridge between m4u and the Multimedia HW. It contain | ||
smi local arbiter and smi common. It will control whether the Multimedia | ||
HW should go though the m4u for translation or bypass it and talk | ||
directly with EMI. And also SMI help control the power domain and clocks for | ||
each local arbiter. | ||
Normally we specify a local arbiter(larb) for each multimedia HW | ||
like display, video decode, and camera. And there are different ports | ||
in each larb. Take a example, There are many ports like MC, PP, VLD in the | ||
video decode local arbiter, all these ports are according to the video HW. | ||
|
||
Required properties: | ||
- compatible : must be "mediatek,mt8173-m4u". | ||
- reg : m4u register base and size. | ||
- interrupts : the interrupt of m4u. | ||
- clocks : must contain one entry for each clock-names. | ||
- clock-names : must be "bclk", It is the block clock of m4u. | ||
- mediatek,larbs : List of phandle to the local arbiters in the current Socs. | ||
Refer to bindings/memory-controllers/mediatek,smi-larb.txt. It must sort | ||
according to the local arbiter index, like larb0, larb1, larb2... | ||
- iommu-cells : must be 1. This is the mtk_m4u_id according to the HW. | ||
Specifies the mtk_m4u_id as defined in | ||
dt-binding/memory/mt8173-larb-port.h. | ||
|
||
Example: | ||
iommu: iommu@10205000 { | ||
compatible = "mediatek,mt8173-m4u"; | ||
reg = <0 0x10205000 0 0x1000>; | ||
interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_LOW>; | ||
clocks = <&infracfg CLK_INFRA_M4U>; | ||
clock-names = "bclk"; | ||
mediatek,larbs = <&larb0 &larb1 &larb2 &larb3 &larb4 &larb5>; | ||
#iommu-cells = <1>; | ||
}; | ||
|
||
Example for a client device: | ||
display { | ||
compatible = "mediatek,mt8173-disp"; | ||
iommus = <&iommu M4U_PORT_DISP_OVL0>, | ||
<&iommu M4U_PORT_DISP_RDMA0>; | ||
... | ||
}; |
This file contains 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
This file contains 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
24 changes: 24 additions & 0 deletions
24
Documentation/devicetree/bindings/memory-controllers/mediatek,smi-common.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
SMI (Smart Multimedia Interface) Common | ||
|
||
The hardware block diagram please check bindings/iommu/mediatek,iommu.txt | ||
|
||
Required properties: | ||
- compatible : must be "mediatek,mt8173-smi-common" | ||
- reg : the register and size of the SMI block. | ||
- power-domains : a phandle to the power domain of this local arbiter. | ||
- clocks : Must contain an entry for each entry in clock-names. | ||
- clock-names : must contain 2 entries, as follows: | ||
- "apb" : Advanced Peripheral Bus clock, It's the clock for setting | ||
the register. | ||
- "smi" : It's the clock for transfer data and command. | ||
They may be the same if both source clocks are the same. | ||
|
||
Example: | ||
smi_common: smi@14022000 { | ||
compatible = "mediatek,mt8173-smi-common"; | ||
reg = <0 0x14022000 0 0x1000>; | ||
power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>; | ||
clocks = <&mmsys CLK_MM_SMI_COMMON>, | ||
<&mmsys CLK_MM_SMI_COMMON>; | ||
clock-names = "apb", "smi"; | ||
}; |
25 changes: 25 additions & 0 deletions
25
Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
SMI (Smart Multimedia Interface) Local Arbiter | ||
|
||
The hardware block diagram please check bindings/iommu/mediatek,iommu.txt | ||
|
||
Required properties: | ||
- compatible : must be "mediatek,mt8173-smi-larb" | ||
- reg : the register and size of this local arbiter. | ||
- mediatek,smi : a phandle to the smi_common node. | ||
- power-domains : a phandle to the power domain of this local arbiter. | ||
- clocks : Must contain an entry for each entry in clock-names. | ||
- clock-names: must contain 2 entries, as follows: | ||
- "apb" : Advanced Peripheral Bus clock, It's the clock for setting | ||
the register. | ||
- "smi" : It's the clock for transfer data and command. | ||
|
||
Example: | ||
larb1: larb@16010000 { | ||
compatible = "mediatek,mt8173-smi-larb"; | ||
reg = <0 0x16010000 0 0x1000>; | ||
mediatek,smi = <&smi_common>; | ||
power-domains = <&scpsys MT8173_POWER_DOMAIN_VDEC>; | ||
clocks = <&vdecsys CLK_VDEC_CKEN>, | ||
<&vdecsys CLK_VDEC_LARB_CKEN>; | ||
clock-names = "apb", "smi"; | ||
}; |
This file contains 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
This file contains 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
Oops, something went wrong.