xref: /freebsd/sys/contrib/device-tree/Bindings/memory-controllers/mediatek,smi-larb.yaml (revision 7ef62cebc2f965b0f640263e179276928885e33d)
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
28*7ef62cebSEmmanuel 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
375def4c47SEmmanuel Vadot  reg:
385def4c47SEmmanuel Vadot    maxItems: 1
395def4c47SEmmanuel Vadot
405def4c47SEmmanuel Vadot  clocks:
415def4c47SEmmanuel Vadot    description: |
425def4c47SEmmanuel Vadot      apb and smi are mandatory. gals(global async local sync) is optional.
435def4c47SEmmanuel Vadot    minItems: 2
445def4c47SEmmanuel Vadot    items:
455def4c47SEmmanuel Vadot      - description: apb is Advanced Peripheral Bus clock, It's the clock for
465def4c47SEmmanuel Vadot          setting the register.
475def4c47SEmmanuel Vadot      - description: smi is the clock for transfer data and command.
485def4c47SEmmanuel Vadot      - description: the clock for gals.
495def4c47SEmmanuel Vadot
505def4c47SEmmanuel Vadot  clock-names:
515def4c47SEmmanuel Vadot    minItems: 2
525def4c47SEmmanuel Vadot    maxItems: 3
535def4c47SEmmanuel Vadot
545def4c47SEmmanuel Vadot  power-domains:
555def4c47SEmmanuel Vadot    maxItems: 1
565def4c47SEmmanuel Vadot
575def4c47SEmmanuel Vadot  mediatek,smi:
58c9ccf3a3SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
595def4c47SEmmanuel Vadot    description: a phandle to the smi_common node.
605def4c47SEmmanuel Vadot
615def4c47SEmmanuel Vadot  mediatek,larb-id:
625def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
635def4c47SEmmanuel Vadot    minimum: 0
645def4c47SEmmanuel Vadot    maximum: 31
655def4c47SEmmanuel Vadot    description: the hardware id of this larb. It's only required when this
665def4c47SEmmanuel Vadot      hardward id is not consecutive from its M4U point of view.
675def4c47SEmmanuel Vadot
685def4c47SEmmanuel Vadotrequired:
695def4c47SEmmanuel Vadot  - compatible
705def4c47SEmmanuel Vadot  - reg
715def4c47SEmmanuel Vadot  - clocks
725def4c47SEmmanuel Vadot  - clock-names
735def4c47SEmmanuel Vadot  - power-domains
745def4c47SEmmanuel Vadot
755def4c47SEmmanuel VadotallOf:
765def4c47SEmmanuel Vadot  - if:  # HW has gals
775def4c47SEmmanuel Vadot      properties:
785def4c47SEmmanuel Vadot        compatible:
795def4c47SEmmanuel Vadot          enum:
805def4c47SEmmanuel Vadot            - mediatek,mt8183-smi-larb
81c9ccf3a3SEmmanuel Vadot            - mediatek,mt8186-smi-larb
82*7ef62cebSEmmanuel Vadot            - mediatek,mt8188-smi-larb
838cc087a1SEmmanuel Vadot            - mediatek,mt8195-smi-larb
845def4c47SEmmanuel Vadot
855def4c47SEmmanuel Vadot    then:
865def4c47SEmmanuel Vadot      properties:
87c9ccf3a3SEmmanuel Vadot        clocks:
88c9ccf3a3SEmmanuel Vadot          minItems: 2
895def4c47SEmmanuel Vadot          maxItems: 3
905def4c47SEmmanuel Vadot        clock-names:
91c9ccf3a3SEmmanuel Vadot          minItems: 2
925def4c47SEmmanuel Vadot          items:
935def4c47SEmmanuel Vadot            - const: apb
945def4c47SEmmanuel Vadot            - const: smi
955def4c47SEmmanuel Vadot            - const: gals
965def4c47SEmmanuel Vadot
975def4c47SEmmanuel Vadot    else:
985def4c47SEmmanuel Vadot      properties:
99c9ccf3a3SEmmanuel Vadot        clocks:
1005def4c47SEmmanuel Vadot          minItems: 2
1015def4c47SEmmanuel Vadot          maxItems: 2
1025def4c47SEmmanuel Vadot        clock-names:
1035def4c47SEmmanuel Vadot          items:
1045def4c47SEmmanuel Vadot            - const: apb
1055def4c47SEmmanuel Vadot            - const: smi
1065def4c47SEmmanuel Vadot
1075def4c47SEmmanuel Vadot  - if:
1085def4c47SEmmanuel Vadot      properties:
1095def4c47SEmmanuel Vadot        compatible:
1105def4c47SEmmanuel Vadot          contains:
1115def4c47SEmmanuel Vadot            enum:
1125def4c47SEmmanuel Vadot              - mediatek,mt2701-smi-larb
1135def4c47SEmmanuel Vadot              - mediatek,mt2712-smi-larb
1145def4c47SEmmanuel Vadot              - mediatek,mt6779-smi-larb
115c9ccf3a3SEmmanuel Vadot              - mediatek,mt8186-smi-larb
116*7ef62cebSEmmanuel Vadot              - mediatek,mt8188-smi-larb
1175def4c47SEmmanuel Vadot              - mediatek,mt8192-smi-larb
1188cc087a1SEmmanuel Vadot              - mediatek,mt8195-smi-larb
1195def4c47SEmmanuel Vadot
1205def4c47SEmmanuel Vadot    then:
1215def4c47SEmmanuel Vadot      required:
1225def4c47SEmmanuel Vadot        - mediatek,larb-id
1235def4c47SEmmanuel Vadot
1245def4c47SEmmanuel VadotadditionalProperties: false
1255def4c47SEmmanuel Vadot
1265def4c47SEmmanuel Vadotexamples:
1275def4c47SEmmanuel Vadot  - |+
1285def4c47SEmmanuel Vadot    #include <dt-bindings/clock/mt8173-clk.h>
1295def4c47SEmmanuel Vadot    #include <dt-bindings/power/mt8173-power.h>
1305def4c47SEmmanuel Vadot
1315def4c47SEmmanuel Vadot    larb1: larb@16010000 {
1325def4c47SEmmanuel Vadot      compatible = "mediatek,mt8173-smi-larb";
1335def4c47SEmmanuel Vadot      reg = <0x16010000 0x1000>;
1345def4c47SEmmanuel Vadot      mediatek,smi = <&smi_common>;
1355def4c47SEmmanuel Vadot      power-domains = <&scpsys MT8173_POWER_DOMAIN_VDEC>;
1365def4c47SEmmanuel Vadot      clocks = <&vdecsys CLK_VDEC_CKEN>,
1375def4c47SEmmanuel Vadot               <&vdecsys CLK_VDEC_LARB_CKEN>;
1385def4c47SEmmanuel Vadot      clock-names = "apb", "smi";
1395def4c47SEmmanuel Vadot    };
140