Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1834383ybb; Thu, 9 Apr 2020 09:51:53 -0700 (PDT) X-Google-Smtp-Source: APiQypL6o39IEwsPEYpBVsv+qjZJrdzVaJzZT0p1LpjwoB5KJUPUFNkP3UiBBLC/g2U4argaT5Bb X-Received: by 2002:a37:a616:: with SMTP id p22mr801227qke.416.1586451113160; Thu, 09 Apr 2020 09:51:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586451113; cv=none; d=google.com; s=arc-20160816; b=hqj6RxFxfNozNR6TKeg2Iciw8efMbm/JxILIlT86+VunhaZX2u1cniUwhlTONG/Yd3 otgGup/PcuH8YlxvhSjL5MbLDjQiJCxRpt+4Ln0BXdaE/atUPkhVQ04kgxL/JtjyEbD7 AxYGYgfe5QKBOkBGipOfwivkl0dXUGeIUj9nC2aghnaA2URVJ5+ylvNHZtIclH5o+ZxR JjUy4dycD6fzaJzX28tYFHZsjvFqEtg8msLafP39okkibM1g4Z9QTEASBY3RR4iLCIRk i2fza21rxhGZEpVfiIBPu/yNSYxAZyP+mmNJtE+D7tki6sLdrom7t5TEocOSxOzh1mon JokA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=xEkP9tsPmG6xIpP1vzjRU5PHmw91Ij8x4EQYq0ffIRY=; b=JSP+Qpba8K1boSwuodealRims8BHL955UiH+oduDcPbKmKJp2rYDZUX+v9PZvaCEsh oOfKZGVeLSKwwpyB3g76//fYwDfEn24qqOULsM3KxTZWoqWw3ntay4lOe3Ptd4kVpsA9 Ur2IQHDvSGZ7OzYDxKeCbRHPHUD4UO9hGiePm/z7FGBVPreylCks7sBxQRPDVu+s+SwC OZcGSOJoCskEU6uNILk0wnwlxcYgUr4QTOOssxgzRYPwbEaET9Wn3J4S9g/5jLXbkKDM dgM2/6ViEoSGe6cnbCJT1fK9QZ2ak+MFbz4/RDgYmJ/uBy/aIuKgWsts64OX2smGrCl8 vsog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@verdurent-com.20150623.gappssmtp.com header.s=20150623 header.b=gRRRZ1sM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 13si5974309qkv.290.2020.04.09.09.51.38; Thu, 09 Apr 2020 09:51:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@verdurent-com.20150623.gappssmtp.com header.s=20150623 header.b=gRRRZ1sM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727795AbgDIOjn (ORCPT + 99 others); Thu, 9 Apr 2020 10:39:43 -0400 Received: from mail-vk1-f195.google.com ([209.85.221.195]:42316 "EHLO mail-vk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727162AbgDIOjn (ORCPT ); Thu, 9 Apr 2020 10:39:43 -0400 Received: by mail-vk1-f195.google.com with SMTP id q7so9497vkb.9 for ; Thu, 09 Apr 2020 07:39:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=verdurent-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xEkP9tsPmG6xIpP1vzjRU5PHmw91Ij8x4EQYq0ffIRY=; b=gRRRZ1sMj922xak2A74EFoOiHADrJzQm7/rJaeK5pfAuVSHS3gB2+2r+tsPF5OS3eU d6WCreqRsPuEuBmb7GUYzdYOWcj35hAhSyknSdX72vRTG8MWdz56Xa0CxZ3wF6m+lNY+ LTFdC2ag6KmzAX+wWZkumO7x9+kjKJCrPw4XheX1XI6vClZR6jJ3v9g8n+UDk6Y5h+94 DCmS5TZheYWqU1IJ9febMYwkGVw3Spycnc9wl32T284wdq1MJvmrwQuP6SJyi2M0qycW JoLTjabvZkTA6YKrrBRs8HZv8gpzqbcKC+Km/0ddJSh+SHoNn/WtjQiXGv+2ykhEopSO 4W4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xEkP9tsPmG6xIpP1vzjRU5PHmw91Ij8x4EQYq0ffIRY=; b=A2vGTzIfSaXWzY8e+b9uAgvHE4MLqD7d2CohP2xdPO1TN49OXliwE+V91ieM10n7l5 JTkmfmMDJBAcV1VgrU1zfzzd2od+lqA9QeTRS7JPdwJBu9eeZYPhJkN0wVRwdGlag66r PZHK6nbDqWDRLmocTToOvazSlt2vS5iUNQ7CxunRlcsIEWrBLqavteFvha/ry9KOc5AZ VZYngC6uF8ASzG6zmQss9oGkF51xdqqNChyzs93vJ7XHf8te0AHOkUL8KB0WLdKsZqcR xL9E9Ab/FZDB1eBsRpcK3N2Y1/wPtfrbn7iP/+1HnhXVGU3A0jrkPhbh96HPwnFkDejl AcXA== X-Gm-Message-State: AGi0PuZvcyVtvO2DavABJXC30v3ubqpB3g5GubViLiBtmQ0f4Dx+qu4P /gaUREpQfLlnZ6JPiONgvj/5ZKjwuxyR5RiY8Env0w== X-Received: by 2002:a05:6122:446:: with SMTP id f6mr1083497vkk.79.1586443182560; Thu, 09 Apr 2020 07:39:42 -0700 (PDT) MIME-Version: 1.0 References: <1586402293-30579-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: From: Amit Kucheria Date: Thu, 9 Apr 2020 20:09:31 +0530 Message-ID: Subject: Re: [PATCH] dt-bindings: thermal: Convert i.MX8MM to json-schema To: Anson Huang Cc: Zhang Rui , Daniel Lezcano , Rob Herring , Shawn Guo , Sascha Hauer , "kernel@pengutronix.de" , Fabio Estevam , Linux PM list , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , lakml , LKML , dl-linux-imx Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 9, 2020 at 7:52 PM Anson Huang wrote: > > 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 > > 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. OK. > > > > > Signed-off-by: Anson Huang > > > --- > > > .../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&data > > =02%7 > > > > > +C01%7CAnson.Huang%40nxp.com%7Cb190e049130e49e0750d08d7dc8e48 > > a3%7C686e > > > > > +a1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637220375963888457&am > > p;sdata=s > > > > > +S8%2FR2j%2BT1UmDqXFIPPzPgWs26lMiwW3saTq4qlZAUs%3D&reserve > > d=0 > > > +$schema: > > > +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevi > > > > > +cetree.org%2Fmeta-schemas%2Fcore.yaml%23&data=02%7C01%7CAns > > on.Hua > > > > > +ng%40nxp.com%7Cb190e049130e49e0750d08d7dc8e48a3%7C686ea1d3bc > > 2b4c6fa92 > > > > > +cd99c5c301635%7C0%7C0%7C637220375963898454&sdata=tXIh9d% > > 2BszcExH0 > > > +7ic7s%2BqJyUdbE0aHM3tH%2BwkWgnbhQ%3D&reserved=0 > > > + > > > +title: NXP i.MX8M Mini Thermal Binding > > > + > > > +maintainers: > > > + - Anson Huang > > > + > > > +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. Please put this in description after maintainers above.