- Feb 28, 2025
-
-
Nicolas Frattaroli authored
Many of the Rockchip SoCs support storing trim values for the sensors in factory programmable memory. These values specify a fixed offset from the sensor's returned temperature to get a more accurate picture of what temperature the silicon is actually at. The way this is implemented is with various OTP cells, which may be absent. There may both be whole-TSADC trim values, as well as per-sensor trim values. In the downstream driver, whole-chip trim values override the per-sensor trim values. This rewrite of the functionality changes the semantics to something I see as slightly more useful: allow the whole-chip trim values to serve as a fallback for lacking per-sensor trim values, instead of overriding already present sensor trim values. Additionally, the chip may specify an offset (trim_base, trim_base_frac) in degrees celsius and degrees decicelsius respectively which defines what the basis is from which the trim, if any, should be calculated from. By default, this is 30 degrees Celsius, but the chip can once again specify a different value through OTP cells. The implementation of these trim calculations have been tested extensively on an RK3576, where it was confirmed to get rid of pesky 1.8 degree Celsius offsets between certain sensors. Signed-off-by:
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
-
Nicolas Frattaroli authored
Thanks to Heiko's work getting OTP working on the RK3576, we can specify the thermal sensor trim values which are stored there now, and with my driver addition to rockchip_thermal, we can make use of these. Add them to the devicetree for the SoC. Signed-off-by:
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
-
Nicolas Frattaroli authored
Several Rockchip SoCs, such as the RK3576, can store calibration trim data for thermal sensors in OTP cells. This capability should be documented. Such a rockchip thermal sensor may reference cell handles that store both a chip-wide trim for all the sensors, as well as cell handles for each individual sensor channel pointing to that specific sensor's trim value. Additionally, the thermal sensor may optionally reference cells which store the base in terms of degrees celsius and decicelsius that the trim is relative to. Each SoC that implements this appears to have a slightly different combination of chip-wide trim, base, base fractional part and per-channel trim, so which ones do which is documented in the bindings. Signed-off-by:
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
-
The RK3576 SoC has six TS-ADC channels: TOP, BIG_CORE, LITTLE_CORE, DDR, NPU and GPU. Signed-off-by:
Ye Zhang <ye.zhang@rock-chips.com> [ported to mainline, reworded commit message] Signed-off-by:
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
-
Nicolas Frattaroli authored
Add the TSADC node to the RK3576. Additionally, add everything the TSADC needs to function, i.e. thermal zones, their trip points and maps, as well as adjust the CPU cooling-cells property. The polling-delay properties are set to 0 as we do have interrupts for this TSADC on this particular SoC. Signed-off-by:
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
-
Nicolas Frattaroli authored
Add a new compatible for the thermal sensor device on the RK3576 SoC. Acked-by:
Rob Herring (Arm) <robh@kernel.org> Signed-off-by:
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
-
Stephen Rothwell authored
Signed-off-by:
Stephen Rothwell <sfr@canb.auug.org.au>
-
git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl.gitStephen Rothwell authored
# Conflicts: # kernel/sysctl.c
-
git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.gitStephen Rothwell authored
# Conflicts: # kernel/rcu/tiny.c
-
git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.gitStephen Rothwell authored
# Conflicts: # drivers/scsi/scsi_debug.c
-