Porting CPU#

This module explains how to configure the number of the CPUs, and GPU (if applicable).

This module will focus on the A53 cores. For information about porting or disabling remote cores, reference the Multicore Academy section Disabling remote cores.

Changing the Linux devicetree file#

By default, four A53 CPU cores are enabled in the k3-am62-sk.dts file.

If using a AM62x device with fewer cores, use /delete-node/ to adjust the number of A53 cores in the device tree file. For example, add the following lines of code in k3-am62-sk.dts to use an AM62x with a single core A53:

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

Each A53 core also has a dedicated watchdog timer, called an RTI timer. If a A53 core is disabled, the associated RTI must be disabled as well:

&main_rti1 {
                status = "disabled";
};

&main_rti2 {
                status = "disabled";
};

&main_rti3 {
                status = "disabled";
};

Similarly, if using a AM62x part without a GPU, the GPU can be removed from the k3-am62-sk.dts with these lines of code:

&gpu {
                status = "disabled";
};

&main_rti15 {
                status = "disabled";
};

Confirming the change#

To confirm the above change, rebuild the Device Tree Blob (DTB) file and update your filesystem with the latest DTB file. Next, power on the board and wait for the Linux login prompt. After logging in, run the command: lscpu | grep “Core”. Depending on the number of A53 cores disabled, the value returned will vary. However, it should reflect your Device Tree(DT) changes.

# lscpu | grep "Core"
Thread(s) per core:              1
Thread(s) per core:              1