xref: /linux/Documentation/devicetree/bindings/iommu/samsung,sysmmu.yaml (revision 3b76f4e1d1537a6164ea8f8456cc46671cdbd28c)
1*3b76f4e1SMaciej Falkowski# SPDX-License-Identifier: GPL-2.0
2*3b76f4e1SMaciej Falkowski%YAML 1.2
3*3b76f4e1SMaciej Falkowski---
4*3b76f4e1SMaciej Falkowski$id: http://devicetree.org/schemas/iommu/samsung,sysmmu.yaml#
5*3b76f4e1SMaciej Falkowski$schema: http://devicetree.org/meta-schemas/core.yaml#
6*3b76f4e1SMaciej Falkowski
7*3b76f4e1SMaciej Falkowskititle: Samsung Exynos IOMMU H/W, System MMU (System Memory Management Unit)
8*3b76f4e1SMaciej Falkowski
9*3b76f4e1SMaciej Falkowskimaintainers:
10*3b76f4e1SMaciej Falkowski  - Marek Szyprowski <m.szyprowski@samsung.com>
11*3b76f4e1SMaciej Falkowski
12*3b76f4e1SMaciej Falkowskidescription: |+
13*3b76f4e1SMaciej Falkowski  Samsung's Exynos architecture contains System MMUs that enables scattered
14*3b76f4e1SMaciej Falkowski  physical memory chunks visible as a contiguous region to DMA-capable peripheral
15*3b76f4e1SMaciej Falkowski  devices like MFC, FIMC, FIMD, GScaler, FIMC-IS and so forth.
16*3b76f4e1SMaciej Falkowski
17*3b76f4e1SMaciej Falkowski  System MMU is an IOMMU and supports identical translation table format to
18*3b76f4e1SMaciej Falkowski  ARMv7 translation tables with minimum set of page properties including access
19*3b76f4e1SMaciej Falkowski  permissions, shareability and security protection. In addition, System MMU has
20*3b76f4e1SMaciej Falkowski  another capabilities like L2 TLB or block-fetch buffers to minimize translation
21*3b76f4e1SMaciej Falkowski  latency.
22*3b76f4e1SMaciej Falkowski
23*3b76f4e1SMaciej Falkowski  System MMUs are in many to one relation with peripheral devices, i.e. single
24*3b76f4e1SMaciej Falkowski  peripheral device might have multiple System MMUs (usually one for each bus
25*3b76f4e1SMaciej Falkowski  master), but one System MMU can handle transactions from only one peripheral
26*3b76f4e1SMaciej Falkowski  device. The relation between a System MMU and the peripheral device needs to be
27*3b76f4e1SMaciej Falkowski  defined in device node of the peripheral device.
28*3b76f4e1SMaciej Falkowski
29*3b76f4e1SMaciej Falkowski  MFC in all Exynos SoCs and FIMD, M2M Scalers and G2D in Exynos5420 has 2 System
30*3b76f4e1SMaciej Falkowski  MMUs.
31*3b76f4e1SMaciej Falkowski  * MFC has one System MMU on its left and right bus.
32*3b76f4e1SMaciej Falkowski  * FIMD in Exynos5420 has one System MMU for window 0 and 4, the other system MMU
33*3b76f4e1SMaciej Falkowski    for window 1, 2 and 3.
34*3b76f4e1SMaciej Falkowski  * M2M Scalers and G2D in Exynos5420 has one System MMU on the read channel and
35*3b76f4e1SMaciej Falkowski    the other System MMU on the write channel.
36*3b76f4e1SMaciej Falkowski
37*3b76f4e1SMaciej Falkowski  For information on assigning System MMU controller to its peripheral devices,
38*3b76f4e1SMaciej Falkowski  see generic IOMMU bindings.
39*3b76f4e1SMaciej Falkowski
40*3b76f4e1SMaciej Falkowskiproperties:
41*3b76f4e1SMaciej Falkowski  compatible:
42*3b76f4e1SMaciej Falkowski    const: samsung,exynos-sysmmu
43*3b76f4e1SMaciej Falkowski
44*3b76f4e1SMaciej Falkowski  reg:
45*3b76f4e1SMaciej Falkowski    maxItems: 1
46*3b76f4e1SMaciej Falkowski
47*3b76f4e1SMaciej Falkowski  interrupts:
48*3b76f4e1SMaciej Falkowski    maxItems: 1
49*3b76f4e1SMaciej Falkowski
50*3b76f4e1SMaciej Falkowski  clocks:
51*3b76f4e1SMaciej Falkowski    minItems: 1
52*3b76f4e1SMaciej Falkowski    maxItems: 2
53*3b76f4e1SMaciej Falkowski
54*3b76f4e1SMaciej Falkowski  clock-names:
55*3b76f4e1SMaciej Falkowski    oneOf:
56*3b76f4e1SMaciej Falkowski      - items:
57*3b76f4e1SMaciej Falkowski        - const: sysmmu
58*3b76f4e1SMaciej Falkowski      - items:
59*3b76f4e1SMaciej Falkowski        - const: sysmmu
60*3b76f4e1SMaciej Falkowski        - const: master
61*3b76f4e1SMaciej Falkowski      - items:
62*3b76f4e1SMaciej Falkowski        - const: aclk
63*3b76f4e1SMaciej Falkowski        - const: pclk
64*3b76f4e1SMaciej Falkowski
65*3b76f4e1SMaciej Falkowski  "#iommu-cells":
66*3b76f4e1SMaciej Falkowski    const: 0
67*3b76f4e1SMaciej Falkowski
68*3b76f4e1SMaciej Falkowski  power-domains:
69*3b76f4e1SMaciej Falkowski    description: |
70*3b76f4e1SMaciej Falkowski      Required if the System MMU is needed to gate its power.
71*3b76f4e1SMaciej Falkowski      Please refer to the following document:
72*3b76f4e1SMaciej Falkowski      Documentation/devicetree/bindings/power/pd-samsung.txt
73*3b76f4e1SMaciej Falkowski    maxItems: 1
74*3b76f4e1SMaciej Falkowski
75*3b76f4e1SMaciej Falkowskirequired:
76*3b76f4e1SMaciej Falkowski  - compatible
77*3b76f4e1SMaciej Falkowski  - reg
78*3b76f4e1SMaciej Falkowski  - interrupts
79*3b76f4e1SMaciej Falkowski  - clocks
80*3b76f4e1SMaciej Falkowski  - clock-names
81*3b76f4e1SMaciej Falkowski  - "#iommu-cells"
82*3b76f4e1SMaciej Falkowski
83*3b76f4e1SMaciej Falkowskiexamples:
84*3b76f4e1SMaciej Falkowski  - |
85*3b76f4e1SMaciej Falkowski    #include <dt-bindings/clock/exynos5250.h>
86*3b76f4e1SMaciej Falkowski
87*3b76f4e1SMaciej Falkowski    gsc_0: scaler@13e00000 {
88*3b76f4e1SMaciej Falkowski      compatible = "samsung,exynos5-gsc";
89*3b76f4e1SMaciej Falkowski      reg = <0x13e00000 0x1000>;
90*3b76f4e1SMaciej Falkowski      interrupts = <0 85 0>;
91*3b76f4e1SMaciej Falkowski      power-domains = <&pd_gsc>;
92*3b76f4e1SMaciej Falkowski      clocks = <&clock CLK_GSCL0>;
93*3b76f4e1SMaciej Falkowski      clock-names = "gscl";
94*3b76f4e1SMaciej Falkowski      iommus = <&sysmmu_gsc0>;
95*3b76f4e1SMaciej Falkowski    };
96*3b76f4e1SMaciej Falkowski
97*3b76f4e1SMaciej Falkowski    sysmmu_gsc0: iommu@13e80000 {
98*3b76f4e1SMaciej Falkowski      compatible = "samsung,exynos-sysmmu";
99*3b76f4e1SMaciej Falkowski      reg = <0x13E80000 0x1000>;
100*3b76f4e1SMaciej Falkowski      interrupt-parent = <&combiner>;
101*3b76f4e1SMaciej Falkowski      interrupts = <2 0>;
102*3b76f4e1SMaciej Falkowski      clock-names = "sysmmu", "master";
103*3b76f4e1SMaciej Falkowski      clocks = <&clock CLK_SMMU_GSCL0>,
104*3b76f4e1SMaciej Falkowski               <&clock CLK_GSCL0>;
105*3b76f4e1SMaciej Falkowski      power-domains = <&pd_gsc>;
106*3b76f4e1SMaciej Falkowski      #iommu-cells = <0>;
107*3b76f4e1SMaciej Falkowski    };
108*3b76f4e1SMaciej Falkowski
109