All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org,
	linux-iio@vger.kernel.org, robh+dt@kernel.org, pmeerw@pmeerw.net,
	lars@metafoo.de, knaack.h@gmx.de
Subject: Re: [PATCH v2 2/2] iio: adc: meson-saradc: add support for the chip's temperature sensor
Date: Sun, 11 Nov 2018 15:04:45 +0000	[thread overview]
Message-ID: <20181111150445.4e2110ea@archlinux> (raw)
In-Reply-To: <CAFBinCB4bByOqXbUJEv2-fMKWDett-ym++7=x87tDWD4BTQ7QA@mail.gmail.com>

On Sun, 4 Nov 2018 23:36:10 +0100
Martin Blumenstingl <martin.blumenstingl@googlemail.com> wrote:

> Hi Jonathan,
> 
> On Sun, Nov 4, 2018 at 6:00 PM Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > On Sun,  4 Nov 2018 00:10:24 +0100
> > Martin Blumenstingl <martin.blumenstingl@googlemail.com> wrote:
> >  
> > > Channel 6 of the SAR ADC can be switched between two inputs:
> > > SAR_ADC_CH6 input (an actual pad on the SoC) and the signal from the
> > > temperature sensor inside the SoC.
> > >
> > > To get usable results from the temperature sensor we need to read the
> > > corresponding calibration data from the eFuse and pass it to the SAR ADC
> > > registers. If the temperature sensor is not calibrated (the eFuse data
> > > contains a bit for this) then the driver will only register the
> > > iio_chan_spec's for voltage measurements.
> > >
> > > (bits [3:0]) and (on Meson8b and Meson8m2) to a scratch register in the
> > > HHI region.  
> I missed this "fragment" (I wouldn't call it a sentence) when I sent the patch.
> the next paragraph already contains an explanation about the TSC on
> Meson8b and Meson8m2 as well as the HHI register area.
> so this paragraph doesn't make any sense and should be removed. do you
> want me to re-send this patch (or even the whole series) or can you
> remove it? everything else is fine (I double-checked this time...)
fixed up.

Thanks,

Jonathan

> 
> > > This only enables the temperature sensor for the Meson8 SoC. Meson8b and
> > > Meson8m2 SoCs can be supported in the future as well but we first need
> > > a way to pass the fifth TSC (temperature sensor coefficient) bit to the
> > > HHI register area (apart from that the infrastructure as already
> > > implemented for Meson8 can be used). On the 64-bit SoCs (GXBB, GXL and
> > > GXM) the temperature sensor inside SAR ADC is firmware-controlled (by
> > > BL30, we can simply use the SCPI hwmon driver to get the chip
> > > temperature).
> > >
> > > To keep the devicetree interface backwards compatible we simply skip the
> > > temperature sensor initialization if no eFuse nvmem cell is passed via
> > > devicetree.
> > >
> > > The public documentation for the SAR ADC IP block does not explain how
> > > to use the registers to read the temperature. The logic from this patch
> > > is based on reading and understanding Amlogic's GPL kernel sources.
> > >
> > > Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>  
> > Good detailed explanation.  Thanks.  
> you're welcome!
> please see my comment above where I have to admit that not all of the
> description is "good".
> 
> > Applied to the togreg branch of iio.git and pushed out as testing for
> > the autobuilders to play with it.  
> that was quick - thank you!
> 
> 
> Regards
> Martin

WARNING: multiple messages have this Message-ID (diff)
From: jic23@kernel.org (Jonathan Cameron)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH v2 2/2] iio: adc: meson-saradc: add support for the chip's temperature sensor
Date: Sun, 11 Nov 2018 15:04:45 +0000	[thread overview]
Message-ID: <20181111150445.4e2110ea@archlinux> (raw)
In-Reply-To: <CAFBinCB4bByOqXbUJEv2-fMKWDett-ym++7=x87tDWD4BTQ7QA@mail.gmail.com>

On Sun, 4 Nov 2018 23:36:10 +0100
Martin Blumenstingl <martin.blumenstingl@googlemail.com> wrote:

> Hi Jonathan,
> 
> On Sun, Nov 4, 2018 at 6:00 PM Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > On Sun,  4 Nov 2018 00:10:24 +0100
> > Martin Blumenstingl <martin.blumenstingl@googlemail.com> wrote:
> >  
> > > Channel 6 of the SAR ADC can be switched between two inputs:
> > > SAR_ADC_CH6 input (an actual pad on the SoC) and the signal from the
> > > temperature sensor inside the SoC.
> > >
> > > To get usable results from the temperature sensor we need to read the
> > > corresponding calibration data from the eFuse and pass it to the SAR ADC
> > > registers. If the temperature sensor is not calibrated (the eFuse data
> > > contains a bit for this) then the driver will only register the
> > > iio_chan_spec's for voltage measurements.
> > >
> > > (bits [3:0]) and (on Meson8b and Meson8m2) to a scratch register in the
> > > HHI region.  
> I missed this "fragment" (I wouldn't call it a sentence) when I sent the patch.
> the next paragraph already contains an explanation about the TSC on
> Meson8b and Meson8m2 as well as the HHI register area.
> so this paragraph doesn't make any sense and should be removed. do you
> want me to re-send this patch (or even the whole series) or can you
> remove it? everything else is fine (I double-checked this time...)
fixed up.

Thanks,

Jonathan

> 
> > > This only enables the temperature sensor for the Meson8 SoC. Meson8b and
> > > Meson8m2 SoCs can be supported in the future as well but we first need
> > > a way to pass the fifth TSC (temperature sensor coefficient) bit to the
> > > HHI register area (apart from that the infrastructure as already
> > > implemented for Meson8 can be used). On the 64-bit SoCs (GXBB, GXL and
> > > GXM) the temperature sensor inside SAR ADC is firmware-controlled (by
> > > BL30, we can simply use the SCPI hwmon driver to get the chip
> > > temperature).
> > >
> > > To keep the devicetree interface backwards compatible we simply skip the
> > > temperature sensor initialization if no eFuse nvmem cell is passed via
> > > devicetree.
> > >
> > > The public documentation for the SAR ADC IP block does not explain how
> > > to use the registers to read the temperature. The logic from this patch
> > > is based on reading and understanding Amlogic's GPL kernel sources.
> > >
> > > Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>  
> > Good detailed explanation.  Thanks.  
> you're welcome!
> please see my comment above where I have to admit that not all of the
> description is "good".
> 
> > Applied to the togreg branch of iio.git and pushed out as testing for
> > the autobuilders to play with it.  
> that was quick - thank you!
> 
> 
> Regards
> Martin

  reply	other threads:[~2018-11-11 15:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-03 23:10 [PATCH v2 0/2] meson-saradc: add chip temperature support Martin Blumenstingl
2018-11-03 23:10 ` Martin Blumenstingl
2018-11-03 23:10 ` [PATCH v2 1/2] dt-bindings: iio: adc: meson-saradc: add temperature sensor support Martin Blumenstingl
2018-11-03 23:10   ` Martin Blumenstingl
2018-11-04 16:58   ` Jonathan Cameron
2018-11-04 16:58     ` Jonathan Cameron
2018-11-05 22:16   ` Rob Herring
2018-11-05 22:16     ` Rob Herring
2018-11-05 22:16     ` Rob Herring
2018-11-03 23:10 ` [PATCH v2 2/2] iio: adc: meson-saradc: add support for the chip's temperature sensor Martin Blumenstingl
2018-11-03 23:10   ` Martin Blumenstingl
2018-11-04 17:00   ` Jonathan Cameron
2018-11-04 17:00     ` Jonathan Cameron
2018-11-04 22:36     ` Martin Blumenstingl
2018-11-04 22:36       ` Martin Blumenstingl
2018-11-11 15:04       ` Jonathan Cameron [this message]
2018-11-11 15:04         ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181111150445.4e2110ea@archlinux \
    --to=jic23@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.