diff options
author | Andy Yan <andy.yan@rock-chips.com> | 2016-01-12 19:29:49 +0800 |
---|---|---|
committer | Leo Wang <leozwang@google.com> | 2016-01-13 16:20:51 +0000 |
commit | e119d0aa3d0ce6b96de12e0129eb3591d5d3ccd5 (patch) | |
tree | 8c3de341c34ec248875a9fe028c464fde47b4f68 | |
parent | e1513cd0d5d72f711b370c1f3867752147ce1c3b (diff) | |
download | v4.1-e119d0aa3d0ce6b96de12e0129eb3591d5d3ccd5.tar.gz |
FROMLIST: dt-bindings: power: reset: add document for reboot-mode driver
add device tree binding document for reboot-mode driver
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Bug: 25923642
Patchset: reboot fastboot can work.
(am from https://patchwork.kernel.org/patch/8016361/)
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I4e446aa4ff6f3c364af5745b3bfb0c238e7a097b
-rw-r--r-- | Documentation/devicetree/bindings/power/reset/reboot-mode.txt | 41 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.txt | 52 |
2 files changed, 93 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/power/reset/reboot-mode.txt b/Documentation/devicetree/bindings/power/reset/reboot-mode.txt new file mode 100644 index 00000000000..81d9f662093 --- /dev/null +++ b/Documentation/devicetree/bindings/power/reset/reboot-mode.txt @@ -0,0 +1,41 @@ +Generic reboot mode core map driver + +This driver get reboot mode arguments and call the write +interface to stores the magic value in special register +or ram . Then the bootloader can read it and take different +action according to the argument stored. + +Required properties: +- compatible: only support "syscon-reboot-mode" now. + +Each mode is represented as a sub-node of reboot_mode: + +Subnode required properties: +- linux,mode: reboot mode command,such as "loader", "recovery", "fastboot". +- loader,magic: magic number for the mode, this is vendor specific. + +Example: + reboot_mode { + compatible = "syscon-reboot-mode"; + offset = <0x40>; + + loader { + linux,mode = "loader"; + loader,magic = <BOOT_LOADER>; + }; + + maskrom { + linux,mode = "maskrom"; + loader,magic = <BOOT_MASKROM>; + }; + + recovery { + linux,mode = "recovery"; + loader,magic = <BOOT_RECOVERY>; + }; + + fastboot { + linux,mode = "fastboot"; + loader,magic = <BOOT_FASTBOOT>; + }; + }; diff --git a/Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.txt b/Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.txt new file mode 100644 index 00000000000..6bce7dd5da2 --- /dev/null +++ b/Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.txt @@ -0,0 +1,52 @@ +SYSCON reboot mode driver + +This driver get reboot mode magic value form reboot-mode driver +and stores it in a SYSCON mapped register. Then the bootloader +can read it and take different action according to the magic +value stored. + +This DT node should be represented as a sub-node of a "syscon", "simple-mfd" +node. + +Required properties: +- compatible: should be "syscon-reboot-mode" +- offset: offset in the register map for the storage register (in bytes) + +The rest of the properties should follow the generic reboot-mode discription +found in reboot-mode.txt + +Example: + pmu: pmu@20004000 { + compatible = "rockchip,rk3066-pmu", "syscon", "simple-mfd"; + reg = <0x20004000 0x100>; + + reboot-mode { + compatible = "syscon-reboot-mode"; + offset = <0x40>; + + normal { + linux,mode = "normal"; + loader,magic = <BOOT_NORMAL>; + }; + + loader { + linux,mode = "loader"; + loader,magic = <BOOT_LOADER>; + }; + + maskrom { + linux,mode = "maskrom"; + loader,magic = <BOOT_MASKROM>; + }; + + recovery { + linux,mode = "recovery"; + loader,magic = <BOOT_RECOVERY>; + }; + + fastboot { + linux,mode = "fastboot"; + loader,magic = <BOOT_FASTBOOT>; + }; + }; + }; |