History log of /freebsd-current/sys/arm/allwinner/aw_thermal.c
Revision Date Author Comments
# e51b3d8e 26-Dec-2023 Emmanuel Vadot <manu@FreeBSD.org>

nvmem: Move nvmem code in dev/nvmem

We've removed kernel option EXT_RESOURCES almost two years ago.
While it was ok to have some code under a common 'extres' subdirectory
at first, we now have a lot of consumer of it and we made it mandatory
so no need to have it under a cryptic name.

Reviewed by: dab, imp
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D43193


# 1f469a9f 26-Dec-2023 Emmanuel Vadot <manu@FreeBSD.org>

hwreset: Move reset code in dev/hwreset

We've removed kernel option EXT_RESOURCES almost two years ago.
While it was ok to have some code under a common 'extres' subdirectory
at first, we now have a lot of consumer of it and we made it mandatory
so no need to have it under a cryptic name.

Reviewed by: imp
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D43192


# be82b3a0 26-Dec-2023 Emmanuel Vadot <manu@FreeBSD.org>

clk: Move clock code in dev/clk

We've removed kernel option EXT_RESOURCES almost two years ago.
While it was ok to have some code under a common 'extres' subdirectory
at first, we now have a lot of consumer of it and we made it mandatory
so no need to have it under a cryptic name.

Reviewed by: mhorne
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D43191


# fdafd315 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 7e1e2ba1 09-May-2022 John Baldwin <jhb@FreeBSD.org>

arm allwinner: Remove unused devclass arguments to DRIVER_MODULE.


# d6b44474 14-Apr-2020 Emmanuel Vadot <manu@FreeBSD.org>

allwinner: aw_thermal: Cope with DTS changes

The upstream DTS now include the thermal device node and the SID
calibration entry.
Update our driver to cope with this change and remove the DTB
overlays that aren't needed anymore.

MFC after: 2 months
X-MFC-With: r359934


# 8eea36ae 24-Feb-2020 Pawel Biernacki <kaktus@FreeBSD.org>

Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (13 of many)

r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked).
Use it in preparation for a general review of all nodes.

This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.

Approved by: kib (mentor, blanket)
Differential Revision: https://reviews.freebsd.org/D23635


# 357145a0 03-Dec-2019 Emmanuel Vadot <manu@FreeBSD.org>

Remove "all rights reserved" from copyright for the file that Jared McNeill
own. He gave me permission to do this.


# e2e050c8 19-May-2019 Conrad Meyer <cem@FreeBSD.org>

Extract eventfilter declarations to sys/_eventfilter.h

This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h"
in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces header
pollution substantially.

EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .c
files into appropriate headers (e.g., sys/proc.h, powernv/opal.h).

As a side effect of reduced header pollution, many .c files and headers no
longer contain needed definitions. The remainder of the patch addresses
adding appropriate includes to fix those files.

LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required by
sys/mutex.h since r326106 (but silently protected by header pollution prior
to this change).

No functional change (intended). Of course, any out of tree modules that
relied on header pollution for sys/eventhandler.h, sys/lock.h, or
sys/mutex.h inclusion need to be fixed. __FreeBSD_version has been bumped.


# f9b1c6a0 25-Apr-2019 Emmanuel Vadot <manu@FreeBSD.org>

arm: allwinner: Add pnp info to aw_thermal and compile it as module too

MFC after: 1 month


# d19afc9a 05-Aug-2018 Emmanuel Vadot <manu@FreeBSD.org>

aw_thermal: Add nvmem and H5 support

Now that aw_sid expose nvmem interface, use that to read the calibration
data.
Add support for H5 SoC.
Fix the bindings, we used to have non-upstreamed bindings. Switch to the
one that have been sent upstream. They are not stable yet, so we switch
from custom, wrong, bindings to correct, proposed bindings


# 97eb836f 05-Aug-2018 Emmanuel Vadot <manu@FreeBSD.org>

aw_sid: Add nvmem interface

Rework aw_sid so it can work with the nvmem interface.
Each SoC expose a set of fuses (for now rootkey/boardid and, if available,
the thermal calibration data). A fuse can be private or public, reading private
fuse needs to be done via some registers instead of reading directly.
Each fuse is exposed as a sysctl.
For now leave the possibility for a driver to read any fuse without using
the nvmem interface as the awg and emac driver use this to generate a mac
address.


# 0a30b4b2 19-Nov-2016 Jared McNeill <jmcneill@FreeBSD.org>

On H3, initialize alarm and shutdown trip points and do temperature
conversion as it is done in the BSP.


# bd95d861 30-Oct-2016 Jared McNeill <jmcneill@FreeBSD.org>

Fix H3 temperature reporting. The formula in for V1.0 of the H3 datasheet
seems to be incorrect, so use the same method of conversion as the H3 BSP
instead.


# 2e4f9347 24-Oct-2016 Jared McNeill <jmcneill@FreeBSD.org>

Defer cpufreq updates from intr handler to the taskqueue_thread queue.


# 3c2b90f1 23-Oct-2016 Jared McNeill <jmcneill@FreeBSD.org>

Throttle CPU frequency when hot temperature threshold has been reached to
prevent overheating.

When sensor 0's alarm interrupt is fired, set a throttle flag. Further
requests to set CPU frequency will be rejected until sensor 0's temperature
returns to a level below the hot temperature threshold.

Relnotes: yes


# 4e7f43ba 05-Sep-2016 Jared McNeill <jmcneill@FreeBSD.org>

Add support for the Allwinner H3 Thermal Sensor Controller. The H3 embeds
a single thermal sensor located in the CPU.


# d69d5ab0 03-Sep-2016 Jared McNeill <jmcneill@FreeBSD.org>

Add support for Allwinner A64 thermal sensors.


# 343044c4 15-May-2016 Jared McNeill <jmcneill@FreeBSD.org>

Add Allwinner A83T thermal sensor controller support.

The A83T thermal sensor controller has three sensors. Sensor 0 corresponds
to CPU cluster 0, sensor 1 to CPU cluster 1, and sensor 2 to the GPU. This
driver exports the temperature sensor readings via sysctl.

Calibration data is obtained from SRAM found in the Secure ID module.

Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D6378