Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6862846ybc; Thu, 28 Nov 2019 06:46:41 -0800 (PST) X-Google-Smtp-Source: APXvYqwutsR3fqCHPj6JPqy0XabRCsqPq1qP+KO5HYtW/E1zZpznAw2JIq0I4uQDijo87j9uuc82 X-Received: by 2002:a5d:4392:: with SMTP id i18mr7545286wrq.199.1574952401203; Thu, 28 Nov 2019 06:46:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574952401; cv=none; d=google.com; s=arc-20160816; b=IYCe3/o8QhZtZuIBBRAHKK3FlC+1ktpqU/OXKA5EQGye72108FoMekPifs8lWaR/oi mhrvH7NWetqk3UTiM9GMZaJQ/DN0TeWNe9c1Pqu31g+KBGDhopo+T+vQKHySu1ckJyG0 9LKTBeBzrOBoodPa/JI1juEpWLFuiEybc/xoq849lkL6daskuFr2A2qFRdTc9vCpNWZG epHyRhKjyEoctjPZdJgnHh2DUgKngr8WlSHOBOP51ETkAOYVFMOkFq6qyWqhpxI0OM52 VMJe9UwLzd7HI6J4Tz1YG9FdkncGBjnlSz6Sy6FHwHLLNPwRJiGYeflTX+0ihz5ME+oS rIRA== 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=jSx1W6k2m7YVIJkPLFSMsX2YfgHqtWK8uY9ek4Pmf8I=; b=WOEFBrw6nWQfmxxjqM2PujdlyT06apaLOChWR/C6nQmMS1ulAtg8WnjOikTP6VtDAX 9Kw10gUixxsAFNXM0NSgRXcbdvmIHO6ZeyOVTpPcN6g5eGgS4ewbDe/ma3M+nFxchQ7y kiJPlGYeN2DYINYrVkoVci2FQIo/W4Q+QbjFyXUHg/YPDkcL4y0Zj4sYPd4Fj2Bh37N6 y6VoIU6chZfnUuobllhOtU3aJX0TA8vA+NcjuAxIDrux23mmbimNsS2rFaYIR6ICskFq axlkvQqx+vDMCeqvKwuD+/+6KsEnTnktkfdsdeJzHuOC0DPlSk1gAaGU0bf8zs4xZaWM d+sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X9Blg2Oe; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gj16si939391ejb.18.2019.11.28.06.46.16; Thu, 28 Nov 2019 06:46:41 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=X9Blg2Oe; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726656AbfK1OpR (ORCPT + 99 others); Thu, 28 Nov 2019 09:45:17 -0500 Received: from mail-io1-f66.google.com ([209.85.166.66]:37740 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726545AbfK1OpR (ORCPT ); Thu, 28 Nov 2019 09:45:17 -0500 Received: by mail-io1-f66.google.com with SMTP id k24so18568128ioc.4; Thu, 28 Nov 2019 06:45:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jSx1W6k2m7YVIJkPLFSMsX2YfgHqtWK8uY9ek4Pmf8I=; b=X9Blg2OerSCWalXdH509wRdbP/CxlX29WC6jK8xUmtAVF+flTKe3nDE/R80ExoNQg+ pS4agCBMfd3Vm+UgEKVFKB9UzmB64Bsi2v3m9ReIyiP+9/8/mrkkbp4dI8q4zs2gqk3A PzkVqCS36Iewh8ElHtAMwIIxnoM+YEjOmV96rgZHvFHkgAHDpzVY74sv1EXZtVID6Gn1 qowx6YYdNALYN64bWll/BHYm8m1xSkp6B5G9QanY/Td1fGKoQ+sxva7n08LF8SAkTX3/ UxT3cY5ZQ5RFNcjPjjZKy2Qtq/mbWZwD+E+3T7L2qgSaz0at0Lv7znMnmtP+khCNHP0A omkQ== 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=jSx1W6k2m7YVIJkPLFSMsX2YfgHqtWK8uY9ek4Pmf8I=; b=qaZaqLNpJ/dmsQaa1gxPurEXoKh/lnPyhQlKNqIH/LIbuuhdA9K/NmDBFxTDXmP2Im bogvGcg2t0ZXXBy/NwDKDPjtGOv+8xrBCVgXggdEdRuk/wK0U7t5vThrv7Vpn3M+b3YF 6zwBXRF78FFju/6qNpLeEqWQ/z2BmY831mwS+HBYJIeifoONVoZ7gGEzC6D1W6aB/XtT I+qIhIWXR/hwlh//71046wqcMeDituTdWY9u8fSlsT5g9XhZfWfTNOx+XgBy6kvwKxv8 AtzKLNuUKVzZg6TzKTTyMJxrWeuLdGa71zyfa44peSJ0s3xVqKAF2vJNuqitAK25AbZI dgVg== X-Gm-Message-State: APjAAAWCcfU26RGLSXZK7mLfXEPT54YmBFyw+zfswVj1FRWoeGBcVkPg N27HD8m4URqdIT1NM5VVoHpeLfETo1Pg+n4c228= X-Received: by 2002:a6b:b511:: with SMTP id e17mr12363141iof.18.1574952316211; Thu, 28 Nov 2019 06:45:16 -0800 (PST) MIME-Version: 1.0 References: <20191127052935.1719897-1-anarsoul@gmail.com> <20191127052935.1719897-3-anarsoul@gmail.com> <20191127174434.wousbqosmm5vxcsu@gilmour.lan> <20191128074325.q47rpzhufwog6mbb@gilmour.lan> In-Reply-To: From: Frank Lee Date: Thu, 28 Nov 2019 22:45:04 +0800 Message-ID: Subject: Re: [PATCH v6 2/7] dt-bindings: thermal: add YAML schema for sun8i-thermal driver bindings To: Maxime Ripard Cc: Vasily Khoruzhick , Zhang Rui , Eduardo Valentin , Daniel Lezcano , Amit Kucheria , Rob Herring , Mark Rutland , Chen-Yu Tsai , Mauro Carvalho Chehab , "David S. Miller" , Greg Kroah-Hartman , Linux PM , devicetree , arm-linux , =?UTF-8?Q?Ond=C5=99ej_Jirman?= , linux-kernel 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 diff --git a/Documentation/devicetree/bindings/thermal/sun8i-thermal.yaml b/Documentation/devicetree/bindings/thermal/sun8i-thermal.yaml new file mode 100644 index 000000000000..1be32f09fcc8 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/sun8i-thermal.yaml @@ -0,0 +1,160 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/thermal/sun8i-thermal.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Allwinner SUN8I Thermal Controller Device Tree Bindings + +maintainers: + - Yangtao Li + +description: |- + This describes the device tree binding for the Allwinner thermal + controller which measures the on-SoC temperatures. + +properties: + compatible: + enum: + - allwinner,sun8i-a83t-ths + - allwinner,sun8i-h3-ths + - allwinner,sun8i-r40-ths + - allwinner,sun50i-a64-ths + - allwinner,sun50i-h5-ths + - allwinner,sun50i-h6-ths + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + resets: + maxItems: 1 + + clocks: + minItems: 1 + maxItems: 2 + items: + - description: ths bus clock + - description: ths mod clock + + clock-names: + minItems: 1 + maxItems: 2 + items: + - const: bus + - const: mod + + "#thermal-sensor-cells": + enum: [ 0, 1 ] + + nvmem-cells: + description: ths calibrate data + + nvmem-cell-names: + const: calibration + +required: + - compatible + - reg + - interrupts + - "#thermal-sensor-cells" + +allOf: + - if: + properties: + compatible: + contains: + enum: + - allwinner,sun8i-h3-ths + - allwinner,sun8i-r40-ths + - allwinner,sun50i-a64-ths + - allwinner,sun50i-h5-ths + - allwinner,sun50i-h6-ths + + then: + properties: + resets: + minItems: 1 + maxItems: 1 + + - if: + properties: + compatible: + contains: + const: allwinner,sun50i-h6-ths + + then: + properties: + clocks: + minItems: 1 + maxItems: 1 + + clock-names: + minItems: 1 + maxItems: 1 + + else: + if: + properties: + compatible: + contains: + enum: + - allwinner,sun8i-h3-ths + - allwinner,sun8i-r40-ths + - allwinner,sun50i-a64-ths + - allwinner,sun50i-h5-ths + + then: + properties: + clocks: + minItems: 2 + maxItems: 2 + + clock-names: + minItems: 2 + maxItems: 2 + + - if: + properties: + compatible: + contains: + const: allwinner,sun8i-h3-ths + + then: + properties: + "#thermal-sensor-cells": + const: 0 + + else: + properties: + "#thermal-sensor-cells": + const: 1 + +additionalProperties: false + +examples: + - | + ths: ths@5070400 { + compatible = "allwinner,sun50i-h6-ths"; + reg = <0x05070400 0x100>; + clocks = <&ccu 89>; + clock-names = "bus"; + resets = <&ccu 36>; + interrupts = <0 15 4>; + nvmem-cells = <&tsen_calib>; + nvmem-cell-names = "calibration"; + #thermal-sensor-cells = <1>; + }; + + sid: sid@3006000 { + compatible = "allwinner,sun50i-h6-sid"; + reg = <0x03006000 0x400>; + #address-cells = <1>; + #size-cells = <1>; + tsen_calib: calib@14 { + reg = <0x14 6>; + }; + }; +... On Thu, Nov 28, 2019 at 10:35 PM Frank Lee wrote: > > Hi, > > How about this? > > Best regards, > Yangtao