1d392fe78SEnric Balletbo i Serra# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2d392fe78SEnric Balletbo i Serra%YAML 1.2 3d392fe78SEnric Balletbo i Serra--- 4d392fe78SEnric Balletbo i Serra$id: http://devicetree.org/schemas/power/mediatek,power-controller.yaml# 5d392fe78SEnric Balletbo i Serra$schema: http://devicetree.org/meta-schemas/core.yaml# 6d392fe78SEnric Balletbo i Serra 7d392fe78SEnric Balletbo i Serratitle: Mediatek Power Domains Controller 8d392fe78SEnric Balletbo i Serra 9d392fe78SEnric Balletbo i Serramaintainers: 101fedd6beSTinghan Shen - MandyJH Liu <mandyjh.liu@mediatek.com> 11d392fe78SEnric Balletbo i Serra - Matthias Brugger <mbrugger@suse.com> 12d392fe78SEnric Balletbo i Serra 13d392fe78SEnric Balletbo i Serradescription: | 14d392fe78SEnric Balletbo i Serra Mediatek processors include support for multiple power domains which can be 15d392fe78SEnric Balletbo i Serra powered up/down by software based on different application scenes to save power. 16d392fe78SEnric Balletbo i Serra 17d392fe78SEnric Balletbo i Serra IP cores belonging to a power domain should contain a 'power-domains' 18d392fe78SEnric Balletbo i Serra property that is a phandle for SCPSYS node representing the domain. 19d392fe78SEnric Balletbo i Serra 20d392fe78SEnric Balletbo i Serraproperties: 21d392fe78SEnric Balletbo i Serra $nodename: 226e464f8bSTinghan Shen pattern: '^power-controller(@[0-9a-f]+)?$' 23d392fe78SEnric Balletbo i Serra 24d392fe78SEnric Balletbo i Serra compatible: 25d392fe78SEnric Balletbo i Serra enum: 262b48db01SAngeloGioacchino Del Regno - mediatek,mt6795-power-controller 27c70d0f16SFabien Parent - mediatek,mt8167-power-controller 28d392fe78SEnric Balletbo i Serra - mediatek,mt8173-power-controller 2986a378bbSEnric Balletbo i Serra - mediatek,mt8183-power-controller 30c8a00689SChun-Jie Chen - mediatek,mt8186-power-controller 31*1725dde8SGarmin.Chang - mediatek,mt8188-power-controller 32343106d9SWeiyi Lu - mediatek,mt8192-power-controller 3373c022e1SChun-Jie Chen - mediatek,mt8195-power-controller 34d392fe78SEnric Balletbo i Serra 35d392fe78SEnric Balletbo i Serra '#power-domain-cells': 36d392fe78SEnric Balletbo i Serra const: 1 37d392fe78SEnric Balletbo i Serra 38d392fe78SEnric Balletbo i Serra '#address-cells': 39d392fe78SEnric Balletbo i Serra const: 1 40d392fe78SEnric Balletbo i Serra 41d392fe78SEnric Balletbo i Serra '#size-cells': 42d392fe78SEnric Balletbo i Serra const: 0 43d392fe78SEnric Balletbo i Serra 44d392fe78SEnric Balletbo i SerrapatternProperties: 45d392fe78SEnric Balletbo i Serra "^power-domain@[0-9a-f]+$": 463431c92fSTinghan Shen $ref: "#/$defs/power-domain-node" 473431c92fSTinghan Shen patternProperties: 483431c92fSTinghan Shen "^power-domain@[0-9a-f]+$": 493431c92fSTinghan Shen $ref: "#/$defs/power-domain-node" 503431c92fSTinghan Shen patternProperties: 513431c92fSTinghan Shen "^power-domain@[0-9a-f]+$": 523431c92fSTinghan Shen $ref: "#/$defs/power-domain-node" 533431c92fSTinghan Shen patternProperties: 543431c92fSTinghan Shen "^power-domain@[0-9a-f]+$": 553431c92fSTinghan Shen $ref: "#/$defs/power-domain-node" 563431c92fSTinghan Shen unevaluatedProperties: false 573431c92fSTinghan Shen unevaluatedProperties: false 583431c92fSTinghan Shen unevaluatedProperties: false 593431c92fSTinghan Shen unevaluatedProperties: false 603431c92fSTinghan Shen 613431c92fSTinghan Shen$defs: 623431c92fSTinghan Shen power-domain-node: 63d392fe78SEnric Balletbo i Serra type: object 64d392fe78SEnric Balletbo i Serra description: | 65d392fe78SEnric Balletbo i Serra Represents the power domains within the power controller node as documented 66d392fe78SEnric Balletbo i Serra in Documentation/devicetree/bindings/power/power-domain.yaml. 67d392fe78SEnric Balletbo i Serra 68d392fe78SEnric Balletbo i Serra properties: 69d392fe78SEnric Balletbo i Serra 70d392fe78SEnric Balletbo i Serra '#power-domain-cells': 71d392fe78SEnric Balletbo i Serra description: 72d392fe78SEnric Balletbo i Serra Must be 0 for nodes representing a single PM domain and 1 for nodes 73d392fe78SEnric Balletbo i Serra providing multiple PM domains. 74d392fe78SEnric Balletbo i Serra 75d392fe78SEnric Balletbo i Serra '#address-cells': 76d392fe78SEnric Balletbo i Serra const: 1 77d392fe78SEnric Balletbo i Serra 78d392fe78SEnric Balletbo i Serra '#size-cells': 79d392fe78SEnric Balletbo i Serra const: 0 80d392fe78SEnric Balletbo i Serra 81d392fe78SEnric Balletbo i Serra reg: 82d392fe78SEnric Balletbo i Serra description: | 83d392fe78SEnric Balletbo i Serra Power domain index. Valid values are defined in: 842b48db01SAngeloGioacchino Del Regno "include/dt-bindings/power/mt6795-power.h" - for MT8167 type power domain. 85c70d0f16SFabien Parent "include/dt-bindings/power/mt8167-power.h" - for MT8167 type power domain. 86d392fe78SEnric Balletbo i Serra "include/dt-bindings/power/mt8173-power.h" - for MT8173 type power domain. 8786a378bbSEnric Balletbo i Serra "include/dt-bindings/power/mt8183-power.h" - for MT8183 type power domain. 88*1725dde8SGarmin.Chang "include/dt-bindings/power/mediatek,mt8188-power.h" - for MT8188 type power domain. 89343106d9SWeiyi Lu "include/dt-bindings/power/mt8192-power.h" - for MT8192 type power domain. 9073c022e1SChun-Jie Chen "include/dt-bindings/power/mt8195-power.h" - for MT8195 type power domain. 91d392fe78SEnric Balletbo i Serra maxItems: 1 92d392fe78SEnric Balletbo i Serra 93d392fe78SEnric Balletbo i Serra clocks: 94d392fe78SEnric Balletbo i Serra description: | 95d392fe78SEnric Balletbo i Serra A number of phandles to clocks that need to be enabled during domain 96d392fe78SEnric Balletbo i Serra power-up sequencing. 97d392fe78SEnric Balletbo i Serra 98d392fe78SEnric Balletbo i Serra clock-names: 99d392fe78SEnric Balletbo i Serra description: | 100d392fe78SEnric Balletbo i Serra List of names of clocks, in order to match the power-up sequencing 101d392fe78SEnric Balletbo i Serra for each power domain we need to group the clocks by name. BASIC 102d392fe78SEnric Balletbo i Serra clocks need to be enabled before enabling the corresponding power 103d392fe78SEnric Balletbo i Serra domain, and should not have a '-' in their name (i.e mm, mfg, venc). 104d392fe78SEnric Balletbo i Serra SUSBYS clocks need to be enabled before releasing the bus protection, 105d392fe78SEnric Balletbo i Serra and should contain a '-' in their name (i.e mm-0, isp-0, cam-0). 106d392fe78SEnric Balletbo i Serra 107d392fe78SEnric Balletbo i Serra In order to follow properly the power-up sequencing, the clocks must 108d392fe78SEnric Balletbo i Serra be specified by order, adding first the BASIC clocks followed by the 109d392fe78SEnric Balletbo i Serra SUSBSYS clocks. 110d392fe78SEnric Balletbo i Serra 111ebfe73f7SHsin-Yi Wang domain-supply: 112ebfe73f7SHsin-Yi Wang description: domain regulator supply. 113d392fe78SEnric Balletbo i Serra 114d392fe78SEnric Balletbo i Serra mediatek,infracfg: 115d69c6dddSRob Herring $ref: /schemas/types.yaml#/definitions/phandle 116d392fe78SEnric Balletbo i Serra description: phandle to the device containing the INFRACFG register range. 117d392fe78SEnric Balletbo i Serra 118d392fe78SEnric Balletbo i Serra mediatek,smi: 119d69c6dddSRob Herring $ref: /schemas/types.yaml#/definitions/phandle 120d392fe78SEnric Balletbo i Serra description: phandle to the device containing the SMI register range. 121d392fe78SEnric Balletbo i Serra 122d392fe78SEnric Balletbo i Serra required: 123d392fe78SEnric Balletbo i Serra - reg 124d392fe78SEnric Balletbo i Serra 125d392fe78SEnric Balletbo i Serrarequired: 126d392fe78SEnric Balletbo i Serra - compatible 127d392fe78SEnric Balletbo i Serra 128d392fe78SEnric Balletbo i SerraadditionalProperties: false 129d392fe78SEnric Balletbo i Serra 130d392fe78SEnric Balletbo i Serraexamples: 131d392fe78SEnric Balletbo i Serra - | 132d392fe78SEnric Balletbo i Serra #include <dt-bindings/clock/mt8173-clk.h> 133d392fe78SEnric Balletbo i Serra #include <dt-bindings/power/mt8173-power.h> 134d392fe78SEnric Balletbo i Serra 135d392fe78SEnric Balletbo i Serra soc { 136d392fe78SEnric Balletbo i Serra #address-cells = <2>; 137d392fe78SEnric Balletbo i Serra #size-cells = <2>; 138d392fe78SEnric Balletbo i Serra 139d392fe78SEnric Balletbo i Serra scpsys: syscon@10006000 { 14026331d26STinghan Shen compatible = "mediatek,mt8173-scpsys", "syscon", "simple-mfd"; 141d392fe78SEnric Balletbo i Serra reg = <0 0x10006000 0 0x1000>; 142d392fe78SEnric Balletbo i Serra 143d392fe78SEnric Balletbo i Serra spm: power-controller { 144d392fe78SEnric Balletbo i Serra compatible = "mediatek,mt8173-power-controller"; 145d392fe78SEnric Balletbo i Serra #address-cells = <1>; 146d392fe78SEnric Balletbo i Serra #size-cells = <0>; 147d392fe78SEnric Balletbo i Serra #power-domain-cells = <1>; 148d392fe78SEnric Balletbo i Serra 149d392fe78SEnric Balletbo i Serra /* power domains of the SoC */ 150d392fe78SEnric Balletbo i Serra power-domain@MT8173_POWER_DOMAIN_VDEC { 151d392fe78SEnric Balletbo i Serra reg = <MT8173_POWER_DOMAIN_VDEC>; 152d392fe78SEnric Balletbo i Serra clocks = <&topckgen CLK_TOP_MM_SEL>; 153d392fe78SEnric Balletbo i Serra clock-names = "mm"; 154d392fe78SEnric Balletbo i Serra #power-domain-cells = <0>; 155d392fe78SEnric Balletbo i Serra }; 156d392fe78SEnric Balletbo i Serra power-domain@MT8173_POWER_DOMAIN_VENC { 157d392fe78SEnric Balletbo i Serra reg = <MT8173_POWER_DOMAIN_VENC>; 158d392fe78SEnric Balletbo i Serra clocks = <&topckgen CLK_TOP_MM_SEL>, 159d392fe78SEnric Balletbo i Serra <&topckgen CLK_TOP_VENC_SEL>; 160d392fe78SEnric Balletbo i Serra clock-names = "mm", "venc"; 161d392fe78SEnric Balletbo i Serra #power-domain-cells = <0>; 162d392fe78SEnric Balletbo i Serra }; 163d392fe78SEnric Balletbo i Serra power-domain@MT8173_POWER_DOMAIN_ISP { 164d392fe78SEnric Balletbo i Serra reg = <MT8173_POWER_DOMAIN_ISP>; 165d392fe78SEnric Balletbo i Serra clocks = <&topckgen CLK_TOP_MM_SEL>; 166d392fe78SEnric Balletbo i Serra clock-names = "mm"; 167d392fe78SEnric Balletbo i Serra #power-domain-cells = <0>; 168d392fe78SEnric Balletbo i Serra }; 169d392fe78SEnric Balletbo i Serra power-domain@MT8173_POWER_DOMAIN_MM { 170d392fe78SEnric Balletbo i Serra reg = <MT8173_POWER_DOMAIN_MM>; 171d392fe78SEnric Balletbo i Serra clocks = <&topckgen CLK_TOP_MM_SEL>; 172d392fe78SEnric Balletbo i Serra clock-names = "mm"; 173d392fe78SEnric Balletbo i Serra #power-domain-cells = <0>; 174d392fe78SEnric Balletbo i Serra mediatek,infracfg = <&infracfg>; 175d392fe78SEnric Balletbo i Serra }; 176d392fe78SEnric Balletbo i Serra power-domain@MT8173_POWER_DOMAIN_VENC_LT { 177d392fe78SEnric Balletbo i Serra reg = <MT8173_POWER_DOMAIN_VENC_LT>; 178d392fe78SEnric Balletbo i Serra clocks = <&topckgen CLK_TOP_MM_SEL>, 179d392fe78SEnric Balletbo i Serra <&topckgen CLK_TOP_VENC_LT_SEL>; 180d392fe78SEnric Balletbo i Serra clock-names = "mm", "venclt"; 181d392fe78SEnric Balletbo i Serra #power-domain-cells = <0>; 182d392fe78SEnric Balletbo i Serra }; 183d392fe78SEnric Balletbo i Serra power-domain@MT8173_POWER_DOMAIN_AUDIO { 184d392fe78SEnric Balletbo i Serra reg = <MT8173_POWER_DOMAIN_AUDIO>; 185d392fe78SEnric Balletbo i Serra #power-domain-cells = <0>; 186d392fe78SEnric Balletbo i Serra }; 187d392fe78SEnric Balletbo i Serra power-domain@MT8173_POWER_DOMAIN_USB { 188d392fe78SEnric Balletbo i Serra reg = <MT8173_POWER_DOMAIN_USB>; 189d392fe78SEnric Balletbo i Serra #power-domain-cells = <0>; 190d392fe78SEnric Balletbo i Serra }; 191d392fe78SEnric Balletbo i Serra power-domain@MT8173_POWER_DOMAIN_MFG_ASYNC { 192d392fe78SEnric Balletbo i Serra reg = <MT8173_POWER_DOMAIN_MFG_ASYNC>; 193d392fe78SEnric Balletbo i Serra clocks = <&clk26m>; 194d392fe78SEnric Balletbo i Serra clock-names = "mfg"; 195d392fe78SEnric Balletbo i Serra #address-cells = <1>; 196d392fe78SEnric Balletbo i Serra #size-cells = <0>; 197d392fe78SEnric Balletbo i Serra #power-domain-cells = <1>; 198d392fe78SEnric Balletbo i Serra 199d392fe78SEnric Balletbo i Serra power-domain@MT8173_POWER_DOMAIN_MFG_2D { 200d392fe78SEnric Balletbo i Serra reg = <MT8173_POWER_DOMAIN_MFG_2D>; 201d392fe78SEnric Balletbo i Serra #address-cells = <1>; 202d392fe78SEnric Balletbo i Serra #size-cells = <0>; 203d392fe78SEnric Balletbo i Serra #power-domain-cells = <1>; 204d392fe78SEnric Balletbo i Serra 205d392fe78SEnric Balletbo i Serra power-domain@MT8173_POWER_DOMAIN_MFG { 206d392fe78SEnric Balletbo i Serra reg = <MT8173_POWER_DOMAIN_MFG>; 207d392fe78SEnric Balletbo i Serra #power-domain-cells = <0>; 208d392fe78SEnric Balletbo i Serra mediatek,infracfg = <&infracfg>; 209d392fe78SEnric Balletbo i Serra }; 210d392fe78SEnric Balletbo i Serra }; 211d392fe78SEnric Balletbo i Serra }; 212d392fe78SEnric Balletbo i Serra }; 213d392fe78SEnric Balletbo i Serra }; 214d392fe78SEnric Balletbo i Serra }; 215