1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/power/reset/syscon-poweroff.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 7c66ec88fSEmmanuel Vadottitle: Generic SYSCON mapped register poweroff driver 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Sebastian Reichel <sre@kernel.org> 11c66ec88fSEmmanuel Vadot 12c66ec88fSEmmanuel Vadotdescription: |+ 13c66ec88fSEmmanuel Vadot This is a generic poweroff driver using syscon to map the poweroff register. 14c66ec88fSEmmanuel Vadot The poweroff is generally performed with a write to the poweroff register 15c66ec88fSEmmanuel Vadot defined by the register map pointed by syscon reference plus the offset 16c66ec88fSEmmanuel Vadot with the value and mask defined in the poweroff node. 17c66ec88fSEmmanuel Vadot Default will be little endian mode, 32 bit access only. 18*84943d6fSEmmanuel Vadot The SYSCON register map is normally retrieved from the parental dt-node. So 19*84943d6fSEmmanuel Vadot the SYSCON poweroff node should be represented as a sub-node of a "syscon", 20*84943d6fSEmmanuel Vadot "simple-mfd" node. 21c66ec88fSEmmanuel Vadot 22c66ec88fSEmmanuel Vadotproperties: 23c66ec88fSEmmanuel Vadot compatible: 24c66ec88fSEmmanuel Vadot const: syscon-poweroff 25c66ec88fSEmmanuel Vadot 26c66ec88fSEmmanuel Vadot mask: 27c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 28c66ec88fSEmmanuel Vadot description: Update only the register bits defined by the mask (32 bit). 29c66ec88fSEmmanuel Vadot 30c66ec88fSEmmanuel Vadot offset: 31c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 32c66ec88fSEmmanuel Vadot description: Offset in the register map for the poweroff register (in bytes). 33c66ec88fSEmmanuel Vadot 34c66ec88fSEmmanuel Vadot regmap: 35c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 36*84943d6fSEmmanuel Vadot deprecated: true 37*84943d6fSEmmanuel Vadot description: 38*84943d6fSEmmanuel Vadot Phandle to the register map node. This property is deprecated in favor of 39*84943d6fSEmmanuel Vadot the syscon-poweroff node being a child of a system controller node. 40c66ec88fSEmmanuel Vadot 41c66ec88fSEmmanuel Vadot value: 42c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 43c66ec88fSEmmanuel Vadot description: The poweroff value written to the poweroff register (32 bit access). 44c66ec88fSEmmanuel Vadot 45c66ec88fSEmmanuel Vadotrequired: 46c66ec88fSEmmanuel Vadot - compatible 47c66ec88fSEmmanuel Vadot - offset 48c66ec88fSEmmanuel Vadot 49c66ec88fSEmmanuel VadotadditionalProperties: false 50c66ec88fSEmmanuel Vadot 51c66ec88fSEmmanuel VadotallOf: 52c66ec88fSEmmanuel Vadot - if: 53c66ec88fSEmmanuel Vadot not: 54c66ec88fSEmmanuel Vadot required: 55c66ec88fSEmmanuel Vadot - mask 56c66ec88fSEmmanuel Vadot then: 57c66ec88fSEmmanuel Vadot required: 58c66ec88fSEmmanuel Vadot - value 59c66ec88fSEmmanuel Vadot 60c66ec88fSEmmanuel Vadotexamples: 61c66ec88fSEmmanuel Vadot - | 62c66ec88fSEmmanuel Vadot poweroff { 63c66ec88fSEmmanuel Vadot compatible = "syscon-poweroff"; 64c66ec88fSEmmanuel Vadot offset = <0x0>; 65c66ec88fSEmmanuel Vadot mask = <0x7a>; 66c66ec88fSEmmanuel Vadot }; 67