linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anson Huang <anson.huang@nxp.com>
To: Amit Kucheria <amit.kucheria@verdurent.com>
Cc: Zhang Rui <rui.zhang@intel.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Rob Herring <robh+dt@kernel.org>, Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	Linux PM list <linux-pm@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	lakml <linux-arm-kernel@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	dl-linux-imx <linux-imx@nxp.com>
Subject: RE: [PATCH] dt-bindings: thermal: Convert i.MX8MM to json-schema
Date: Thu, 9 Apr 2020 14:22:35 +0000	[thread overview]
Message-ID: <DB3PR0402MB39160A94CD5E97AA79E2DB5AF5C10@DB3PR0402MB3916.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <CAHLCerNonZ7qJi8Qihmj87QteEnxTF0PRS6vw5GPemMurOfS9Q@mail.gmail.com>

Hi, Amit

> Subject: Re: [PATCH] dt-bindings: thermal: Convert i.MX8MM to json-schema
> 
> Hi Anson,
> 
> On Thu, Apr 9, 2020 at 8:56 AM Anson Huang <Anson.Huang@nxp.com>
> wrote:
> >
> > Convert the i.MX8MM thermal binding to DT schema format using
> > json-schema
> 
> Would it be possible to have a single yaml file for all i.MX thermal sensors by
> playing with required and optional properties ?

i.MX SoCs have many different thermal sensor IP and hence different thermal driver
is used, and different i.MX thermal drivers have different DT bindings, so is it good to
put all of them into single yaml file? For example, imx_thermal.c is for i.MX6/7 SoCs which
do NOT use of_thermal framework, imx8mm_thermal.c is for i.MX8MM/i.MX8MP which
use of_thermal framework.

If putting all of them into 1 yaml file, it will be almost like just putting 2 files together, I
Personally don't think it is a good idea.

> 
> > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > ---
> >  .../devicetree/bindings/thermal/imx8mm-thermal.txt | 15 ------
> >  .../bindings/thermal/imx8mm-thermal.yaml           | 53
> ++++++++++++++++++++++
> >  2 files changed, 53 insertions(+), 15 deletions(-)  delete mode
> > 100644 Documentation/devicetree/bindings/thermal/imx8mm-thermal.txt
> >  create mode 100644
> > Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml
> >
> > diff --git
> > a/Documentation/devicetree/bindings/thermal/imx8mm-thermal.txt
> > b/Documentation/devicetree/bindings/thermal/imx8mm-thermal.txt
> > deleted file mode 100644
> > index 3629d3c..0000000
> > --- a/Documentation/devicetree/bindings/thermal/imx8mm-thermal.txt
> > +++ /dev/null
> > @@ -1,15 +0,0 @@
> > -* Thermal Monitoring Unit (TMU) on Freescale i.MX8MM SoC
> > -
> > -Required properties:
> > -- compatible : Must be "fsl,imx8mm-tmu" or "fsl,imx8mp-tmu".
> > -- reg : Address range of TMU registers.
> > -- clocks : TMU's clock source.
> > -- #thermal-sensor-cells : Should be 0 or 1. See ./thermal.txt for a description.
> > -
> > -Example:
> > -tmu: tmu@30260000 {
> > -       compatible = "fsl,imx8mm-tmu";
> > -       reg = <0x30260000 0x10000>;
> > -       clocks = <&clk IMX8MM_CLK_TMU_ROOT>;
> > -       #thermal-sensor-cells = <0>;
> > -};
> > diff --git
> > a/Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml
> > b/Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml
> > new file mode 100644
> > index 0000000..53a42b3
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml
> > @@ -0,0 +1,53 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +%YAML 1.2
> > +---
> > +$id:
> > +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevi
> >
> +cetree.org%2Fschemas%2Fthermal%2Fimx8mm-thermal.yaml%23&amp;data
> =02%7
> >
> +C01%7CAnson.Huang%40nxp.com%7Cb190e049130e49e0750d08d7dc8e48
> a3%7C686e
> >
> +a1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637220375963888457&am
> p;sdata=s
> >
> +S8%2FR2j%2BT1UmDqXFIPPzPgWs26lMiwW3saTq4qlZAUs%3D&amp;reserve
> d=0
> > +$schema:
> > +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevi
> >
> +cetree.org%2Fmeta-schemas%2Fcore.yaml%23&amp;data=02%7C01%7CAns
> on.Hua
> >
> +ng%40nxp.com%7Cb190e049130e49e0750d08d7dc8e48a3%7C686ea1d3bc
> 2b4c6fa92
> >
> +cd99c5c301635%7C0%7C0%7C637220375963898454&amp;sdata=tXIh9d%
> 2BszcExH0
> > +7ic7s%2BqJyUdbE0aHM3tH%2BwkWgnbhQ%3D&amp;reserved=0
> > +
> > +title: NXP i.MX8M Mini Thermal Binding
> > +
> > +maintainers:
> > +  - Anson Huang <Anson.Huang@nxp.com>
> > +
> > +properties:
> > +  compatible:
> > +    oneOf:
> > +      - items:
> > +          - enum:
> > +              - fsl,imx8mm-tmu
> > +              - fsl,imx8mp-tmu
> > +  reg:
> > +    description: |
> > +      Address range of TMU registers.
> > +    maxItems: 1
> > +  clocks:
> > +    description: |
> > +      TMU's clock source.
> > +    maxItems: 1
> > +
> > +  # See ./thermal.txt for details
> 
> Don't point to thermal.txt anymore. thermal.txt will be replaced by
> thermal-*.yaml files at some point soon.

OK, will remove it.

> 
> > +  "#thermal-sensor-cells":
> > +    enum:
> > +      - 0
> 
> Don't you have multiple sensors connected to this controller? In that case, 0
> won't be a valid value.

imx8mm_thermal driver is for i.MX8MM and i.MX8MP, i.MX8MM ONLY has 1 sensor,
while i.MX8MP has 2 sensors, that is why I put both 0 and 1 here.

Thanks,
Anson


  reply	other threads:[~2020-04-09 14:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09  3:18 [PATCH] dt-bindings: thermal: Convert i.MX8MM to json-schema Anson Huang
2020-04-09 13:59 ` Amit Kucheria
2020-04-09 14:22   ` Anson Huang [this message]
2020-04-09 14:39     ` Amit Kucheria

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=DB3PR0402MB39160A94CD5E97AA79E2DB5AF5C10@DB3PR0402MB3916.eurprd04.prod.outlook.com \
    --to=anson.huang@nxp.com \
    --cc=amit.kucheria@verdurent.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=s.hauer@pengutronix.de \
    --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 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).