162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 262306a36Sopenharmony_ci%YAML 1.2 362306a36Sopenharmony_ci--- 462306a36Sopenharmony_ci$id: http://devicetree.org/schemas/power/reset/syscon-poweroff.yaml# 562306a36Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml# 662306a36Sopenharmony_ci 762306a36Sopenharmony_cititle: Generic SYSCON mapped register poweroff driver 862306a36Sopenharmony_ci 962306a36Sopenharmony_cimaintainers: 1062306a36Sopenharmony_ci - Sebastian Reichel <sre@kernel.org> 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_cidescription: |+ 1362306a36Sopenharmony_ci This is a generic poweroff driver using syscon to map the poweroff register. 1462306a36Sopenharmony_ci The poweroff is generally performed with a write to the poweroff register 1562306a36Sopenharmony_ci defined by the register map pointed by syscon reference plus the offset 1662306a36Sopenharmony_ci with the value and mask defined in the poweroff node. 1762306a36Sopenharmony_ci Default will be little endian mode, 32 bit access only. 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ciproperties: 2062306a36Sopenharmony_ci compatible: 2162306a36Sopenharmony_ci const: syscon-poweroff 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ci mask: 2462306a36Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/uint32 2562306a36Sopenharmony_ci description: Update only the register bits defined by the mask (32 bit). 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ci offset: 2862306a36Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/uint32 2962306a36Sopenharmony_ci description: Offset in the register map for the poweroff register (in bytes). 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci regmap: 3262306a36Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/phandle 3362306a36Sopenharmony_ci description: Phandle to the register map node. 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci value: 3662306a36Sopenharmony_ci $ref: /schemas/types.yaml#/definitions/uint32 3762306a36Sopenharmony_ci description: The poweroff value written to the poweroff register (32 bit access). 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_cirequired: 4062306a36Sopenharmony_ci - compatible 4162306a36Sopenharmony_ci - regmap 4262306a36Sopenharmony_ci - offset 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ciadditionalProperties: false 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ciallOf: 4762306a36Sopenharmony_ci - if: 4862306a36Sopenharmony_ci not: 4962306a36Sopenharmony_ci required: 5062306a36Sopenharmony_ci - mask 5162306a36Sopenharmony_ci then: 5262306a36Sopenharmony_ci required: 5362306a36Sopenharmony_ci - value 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ciexamples: 5662306a36Sopenharmony_ci - | 5762306a36Sopenharmony_ci poweroff { 5862306a36Sopenharmony_ci compatible = "syscon-poweroff"; 5962306a36Sopenharmony_ci regmap = <®mapnode>; 6062306a36Sopenharmony_ci offset = <0x0>; 6162306a36Sopenharmony_ci mask = <0x7a>; 6262306a36Sopenharmony_ci }; 63