1*ae5de77eSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*ae5de77eSEmmanuel Vadot%YAML 1.2 3*ae5de77eSEmmanuel Vadot--- 4*ae5de77eSEmmanuel Vadot$id: http://devicetree.org/schemas/powerpc/fsl/pmc.yaml# 5*ae5de77eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*ae5de77eSEmmanuel Vadot 7*ae5de77eSEmmanuel Vadottitle: Power Management Controller 8*ae5de77eSEmmanuel Vadot 9*ae5de77eSEmmanuel Vadotmaintainers: 10*ae5de77eSEmmanuel Vadot - J. Neuschäfer <j.ne@posteo.net> 11*ae5de77eSEmmanuel Vadot 12*ae5de77eSEmmanuel Vadotdescription: | 13*ae5de77eSEmmanuel Vadot The Power Management Controller in several MPC8xxx SoCs helps save power by 14*ae5de77eSEmmanuel Vadot controlling chip-wide low-power states as well as peripheral clock gating. 15*ae5de77eSEmmanuel Vadot 16*ae5de77eSEmmanuel Vadot Sleep of peripheral devices is configured by the `sleep` property, for 17*ae5de77eSEmmanuel Vadot example `sleep = <&pmc 0x00000030>`. Any cells after the &pmc phandle are 18*ae5de77eSEmmanuel Vadot called a sleep specifier. 19*ae5de77eSEmmanuel Vadot 20*ae5de77eSEmmanuel Vadot For "fsl,mpc8349-pmc", sleep specifiers consist of one cell. For each bit that 21*ae5de77eSEmmanuel Vadot is set in the cell, the corresponding bit in SCCR will be saved and cleared 22*ae5de77eSEmmanuel Vadot on suspend, and restored on resume. This sleep controller supports disabling 23*ae5de77eSEmmanuel Vadot and resuming devices at any time. 24*ae5de77eSEmmanuel Vadot 25*ae5de77eSEmmanuel Vadot For "fsl,mpc8536-pmc", sleep specifiers consist of three cells, the third of 26*ae5de77eSEmmanuel Vadot which will be ORed into PMCDR upon suspend, and cleared from PMCDR upon 27*ae5de77eSEmmanuel Vadot resume. The first two cells are as described for fsl,mpc8548-pmc. This 28*ae5de77eSEmmanuel Vadot sleep controller only supports disabling devices during system sleep, or 29*ae5de77eSEmmanuel Vadot permanently. 30*ae5de77eSEmmanuel Vadot 31*ae5de77eSEmmanuel Vadot For "fsl,mpc8548-pmc" or "fsl,mpc8641d-pmc", Sleep specifiers consist of one 32*ae5de77eSEmmanuel Vadot or two cells, the first of which will be ORed into DEVDISR (and the second 33*ae5de77eSEmmanuel Vadot into DEVDISR2, if present -- this cell should be zero or absent if the 34*ae5de77eSEmmanuel Vadot hardware does not have DEVDISR2) upon a request for permanent device 35*ae5de77eSEmmanuel Vadot disabling. This sleep controller does not support configuring devices to 36*ae5de77eSEmmanuel Vadot disable during system sleep (unless supported by another compatible match), 37*ae5de77eSEmmanuel Vadot or dynamically. 38*ae5de77eSEmmanuel Vadot 39*ae5de77eSEmmanuel Vadotproperties: 40*ae5de77eSEmmanuel Vadot compatible: 41*ae5de77eSEmmanuel Vadot oneOf: 42*ae5de77eSEmmanuel Vadot - items: 43*ae5de77eSEmmanuel Vadot - const: fsl,mpc8315-pmc 44*ae5de77eSEmmanuel Vadot - const: fsl,mpc8313-pmc 45*ae5de77eSEmmanuel Vadot - const: fsl,mpc8349-pmc 46*ae5de77eSEmmanuel Vadot 47*ae5de77eSEmmanuel Vadot - items: 48*ae5de77eSEmmanuel Vadot - enum: 49*ae5de77eSEmmanuel Vadot - fsl,mpc8313-pmc 50*ae5de77eSEmmanuel Vadot - fsl,mpc8323-pmc 51*ae5de77eSEmmanuel Vadot - fsl,mpc8360-pmc 52*ae5de77eSEmmanuel Vadot - fsl,mpc8377-pmc 53*ae5de77eSEmmanuel Vadot - fsl,mpc8378-pmc 54*ae5de77eSEmmanuel Vadot - fsl,mpc8379-pmc 55*ae5de77eSEmmanuel Vadot - const: fsl,mpc8349-pmc 56*ae5de77eSEmmanuel Vadot 57*ae5de77eSEmmanuel Vadot - items: 58*ae5de77eSEmmanuel Vadot - const: fsl,p1022-pmc 59*ae5de77eSEmmanuel Vadot - const: fsl,mpc8536-pmc 60*ae5de77eSEmmanuel Vadot - const: fsl,mpc8548-pmc 61*ae5de77eSEmmanuel Vadot 62*ae5de77eSEmmanuel Vadot - items: 63*ae5de77eSEmmanuel Vadot - enum: 64*ae5de77eSEmmanuel Vadot - fsl,mpc8536-pmc 65*ae5de77eSEmmanuel Vadot - fsl,mpc8568-pmc 66*ae5de77eSEmmanuel Vadot - fsl,mpc8569-pmc 67*ae5de77eSEmmanuel Vadot - const: fsl,mpc8548-pmc 68*ae5de77eSEmmanuel Vadot 69*ae5de77eSEmmanuel Vadot - enum: 70*ae5de77eSEmmanuel Vadot - fsl,mpc8548-pmc 71*ae5de77eSEmmanuel Vadot - fsl,mpc8641d-pmc 72*ae5de77eSEmmanuel Vadot 73*ae5de77eSEmmanuel Vadot description: | 74*ae5de77eSEmmanuel Vadot "fsl,mpc8349-pmc" should be listed for any chip whose PMC is 75*ae5de77eSEmmanuel Vadot compatible. "fsl,mpc8313-pmc" should also be listed for any chip 76*ae5de77eSEmmanuel Vadot whose PMC is compatible, and implies deep-sleep capability. 77*ae5de77eSEmmanuel Vadot 78*ae5de77eSEmmanuel Vadot "fsl,mpc8548-pmc" should be listed for any chip whose PMC is 79*ae5de77eSEmmanuel Vadot compatible. "fsl,mpc8536-pmc" should also be listed for any chip 80*ae5de77eSEmmanuel Vadot whose PMC is compatible, and implies deep-sleep capability. 81*ae5de77eSEmmanuel Vadot 82*ae5de77eSEmmanuel Vadot "fsl,mpc8641d-pmc" should be listed for any chip whose PMC is 83*ae5de77eSEmmanuel Vadot compatible; all statements below that apply to "fsl,mpc8548-pmc" also 84*ae5de77eSEmmanuel Vadot apply to "fsl,mpc8641d-pmc". 85*ae5de77eSEmmanuel Vadot 86*ae5de77eSEmmanuel Vadot Compatibility does not include bit assignments in SCCR/PMCDR/DEVDISR; these 87*ae5de77eSEmmanuel Vadot bit assignments are indicated via the sleep specifier in each device's 88*ae5de77eSEmmanuel Vadot sleep property. 89*ae5de77eSEmmanuel Vadot 90*ae5de77eSEmmanuel Vadot reg: 91*ae5de77eSEmmanuel Vadot minItems: 1 92*ae5de77eSEmmanuel Vadot maxItems: 2 93*ae5de77eSEmmanuel Vadot 94*ae5de77eSEmmanuel Vadot interrupts: 95*ae5de77eSEmmanuel Vadot maxItems: 1 96*ae5de77eSEmmanuel Vadot 97*ae5de77eSEmmanuel Vadot fsl,mpc8313-wakeup-timer: 98*ae5de77eSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 99*ae5de77eSEmmanuel Vadot description: 100*ae5de77eSEmmanuel Vadot For "fsl,mpc8313-pmc"-compatible devices, this is a phandle to an 101*ae5de77eSEmmanuel Vadot "fsl,gtm" node on which timer 4 can be used as a wakeup source from deep 102*ae5de77eSEmmanuel Vadot sleep. 103*ae5de77eSEmmanuel Vadot 104*ae5de77eSEmmanuel VadotallOf: 105*ae5de77eSEmmanuel Vadot - if: 106*ae5de77eSEmmanuel Vadot properties: 107*ae5de77eSEmmanuel Vadot compatible: 108*ae5de77eSEmmanuel Vadot contains: 109*ae5de77eSEmmanuel Vadot const: fsl,mpc8349-pmc 110*ae5de77eSEmmanuel Vadot then: 111*ae5de77eSEmmanuel Vadot properties: 112*ae5de77eSEmmanuel Vadot reg: 113*ae5de77eSEmmanuel Vadot items: 114*ae5de77eSEmmanuel Vadot - description: PMC block 115*ae5de77eSEmmanuel Vadot - description: Clock Configuration block 116*ae5de77eSEmmanuel Vadot 117*ae5de77eSEmmanuel Vadot - if: 118*ae5de77eSEmmanuel Vadot properties: 119*ae5de77eSEmmanuel Vadot compatible: 120*ae5de77eSEmmanuel Vadot contains: 121*ae5de77eSEmmanuel Vadot enum: 122*ae5de77eSEmmanuel Vadot - fsl,mpc8548-pmc 123*ae5de77eSEmmanuel Vadot - fsl,mpc8641d-pmc 124*ae5de77eSEmmanuel Vadot then: 125*ae5de77eSEmmanuel Vadot properties: 126*ae5de77eSEmmanuel Vadot reg: 127*ae5de77eSEmmanuel Vadot items: 128*ae5de77eSEmmanuel Vadot - description: 32-byte block beginning with DEVDISR 129*ae5de77eSEmmanuel Vadot 130*ae5de77eSEmmanuel Vadotrequired: 131*ae5de77eSEmmanuel Vadot - compatible 132*ae5de77eSEmmanuel Vadot - reg 133*ae5de77eSEmmanuel Vadot 134*ae5de77eSEmmanuel VadotadditionalProperties: false 135*ae5de77eSEmmanuel Vadot 136*ae5de77eSEmmanuel Vadotexamples: 137*ae5de77eSEmmanuel Vadot - | 138*ae5de77eSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 139*ae5de77eSEmmanuel Vadot 140*ae5de77eSEmmanuel Vadot pmc: power@b00 { 141*ae5de77eSEmmanuel Vadot compatible = "fsl,mpc8377-pmc", "fsl,mpc8349-pmc"; 142*ae5de77eSEmmanuel Vadot reg = <0xb00 0x100>, <0xa00 0x100>; 143*ae5de77eSEmmanuel Vadot interrupts = <80 IRQ_TYPE_LEVEL_LOW>; 144*ae5de77eSEmmanuel Vadot }; 145*ae5de77eSEmmanuel Vadot 146*ae5de77eSEmmanuel Vadot - | 147*ae5de77eSEmmanuel Vadot power@e0070 { 148*ae5de77eSEmmanuel Vadot compatible = "fsl,mpc8548-pmc"; 149*ae5de77eSEmmanuel Vadot reg = <0xe0070 0x20>; 150*ae5de77eSEmmanuel Vadot }; 151*ae5de77eSEmmanuel Vadot 152*ae5de77eSEmmanuel Vadot... 153