From: Shawn Guo <shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Leonard Crestez <leonard.crestez-3arQi8VN3Tc@public.gmane.org>
Cc: "Zhang Rui" <rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
"Eduardo Valentin"
<edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Srinivas Kandagatla"
<srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"Rob Herring" <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"Mark Rutland" <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
"Lothar Waßmann"
<LW-bxm8fMRDkQLDiMYJYoSAnRvVK+yQ3ZXh@public.gmane.org>,
"Fabio Estevam" <fabio.estevam-3arQi8VN3Tc@public.gmane.org>,
"Dong Aisheng" <aisheng.dong-3arQi8VN3Tc@public.gmane.org>,
"Bai Ping" <ping.bai-3arQi8VN3Tc@public.gmane.org>,
"Anson Huang" <Anson.Huang-3arQi8VN3Tc@public.gmane.org>,
"Octavian Purdila"
<octavian.purdila-3arQi8VN3Tc@public.gmane.org>,
linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 3/4] ARM: dts: imx6sx: Use nvmem-cells for tempmon
Date: Wed, 12 Jul 2017 14:40:43 +0800 [thread overview]
Message-ID: <20170712064041.GE3172@dragon> (raw)
In-Reply-To: <6dc9bb756daf75bb26648b06b204872f71b3a548.1499347157.git.leonard.crestez-3arQi8VN3Tc@public.gmane.org>
On Thu, Jul 06, 2017 at 04:20:43PM +0300, Leonard Crestez wrote:
> On imx6sx accessing OCOTP directly is wrong because the ocotp clock
> needs to be enabled first. Use the nvmem-cells binding instead.
>
> This requirement does not apply to older imx6qdl chips because there the
> ocotp access clock (clk_ipg_s) is always enabled.
>
> This is visible by comparing the "System Clocks, Gating, and Override"
> tables (OCOTP rows) in the 6DQ and 6SX manuals:
> http://www.nxp.com/assets/documents/data/en/reference-manuals/IMX6SXRM.pdf
> http://www.nxp.com/assets/documents/data/en/reference-manuals/IMX6DQRM.pdf
>
> This happens to work right now because the ocotp clock might be enabled
> for some other reason. In particular the it might be enabled from the
> bootloader and it only gets disabled late during boot in
> clk_disable_unused, after imx-thermal has completed probing.
>
> If imx-thermal is compiled as a module then the system can hang on
> probe.
>
> Reported-by: Lothar Waßmann <LW-bxm8fMRDkQLDiMYJYoSAnRvVK+yQ3ZXh@public.gmane.org>
> Signed-off-by: Leonard Crestez <leonard.crestez-3arQi8VN3Tc@public.gmane.org>
> ---
> arch/arm/boot/dts/imx6sx.dtsi | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi
> index f16b9df..5cfee85 100644
> --- a/arch/arm/boot/dts/imx6sx.dtsi
> +++ b/arch/arm/boot/dts/imx6sx.dtsi
> @@ -675,7 +675,8 @@
> compatible = "fsl,imx6sx-tempmon", "fsl,imx6q-tempmon";
> interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
> fsl,tempmon = <&anatop>;
> - fsl,tempmon-data = <&ocotp>;
> + nvmem-cells = <&tempmon_calib>, <&tempmon_temp_grade>;
> + nvmem-cell-names = "calib", "temp_grade";
> clocks = <&clks IMX6SX_CLK_PLL3_USB_OTG>;
> };
>
> @@ -993,9 +994,17 @@
> };
>
> ocotp: ocotp@021bc000 {
> + #address-cells = <1>;
> + #size-cells = <1>;
> compatible = "fsl,imx6sx-ocotp", "syscon";
> reg = <0x021bc000 0x4000>;
> clocks = <&clks IMX6SX_CLK_OCOTP>;
Please have a newline between child node and property list ...
> + tempmon_calib: calib {
> + reg = <56 4>;
> + };
... and between child nodes as well.
> + tempmon_temp_grade: temp_grade {
We prefer to use hyphen rather than underscore in node name. And node
name should have a corresponding unit-address, if the node has a 'reg'
property.
Shawn
> + reg = <32 4>;
> + };
> };
>
> sai1: sai@021d4000 {
> --
> 2.7.4
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-07-12 6:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-06 13:20 [PATCH 0/4] thermal: imx: Add nvmem-cells binding on imx6sx Leonard Crestez
[not found] ` <cover.1499347157.git.leonard.crestez-3arQi8VN3Tc@public.gmane.org>
2017-07-06 13:20 ` [PATCH 1/4] thermal: imx: Add nvmem-cells alternate binding for OCOTP access Leonard Crestez
2017-07-10 13:29 ` Rob Herring
2017-07-06 13:20 ` [PATCH 2/4] thermal: imx: Add support for reading OCOTP through nvmem Leonard Crestez
[not found] ` <68b476b35b0c0cbce21da0e87338323bb77e9bc4.1499347157.git.leonard.crestez-3arQi8VN3Tc@public.gmane.org>
2017-07-12 6:36 ` Shawn Guo
2017-07-14 8:48 ` Srinivas Kandagatla
[not found] ` <3dd43cba-02f2-204c-c3a2-582827018ef8-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-07-14 10:49 ` Leonard Crestez
2017-07-14 10:54 ` Srinivas Kandagatla
2017-07-06 13:20 ` [PATCH 3/4] ARM: dts: imx6sx: Use nvmem-cells for tempmon Leonard Crestez
[not found] ` <6dc9bb756daf75bb26648b06b204872f71b3a548.1499347157.git.leonard.crestez-3arQi8VN3Tc@public.gmane.org>
2017-07-12 6:40 ` Shawn Guo [this message]
2017-07-06 13:20 ` [PATCH 4/4] ARM: dts: imx6ul: Add imx6ul-tempmon Leonard Crestez
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=20170712064041.GE3172@dragon \
--to=shawnguo-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=Anson.Huang-3arQi8VN3Tc@public.gmane.org \
--cc=LW-bxm8fMRDkQLDiMYJYoSAnRvVK+yQ3ZXh@public.gmane.org \
--cc=aisheng.dong-3arQi8VN3Tc@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=fabio.estevam-3arQi8VN3Tc@public.gmane.org \
--cc=leonard.crestez-3arQi8VN3Tc@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=octavian.purdila-3arQi8VN3Tc@public.gmane.org \
--cc=ping.bai-3arQi8VN3Tc@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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 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).