• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2# Copyright (c) 2020 MediaTek Inc.
3%YAML 1.2
4---
5$id: http://devicetree.org/schemas/memory-controllers/mediatek,smi-larb.yaml#
6$schema: http://devicetree.org/meta-schemas/core.yaml#
7
8title: SMI (Smart Multimedia Interface) Local Arbiter
9
10maintainers:
11  - Yong Wu <yong.wu@mediatek.com>
12
13description: |
14  The hardware block diagram please check bindings/iommu/mediatek,iommu.yaml
15
16properties:
17  compatible:
18    oneOf:
19      - enum:
20          - mediatek,mt2701-smi-larb
21          - mediatek,mt2712-smi-larb
22          - mediatek,mt6779-smi-larb
23          - mediatek,mt8167-smi-larb
24          - mediatek,mt8173-smi-larb
25          - mediatek,mt8183-smi-larb
26
27      - description: for mt7623
28        items:
29          - const: mediatek,mt7623-smi-larb
30          - const: mediatek,mt2701-smi-larb
31
32  reg:
33    maxItems: 1
34
35  clocks:
36    description: |
37      apb and smi are mandatory. gals(global async local sync) is optional.
38    minItems: 2
39    maxItems: 3
40    items:
41      - description: apb is Advanced Peripheral Bus clock, It's the clock for
42          setting the register.
43      - description: smi is the clock for transfer data and command.
44      - description: the clock for gals.
45
46  clock-names:
47    minItems: 2
48    maxItems: 3
49
50  power-domains:
51    maxItems: 1
52
53  mediatek,smi:
54    $ref: /schemas/types.yaml#/definitions/phandle-array
55    description: a phandle to the smi_common node.
56
57  mediatek,larb-id:
58    $ref: /schemas/types.yaml#/definitions/uint32
59    minimum: 0
60    maximum: 31
61    description: the hardware id of this larb. It's only required when this
62      hardward id is not consecutive from its M4U point of view.
63
64required:
65  - compatible
66  - reg
67  - clocks
68  - clock-names
69  - power-domains
70
71allOf:
72  - if:  # HW has gals
73      properties:
74        compatible:
75          enum:
76            - mediatek,mt8183-smi-larb
77
78    then:
79      properties:
80        clocks:
81          minItems: 2
82          maxItems: 3
83        clock-names:
84          minItems: 2
85          items:
86            - const: apb
87            - const: smi
88            - const: gals
89
90    else:
91      properties:
92        clocks:
93          minItems: 2
94          maxItems: 2
95        clock-names:
96          items:
97            - const: apb
98            - const: smi
99
100  - if:
101      properties:
102        compatible:
103          contains:
104            enum:
105              - mediatek,mt2701-smi-larb
106              - mediatek,mt2712-smi-larb
107              - mediatek,mt6779-smi-larb
108
109    then:
110      required:
111        - mediatek,larb-id
112
113additionalProperties: false
114
115examples:
116  - |+
117    #include <dt-bindings/clock/mt8173-clk.h>
118    #include <dt-bindings/power/mt8173-power.h>
119
120    larb1: larb@16010000 {
121      compatible = "mediatek,mt8173-smi-larb";
122      reg = <0x16010000 0x1000>;
123      mediatek,smi = <&smi_common>;
124      power-domains = <&scpsys MT8173_POWER_DOMAIN_VDEC>;
125      clocks = <&vdecsys CLK_VDEC_CKEN>,
126               <&vdecsys CLK_VDEC_LARB_CKEN>;
127      clock-names = "apb", "smi";
128    };
129