Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1671679ybb; Thu, 9 Apr 2020 06:56:24 -0700 (PDT) X-Google-Smtp-Source: APiQypI4ELMQtQ/U3bO9/yKcXBlhSyVxOzUPQApacSAjIv6VWBmkDkHfnvpzNyAotlwKSclyKQJa X-Received: by 2002:a37:58c3:: with SMTP id m186mr13399673qkb.30.1586440584346; Thu, 09 Apr 2020 06:56:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586440584; cv=none; d=google.com; s=arc-20160816; b=U6aLLRARzHWEnr+eCOgAO0aL2WSdQddUQqWMyQ9G8v2C7G6t7uX0tg+N9BH6kFLYMV Z3EAtFqiHE2a1AOvwrZONepAVH3mhEYt1+spFfxQXRY5zE1iSbNBYLXj06irbrjvEOWd 4SnRMEEoNzj2VTh7KYPYILmY8EuVt1Hi7EHXawAfxfDcn1u5jDEpuEoAM6tOvctTC6oq 0tJmyyRGJS8kB0zWMqR6/pEnkA23RlD1soKJ4bKendfz0x4zgFXFm8S2WnMKIE4ZhYQJ cTcbz3QLPpi0wVTCDgw/xbIDZVQ66rdDk2h5vyMW1KISIlVBb+Sk/sPBlzlczluqCo59 qQ1g== 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=dwoCAYUicLqYBaO2hxUisMrF80YNdDxwi3wgZyFZPfY=; b=nuBaArZv/3yBPfi0SgkaHxDmTrW/q3AE62HIRmv4nqEWExjoVwXMHA85Sdif1Fu89J hz++KayOR7X7XVV9AZeMcb2bF26+qji68r6gJ104vx7Riebo9rvsOvd1ngve3ppC+QCP Sx7IQRdl7Cg+Ge4SsrNL/+1vl+BNkqmOI8DxR+BFWJH+vG9iKJz9d6xX5ZIqcBIUfm3+ M8vWwHZGwhQTyB1xO8qOikJ5UOGGJ2gQWDarqfc4buDbPVp/lr5c540oOUd2VpU4GcRJ TFvY1ejcaSe5ZDzqDWOXmF+/9qkp7KTmGjXvxIe2X4DHWzh7QgB7SfWl8A4u3dDfsW/U A/8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@verdurent-com.20150623.gappssmtp.com header.s=20150623 header.b=wweADUP5; 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 e63si5770516qkd.72.2020.04.09.06.56.08; Thu, 09 Apr 2020 06:56:24 -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=wweADUP5; 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 S1727028AbgDINx4 (ORCPT + 99 others); Thu, 9 Apr 2020 09:53:56 -0400 Received: from mail-vk1-f195.google.com ([209.85.221.195]:40455 "EHLO mail-vk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727015AbgDINx4 (ORCPT ); Thu, 9 Apr 2020 09:53:56 -0400 Received: by mail-vk1-f195.google.com with SMTP id s137so1158066vks.7 for ; Thu, 09 Apr 2020 06:53:55 -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=dwoCAYUicLqYBaO2hxUisMrF80YNdDxwi3wgZyFZPfY=; b=wweADUP5FzxaHiLF24hi0m7NCNmG+wWWvNjJ1eiOO/OlSay/LG3/+OL7VRWt+AD1mh ZH52JsZOextHKATsMZttP9sdaEEMofKEi6yH9s6CgYHwfByd/lm5rOpUXF1YK1/qTN8O bfzayFsyH9z3xOO+OGPTz3eDCybehJkSgorlgO8Sl0h0um8cgs1uq2T1hjBjDVHXdIFP YkQCHQbuMbl4VVPKNGuJ2X1sYlHDweECPisSywxLmg30PknIkU1xwvBk+Bzu8HxgvMEP hAKGSuBFt54bjpyrQ/GPEEGgAP3aunJ4+vie6fAEomGmeNhRfFsK9xt8v+qJC+LhEoww WgaA== 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=dwoCAYUicLqYBaO2hxUisMrF80YNdDxwi3wgZyFZPfY=; b=D8KqqCcF5Y2Ivwq7IstBdwNK1bd3Chqufg7vbT2pXF4Z/+e2KlTb8DfU4WvqtvZ3wu v0kcDrvp96vTxBVjbQ7/tuY9bMpmLk6WwZaJUFuI33TAgPW+SgkBYQNLY+gWErFB7EMh mpCjGFnSzjE0cEyqOOBav3vaqHnOWh64ZaiDcTcqBBvuA2cIZt2HwTBHg78ah7dAa719 8S/+Qffu/dWPq2Sp8t3w3akXB8mtS0SPV1tNuZ2Q9GElRlvsc/FVyviek3uI/AC/yi9j BPogF2oN+4bcukwn4EPvUCyBweRSikkiTRDmC9iTGdQh9yOGn4GOPm6IAuLhAoO199BV qJNw== X-Gm-Message-State: AGi0PuYViG/ppjWKD7gA3Bloe34B3s1j4+5qBJLbllSV3aR3EpjrbzRL HNDxJ4pDrUU2ogXuJHev5mrj4hu0DtTxKIRxxRfIADHWEEY= X-Received: by 2002:a1f:ce86:: with SMTP id e128mr9764243vkg.86.1586440434685; Thu, 09 Apr 2020 06:53:54 -0700 (PDT) MIME-Version: 1.0 References: <1586407908-27139-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1586407908-27139-1-git-send-email-Anson.Huang@nxp.com> From: Amit Kucheria Date: Thu, 9 Apr 2020 19:23:43 +0530 Message-ID: Subject: Re: [PATCH] dt-bindings: thermal: Convert i.MX 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 10:29 AM Anson Huang wrote: > > Convert the i.MX thermal binding to DT schema format using json-schema > > Signed-off-by: Anson Huang > --- > .../devicetree/bindings/thermal/imx-thermal.txt | 61 -------------- > .../devicetree/bindings/thermal/imx-thermal.yaml | 97 ++++++++++++++++++++++ > 2 files changed, 97 insertions(+), 61 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/thermal/imx-thermal.txt > create mode 100644 Documentation/devicetree/bindings/thermal/imx-thermal.yaml > > diff --git a/Documentation/devicetree/bindings/thermal/imx-thermal.txt b/Documentation/devicetree/bindings/thermal/imx-thermal.txt > deleted file mode 100644 > index 823e417..0000000 > --- a/Documentation/devicetree/bindings/thermal/imx-thermal.txt > +++ /dev/null > @@ -1,61 +0,0 @@ > -* Temperature Monitor (TEMPMON) on Freescale i.MX SoCs > - > -Required properties: > -- compatible : must be one of following: > - - "fsl,imx6q-tempmon" for i.MX6Q, > - - "fsl,imx6sx-tempmon" for i.MX6SX, > - - "fsl,imx7d-tempmon" for i.MX7S/D. > -- interrupts : the interrupt output of the controller: > - i.MX6Q has one IRQ which will be triggered when temperature is higher than high threshold, > - i.MX6SX and i.MX7S/D have two more IRQs than i.MX6Q, one is IRQ_LOW and the other is IRQ_PANIC, > - when temperature is below than low threshold, IRQ_LOW will be triggered, when temperature > - is higher than panic threshold, system will auto reboot by SRC module. > -- fsl,tempmon : phandle pointer to system controller that contains TEMPMON > - control registers, e.g. ANATOP on imx6q. > -- nvmem-cells: A phandle to the calibration cells provided by ocotp. > -- nvmem-cell-names: Should be "calib", "temp_grade". > - > -Deprecated properties: > -- fsl,tempmon-data : phandle pointer to fuse controller that contains TEMPMON > - calibration data, e.g. OCOTP on imx6q. The details about calibration data > - can be found in SoC Reference Manual. > - > -Direct access to OCOTP via fsl,tempmon-data is incorrect on some newer chips > -because it does not handle OCOTP clock requirements. > - > -Optional properties: > -- clocks : thermal sensor's clock source. > - > -Example: > -ocotp: ocotp@21bc000 { > - #address-cells = <1>; > - #size-cells = <1>; > - compatible = "fsl,imx6sx-ocotp", "syscon"; > - reg = <0x021bc000 0x4000>; > - clocks = <&clks IMX6SX_CLK_OCOTP>; > - > - tempmon_calib: calib@38 { > - reg = <0x38 4>; > - }; > - > - tempmon_temp_grade: temp-grade@20 { > - reg = <0x20 4>; > - }; > -}; > - > -tempmon: tempmon { > - compatible = "fsl,imx6sx-tempmon", "fsl,imx6q-tempmon"; > - interrupts = ; > - fsl,tempmon = <&anatop>; > - nvmem-cells = <&tempmon_calib>, <&tempmon_temp_grade>; > - nvmem-cell-names = "calib", "temp_grade"; > - clocks = <&clks IMX6SX_CLK_PLL3_USB_OTG>; > -}; > - > -Legacy method (Deprecated): > -tempmon { > - compatible = "fsl,imx6q-tempmon"; > - fsl,tempmon = <&anatop>; > - fsl,tempmon-data = <&ocotp>; > - clocks = <&clks 172>; > -}; > diff --git a/Documentation/devicetree/bindings/thermal/imx-thermal.yaml b/Documentation/devicetree/bindings/thermal/imx-thermal.yaml > new file mode 100644 > index 0000000..ad12622 > --- /dev/null > +++ b/Documentation/devicetree/bindings/thermal/imx-thermal.yaml > @@ -0,0 +1,97 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/thermal/imx-thermal.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: NXP i.MX Thermal Binding > + > +maintainers: > + - Anson Huang > + > +properties: > + compatible: > + oneOf: > + - items: > + - enum: > + - fsl,imx6q-tempmon > + - fsl,imx6sx-tempmon > + - fsl,imx7d-tempmon > + > + interrupts: > + description: | > + The interrupt output of the controller, the IRQ will be triggered > + when temperature is higher than high threshold. > + maxItems: 1 > + > + nvmem-cells: > + description: | > + Phandle to the calibration cells provided by ocotp for calibration > + data and temperature grade. > + maxItems: 2 > + > + nvmem-cell-names: > + maxItems: 2 > + items: > + - const: calib > + - const: temp_grade > + > + fsl,tempmon: > + description: | > + Phandle pointer to system controller that contains TEMPMON control > + registers, e.g. ANATOP on imx6q. > + $ref: '/schemas/types.yaml#/definitions/phandle' > + > + fsl,tempmon-data: > + description: | > + Deprecated property, phandle pointer to fuse controller that contains > + TEMPMON calibration data, e.g. OCOTP on imx6q. The details about > + calibration data can be found in SoC Reference Manual. > + $ref: '/schemas/types.yaml#/definitions/phandle' > + > + clocks: > + description: | > + Thermal sensor's clock source. > + maxItems: 1 > + > +required: > + - compatible > + - interrupts > + - fsl,tempmon > + - clocks > + - nvmem-cells > + - nvmem-cell-names > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + > + ocotp: ocotp@21bc000 { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "fsl,imx6sx-ocotp", "syscon"; > + reg = <0x021bc000 0x4000>; > + clocks = <&clks IMX6SX_CLK_OCOTP>; > + > + tempmon_calib: calib@38 { > + reg = <0x38 4>; > + }; > + > + tempmon_temp_grade: temp-grade@20 { > + reg = <0x20 4>; > + }; > + }; > + > + tempmon: tempmon { > + compatible = "fsl,imx6sx-tempmon"; > + interrupts = ; > + fsl,tempmon = <&anatop>; > + nvmem-cells = <&tempmon_calib>, <&tempmon_temp_grade>; > + nvmem-cell-names = "calib", "temp_grade"; > + clocks = <&clks IMX6SX_CLK_PLL3_USB_OTG>; Also, #thermal-sensor-cells property is missing in the example and in the property list above. > + }; > + > +... > -- > 2.7.4 >