All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leonard Crestez <leonard.crestez@nxp.com>
To: Anson Huang <Anson.Huang@nxp.com>,
	rui.zhang@intel.com, edubezval@gmail.com, shawnguo@kernel.org
Cc: Linux-imx@nxp.com, linux-pm@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, robh+dt@kernel.org,
	"Mark Rutland" <mark.rutland@arm.com>,
	fabio.estevam@nxp.com, linux@armlinux.org.uk,
	kernel@pengutronix.de, "Lothar Waßmann" <LW@KARO-electronics.de>
Subject: Re: [PATCH V4 2/2] thermal: imx: add i.MX7 thermal sensor support
Date: Wed, 28 Feb 2018 19:25:31 +0200	[thread overview]
Message-ID: <1519838731.16494.8.camel@nxp.com> (raw)
In-Reply-To: <1519459369-29083-2-git-send-email-Anson.Huang@nxp.com>

On Sat, 2018-02-24 at 16:02 +0800, Anson Huang wrote:
> This patch adds i.MX7 thermal sensor support, most
> of the i.MX7 thermal sensor functions are same with
> i.MX6 except the registers offset/layout, so we move
> those registers offset/layout definitions to soc data
> structure.
> 
> i.MX7 uses single calibration data @25C, the calibration
> data is located at OCOTP offset 0x4F0, bit[17:9], the
> formula is as below:
> 
> Tmeas = (Nmeas - n1) + 25; n1 is the fuse value for 25C.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> Signed-off-by: Bai Ping <ping.bai@nxp.com>

On imx7d (also 6sx and 6ul) OCOTP read will hang silently if the ocotp
clk is not enabled. For example this can happen if imx_thermal is built
as a module or probes after unused clocks are disabled.

This driver has support for reading ocotp values through the ocotp
nvmem driver (which handles clks properly). Since imx7d is a new
compatible string for upstream maybe you could just make new-style
bindings mandatory and drop the changes to imx_init_from_tempmon_data?

See commit 2067b757e972 ("ARM: dts: imx6ul: Add imx6ul-tempmon")

--
Regards,
Leonard

WARNING: multiple messages have this Message-ID (diff)
From: leonard.crestez@nxp.com (Leonard Crestez)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V4 2/2] thermal: imx: add i.MX7 thermal sensor support
Date: Wed, 28 Feb 2018 19:25:31 +0200	[thread overview]
Message-ID: <1519838731.16494.8.camel@nxp.com> (raw)
In-Reply-To: <1519459369-29083-2-git-send-email-Anson.Huang@nxp.com>

On Sat, 2018-02-24 at 16:02 +0800, Anson Huang wrote:
> This patch adds i.MX7 thermal sensor support, most
> of the i.MX7 thermal sensor functions are same with
> i.MX6 except the registers offset/layout, so we move
> those registers offset/layout definitions to soc data
> structure.
> 
> i.MX7 uses single calibration data @25C, the calibration
> data is located at OCOTP offset 0x4F0, bit[17:9], the
> formula is as below:
> 
> Tmeas = (Nmeas - n1) + 25; n1 is the fuse value for 25C.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> Signed-off-by: Bai Ping <ping.bai@nxp.com>

On imx7d (also 6sx and 6ul) OCOTP read will hang silently if the ocotp
clk is not enabled. For example this can happen if imx_thermal is built
as a module or probes after unused clocks are disabled.

This driver has support for reading ocotp values through the ocotp
nvmem driver (which handles clks properly). Since imx7d is a new
compatible string for upstream maybe you could just make new-style
bindings mandatory and drop the changes to?imx_init_from_tempmon_data?

See?commit 2067b757e972 ("ARM: dts: imx6ul: Add imx6ul-tempmon")

--
Regards,
Leonard

WARNING: multiple messages have this Message-ID (diff)
From: Leonard Crestez <leonard.crestez@nxp.com>
To: Anson Huang <Anson.Huang@nxp.com>, <rui.zhang@intel.com>,
	<edubezval@gmail.com>, <shawnguo@kernel.org>
Cc: Linux-imx@nxp.com, linux-pm@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, robh+dt@kernel.org,
	"Mark Rutland" <mark.rutland@arm.com>,
	fabio.estevam@nxp.com, linux@armlinux.org.uk,
	kernel@pengutronix.de, "Lothar Waßmann" <LW@KARO-electronics.de>
Subject: Re: [PATCH V4 2/2] thermal: imx: add i.MX7 thermal sensor support
Date: Wed, 28 Feb 2018 19:25:31 +0200	[thread overview]
Message-ID: <1519838731.16494.8.camel@nxp.com> (raw)
In-Reply-To: <1519459369-29083-2-git-send-email-Anson.Huang@nxp.com>

On Sat, 2018-02-24 at 16:02 +0800, Anson Huang wrote:
> This patch adds i.MX7 thermal sensor support, most
> of the i.MX7 thermal sensor functions are same with
> i.MX6 except the registers offset/layout, so we move
> those registers offset/layout definitions to soc data
> structure.
> 
> i.MX7 uses single calibration data @25C, the calibration
> data is located at OCOTP offset 0x4F0, bit[17:9], the
> formula is as below:
> 
> Tmeas = (Nmeas - n1) + 25; n1 is the fuse value for 25C.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> Signed-off-by: Bai Ping <ping.bai@nxp.com>

On imx7d (also 6sx and 6ul) OCOTP read will hang silently if the ocotp
clk is not enabled. For example this can happen if imx_thermal is built
as a module or probes after unused clocks are disabled.

This driver has support for reading ocotp values through the ocotp
nvmem driver (which handles clks properly). Since imx7d is a new
compatible string for upstream maybe you could just make new-style
bindings mandatory and drop the changes to imx_init_from_tempmon_data?

See commit 2067b757e972 ("ARM: dts: imx6ul: Add imx6ul-tempmon")

--
Regards,
Leonard

  parent reply	other threads:[~2018-02-28 17:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-24  8:02 [PATCH V4 1/2] ARM: dts: imx7s: add temperature monitor support Anson Huang
2018-02-24  8:02 ` Anson Huang
2018-02-24  8:02 ` Anson Huang
2018-02-24  8:02 ` [PATCH V4 2/2] thermal: imx: add i.MX7 thermal sensor support Anson Huang
2018-02-24  8:02   ` Anson Huang
2018-02-24  8:02   ` Anson Huang
2018-02-24  9:20   ` Shawn Guo
2018-02-24  9:20     ` Shawn Guo
2018-02-24  9:20     ` Shawn Guo
2018-02-28  2:27   ` A.s. Dong
2018-02-28  2:27     ` A.s. Dong
2018-02-28 17:25   ` Leonard Crestez [this message]
2018-02-28 17:25     ` Leonard Crestez
2018-02-28 17:25     ` Leonard Crestez
2018-02-28 23:16     ` Anson Huang
2018-02-28 23:16       ` Anson Huang

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=1519838731.16494.8.camel@nxp.com \
    --to=leonard.crestez@nxp.com \
    --cc=Anson.Huang@nxp.com \
    --cc=LW@KARO-electronics.de \
    --cc=Linux-imx@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=edubezval@gmail.com \
    --cc=fabio.estevam@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=shawnguo@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.