linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] MIPS: ingenic: DTS: Add memory info of GCW Zero
@ 2020-05-25 17:41 Paul Cercueil
  2020-05-25 17:41 ` [PATCH 2/3] MIPS: ingenic: Add support for GCW Zero prototype Paul Cercueil
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Paul Cercueil @ 2020-05-25 17:41 UTC (permalink / raw)
  To: Thomas Bogendoerfer
  Cc: od, devicetree, linux-mips, linux-kernel, Paul Cercueil

Add memory info of the GCW Zero in its devicetree. The bootloader
generally provides this information, but since it is fixed to 512 MiB,
it doesn't hurt to have it in devicetree. It allows the kernel to boot
without any parameter passed as argument.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 arch/mips/boot/dts/ingenic/gcw0.dts | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/mips/boot/dts/ingenic/gcw0.dts b/arch/mips/boot/dts/ingenic/gcw0.dts
index c2396b5ca175..8d22828787d8 100644
--- a/arch/mips/boot/dts/ingenic/gcw0.dts
+++ b/arch/mips/boot/dts/ingenic/gcw0.dts
@@ -19,6 +19,12 @@ aliases {
 		serial3 = &uart3;
 	};
 
+	memory: memory {
+		device_type = "memory";
+		reg = <0x0 0x10000000>,
+		      <0x30000000 0x10000000>;
+	};
+
 	chosen {
 		stdout-path = "serial2:57600n8";
 	};
-- 
2.26.2


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

* [PATCH 2/3] MIPS: ingenic: Add support for GCW Zero prototype
  2020-05-25 17:41 [PATCH 1/3] MIPS: ingenic: DTS: Add memory info of GCW Zero Paul Cercueil
@ 2020-05-25 17:41 ` Paul Cercueil
  2020-05-25 17:41 ` [PATCH 3/3] MIPS: ingenic: Default to a generic board Paul Cercueil
  2020-05-27 11:36 ` [PATCH 1/3] MIPS: ingenic: DTS: Add memory info of GCW Zero Thomas Bogendoerfer
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Cercueil @ 2020-05-25 17:41 UTC (permalink / raw)
  To: Thomas Bogendoerfer
  Cc: od, devicetree, linux-mips, linux-kernel, Paul Cercueil

Add support for the GCW Zero prototype. The only (?) difference is that
it only has 256 MiB of RAM, compared to the 512 MiB of RAM of the retail
device.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 arch/mips/boot/dts/ingenic/gcw0_proto.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 arch/mips/boot/dts/ingenic/gcw0_proto.dts

diff --git a/arch/mips/boot/dts/ingenic/gcw0_proto.dts b/arch/mips/boot/dts/ingenic/gcw0_proto.dts
new file mode 100644
index 000000000000..02df22f8ae0f
--- /dev/null
+++ b/arch/mips/boot/dts/ingenic/gcw0_proto.dts
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+
+#include "gcw0.dts"
+
+/ {
+	model = "GCW Zero Prototype";
+};
+
+&memory {
+	/* Prototype has only 256 MiB of RAM */
+	reg = <0x0 0x10000000>;
+};
-- 
2.26.2


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

* [PATCH 3/3] MIPS: ingenic: Default to a generic board
  2020-05-25 17:41 [PATCH 1/3] MIPS: ingenic: DTS: Add memory info of GCW Zero Paul Cercueil
  2020-05-25 17:41 ` [PATCH 2/3] MIPS: ingenic: Add support for GCW Zero prototype Paul Cercueil
@ 2020-05-25 17:41 ` Paul Cercueil
  2020-05-27 11:36 ` [PATCH 1/3] MIPS: ingenic: DTS: Add memory info of GCW Zero Thomas Bogendoerfer
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Cercueil @ 2020-05-25 17:41 UTC (permalink / raw)
  To: Thomas Bogendoerfer
  Cc: od, devicetree, linux-mips, linux-kernel, Paul Cercueil

Having a generic board option makes it possible to create a kernel that
will run on various Ingenic SoCs, as long as the right devicetree is
provided.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 arch/mips/jz4740/Kconfig | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/arch/mips/jz4740/Kconfig b/arch/mips/jz4740/Kconfig
index 412d2faa3cdf..9c2e8c15bb97 100644
--- a/arch/mips/jz4740/Kconfig
+++ b/arch/mips/jz4740/Kconfig
@@ -2,7 +2,14 @@
 choice
 	prompt "Machine type"
 	depends on MACH_INGENIC
-	default JZ4740_QI_LB60
+	default INGENIC_GENERIC_BOARD
+
+config INGENIC_GENERIC_BOARD
+	bool "Generic board"
+	select MACH_JZ4740
+	select MACH_JZ4770
+	select MACH_JZ4780
+	select MACH_X1000
 
 config JZ4740_QI_LB60
 	bool "Qi Hardware Ben NanoNote"
-- 
2.26.2


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

* Re: [PATCH 1/3] MIPS: ingenic: DTS: Add memory info of GCW Zero
  2020-05-25 17:41 [PATCH 1/3] MIPS: ingenic: DTS: Add memory info of GCW Zero Paul Cercueil
  2020-05-25 17:41 ` [PATCH 2/3] MIPS: ingenic: Add support for GCW Zero prototype Paul Cercueil
  2020-05-25 17:41 ` [PATCH 3/3] MIPS: ingenic: Default to a generic board Paul Cercueil
@ 2020-05-27 11:36 ` Thomas Bogendoerfer
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Bogendoerfer @ 2020-05-27 11:36 UTC (permalink / raw)
  To: Paul Cercueil; +Cc: od, devicetree, linux-mips, linux-kernel

On Mon, May 25, 2020 at 07:41:53PM +0200, Paul Cercueil wrote:
> Add memory info of the GCW Zero in its devicetree. The bootloader
> generally provides this information, but since it is fixed to 512 MiB,
> it doesn't hurt to have it in devicetree. It allows the kernel to boot
> without any parameter passed as argument.
> 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  arch/mips/boot/dts/ingenic/gcw0.dts | 6 ++++++
>  1 file changed, 6 insertions(+)

applied patch 1-3 to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

end of thread, other threads:[~2020-05-27 11:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25 17:41 [PATCH 1/3] MIPS: ingenic: DTS: Add memory info of GCW Zero Paul Cercueil
2020-05-25 17:41 ` [PATCH 2/3] MIPS: ingenic: Add support for GCW Zero prototype Paul Cercueil
2020-05-25 17:41 ` [PATCH 3/3] MIPS: ingenic: Default to a generic board Paul Cercueil
2020-05-27 11:36 ` [PATCH 1/3] MIPS: ingenic: DTS: Add memory info of GCW Zero Thomas Bogendoerfer

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).