[RFC][PATCH 1/4] arm64: dts: Add display subsystem DT nodes for hi6220-hikey

Subsystems: arm/hisilicon soc support, the rest

12 messages, 4 authors, 2016-08-12 · open the first message on its own page

[RFC][PATCH 1/4] arm64: dts: Add display subsystem DT nodes for hi6220-hikey

From: John Stultz <hidden>
Date: 2016-08-08 23:03:55

From: Xinliang Liu <redacted>

Add ade and dsi DT nodes for hikey board.

Cc: Guodong Xu <redacted>
Cc: Wei Xu <xuwei5-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
Cc: Rob Herring <redacted>
Cc: Mark Rutland <redacted>
Cc: Catalin Marinas <redacted>
Cc: Will Deacon <redacted>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Xinliang Liu <redacted>
Signed-off-by: John Stultz <redacted>
---
 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts |  8 ++++
 arch/arm64/boot/dts/hisilicon/hi6220.dtsi      | 55 ++++++++++++++++++++++++++
 2 files changed, 63 insertions(+)
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
index 593c7e4..c2f014e 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
@@ -372,3 +372,11 @@
 &uart3 {
 	label = "LS-UART1";
 };
+
+&ade {
+	status = "ok";
+};
+
+&dsi {
+	status = "ok";
+};
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
index 4f27041..d0b887a 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
@@ -262,6 +262,11 @@
 			#clock-cells = <1>;
 		};
 
+		medianoc_ade: medianoc_ade@f4520000 {
+			compatible = "syscon";
+			reg = <0x0 0xf4520000 0x0 0x4000>;
+		};
+
 		stub_clock: stub_clock {
 			compatible = "hisilicon,hi6220-stub-clk";
 			hisilicon,hi6220-clk-sram = <&sram>;
@@ -850,5 +855,55 @@
 				};
 			};
 		};
+
+		ade: ade@f4100000 {
+			compatible = "hisilicon,hi6220-ade";
+			reg = <0x0 0xf4100000 0x0 0x7800>;
+			reg-names = "ade_base";
+			hisilicon,noc-syscon = <&medianoc_ade>;
+			resets = <&media_ctrl MEDIA_ADE>;
+			interrupts = <0 115 4>; /* ldi interrupt */
+
+			clocks = <&media_ctrl HI6220_ADE_CORE>,
+				 <&media_ctrl HI6220_CODEC_JPEG>,
+				 <&media_ctrl HI6220_ADE_PIX_SRC>;
+			/*clock name*/
+			clock-names  = "clk_ade_core",
+				       "clk_codec_jpeg",
+				       "clk_ade_pix";
+
+			assigned-clocks = <&media_ctrl HI6220_ADE_CORE>,
+				<&media_ctrl HI6220_CODEC_JPEG>;
+			assigned-clock-rates = <360000000>, <288000000>;
+			dma-coherent;
+			status = "disabled";
+
+			port {
+				ade_out: endpoint {
+					remote-endpoint = <&dsi_in>;
+				};
+			};
+		};
+
+		dsi: dsi@f4107800 {
+			compatible = "hisilicon,hi6220-dsi";
+			reg = <0x0 0xf4107800 0x0 0x100>;
+			clocks = <&media_ctrl  HI6220_DSI_PCLK>;
+			clock-names = "pclk";
+			status = "disabled";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				/* 0 for input port */
+				port@0 {
+					reg = <0>;
+					dsi_in: endpoint {
+						remote-endpoint = <&ade_out>;
+					};
+				};
+			};
+		};
 	};
 };
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[RFC][PATCH 3/4] arm64: dts: hikey: Add hikey support for syscon-reboot-mode

From: John Stultz <hidden>
Date: 2016-08-08 23:03:58

Add support to hikey dts for the syscon-reboot-mode driver.

After trying an approach using a sram driver and node, a number
of issues cropped up which would make it so we would be
duplicating a lot of extra syscon infrastructure in order to
support mfds on sram. After talking with Bjorn, using the
syscon driver for this seems like an better choice.

Cc: Andy Yan <andy.yan@rock-chips.com>
Cc: Bjorn Andersson <redacted>
Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: Guodong Xu <redacted>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <redacted>
Cc: linux-arm-kernel@lists.infradead.org
Cc: devicetree@vger.kernel.org
Signed-off-by: John Stultz <redacted>
---
 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
index 8597e9b..b2683e4 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
@@ -29,6 +29,7 @@
 	 * Reserve below regions from memory node:
 	 *
 	 *  0x05e0,0000 - 0x05ef,ffff: MCU firmware runtime using
+	 *  0x05f0,1000 - 0x05f0,1fff: Reboot reason
 	 *  0x06df,f000 - 0x06df,ffff: Mailbox message data
 	 *  0x0740,f000 - 0x0740,ffff: MCU firmware section
 	 *  0x3e00,0000 - 0x3fff,ffff: OP-TEE
@@ -36,11 +37,26 @@
 	memory@0 {
 		device_type = "memory";
 		reg = <0x00000000 0x00000000 0x00000000 0x05e00000>,
-		      <0x00000000 0x05f00000 0x00000000 0x00eff000>,
+		      <0x00000000 0x05f00000 0x00000000 0x00001000>,
+		      <0x00000000 0x05f02000 0x00000000 0x00efd000>,
 		      <0x00000000 0x06e00000 0x00000000 0x0060f000>,
 		      <0x00000000 0x07410000 0x00000000 0x36bf0000>;
 	};
 
+	reboot-mode-syscon@5f01000 {
+		compatible = "syscon", "simple-mfd";
+		reg = <0x0 0x05f01000 0x0 0x00001000>;
+
+		reboot-mode@0 {
+			compatible = "syscon-reboot-mode";
+			offset = <0x0>;
+
+			mode-normal	= <0x77665501>;
+			mode-bootloader	= <0x77665500>;
+			mode-recovery	= <0x77665502>;
+		};
+	};
+
 	soc {
 		spi0: spi@f7106000 {
 			status = "ok";
-- 
1.9.1

[RFC][PATCH 4/4] arm64: dts: hikey: Add pstore support for HiKey

From: John Stultz <hidden>
Date: 2016-08-08 23:04:10

This patch reserves some memory in the DTS and sets up a
pstore device tree node to enable pstore support on HiKey.

Cc: Kees Cook <redacted>
Cc: Guodong Xu <redacted>
Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <redacted>
Cc: linux-arm-kernel@lists.infradead.org
Cc: devicetree@vger.kernel.org
Signed-off-by: John Stultz <redacted>
---
 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
index b2683e4..9140306 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
@@ -32,6 +32,7 @@
 	 *  0x05f0,1000 - 0x05f0,1fff: Reboot reason
 	 *  0x06df,f000 - 0x06df,ffff: Mailbox message data
 	 *  0x0740,f000 - 0x0740,ffff: MCU firmware section
+	 *  0x21f0,0000 - 0x21ff,ffff: pstore/ramoops buffer
 	 *  0x3e00,0000 - 0x3fff,ffff: OP-TEE
 	 */
 	memory@0 {
@@ -40,7 +41,21 @@
 		      <0x00000000 0x05f00000 0x00000000 0x00001000>,
 		      <0x00000000 0x05f02000 0x00000000 0x00efd000>,
 		      <0x00000000 0x06e00000 0x00000000 0x0060f000>,
-		      <0x00000000 0x07410000 0x00000000 0x36bf0000>;
+		      <0x00000000 0x07410000 0x00000000 0x1aaf0000>,
+		      <0x00000000 0x22000000 0x00000000 0x1c000000>;
+	};
+
+	pstore: pstore@0x21f00000 {
+		no-map;
+		reg = <0x0 0x21f00000 0x0 0x00100000>;  /* pstore buffer */
+	};
+
+	ramoops {
+		compatible = "ramoops";
+		memory-region = <&pstore>;
+		record-size	= <0x0 0x00020000>;
+		console-size	= <0x0 0x00020000>;
+		ftrace-size	= <0x0 0x00020000>;
 	};
 
 	reboot-mode-syscon@5f01000 {
-- 
1.9.1

[RFC][PATCH 2/4] arm64: dts: Add HDMI node for hi6220-hikey

From: John Stultz <hidden>
Date: 2016-08-08 23:04:32

From: Xinliang Liu <redacted>

Add adv7533 HDMI DT node for HiKey board.

Cc: Guodong Xu <redacted>
Cc: Wei Xu <xuwei5-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
Cc: Rob Herring <redacted>
Cc: Mark Rutland <redacted>
Cc: Catalin Marinas <redacted>
Cc: Will Deacon <redacted>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Xinliang Liu <redacted>
Signed-off-by: John Stultz <redacted>
---
 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 32 ++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
index c2f014e..8597e9b 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
@@ -379,4 +379,36 @@
 
 &dsi {
 	status = "ok";
+
+	ports {
+		/* 1 for output port */
+		port@1 {
+			reg = <1>;
+
+			dsi_out0: endpoint@0 {
+				remote-endpoint = <&adv7533_in>;
+			};
+		};
+	};
+};
+
+&i2c2 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "ok";
+
+	adv7533: adv7533@39 {
+		compatible = "adi,adv7533";
+		reg = <0x39>;
+		interrupt-parent = <&gpio1>;
+		interrupts = <1 2>;
+		pd-gpio = <&gpio0 4 0>;
+		adi,dsi-lanes = <4>;
+
+		port {
+			adv7533_in: endpoint {
+				remote-endpoint = <&dsi_out0>;
+			};
+		};
+	};
 };
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [RFC][PATCH 4/4] arm64: dts: hikey: Add pstore support for HiKey

From: Kees Cook <hidden>
Date: 2016-08-08 23:21:02

On Mon, Aug 8, 2016 at 4:03 PM, John Stultz [off-list ref] wrote:
quoted hunk
This patch reserves some memory in the DTS and sets up a
pstore device tree node to enable pstore support on HiKey.

Cc: Kees Cook <redacted>
Cc: Guodong Xu <redacted>
Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <redacted>
Cc: linux-arm-kernel@lists.infradead.org
Cc: devicetree@vger.kernel.org
Signed-off-by: John Stultz <redacted>
---
 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
index b2683e4..9140306 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
@@ -32,6 +32,7 @@
         *  0x05f0,1000 - 0x05f0,1fff: Reboot reason
         *  0x06df,f000 - 0x06df,ffff: Mailbox message data
         *  0x0740,f000 - 0x0740,ffff: MCU firmware section
+        *  0x21f0,0000 - 0x21ff,ffff: pstore/ramoops buffer
         *  0x3e00,0000 - 0x3fff,ffff: OP-TEE
         */
        memory@0 {
@@ -40,7 +41,21 @@
                      <0x00000000 0x05f00000 0x00000000 0x00001000>,
                      <0x00000000 0x05f02000 0x00000000 0x00efd000>,
                      <0x00000000 0x06e00000 0x00000000 0x0060f000>,
-                     <0x00000000 0x07410000 0x00000000 0x36bf0000>;
+                     <0x00000000 0x07410000 0x00000000 0x1aaf0000>,
+                     <0x00000000 0x22000000 0x00000000 0x1c000000>;
+       };
+
+       pstore: pstore@0x21f00000 {
+               no-map;
+               reg = <0x0 0x21f00000 0x0 0x00100000>;  /* pstore buffer */
+       };
+
+       ramoops {
+               compatible = "ramoops";
+               memory-region = <&pstore>;
+               record-size     = <0x0 0x00020000>;
+               console-size    = <0x0 0x00020000>;
+               ftrace-size     = <0x0 0x00020000>;
        };

        reboot-mode-syscon@5f01000 {
Heh, sorry, we changed the pstore DT format out from under you. :)

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=529182e204db083cb7bda832d1c5c6d9278ba1cb

But otherwise, sure!

-Kees

-- 
Kees Cook
Nexus Security

Re: [RFC][PATCH 4/4] arm64: dts: hikey: Add pstore support for HiKey

From: John Stultz <hidden>
Date: 2016-08-08 23:24:00

On Mon, Aug 8, 2016 at 4:20 PM, Kees Cook [off-list ref] wrote:
On Mon, Aug 8, 2016 at 4:03 PM, John Stultz [off-list ref] wrote:
quoted
This patch reserves some memory in the DTS and sets up a
pstore device tree node to enable pstore support on HiKey.

Cc: Kees Cook <redacted>
Cc: Guodong Xu <redacted>
Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <redacted>
Cc: linux-arm-kernel@lists.infradead.org
Cc: devicetree@vger.kernel.org
Signed-off-by: John Stultz <redacted>
---
 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
index b2683e4..9140306 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
@@ -32,6 +32,7 @@
         *  0x05f0,1000 - 0x05f0,1fff: Reboot reason
         *  0x06df,f000 - 0x06df,ffff: Mailbox message data
         *  0x0740,f000 - 0x0740,ffff: MCU firmware section
+        *  0x21f0,0000 - 0x21ff,ffff: pstore/ramoops buffer
         *  0x3e00,0000 - 0x3fff,ffff: OP-TEE
         */
        memory@0 {
@@ -40,7 +41,21 @@
                      <0x00000000 0x05f00000 0x00000000 0x00001000>,
                      <0x00000000 0x05f02000 0x00000000 0x00efd000>,
                      <0x00000000 0x06e00000 0x00000000 0x0060f000>,
-                     <0x00000000 0x07410000 0x00000000 0x36bf0000>;
+                     <0x00000000 0x07410000 0x00000000 0x1aaf0000>,
+                     <0x00000000 0x22000000 0x00000000 0x1c000000>;
+       };
+
+       pstore: pstore@0x21f00000 {
+               no-map;
+               reg = <0x0 0x21f00000 0x0 0x00100000>;  /* pstore buffer */
+       };
+
+       ramoops {
+               compatible = "ramoops";
+               memory-region = <&pstore>;
+               record-size     = <0x0 0x00020000>;
+               console-size    = <0x0 0x00020000>;
+               ftrace-size     = <0x0 0x00020000>;
        };

        reboot-mode-syscon@5f01000 {
Heh, sorry, we changed the pstore DT format out from under you. :)

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=529182e204db083cb7bda832d1c5c6d9278ba1cb

But otherwise, sure!
Ah! Right. Rob gave me a heads up on this last week, but I forgot
about it over the weekend.

thanks!
-john

[RFC][PATCH 4/4 v2] arm64: dts: hikey: Add pstore support for HiKey

From: John Stultz <hidden>
Date: 2016-08-08 23:48:50

This patch reserves some memory in the DTS and sets up a
pstore device tree node to enable pstore support on HiKey.

Cc: Kees Cook <redacted>
Cc: Guodong Xu <redacted>
Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <redacted>
Cc: linux-arm-kernel@lists.infradead.org
Cc: devicetree@vger.kernel.org
Signed-off-by: John Stultz <redacted>
---
v2: Quick rework to update to new ramoops format.

 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
index b2683e4..748d0dc 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
@@ -32,6 +32,7 @@
 	 *  0x05f0,1000 - 0x05f0,1fff: Reboot reason
 	 *  0x06df,f000 - 0x06df,ffff: Mailbox message data
 	 *  0x0740,f000 - 0x0740,ffff: MCU firmware section
+	 *  0x21f0,0000 - 0x21ff,ffff: pstore/ramoops buffer
 	 *  0x3e00,0000 - 0x3fff,ffff: OP-TEE
 	 */
 	memory@0 {
@@ -40,9 +41,25 @@
 		      <0x00000000 0x05f00000 0x00000000 0x00001000>,
 		      <0x00000000 0x05f02000 0x00000000 0x00efd000>,
 		      <0x00000000 0x06e00000 0x00000000 0x0060f000>,
-		      <0x00000000 0x07410000 0x00000000 0x36bf0000>;
+		      <0x00000000 0x07410000 0x00000000 0x1aaf0000>,
+		      <0x00000000 0x22000000 0x00000000 0x1c000000>;
 	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		ramoops@0x21f00000 {
+			compatible = "ramoops";
+			reg = <0x0 0x21f00000 0x0 0x00100000>;
+			record-size	= <0x00020000>;
+			console-size	= <0x00020000>;
+			ftrace-size	= <0x00020000>;
+		};
+	};
+
+
 	reboot-mode-syscon@5f01000 {
 		compatible = "syscon", "simple-mfd";
 		reg = <0x0 0x05f01000 0x0 0x00001000>;
-- 
1.9.1

Re: [RFC][PATCH 4/4 v2] arm64: dts: hikey: Add pstore support for HiKey

From: Kees Cook <hidden>
Date: 2016-08-09 00:36:10

On Mon, Aug 8, 2016 at 4:48 PM, John Stultz [off-list ref] wrote:
This patch reserves some memory in the DTS and sets up a
pstore device tree node to enable pstore support on HiKey.

Cc: Kees Cook <redacted>
Cc: Guodong Xu <redacted>
Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <redacted>
Cc: linux-arm-kernel@lists.infradead.org
Cc: devicetree@vger.kernel.org
Signed-off-by: John Stultz <redacted>
This looks right to me. :)

Reviewed-by: Kees Cook <redacted>
quoted hunk
---
v2: Quick rework to update to new ramoops format.

 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
index b2683e4..748d0dc 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
@@ -32,6 +32,7 @@
         *  0x05f0,1000 - 0x05f0,1fff: Reboot reason
         *  0x06df,f000 - 0x06df,ffff: Mailbox message data
         *  0x0740,f000 - 0x0740,ffff: MCU firmware section
+        *  0x21f0,0000 - 0x21ff,ffff: pstore/ramoops buffer
         *  0x3e00,0000 - 0x3fff,ffff: OP-TEE
         */
        memory@0 {
@@ -40,9 +41,25 @@
                      <0x00000000 0x05f00000 0x00000000 0x00001000>,
                      <0x00000000 0x05f02000 0x00000000 0x00efd000>,
                      <0x00000000 0x06e00000 0x00000000 0x0060f000>,
-                     <0x00000000 0x07410000 0x00000000 0x36bf0000>;
+                     <0x00000000 0x07410000 0x00000000 0x1aaf0000>,
+                     <0x00000000 0x22000000 0x00000000 0x1c000000>;
        };

+       reserved-memory {
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               ramoops@0x21f00000 {
+                       compatible = "ramoops";
+                       reg = <0x0 0x21f00000 0x0 0x00100000>;
+                       record-size     = <0x00020000>;
+                       console-size    = <0x00020000>;
+                       ftrace-size     = <0x00020000>;
+               };
+       };
+
+
        reboot-mode-syscon@5f01000 {
                compatible = "syscon", "simple-mfd";
                reg = <0x0 0x05f01000 0x0 0x00001000>;
--
1.9.1


-- 
Kees Cook
Nexus Security

Re: [RFC][PATCH 3/4] arm64: dts: hikey: Add hikey support for syscon-reboot-mode

From: Bjorn Andersson <hidden>
Date: 2016-08-10 04:34:31

On Mon 08 Aug 16:03 PDT 2016, John Stultz wrote:

[..]
quoted hunk
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
[..]
 	memory@0 {
 		device_type = "memory";
 		reg = <0x00000000 0x00000000 0x00000000 0x05e00000>,
-		      <0x00000000 0x05f00000 0x00000000 0x00eff000>,
+		      <0x00000000 0x05f00000 0x00000000 0x00001000>,
+		      <0x00000000 0x05f02000 0x00000000 0x00efd000>,
 		      <0x00000000 0x06e00000 0x00000000 0x0060f000>,
 		      <0x00000000 0x07410000 0x00000000 0x36bf0000>;
 	};
As I said when talked about this, I don't think you should punch holes
in the /memory node, but rather add these regions as no-map in a
/reserved-memory node. But that's a unrelated matter.
 
+	reboot-mode-syscon@5f01000 {
+		compatible = "syscon", "simple-mfd";
+		reg = <0x0 0x05f01000 0x0 0x00001000>;
+
+		reboot-mode@0 {
Drop the @0

Other than that:
Acked-by: Bjorn Andersson <redacted>
+			compatible = "syscon-reboot-mode";
+			offset = <0x0>;
+
+			mode-normal	= <0x77665501>;
+			mode-bootloader	= <0x77665500>;
+			mode-recovery	= <0x77665502>;
+		};
+	};
+
 	soc {
 		spi0: spi@f7106000 {
 			status = "ok";
Regards,
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [RFC][PATCH 3/4] arm64: dts: hikey: Add hikey support for syscon-reboot-mode

From: John Stultz <hidden>
Date: 2016-08-10 04:58:22

On Tue, Aug 9, 2016 at 9:34 PM, Bjorn Andersson
[off-list ref] wrote:
On Mon 08 Aug 16:03 PDT 2016, John Stultz wrote:

[..]
quoted
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
[..]
quoted
      memory@0 {
              device_type = "memory";
              reg = <0x00000000 0x00000000 0x00000000 0x05e00000>,
-                   <0x00000000 0x05f00000 0x00000000 0x00eff000>,
+                   <0x00000000 0x05f00000 0x00000000 0x00001000>,
+                   <0x00000000 0x05f02000 0x00000000 0x00efd000>,
                    <0x00000000 0x06e00000 0x00000000 0x0060f000>,
                    <0x00000000 0x07410000 0x00000000 0x36bf0000>;
      };
As I said when talked about this, I don't think you should punch holes
in the /memory node, but rather add these regions as no-map in a
/reserved-memory node. But that's a unrelated matter.
Yea. I need to sync w/ Wei and Guodong to see about reworking all of
those to use /reserved-memory, but for now I'd like to stay in sync w/
how they have it setup.
quoted
+     reboot-mode-syscon@5f01000 {
+             compatible = "syscon", "simple-mfd";
+             reg = <0x0 0x05f01000 0x0 0x00001000>;
+
+             reboot-mode@0 {
Drop the @0
Will do.

Other than that:
Acked-by: Bjorn Andersson <redacted>
Thanks!
-john
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [RFC][PATCH 3/4] arm64: dts: hikey: Add hikey support for syscon-reboot-mode

From: Wei Xu <xuwei5@hisilicon.com>
Date: 2016-08-12 13:34:40

Hi All,

On 10/08/2016 05:58, John Stultz wrote:
On Tue, Aug 9, 2016 at 9:34 PM, Bjorn Andersson
[off-list ref] wrote:
quoted
On Mon 08 Aug 16:03 PDT 2016, John Stultz wrote:

[..]
quoted
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
[..]
quoted
      memory@0 {
              device_type = "memory";
              reg = <0x00000000 0x00000000 0x00000000 0x05e00000>,
-                   <0x00000000 0x05f00000 0x00000000 0x00eff000>,
+                   <0x00000000 0x05f00000 0x00000000 0x00001000>,
+                   <0x00000000 0x05f02000 0x00000000 0x00efd000>,
                    <0x00000000 0x06e00000 0x00000000 0x0060f000>,
                    <0x00000000 0x07410000 0x00000000 0x36bf0000>;
      };
As I said when talked about this, I don't think you should punch holes
in the /memory node, but rather add these regions as no-map in a
/reserved-memory node. But that's a unrelated matter.
Yea. I need to sync w/ Wei and Guodong to see about reworking all of
those to use /reserved-memory, but for now I'd like to stay in sync w/
how they have it setup.
Both are fine to me.
I remember before we had a discussion [1].
How about we add these functions this time and clean the memory node
in the future if needed?

[1] http://patches.linaro.org/patch/54682/

Best Regards,
Wei
quoted
quoted
+     reboot-mode-syscon@5f01000 {
+             compatible = "syscon", "simple-mfd";
+             reg = <0x0 0x05f01000 0x0 0x00001000>;
+
+             reboot-mode@0 {
Drop the @0
Will do.

quoted
Other than that:
Acked-by: Bjorn Andersson <redacted>
Thanks!
-john

.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [RFC][PATCH 3/4] arm64: dts: hikey: Add hikey support for syscon-reboot-mode

From: Bjorn Andersson <hidden>
Date: 2016-08-12 16:12:02

On Fri 12 Aug 06:34 PDT 2016, Wei Xu wrote:
Hi All,

On 10/08/2016 05:58, John Stultz wrote:
quoted
On Tue, Aug 9, 2016 at 9:34 PM, Bjorn Andersson
[off-list ref] wrote:
quoted
On Mon 08 Aug 16:03 PDT 2016, John Stultz wrote:

[..]
quoted
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
[..]
quoted
      memory@0 {
              device_type = "memory";
              reg = <0x00000000 0x00000000 0x00000000 0x05e00000>,
-                   <0x00000000 0x05f00000 0x00000000 0x00eff000>,
+                   <0x00000000 0x05f00000 0x00000000 0x00001000>,
+                   <0x00000000 0x05f02000 0x00000000 0x00efd000>,
                    <0x00000000 0x06e00000 0x00000000 0x0060f000>,
                    <0x00000000 0x07410000 0x00000000 0x36bf0000>;
      };
As I said when talked about this, I don't think you should punch holes
in the /memory node, but rather add these regions as no-map in a
/reserved-memory node. But that's a unrelated matter.
Yea. I need to sync w/ Wei and Guodong to see about reworking all of
those to use /reserved-memory, but for now I'd like to stay in sync w/
how they have it setup.
Both are fine to me.
I remember before we had a discussion [1].
How about we add these functions this time and clean the memory node
in the future if needed?

[1] http://patches.linaro.org/patch/54682/
I agree, you should not hold up John's addition on changing to
reserve-memory, as these are unrelated changes..

But I would recommend that you take the time to do the switch to
/reserve-memory before next change to /memory comes in, as that change
will be just as unrelated.

Regards,
Bjorn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help