xref: /freebsd/sys/contrib/device-tree/Bindings/memory-controllers/mediatek,smi-larb.yaml (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
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,mt6795-smi-larb
24          - mediatek,mt8167-smi-larb
25          - mediatek,mt8173-smi-larb
26          - mediatek,mt8183-smi-larb
27          - mediatek,mt8186-smi-larb
28          - mediatek,mt8192-smi-larb
29          - mediatek,mt8195-smi-larb
30
31      - description: for mt7623
32        items:
33          - const: mediatek,mt7623-smi-larb
34          - const: mediatek,mt2701-smi-larb
35
36  reg:
37    maxItems: 1
38
39  clocks:
40    description: |
41      apb and smi are mandatory. gals(global async local sync) is optional.
42    minItems: 2
43    items:
44      - description: apb is Advanced Peripheral Bus clock, It's the clock for
45          setting the register.
46      - description: smi is the clock for transfer data and command.
47      - description: the clock for gals.
48
49  clock-names:
50    minItems: 2
51    maxItems: 3
52
53  power-domains:
54    maxItems: 1
55
56  mediatek,smi:
57    $ref: /schemas/types.yaml#/definitions/phandle
58    description: a phandle to the smi_common node.
59
60  mediatek,larb-id:
61    $ref: /schemas/types.yaml#/definitions/uint32
62    minimum: 0
63    maximum: 31
64    description: the hardware id of this larb. It's only required when this
65      hardward id is not consecutive from its M4U point of view.
66
67required:
68  - compatible
69  - reg
70  - clocks
71  - clock-names
72  - power-domains
73
74allOf:
75  - if:  # HW has gals
76      properties:
77        compatible:
78          enum:
79            - mediatek,mt8183-smi-larb
80            - mediatek,mt8186-smi-larb
81            - mediatek,mt8195-smi-larb
82
83    then:
84      properties:
85        clocks:
86          minItems: 2
87          maxItems: 3
88        clock-names:
89          minItems: 2
90          items:
91            - const: apb
92            - const: smi
93            - const: gals
94
95    else:
96      properties:
97        clocks:
98          minItems: 2
99          maxItems: 2
100        clock-names:
101          items:
102            - const: apb
103            - const: smi
104
105  - if:
106      properties:
107        compatible:
108          contains:
109            enum:
110              - mediatek,mt2701-smi-larb
111              - mediatek,mt2712-smi-larb
112              - mediatek,mt6779-smi-larb
113              - mediatek,mt8186-smi-larb
114              - mediatek,mt8192-smi-larb
115              - mediatek,mt8195-smi-larb
116
117    then:
118      required:
119        - mediatek,larb-id
120
121additionalProperties: false
122
123examples:
124  - |+
125    #include <dt-bindings/clock/mt8173-clk.h>
126    #include <dt-bindings/power/mt8173-power.h>
127
128    larb1: larb@16010000 {
129      compatible = "mediatek,mt8173-smi-larb";
130      reg = <0x16010000 0x1000>;
131      mediatek,smi = <&smi_common>;
132      power-domains = <&scpsys MT8173_POWER_DOMAIN_VDEC>;
133      clocks = <&vdecsys CLK_VDEC_CKEN>,
134               <&vdecsys CLK_VDEC_LARB_CKEN>;
135      clock-names = "apb", "smi";
136    };
137