Home | History | Annotate | Download | only in rockchip
History log of /src/sys/arch/arm/rockchip/rk_tsadc.c
RevisionDateAuthorComments
 1.16  11-Dec-2021  mrg remove clause 3 from all my licenses that aren't conflicting with
another copyright claim line. again. (i did this in 2008 and then
did not update all of my personal templates.)
 1.15  13-Nov-2021  jmcneill Add support for RK3288 temperature sensors.
 1.14  11-Sep-2021  andvar Add missing double p and d for stopped and overriden accordingly.
Fix few more typos along the way, mainly in copy-pasted comments.
 1.13  12-Jun-2021  mrg fix comment to talk about correct units (kelvin, not seconds).
 1.12  27-Jan-2021  thorpej branches: 1.12.4;
Rename of_match_compat_data() to of_compatible_match(). Similarly,
rename of_search_compatible() to of_compatible_lookup().

Standardize on of_compatible_match() for driver matching, and adapt
all call sites.
 1.11  27-Jan-2021  thorpej Use DEVICE_COMPAT_EOL.
 1.10  25-Jan-2021  thorpej Since we're using designated initialisers for compat data, we should
use a completely empty initializer for the sentinel.
 1.9  19-Jan-2021  thorpej Use device_compatible_entry / of_search_compatible() rather than
matching against multiple sets of compatibility strings.
 1.8  15-Jan-2021  ryo use fdtbus_intr_establish_xname
 1.7  03-Jul-2019  jmcneill branches: 1.7.10;
Set correct bits when enabling gpio tshut mode
 1.6  01-Jun-2019  joerg branches: 1.6.2;
Loop variables work better when they are initialized.
 1.5  15-May-2019  mrg support RK3328 tsadc:

- add clk_24m, clk_tsadc and pclk_tsadc rk3328 clocks
- rk3328 data<->temp conversion table is is wrong. the actual values
seen are 4096 - <expected>, and the linux driver has these values
in the inverted value directly
- the above means the rk3328 is increasing data for increasing temp,
and the min/max values are also inverted and swapped
- move auto-period into the rk_data
- rk3328 only has one sensor, deal with this
- rename rk_data_table as rk_data, and also s/rdt/rd/

thanks to jmcneill who helped clean up clocks confusion, and pointed
out the linux driver values matched my own inverted data experience.
 1.4  14-May-2019  mrg mostly port to rk3328.

- add rk3328 data<->temp table, and adjust code to use this vs rk3399
table for rk3328. add support for decrementing data.
- adjust auto period times for rk3328 vs rk3399
- add min/max data values, if data is outside these values mark the
sensor invalid.
- move init code into cpu specific sections, add rk3328 support

with a rk3328_cru.c update to add clocks, this attaches and reports
garbage values, so for now it's disabled.
 1.3  26-Apr-2019  mrg re-#if 0 some testing code.
 1.2  26-Apr-2019  mrg - implement sub-5degC interpolation.
- avoid setting TSADC_AUTO_CON_SRC*_EN twice
 1.1  26-Apr-2019  mrg implement TSADC driver for rockchip RK3328 and RK3399. so far, only
tested on RK3399 but the RK3328 looks mostly the same and has a good
chance of working too.

add clock entries for "clk_tsadc" and "pclk_tsadc" to cru.

exports "CPU" and "GPU" temp sensors. these currently limited to 5
degC resolution but can be reduced to sub 1 degC resolution with some
interpolation.

todo list:

- handle setting various temp values
- add interpolation between the 5degC intervals in sample data
- handle DT trips/temp value defaults
- interrupts aren't triggered (test by lowering warn/crit values),
and once they work, make the interrupt do something
- test on RK3328, and port to other rockchips (will require moving
some part into per-chipset sections, such as code<->temp tables)


thanks to jmcneill for help.
 1.6.2.3  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6.2.2  10-Jun-2019  christos Sync with HEAD
 1.6.2.1  01-Jun-2019  christos file rk_tsadc.c was added on branch phil-wifi on 2019-06-10 22:05:56 +0000
 1.7.10.1  03-Apr-2021  thorpej Sync with HEAD.
 1.12.4.1  17-Jun-2021  thorpej Sync w/ HEAD.

RSS XML Feed