1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0-only 2*4882a593Smuzhiyun%YAML 1.2 3*4882a593Smuzhiyun--- 4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/power/reset/syscon-reboot-mode.yaml# 5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml# 6*4882a593Smuzhiyun 7*4882a593Smuzhiyuntitle: Generic SYSCON reboot mode driver 8*4882a593Smuzhiyun 9*4882a593Smuzhiyunmaintainers: 10*4882a593Smuzhiyun - Sebastian Reichel <sre@kernel.org> 11*4882a593Smuzhiyun 12*4882a593Smuzhiyundescription: | 13*4882a593Smuzhiyun This driver gets reboot mode magic value from reboot-mode driver 14*4882a593Smuzhiyun and stores it in a SYSCON mapped register. Then the bootloader 15*4882a593Smuzhiyun can read it and take different action according to the magic 16*4882a593Smuzhiyun value stored. The SYSCON mapped register is retrieved from the 17*4882a593Smuzhiyun parental dt-node plus the offset. So the SYSCON reboot-mode node 18*4882a593Smuzhiyun should be represented as a sub-node of a "syscon", "simple-mfd" node. 19*4882a593Smuzhiyun 20*4882a593Smuzhiyunproperties: 21*4882a593Smuzhiyun compatible: 22*4882a593Smuzhiyun const: syscon-reboot-mode 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun mask: 25*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 26*4882a593Smuzhiyun description: Update only the register bits defined by the mask (32 bit) 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun offset: 29*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 30*4882a593Smuzhiyun description: Offset in the register map for the mode register (in bytes) 31*4882a593Smuzhiyun 32*4882a593SmuzhiyunpatternProperties: 33*4882a593Smuzhiyun "^mode-.+": 34*4882a593Smuzhiyun $ref: /schemas/types.yaml#/definitions/uint32 35*4882a593Smuzhiyun description: Vendor-specific mode value written to the mode register 36*4882a593Smuzhiyun 37*4882a593SmuzhiyunadditionalProperties: false 38*4882a593Smuzhiyun 39*4882a593Smuzhiyunrequired: 40*4882a593Smuzhiyun - compatible 41*4882a593Smuzhiyun - offset 42*4882a593Smuzhiyun 43*4882a593Smuzhiyunexamples: 44*4882a593Smuzhiyun - | 45*4882a593Smuzhiyun #include <dt-bindings/soc/rockchip,boot-mode.h> 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun reboot-mode { 48*4882a593Smuzhiyun compatible = "syscon-reboot-mode"; 49*4882a593Smuzhiyun offset = <0x40>; 50*4882a593Smuzhiyun mode-normal = <BOOT_NORMAL>; 51*4882a593Smuzhiyun mode-recovery = <BOOT_RECOVERY>; 52*4882a593Smuzhiyun mode-bootloader = <BOOT_FASTBOOT>; 53*4882a593Smuzhiyun mode-loader = <BOOT_BL_DOWNLOAD>; 54*4882a593Smuzhiyun }; 55*4882a593Smuzhiyun... 56