linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] MIPS: Ingenic: Add system type for new Ingenic SoCs.
@ 2021-07-15 16:57 周琰杰 (Zhou Yanjie)
  2021-07-19 11:27 ` Thomas Bogendoerfer
  0 siblings, 1 reply; 4+ messages in thread
From: 周琰杰 (Zhou Yanjie) @ 2021-07-15 16:57 UTC (permalink / raw)
  To: paul, paulburton, tsbogend
  Cc: linux-mips, linux-kernel, maoxiaochuan, f.fainelli, git,
	chenhuacai, cand, dongsheng.qiu, aric.pzqi, rick.tyliu,
	sihui.liu, jun.jiang, sernia.zhou

Add JZ4730, JZ4750, JZ4755, JZ4760, JZ4760B, X2000H, and X2100 system
type for cat /proc/cpuinfo to give out JZ4730, JZ4750, JZ4755, JZ4760,
JZ4760B, X2000H, and X2100.

Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
---

Notes:
    v1->v2:
    1.Add system type for JZ4750 and JZ4755 as Paul Cercueil's suggestion.
    2.Add Paul Cercueil's Reviewed-by.

 arch/mips/generic/board-ingenic.c | 21 +++++++++++++++++++++
 arch/mips/include/asm/bootinfo.h  |  3 +++
 arch/mips/include/asm/cpu.h       |  4 ++--
 3 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/arch/mips/generic/board-ingenic.c b/arch/mips/generic/board-ingenic.c
index dd855b7..4774636 100644
--- a/arch/mips/generic/board-ingenic.c
+++ b/arch/mips/generic/board-ingenic.c
@@ -21,6 +21,10 @@
 static __init char *ingenic_get_system_type(unsigned long machtype)
 {
 	switch (machtype) {
+	case MACH_INGENIC_X2100:
+		return "X2100";
+	case MACH_INGENIC_X2000H:
+		return "X2000H";
 	case MACH_INGENIC_X2000E:
 		return "X2000E";
 	case MACH_INGENIC_X2000:
@@ -37,8 +41,18 @@ static __init char *ingenic_get_system_type(unsigned long machtype)
 		return "JZ4775";
 	case MACH_INGENIC_JZ4770:
 		return "JZ4770";
+	case MACH_INGENIC_JZ4760B:
+		return "JZ4760B";
+	case MACH_INGENIC_JZ4760:
+		return "JZ4760";
+	case MACH_INGENIC_JZ4755:
+		return "JZ4755";
+	case MACH_INGENIC_JZ4750:
+		return "JZ4750";
 	case MACH_INGENIC_JZ4725B:
 		return "JZ4725B";
+	case MACH_INGENIC_JZ4730:
+		return "JZ4730";
 	default:
 		return "JZ4740";
 	}
@@ -61,8 +75,13 @@ static __init const void *ingenic_fixup_fdt(const void *fdt, const void *match_d
 }
 
 static const struct of_device_id ingenic_of_match[] __initconst = {
+	{ .compatible = "ingenic,jz4730", .data = (void *)MACH_INGENIC_JZ4730 },
 	{ .compatible = "ingenic,jz4740", .data = (void *)MACH_INGENIC_JZ4740 },
 	{ .compatible = "ingenic,jz4725b", .data = (void *)MACH_INGENIC_JZ4725B },
+	{ .compatible = "ingenic,jz4750", .data = (void *)MACH_INGENIC_JZ4750 },
+	{ .compatible = "ingenic,jz4755", .data = (void *)MACH_INGENIC_JZ4755 },
+	{ .compatible = "ingenic,jz4760", .data = (void *)MACH_INGENIC_JZ4760 },
+	{ .compatible = "ingenic,jz4760b", .data = (void *)MACH_INGENIC_JZ4760B },
 	{ .compatible = "ingenic,jz4770", .data = (void *)MACH_INGENIC_JZ4770 },
 	{ .compatible = "ingenic,jz4775", .data = (void *)MACH_INGENIC_JZ4775 },
 	{ .compatible = "ingenic,jz4780", .data = (void *)MACH_INGENIC_JZ4780 },
@@ -71,6 +90,8 @@ static const struct of_device_id ingenic_of_match[] __initconst = {
 	{ .compatible = "ingenic,x1830", .data = (void *)MACH_INGENIC_X1830 },
 	{ .compatible = "ingenic,x2000", .data = (void *)MACH_INGENIC_X2000 },
 	{ .compatible = "ingenic,x2000e", .data = (void *)MACH_INGENIC_X2000E },
+	{ .compatible = "ingenic,x2000h", .data = (void *)MACH_INGENIC_X2000H },
+	{ .compatible = "ingenic,x2100", .data = (void *)MACH_INGENIC_X2100 },
 	{}
 };
 
diff --git a/arch/mips/include/asm/bootinfo.h b/arch/mips/include/asm/bootinfo.h
index 4c2e817..2128ba9 100644
--- a/arch/mips/include/asm/bootinfo.h
+++ b/arch/mips/include/asm/bootinfo.h
@@ -75,6 +75,7 @@ enum ingenic_machine_type {
 	MACH_INGENIC_JZ4750,
 	MACH_INGENIC_JZ4755,
 	MACH_INGENIC_JZ4760,
+	MACH_INGENIC_JZ4760B,
 	MACH_INGENIC_JZ4770,
 	MACH_INGENIC_JZ4775,
 	MACH_INGENIC_JZ4780,
@@ -83,6 +84,8 @@ enum ingenic_machine_type {
 	MACH_INGENIC_X1830,
 	MACH_INGENIC_X2000,
 	MACH_INGENIC_X2000E,
+	MACH_INGENIC_X2000H,
+	MACH_INGENIC_X2100,
 };
 
 extern char *system_type;
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h
index 35072c4..6ceb5bd 100644
--- a/arch/mips/include/asm/cpu.h
+++ b/arch/mips/include/asm/cpu.h
@@ -46,8 +46,8 @@
 #define PRID_COMP_NETLOGIC	0x0c0000
 #define PRID_COMP_CAVIUM	0x0d0000
 #define PRID_COMP_LOONGSON	0x140000
-#define PRID_COMP_INGENIC_13	0x130000	/* X2000 */
-#define PRID_COMP_INGENIC_D0	0xd00000	/* JZ4740, JZ4750, X1830 */
+#define PRID_COMP_INGENIC_13	0x130000	/* X2000, X2100 */
+#define PRID_COMP_INGENIC_D0	0xd00000	/* JZ4730, JZ4740, JZ4750, JZ4755, JZ4760, X1830 */
 #define PRID_COMP_INGENIC_D1	0xd10000	/* JZ4770, JZ4775, X1000 */
 #define PRID_COMP_INGENIC_E1	0xe10000	/* JZ4780 */
 
-- 
2.7.4


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

* Re: [PATCH v2] MIPS: Ingenic: Add system type for new Ingenic SoCs.
  2021-07-15 16:57 [PATCH v2] MIPS: Ingenic: Add system type for new Ingenic SoCs 周琰杰 (Zhou Yanjie)
@ 2021-07-19 11:27 ` Thomas Bogendoerfer
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Bogendoerfer @ 2021-07-19 11:27 UTC (permalink / raw)
  To: 周琰杰 (Zhou Yanjie)
  Cc: paul, paulburton, linux-mips, linux-kernel, maoxiaochuan,
	f.fainelli, git, chenhuacai, cand, dongsheng.qiu, aric.pzqi,
	rick.tyliu, sihui.liu, jun.jiang, sernia.zhou

On Fri, Jul 16, 2021 at 12:57:07AM +0800, 周琰杰 (Zhou Yanjie) wrote:
> Add JZ4730, JZ4750, JZ4755, JZ4760, JZ4760B, X2000H, and X2100 system
> type for cat /proc/cpuinfo to give out JZ4730, JZ4750, JZ4755, JZ4760,
> JZ4760B, X2000H, and X2100.
> 
> Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
> Reviewed-by: Paul Cercueil <paul@crapouillou.net>
> ---
> 
> Notes:
>     v1->v2:
>     1.Add system type for JZ4750 and JZ4755 as Paul Cercueil's suggestion.
>     2.Add Paul Cercueil's Reviewed-by.
> 
>  arch/mips/generic/board-ingenic.c | 21 +++++++++++++++++++++
>  arch/mips/include/asm/bootinfo.h  |  3 +++
>  arch/mips/include/asm/cpu.h       |  4 ++--
>  3 files changed, 26 insertions(+), 2 deletions(-)

applied 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

* Re: [PATCH v2] MIPS: Ingenic: Add system type for new Ingenic SoCs.
  2021-12-09 16:48 ` [PATCH v2] MIPS: Ingenic: Add system type for new Ingenic SoCs 周琰杰 (Zhou Yanjie)
@ 2021-12-09 17:09   ` Zhou Yanjie
  0 siblings, 0 replies; 4+ messages in thread
From: Zhou Yanjie @ 2021-12-09 17:09 UTC (permalink / raw)
  To: daniel.lezcano, tglx, robh+dt; +Cc: linux-kernel, devicetree

Hi,

Sorry, this was sent by mistake, please ignore it.

On 2021/12/10 上午12:48, 周琰杰 (Zhou Yanjie) wrote:
> Add JZ4730, JZ4750, JZ4755, JZ4760, JZ4760B, X2000H, and X2100 system
> type for cat /proc/cpuinfo to give out JZ4730, JZ4750, JZ4755, JZ4760,
> JZ4760B, X2000H, and X2100.
>
> Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
> Reviewed-by: Paul Cercueil <paul@crapouillou.net>
> ---
>
> Notes:
>      v1->v2:
>      1.Add system type for JZ4750 and JZ4755 as Paul Cercueil's suggestion.
>      2.Add Paul Cercueil's Reviewed-by.
>
>   arch/mips/generic/board-ingenic.c | 21 +++++++++++++++++++++
>   arch/mips/include/asm/bootinfo.h  |  3 +++
>   arch/mips/include/asm/cpu.h       |  4 ++--
>   3 files changed, 26 insertions(+), 2 deletions(-)
>
> diff --git a/arch/mips/generic/board-ingenic.c b/arch/mips/generic/board-ingenic.c
> index dd855b7..4774636 100644
> --- a/arch/mips/generic/board-ingenic.c
> +++ b/arch/mips/generic/board-ingenic.c
> @@ -21,6 +21,10 @@
>   static __init char *ingenic_get_system_type(unsigned long machtype)
>   {
>   	switch (machtype) {
> +	case MACH_INGENIC_X2100:
> +		return "X2100";
> +	case MACH_INGENIC_X2000H:
> +		return "X2000H";
>   	case MACH_INGENIC_X2000E:
>   		return "X2000E";
>   	case MACH_INGENIC_X2000:
> @@ -37,8 +41,18 @@ static __init char *ingenic_get_system_type(unsigned long machtype)
>   		return "JZ4775";
>   	case MACH_INGENIC_JZ4770:
>   		return "JZ4770";
> +	case MACH_INGENIC_JZ4760B:
> +		return "JZ4760B";
> +	case MACH_INGENIC_JZ4760:
> +		return "JZ4760";
> +	case MACH_INGENIC_JZ4755:
> +		return "JZ4755";
> +	case MACH_INGENIC_JZ4750:
> +		return "JZ4750";
>   	case MACH_INGENIC_JZ4725B:
>   		return "JZ4725B";
> +	case MACH_INGENIC_JZ4730:
> +		return "JZ4730";
>   	default:
>   		return "JZ4740";
>   	}
> @@ -61,8 +75,13 @@ static __init const void *ingenic_fixup_fdt(const void *fdt, const void *match_d
>   }
>   
>   static const struct of_device_id ingenic_of_match[] __initconst = {
> +	{ .compatible = "ingenic,jz4730", .data = (void *)MACH_INGENIC_JZ4730 },
>   	{ .compatible = "ingenic,jz4740", .data = (void *)MACH_INGENIC_JZ4740 },
>   	{ .compatible = "ingenic,jz4725b", .data = (void *)MACH_INGENIC_JZ4725B },
> +	{ .compatible = "ingenic,jz4750", .data = (void *)MACH_INGENIC_JZ4750 },
> +	{ .compatible = "ingenic,jz4755", .data = (void *)MACH_INGENIC_JZ4755 },
> +	{ .compatible = "ingenic,jz4760", .data = (void *)MACH_INGENIC_JZ4760 },
> +	{ .compatible = "ingenic,jz4760b", .data = (void *)MACH_INGENIC_JZ4760B },
>   	{ .compatible = "ingenic,jz4770", .data = (void *)MACH_INGENIC_JZ4770 },
>   	{ .compatible = "ingenic,jz4775", .data = (void *)MACH_INGENIC_JZ4775 },
>   	{ .compatible = "ingenic,jz4780", .data = (void *)MACH_INGENIC_JZ4780 },
> @@ -71,6 +90,8 @@ static const struct of_device_id ingenic_of_match[] __initconst = {
>   	{ .compatible = "ingenic,x1830", .data = (void *)MACH_INGENIC_X1830 },
>   	{ .compatible = "ingenic,x2000", .data = (void *)MACH_INGENIC_X2000 },
>   	{ .compatible = "ingenic,x2000e", .data = (void *)MACH_INGENIC_X2000E },
> +	{ .compatible = "ingenic,x2000h", .data = (void *)MACH_INGENIC_X2000H },
> +	{ .compatible = "ingenic,x2100", .data = (void *)MACH_INGENIC_X2100 },
>   	{}
>   };
>   
> diff --git a/arch/mips/include/asm/bootinfo.h b/arch/mips/include/asm/bootinfo.h
> index 4c2e817..2128ba9 100644
> --- a/arch/mips/include/asm/bootinfo.h
> +++ b/arch/mips/include/asm/bootinfo.h
> @@ -75,6 +75,7 @@ enum ingenic_machine_type {
>   	MACH_INGENIC_JZ4750,
>   	MACH_INGENIC_JZ4755,
>   	MACH_INGENIC_JZ4760,
> +	MACH_INGENIC_JZ4760B,
>   	MACH_INGENIC_JZ4770,
>   	MACH_INGENIC_JZ4775,
>   	MACH_INGENIC_JZ4780,
> @@ -83,6 +84,8 @@ enum ingenic_machine_type {
>   	MACH_INGENIC_X1830,
>   	MACH_INGENIC_X2000,
>   	MACH_INGENIC_X2000E,
> +	MACH_INGENIC_X2000H,
> +	MACH_INGENIC_X2100,
>   };
>   
>   extern char *system_type;
> diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h
> index 35072c4..6ceb5bd 100644
> --- a/arch/mips/include/asm/cpu.h
> +++ b/arch/mips/include/asm/cpu.h
> @@ -46,8 +46,8 @@
>   #define PRID_COMP_NETLOGIC	0x0c0000
>   #define PRID_COMP_CAVIUM	0x0d0000
>   #define PRID_COMP_LOONGSON	0x140000
> -#define PRID_COMP_INGENIC_13	0x130000	/* X2000 */
> -#define PRID_COMP_INGENIC_D0	0xd00000	/* JZ4740, JZ4750, X1830 */
> +#define PRID_COMP_INGENIC_13	0x130000	/* X2000, X2100 */
> +#define PRID_COMP_INGENIC_D0	0xd00000	/* JZ4730, JZ4740, JZ4750, JZ4755, JZ4760, X1830 */
>   #define PRID_COMP_INGENIC_D1	0xd10000	/* JZ4770, JZ4775, X1000 */
>   #define PRID_COMP_INGENIC_E1	0xe10000	/* JZ4780 */
>   

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

* [PATCH v2] MIPS: Ingenic: Add system type for new Ingenic SoCs.
  2021-12-09 16:48 [PATCH 0/2] Add SMP/SMT support for Ingenic sysost driver 周琰杰 (Zhou Yanjie)
@ 2021-12-09 16:48 ` 周琰杰 (Zhou Yanjie)
  2021-12-09 17:09   ` Zhou Yanjie
  0 siblings, 1 reply; 4+ messages in thread
From: 周琰杰 (Zhou Yanjie) @ 2021-12-09 16:48 UTC (permalink / raw)
  To: daniel.lezcano, tglx, robh+dt; +Cc: linux-kernel, devicetree

Add JZ4730, JZ4750, JZ4755, JZ4760, JZ4760B, X2000H, and X2100 system
type for cat /proc/cpuinfo to give out JZ4730, JZ4750, JZ4755, JZ4760,
JZ4760B, X2000H, and X2100.

Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
---

Notes:
    v1->v2:
    1.Add system type for JZ4750 and JZ4755 as Paul Cercueil's suggestion.
    2.Add Paul Cercueil's Reviewed-by.

 arch/mips/generic/board-ingenic.c | 21 +++++++++++++++++++++
 arch/mips/include/asm/bootinfo.h  |  3 +++
 arch/mips/include/asm/cpu.h       |  4 ++--
 3 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/arch/mips/generic/board-ingenic.c b/arch/mips/generic/board-ingenic.c
index dd855b7..4774636 100644
--- a/arch/mips/generic/board-ingenic.c
+++ b/arch/mips/generic/board-ingenic.c
@@ -21,6 +21,10 @@
 static __init char *ingenic_get_system_type(unsigned long machtype)
 {
 	switch (machtype) {
+	case MACH_INGENIC_X2100:
+		return "X2100";
+	case MACH_INGENIC_X2000H:
+		return "X2000H";
 	case MACH_INGENIC_X2000E:
 		return "X2000E";
 	case MACH_INGENIC_X2000:
@@ -37,8 +41,18 @@ static __init char *ingenic_get_system_type(unsigned long machtype)
 		return "JZ4775";
 	case MACH_INGENIC_JZ4770:
 		return "JZ4770";
+	case MACH_INGENIC_JZ4760B:
+		return "JZ4760B";
+	case MACH_INGENIC_JZ4760:
+		return "JZ4760";
+	case MACH_INGENIC_JZ4755:
+		return "JZ4755";
+	case MACH_INGENIC_JZ4750:
+		return "JZ4750";
 	case MACH_INGENIC_JZ4725B:
 		return "JZ4725B";
+	case MACH_INGENIC_JZ4730:
+		return "JZ4730";
 	default:
 		return "JZ4740";
 	}
@@ -61,8 +75,13 @@ static __init const void *ingenic_fixup_fdt(const void *fdt, const void *match_d
 }
 
 static const struct of_device_id ingenic_of_match[] __initconst = {
+	{ .compatible = "ingenic,jz4730", .data = (void *)MACH_INGENIC_JZ4730 },
 	{ .compatible = "ingenic,jz4740", .data = (void *)MACH_INGENIC_JZ4740 },
 	{ .compatible = "ingenic,jz4725b", .data = (void *)MACH_INGENIC_JZ4725B },
+	{ .compatible = "ingenic,jz4750", .data = (void *)MACH_INGENIC_JZ4750 },
+	{ .compatible = "ingenic,jz4755", .data = (void *)MACH_INGENIC_JZ4755 },
+	{ .compatible = "ingenic,jz4760", .data = (void *)MACH_INGENIC_JZ4760 },
+	{ .compatible = "ingenic,jz4760b", .data = (void *)MACH_INGENIC_JZ4760B },
 	{ .compatible = "ingenic,jz4770", .data = (void *)MACH_INGENIC_JZ4770 },
 	{ .compatible = "ingenic,jz4775", .data = (void *)MACH_INGENIC_JZ4775 },
 	{ .compatible = "ingenic,jz4780", .data = (void *)MACH_INGENIC_JZ4780 },
@@ -71,6 +90,8 @@ static const struct of_device_id ingenic_of_match[] __initconst = {
 	{ .compatible = "ingenic,x1830", .data = (void *)MACH_INGENIC_X1830 },
 	{ .compatible = "ingenic,x2000", .data = (void *)MACH_INGENIC_X2000 },
 	{ .compatible = "ingenic,x2000e", .data = (void *)MACH_INGENIC_X2000E },
+	{ .compatible = "ingenic,x2000h", .data = (void *)MACH_INGENIC_X2000H },
+	{ .compatible = "ingenic,x2100", .data = (void *)MACH_INGENIC_X2100 },
 	{}
 };
 
diff --git a/arch/mips/include/asm/bootinfo.h b/arch/mips/include/asm/bootinfo.h
index 4c2e817..2128ba9 100644
--- a/arch/mips/include/asm/bootinfo.h
+++ b/arch/mips/include/asm/bootinfo.h
@@ -75,6 +75,7 @@ enum ingenic_machine_type {
 	MACH_INGENIC_JZ4750,
 	MACH_INGENIC_JZ4755,
 	MACH_INGENIC_JZ4760,
+	MACH_INGENIC_JZ4760B,
 	MACH_INGENIC_JZ4770,
 	MACH_INGENIC_JZ4775,
 	MACH_INGENIC_JZ4780,
@@ -83,6 +84,8 @@ enum ingenic_machine_type {
 	MACH_INGENIC_X1830,
 	MACH_INGENIC_X2000,
 	MACH_INGENIC_X2000E,
+	MACH_INGENIC_X2000H,
+	MACH_INGENIC_X2100,
 };
 
 extern char *system_type;
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h
index 35072c4..6ceb5bd 100644
--- a/arch/mips/include/asm/cpu.h
+++ b/arch/mips/include/asm/cpu.h
@@ -46,8 +46,8 @@
 #define PRID_COMP_NETLOGIC	0x0c0000
 #define PRID_COMP_CAVIUM	0x0d0000
 #define PRID_COMP_LOONGSON	0x140000
-#define PRID_COMP_INGENIC_13	0x130000	/* X2000 */
-#define PRID_COMP_INGENIC_D0	0xd00000	/* JZ4740, JZ4750, X1830 */
+#define PRID_COMP_INGENIC_13	0x130000	/* X2000, X2100 */
+#define PRID_COMP_INGENIC_D0	0xd00000	/* JZ4730, JZ4740, JZ4750, JZ4755, JZ4760, X1830 */
 #define PRID_COMP_INGENIC_D1	0xd10000	/* JZ4770, JZ4775, X1000 */
 #define PRID_COMP_INGENIC_E1	0xe10000	/* JZ4780 */
 
-- 
2.7.4


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

end of thread, other threads:[~2021-12-09 17:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15 16:57 [PATCH v2] MIPS: Ingenic: Add system type for new Ingenic SoCs 周琰杰 (Zhou Yanjie)
2021-07-19 11:27 ` Thomas Bogendoerfer
2021-12-09 16:48 [PATCH 0/2] Add SMP/SMT support for Ingenic sysost driver 周琰杰 (Zhou Yanjie)
2021-12-09 16:48 ` [PATCH v2] MIPS: Ingenic: Add system type for new Ingenic SoCs 周琰杰 (Zhou Yanjie)
2021-12-09 17:09   ` Zhou Yanjie

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