[PATCH v2 1/4] dt-bindings: power: reset: add document for reboot-mode driver
Andy Yan
andy.yan at rock-chips.com
Tue Jan 12 03:29:49 PST 2016
add device tree binding document for reboot-mode driver
Signed-off-by: Andy Yan <andy.yan at rock-chips.com>
---
Changes in v2: None
Changes in v1: None
.../bindings/power/reset/reboot-mode.txt | 41 +++++++++++++++++
.../bindings/power/reset/syscon-reboot-mode.txt | 52 ++++++++++++++++++++++
2 files changed, 93 insertions(+)
create mode 100644 Documentation/devicetree/bindings/power/reset/reboot-mode.txt
create mode 100644 Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.txt
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 0000000..81d9f66
--- /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 0000000..6bce7dd
--- /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 at 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>;
+ };
+ };
+ };
--
1.9.1
More information about the linux-arm-kernel
mailing list