]> git.dujemihanovic.xyz Git - u-boot.git/commit
arm: mach-k3: am62: fixup thermal cooling device cpus
authorParth Pancholi <parth.pancholi@toradex.com>
Wed, 2 Oct 2024 07:41:33 +0000 (09:41 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 17 Oct 2024 21:01:24 +0000 (15:01 -0600)
commitc01d6934a7d7ceb8e16cd791e7451e6d94161562
tree0a84d3c3c0f7702fef5726933381e55f8f8c5a11
parent22371048ed4646376ec71061930f15d5e4181c07
arm: mach-k3: am62: fixup thermal cooling device cpus

AM62x devices now support CPU throttling based on thermal alerts
with a Linux commit 10e7bfd8114c ("arm64: dts: ti: k3-am62: Enable
CPU freq throttling on thermal alert"). However, this functionality
does not work correctly across all variants of the AM62x SoCs
which have different numbers of Cortex-A CPU cores: AM62x1 (1 core),
AM62x2 (2 cores), and AM62x4 (4 cores). On single-core and dual-core
AM62x devices, the following error is observed in the Linux kernel:

OF: /thermal-zones/main0-thermal/cooling-maps/map0: could not find
    phandle 94
OF: /thermal-zones/main1-thermal/cooling-maps/map0: could not find
    phandle 94

This commit adds a fixup to dynamically adjust the cooling-device
nodes in the thermal zones based on the actual number of CPU cores
available. This resolves the issue of CPU throttling not working
correctly on single-core and dual-core AM62x devices, while
maintaining the functionality for AM62x quad-core devices.

A similar approach is implemented for example on i.MX8MM SoC.

Signed-off-by: Parth Pancholi <parth.pancholi@toradex.com>
arch/arm/mach-k3/am62x/am625_fdt.c