Commit 0262fa16 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Sebastian Reichel
Browse files

dt-bindings: power: reset: convert nvmem-reboot-mode bindings to YAML



Convert the DT binding document for nvmem-reboot-mode from .txt to YAML.

Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 97dd69b1
Loading
Loading
Loading
Loading
+0 −26
Original line number Diff line number Diff line
NVMEM reboot mode driver

This driver gets reboot mode magic value from reboot-mode driver
and stores it in a NVMEM cell named "reboot-mode". Then the bootloader
can read it and take different action according to the magic
value stored.

Required properties:
- compatible: should be "nvmem-reboot-mode".
- nvmem-cells: A phandle to the reboot mode provided by a nvmem device.
- nvmem-cell-names: Should be "reboot-mode".

The rest of the properties should follow the generic reboot-mode description
found in reboot-mode.txt

Example:
	reboot-mode {
		compatible = "nvmem-reboot-mode";
		nvmem-cells = <&reboot_mode>;
		nvmem-cell-names = "reboot-mode";

		mode-normal     = <0xAAAA5501>;
		mode-bootloader = <0xBBBB5500>;
		mode-recovery   = <0xCCCC5502>;
		mode-test       = <0xDDDD5503>;
	};
+52 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/nvmem-reboot-mode.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Generic NVMEM reboot mode

maintainers:
  - Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

description:
  This driver gets the reboot mode magic value from the reboot-mode driver
  and stores it in the NVMEM cell named "reboot-mode". The bootloader can
  then read it and take different action according to the value.

properties:
  compatible:
    const: nvmem-reboot-mode

  nvmem-cells:
    description:
      A phandle pointing to the nvmem-cells node where the vendor-specific
      magic value representing the reboot mode is stored.
    maxItems: 1

  nvmem-cell-names:
    items:
      - const: reboot-mode

patternProperties:
  "^mode-.+":
    $ref: /schemas/types.yaml#/definitions/uint32
    description: Vendor-specific mode value written to the mode register

required:
  - compatible
  - nvmem-cells
  - nvmem-cell-names

additionalProperties: false

examples:
  - |
    reboot-mode {
        compatible = "nvmem-reboot-mode";
        nvmem-cells = <&reboot_reason>;
        nvmem-cell-names = "reboot-mode";
        mode-recovery = <0x01>;
        mode-bootloader = <0x02>;
    };
...