From: John Stultz <john.stultz@linaro.org>
To: lkml <linux-kernel@vger.kernel.org>
Cc: "John Stultz" <john.stultz@linaro.org>,
"Andy Yan" <andy.yan@rock-chips.com>,
"Rob Herring" <robh@kernel.org>, "Arnd Bergmann" <arnd@arndb.de>,
"Thierry Reding" <treding@nvidia.com>,
"Heiko Stübner" <heiko@sntech.de>,
"Caesar Wang" <wxt@rock-chips.com>,
"Kees Cook" <keescook@chromium.org>,
"Guodong Xu" <guodong.xu@linaro.org>,
"Haojian Zhuang" <haojian.zhuang@linaro.org>,
"Vishal Bhoj" <vishal.bhoj@linaro.org>,
"Bjorn Andersson" <bjorn.andersson@linaro.org>,
devicetree@vger.kernel.org,
"Android Kernel Team" <kernel-team@android.com>
Subject: [RFC][PATCH 3/3] dts: hikey: Add hikey support for sram-reboot-mode
Date: Tue, 26 Jan 2016 16:38:00 -0800 [thread overview]
Message-ID: <1453855080-17760-4-git-send-email-john.stultz@linaro.org> (raw)
In-Reply-To: <1453855080-17760-1-git-send-email-john.stultz@linaro.org>
Add support to hikey dts and defconfig for the
sram-reboot-mode driver.
The dts entries added here should really be generated
by the UEFI firmware, and not be static in the dts,
since one may be using different firmware on HiKey.
But this patch provides an example of how the
sram-reboot-mode entry would otherwise look.
Cc: Andy Yan <andy.yan@rock-chips.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Thierry Reding <treding@nvidia.com>
Cc: Heiko Stübner <heiko@sntech.de>
Cc: Caesar Wang <wxt@rock-chips.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Guodong Xu <guodong.xu@linaro.org>
Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: Vishal Bhoj <vishal.bhoj@linaro.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: devicetree@vger.kernel.org
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 36 ++++++++++++++++++++++++++
arch/arm64/configs/hikey_defconfig | 3 +++
2 files changed, 39 insertions(+)
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
index 92f1704..67d12d0 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
@@ -52,6 +52,11 @@
<0x0 0x0740f000 0x0 0x00001000>; /* MCU firmware section */
};
+ reboot-reason@05f01000 {
+ no-map;
+ reg = <0x0 0x05f01000 0x0 0x00001000>;
+ };
+
mbox-buf@06dff000 {
no-map;
reg = <0x0 0x06dff000 0x0 0x00001000>; /* Mailbox message buf */
@@ -71,6 +76,37 @@
ftrace-size = <0x0 0x00020000>;
};
+
+ /* This entry should really be provided by the UEFI firmware */
+ sram@5f01000 {
+ compatible = "mmio-sram", "simple-bus";
+ reg = <0x0 0x05f01000 0x0 0x00001000>;
+ ranges = <0x0 0x0 0x05f01000 0x00001000>;
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ reboot-mode@0 {
+ compatible = "sram-reboot-mode";
+ reg = <0x0 0x4>;
+
+ none {
+ linux,mode = "none";
+ loader,magic = <0x77665501>;
+ };
+
+ bootloader {
+ linux,mode = "bootloader";
+ loader,magic = <0x77665500>;
+ };
+
+ recovery {
+ linux,mode = "recovery";
+ loader,magic = <0x77665502>;
+ };
+ };
+ };
+
smb {
uart0: uart@f8015000 { /* console */
status = "ok";
diff --git a/arch/arm64/configs/hikey_defconfig b/arch/arm64/configs/hikey_defconfig
index a8375aa..e9db588 100644
--- a/arch/arm64/configs/hikey_defconfig
+++ b/arch/arm64/configs/hikey_defconfig
@@ -201,6 +201,7 @@ CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=16384
CONFIG_VIRTIO_BLK=y
+CONFIG_SRAM=y
CONFIG_TI_ST=y
CONFIG_ST_HCI=y
# CONFIG_SCSI_PROC_FS is not set
@@ -266,6 +267,8 @@ CONFIG_SPI_PL022=y
CONFIG_GPIO_SYSFS=y
CONFIG_GPIO_XGENE=y
CONFIG_POWER_RESET_SYSCON=y
+CONFIG_SYSCON_REBOOT_MODE=y
+CONFIG_SRAM_REBOOT_MODE=y
CONFIG_THERMAL=y
CONFIG_THERMAL_WRITABLE_TRIPS=y
CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR=y
--
1.9.1
next prev parent reply other threads:[~2016-01-27 0:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-27 0:37 [RFC][PATCH 0/3] SRAM reboot mode driver John Stultz
2016-01-27 0:37 ` [RFC][PATCH 1/3] dt-bindings: power: reset: Add document for sram-reboot-mode driver John Stultz
2016-01-27 1:11 ` Andy Yan
2016-01-27 0:37 ` [RFC][PATCH 2/3] power: reset: Add " John Stultz
2016-01-27 0:38 ` John Stultz [this message]
2016-01-27 17:38 ` [RFC][PATCH 3/3] dts: hikey: Add hikey support for sram-reboot-mode Rob Herring
2016-01-27 8:50 ` [RFC][PATCH 0/3] SRAM reboot mode driver Vladimir Zapolskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1453855080-17760-4-git-send-email-john.stultz@linaro.org \
--to=john.stultz@linaro.org \
--cc=andy.yan@rock-chips.com \
--cc=arnd@arndb.de \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=guodong.xu@linaro.org \
--cc=haojian.zhuang@linaro.org \
--cc=heiko@sntech.de \
--cc=keescook@chromium.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=treding@nvidia.com \
--cc=vishal.bhoj@linaro.org \
--cc=wxt@rock-chips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).