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: 10d392fe78SEnric Balletbo i Serra - Weiyi Lu <weiyi.lu@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: 22d392fe78SEnric Balletbo i Serra const: power-controller 23d392fe78SEnric Balletbo i Serra 24d392fe78SEnric Balletbo i Serra compatible: 25d392fe78SEnric Balletbo i Serra enum: 26*c70d0f16SFabien Parent - mediatek,mt8167-power-controller 27d392fe78SEnric Balletbo i Serra - mediatek,mt8173-power-controller 2886a378bbSEnric Balletbo i Serra - mediatek,mt8183-power-controller 29343106d9SWeiyi Lu - mediatek,mt8192-power-controller 30d392fe78SEnric Balletbo i Serra 31d392fe78SEnric Balletbo i Serra '#power-domain-cells': 32d392fe78SEnric Balletbo i Serra const: 1 33d392fe78SEnric Balletbo i Serra 34d392fe78SEnric Balletbo i Serra '#address-cells': 35d392fe78SEnric Balletbo i Serra const: 1 36d392fe78SEnric Balletbo i Serra 37d392fe78SEnric Balletbo i Serra '#size-cells': 38d392fe78SEnric Balletbo i Serra const: 0 39d392fe78SEnric Balletbo i Serra 40d392fe78SEnric Balletbo i SerrapatternProperties: 41d392fe78SEnric Balletbo i Serra "^power-domain@[0-9a-f]+$": 42d392fe78SEnric Balletbo i Serra type: object 43d392fe78SEnric Balletbo i Serra description: | 44d392fe78SEnric Balletbo i Serra Represents the power domains within the power controller node as documented 45d392fe78SEnric Balletbo i Serra in Documentation/devicetree/bindings/power/power-domain.yaml. 46d392fe78SEnric Balletbo i Serra 47d392fe78SEnric Balletbo i Serra properties: 48d392fe78SEnric Balletbo i Serra 49d392fe78SEnric Balletbo i Serra '#power-domain-cells': 50d392fe78SEnric Balletbo i Serra description: 51d392fe78SEnric Balletbo i Serra Must be 0 for nodes representing a single PM domain and 1 for nodes 52d392fe78SEnric Balletbo i Serra providing multiple PM domains. 53d392fe78SEnric Balletbo i Serra 54d392fe78SEnric Balletbo i Serra '#address-cells': 55d392fe78SEnric Balletbo i Serra const: 1 56d392fe78SEnric Balletbo i Serra 57d392fe78SEnric Balletbo i Serra '#size-cells': 58d392fe78SEnric Balletbo i Serra const: 0 59d392fe78SEnric Balletbo i Serra 60d392fe78SEnric Balletbo i Serra reg: 61d392fe78SEnric Balletbo i Serra description: | 62d392fe78SEnric Balletbo i Serra Power domain index. Valid values are defined in: 63*c70d0f16SFabien Parent "include/dt-bindings/power/mt8167-power.h" - for MT8167 type power domain. 64d392fe78SEnric Balletbo i Serra "include/dt-bindings/power/mt8173-power.h" - for MT8173 type power domain. 6586a378bbSEnric Balletbo i Serra "include/dt-bindings/power/mt8183-power.h" - for MT8183 type power domain. 66343106d9SWeiyi Lu "include/dt-bindings/power/mt8192-power.h" - for MT8192 type power domain. 67d392fe78SEnric Balletbo i Serra maxItems: 1 68d392fe78SEnric Balletbo i Serra 69d392fe78SEnric Balletbo i Serra clocks: 70d392fe78SEnric Balletbo i Serra description: | 71d392fe78SEnric Balletbo i Serra A number of phandles to clocks that need to be enabled during domain 72d392fe78SEnric Balletbo i Serra power-up sequencing. 73d392fe78SEnric Balletbo i Serra 74d392fe78SEnric Balletbo i Serra clock-names: 75d392fe78SEnric Balletbo i Serra description: | 76d392fe78SEnric Balletbo i Serra List of names of clocks, in order to match the power-up sequencing 77d392fe78SEnric Balletbo i Serra for each power domain we need to group the clocks by name. BASIC 78d392fe78SEnric Balletbo i Serra clocks need to be enabled before enabling the corresponding power 79d392fe78SEnric Balletbo i Serra domain, and should not have a '-' in their name (i.e mm, mfg, venc). 80d392fe78SEnric Balletbo i Serra SUSBYS clocks need to be enabled before releasing the bus protection, 81d392fe78SEnric Balletbo i Serra and should contain a '-' in their name (i.e mm-0, isp-0, cam-0). 82d392fe78SEnric Balletbo i Serra 83d392fe78SEnric Balletbo i Serra In order to follow properly the power-up sequencing, the clocks must 84d392fe78SEnric Balletbo i Serra be specified by order, adding first the BASIC clocks followed by the 85d392fe78SEnric Balletbo i Serra SUSBSYS clocks. 86d392fe78SEnric Balletbo i Serra 87d392fe78SEnric Balletbo i Serra mediatek,infracfg: 88d69c6dddSRob Herring $ref: /schemas/types.yaml#/definitions/phandle 89d392fe78SEnric Balletbo i Serra description: phandle to the device containing the INFRACFG register range. 90d392fe78SEnric Balletbo i Serra 91d392fe78SEnric Balletbo i Serra mediatek,smi: 92d69c6dddSRob Herring $ref: /schemas/types.yaml#/definitions/phandle 93d392fe78SEnric Balletbo i Serra description: phandle to the device containing the SMI register range. 94d392fe78SEnric Balletbo i Serra 95d392fe78SEnric Balletbo i Serra patternProperties: 96d392fe78SEnric Balletbo i Serra "^power-domain@[0-9a-f]+$": 97d392fe78SEnric Balletbo i Serra type: object 98d392fe78SEnric Balletbo i Serra description: | 99d392fe78SEnric Balletbo i Serra Represents a power domain child within a power domain parent node. 100d392fe78SEnric Balletbo i Serra 101d392fe78SEnric Balletbo i Serra properties: 102d392fe78SEnric Balletbo i Serra 103d392fe78SEnric Balletbo i Serra '#power-domain-cells': 104d392fe78SEnric Balletbo i Serra description: 105d392fe78SEnric Balletbo i Serra Must be 0 for nodes representing a single PM domain and 1 for nodes 106d392fe78SEnric Balletbo i Serra providing multiple PM domains. 107d392fe78SEnric Balletbo i Serra 108d392fe78SEnric Balletbo i Serra '#address-cells': 109d392fe78SEnric Balletbo i Serra const: 1 110d392fe78SEnric Balletbo i Serra 111d392fe78SEnric Balletbo i Serra '#size-cells': 112d392fe78SEnric Balletbo i Serra const: 0 113d392fe78SEnric Balletbo i Serra 114d392fe78SEnric Balletbo i Serra reg: 115d392fe78SEnric Balletbo i Serra maxItems: 1 116d392fe78SEnric Balletbo i Serra 117d392fe78SEnric Balletbo i Serra clocks: 118d392fe78SEnric Balletbo i Serra description: | 119d392fe78SEnric Balletbo i Serra A number of phandles to clocks that need to be enabled during domain 120d392fe78SEnric Balletbo i Serra power-up sequencing. 121d392fe78SEnric Balletbo i Serra 122d392fe78SEnric Balletbo i Serra clock-names: 123d392fe78SEnric Balletbo i Serra description: | 124d392fe78SEnric Balletbo i Serra List of names of clocks, in order to match the power-up sequencing 125d392fe78SEnric Balletbo i Serra for each power domain we need to group the clocks by name. BASIC 126d392fe78SEnric Balletbo i Serra clocks need to be enabled before enabling the corresponding power 127d392fe78SEnric Balletbo i Serra domain, and should not have a '-' in their name (i.e mm, mfg, venc). 128d392fe78SEnric Balletbo i Serra SUSBYS clocks need to be enabled before releasing the bus protection, 129d392fe78SEnric Balletbo i Serra and should contain a '-' in their name (i.e mm-0, isp-0, cam-0). 130d392fe78SEnric Balletbo i Serra 131d392fe78SEnric Balletbo i Serra In order to follow properly the power-up sequencing, the clocks must 132d392fe78SEnric Balletbo i Serra be specified by order, adding first the BASIC clocks followed by the 133d392fe78SEnric Balletbo i Serra SUSBSYS clocks. 134d392fe78SEnric Balletbo i Serra 135d392fe78SEnric Balletbo i Serra mediatek,infracfg: 136d69c6dddSRob Herring $ref: /schemas/types.yaml#/definitions/phandle 137d392fe78SEnric Balletbo i Serra description: phandle to the device containing the INFRACFG register range. 138d392fe78SEnric Balletbo i Serra 139d392fe78SEnric Balletbo i Serra mediatek,smi: 140d69c6dddSRob Herring $ref: /schemas/types.yaml#/definitions/phandle 141d392fe78SEnric Balletbo i Serra description: phandle to the device containing the SMI register range. 142d392fe78SEnric Balletbo i Serra 143d392fe78SEnric Balletbo i Serra patternProperties: 144d392fe78SEnric Balletbo i Serra "^power-domain@[0-9a-f]+$": 145d392fe78SEnric Balletbo i Serra type: object 146d392fe78SEnric Balletbo i Serra description: | 147d392fe78SEnric Balletbo i Serra Represents a power domain child within a power domain parent node. 148d392fe78SEnric Balletbo i Serra 149d392fe78SEnric Balletbo i Serra properties: 150d392fe78SEnric Balletbo i Serra 151d392fe78SEnric Balletbo i Serra '#power-domain-cells': 152d392fe78SEnric Balletbo i Serra description: 153d392fe78SEnric Balletbo i Serra Must be 0 for nodes representing a single PM domain and 1 for nodes 154d392fe78SEnric Balletbo i Serra providing multiple PM domains. 155d392fe78SEnric Balletbo i Serra 156d392fe78SEnric Balletbo i Serra '#address-cells': 157d392fe78SEnric Balletbo i Serra const: 1 158d392fe78SEnric Balletbo i Serra 159d392fe78SEnric Balletbo i Serra '#size-cells': 160d392fe78SEnric Balletbo i Serra const: 0 161d392fe78SEnric Balletbo i Serra 162d392fe78SEnric Balletbo i Serra reg: 163d392fe78SEnric Balletbo i Serra maxItems: 1 164d392fe78SEnric Balletbo i Serra 165d392fe78SEnric Balletbo i Serra clocks: 166d392fe78SEnric Balletbo i Serra description: | 167d392fe78SEnric Balletbo i Serra A number of phandles to clocks that need to be enabled during domain 168d392fe78SEnric Balletbo i Serra power-up sequencing. 169d392fe78SEnric Balletbo i Serra 170d392fe78SEnric Balletbo i Serra clock-names: 171d392fe78SEnric Balletbo i Serra description: | 172d392fe78SEnric Balletbo i Serra List of names of clocks, in order to match the power-up sequencing 173d392fe78SEnric Balletbo i Serra for each power domain we need to group the clocks by name. BASIC 174d392fe78SEnric Balletbo i Serra clocks need to be enabled before enabling the corresponding power 175d392fe78SEnric Balletbo i Serra domain, and should not have a '-' in their name (i.e mm, mfg, venc). 176d392fe78SEnric Balletbo i Serra SUSBYS clocks need to be enabled before releasing the bus protection, 177d392fe78SEnric Balletbo i Serra and should contain a '-' in their name (i.e mm-0, isp-0, cam-0). 178d392fe78SEnric Balletbo i Serra 179d392fe78SEnric Balletbo i Serra In order to follow properly the power-up sequencing, the clocks must 180d392fe78SEnric Balletbo i Serra be specified by order, adding first the BASIC clocks followed by the 181d392fe78SEnric Balletbo i Serra SUSBSYS clocks. 182d392fe78SEnric Balletbo i Serra 183d392fe78SEnric Balletbo i Serra mediatek,infracfg: 184d69c6dddSRob Herring $ref: /schemas/types.yaml#/definitions/phandle 185d392fe78SEnric Balletbo i Serra description: phandle to the device containing the INFRACFG register range. 186d392fe78SEnric Balletbo i Serra 187d392fe78SEnric Balletbo i Serra mediatek,smi: 188d69c6dddSRob Herring $ref: /schemas/types.yaml#/definitions/phandle 189d392fe78SEnric Balletbo i Serra description: phandle to the device containing the SMI register range. 190d392fe78SEnric Balletbo i Serra 191d392fe78SEnric Balletbo i Serra required: 192d392fe78SEnric Balletbo i Serra - reg 193d392fe78SEnric Balletbo i Serra 194d392fe78SEnric Balletbo i Serra additionalProperties: false 195d392fe78SEnric Balletbo i Serra 196d392fe78SEnric Balletbo i Serra required: 197d392fe78SEnric Balletbo i Serra - reg 198d392fe78SEnric Balletbo i Serra 199d392fe78SEnric Balletbo i Serra additionalProperties: false 200d392fe78SEnric Balletbo i Serra 201d392fe78SEnric Balletbo i Serra required: 202d392fe78SEnric Balletbo i Serra - reg 203d392fe78SEnric Balletbo i Serra 204d392fe78SEnric Balletbo i Serra additionalProperties: false 205d392fe78SEnric Balletbo i Serra 206d392fe78SEnric Balletbo i Serrarequired: 207d392fe78SEnric Balletbo i Serra - compatible 208d392fe78SEnric Balletbo i Serra 209d392fe78SEnric Balletbo i SerraadditionalProperties: false 210d392fe78SEnric Balletbo i Serra 211d392fe78SEnric Balletbo i Serraexamples: 212d392fe78SEnric Balletbo i Serra - | 213d392fe78SEnric Balletbo i Serra #include <dt-bindings/clock/mt8173-clk.h> 214d392fe78SEnric Balletbo i Serra #include <dt-bindings/power/mt8173-power.h> 215d392fe78SEnric Balletbo i Serra 216d392fe78SEnric Balletbo i Serra soc { 217d392fe78SEnric Balletbo i Serra #address-cells = <2>; 218d392fe78SEnric Balletbo i Serra #size-cells = <2>; 219d392fe78SEnric Balletbo i Serra 220d392fe78SEnric Balletbo i Serra scpsys: syscon@10006000 { 221d392fe78SEnric Balletbo i Serra compatible = "syscon", "simple-mfd"; 222d392fe78SEnric Balletbo i Serra reg = <0 0x10006000 0 0x1000>; 223d392fe78SEnric Balletbo i Serra 224d392fe78SEnric Balletbo i Serra spm: power-controller { 225d392fe78SEnric Balletbo i Serra compatible = "mediatek,mt8173-power-controller"; 226d392fe78SEnric Balletbo i Serra #address-cells = <1>; 227d392fe78SEnric Balletbo i Serra #size-cells = <0>; 228d392fe78SEnric Balletbo i Serra #power-domain-cells = <1>; 229d392fe78SEnric Balletbo i Serra 230d392fe78SEnric Balletbo i Serra /* power domains of the SoC */ 231d392fe78SEnric Balletbo i Serra power-domain@MT8173_POWER_DOMAIN_VDEC { 232d392fe78SEnric Balletbo i Serra reg = <MT8173_POWER_DOMAIN_VDEC>; 233d392fe78SEnric Balletbo i Serra clocks = <&topckgen CLK_TOP_MM_SEL>; 234d392fe78SEnric Balletbo i Serra clock-names = "mm"; 235d392fe78SEnric Balletbo i Serra #power-domain-cells = <0>; 236d392fe78SEnric Balletbo i Serra }; 237d392fe78SEnric Balletbo i Serra power-domain@MT8173_POWER_DOMAIN_VENC { 238d392fe78SEnric Balletbo i Serra reg = <MT8173_POWER_DOMAIN_VENC>; 239d392fe78SEnric Balletbo i Serra clocks = <&topckgen CLK_TOP_MM_SEL>, 240d392fe78SEnric Balletbo i Serra <&topckgen CLK_TOP_VENC_SEL>; 241d392fe78SEnric Balletbo i Serra clock-names = "mm", "venc"; 242d392fe78SEnric Balletbo i Serra #power-domain-cells = <0>; 243d392fe78SEnric Balletbo i Serra }; 244d392fe78SEnric Balletbo i Serra power-domain@MT8173_POWER_DOMAIN_ISP { 245d392fe78SEnric Balletbo i Serra reg = <MT8173_POWER_DOMAIN_ISP>; 246d392fe78SEnric Balletbo i Serra clocks = <&topckgen CLK_TOP_MM_SEL>; 247d392fe78SEnric Balletbo i Serra clock-names = "mm"; 248d392fe78SEnric Balletbo i Serra #power-domain-cells = <0>; 249d392fe78SEnric Balletbo i Serra }; 250d392fe78SEnric Balletbo i Serra power-domain@MT8173_POWER_DOMAIN_MM { 251d392fe78SEnric Balletbo i Serra reg = <MT8173_POWER_DOMAIN_MM>; 252d392fe78SEnric Balletbo i Serra clocks = <&topckgen CLK_TOP_MM_SEL>; 253d392fe78SEnric Balletbo i Serra clock-names = "mm"; 254d392fe78SEnric Balletbo i Serra #power-domain-cells = <0>; 255d392fe78SEnric Balletbo i Serra mediatek,infracfg = <&infracfg>; 256d392fe78SEnric Balletbo i Serra }; 257d392fe78SEnric Balletbo i Serra power-domain@MT8173_POWER_DOMAIN_VENC_LT { 258d392fe78SEnric Balletbo i Serra reg = <MT8173_POWER_DOMAIN_VENC_LT>; 259d392fe78SEnric Balletbo i Serra clocks = <&topckgen CLK_TOP_MM_SEL>, 260d392fe78SEnric Balletbo i Serra <&topckgen CLK_TOP_VENC_LT_SEL>; 261d392fe78SEnric Balletbo i Serra clock-names = "mm", "venclt"; 262d392fe78SEnric Balletbo i Serra #power-domain-cells = <0>; 263d392fe78SEnric Balletbo i Serra }; 264d392fe78SEnric Balletbo i Serra power-domain@MT8173_POWER_DOMAIN_AUDIO { 265d392fe78SEnric Balletbo i Serra reg = <MT8173_POWER_DOMAIN_AUDIO>; 266d392fe78SEnric Balletbo i Serra #power-domain-cells = <0>; 267d392fe78SEnric Balletbo i Serra }; 268d392fe78SEnric Balletbo i Serra power-domain@MT8173_POWER_DOMAIN_USB { 269d392fe78SEnric Balletbo i Serra reg = <MT8173_POWER_DOMAIN_USB>; 270d392fe78SEnric Balletbo i Serra #power-domain-cells = <0>; 271d392fe78SEnric Balletbo i Serra }; 272d392fe78SEnric Balletbo i Serra power-domain@MT8173_POWER_DOMAIN_MFG_ASYNC { 273d392fe78SEnric Balletbo i Serra reg = <MT8173_POWER_DOMAIN_MFG_ASYNC>; 274d392fe78SEnric Balletbo i Serra clocks = <&clk26m>; 275d392fe78SEnric Balletbo i Serra clock-names = "mfg"; 276d392fe78SEnric Balletbo i Serra #address-cells = <1>; 277d392fe78SEnric Balletbo i Serra #size-cells = <0>; 278d392fe78SEnric Balletbo i Serra #power-domain-cells = <1>; 279d392fe78SEnric Balletbo i Serra 280d392fe78SEnric Balletbo i Serra power-domain@MT8173_POWER_DOMAIN_MFG_2D { 281d392fe78SEnric Balletbo i Serra reg = <MT8173_POWER_DOMAIN_MFG_2D>; 282d392fe78SEnric Balletbo i Serra #address-cells = <1>; 283d392fe78SEnric Balletbo i Serra #size-cells = <0>; 284d392fe78SEnric Balletbo i Serra #power-domain-cells = <1>; 285d392fe78SEnric Balletbo i Serra 286d392fe78SEnric Balletbo i Serra power-domain@MT8173_POWER_DOMAIN_MFG { 287d392fe78SEnric Balletbo i Serra reg = <MT8173_POWER_DOMAIN_MFG>; 288d392fe78SEnric Balletbo i Serra #power-domain-cells = <0>; 289d392fe78SEnric Balletbo i Serra mediatek,infracfg = <&infracfg>; 290d392fe78SEnric Balletbo i Serra }; 291d392fe78SEnric Balletbo i Serra }; 292d392fe78SEnric Balletbo i Serra }; 293d392fe78SEnric Balletbo i Serra }; 294d392fe78SEnric Balletbo i Serra }; 295d392fe78SEnric Balletbo i Serra }; 296