Devicetree change with regards to i.MX 8M Mini configuration with quad-core, dual-core and solo-core

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Devicetree change with regards to i.MX 8M Mini configuration with quad-core, dual-core and solo-core

Jump to solution
1,006 Views
sq_sanmina
Contributor I

i.MX 8M Mini has 3 configurations with regards to the number of ARM Cortex-A53 cores. In "imx8mm.dtsi", there are 4 "cpu" nodes under "cpus" node, assuming the device tree file is catered for the quad-core configuration of i.MX 8M Mini. However, there is no other information provided as for how to tailor the device tree for the dual-core or solo-core configuration. Could anyone please shed some light on this? Thanks!

0 Kudos
Reply
1 Solution
937 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport
 
I hope you are doing well.

One does not need to make any changes to the device tree for different multi-core versions.

U-boot code will change the CPU node status to "disabled" based on CPU information mentioned in fuses.

#elif defined(CONFIG_IMX8MM)
if (is_imx8mml() || is_imx8mmdl() ||  is_imx8mmsl())
disable_vpu_nodes(blob);

if (is_imx8mmd() || is_imx8mmdl())
disable_cpu_nodes(blob, 2);
else if (is_imx8mms() || is_imx8mmsl())
disable_cpu_nodes(blob, 3);​

 

Please refer to disable_cpu_nodes in /arch/arm/mach-imx/imx8m/soc.c for more understanding.

I hope it helps!

Thanks & Regards,
Sanket Parekh

View solution in original post

0 Kudos
Reply
5 Replies
988 Views
sq_sanmina
Contributor I

Hi, could anyone please help? Thanks!

0 Kudos
Reply
938 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport
 
I hope you are doing well.

One does not need to make any changes to the device tree for different multi-core versions.

U-boot code will change the CPU node status to "disabled" based on CPU information mentioned in fuses.

#elif defined(CONFIG_IMX8MM)
if (is_imx8mml() || is_imx8mmdl() ||  is_imx8mmsl())
disable_vpu_nodes(blob);

if (is_imx8mmd() || is_imx8mmdl())
disable_cpu_nodes(blob, 2);
else if (is_imx8mms() || is_imx8mmsl())
disable_cpu_nodes(blob, 3);​

 

Please refer to disable_cpu_nodes in /arch/arm/mach-imx/imx8m/soc.c for more understanding.

I hope it helps!

Thanks & Regards,
Sanket Parekh
0 Kudos
Reply
919 Views
sq_sanmina
Contributor I

Thank you so much! I've got it.

0 Kudos
Reply
956 Views
Mestkim
Contributor III

这个自己改一下就可以了。 

1. uboot bootargs pass kernel parameters  

     maxcpus=2  就是2个核

  linux-imx\Documentation\admin-guide\kernel-parameters.txt

maxcpus= [SMP] Maximum number of processors that an SMP kernel
will bring up during bootup.  maxcpus=n : n >= 0 limits
the kernel to bring up 'n' processors. Surely after
bootup you can bring up the other plugged cpu by executing
"echo 1 > /sys/devices/system/cpu/cpuX/online". So maxcpus
only takes effect during system bootup.
While n=0 is a special case, it is equivalent to "nosmp",
which also disables the IO APIC.
 

 

 

imx8mmevk login: root
root@imx8mmevk:~# cat /proc/cmdline
console=ttymxc1,115200 root=/dev/mmcblk2p2 rootwait rw maxcpus=2
root@imx8mmevk:~# cat /proc/cpuinfo
processor       : 0
BogoMIPS        : 16.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

processor       : 1
BogoMIPS        : 16.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

 

 

 
2. 改dts 也可以  就几行就可以了 就是把2号core 和3号core 删除一下就可以了 
     imx8mm-dual-core.dts 
 

 

 

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright 2019-2020 NXP
 */


/* lf-5.15.71-2.2.0 */

/dts-v1/;

#include "imx8mm-evk.dts"



/ {


	cpus {
		/delete-node/ cpu@2; 
		/delete-node/ cpu@3; 
	};

	thermal-zones {
		cpu-thermal {
			cooling-maps {
					map0 {
						cooling-device =
							<&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
						      <&A53_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
					};
			};
		};

	};

};

 

 

 

 

 

 

root@imx8mmevk:~# cat /proc/cpuinfo
processor       : 0
BogoMIPS        : 16.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

processor       : 1
BogoMIPS        : 16.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

 

 

 

0 Kudos
Reply
920 Views
sq_sanmina
Contributor I

Thank you so much for your advice!

0 Kudos
Reply