1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0 2*4882a593Smuzhiyun%YAML 1.2 3*4882a593Smuzhiyun--- 4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/power/reset/syscon-poweroff.yaml# 5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml# 6*4882a593Smuzhiyun 7*4882a593Smuzhiyuntitle: Generic SYSCON mapped register poweroff driver 8*4882a593Smuzhiyun 9*4882a593Smuzhiyunmaintainers: 10*4882a593Smuzhiyun - Sebastian Reichel <sre@kernel.org> 11*4882a593Smuzhiyun 12*4882a593Smuzhiyundescription: |+ 13*4882a593Smuzhiyun This is a generic poweroff driver using syscon to map the poweroff register. 14*4882a593Smuzhiyun The poweroff is generally performed with a write to the poweroff register 15*4882a593Smuzhiyun defined by the register map pointed by syscon reference plus the offset 16*4882a593Smuzhiyun with the value and mask defined in the poweroff node. 17*4882a593Smuzhiyun Default will be little endian mode, 32 bit access only. 18*4882a593Smuzhiyun 19*4882a593Smuzhiyunproperties: 20*4882a593Smuzhiyun compatible: 21*4882a593Smuzhiyun const: syscon-poweroff 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun mask: 24*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 25*4882a593Smuzhiyun description: Update only the register bits defined by the mask (32 bit). 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun offset: 28*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 29*4882a593Smuzhiyun description: Offset in the register map for the poweroff register (in bytes). 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun regmap: 32*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/phandle 33*4882a593Smuzhiyun description: Phandle to the register map node. 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun value: 36*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 37*4882a593Smuzhiyun description: The poweroff value written to the poweroff register (32 bit access). 38*4882a593Smuzhiyun 39*4882a593Smuzhiyunrequired: 40*4882a593Smuzhiyun - compatible 41*4882a593Smuzhiyun - regmap 42*4882a593Smuzhiyun - offset 43*4882a593Smuzhiyun 44*4882a593SmuzhiyunadditionalProperties: false 45*4882a593Smuzhiyun 46*4882a593SmuzhiyunallOf: 47*4882a593Smuzhiyun - if: 48*4882a593Smuzhiyun not: 49*4882a593Smuzhiyun required: 50*4882a593Smuzhiyun - mask 51*4882a593Smuzhiyun then: 52*4882a593Smuzhiyun required: 53*4882a593Smuzhiyun - value 54*4882a593Smuzhiyun 55*4882a593Smuzhiyunexamples: 56*4882a593Smuzhiyun - | 57*4882a593Smuzhiyun poweroff { 58*4882a593Smuzhiyun compatible = "syscon-poweroff"; 59*4882a593Smuzhiyun regmap = <®mapnode>; 60*4882a593Smuzhiyun offset = <0x0>; 61*4882a593Smuzhiyun mask = <0x7a>; 62*4882a593Smuzhiyun }; 63