Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allwinner: Add thermal driver #4073

Merged
merged 1 commit into from Dec 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 4 additions & 6 deletions projects/Allwinner/devices/H6/patches/linux/12-ac200-nodes.patch
Expand Up @@ -29,12 +29,10 @@ index 8eec8685a50b..5eeb7da7a0ab 100644
cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -218,6 +228,12 @@
sid: efuse@3006000 {
compatible = "allwinner,sun50i-h6-sid";
reg = <0x03006000 0x400>;
+ #address-cells = <1>;
+ #size-cells = <1>;
@@ -218,6 +228,10 @@
ths_calibration: thermal-sensor-calibration@14 {
reg = <0x14 0x8>;
};
+
+ ephy_calib: ephy_calib@2c {
+ reg = <0x2c 0x2>;
Expand Down
8 changes: 8 additions & 0 deletions projects/Allwinner/filesystem/usr/bin/cputemp
@@ -0,0 +1,8 @@
#!/bin/sh

# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)

TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
echo "$(( $TEMP / 1000 )) C"
12 changes: 12 additions & 0 deletions projects/Allwinner/filesystem/usr/bin/gputemp
@@ -0,0 +1,12 @@
#!/bin/sh

# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)

if [ -f /sys/class/thermal/thermal_zone1/temp ]; then
TEMP="$(cat /sys/class/thermal/thermal_zone1/temp)"
else
TEMP="$(cat /sys/class/thermal/thermal_zone0/temp)"
fi
echo "$(( $TEMP / 1000 )) C"
1 change: 1 addition & 0 deletions projects/Allwinner/linux/linux.aarch64.conf
Expand Up @@ -2753,6 +2753,7 @@ CONFIG_THERMAL_EMULATION=y
# CONFIG_THERMAL_MMIO is not set
# CONFIG_MAX77620_THERMAL is not set
# CONFIG_QORIQ_THERMAL is not set
CONFIG_SUN8I_THERMAL=y
# CONFIG_GENERIC_ADC_THERMAL is not set
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_CORE=y
Expand Down
1 change: 1 addition & 0 deletions projects/Allwinner/linux/linux.arm.conf
Expand Up @@ -2563,6 +2563,7 @@ CONFIG_DEVFREQ_THERMAL=y
# CONFIG_THERMAL_EMULATION is not set
# CONFIG_THERMAL_MMIO is not set
# CONFIG_QORIQ_THERMAL is not set
CONFIG_SUN8I_THERMAL=y
CONFIG_GENERIC_ADC_THERMAL=y
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_CORE=y
Expand Down