Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: tegra: Add Tegra234 thermal support

Add device tree node for the BPMP thermal node on Tegra234 and add
thermal zone definitions.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>

+72
+53
arch/arm64/boot/dts/nvidia/tegra234.dtsi
··· 8 8 #include <dt-bindings/pinctrl/pinctrl-tegra-io-pad.h> 9 9 #include <dt-bindings/power/tegra234-powergate.h> 10 10 #include <dt-bindings/reset/tegra234-reset.h> 11 + #include <dt-bindings/thermal/tegra234-bpmp-thermal.h> 11 12 12 13 / { 13 14 compatible = "nvidia,tegra234"; ··· 3028 3027 #address-cells = <1>; 3029 3028 #size-cells = <0>; 3030 3029 }; 3030 + 3031 + bpmp_thermal: thermal { 3032 + compatible = "nvidia,tegra186-bpmp-thermal"; 3033 + #thermal-sensor-cells = <1>; 3034 + }; 3031 3035 }; 3032 3036 3033 3037 cpus { ··· 3521 3515 assigned-clock-parents = <0>, 3522 3516 <&bpmp TEGRA234_CLK_PLLA>, 3523 3517 <&bpmp TEGRA234_CLK_PLLA_OUT0>; 3518 + }; 3519 + 3520 + thermal-zones { 3521 + cpu-thermal { 3522 + thermal-sensors = <&{/bpmp/thermal} TEGRA234_BPMP_THERMAL_ZONE_CPU>; 3523 + status = "disabled"; 3524 + }; 3525 + 3526 + gpu-thermal { 3527 + thermal-sensors = <&{/bpmp/thermal} TEGRA234_BPMP_THERMAL_ZONE_GPU>; 3528 + status = "disabled"; 3529 + }; 3530 + 3531 + cv0-thermal { 3532 + thermal-sensors = <&{/bpmp/thermal} TEGRA234_BPMP_THERMAL_ZONE_CV0>; 3533 + status = "disabled"; 3534 + }; 3535 + 3536 + cv1-thermal { 3537 + thermal-sensors = <&{/bpmp/thermal} TEGRA234_BPMP_THERMAL_ZONE_CV1>; 3538 + status = "disabled"; 3539 + }; 3540 + 3541 + cv2-thermal { 3542 + thermal-sensors = <&{/bpmp/thermal} TEGRA234_BPMP_THERMAL_ZONE_CV2>; 3543 + status = "disabled"; 3544 + }; 3545 + 3546 + soc0-thermal { 3547 + thermal-sensors = <&{/bpmp/thermal} TEGRA234_BPMP_THERMAL_ZONE_SOC0>; 3548 + status = "disabled"; 3549 + }; 3550 + 3551 + soc1-thermal { 3552 + thermal-sensors = <&{/bpmp/thermal} TEGRA234_BPMP_THERMAL_ZONE_SOC1>; 3553 + status = "disabled"; 3554 + }; 3555 + 3556 + soc2-thermal { 3557 + thermal-sensors = <&{/bpmp/thermal} TEGRA234_BPMP_THERMAL_ZONE_SOC2>; 3558 + status = "disabled"; 3559 + }; 3560 + 3561 + tj-thermal { 3562 + thermal-sensors = <&{/bpmp/thermal} TEGRA234_BPMP_THERMAL_ZONE_TJ_MAX>; 3563 + status = "disabled"; 3564 + }; 3524 3565 }; 3525 3566 3526 3567 timer {
+19
include/dt-bindings/thermal/tegra234-bpmp-thermal.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* 3 + * This header provides constants for binding nvidia,tegra234-bpmp-thermal. 4 + */ 5 + 6 + #ifndef _DT_BINDINGS_THERMAL_TEGRA234_BPMP_THERMAL_H 7 + #define _DT_BINDINGS_THERMAL_TEGRA234_BPMP_THERMAL_H 8 + 9 + #define TEGRA234_BPMP_THERMAL_ZONE_CPU 0 10 + #define TEGRA234_BPMP_THERMAL_ZONE_GPU 1 11 + #define TEGRA234_BPMP_THERMAL_ZONE_CV0 2 12 + #define TEGRA234_BPMP_THERMAL_ZONE_CV1 3 13 + #define TEGRA234_BPMP_THERMAL_ZONE_CV2 4 14 + #define TEGRA234_BPMP_THERMAL_ZONE_SOC0 5 15 + #define TEGRA234_BPMP_THERMAL_ZONE_SOC1 6 16 + #define TEGRA234_BPMP_THERMAL_ZONE_SOC2 7 17 + #define TEGRA234_BPMP_THERMAL_ZONE_TJ_MAX 8 18 + 19 + #endif