linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] meson-saradc: temperature sensor support for Meson8b/Meson8m2
@ 2018-12-27 21:50 Martin Blumenstingl
  2018-12-27 21:50 ` [PATCH 1/2] dt-bindings: iio: adc: meson-saradc: update temperature sensor support Martin Blumenstingl
  2018-12-27 21:50 ` [PATCH 2/2] iio: adc: meson-saradc: enable the temperature sensor two more SoCs Martin Blumenstingl
  0 siblings, 2 replies; 7+ messages in thread
From: Martin Blumenstingl @ 2018-12-27 21:50 UTC (permalink / raw)
  To: linux-amlogic, devicetree, linux-iio, jic23, lars, pmeerw,
	robh+dt, mark.rutland
  Cc: balbes-150, Martin Blumenstingl, linux-kernel, linux-arm-kernel

This adds support for the temperature sensor on Meson8b and Meson8m2
(both are sharing the same logic).

These SoCs can use most of the existing infrastructure that we already
have for Meson8:
- parsing the TSC (calibration data) from an nvmem-cell
- the math to calculate millicelsius from the register values

What this series adds on top of the existing infrastructure:
- The TSC data is 5-bit wide instead of 4-bit. The upper-most bit has t
  be written into a register in the HHI area (which is outside the ADC
  register space). Thus this adds a new device tree property to pass the
  HHI syscon to the SAR ADC and we set up this register during SAR ADC
  driver initialization
- the multiplier and divider values (to convert the raw register value
  to celsius / millicelsius) are different compared to Meson8

This was successfully tested on multiple boards:
- Meson8b Odroid-C1 (me)
- Meson8b EC-100 (me)
- Meson8m2 M8S (not upstream yet, me)
- Meson8m2 MXIII-Plus (an earlier version of this series, Oleg Ivanov)


Martin Blumenstingl (2):
  dt-bindings: iio: adc: meson-saradc: update temperature sensor support
  iio: adc: meson-saradc: enable the temperature sensor two more SoCs

 .../bindings/iio/adc/amlogic,meson-saradc.txt |  4 +++
 drivers/iio/adc/meson_saradc.c                | 33 +++++++++++++++++++
 2 files changed, 37 insertions(+)

-- 
2.20.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-01-05 16:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-27 21:50 [PATCH 0/2] meson-saradc: temperature sensor support for Meson8b/Meson8m2 Martin Blumenstingl
2018-12-27 21:50 ` [PATCH 1/2] dt-bindings: iio: adc: meson-saradc: update temperature sensor support Martin Blumenstingl
2019-01-03 23:02   ` Rob Herring
2019-01-05 16:39     ` Jonathan Cameron
2018-12-27 21:50 ` [PATCH 2/2] iio: adc: meson-saradc: enable the temperature sensor two more SoCs Martin Blumenstingl
2019-01-05 16:41   ` Jonathan Cameron
2019-01-05 16:44   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).