18c2ecf20Sopenharmony_ciSMI (Smart Multimedia Interface) Common
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThe hardware block diagram please check bindings/iommu/mediatek,iommu.txt
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ciMediatek SMI have two generations of HW architecture, here is the list
68c2ecf20Sopenharmony_ciwhich generation the SoCs use:
78c2ecf20Sopenharmony_cigeneration 1: mt2701 and mt7623.
88c2ecf20Sopenharmony_cigeneration 2: mt2712, mt6779, mt8167, mt8173 and mt8183.
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciThere's slight differences between the two SMI, for generation 2, the
118c2ecf20Sopenharmony_ciregister which control the iommu port is at each larb's register base. But
128c2ecf20Sopenharmony_cifor generation 1, the register is at smi ao base(smi always on register
138c2ecf20Sopenharmony_cibase). Besides that, the smi async clock should be prepared and enabled for
148c2ecf20Sopenharmony_ciSMI generation 1 to transform the smi clock into emi clock domain, but that is
158c2ecf20Sopenharmony_cinot needed for SMI generation 2.
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ciRequired properties:
188c2ecf20Sopenharmony_ci- compatible : must be one of :
198c2ecf20Sopenharmony_ci	"mediatek,mt2701-smi-common"
208c2ecf20Sopenharmony_ci	"mediatek,mt2712-smi-common"
218c2ecf20Sopenharmony_ci	"mediatek,mt6779-smi-common"
228c2ecf20Sopenharmony_ci	"mediatek,mt7623-smi-common", "mediatek,mt2701-smi-common"
238c2ecf20Sopenharmony_ci	"mediatek,mt8167-smi-common"
248c2ecf20Sopenharmony_ci	"mediatek,mt8173-smi-common"
258c2ecf20Sopenharmony_ci	"mediatek,mt8183-smi-common"
268c2ecf20Sopenharmony_ci- reg : the register and size of the SMI block.
278c2ecf20Sopenharmony_ci- power-domains : a phandle to the power domain of this local arbiter.
288c2ecf20Sopenharmony_ci- clocks : Must contain an entry for each entry in clock-names.
298c2ecf20Sopenharmony_ci- clock-names : must contain 3 entries for generation 1 smi HW and 2 entries
308c2ecf20Sopenharmony_ci  for generation 2 smi HW as follows:
318c2ecf20Sopenharmony_ci  - "apb" : Advanced Peripheral Bus clock, It's the clock for setting
328c2ecf20Sopenharmony_ci	    the register.
338c2ecf20Sopenharmony_ci  - "smi" : It's the clock for transfer data and command.
348c2ecf20Sopenharmony_ci	    They may be the same if both source clocks are the same.
358c2ecf20Sopenharmony_ci  - "async" : asynchronous clock, it help transform the smi clock into the emi
368c2ecf20Sopenharmony_ci	      clock domain, this clock is only needed by generation 1 smi HW.
378c2ecf20Sopenharmony_ci  and these 2 option clocks for generation 2 smi HW:
388c2ecf20Sopenharmony_ci  - "gals0": the path0 clock of GALS(Global Async Local Sync).
398c2ecf20Sopenharmony_ci  - "gals1": the path1 clock of GALS(Global Async Local Sync).
408c2ecf20Sopenharmony_ci  Here is the list which has this GALS: mt6779 and mt8183.
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ciExample:
438c2ecf20Sopenharmony_ci	smi_common: smi@14022000 {
448c2ecf20Sopenharmony_ci		compatible = "mediatek,mt8173-smi-common";
458c2ecf20Sopenharmony_ci		reg = <0 0x14022000 0 0x1000>;
468c2ecf20Sopenharmony_ci		power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
478c2ecf20Sopenharmony_ci		clocks = <&mmsys CLK_MM_SMI_COMMON>,
488c2ecf20Sopenharmony_ci			 <&mmsys CLK_MM_SMI_COMMON>;
498c2ecf20Sopenharmony_ci		clock-names = "apb", "smi";
508c2ecf20Sopenharmony_ci	};
51