@@ -43,6 +43,7 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/clock/rk3036-cru.h>
+#include <dt-bindings/soc/rockchip_boot-mode.h>
#include "skeleton.dtsi"
/ {
@@ -261,8 +262,16 @@
};
grf: syscon@20008000 {
- compatible = "rockchip,rk3036-grf", "syscon";
+ compatible = "rockchip,rk3036-grf", "syscon", "simple-mfd";
reg = <0x20008000 0x1000>;
+ reboot-mode {
+ compatible = "syscon-reboot-mode";
+ offset = <0x1d8>;
+ mode-normal = <BOOT_NORMAL>;
+ mode-recovery = <BOOT_RECOVERY>;
+ mode-fastboot = <BOOT_FASTBOOT>;
+ mode-loader = <BOOT_LOADER>;
+ };
};
acodec: acodec-ana@20030000 {
@@ -45,6 +45,7 @@
#include <dt-bindings/clock/rk3288-cru.h>
#include <dt-bindings/thermal/thermal.h>
#include <dt-bindings/power/rk3288-power.h>
+#include <dt-bindings/soc/rockchip_boot-mode.h>
#include "skeleton.dtsi"
/ {
@@ -713,6 +714,16 @@
clocks = <&cru ACLK_GPU>;
};
};
+
+ reboot-mode {
+ compatible = "syscon-reboot-mode";
+ offset = <0x94>;
+ mode-normal = <BOOT_NORMAL>;
+ mode-recovery = <BOOT_RECOVERY>;
+ mode-fastboot = <BOOT_FASTBOOT>;
+ mode-loader = <BOOT_LOADER>;
+ mode-maskrom = <BOOT_MASKROM>;
+ };
};
sgrf: syscon@ff740000 {
@@ -43,6 +43,7 @@
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/soc/rockchip_boot-mode.h>
#include "skeleton.dtsi"
/ {
@@ -243,8 +244,18 @@
};
pmu: pmu@20004000 {
- compatible = "rockchip,rk3066-pmu", "syscon";
+ compatible = "rockchip,rk3066-pmu", "syscon", "simple-mfd";
reg = <0x20004000 0x100>;
+
+ reboot-mode {
+ compatible = "syscon-reboot-mode";
+ offset = <0x40>;
+ mode-normal = <BOOT_NORMAL>;
+ mode-recovery = <BOOT_RECOVERY>;
+ mode-fastboot = <BOOT_FASTBOOT>;
+ mode-loader = <BOOT_LOADER>;
+ mode-maskrom = <BOOT_MASKROM>;
+ };
};
grf: grf@20008000 {
new file mode 100644
@@ -0,0 +1,30 @@
+#ifndef __ROCKCHIP_BOOT_MODE_H
+#define __ROCKCHIP_BOOT_MODE_H
+
+/*high 24 bits is tag, low 8 bits is type*/
+#define REBOOT_FLAG 0x5242C300
+/* normal boot */
+#define BOOT_NORMAL (REBOOT_FLAG + 0)
+/* enter loader rockusb mode */
+#define BOOT_LOADER (REBOOT_FLAG + 1)
+/* enter maskrom rockusb mode */
+#define BOOT_MASKROM (0xEF08A53C)
+/* enter recovery */
+#define BOOT_RECOVERY (REBOOT_FLAG + 3)
+/* do not enter recover */
+#define BOOT_NORECOVER (REBOOT_FLAG + 4)
+/* boot second OS*/
+#define BOOT_SECONDOS (REBOOT_FLAG + 5)
+/* enter recover and wipe data. */
+#define BOOT_WIPEDATA (REBOOT_FLAG + 6)
+/* enter recover and wipe all data. */
+#define BOOT_WIPEALL (REBOOT_FLAG + 7)
+/* check firmware img with backup part*/
+#define BOOT_CHECKIMG (REBOOT_FLAG + 8)
+ /* enter fast boot mode */
+#define BOOT_FASTBOOT (REBOOT_FLAG + 9)
+#define BOOT_SECUREBOOT_DISABLE (REBOOT_FLAG + 10)
+/* enter charge mode */
+#define BOOT_CHARGING (REBOOT_FLAG + 11)
+
+#endif