Skip to contentSkip to conversation

arm64: dts: Add display subsystem DT nodes for hi6220-hikey

RFC PATCH In review John Stultz 4 participants 12 messages Aug 8, 2016 – Aug 12, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

From: Xinliang Liu <[email protected]>

Add ade and dsi DT nodes for hikey board.

Cc Guodong Xu <[email protected]>
Cc Wei Xu <[email protected]>
Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc devicetree at vger.kernel.org
---
 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts |  8 ++++
 arch/arm64/boot/dts/hisilicon/hi6220.dtsi      | 55 ++++++++++++++++++++++++++
 2 files changed, 63 insertions(+)
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +8 -0
index 593c7e4..c2f014e 100644
@@ -372,3 +372,11 @@
 &uart3 {
 	label = "LS-UART1";
 };
+
+&ade {
+	status = "ok";
+};
+
+&dsi {
+	status = "ok";
+};
arch/arm64/boot/dts/hisilicon/hi6220.dtsi +55 -0

66 lines not on this page · raw message

Signature · 1 line
1.9.1
#1 lore raw

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

From: Xinliang Liu <[email protected]>

Add adv7533 HDMI DT node for HiKey board.

Cc Guodong Xu <[email protected]>
Cc Wei Xu <[email protected]>
Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc devicetree at vger.kernel.org
---
 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 32 ++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +32 -0
index c2f014e..8597e9b 100644
@@ -379,4 +379,36 @@
 
 &dsi {
 	status = "ok";
+
+	ports {
+		/* 1 for output port */
+		port at 1 {
+			reg = <1>;
+
+			dsi_out0: endpoint at 0 {
+				remote-endpoint = <&adv7533_in>;
+			};
+		};
+	};
+};
+
+&i2c2 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "ok";
+
+	adv7533: adv7533 at 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>;
+			};
+		};
+	};
 };
Signature · 1 line
1.9.1
#2 lore raw

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

In reply to John Stultz

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 <[email protected]>
Cc Bjorn Andersson <[email protected]>
Cc Haojian Zhuang <[email protected]>
Cc Guodong Xu <[email protected]>
Cc Wei Xu <[email protected]>
Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc devicetree at vger.kernel.org
---
 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +17 -1
index 8597e9b..b2683e4 100644
@@ -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 at 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 at 5f01000 {
+		compatible = "syscon", "simple-mfd";
+		reg = <0x0 0x05f01000 0x0 0x00001000>;
+
+		reboot-mode at 0 {
+			compatible = "syscon-reboot-mode";
+			offset = <0x0>;
+
+			mode-normal	= <0x77665501>;
+			mode-bootloader	= <0x77665500>;
+			mode-recovery	= <0x77665502>;
+		};
+	};
+
 	soc {
 		spi0: spi at f7106000 {
 			status = "ok";
Signature · 1 line
1.9.1
Acked-by on v1 3/4
#3 lore raw

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

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

[..]

Quoted 1 line
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +0 -0

[..]

arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts line 44

Quoted 9 lines
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +2 -1
 	memory at 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.

arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts line 50

Quoted 6 lines
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +5 -0
+	reboot-mode-syscon at 5f01000 {
+		compatible = "syscon", "simple-mfd";
+		reg = <0x0 0x05f01000 0x0 0x00001000>;
+
+		reboot-mode at 0 {

Drop the @0

Other than that:

arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts line 62

Quoted 12 lines
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +9 -0
+			compatible = "syscon-reboot-mode";
+			offset = <0x0>;
+
+			mode-normal	= <0x77665501>;
+			mode-bootloader	= <0x77665500>;
+			mode-recovery	= <0x77665502>;
+		};
+	};
+
 	soc {
 		spi0: spi at f7106000 {
 			status = "ok";

Regards,
Bjorn

#4 lore raw

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

Quoted 15 lines · Bjorn Andersson

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

[..]

Quoted 1 line
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +0 -0

[..]

arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts line 44

Quoted 9 lines
      memory at 0 {
              device_type = "memory";
              reg = <0x00000000 0x00000000 0x00000000 0x05e00000>,
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +2 -1
-                   <0x00000000 0x05f00000 0x00000000 0x00eff000>,
+                   <0x00000000 0x05f00000 0x00000000 0x00001000>,
+                   <0x00000000 0x05f02000 0x00000000 0x00efd000>,
                    <0x00000000 0x06e00000 0x00000000 0x0060f000>,
                    <0x00000000 0x07410000 0x00000000 0x36bf0000>;
      };
Quoted 3 lines

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 8 lines

arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts line 50

Quoted 6 lines
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +5 -0
+     reboot-mode-syscon at 5f01000 {
+             compatible = "syscon", "simple-mfd";
+             reg = <0x0 0x05f01000 0x0 0x00001000>;
+
+             reboot-mode at 0 {

Drop the @0

Will do.

Quoted 3 lines

Other than that:

Thanks!
-john

maintainer
#5 lore raw

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

Hi All,

Quoted 17 lines · John Stultz
Quoted 15 lines · Bjorn Andersson

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

[..]

Quoted 1 line
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +0 -0

[..]

Quoted 9 lines
      memory at 0 {
              device_type = "memory";
              reg = <0x00000000 0x00000000 0x00000000 0x05e00000>,
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +2 -1
-                   <0x00000000 0x05f00000 0x00000000 0x00eff000>,
+                   <0x00000000 0x05f00000 0x00000000 0x00001000>,
+                   <0x00000000 0x05f02000 0x00000000 0x00efd000>,
                    <0x00000000 0x06e00000 0x00000000 0x0060f000>,
                    <0x00000000 0x07410000 0x00000000 0x36bf0000>;
      };
Quoted 8 lines
Quoted 3 lines

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 21 lines
Quoted 8 lines

arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts line 50

Quoted 6 lines
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +5 -0
+     reboot-mode-syscon at 5f01000 {
+             compatible = "syscon", "simple-mfd";
+             reg = <0x0 0x05f01000 0x0 0x00001000>;
+
+             reboot-mode at 0 {

Drop the @0

Will do.

Quoted 3 lines

Other than that:

Thanks!
-john

.

#6 lore raw

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

Quoted 29 lines · Wei Xu

Hi All,

Quoted 17 lines · John Stultz
Quoted 15 lines · Bjorn Andersson

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

[..]

Quoted 1 line
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +0 -0

[..]

Quoted 9 lines
      memory at 0 {
              device_type = "memory";
              reg = <0x00000000 0x00000000 0x00000000 0x05e00000>,
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +2 -1
-                   <0x00000000 0x05f00000 0x00000000 0x00eff000>,
+                   <0x00000000 0x05f00000 0x00000000 0x00001000>,
+                   <0x00000000 0x05f02000 0x00000000 0x00efd000>,
                    <0x00000000 0x06e00000 0x00000000 0x0060f000>,
                    <0x00000000 0x07410000 0x00000000 0x36bf0000>;
      };
Quoted 8 lines
Quoted 3 lines

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 6 lines

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

#7 lore raw

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

In reply to John Stultz

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 <[email protected]>
Cc Guodong Xu <[email protected]>
Cc Haojian Zhuang <[email protected]>
Cc Wei Xu <[email protected]>
Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc devicetree at vger.kernel.org
---
 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +16 -1
index b2683e4..9140306 100644
@@ -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 at 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 at 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 at 5f01000 {
Signature · 1 line
1.9.1
#8 lore raw

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

Quoted 43 lines · John Stultz

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 <[email protected]>
Cc Guodong Xu <[email protected]>
Cc Haojian Zhuang <[email protected]>
Cc Wei Xu <[email protected]>
Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc devicetree at vger.kernel.org
---
 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +9 -1
index b2683e4..9140306 100644
@@ -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 at 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 at 0x21f00000 {
+               no-map;
+               reg = <0x0 0x21f00000 0x0 0x00100000>;  /* pstore buffer */
+       };

arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts line 61

Quoted 10 lines
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +7 -0
+
+       ramoops {
+               compatible = "ramoops";
+               memory-region = <&pstore>;
+               record-size     = <0x0 0x00020000>;
+               console-size    = <0x0 0x00020000>;
+               ftrace-size     = <0x0 0x00020000>;
        };
 
        reboot-mode-syscon at 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

Signature · 2 lines
Kees Cook
Nexus Security
#9 lore raw

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

Quoted 53 lines · Kees Cook
Quoted 52 lines · John Stultz

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 <[email protected]>
Cc Guodong Xu <[email protected]>
Cc Haojian Zhuang <[email protected]>
Cc Wei Xu <[email protected]>
Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc devicetree at vger.kernel.org
---
 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +16 -1
index b2683e4..9140306 100644
@@ -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 at 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 at 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>;
        };
 
Quoted 7 lines

arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts line 61

Quoted 1 line
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +0 -0
        reboot-mode-syscon at 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

#10 lore raw

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

In reply to Kees Cook

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 <[email protected]>
Cc Guodong Xu <[email protected]>
Cc Haojian Zhuang <[email protected]>
Cc Wei Xu <[email protected]>
Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc devicetree at vger.kernel.org

---
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(-)
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +18 -1
index b2683e4..748d0dc 100644
@@ -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 at 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 at 0x21f00000 {
+			compatible = "ramoops";
+			reg = <0x0 0x21f00000 0x0 0x00100000>;
+			record-size	= <0x00020000>;
+			console-size	= <0x00020000>;
+			ftrace-size	= <0x00020000>;
+		};
+	};
+
+
 	reboot-mode-syscon at 5f01000 {
 		compatible = "syscon", "simple-mfd";
 		reg = <0x0 0x05f01000 0x0 0x00001000>;
Signature · 1 line
1.9.1
Reviewed-by on v2 4/4
#11 lore raw

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

Quoted 14 lines · John Stultz

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 <[email protected]>
Cc Guodong Xu <[email protected]>
Cc Haojian Zhuang <[email protected]>
Cc Wei Xu <[email protected]>
Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc devicetree at vger.kernel.org

This looks right to me. :)

Quoted 48 lines

---
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(-)
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +18 -2
index b2683e4..748d0dc 100644
@@ -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 at 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 at 0x21f00000 {
+                       compatible = "ramoops";
+                       reg = <0x0 0x21f00000 0x0 0x00100000>;
+                       record-size     = <0x00020000>;
+                       console-size    = <0x00020000>;
+                       ftrace-size     = <0x00020000>;
+               };
+       };
+
+
        reboot-mode-syscon at 5f01000 {
                compatible = "syscon", "simple-mfd";
                reg = <0x0 0x05f01000 0x0 0x00001000>;
--

1.9.1

Signature · 2 lines
Kees Cook
Nexus Security