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-common.yaml# 65def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 75def4c47SEmmanuel Vadot 85def4c47SEmmanuel Vadottitle: SMI (Smart Multimedia Interface) Common 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 Vadot MediaTek SMI have two generations of HW architecture, here is the list 175def4c47SEmmanuel Vadot which generation the SoCs use: 185def4c47SEmmanuel Vadot generation 1: mt2701 and mt7623. 197ef62cebSEmmanuel Vadot generation 2: mt2712, mt6779, mt8167, mt8173, mt8183, mt8186, mt8188, mt8192 and mt8195. 205def4c47SEmmanuel Vadot 215def4c47SEmmanuel Vadot There's slight differences between the two SMI, for generation 2, the 225def4c47SEmmanuel Vadot register which control the iommu port is at each larb's register base. But 235def4c47SEmmanuel Vadot for generation 1, the register is at smi ao base(smi always on register 245def4c47SEmmanuel Vadot base). Besides that, the smi async clock should be prepared and enabled for 255def4c47SEmmanuel Vadot SMI generation 1 to transform the smi clock into emi clock domain, but that is 265def4c47SEmmanuel Vadot not needed for SMI generation 2. 275def4c47SEmmanuel Vadot 285def4c47SEmmanuel Vadotproperties: 295def4c47SEmmanuel Vadot compatible: 305def4c47SEmmanuel Vadot oneOf: 315def4c47SEmmanuel Vadot - enum: 325def4c47SEmmanuel Vadot - mediatek,mt2701-smi-common 335def4c47SEmmanuel Vadot - mediatek,mt2712-smi-common 345def4c47SEmmanuel Vadot - mediatek,mt6779-smi-common 35b97ee269SEmmanuel Vadot - mediatek,mt6795-smi-common 365def4c47SEmmanuel Vadot - mediatek,mt8167-smi-common 375def4c47SEmmanuel Vadot - mediatek,mt8173-smi-common 385def4c47SEmmanuel Vadot - mediatek,mt8183-smi-common 39c9ccf3a3SEmmanuel Vadot - mediatek,mt8186-smi-common 407ef62cebSEmmanuel Vadot - mediatek,mt8188-smi-common-vdo 417ef62cebSEmmanuel Vadot - mediatek,mt8188-smi-common-vpp 425def4c47SEmmanuel Vadot - mediatek,mt8192-smi-common 438cc087a1SEmmanuel Vadot - mediatek,mt8195-smi-common-vdo 448cc087a1SEmmanuel Vadot - mediatek,mt8195-smi-common-vpp 458cc087a1SEmmanuel Vadot - mediatek,mt8195-smi-sub-common 46*fac71e4eSEmmanuel Vadot - mediatek,mt8365-smi-common 475def4c47SEmmanuel Vadot 485def4c47SEmmanuel Vadot - description: for mt7623 495def4c47SEmmanuel Vadot items: 505def4c47SEmmanuel Vadot - const: mediatek,mt7623-smi-common 515def4c47SEmmanuel Vadot - const: mediatek,mt2701-smi-common 525def4c47SEmmanuel Vadot 535def4c47SEmmanuel Vadot reg: 545def4c47SEmmanuel Vadot maxItems: 1 555def4c47SEmmanuel Vadot 565def4c47SEmmanuel Vadot power-domains: 575def4c47SEmmanuel Vadot maxItems: 1 585def4c47SEmmanuel Vadot 595def4c47SEmmanuel Vadot clocks: 605def4c47SEmmanuel Vadot description: | 615def4c47SEmmanuel Vadot apb and smi are mandatory. the async is only for generation 1 smi HW. 625def4c47SEmmanuel Vadot gals(global async local sync) also is optional, see below. 635def4c47SEmmanuel Vadot minItems: 2 645def4c47SEmmanuel Vadot items: 655def4c47SEmmanuel Vadot - description: apb is Advanced Peripheral Bus clock, It's the clock for 665def4c47SEmmanuel Vadot setting the register. 675def4c47SEmmanuel Vadot - description: smi is the clock for transfer data and command. 685956d97fSEmmanuel Vadot - description: Either asynchronous clock to help transform the smi clock 695956d97fSEmmanuel Vadot into the emi clock domain on Gen1 h/w, or the path0 clock of gals. 705def4c47SEmmanuel Vadot - description: gals1 is the path1 clock of gals. 715def4c47SEmmanuel Vadot 725def4c47SEmmanuel Vadot clock-names: 735def4c47SEmmanuel Vadot minItems: 2 745def4c47SEmmanuel Vadot maxItems: 4 755def4c47SEmmanuel Vadot 768cc087a1SEmmanuel Vadot mediatek,smi: 778cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 788cc087a1SEmmanuel Vadot description: a phandle to the smi-common node above. Only for sub-common. 798cc087a1SEmmanuel Vadot 805def4c47SEmmanuel Vadotrequired: 815def4c47SEmmanuel Vadot - compatible 825def4c47SEmmanuel Vadot - reg 835def4c47SEmmanuel Vadot - power-domains 845def4c47SEmmanuel Vadot - clocks 855def4c47SEmmanuel Vadot - clock-names 865def4c47SEmmanuel Vadot 875def4c47SEmmanuel VadotallOf: 885def4c47SEmmanuel Vadot - if: # only for gen1 HW 895def4c47SEmmanuel Vadot properties: 905def4c47SEmmanuel Vadot compatible: 915def4c47SEmmanuel Vadot contains: 925def4c47SEmmanuel Vadot enum: 935def4c47SEmmanuel Vadot - mediatek,mt2701-smi-common 945def4c47SEmmanuel Vadot then: 955def4c47SEmmanuel Vadot properties: 96c9ccf3a3SEmmanuel Vadot clocks: 975def4c47SEmmanuel Vadot minItems: 3 985def4c47SEmmanuel Vadot maxItems: 3 995def4c47SEmmanuel Vadot clock-names: 1005def4c47SEmmanuel Vadot items: 1015def4c47SEmmanuel Vadot - const: apb 1025def4c47SEmmanuel Vadot - const: smi 1035def4c47SEmmanuel Vadot - const: async 1045def4c47SEmmanuel Vadot 1058cc087a1SEmmanuel Vadot - if: # only for sub common 1068cc087a1SEmmanuel Vadot properties: 1078cc087a1SEmmanuel Vadot compatible: 1088cc087a1SEmmanuel Vadot contains: 1098cc087a1SEmmanuel Vadot enum: 1108cc087a1SEmmanuel Vadot - mediatek,mt8195-smi-sub-common 1118cc087a1SEmmanuel Vadot then: 1128cc087a1SEmmanuel Vadot required: 1138cc087a1SEmmanuel Vadot - mediatek,smi 1148cc087a1SEmmanuel Vadot properties: 115c9ccf3a3SEmmanuel Vadot clocks: 1168cc087a1SEmmanuel Vadot minItems: 3 1178cc087a1SEmmanuel Vadot maxItems: 3 1188cc087a1SEmmanuel Vadot clock-names: 1198cc087a1SEmmanuel Vadot items: 1208cc087a1SEmmanuel Vadot - const: apb 1218cc087a1SEmmanuel Vadot - const: smi 1228cc087a1SEmmanuel Vadot - const: gals0 1238cc087a1SEmmanuel Vadot else: 1248cc087a1SEmmanuel Vadot properties: 1258cc087a1SEmmanuel Vadot mediatek,smi: false 1268cc087a1SEmmanuel Vadot 1275def4c47SEmmanuel Vadot - if: # for gen2 HW that have gals 1285def4c47SEmmanuel Vadot properties: 1295def4c47SEmmanuel Vadot compatible: 1305def4c47SEmmanuel Vadot enum: 1315def4c47SEmmanuel Vadot - mediatek,mt6779-smi-common 1325def4c47SEmmanuel Vadot - mediatek,mt8183-smi-common 133c9ccf3a3SEmmanuel Vadot - mediatek,mt8186-smi-common 1345def4c47SEmmanuel Vadot - mediatek,mt8192-smi-common 1358cc087a1SEmmanuel Vadot - mediatek,mt8195-smi-common-vdo 1368cc087a1SEmmanuel Vadot - mediatek,mt8195-smi-common-vpp 137*fac71e4eSEmmanuel Vadot - mediatek,mt8365-smi-common 1385def4c47SEmmanuel Vadot 1395def4c47SEmmanuel Vadot then: 1405def4c47SEmmanuel Vadot properties: 141c9ccf3a3SEmmanuel Vadot clocks: 1425def4c47SEmmanuel Vadot minItems: 4 1435def4c47SEmmanuel Vadot maxItems: 4 1445def4c47SEmmanuel Vadot clock-names: 1455def4c47SEmmanuel Vadot items: 1465def4c47SEmmanuel Vadot - const: apb 1475def4c47SEmmanuel Vadot - const: smi 1485def4c47SEmmanuel Vadot - const: gals0 1495def4c47SEmmanuel Vadot - const: gals1 1505def4c47SEmmanuel Vadot 1517ef62cebSEmmanuel Vadot - if: # for gen2 HW that don't have gals 1527ef62cebSEmmanuel Vadot properties: 1537ef62cebSEmmanuel Vadot compatible: 1547ef62cebSEmmanuel Vadot enum: 1557ef62cebSEmmanuel Vadot - mediatek,mt2712-smi-common 1567ef62cebSEmmanuel Vadot - mediatek,mt6795-smi-common 1577ef62cebSEmmanuel Vadot - mediatek,mt8167-smi-common 1587ef62cebSEmmanuel Vadot - mediatek,mt8173-smi-common 1597ef62cebSEmmanuel Vadot 1607ef62cebSEmmanuel Vadot then: 1615def4c47SEmmanuel Vadot properties: 162c9ccf3a3SEmmanuel Vadot clocks: 1635def4c47SEmmanuel Vadot minItems: 2 1645def4c47SEmmanuel Vadot maxItems: 2 1655def4c47SEmmanuel Vadot clock-names: 1665def4c47SEmmanuel Vadot items: 1675def4c47SEmmanuel Vadot - const: apb 1685def4c47SEmmanuel Vadot - const: smi 1695def4c47SEmmanuel Vadot 1705def4c47SEmmanuel VadotadditionalProperties: false 1715def4c47SEmmanuel Vadot 1725def4c47SEmmanuel Vadotexamples: 1735def4c47SEmmanuel Vadot - |+ 1745def4c47SEmmanuel Vadot #include <dt-bindings/clock/mt8173-clk.h> 1755def4c47SEmmanuel Vadot #include <dt-bindings/power/mt8173-power.h> 1765def4c47SEmmanuel Vadot 1775def4c47SEmmanuel Vadot smi_common: smi@14022000 { 1785def4c47SEmmanuel Vadot compatible = "mediatek,mt8173-smi-common"; 1795def4c47SEmmanuel Vadot reg = <0x14022000 0x1000>; 1805def4c47SEmmanuel Vadot power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>; 1815def4c47SEmmanuel Vadot clocks = <&mmsys CLK_MM_SMI_COMMON>, 1825def4c47SEmmanuel Vadot <&mmsys CLK_MM_SMI_COMMON>; 1835def4c47SEmmanuel Vadot clock-names = "apb", "smi"; 1845def4c47SEmmanuel Vadot }; 185