All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv: dts: sophgo: add reserved memory node for CV1800B
@ 2024-04-11  0:45 ` Inochi Amaoto
  0 siblings, 0 replies; 4+ messages in thread
From: Inochi Amaoto @ 2024-04-11  0:45 UTC (permalink / raw
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
	Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Jisheng Zhang, Guo Ren, Drew Fustini
  Cc: devicetree, linux-riscv, linux-kernel

The original dts of CV1800B has a weird memory length as it
contains reserved memory for coprocessor. Make this area a
separate node so it can get the real memory length.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
---
 arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts | 12 +++++++++---
 arch/riscv/boot/dts/sophgo/cv1800b.dtsi          |  5 +++++
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts
index 3af9e34b3bc7..0b9128513357 100644
--- a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts
+++ b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts
@@ -23,9 +23,15 @@ chosen {
 		stdout-path = "serial0:115200n8";
 	};

-	memory@80000000 {
-		device_type = "memory";
-		reg = <0x80000000 0x3f40000>;
+	reserved-memory {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		coprocessor_rtos: region@83f40000 {
+			reg = <0x83f40000 0xc0000>;
+			no-map;
+		};
 	};
 };

diff --git a/arch/riscv/boot/dts/sophgo/cv1800b.dtsi b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi
index 165e9e320a8c..17ce8aa415a8 100644
--- a/arch/riscv/boot/dts/sophgo/cv1800b.dtsi
+++ b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi
@@ -7,6 +7,11 @@

 / {
 	compatible = "sophgo,cv1800b";
+
+	memory@80000000 {
+		device_type = "memory";
+		reg = <0x80000000 0x4000000>;
+	};
 };

 &plic {
--
2.44.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] riscv: dts: sophgo: add reserved memory node for CV1800B
@ 2024-04-11  0:45 ` Inochi Amaoto
  0 siblings, 0 replies; 4+ messages in thread
From: Inochi Amaoto @ 2024-04-11  0:45 UTC (permalink / raw
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
	Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Jisheng Zhang, Guo Ren, Drew Fustini
  Cc: devicetree, linux-riscv, linux-kernel

The original dts of CV1800B has a weird memory length as it
contains reserved memory for coprocessor. Make this area a
separate node so it can get the real memory length.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
---
 arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts | 12 +++++++++---
 arch/riscv/boot/dts/sophgo/cv1800b.dtsi          |  5 +++++
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts
index 3af9e34b3bc7..0b9128513357 100644
--- a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts
+++ b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts
@@ -23,9 +23,15 @@ chosen {
 		stdout-path = "serial0:115200n8";
 	};

-	memory@80000000 {
-		device_type = "memory";
-		reg = <0x80000000 0x3f40000>;
+	reserved-memory {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		coprocessor_rtos: region@83f40000 {
+			reg = <0x83f40000 0xc0000>;
+			no-map;
+		};
 	};
 };

diff --git a/arch/riscv/boot/dts/sophgo/cv1800b.dtsi b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi
index 165e9e320a8c..17ce8aa415a8 100644
--- a/arch/riscv/boot/dts/sophgo/cv1800b.dtsi
+++ b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi
@@ -7,6 +7,11 @@

 / {
 	compatible = "sophgo,cv1800b";
+
+	memory@80000000 {
+		device_type = "memory";
+		reg = <0x80000000 0x4000000>;
+	};
 };

 &plic {
--
2.44.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] riscv: dts: sophgo: add reserved memory node for CV1800B
  2024-04-11  0:45 ` Inochi Amaoto
@ 2024-04-23  8:40   ` Inochi Amaoto
  -1 siblings, 0 replies; 4+ messages in thread
From: Inochi Amaoto @ 2024-04-23  8:40 UTC (permalink / raw
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Jisheng Zhang, Guo Ren,
	Drew Fustini, Inochi Amaoto
  Cc: devicetree, linux-riscv, linux-kernel

On Thu, 11 Apr 2024 08:45:00 +0800, Inochi Amaoto wrote:
> The original dts of CV1800B has a weird memory length as it
> contains reserved memory for coprocessor. Make this area a
> separate node so it can get the real memory length.
> 
> 

Applied to sophgo/for-next, thanks!

[1/1] riscv: dts: sophgo: add reserved memory node for CV1800B
      https://github.com/sophgo/linux/commit/1eba0b61be72506549e79dd11a132b5d73aed094

Thanks,
Inochi


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] riscv: dts: sophgo: add reserved memory node for CV1800B
@ 2024-04-23  8:40   ` Inochi Amaoto
  0 siblings, 0 replies; 4+ messages in thread
From: Inochi Amaoto @ 2024-04-23  8:40 UTC (permalink / raw
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Jisheng Zhang, Guo Ren,
	Drew Fustini, Inochi Amaoto
  Cc: devicetree, linux-riscv, linux-kernel

On Thu, 11 Apr 2024 08:45:00 +0800, Inochi Amaoto wrote:
> The original dts of CV1800B has a weird memory length as it
> contains reserved memory for coprocessor. Make this area a
> separate node so it can get the real memory length.
> 
> 

Applied to sophgo/for-next, thanks!

[1/1] riscv: dts: sophgo: add reserved memory node for CV1800B
      https://github.com/sophgo/linux/commit/1eba0b61be72506549e79dd11a132b5d73aed094

Thanks,
Inochi


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-23  8:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-11  0:45 [PATCH] riscv: dts: sophgo: add reserved memory node for CV1800B Inochi Amaoto
2024-04-11  0:45 ` Inochi Amaoto
2024-04-23  8:40 ` Inochi Amaoto
2024-04-23  8:40   ` Inochi Amaoto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.