xref: /freebsd-src/sys/contrib/device-tree/Bindings/power/mediatek,power-controller.yaml (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
15def4c47SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
25def4c47SEmmanuel Vadot%YAML 1.2
35def4c47SEmmanuel Vadot---
45def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/power/mediatek,power-controller.yaml#
55def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
65def4c47SEmmanuel Vadot
75def4c47SEmmanuel Vadottitle: Mediatek Power Domains Controller
85def4c47SEmmanuel Vadot
95def4c47SEmmanuel Vadotmaintainers:
107ef62cebSEmmanuel Vadot  - MandyJH Liu <mandyjh.liu@mediatek.com>
115def4c47SEmmanuel Vadot  - Matthias Brugger <mbrugger@suse.com>
125def4c47SEmmanuel Vadot
135def4c47SEmmanuel Vadotdescription: |
145def4c47SEmmanuel Vadot  Mediatek processors include support for multiple power domains which can be
155def4c47SEmmanuel Vadot  powered up/down by software based on different application scenes to save power.
165def4c47SEmmanuel Vadot
175def4c47SEmmanuel Vadot  IP cores belonging to a power domain should contain a 'power-domains'
185def4c47SEmmanuel Vadot  property that is a phandle for SCPSYS node representing the domain.
195def4c47SEmmanuel Vadot
205def4c47SEmmanuel Vadotproperties:
215def4c47SEmmanuel Vadot  $nodename:
227ef62cebSEmmanuel Vadot    pattern: '^power-controller(@[0-9a-f]+)?$'
235def4c47SEmmanuel Vadot
245def4c47SEmmanuel Vadot  compatible:
255def4c47SEmmanuel Vadot    enum:
26b97ee269SEmmanuel Vadot      - mediatek,mt6795-power-controller
275def4c47SEmmanuel Vadot      - mediatek,mt8167-power-controller
285def4c47SEmmanuel Vadot      - mediatek,mt8173-power-controller
295def4c47SEmmanuel Vadot      - mediatek,mt8183-power-controller
30c9ccf3a3SEmmanuel Vadot      - mediatek,mt8186-power-controller
31cb7aa33aSEmmanuel Vadot      - mediatek,mt8188-power-controller
325def4c47SEmmanuel Vadot      - mediatek,mt8192-power-controller
33c9ccf3a3SEmmanuel Vadot      - mediatek,mt8195-power-controller
34*84943d6fSEmmanuel Vadot      - mediatek,mt8365-power-controller
355def4c47SEmmanuel Vadot
365def4c47SEmmanuel Vadot  '#power-domain-cells':
375def4c47SEmmanuel Vadot    const: 1
385def4c47SEmmanuel Vadot
395def4c47SEmmanuel Vadot  '#address-cells':
405def4c47SEmmanuel Vadot    const: 1
415def4c47SEmmanuel Vadot
425def4c47SEmmanuel Vadot  '#size-cells':
435def4c47SEmmanuel Vadot    const: 0
445def4c47SEmmanuel Vadot
455def4c47SEmmanuel VadotpatternProperties:
465def4c47SEmmanuel Vadot  "^power-domain@[0-9a-f]+$":
477ef62cebSEmmanuel Vadot    $ref: "#/$defs/power-domain-node"
487ef62cebSEmmanuel Vadot    patternProperties:
497ef62cebSEmmanuel Vadot      "^power-domain@[0-9a-f]+$":
507ef62cebSEmmanuel Vadot        $ref: "#/$defs/power-domain-node"
517ef62cebSEmmanuel Vadot        patternProperties:
527ef62cebSEmmanuel Vadot          "^power-domain@[0-9a-f]+$":
537ef62cebSEmmanuel Vadot            $ref: "#/$defs/power-domain-node"
547ef62cebSEmmanuel Vadot            patternProperties:
557ef62cebSEmmanuel Vadot              "^power-domain@[0-9a-f]+$":
567ef62cebSEmmanuel Vadot                $ref: "#/$defs/power-domain-node"
577ef62cebSEmmanuel Vadot                unevaluatedProperties: false
587ef62cebSEmmanuel Vadot            unevaluatedProperties: false
597ef62cebSEmmanuel Vadot        unevaluatedProperties: false
607ef62cebSEmmanuel Vadot    unevaluatedProperties: false
617ef62cebSEmmanuel Vadot
627ef62cebSEmmanuel Vadot$defs:
637ef62cebSEmmanuel Vadot  power-domain-node:
645def4c47SEmmanuel Vadot    type: object
655def4c47SEmmanuel Vadot    description: |
665def4c47SEmmanuel Vadot      Represents the power domains within the power controller node as documented
675def4c47SEmmanuel Vadot      in Documentation/devicetree/bindings/power/power-domain.yaml.
685def4c47SEmmanuel Vadot
695def4c47SEmmanuel Vadot    properties:
705def4c47SEmmanuel Vadot
715def4c47SEmmanuel Vadot      '#power-domain-cells':
725def4c47SEmmanuel Vadot        description:
735def4c47SEmmanuel Vadot          Must be 0 for nodes representing a single PM domain and 1 for nodes
745def4c47SEmmanuel Vadot          providing multiple PM domains.
755def4c47SEmmanuel Vadot
765def4c47SEmmanuel Vadot      '#address-cells':
775def4c47SEmmanuel Vadot        const: 1
785def4c47SEmmanuel Vadot
795def4c47SEmmanuel Vadot      '#size-cells':
805def4c47SEmmanuel Vadot        const: 0
815def4c47SEmmanuel Vadot
825def4c47SEmmanuel Vadot      reg:
835def4c47SEmmanuel Vadot        description: |
845def4c47SEmmanuel Vadot          Power domain index. Valid values are defined in:
85b97ee269SEmmanuel Vadot              "include/dt-bindings/power/mt6795-power.h" - for MT8167 type power domain.
865def4c47SEmmanuel Vadot              "include/dt-bindings/power/mt8167-power.h" - for MT8167 type power domain.
875def4c47SEmmanuel Vadot              "include/dt-bindings/power/mt8173-power.h" - for MT8173 type power domain.
885def4c47SEmmanuel Vadot              "include/dt-bindings/power/mt8183-power.h" - for MT8183 type power domain.
89cb7aa33aSEmmanuel Vadot              "include/dt-bindings/power/mediatek,mt8188-power.h" - for MT8188 type power domain.
905def4c47SEmmanuel Vadot              "include/dt-bindings/power/mt8192-power.h" - for MT8192 type power domain.
91c9ccf3a3SEmmanuel Vadot              "include/dt-bindings/power/mt8195-power.h" - for MT8195 type power domain.
92*84943d6fSEmmanuel Vadot              "include/dt-bindings/power/mediatek,mt8365-power.h" - for MT8365 type power domain.
935def4c47SEmmanuel Vadot        maxItems: 1
945def4c47SEmmanuel Vadot
955def4c47SEmmanuel Vadot      clocks:
965def4c47SEmmanuel Vadot        description: |
975def4c47SEmmanuel Vadot          A number of phandles to clocks that need to be enabled during domain
985def4c47SEmmanuel Vadot          power-up sequencing.
995def4c47SEmmanuel Vadot
1005def4c47SEmmanuel Vadot      clock-names:
1015def4c47SEmmanuel Vadot        description: |
1025def4c47SEmmanuel Vadot          List of names of clocks, in order to match the power-up sequencing
1035def4c47SEmmanuel Vadot          for each power domain we need to group the clocks by name. BASIC
1045def4c47SEmmanuel Vadot          clocks need to be enabled before enabling the corresponding power
1055def4c47SEmmanuel Vadot          domain, and should not have a '-' in their name (i.e mm, mfg, venc).
1065def4c47SEmmanuel Vadot          SUSBYS clocks need to be enabled before releasing the bus protection,
1075def4c47SEmmanuel Vadot          and should contain a '-' in their name (i.e mm-0, isp-0, cam-0).
1085def4c47SEmmanuel Vadot
1095def4c47SEmmanuel Vadot          In order to follow properly the power-up sequencing, the clocks must
1105def4c47SEmmanuel Vadot          be specified by order, adding first the BASIC clocks followed by the
1115def4c47SEmmanuel Vadot          SUSBSYS clocks.
1125def4c47SEmmanuel Vadot
1135def4c47SEmmanuel Vadot      domain-supply:
1145def4c47SEmmanuel Vadot        description: domain regulator supply.
1155def4c47SEmmanuel Vadot
1165def4c47SEmmanuel Vadot      mediatek,infracfg:
1175def4c47SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/phandle
1185def4c47SEmmanuel Vadot        description: phandle to the device containing the INFRACFG register range.
1195def4c47SEmmanuel Vadot
120*84943d6fSEmmanuel Vadot      mediatek,infracfg-nao:
121*84943d6fSEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/phandle
122*84943d6fSEmmanuel Vadot        description: phandle to the device containing the INFRACFG-NAO register range.
123*84943d6fSEmmanuel Vadot
1245def4c47SEmmanuel Vadot      mediatek,smi:
1255def4c47SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/phandle
1265def4c47SEmmanuel Vadot        description: phandle to the device containing the SMI register range.
1275def4c47SEmmanuel Vadot
1285def4c47SEmmanuel Vadot    required:
1295def4c47SEmmanuel Vadot      - reg
1305def4c47SEmmanuel Vadot
1315def4c47SEmmanuel Vadotrequired:
1325def4c47SEmmanuel Vadot  - compatible
1335def4c47SEmmanuel Vadot
1345def4c47SEmmanuel VadotadditionalProperties: false
1355def4c47SEmmanuel Vadot
1365def4c47SEmmanuel Vadotexamples:
1375def4c47SEmmanuel Vadot  - |
1385def4c47SEmmanuel Vadot    #include <dt-bindings/clock/mt8173-clk.h>
1395def4c47SEmmanuel Vadot    #include <dt-bindings/power/mt8173-power.h>
1405def4c47SEmmanuel Vadot
1415def4c47SEmmanuel Vadot    soc {
1425def4c47SEmmanuel Vadot        #address-cells = <2>;
1435def4c47SEmmanuel Vadot        #size-cells = <2>;
1445def4c47SEmmanuel Vadot
1455def4c47SEmmanuel Vadot        scpsys: syscon@10006000 {
1467ef62cebSEmmanuel Vadot            compatible = "mediatek,mt8173-scpsys", "syscon", "simple-mfd";
1475def4c47SEmmanuel Vadot            reg = <0 0x10006000 0 0x1000>;
1485def4c47SEmmanuel Vadot
1495def4c47SEmmanuel Vadot            spm: power-controller {
1505def4c47SEmmanuel Vadot                compatible = "mediatek,mt8173-power-controller";
1515def4c47SEmmanuel Vadot                #address-cells = <1>;
1525def4c47SEmmanuel Vadot                #size-cells = <0>;
1535def4c47SEmmanuel Vadot                #power-domain-cells = <1>;
1545def4c47SEmmanuel Vadot
1555def4c47SEmmanuel Vadot                /* power domains of the SoC */
1565def4c47SEmmanuel Vadot                power-domain@MT8173_POWER_DOMAIN_VDEC {
1575def4c47SEmmanuel Vadot                    reg = <MT8173_POWER_DOMAIN_VDEC>;
1585def4c47SEmmanuel Vadot                    clocks = <&topckgen CLK_TOP_MM_SEL>;
1595def4c47SEmmanuel Vadot                    clock-names = "mm";
1605def4c47SEmmanuel Vadot                    #power-domain-cells = <0>;
1615def4c47SEmmanuel Vadot                };
1625def4c47SEmmanuel Vadot                power-domain@MT8173_POWER_DOMAIN_VENC {
1635def4c47SEmmanuel Vadot                    reg = <MT8173_POWER_DOMAIN_VENC>;
1645def4c47SEmmanuel Vadot                    clocks = <&topckgen CLK_TOP_MM_SEL>,
1655def4c47SEmmanuel Vadot                             <&topckgen CLK_TOP_VENC_SEL>;
1665def4c47SEmmanuel Vadot                    clock-names = "mm", "venc";
1675def4c47SEmmanuel Vadot                    #power-domain-cells = <0>;
1685def4c47SEmmanuel Vadot                };
1695def4c47SEmmanuel Vadot                power-domain@MT8173_POWER_DOMAIN_ISP {
1705def4c47SEmmanuel Vadot                    reg = <MT8173_POWER_DOMAIN_ISP>;
1715def4c47SEmmanuel Vadot                    clocks = <&topckgen CLK_TOP_MM_SEL>;
1725def4c47SEmmanuel Vadot                    clock-names = "mm";
1735def4c47SEmmanuel Vadot                    #power-domain-cells = <0>;
1745def4c47SEmmanuel Vadot                };
1755def4c47SEmmanuel Vadot                power-domain@MT8173_POWER_DOMAIN_MM {
1765def4c47SEmmanuel Vadot                    reg = <MT8173_POWER_DOMAIN_MM>;
1775def4c47SEmmanuel Vadot                    clocks = <&topckgen CLK_TOP_MM_SEL>;
1785def4c47SEmmanuel Vadot                    clock-names = "mm";
1795def4c47SEmmanuel Vadot                    #power-domain-cells = <0>;
1805def4c47SEmmanuel Vadot                    mediatek,infracfg = <&infracfg>;
1815def4c47SEmmanuel Vadot                };
1825def4c47SEmmanuel Vadot                power-domain@MT8173_POWER_DOMAIN_VENC_LT {
1835def4c47SEmmanuel Vadot                    reg = <MT8173_POWER_DOMAIN_VENC_LT>;
1845def4c47SEmmanuel Vadot                    clocks = <&topckgen CLK_TOP_MM_SEL>,
1855def4c47SEmmanuel Vadot                             <&topckgen CLK_TOP_VENC_LT_SEL>;
1865def4c47SEmmanuel Vadot                    clock-names = "mm", "venclt";
1875def4c47SEmmanuel Vadot                    #power-domain-cells = <0>;
1885def4c47SEmmanuel Vadot                };
1895def4c47SEmmanuel Vadot                power-domain@MT8173_POWER_DOMAIN_AUDIO {
1905def4c47SEmmanuel Vadot                    reg = <MT8173_POWER_DOMAIN_AUDIO>;
1915def4c47SEmmanuel Vadot                    #power-domain-cells = <0>;
1925def4c47SEmmanuel Vadot                };
1935def4c47SEmmanuel Vadot                power-domain@MT8173_POWER_DOMAIN_USB {
1945def4c47SEmmanuel Vadot                    reg = <MT8173_POWER_DOMAIN_USB>;
1955def4c47SEmmanuel Vadot                    #power-domain-cells = <0>;
1965def4c47SEmmanuel Vadot                };
1975def4c47SEmmanuel Vadot                power-domain@MT8173_POWER_DOMAIN_MFG_ASYNC {
1985def4c47SEmmanuel Vadot                    reg = <MT8173_POWER_DOMAIN_MFG_ASYNC>;
1995def4c47SEmmanuel Vadot                    clocks = <&clk26m>;
2005def4c47SEmmanuel Vadot                    clock-names = "mfg";
2015def4c47SEmmanuel Vadot                    #address-cells = <1>;
2025def4c47SEmmanuel Vadot                    #size-cells = <0>;
2035def4c47SEmmanuel Vadot                    #power-domain-cells = <1>;
2045def4c47SEmmanuel Vadot
2055def4c47SEmmanuel Vadot                    power-domain@MT8173_POWER_DOMAIN_MFG_2D {
2065def4c47SEmmanuel Vadot                        reg = <MT8173_POWER_DOMAIN_MFG_2D>;
2075def4c47SEmmanuel Vadot                        #address-cells = <1>;
2085def4c47SEmmanuel Vadot                        #size-cells = <0>;
2095def4c47SEmmanuel Vadot                        #power-domain-cells = <1>;
2105def4c47SEmmanuel Vadot
2115def4c47SEmmanuel Vadot                        power-domain@MT8173_POWER_DOMAIN_MFG {
2125def4c47SEmmanuel Vadot                            reg = <MT8173_POWER_DOMAIN_MFG>;
2135def4c47SEmmanuel Vadot                            #power-domain-cells = <0>;
2145def4c47SEmmanuel Vadot                            mediatek,infracfg = <&infracfg>;
2155def4c47SEmmanuel Vadot                        };
2165def4c47SEmmanuel Vadot                    };
2175def4c47SEmmanuel Vadot                };
2185def4c47SEmmanuel Vadot            };
2195def4c47SEmmanuel Vadot        };
2205def4c47SEmmanuel Vadot    };
221