SMI (Smart Multimedia Interface) Common

Schema identifier ($id): "http://devicetree.org/schemas/memory-controllers/mediatek,smi-common.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Yong Wu <yong.wu@mediatek.com>"

The hardware block diagram please check bindings/iommu/mediatek,iommu.yaml

MediaTek SMI have two generations of HW architecture, here is the list which generation the SoCs use: generation 1: mt2701 and mt7623. generation 2: mt2712, mt6779, mt8167, mt8173, mt8183, mt8186, mt8188, mt8192 and mt8195.

There's slight differences between the two SMI, for generation 2, the register which control the iommu port is at each larb's register base. But for generation 1, the register is at smi ao base(smi always on register base). Besides that, the smi async clock should be prepared and enabled for SMI generation 1 to transform the smi clock into emi clock domain, but that is not needed for SMI generation 2.

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Allowed values (enum): "mediatek,mt2701-smi-common", "mediatek,mt2712-smi-common", "mediatek,mt6779-smi-common", "mediatek,mt6795-smi-common", "mediatek,mt6893-smi-common", "mediatek,mt8167-smi-common", "mediatek,mt8173-smi-common", "mediatek,mt8183-smi-common", "mediatek,mt8186-smi-common", "mediatek,mt8188-smi-common-vdo", "mediatek,mt8188-smi-common-vpp", "mediatek,mt8192-smi-common", "mediatek,mt8195-smi-common-vdo", "mediatek,mt8195-smi-common-vpp", "mediatek,mt8195-smi-sub-common", "mediatek,mt8365-smi-common"

Rule 2

for mt7623

Array item rules (items)

Item 1

Exact value (const): "mediatek,mt7623-smi-common"

Item 2

Exact value (const): "mediatek,mt2701-smi-common"

reg — required here #

Maximum number of items (maxItems): 1

power-domains — required here #

Maximum number of items (maxItems): 1

clocks — required here #

apb and smi are mandatory. the async is only for generation 1 smi HW. gals(global async local sync) also is optional, see below.

Minimum number of items (minItems): 2

Array item rules (items) #

Item 1

apb is Advanced Peripheral Bus clock, It's the clock for setting the register.

Item 2

smi is the clock for transfer data and command.

Item 3

Either asynchronous clock to help transform the smi clock into the emi clock domain on Gen1 h/w, or the path0 clock of gals.

Item 4

gals1 is the path1 clock of gals.

clock-names — required here #

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 4

mediatek,smi — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle

a phandle to the smi-common node above. Only for sub-common.

Required in this object (required): "compatible", "reg", "power-domains", "clocks", "clock-names"

All of these rules must match (allOf) #

Rule 1 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "mediatek,mt2701-smi-common"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — not listed as required here

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 3

clock-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "apb"

Item 2

Exact value (const): "smi"

Item 3

Exact value (const): "async"

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "mediatek,mt8195-smi-sub-common"

When the condition matches (then) #

Required in this object (required): "mediatek,smi"

Properties and child nodes (properties)

clocks — not listed as required here

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 3

clock-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "apb"

Item 2

Exact value (const): "smi"

Item 3

Exact value (const): "gals0"

When the condition does not match (else) #

Properties and child nodes (properties)

mediatek,smi — not listed as required here

false — Not permitted by this property rule.

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "mediatek,mt6779-smi-common", "mediatek,mt8183-smi-common", "mediatek,mt8186-smi-common", "mediatek,mt8192-smi-common", "mediatek,mt8195-smi-common-vdo", "mediatek,mt8195-smi-common-vpp", "mediatek,mt8365-smi-common"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — not listed as required here

Minimum number of items (minItems): 4

Maximum number of items (maxItems): 4

clock-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "apb"

Item 2

Exact value (const): "smi"

Item 3

Exact value (const): "gals0"

Item 4

Exact value (const): "gals1"

Rule 4 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Allowed values (enum): "mediatek,mt2712-smi-common", "mediatek,mt6795-smi-common", "mediatek,mt8167-smi-common", "mediatek,mt8173-smi-common"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — not listed as required here

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 2

clock-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "apb"

Item 2

Exact value (const): "smi"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/clock/mt8173-clk.h>
#include <dt-bindings/power/mt8173-power.h>

smi_common: smi@14022000 {
        compatible = "mediatek,mt8173-smi-common";
        reg = <0x14022000 0x1000>;
        power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
        clocks = <&mmsys CLK_MM_SMI_COMMON>,
                 <&mmsys CLK_MM_SMI_COMMON>;
        clock-names = "apb", "smi";
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Line 2: Copyright (c) 2020 MediaTek Inc.

Line 89: only for gen1 HW

Line 106: only for sub common

Line 128: for gen2 HW that have gals

Line 152: for gen2 HW that don't have gals

Edit this page