15def4c47SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
25def4c47SEmmanuel Vadot# Copyright (c) 2020 MediaTek Inc.
35def4c47SEmmanuel Vadot%YAML 1.2
45def4c47SEmmanuel Vadot---
55def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/memory-controllers/mediatek,smi-larb.yaml#
65def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
75def4c47SEmmanuel Vadot
85def4c47SEmmanuel Vadottitle: SMI (Smart Multimedia Interface) Local Arbiter
95def4c47SEmmanuel Vadot
105def4c47SEmmanuel Vadotmaintainers:
115def4c47SEmmanuel Vadot  - Yong Wu <yong.wu@mediatek.com>
125def4c47SEmmanuel Vadot
135def4c47SEmmanuel Vadotdescription: |
145def4c47SEmmanuel Vadot  The hardware block diagram please check bindings/iommu/mediatek,iommu.yaml
155def4c47SEmmanuel Vadot
165def4c47SEmmanuel Vadotproperties:
175def4c47SEmmanuel Vadot  compatible:
185def4c47SEmmanuel Vadot    oneOf:
195def4c47SEmmanuel Vadot      - enum:
205def4c47SEmmanuel Vadot          - mediatek,mt2701-smi-larb
215def4c47SEmmanuel Vadot          - mediatek,mt2712-smi-larb
225def4c47SEmmanuel Vadot          - mediatek,mt6779-smi-larb
23b97ee269SEmmanuel Vadot          - mediatek,mt6795-smi-larb
245def4c47SEmmanuel Vadot          - mediatek,mt8167-smi-larb
255def4c47SEmmanuel Vadot          - mediatek,mt8173-smi-larb
265def4c47SEmmanuel Vadot          - mediatek,mt8183-smi-larb
27c9ccf3a3SEmmanuel Vadot          - mediatek,mt8186-smi-larb
287ef62cebSEmmanuel Vadot          - mediatek,mt8188-smi-larb
295def4c47SEmmanuel Vadot          - mediatek,mt8192-smi-larb
308cc087a1SEmmanuel Vadot          - mediatek,mt8195-smi-larb
315def4c47SEmmanuel Vadot
325def4c47SEmmanuel Vadot      - description: for mt7623
335def4c47SEmmanuel Vadot        items:
345def4c47SEmmanuel Vadot          - const: mediatek,mt7623-smi-larb
355def4c47SEmmanuel Vadot          - const: mediatek,mt2701-smi-larb
365def4c47SEmmanuel Vadot
37fac71e4eSEmmanuel Vadot      - items:
38fac71e4eSEmmanuel Vadot          - const: mediatek,mt8365-smi-larb
39fac71e4eSEmmanuel Vadot          - const: mediatek,mt8186-smi-larb
40fac71e4eSEmmanuel Vadot
415def4c47SEmmanuel Vadot  reg:
425def4c47SEmmanuel Vadot    maxItems: 1
435def4c47SEmmanuel Vadot
445def4c47SEmmanuel Vadot  clocks:
455def4c47SEmmanuel Vadot    description: |
465def4c47SEmmanuel Vadot      apb and smi are mandatory. gals(global async local sync) is optional.
475def4c47SEmmanuel Vadot    minItems: 2
485def4c47SEmmanuel Vadot    items:
495def4c47SEmmanuel Vadot      - description: apb is Advanced Peripheral Bus clock, It's the clock for
505def4c47SEmmanuel Vadot          setting the register.
515def4c47SEmmanuel Vadot      - description: smi is the clock for transfer data and command.
525def4c47SEmmanuel Vadot      - description: the clock for gals.
535def4c47SEmmanuel Vadot
545def4c47SEmmanuel Vadot  clock-names:
555def4c47SEmmanuel Vadot    minItems: 2
565def4c47SEmmanuel Vadot    maxItems: 3
575def4c47SEmmanuel Vadot
585def4c47SEmmanuel Vadot  power-domains:
595def4c47SEmmanuel Vadot    maxItems: 1
605def4c47SEmmanuel Vadot
615def4c47SEmmanuel Vadot  mediatek,smi:
62c9ccf3a3SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
635def4c47SEmmanuel Vadot    description: a phandle to the smi_common node.
645def4c47SEmmanuel Vadot
655def4c47SEmmanuel Vadot  mediatek,larb-id:
665def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
675def4c47SEmmanuel Vadot    minimum: 0
685def4c47SEmmanuel Vadot    maximum: 31
695def4c47SEmmanuel Vadot    description: the hardware id of this larb. It's only required when this
70*aa1a8ff2SEmmanuel Vadot      hardware id is not consecutive from its M4U point of view.
715def4c47SEmmanuel Vadot
725def4c47SEmmanuel Vadotrequired:
735def4c47SEmmanuel Vadot  - compatible
745def4c47SEmmanuel Vadot  - reg
755def4c47SEmmanuel Vadot  - clocks
765def4c47SEmmanuel Vadot  - clock-names
775def4c47SEmmanuel Vadot  - power-domains
785def4c47SEmmanuel Vadot
795def4c47SEmmanuel VadotallOf:
805def4c47SEmmanuel Vadot  - if:  # HW has gals
815def4c47SEmmanuel Vadot      properties:
825def4c47SEmmanuel Vadot        compatible:
835def4c47SEmmanuel Vadot          enum:
845def4c47SEmmanuel Vadot            - mediatek,mt8183-smi-larb
85c9ccf3a3SEmmanuel Vadot            - mediatek,mt8186-smi-larb
867ef62cebSEmmanuel Vadot            - mediatek,mt8188-smi-larb
878cc087a1SEmmanuel Vadot            - mediatek,mt8195-smi-larb
885def4c47SEmmanuel Vadot
895def4c47SEmmanuel Vadot    then:
905def4c47SEmmanuel Vadot      properties:
91c9ccf3a3SEmmanuel Vadot        clocks:
92c9ccf3a3SEmmanuel Vadot          minItems: 2
935def4c47SEmmanuel Vadot          maxItems: 3
945def4c47SEmmanuel Vadot        clock-names:
95c9ccf3a3SEmmanuel Vadot          minItems: 2
965def4c47SEmmanuel Vadot          items:
975def4c47SEmmanuel Vadot            - const: apb
985def4c47SEmmanuel Vadot            - const: smi
995def4c47SEmmanuel Vadot            - const: gals
1005def4c47SEmmanuel Vadot
1015def4c47SEmmanuel Vadot    else:
1025def4c47SEmmanuel Vadot      properties:
103c9ccf3a3SEmmanuel Vadot        clocks:
1045def4c47SEmmanuel Vadot          minItems: 2
1055def4c47SEmmanuel Vadot          maxItems: 2
1065def4c47SEmmanuel Vadot        clock-names:
1075def4c47SEmmanuel Vadot          items:
1085def4c47SEmmanuel Vadot            - const: apb
1095def4c47SEmmanuel Vadot            - const: smi
1105def4c47SEmmanuel Vadot
1115def4c47SEmmanuel Vadot  - if:
1125def4c47SEmmanuel Vadot      properties:
1135def4c47SEmmanuel Vadot        compatible:
1145def4c47SEmmanuel Vadot          contains:
1155def4c47SEmmanuel Vadot            enum:
1165def4c47SEmmanuel Vadot              - mediatek,mt2701-smi-larb
1175def4c47SEmmanuel Vadot              - mediatek,mt2712-smi-larb
1185def4c47SEmmanuel Vadot              - mediatek,mt6779-smi-larb
119c9ccf3a3SEmmanuel Vadot              - mediatek,mt8186-smi-larb
1207ef62cebSEmmanuel Vadot              - mediatek,mt8188-smi-larb
1215def4c47SEmmanuel Vadot              - mediatek,mt8192-smi-larb
1228cc087a1SEmmanuel Vadot              - mediatek,mt8195-smi-larb
1235def4c47SEmmanuel Vadot
1245def4c47SEmmanuel Vadot    then:
1255def4c47SEmmanuel Vadot      required:
1265def4c47SEmmanuel Vadot        - mediatek,larb-id
1275def4c47SEmmanuel Vadot
1285def4c47SEmmanuel VadotadditionalProperties: false
1295def4c47SEmmanuel Vadot
1305def4c47SEmmanuel Vadotexamples:
1315def4c47SEmmanuel Vadot  - |+
1325def4c47SEmmanuel Vadot    #include <dt-bindings/clock/mt8173-clk.h>
1335def4c47SEmmanuel Vadot    #include <dt-bindings/power/mt8173-power.h>
1345def4c47SEmmanuel Vadot
1355def4c47SEmmanuel Vadot    larb1: larb@16010000 {
1365def4c47SEmmanuel Vadot      compatible = "mediatek,mt8173-smi-larb";
1375def4c47SEmmanuel Vadot      reg = <0x16010000 0x1000>;
1385def4c47SEmmanuel Vadot      mediatek,smi = <&smi_common>;
1395def4c47SEmmanuel Vadot      power-domains = <&scpsys MT8173_POWER_DOMAIN_VDEC>;
1405def4c47SEmmanuel Vadot      clocks = <&vdecsys CLK_VDEC_CKEN>,
1415def4c47SEmmanuel Vadot               <&vdecsys CLK_VDEC_LARB_CKEN>;
1425def4c47SEmmanuel Vadot      clock-names = "apb", "smi";
1435def4c47SEmmanuel Vadot    };
144