Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: powerpc: Convert fsl/pmc.txt to YAML

This patch rewrites pmc.txt into YAML format. Descriptive texts are
expanded or shortened in a few places to better fit today's conventions.

The list of compatible strings (and combinations of them) is based on
existing device trees in arch/powerpc as well as compatible strings
already mentioned in the plain-text version of the binding.

One thing I didn't handle are soc-clk@... nodes as seen in
arch/powerpc/boot/dts/fsl/pq3-power.dtsi. They are also ignored
by Linux drivers.

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
Link: https://lore.kernel.org/r/20250417-fslpmc-yaml-v3-1-b3eccd389176@posteo.net
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

authored by

J. Neuschäfer and committed by
Rob Herring (Arm)
ba127016 2ed7553b

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