From patchwork Wed Sep 9 17:59:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249522 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp54390ilk; Wed, 9 Sep 2020 11:02:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygjkijkHO/1hlRLrNioUTLxEZjtOhwMwWBfehHL3t5fznxQ0wnWj039y+ylj7qNEfpQ3by X-Received: by 2002:a17:906:841a:: with SMTP id n26mr4735634ejx.213.1599674550725; Wed, 09 Sep 2020 11:02:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674550; cv=none; d=google.com; s=arc-20160816; b=MGZUpLQxC6nWOc1w+a4PV2UUSdQgnFOv+6Q1fwO92WvSq6vz0uWzeTg/R7GhPnJDER rXNNp5T30pP3FO2uKTQRuoWpIbDq+AHmS6V8MGNfZmqejIMkyArsrdQ8qHuWxeNBl+24 y42uWXRBZFhPeseHrp+pEHLqNamzm9lGWeYJSteol7IvJU+9i7dVH4b8A4B/Dpt/rVzL mLAjkZLgvlu0fH2EOJyqT6j5JRlfC/veAbSIyVZ2meWkzpUFIz7C0xqviSAW5g5vZe9Y kSVj3x3Vm/Fv/zmWAUheUJvmjI/KdfGwSUDs2FrW5yqnksNoIhlYzxDAzMGzAlASy3Fa hZiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SQbVYCAxIVCp5MiQkA8Sk2jfRVFjWE9Bg9qCg8z4gCA=; b=GlXYb+obiVLAh/e0lMYsGPNWQsrxs0OO4x1r3+LO08U6OvPhci0JuTd0RdGcWf/Dr+ YPya38Ki6IQQxFc0guy5foE1tbsFn94hnnkuIJXO+1hW/hV1wyeW1KQ9imYNrIfr8FNE aZDCvYW0xZJ0yV9G9vtTkobtrlMl685wyF8VZE8dfMLbpl1/f6o3mBwZrKor/0yEmDB/ FIwhLv0uTLBsTiiASdhphvYHIM4TkchZdSiNDGtyPM1FLUhtPyW+mm5f87ZcpE8ESVoa gk80Tds3INj4fCT6VUWyQPd35WgG18c65j1trgnbnlNHdLPtoDVzjWLA/RvEbdqs7XQg cm8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NesZeOcq; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p9si1923789ejx.463.2020.09.09.11.02.30; Wed, 09 Sep 2020 11:02:30 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NesZeOcq; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730116AbgIISCZ (ORCPT + 6 others); Wed, 9 Sep 2020 14:02:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:59138 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730083AbgIISCV (ORCPT ); Wed, 9 Sep 2020 14:02:21 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5A29321D80; Wed, 9 Sep 2020 18:02:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674540; bh=LEeUU+rrD5hpO7lkr4ZcwemfFSGeHmj8P3ohRK9wtLM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NesZeOcqEF8qei9KS3vzwIQft8h7WNsnmV6+I6ds8qDyuJq+OvwUwH5oK4g7RnV0Q IiA98YMSQztbyMCo8z6L4oqqflnA7Ysc887cKJL887exJ9NvWCumDtJnkM+H+capZm zCwJxxbOVxPwUzrg2m/rXemqflZU8obDxsHC/aXY= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Fugang Duan , Shawn Guo , Sascha Hauer Subject: [PATCH v2 01/20] dt-bindings:iio:adc:fsl, vf610-adc conversion to yaml. Date: Wed, 9 Sep 2020 18:59:27 +0100 Message-Id: <20200909175946.395313-2-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron A simple conversion of this freescale ADC binding from txt to yaml. For maintainer I went with Fugang Duan as the original author of the binding. Would be great to have confirmation of this. Signed-off-by: Jonathan Cameron Cc: Fugang Duan Cc: Shawn Guo Cc: Sascha Hauer --- .../bindings/iio/adc/fsl,vf610-adc.yaml | 81 +++++++++++++++++++ .../devicetree/bindings/iio/adc/vf610-adc.txt | 36 --------- 2 files changed, 81 insertions(+), 36 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring Reviewed-by: Fugang Duan diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml b/Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml new file mode 100644 index 000000000000..99b6b55fd0a3 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml @@ -0,0 +1,81 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/fsl,vf610-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ADC found on Freescale vf610 and similar SoCs + +maintainers: + - Fugang Duan + +description: + ADCs found on vf610/i.MX6slx and upward SoCs from Freescale. + +properties: + compatible: + const: fsl,vf610-adc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + description: ADC source clock (ipg clock) + maxItems: 1 + + clock-names: + const: adc + + vref-supply: + description: ADC reference voltage supply. + + fsl,adck-max-frequency: + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 3 + maxItems: 3 + description: | + Maximum frequencies from datasheet operating requirements. + Three values necessary to cover the 3 conversion modes. + * Frequency in normal mode (ADLPC=0, ADHSC=0) + * Frequency in high-speed mode (ADLPC=0, ADHSC=1) + * Frequency in low-power mode (ADLPC=1, ADHSC=0) + + min-sample-time: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Minimum sampling time in nanoseconds. This value has + to be chosen according to the conversion mode and the connected analog + source resistance (R_as) and capacitance (C_as). Refer the datasheet's + operating requirements. A safe default across a wide range of R_as and + C_as as well as conversion modes is 1000ns. + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - vref-supply + +additionalProperties: false + +examples: + - | + #include + adc@4003b000 { + compatible = "fsl,vf610-adc"; + reg = <0x4003b000 0x1000>; + interrupts = <0 53 0x04>; + clocks = <&clks VF610_CLK_ADC0>; + clock-names = "adc"; + fsl,adck-max-frequency = <30000000>, <40000000>, <20000000>; + vref-supply = <®_vcc_3v3_mcu>; + min-sample-time = <10000>; + }; +... diff --git a/Documentation/devicetree/bindings/iio/adc/vf610-adc.txt b/Documentation/devicetree/bindings/iio/adc/vf610-adc.txt deleted file mode 100644 index 1aad0514e647..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/vf610-adc.txt +++ /dev/null @@ -1,36 +0,0 @@ -Freescale vf610 Analog to Digital Converter bindings - -The devicetree bindings are for the new ADC driver written for -vf610/i.MX6slx and upward SoCs from Freescale. - -Required properties: -- compatible: Should contain "fsl,vf610-adc" -- reg: Offset and length of the register set for the device -- interrupts: Should contain the interrupt for the device -- clocks: The clock is needed by the ADC controller, ADC clock source is ipg clock. -- clock-names: Must contain "adc", matching entry in the clocks property. -- vref-supply: The regulator supply ADC reference voltage. - -Recommended properties: -- fsl,adck-max-frequency: Maximum frequencies according to datasheets operating - requirements. Three values are required, depending on conversion mode: - - Frequency in normal mode (ADLPC=0, ADHSC=0) - - Frequency in high-speed mode (ADLPC=0, ADHSC=1) - - Frequency in low-power mode (ADLPC=1, ADHSC=0) -- min-sample-time: Minimum sampling time in nanoseconds. This value has - to be chosen according to the conversion mode and the connected analog - source resistance (R_as) and capacitance (C_as). Refer the datasheet's - operating requirements. A safe default across a wide range of R_as and - C_as as well as conversion modes is 1000ns. - -Example: -adc0: adc@4003b000 { - compatible = "fsl,vf610-adc"; - reg = <0x4003b000 0x1000>; - interrupts = <0 53 0x04>; - clocks = <&clks VF610_CLK_ADC0>; - clock-names = "adc"; - fsl,adck-max-frequency = <30000000>, <40000000>, - <20000000>; - vref-supply = <®_vcc_3v3_mcu>; -}; From patchwork Wed Sep 9 17:59:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249523 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp54586ilk; Wed, 9 Sep 2020 11:02:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcMXBjQNGmaRXfsz8UErPs9jlOYkeVsbCLwpZ7N9+LDNey6/ME9t0+xwWhwztCbcose/uW X-Received: by 2002:aa7:de82:: with SMTP id j2mr5614254edv.3.1599674562524; Wed, 09 Sep 2020 11:02:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674562; cv=none; d=google.com; s=arc-20160816; b=AI2pvbAFInGbgpv/x8xsaW49zEI0yON9fSA4hMHAco1yFJMCqayOtYLev14pwB+epA btPdzPfIucWUpXmEPWe45aA1NMrQo3f3c+7xZhUHRaecFsvQU51XSRd5PhUDtAAdZdXr +ixxZVF223aElsgK/yq4dBqDx8raJ1sQggOtATbPLIXq/TBe0oPUmsI5qRlQcz7bHfrZ Mr37g+bXn4H+EQFrTX+Z7kC/fBXgUWfLNIm7+lemty+0OtoocG/hvm0Cqk3EMEdfp55j KxU5S/ttPtLbjooYs2yFLZnj9T3Z8dwetaGv82muPIjhaq5i8kUKedaDqumncvoy1Fas UZjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=O76sH3UDfMkBe9TVy62fc6jh571VIGGi+5nEgGJSUr0=; b=kC1dKPRTBVMEmSDhqqr0zfOi7Qp12B7lZMayXWbjt2IuZMxbT+ulyC5GQwpThPoKQn yRtqqLqawExS3NIguGzEcEOXaBgXJ5+ZKCxOq0y1sf8ymWECPSJRKHOI9io89L+AzP8a +0VL2xLFgQ9Dfo789Zrd2A2gz59waAzgzq3Y9CFHfnJprTtNcbRRJSYxmKfGIe7/ffsm KW4QrINSH4goGVePfwIUCaIDxaRD1LUnlDjeI02cPhTLQ1E9Ae8LOnBJtxYoD3XjXIsi G3QBgPBttexKia6K66TJL9v16A5NyK/mUtZh27FfLNYghp7zzn/+Nxpp7jcBk+cMKlQ/ VULQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZdhAi+G7; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p9si1923789ejx.463.2020.09.09.11.02.42; Wed, 09 Sep 2020 11:02:42 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZdhAi+G7; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730136AbgIISC2 (ORCPT + 6 others); Wed, 9 Sep 2020 14:02:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:59154 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730085AbgIISCX (ORCPT ); Wed, 9 Sep 2020 14:02:23 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2E02F21D81; Wed, 9 Sep 2020 18:02:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674542; bh=ZN6NGpvZGo3yujVKM7KhX/BMrihZUNzLTI7BVhYHBnk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZdhAi+G7apVMEHq/aHkQhY6WTNO38epa3PIh8dB2HtRYRDN85CBHKfn3bkjNJqxL7 DisqU4yVAx3qT34ymXfM5XpsDTlgiiFKLIEsT2R3rcdu02Ku/IHwXHQ4yjgXm6n/nh VsDo9iysONmY9WKhXBscHYURZ6F62lQKqRSXN+Us= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Sebastian Reichel Subject: [PATCH v2 02/20] dt-bindings:iio:adc:ti, twl4030-madc yaml conversion Date: Wed, 9 Sep 2020 18:59:28 +0100 Message-Id: <20200909175946.395313-3-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Conversion from txt to yaml as part of a general move of IIO bindings to the new format. Signed-off-by: Jonathan Cameron Acked-by: Sebastian Reichel --- .../bindings/iio/adc/ti,twl4030-madc.yaml | 48 +++++++++++++++++++ .../bindings/iio/adc/twl4030-madc.txt | 24 ---------- 2 files changed, 48 insertions(+), 24 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/ti,twl4030-madc.yaml b/Documentation/devicetree/bindings/iio/adc/ti,twl4030-madc.yaml new file mode 100644 index 000000000000..6781ad2f0f51 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/ti,twl4030-madc.yaml @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,twl4030-madc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MADC subsystem in the TWL4030 power module + +maintainers: + - Sebastian Reichel + +description: + The MADC subsystem in the TWL4030 consists of a 10-bit ADC + combined with a 16-input analog multiplexer. + +properties: + compatible: + const: ti,twl4030-madc + + interrupts: + maxItems: 1 + + ti,system-uses-second-madc-irq: + type: boolean + description: + Set if the second madc irq register should be used, which is intended + to be used by Co-Processors (e.g. a modem). + + "#io-channel-cells": + const: 1 + +required: + - compatible + - interrupts + - "#io-channel-cells" + +additionalProperties: false + +examples: + - | + twl { + madc { + compatible = "ti,twl4030-madc"; + interrupts = <3>; + #io-channel-cells = <1>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/adc/twl4030-madc.txt b/Documentation/devicetree/bindings/iio/adc/twl4030-madc.txt deleted file mode 100644 index 6bdd21404b57..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/twl4030-madc.txt +++ /dev/null @@ -1,24 +0,0 @@ -* TWL4030 Monitoring Analog to Digital Converter (MADC) - -The MADC subsystem in the TWL4030 consists of a 10-bit ADC -combined with a 16-input analog multiplexer. - -Required properties: - - compatible: Should contain "ti,twl4030-madc". - - interrupts: IRQ line for the MADC submodule. - - #io-channel-cells: Should be set to <1>. - -Optional properties: - - ti,system-uses-second-madc-irq: boolean, set if the second madc irq register - should be used, which is intended to be used - by Co-Processors (e.g. a modem). - -Example: - -&twl { - madc { - compatible = "ti,twl4030-madc"; - interrupts = <3>; - #io-channel-cells = <1>; - }; -}; From patchwork Wed Sep 9 17:59:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249525 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp56113ilk; Wed, 9 Sep 2020 11:04:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+4Z975E2qf3ZMGBvN5k8KCaD4SOrCmgTHFkx1dzbjLZxwc5ameHieJ7MRyH3HHIvFGQiz X-Received: by 2002:a17:906:341b:: with SMTP id c27mr4818112ejb.286.1599674675375; Wed, 09 Sep 2020 11:04:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674675; cv=none; d=google.com; s=arc-20160816; b=xCAzsytH4tcu4RnhWLdVrIucq5gCWW7hPIwdSfJkLTZM/3hPqa6ARTYLdcGI0+Xgxi XKudHxfGItQRBiOLidllt8pNbjfSyMI0yCmqsniJrW8sdaG6fdIJy8hANlx6+OMHauUz bdTB+P1VSLuIR3sIq3SZ3QWlTN2BkbFRzCHeS0mzNJxfcwCUF4V2yPF8o5lVDxWGDQM1 c4ztx4fBMr2IOxaDVRpXO4XwzHO6yFgygkFxgL6rq0syVsb3PFMjxgTQ8zNESG0HmEow PWZqqWZxkJ6Qo8Z4A68uCuz/HsxjLwAtlTUoV7T6cGdfMvuWmjZplXYHSuWC7Yzgv13c Wv2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PjN4bGHA05J0EUSg/173ivx6p/j8FI9E70rrzTDjy6A=; b=mM+j3knW5fBkGoPOMryno0V0RpFa87dPlKewOURIwVSBVeFCVUhlKjsHaxMfGJL45L H75KgiR3aFs8n7Y8Qg4i+MbWn0F8l9Thedxr++LVCYB9FUjiIRPF04u46Duv8/5Ui4FB WDOSRG1Zf/hzTZpGhwESaRmWAIJO6/q4sF/UczoFpXOC+GzTUihcq2MebITWMByJ8MAJ wXWN15y17VDGE8IqhsyD0a7KLqJepzFzCbFT2lDnHMTWnW9jIrTR8UWzIZrz4I/k90yz iEpo2CXn3d0U3TkaqnZ57opMWKh5+XY6Ljdm5gOK3pFAIEEeujpVdom5YtrVz+JEKbaR Wuxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IjsfJLnd; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si1886631ejx.468.2020.09.09.11.04.35; Wed, 09 Sep 2020 11:04:35 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IjsfJLnd; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729129AbgIISEd (ORCPT + 6 others); Wed, 9 Sep 2020 14:04:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:59114 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730099AbgIISCZ (ORCPT ); Wed, 9 Sep 2020 14:02:25 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ACE2821D93; Wed, 9 Sep 2020 18:02:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674543; bh=FdK1l3fo6UgGdK6dGnHyf2ZFaNBIdLfR1npsQ9CW2AY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IjsfJLnd5vFT8rkBErobJSoiZFLtX5E6bliKTDIylUABmueCPPRTawc5ZTpf7GQI2 C141Zd5ctxzVSx2EtzulcwLOGiJcmbcSXSXEEynGUbLgP9pWtHFZKm1wUbtDt8Zu3I 93gYV7xjfrPKHxfd5eg7CXelSVrY/4v7yFIfxZcU= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Stefan Agner Subject: [PATCH v2 03/20] dt-bindings:iio:adc:st,stmpe-adc yaml conversion Date: Wed, 9 Sep 2020 18:59:29 +0100 Message-Id: <20200909175946.395313-4-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Conversion from freeform text to yaml. One oddity in this binding is that, for historical reasons it requires the node name to be stmpe_adc. I've put that in the decription field but I'm not sure if there is a better way to specify this? Signed-off-by: Jonathan Cameron Cc: Stefan Agner --- .../bindings/iio/adc/st,stmpe-adc.yaml | 45 +++++++++++++++++++ .../devicetree/bindings/iio/adc/stmpe-adc.txt | 21 --------- 2 files changed, 45 insertions(+), 21 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/st,stmpe-adc.yaml b/Documentation/devicetree/bindings/iio/adc/st,stmpe-adc.yaml new file mode 100644 index 000000000000..9049c699152f --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/st,stmpe-adc.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/st,stmpe-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ADC on an STMPE multifunction device. + +maintainers: + - Stefan Agner + +description: + This ADC forms part of an ST microelectronics STMPE multifunction device . + The ADC is shared with the STMPE touchscreen. As a result some ADC related + settings are specified in the parent node. + The node name myst be stmpe_adc and should be a child node of the stmpe node + to which it belongs. + +properties: + compatible: + const: st,stmpe-adc + + st,norequest-mask: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Bitmask specifying which ADC channels should _not_ be + requestable due to different usage (e.g. touch). + + "#io-channel-cells": + const: 1 + +required: + - compatible + +additionalProperties: false + +examples: + - | + stmpe { + stmpe_adc { + compatible = "st,stmpe-adc"; + st,norequest-mask = <0x0F>; /* dont use ADC CH3-0 */ + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/adc/stmpe-adc.txt b/Documentation/devicetree/bindings/iio/adc/stmpe-adc.txt deleted file mode 100644 index 480e66422625..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/stmpe-adc.txt +++ /dev/null @@ -1,21 +0,0 @@ -STMPE ADC driver ----------------- - -Required properties: - - compatible: "st,stmpe-adc" - -Optional properties: -Note that the ADC is shared with the STMPE touchscreen. ADC related settings -have to be done in the mfd. -- st,norequest-mask: bitmask specifying which ADC channels should _not_ be - requestable due to different usage (e.g. touch) - -Node name must be stmpe_adc and should be child node of stmpe node to -which it belongs. - -Example: - - stmpe_adc { - compatible = "st,stmpe-adc"; - st,norequest-mask = <0x0F>; /* dont use ADC CH3-0 */ - }; From patchwork Wed Sep 9 17:59:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249526 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp56301ilk; Wed, 9 Sep 2020 11:04:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGrogBKCYgjcvjZdfPUzB0kkFnrrmTSyV9uomdGDUVN7u4+2lZMrcQU4nBCRlJkvzmWODA X-Received: by 2002:a17:906:660f:: with SMTP id b15mr5111252ejp.333.1599674687498; Wed, 09 Sep 2020 11:04:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674687; cv=none; d=google.com; s=arc-20160816; b=GVIGuWspDbQgXortZBnJ+w/KBuen9yHZfDyD46TBf4TuIEu0GJpsx5sbI/wBELoojR 9+02pzkHG3HeP6wnKNqVYPXg3gA/5xfkEG4yMdWMaei5yBzL/q4efOztKZGP0XxiWSQ3 iAgXHoCtk1ADavCVRG7k9YklkF4VNh1NeXa0+kQcAUf0IohjOr2UZdZMFrUWBxJDIZ4+ YLQCrNub/Ij55gySoFuc8vAymk3TLPZvKmb4MEp1JK5Ls5GbE9EMOMSVFlO7xiIUhZ11 Pu4eXogPC3KcPylu4AdUrUC1DfdkrHTkgc1IcDc/mQ4OhK72Q5Ss56BVwuVi0zVyCS2v ezVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=R59rIAKjS0WYvFtMYlAjl/6EwbXt+ftv7d2rg6KiZzw=; b=Ufb8L513o7R0YLsQWmhP4S9SF5zrd4zO2bXASuaePDG3huPUHykfkoZxxlXj64IxQk 5MXQ37ZHzbrRvDFQIX9e57ctHX4J03D/XrwKSvxXHuwGE/ViLTgooyZ8GUSJEFqOnaEd BTArLLhl4Ch/z0E2cA4U3LY1LQznnWv9NNSc/HiylettQNl5i0/8CjyOnYoaINhDV16h Gp02S0zzGDhTUcW6yivRvhS6waBXgc20e7nsBGFrCWMZ6xwmTBcqUz0TViPLYq81ifn6 mQBCcAQN5eMKAmdLYrpIMS0qEEAjI16GzTfRf89tvCnoC3w38RSbN0/aZWjNczSVgPLP LXBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PZHtSw8k; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si1886631ejx.468.2020.09.09.11.04.47; Wed, 09 Sep 2020 11:04:47 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PZHtSw8k; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730025AbgIISEe (ORCPT + 6 others); Wed, 9 Sep 2020 14:04:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:59138 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730128AbgIISC0 (ORCPT ); Wed, 9 Sep 2020 14:02:26 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3B1C221D95; Wed, 9 Sep 2020 18:02:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674545; bh=KoEd7JhadoV/WuAlOl/OSAE8z4BEPt6pY8SVVSs0NxU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PZHtSw8k85IJskvyMcjKJL0liMzjLbmDPShxLYoLVLT24NjgAmEVPvdd1yufvgJW8 cNuXE6WqgzSZMhDUqSBV/B32lG9vr9B70ZAMU6GX9sREW7JJvayAeJZIdSD1EI693S c5PTykDlr0TpeG2vZBbski1lA68Nehd2mt2D0aE8= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Rick Altherr , Joel Stanley , Andrew Jeffery Subject: [PATCH v2 04/20] dt-bindings:iio:adc: aspeed, ast2400 yaml conversion Date: Wed, 9 Sep 2020 18:59:30 +0100 Message-Id: <20200909175946.395313-5-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Simple txt to yaml conversion. Part of a general move to convert all the IIO bindings over to yaml. Signed-off-by: Jonathan Cameron Cc: Rick Altherr Cc: Joel Stanley Cc: Andrew Jeffery --- .../bindings/iio/adc/aspeed,ast2400-adc.yaml | 54 +++++++++++++++++++ .../bindings/iio/adc/aspeed_adc.txt | 22 -------- 2 files changed, 54 insertions(+), 22 deletions(-) -- 2.28.0 Acked-by: Joel Stanley Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml new file mode 100644 index 000000000000..09018487d690 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml @@ -0,0 +1,54 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/aspeed,ast2400-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ADC that forms part of an ASPEED server management processor. + +maintainers: + - Rick Altherr + +description: + This device is a 10-bit converter for 16 voltage channels. All inputs are + single ended. + +properties: + compatible: + enum: + - aspeed,ast2400-adc + - aspeed,ast2500-adc + + reg: + maxItems: 1 + + clocks: + description: + Input clock used to derive the sample clock. Expected to be the + SoC's APB clock. + + resets: true + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - clocks + - resets + - "#io-channel-cells" + +additionalProperties: false + +examples: + - | + #include + adc@1e6e9000 { + compatible = "aspeed,ast2400-adc"; + reg = <0x1e6e9000 0xb0>; + clocks = <&syscon ASPEED_CLK_APB>; + resets = <&syscon ASPEED_RESET_ADC>; + #io-channel-cells = <1>; + }; +... diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt b/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt deleted file mode 100644 index 034fc2ba100e..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt +++ /dev/null @@ -1,22 +0,0 @@ -Aspeed ADC - -This device is a 10-bit converter for 16 voltage channels. All inputs are -single ended. - -Required properties: -- compatible: Should be "aspeed,ast2400-adc" or "aspeed,ast2500-adc" -- reg: memory window mapping address and length -- clocks: Input clock used to derive the sample clock. Expected to be the - SoC's APB clock. -- resets: Reset controller phandle -- #io-channel-cells: Must be set to <1> to indicate channels are selected - by index. - -Example: - adc@1e6e9000 { - compatible = "aspeed,ast2400-adc"; - reg = <0x1e6e9000 0xb0>; - clocks = <&syscon ASPEED_CLK_APB>; - resets = <&syscon ASPEED_RESET_ADC>; - #io-channel-cells = <1>; - }; From patchwork Wed Sep 9 17:59:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249531 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp56635ilk; Wed, 9 Sep 2020 11:05:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2/18w9eF/JAERknytjvOTCvDsu0dcPCHvlB3e5d9Rnss2R1uhA+ldl2mLIy05JK8QJzPx X-Received: by 2002:a05:6402:b1a:: with SMTP id bm26mr5345519edb.209.1599674711950; Wed, 09 Sep 2020 11:05:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674711; cv=none; d=google.com; s=arc-20160816; b=ppXjUdl853005NLpy7/tZdUFogfN95kGuDh5ZwLs2KyRBJp4w8Re0Fk8E/GJYW9Gy4 Q0IIovYEHYq4SQFAgh+qmbK25F5FzUzBZaOaRNXSOY6vHw/YZzplF8iQbfQOACBJvzdd f/vc5kuMENW/3p4xcL3XDionL4gb3ckktOWP1rQFwp4UnMyz8XV1cq5xKQXv9iM3v2Dn UyVG6k7UqaflEPa/AKJDB+sWvY7yjKuvpWP+AniVsFBKZt7up4GsdRqRYEugCqPRhFrQ OqzJ9XrIwWJiwhsx/6alAvZm1zQx7il7PH3WEL1RiDJQRJI325DO/V1bLQ/mBvbH7OFC +24A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GuYLvPxsatq3DzvV8gCl34w4nugjf2wdNwGIsu1k8/g=; b=MC0L+xmeV6v9QZvuiAEFDiqPvdfZOrYuXbkVxEll7pjTOBZT0YrXszDavqHm43Mvoz vQ2p1+zWplX0IAf1gXfjxzyiBb2/iPM1W+tNcR4O2PF9zpGeyt/y0wPYrz3xwGBJteBU FpnPqpCgFXM/maIZzqYXGq+Y2PKr2xzj+8azSnZz2oUDOpbqPshKEBMOz5SjR6zKfgl4 4OjVQo+AkHFcoUDPVSIV5o55oNZzOOq4KgLMPgRbkZjKE/F3caQB0J6uBWLTBvEOjQES SPr07FAl/z7xOrB5QAUKtcvFlFfGbpSaetc498p8rnzTHhfrBlYhlEYlRHqwTsnvEcZw ZdmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xRkWpTqi; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si1886631ejx.468.2020.09.09.11.05.11; Wed, 09 Sep 2020 11:05:11 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xRkWpTqi; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730092AbgIISFB (ORCPT + 6 others); Wed, 9 Sep 2020 14:05:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:59278 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730131AbgIISC2 (ORCPT ); Wed, 9 Sep 2020 14:02:28 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 183BA21D81; Wed, 9 Sep 2020 18:02:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674547; bh=DtL49blLpMOtxEPIeBCeY9B+Ng8j1YbWXi+5wonoYrQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xRkWpTqiWwEXvenrjqLJB3d+M3eNQbG4QoA7MX5OjfgmLpHvVBEybWZlVs5xDQNgm QIqlHbL4yLT9UPHksGpjqwwBKHX5K0IK4H1GnV4eTdze8Hf1LR09B1KCgRzD48jF94 mZ3R0QTnjMiAlB6ZtDhjIm4YR2wgacWLFt5oX/D0= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Antoine Tenart Subject: [PATCH v2 05/20] dt-bindings:iio:adc:marvell, berlin2-adc yaml conversion Date: Wed, 9 Sep 2020 18:59:31 +0100 Message-Id: <20200909175946.395313-6-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Part of a general move of IIO bindings over to yaml. Signed-off-by: Jonathan Cameron Cc: Antoine Tenart --- .../bindings/iio/adc/berlin2_adc.txt | 19 ------- .../bindings/iio/adc/marvell,berlin2-adc.yaml | 50 +++++++++++++++++++ 2 files changed, 50 insertions(+), 19 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/berlin2_adc.txt b/Documentation/devicetree/bindings/iio/adc/berlin2_adc.txt deleted file mode 100644 index 908334c6b07f..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/berlin2_adc.txt +++ /dev/null @@ -1,19 +0,0 @@ -* Berlin Analog to Digital Converter (ADC) - -The Berlin ADC has 8 channels, with one connected to a temperature sensor. -It is part of the system controller register set. The ADC node should be a -sub-node of the system controller node. - -Required properties: -- compatible: must be "marvell,berlin2-adc" -- interrupts: the interrupts for the ADC and the temperature sensor -- interrupt-names: should be "adc" and "tsen" - -Example: - -adc: adc { - compatible = "marvell,berlin2-adc"; - interrupt-parent = <&sic>; - interrupts = <12>, <14>; - interrupt-names = "adc", "tsen"; -}; diff --git a/Documentation/devicetree/bindings/iio/adc/marvell,berlin2-adc.yaml b/Documentation/devicetree/bindings/iio/adc/marvell,berlin2-adc.yaml new file mode 100644 index 000000000000..b3b292fb1c59 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/marvell,berlin2-adc.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/marvell,berlin2-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Berlin 2 Analog to Digital Converter (ADC) + +maintainers: + - Antoine Tenart + +description: + The Berlin ADC has 8 channels, with one connected to a temperature sensor. + It is part of the system controller register set. The ADC node should be a + sub-node of the system controller node. + +properties: + compatible: + const: marvell,berlin2-adc + + interrupts: + minItems: 2 + maxItems: 2 + + interrupt-names: + items: + - const: adc + - const: tsen + + "#io-channel-cells": + const: 1 + +required: + - compatible + - interrupts + - interrupt-names + +additionalProperties: false + +examples: + - | + sysctrl { + adc { + compatible = "marvell,berlin2-adc"; + interrupt-parent = <&sic>; + interrupts = <12>, <14>; + interrupt-names = "adc", "tsen"; + }; + }; +... From patchwork Wed Sep 9 17:59:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249527 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp56334ilk; Wed, 9 Sep 2020 11:04:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypw+A0/1Ajc6bkTFSqMEqWZlEfukm6yDjLtznWuMM7p7ebvwMwYWTDuhZak8ZtV6WNVP1N X-Received: by 2002:a05:6402:1110:: with SMTP id u16mr5347217edv.253.1599674689847; Wed, 09 Sep 2020 11:04:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674689; cv=none; d=google.com; s=arc-20160816; b=o4qLypmk0tOdDOL1lajfhsM32zDdPEbbhJI5Bzcz8/X5mvhiOxetn2IKKh/p63jqZz uS9X5zs9WzNpEcP8eUylV0yN0WtDKE2gkIC5LHZGD7Yiii5+CDIbo1NtrNUCZxBtgDUm sywd19FZFhlSXQdcK2piXDyjQDgQt/dZ0iEj4xXrVaN6z6c0GLsJoYHOyFKAdtTVBvvg jZWJioYi51da/BGAwtTANYe+xminy32rgxmn1wANyfCFvSZNwNohxcs/bMHYf+ajkAK/ nwxhLRHlo7DFmXGyfoLGkL3A8FAqyz18VI2EofTUT9n2XzF17l4OMyjnIqbEdZL6aHyo cllg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LVgmfKU1GAuNf+x7CafrgsW2BCXp+1aBYfK+IesKm8Y=; b=O/KgUy8mqbx5plJmxmWixXV6iQJgxTI/9tcDC7h0f5XQjVZReaz/TeKvFgrepNEahd DVZaHRScCDCnJ9LmwNvUqbYTdY8J9WYz6DbnjpxzjFRh7Pxp60cICXYVQOYJRSSLDw/6 FYTjcbyNX+rO8CWwNIw1hg8amkr8G6TxswMf2yt5HZgunuoXsKDHQTrZDI5c8PTHqCQ5 Md/GUOwG3eJpFxnjuulTWYfLfweCa/IdlmCapbDu3gWUZsV5DHnzBDa3zSczu8MHF33x U9Q+1A3TXiBmorj6VETQZPPQFOeDBJBiYFLUd+7D13OsV08+YBoUj+yiU9nTikXWajgj WbIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DzpEj0GF; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si1886631ejx.468.2020.09.09.11.04.49; Wed, 09 Sep 2020 11:04:49 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DzpEj0GF; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730127AbgIISEf (ORCPT + 6 others); Wed, 9 Sep 2020 14:04:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:59294 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726226AbgIISC3 (ORCPT ); Wed, 9 Sep 2020 14:02:29 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 98DDE21D90; Wed, 9 Sep 2020 18:02:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674549; bh=jJ6/vRVlaXclyjLorv6S5zdfZ+9h/7a1/g0DbYt3LXA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DzpEj0GFsDLV55JZAk/EkelrAsjlRRL+VpYgsN8dmZ8tHx5vbUvuLSXf1bIOujsfF /8sAvUaPk5nh15Yo2EHV/tPecae2bmM74VwANegYcg6H7giDE4JiH5csdgR0qwhLg5 8d2GpkqaEUwhZXkMbraTNy8QEwds2xZlSbfw6i6Y= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Orson Zhai , Baolin Wang , Chunyan Zhang Subject: [PATCH v2 06/20] dt-bindings:iio:adc:sprd, sc2720-adc yaml conversion. Date: Wed, 9 Sep 2020 18:59:32 +0100 Message-Id: <20200909175946.395313-7-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron I changed the name to reflect a specific part in line with normal naming conventions. If there is a particularly strong reason to keep the wild cards let me know. Otherwise this was a fairly simple conversion as part of converting all the IIO bindings to yaml. Signed-off-by: Jonathan Cameron Acked-by: Orson Zhai Cc: Baolin Wang Cc: Chunyan Zhang --- .../bindings/iio/adc/sprd,sc2720-adc.yaml | 72 +++++++++++++++++++ .../bindings/iio/adc/sprd,sc27xx-adc.txt | 40 ----------- 2 files changed, 72 insertions(+), 40 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/sprd,sc2720-adc.yaml b/Documentation/devicetree/bindings/iio/adc/sprd,sc2720-adc.yaml new file mode 100644 index 000000000000..caa3ee0b4b8c --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/sprd,sc2720-adc.yaml @@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/sprd,sc2720-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Spreadtrum SC27XX series PMICs ADC binding + +maintainers: + - Baolin Wang + +description: + Supports the ADC found on these PMICs. + +properties: + compatible: + enum: + - sprd,sc2720-adc + - sprd,sc2721-adc + - sprd,sc2723-adc + - sprd,sc2730-adc + - sprd,sc2731-adc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + "#io-channel-cells": + const: 1 + + hwlocks: + maxItems: 1 + + nvmem-cells: + maxItems: 2 + + nvmem-cell-names: + items: + - const: big_scale_calib + - const: small_scale_calib + +required: + - compatible + - reg + - interrupts + - "#io-channel-cells" + - hwlocks + - nvmem-cells + - nvmem-cell-names + +additionalProperties: false + +examples: + - | + #include + pmic { + #address-cells = <1>; + #size-cells = <0>; + adc@480 { + compatible = "sprd,sc2731-adc"; + reg = <0x480>; + interrupt-parent = <&sc2731_pmic>; + interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; + #io-channel-cells = <1>; + hwlocks = <&hwlock 4>; + nvmem-cells = <&adc_big_scale>, <&adc_small_scale>; + nvmem-cell-names = "big_scale_calib", "small_scale_calib"; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/adc/sprd,sc27xx-adc.txt b/Documentation/devicetree/bindings/iio/adc/sprd,sc27xx-adc.txt deleted file mode 100644 index b4daa15dcf15..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/sprd,sc27xx-adc.txt +++ /dev/null @@ -1,40 +0,0 @@ -Spreadtrum SC27XX series PMICs ADC binding - -Required properties: -- compatible: Should be one of the following. - "sprd,sc2720-adc" - "sprd,sc2721-adc" - "sprd,sc2723-adc" - "sprd,sc2730-adc" - "sprd,sc2731-adc" -- reg: The address offset of ADC controller. -- interrupt-parent: The interrupt controller. -- interrupts: The interrupt number for the ADC device. -- #io-channel-cells: Number of cells in an IIO specifier. -- hwlocks: Reference to a phandle of a hwlock provider node. -- nvmem-cells: A phandle to the calibration cells provided by eFuse device. -- nvmem-cell-names: Should be "big_scale_calib", "small_scale_calib". - -Example: - - sc2731_pmic: pmic@0 { - compatible = "sprd,sc2731"; - reg = <0>; - spi-max-frequency = <26000000>; - interrupts = ; - interrupt-controller; - #interrupt-cells = <2>; - #address-cells = <1>; - #size-cells = <0>; - - pmic_adc: adc@480 { - compatible = "sprd,sc2731-adc"; - reg = <0x480>; - interrupt-parent = <&sc2731_pmic>; - interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; - #io-channel-cells = <1>; - hwlocks = <&hwlock 4>; - nvmem-cells = <&adc_big_scale>, <&adc_small_scale>; - nvmem-cell-names = "big_scale_calib", "small_scale_calib"; - }; - }; From patchwork Wed Sep 9 17:59:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249529 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp56437ilk; Wed, 9 Sep 2020 11:04:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxl6yD/Wm8nFy59DCYLbPVh/dKRQt1oED4Ku+daRmjK6bX64AYLBBCZvh/jPOoyCHRLlkZc X-Received: by 2002:aa7:d558:: with SMTP id u24mr5439176edr.336.1599674698249; Wed, 09 Sep 2020 11:04:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674698; cv=none; d=google.com; s=arc-20160816; b=eVd7fGFJQoZVL86xRqyt6iQNm0BIKNYunGistzRwewFKvsG1grHp1YG2FfpbU9p59V aMtnl0dHbmtH8jNYJQo3nk1S7/w8BVYKzQ/aZqb1nLrEOTfxDfFm+0R4NF4L+iliCSUj FYJXtA4oDlxmm1S8S2PnmyLdq9J4SPtOBowRz8jK51VuxS2kYJNKnggEZuOc3cZK1r+/ ntJPIfm257K2xUK43T7URIMX5VXb5oHtN0WySBHT/tVwf2+OlZAEBepgOnf9yu+aQFR+ BoqipV/JcMUprNvANVMy8CUrtITe+fyNKSxweooJnze/FaTs10f9P1Bjeak4xorzIygy Zazg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nbD9Jqa2BW9EnhWE/sCdmNwO23mjhafM9sE8ncIGUIg=; b=xz7fwXniR5Q5ttZok9Iit6lhpbYeMTTkS4lReNg3JhCjMAOxNFR8z+Hv3Jd5s9NK4J zafWD4ZiT9M2ePwjiPjr7n8ZkFZzNcsyqQbBniwBQvXcVy17SRPAWAPZvwA1kQU3hCP5 eWK0A4V25uk6CxI4TaS8dKDGJIoOuiyzuQrLgPtTcqqOnctFowGwgce1vQSNDUomHmnx tvT90f4QG1Lb69PXA7mFI/DLXOorO6tqySSxqUe87OAXKFg8k5+fP10HnU+/MsrNWuZv ak3qLcOuH6bizVMEc0C9p/bW4adL3s7Zz9Zty0PYBFFNYD3e+44iAMmD2O9UlE5H82Xa winw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Y/dxyfxU"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si1886631ejx.468.2020.09.09.11.04.58; Wed, 09 Sep 2020 11:04:58 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Y/dxyfxU"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726226AbgIISEx (ORCPT + 6 others); Wed, 9 Sep 2020 14:04:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:59332 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730145AbgIISCc (ORCPT ); Wed, 9 Sep 2020 14:02:32 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6251921D80; Wed, 9 Sep 2020 18:02:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674550; bh=4WGAK8AbbHJfYhD9ddvP6Zim7kuzGr7UghvSwQy6YRo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y/dxyfxU3gVeHvDXM4lSieav/NVBX32nX+UQeOXqzPcea3joc90NIbu6Zhjoq7J4n 7f7sPGrsAq6HZ6pLPBPazg01KcI60E5N92rq85SuhwPGCK0NfeGkcXMpM+uQOqC79C VViCI4qM/+CNz16rxiM/SFqN3eCtBvXbhNipk6UA= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Alexandre Belloni , Maxime Ripard Subject: [PATCH v2 07/20] dt-bindings:iio:adc:nuvoton, nau7802 yaml conversion Date: Wed, 9 Sep 2020 18:59:33 +0100 Message-Id: <20200909175946.395313-8-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron A simple conversion from txt file to yaml. I added the #io-channel-cells property as optional to allow the channels of this ADCs to be used to provide services to other drivers, for example if an analog accelerometer is connected. Signed-off-by: Jonathan Cameron Cc: Alexandre Belloni Cc: Maxime Ripard --- .../bindings/iio/adc/nuvoton,nau7802.yaml | 50 +++++++++++++++++++ .../bindings/iio/adc/nuvoton-nau7802.txt | 18 ------- 2 files changed, 50 insertions(+), 18 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/nuvoton,nau7802.yaml b/Documentation/devicetree/bindings/iio/adc/nuvoton,nau7802.yaml new file mode 100644 index 000000000000..bcd041ea28a8 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/nuvoton,nau7802.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/nuvoton,nau7802.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton NAU7802 I2c Analog to Digital Converter (ADC) + +maintainers: + - Alexandre Belloni + - Maxime Ripard + +properties: + compatible: + const: nuvoton,nau7802 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + nuvoton,vldo: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Internal reference voltage in millivolts to be configured. + minimum: 2400 + maximum: 4500 + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + nau7802@2a { + compatible = "nuvoton,nau7802"; + reg = <0x2a>; + nuvoton,vldo = <3000>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/adc/nuvoton-nau7802.txt b/Documentation/devicetree/bindings/iio/adc/nuvoton-nau7802.txt deleted file mode 100644 index e9582e6fe350..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/nuvoton-nau7802.txt +++ /dev/null @@ -1,18 +0,0 @@ -* Nuvoton NAU7802 Analog to Digital Converter (ADC) - -Required properties: - - compatible: Should be "nuvoton,nau7802" - - reg: Should contain the ADC I2C address - -Optional properties: - - nuvoton,vldo: Internal reference voltage in millivolts to be - configured valid values are between 2400 mV and 4500 mV. - - interrupts: IRQ line for the ADC. If not used the driver will use - polling. - -Example: -adc2: nau7802@2a { - compatible = "nuvoton,nau7802"; - reg = <0x2a>; - nuvoton,vldo = <3000>; -}; From patchwork Wed Sep 9 17:59:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249528 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp56379ilk; Wed, 9 Sep 2020 11:04:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpf5XQUIfdHGu7CExA++ibOuaqalA53FT3C203AsNGZCLmhY0FJwp0i8wy540+lcn9tA88 X-Received: by 2002:a17:906:660f:: with SMTP id b15mr5111829ejp.333.1599674693983; Wed, 09 Sep 2020 11:04:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674693; cv=none; d=google.com; s=arc-20160816; b=vqbHpNsA9OiC6dc8iHRW+68/OWvCMyUoCNQqzBIHbbmemfSMoPgXg6ue5n1NaDaGst pJbuW/bCCSjv2/nCbxp5M7GGaAK+6AGrn+p8NWDhzvoahffizZVC1MbsZLG5MTK9P9oy zmqDuk9MrOY6rThlsWux/Jq3MCYY7B5hKpTVyiqHA03C5lmaCcwRFjPYh+wE+ahMgmO5 xmZS0MmK+pRe+Ytrc/uP4+biKyrfGNuh1/PONcLAOV9k4FpRURl4eOx/Apkzv829SGL1 VGfZjg9yIjJa6ad5F8flQEfScMaXB6vbORBdf8kBeBO5BVzphsXmDSltuxwFMMYjD6mb qfww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wWXT8vvamAklxCfgSR4rf2i7Fh9Jfowuvu+atZhhMOY=; b=luzd7FIQAJFESjDcJ8CZRAB1n9DDm82vznsdhtTS2N0WDWBxCDoSNUKH3nD5RM4w2c D8KC4U0/jWHtjE4K8MfWcsmkRXhnnoOYzFPnLVeL62CugRFhN3jD6hu0pafMq6VUUkqV pfYZXK/vES6LEnHCLUC4Xihfk03O679RtKYHN8RloTSA7Xrlfz/UuQI/bH51gh66Wp0u FBsZ2FCgiauxC0EMcig+70+1ZUeT5BHhcaYDwJO8lj97KG1cOE2bgR2RLTkoVjW3TrXJ Xl021wooBiv5sNApriBXVurK/Mxz/Cpb1NgWNOWBKob+T209KIGQxqrm1RAxwA98KIyQ ++Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SCnqyJKJ; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si1886631ejx.468.2020.09.09.11.04.53; Wed, 09 Sep 2020 11:04:53 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SCnqyJKJ; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726535AbgIISEq (ORCPT + 6 others); Wed, 9 Sep 2020 14:04:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:59342 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730150AbgIISCc (ORCPT ); Wed, 9 Sep 2020 14:02:32 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 04EEC21D7F; Wed, 9 Sep 2020 18:02:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674552; bh=Vkxc4nvRxLNd/4fVhUI0rHJQwWPuuRyejX1IfR3WD3k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SCnqyJKJVtGZjKRo/BwveSZQtbpE2XRJ9R48NcNH40tnPXCz4rlA/ViAKp65QfI9s PYSwS5fd7f+F4a/Mr+mJC2wv58addF4ufOxMsZXS4Y9uCuGDgP6KDVP78qijyeh0yW F4ue2leHULwQPu9d9a2AYoosvqIbjheQoKjaDaHE= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Tomer Maimon Subject: [PATCH v2 08/20] dt-bindings:iio:adc:nuvoton, npcm750-adc yaml conversion Date: Wed, 9 Sep 2020 18:59:34 +0100 Message-Id: <20200909175946.395313-9-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Renamed the file to reflect the only compatible. Added #io-channel-cells to make it easier to support consumers of the ADC channels this device provides. Signed-off-by: Jonathan Cameron Cc: Tomer Maimon --- .../bindings/iio/adc/nuvoton,npcm-adc.txt | 26 -------- .../bindings/iio/adc/nuvoton,npcm750-adc.yaml | 64 +++++++++++++++++++ 2 files changed, 64 insertions(+), 26 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm-adc.txt b/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm-adc.txt deleted file mode 100644 index ef8eeec1a997..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm-adc.txt +++ /dev/null @@ -1,26 +0,0 @@ -Nuvoton NPCM Analog to Digital Converter (ADC) - -The NPCM ADC is a 10-bit converter for eight channel inputs. - -Required properties: -- compatible: "nuvoton,npcm750-adc" for the NPCM7XX BMC. -- reg: specifies physical base address and size of the registers. -- interrupts: Contain the ADC interrupt with flags for falling edge. -- resets : phandle to the reset control for this device. - -Optional properties: -- clocks: phandle of ADC reference clock, in case the clock is not - added the ADC will use the default ADC sample rate. -- vref-supply: The regulator supply ADC reference voltage, in case the - vref-supply is not added the ADC will use internal voltage - reference. - -Example: - -adc: adc@f000c000 { - compatible = "nuvoton,npcm750-adc"; - reg = <0xf000c000 0x8>; - interrupts = ; - clocks = <&clk NPCM7XX_CLK_ADC>; - resets = <&rstc NPCM7XX_RESET_IPSRST1 NPCM7XX_RESET_ADC>; -}; diff --git a/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm750-adc.yaml b/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm750-adc.yaml new file mode 100644 index 000000000000..001cf263b7d5 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm750-adc.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/nuvoton,npcm750-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton NPCM BMC Analog to Digital Converter (ADC) + +maintainers: + - Tomer Maimon + +description: + The NPCM ADC is a 10-bit converter for eight channel inputs. + +properties: + compatible: + const: nuvoton,npcm750-adc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + description: ADC interrupt, should be set for falling edge. + + resets: + maxItems: 1 + + clocks: + maxItems: 1 + description: If not provided the defulat ADC sample rate will be used. + + vref-supply: + description: If not supplied, the internal voltage reference will be used. + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - interrupts + - resets + +additionalProperties: false + +examples: + - | + #include + #include + #include + #include + soc { + #address-cells = <1>; + #size-cells = <1>; + adc@f000c000 { + compatible = "nuvoton,npcm750-adc"; + reg = <0xf000c000 0x8>; + interrupts = ; + clocks = <&clk NPCM7XX_CLK_ADC>; + resets = <&rstc NPCM7XX_RESET_IPSRST1 NPCM7XX_RESET_ADC>; + }; + }; +... From patchwork Wed Sep 9 17:59:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249530 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp56442ilk; Wed, 9 Sep 2020 11:04:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygqoWc1/P6Y7NgucwiWhnPVPAz+T4e/nODLIn/N7hls5dIwilGXKEoDNEgSVokuP4XrQoS X-Received: by 2002:a05:6402:1110:: with SMTP id u16mr5347995edv.253.1599674698668; Wed, 09 Sep 2020 11:04:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674698; cv=none; d=google.com; s=arc-20160816; b=MwFipUVccCFdVGVaWez/Zub7FK6uGru4PBRamoWUW7Y3ig5k3csc2p0BNniUSBW8JD 4bVdd+qT77cNqlcOPJahG4iLXjILp1TR5FsCzJYr0MI4zWJK/SsZb1Ciz2d87HDPNlG/ wqOz7BFA87PdF/s3KEQHYayxFENGqgNUSwrqw6RFcxt1m6NxhIZqAQ1B3Hi8D070CpkK Z3X3JT0wpXCGM2tQZbutftcu5cM/rqQOlbxVJ2p7dkw0NSfn6YIKX6KKP50ehhCzujeo Th0Rn4A3d34W1ntGtkfWtZNvYguV5DLrNQscU1Xnu6XX6f1+ZivdmrIS8czO3cGAunNZ g8Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=voXUIsWH9e+wFezKkZe6pYHmDVA4qWqAtX36IUezENI=; b=InaHgGkcaBOQD1KAX4qeeh9VxIXcHiat/djmAdepQG9weRkEDdFm/KVAEFkSgBKHC9 c5kivlB/ZxjsRkP5dHkLoiF8zeQbssmJ6burXv5suXc2nUprnjLUmwBNsxp013+vGADo CD9Bd9NJwdouwjulUqg76d5f7TlRGl4+3loIGlc6XCQf8NMnYvK34VskvpD9AGLX+d6j QFKANGnSdg78fcTNsf4XW9bicECMTl/txWrr3qjZDnKqET4M5J04haDR2FGn0iZudef7 NrrQLUkYfuYmujOVihGa+mn62/kZV1YdH3hSccimpCQfdhyxeXHwTEnvtOuOMgZOHQhY wEIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KRnrnE7c; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si1886631ejx.468.2020.09.09.11.04.58; Wed, 09 Sep 2020 11:04:58 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KRnrnE7c; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729824AbgIISEy (ORCPT + 6 others); Wed, 9 Sep 2020 14:04:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:59356 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730154AbgIISCe (ORCPT ); Wed, 9 Sep 2020 14:02:34 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 73CD3221E5; Wed, 9 Sep 2020 18:02:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674553; bh=32NlETNlgjAzx6DtnmnvP+RC6sufGpUZINDy8r4BguE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KRnrnE7cUb7c++rgCOkITTPpXd8gpk6o7WtRG2aJ5VLTdBCRWThfAbLm2ckBAeVuF SsGwnmtIk9Vbob3ISwr8R44zPjKxrUzUNUV4KfZs/sItX62aDO2Q1cTjQ+cVXy5unp Va2VSYYsJqPE/3NwZmqDlSCcClnvfnaJWnia3d1Q= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Joachim Eastwood Subject: [PATCH v2 09/20] dt-bindings:iio:adc:nxp, lpc1850-adc yaml conversion Date: Wed, 9 Sep 2020 18:59:35 +0100 Message-Id: <20200909175946.395313-10-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Most of the description in the original doc is effectively boilerplate and does not bring much value so I have not carried it over into the yaml. Added #io-channel-cells to simplify use of channels on this ADC by consumer drivers. Signed-off-by: Jonathan Cameron Cc: Joachim Eastwood --- .../bindings/iio/adc/lpc1850-adc.txt | 20 ------ .../bindings/iio/adc/nxp,lpc1850-adc.yaml | 61 +++++++++++++++++++ 2 files changed, 61 insertions(+), 20 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/lpc1850-adc.txt b/Documentation/devicetree/bindings/iio/adc/lpc1850-adc.txt deleted file mode 100644 index 9ada5abd45fa..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/lpc1850-adc.txt +++ /dev/null @@ -1,20 +0,0 @@ -NXP LPC1850 ADC bindings - -Required properties: -- compatible: Should be "nxp,lpc1850-adc" -- reg: Offset and length of the register set for the ADC device -- interrupts: The interrupt number for the ADC device -- clocks: The root clock of the ADC controller -- vref-supply: The regulator supply ADC reference voltage -- resets: phandle to reset controller and line specifier - -Example: - -adc0: adc@400e3000 { - compatible = "nxp,lpc1850-adc"; - reg = <0x400e3000 0x1000>; - interrupts = <17>; - clocks = <&ccu1 CLK_APB3_ADC0>; - vref-supply = <®_vdda>; - resets = <&rgu 40>; -}; diff --git a/Documentation/devicetree/bindings/iio/adc/nxp,lpc1850-adc.yaml b/Documentation/devicetree/bindings/iio/adc/nxp,lpc1850-adc.yaml new file mode 100644 index 000000000000..6404fb73f8ed --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/nxp,lpc1850-adc.yaml @@ -0,0 +1,61 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/nxp,lpc1850-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP LPC1850 ADC bindings + +maintainers: + - Joachim Eastwood + +description: + Supports the ADC found on the LPC1850 SoC. + +properties: + compatible: + const: nxp,lpc1850-adc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + vref-supply: true + + resets: + maxItems: 1 + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - interrupts + - clocks + - vref-supply + - resets + +additionalProperties: false + +examples: + - | + #include + soc { + #address-cells = <1>; + #size-cells = <1>; + adc@400e3000 { + compatible = "nxp,lpc1850-adc"; + reg = <0x400e3000 0x1000>; + interrupts = <17>; + clocks = <&ccu1 CLK_APB3_ADC0>; + vref-supply = <®_vdda>; + resets = <&rgu 40>; + }; + }; +... From patchwork Wed Sep 9 17:59:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249533 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp56722ilk; Wed, 9 Sep 2020 11:05:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNgbnMb4RAgYTA8YXlVVomTCsGKMfsQrkB5+dMTXWTQ2SVqrkCFyiNpmULz2oD7yX1kltC X-Received: by 2002:a05:6402:2c7:: with SMTP id b7mr5581944edx.125.1599674719608; Wed, 09 Sep 2020 11:05:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674719; cv=none; d=google.com; s=arc-20160816; b=YsJ1me1nZehG3qH+LcMKiap0QFBmqinS25O3guW0mNY67vw4KRuYP5hjGbTOJ5sPFe 33ieB4ntlFxOltGlKwk/efItUCmmVUKdjvAMl+tRfpjj+K9a026KSfiq6OAVe/37/u+k AMAYkV49o6qN1PoXid4Zayh+zALXQbUaTAx1A0/wRNePEhhWMqUL9eU0oPXVaSZxlNba KmKKRwMEoAnZB7dGMkjs0QL6ufSXxu9d3LpqzGuSoNStdpQklsdNtve9BFvecPQW/XOC 20UVzuEjNELMRZsYQ9dPQhOIi92oYzSJ2ogbSN+lWgGRRqsqVPEJcR0LhzA+Trm/cd4T WG5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gVOwZWONYfVUyjerRn2Ls+12GrXsFbwf6YHvU6+QUUU=; b=qt4Tb9iXoiKQGihfovUBDiZigF1WiRrDcwb75T3b4NLqWcfYXAeExnkz8qr0zCjtPK ft51FCw+Ru+XMvvVbA5fWoUgrO8XRCsj4u4n/vcAYzeDAC9RuGq0q1gBC5MV28j73G2A gSgyUJvIpqcbFniBRAOxEWwxEWot38Xpd22UztVH4S5QkEARvHKk3Nu0dogrxI/VsQSO 2kL9q0OR3lH9k2HOyhh4IXIbWV8M2p+eJhVJymw08FN69Th8NH5YWWRPSs2Gw1vlcIVH TNPHhHHV+isprgllFrqYQGEZ1v3/J1propNfIldT199t95EOt7fXuOy0D8RQTkilobFk XP9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mgqPjG+D; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m3si1923698ejk.485.2020.09.09.11.05.19; Wed, 09 Sep 2020 11:05:19 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mgqPjG+D; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729529AbgIISE7 (ORCPT + 6 others); Wed, 9 Sep 2020 14:04:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:59374 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727055AbgIISCf (ORCPT ); Wed, 9 Sep 2020 14:02:35 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EB14D21D91; Wed, 9 Sep 2020 18:02:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674555; bh=E38bXaztWbprGXLGB3ZptLRYv4BC3A7eIgpDTMmcQ14=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mgqPjG+D69xI2ciYzYhieqhVli2zRwhIqutPsrb8+JT9dn5UNOeLdxs1gv+ROAmC8 JvMxT4kD5jiInho7lL+WtUC/ofn/C3L7ynMTCmyUuzjywfh1CchfBaZ+OYY6A4xoS7 dsYNZ53mhrTZn7M6OncnK7NxT7IrzA0JcmHIHCxA= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Gregory Clement Subject: [PATCH v2 10/20] dt-bindings:iio:adc:lpc3220-adc yaml conversion Date: Wed, 9 Sep 2020 18:59:36 +0100 Message-Id: <20200909175946.395313-11-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Renamed to remove the wild cards. These go wrong far too often so in general preferred to use the name of a specific part. As this binding only provides one compatible, I went with that. Signed-off-by: Jonathan Cameron Cc: Gregory Clement --- .../bindings/iio/adc/lpc32xx-adc.txt | 21 -------- .../bindings/iio/adc/nxp,lpc3220-adc.yaml | 50 +++++++++++++++++++ 2 files changed, 50 insertions(+), 21 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/lpc32xx-adc.txt b/Documentation/devicetree/bindings/iio/adc/lpc32xx-adc.txt deleted file mode 100644 index 3a1bc669bd51..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/lpc32xx-adc.txt +++ /dev/null @@ -1,21 +0,0 @@ -* NXP LPC32xx SoC ADC controller - -Required properties: -- compatible: must be "nxp,lpc3220-adc" -- reg: physical base address of the controller and length of memory mapped - region. -- interrupts: The ADC interrupt - -Optional: - - vref-supply: The regulator supply ADC reference voltage, optional - for legacy reason, but highly encouraging to us in new device tree - -Example: - - adc@40048000 { - compatible = "nxp,lpc3220-adc"; - reg = <0x40048000 0x1000>; - interrupt-parent = <&mic>; - interrupts = <39 0>; - vref-supply = <&vcc>; - }; diff --git a/Documentation/devicetree/bindings/iio/adc/nxp,lpc3220-adc.yaml b/Documentation/devicetree/bindings/iio/adc/nxp,lpc3220-adc.yaml new file mode 100644 index 000000000000..2c5032be83bd --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/nxp,lpc3220-adc.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/nxp,lpc3220-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP LPC3220 SoC ADC controller + +maintainers: + - Gregory Clement + +description: + This hardware block has been used on several LPC32XX SoCs. + +properties: + compatible: + const: nxp,lpc3220-adc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + vref-supply: true + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + soc { + #address-cells = <1>; + #size-cells = <1>; + adc@40048000 { + compatible = "nxp,lpc3220-adc"; + reg = <0x40048000 0x1000>; + interrupt-parent = <&mic>; + interrupts = <39 0>; + vref-supply = <&vcc>; + }; + }; +... From patchwork Wed Sep 9 17:59:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249532 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp56714ilk; Wed, 9 Sep 2020 11:05:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGTAbkSiLev1vtMAIcWZB+SEw7STHobhCzSfhfURtVWCw9u//R8aYLi4azgqT3IF0+F6/w X-Received: by 2002:a17:906:b813:: with SMTP id dv19mr4779660ejb.70.1599674719141; Wed, 09 Sep 2020 11:05:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674719; cv=none; d=google.com; s=arc-20160816; b=lVgJBgmClk61qCvHuBlDMhVF1GGoiztJS0sn3NnNWz5uqRaSW17h1+iah8uGkT9zh0 /jYI6cq8oynk0SIrwQvaV4zfOBJO7bIYOEryQVHtdKsn9cEBKd9pHc9SZa33FErLiIk9 1mnLjc+FMs/KaAMn9QWDTii2EgwuTw6MANnUQJRnLBIpdsT2NjWkCi+UK18WIxO999zf Ee3Ol6EHbZCJ718qjz2CUgzZutTjrc8JOH7ub43Rb0PZktVsJ4flmY/qyWxt1Tf3HxDW ec3yMPfCF7p59axP6BHz5UgIUDARtJsNPRy5vICQWiHX6exvQ9T13rSmtKRMLfIotlWG tVFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tWEkAC4nF4rzCQcExbX53r/cVmcTi74Lf3aze0P5Sis=; b=uRDQhqMoaX/1kOj568xV0tHnq8jUhx/9/JNTklWhwLUmCJC/VpvsRGjqoYI5TgBtvC 1BzHXNdlnxOFJ+/1RbfiBnQEkm+WiPdJfejtDW1LXqo764f/aV2rxG8M4UeuGKN8hppA FfD2hAvJlw2dsPmwkyY6sYHEpYfivRNqkAiMqHht+EIqp8jLQB7a0zdGz6gED4gDzZUa dDXpVYs6KmfOiq3gmQ6dj4w1nmIp/oTKkNQ3xdAphUKqrI3/hL7gSolfQdDDfuxRqWx2 N2P6mk0cHfgKy2TnrIV009sYEJybCzatPcGZFHO9EH5qSepsc1A56S/TiySEJgpi9DxG Bunw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bX32jlDn; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m3si1923698ejk.485.2020.09.09.11.05.18; Wed, 09 Sep 2020 11:05:19 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bX32jlDn; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727055AbgIISFA (ORCPT + 6 others); Wed, 9 Sep 2020 14:05:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:59390 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730157AbgIISCh (ORCPT ); Wed, 9 Sep 2020 14:02:37 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 790E9221E7; Wed, 9 Sep 2020 18:02:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674556; bh=XpngdjpF08FQex0xcA2ugQ5BaeqEMiH6ImmMdQcJOM8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bX32jlDnJGbSIFx+F77VwaTpCR0vBhixoRVD/9sud97LmW19PZsXsC/32IRChViFt QIlZZpcFZwz5p1D+0Gh/a6wrfJZR5F+dygZgx/Q+M4ATAaGwuKwNNeFOz7A7GIBCBn b19GhIDWlEOCcL42of0VqorZZ8ldBAlKlG+6ZrY4= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Tony Lindgren Subject: [PATCH v2 11/20] dt-bindings:iio:adc:motorola, cpcap-adc yaml conversion Date: Wed, 9 Sep 2020 18:59:37 +0100 Message-Id: <20200909175946.395313-12-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Conversion from txt to yaml. Slightly expanded example to give a bit more context. Description lifted from the original driver commit. Signed-off-by: Jonathan Cameron Cc: Tony Lindgren --- .../devicetree/bindings/iio/adc/cpcap-adc.txt | 17 ------- .../bindings/iio/adc/motorola,cpcap-adc.yaml | 51 +++++++++++++++++++ 2 files changed, 51 insertions(+), 17 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt b/Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt deleted file mode 100644 index ec04008e8f4f..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt +++ /dev/null @@ -1,17 +0,0 @@ -Motorola CPCAP PMIC ADC binding - -Required properties: -- compatible: Should be "motorola,cpcap-adc" or "motorola,mapphone-cpcap-adc" -- interrupts: The interrupt number for the ADC device -- interrupt-names: Should be "adcdone" -- #io-channel-cells: Number of cells in an IIO specifier - -Example: - -cpcap_adc: adc { - compatible = "motorola,mapphone-cpcap-adc"; - interrupt-parent = <&cpcap>; - interrupts = <8 IRQ_TYPE_NONE>; - interrupt-names = "adcdone"; - #io-channel-cells = <1>; -}; diff --git a/Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml b/Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml new file mode 100644 index 000000000000..7811c0abd5d0 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/motorola,cpcap-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Motorola CPCAP PMIC ADC binding + +maintainers: + - Tony Lindgren + +description: + On Motorola phones like droid 4 there is a custom CPCAP PMIC. This PMIC + has ADCs that are used for battery charging and USB PHY VBUS and ID pin + detection. + +properties: + compatible: + enum: + - motorola,cpcap-adc + - motorola,mapphone-cpcap-adc + + interrupts: + maxItems: 1 + + interrupt-names: + const: adcdone + + "#io-channel-cells": + const: 1 + +required: + - compatible + - interrupts + - "#io-channel-cells" + +examples: + - | + #include + pmic { + #address-cells = <1>; + #size-cells = <0>; + adc { + compatible = "motorola,mapphone-cpcap-adc"; + interrupt-parent = <&cpcap>; + interrupts = <8 IRQ_TYPE_NONE>; + interrupt-names = "adcdone"; + #io-channel-cells = <1>; + }; + }; +... From patchwork Wed Sep 9 17:59:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249537 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp57119ilk; Wed, 9 Sep 2020 11:05:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGW6JpKuhsnJ7353WQk2lfHyHyjchJpuJIuI1hr71ccqs//gGSolp2MC5jELc+g7ZOjN2W X-Received: by 2002:a17:907:70cb:: with SMTP id yk11mr4807004ejb.312.1599674744785; Wed, 09 Sep 2020 11:05:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674744; cv=none; d=google.com; s=arc-20160816; b=qWcnHMESOyYR/gmZh7jJJq+G2TDecOSkNNnXatkjqD9NYgETtAT2K3cBTqTUtr4PnB Icvf2QAlM0yx7rAS+nyOmRGtIfnuj2p0uHtmhyxpndSxv8BegPnoMNDqYzjaNeUwnmC2 7E+HdttlYSi4VhTYNen25Vb3MYDn+hhnU69zXE4RXszWDRTTOUp/zoHe7y3ihaNPlmoI aepcHjIqIpiT8qSofTJuClwaX39LwEFIc/irU/bY/QUFjMElsOSnfHN6Up2ohBYBL18w s0E49pcdYIrqoHrS3wzrlFMoKWLDUuo+O/VBaafpTygAJdSvtfzMjkpvVy5BZ0mwlQW8 8NyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BBGk54B/iVW9xy4TjqMcj/CBFp+GfOf3IU4JtMUmyMs=; b=lIBba207fTmVl1sY3LLv1ltbDCHIkOR8EM6RDm0E7RYYUAR2HmUS6FC6sEX4EPjOK3 nZkO2Uw9dEXLht6XWoSPSHyWdWJwewUp5GCN2KZDGeEoc8I8yNcGTC5FNRZb6grBKE3n M3RDy35gcGwe0S88fp4j76PiMcgmW2hIo3pgj6aMfKdUXh3XehOgUQUpknRGvVzg5ApE 1gunmuVTpoABs1mzYjLCiVNPrMH/W0pXrAit03E6lomE87KE19RqqFk8/LEq1v2w4wz7 uVXXp9LGO4kngExpqAH8TO3ZR+3O2vl3owXiaAauCWFytQ56qn4HTXQxeafWqy4xp32N QiMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rs1iOxfY; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m3si1923698ejk.485.2020.09.09.11.05.44; Wed, 09 Sep 2020 11:05:44 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rs1iOxfY; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728264AbgIISFh (ORCPT + 6 others); Wed, 9 Sep 2020 14:05:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:60318 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726440AbgIISEa (ORCPT ); Wed, 9 Sep 2020 14:04:30 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ECAD3221E8; Wed, 9 Sep 2020 18:02:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674558; bh=LXwmjBNNxQhHZ1OQIxynrn4oVDZJ0D7lt0BpKadQpOc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rs1iOxfYBCVpDSSNKsFnVn5FLjhDNnlMR5Zdf/vaBWqGdFvT3k9YHTNNPyB0IuQUt yoDDRNw88cGOHru5QKmPA6d8Ln7HQKve+7zQe1IDbt/ARup/+XweMrfBHQ3CL2NTKA K3jvPQIraXICGZ9BvK49cD14i4BHEDjNv4HFDAKM= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Adam Thomson Subject: [PATCH v2 12/20] dt-bindings:iio:adc:dlg, da9150-gpadc yaml conversion Date: Wed, 9 Sep 2020 18:59:38 +0100 Message-Id: <20200909175946.395313-13-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron This is a small part of an MFD so perhaps ultimately it makes more sense to document it with that MFD binding rather than separately. In the meantime it's a straightforward conversion from txt to yaml. Signed-off-by: Jonathan Cameron Acked-by: Adam Thomson --- .../bindings/iio/adc/da9150-gpadc.txt | 16 --------- .../bindings/iio/adc/dlg,da9150-gpadc.yaml | 33 +++++++++++++++++++ 2 files changed, 33 insertions(+), 16 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt b/Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt deleted file mode 100644 index c07228da92ac..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt +++ /dev/null @@ -1,16 +0,0 @@ -Dialog Semiconductor DA9150 IIO GPADC bindings - -Required properties: -- compatible: "dlg,da9150-gpadc" for DA9150 IIO GPADC -- #io-channel-cells: Should be set to <1> - (See Documentation/devicetree/bindings/iio/iio-bindings.txt for further info) - -For further information on GPADC channels, see device datasheet. - - -Example: - - gpadc: da9150-gpadc { - compatible = "dlg,da9150-gpadc"; - #io-channel-cells = <1>; - }; diff --git a/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml b/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml new file mode 100644 index 000000000000..15c51d337108 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/dlg,da9150-gpadc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Dialog Semiconductor DA9150 IIO GPADC + +maintainers: + - Adam Thomson + +description: + This patch adds support for general purpose ADC within the + DA9150 Charger & Fuel-Gauge IC. + +properties: + compatible: + const: dlg,da9150-gpadc + + "#io-channel-cells": + const: 1 + +required: + - compatible + - "#io-channel-cells" + +examples: + - | + adc { + compatible = "dlg,da9150-gpadc"; + #io-channel-cells = <1>; + }; +... From patchwork Wed Sep 9 17:59:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249534 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp56955ilk; Wed, 9 Sep 2020 11:05:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIPgKnmoUnfaw/z9nklYuceeILqVzzufYNxTe4O/P1k60728VXbFqJLers6BxvSPgraYdn X-Received: by 2002:a05:6402:1710:: with SMTP id y16mr5560211edu.197.1599674735133; Wed, 09 Sep 2020 11:05:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674735; cv=none; d=google.com; s=arc-20160816; b=KUFJUWuILNRKDVYC1lc40WOS/gAKwIdF36oNz+wDi/hUfr+pO47mcqvjyjeneBHkCU iUJEg9INSk8pEpEXNsGBE5AKoVEnP0rQ40vSRavbyjRS9FbtqFk2VVhW0k7/RJyBp99k XdCtKYmnXS11IGCE1KSw4RbGNXbzKZTlWcsPm5ksEZnq0J/6EiVakYxAocH+Q9ZmrQ7E wcs70Wj/7IKQ3vSf6AAYJs3H05aeHIjZ5/23Mrp9CA0UhlH/+u9FNi8uinKH9O38SVni F7PQDgdWd3QCNJVuus0xx6B6fKdmsG87HBG4mrnnFuay7rB4Lyeo0wq/9t5y+xwj/1wU CX6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gcYNpJLLo9PvsvN3JcCuXzL3TH5wEaYsHWBgYYlG4Yg=; b=eAMs/rrcnMiTkJdzFqjKVZTbCZFeh/5xGjOQh3oOd/Pd562ZzHjhEPgjvt8uDGsZeF gFBV2LeyS5a3VOJ2CjZcYQ0n73PGvPcROxis1Sfrvim9KoJ17HbT+saTZE+dc6jTzuVG s/MG8Gnn+abIHzXf2MVypMqJh7PkFCRbQ8RXe2qopZuz0Jg1se5QUfx/qiiQagFxG7fs fGbW7bRJFO/7qy0Y3inaW5+FCtaBStNm9msbptpee1qK42q1KCGYFD+Zdu2fZXZ8qzKJ QUnVk8di4oB9I6kcfSbOI/Ox7k+/PIBAk2u0SBTrkK7EgP9z8MiKm1C4VJto5JaCJaY2 chQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K7D9Ksko; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m3si1923698ejk.485.2020.09.09.11.05.34; Wed, 09 Sep 2020 11:05:35 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K7D9Ksko; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728350AbgIISF3 (ORCPT + 6 others); Wed, 9 Sep 2020 14:05:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:59114 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726415AbgIISEa (ORCPT ); Wed, 9 Sep 2020 14:04:30 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7357B221E9; Wed, 9 Sep 2020 18:02:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674559; bh=oR2e7KTlOJXHjrle7xG5qsZ13sayZ38P4sCsd50ANTc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K7D9KskoQ97wh+SxXNsEpmOIitbsjirR9HSJnD/9lt2cWTnQntbKyizwzT9k/Khxh dVHJIqYDYcr6vy8DuLtZ9SgBOXAL/0j3IhjeB2EDreRDXRhTlS2eD24umCZr6GSslD Nom6HoXUub8xe3Cp8Z3fwtRWlXhr2DoAfDfWA5LM= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Phani Movva Subject: [PATCH v2 13/20] dt-bindings:iio:adc:cosmic, 10001-adc yaml conversion Date: Wed, 9 Sep 2020 18:59:39 +0100 Message-Id: <20200909175946.395313-14-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron I don't really know much about this one, hence the binding is a simple conversion of what was in the txt file. Signed-off-by: Jonathan Cameron Cc: Phani Movva --- .../bindings/iio/adc/cc10001_adc.txt | 22 ------- .../bindings/iio/adc/cosmic,10001-adc.yaml | 59 +++++++++++++++++++ 2 files changed, 59 insertions(+), 22 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/cc10001_adc.txt b/Documentation/devicetree/bindings/iio/adc/cc10001_adc.txt deleted file mode 100644 index 904f76de9055..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/cc10001_adc.txt +++ /dev/null @@ -1,22 +0,0 @@ -* Cosmic Circuits - Analog to Digital Converter (CC-10001-ADC) - -Required properties: - - compatible: Should be "cosmic,10001-adc" - - reg: Should contain adc registers location and length. - - clock-names: Should contain "adc". - - clocks: Should contain a clock specifier for each entry in clock-names - - vref-supply: The regulator supply ADC reference voltage. - -Optional properties: - - adc-reserved-channels: Bitmask of reserved channels, - i.e. channels that cannot be used by the OS. - -Example: -adc: adc@18101600 { - compatible = "cosmic,10001-adc"; - reg = <0x18101600 0x24>; - adc-reserved-channels = <0x2>; - clocks = <&adc_clk>; - clock-names = "adc"; - vref-supply = <®_1v8>; -}; diff --git a/Documentation/devicetree/bindings/iio/adc/cosmic,10001-adc.yaml b/Documentation/devicetree/bindings/iio/adc/cosmic,10001-adc.yaml new file mode 100644 index 000000000000..1c4838d4a547 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/cosmic,10001-adc.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/cosmic,10001-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cosmic Circuits CC-10001 ADC + +maintainers: + - Phani Movva + +description: + Cosmic Circuits 10001 10-bit ADC device. + +properties: + compatible: + const: cosmic,10001-adc + + reg: + maxItems: 1 + + adc-reserved-channels: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Bitmask of reserved channels, i.e. channels that cannot be + used by the OS. + + clocks: + maxItems: 1 + + clock-names: + const: adc + + vref-supply: true + + "#io-channel-cells": + const: 1 + + +required: + - compatible + - reg + - clocks + - clock-names + - vref-supply + +additionalProperties: false + +examples: + - | + adc@18101600 { + compatible = "cosmic,10001-adc"; + reg = <0x18101600 0x24>; + adc-reserved-channels = <0x2>; + clocks = <&adc_clk>; + clock-names = "adc"; + vref-supply = <®_1v8>; + }; +... From patchwork Wed Sep 9 17:59:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249536 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp57064ilk; Wed, 9 Sep 2020 11:05:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwva5Jq/UUaWn1cDtA6ienf+fyM+0RF3U6fxYaKCNJJTAHTR8Oecz6TBtkAxUefW9HhJdkU X-Received: by 2002:aa7:cf05:: with SMTP id a5mr5422120edy.313.1599674742091; Wed, 09 Sep 2020 11:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674742; cv=none; d=google.com; s=arc-20160816; b=G3jhLIBdq11W4gBIxwuBbAFj7nvS5VDsU+MFI/45Rk7lKsGbpn7uAY1TkSmCmtoAFz HnREAQXVGi/yo6giKeBj0B6YbBoM3XtJAJetBwVb95tkcs7hsXlFvKEgZLGj8chyzYlE VcucBQ6LOg47mgBMulhdY/y2GZryrKxkhasqD8WKAER+6yC2OjBTw/gm4lYI1FXLorSC Dw/6cItzkMpN+Y/IucuxHvYlrQia1aiO2HooyMVt4tjbZD+5sFNiI/LDBvpv3DLmH/a2 UlcJfAcRB+48KR7penYOjbU6BIjLvRamzX0DUCL9F2lUDnJBkJHRUqss7Wp3QPgCS9+N bMxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gGB76DxQszexJNrInYWF5LXHwBwYkP2LpkEzeJ57kr8=; b=MJ51XSSqMB7wWBJkIAOmZOePTnJuh4kQmRNWIuX6CRVY+iz6ylV86HvbNjo2NYHI9/ FACA48frcEmE4BvkKWU8UAfu+Btwegbp77TSCwb4Lx1tMzDnTAaDPz8orHhm1/IcYgvr sHxsyv3v1FU422sN5o/uaHYN1L4cjHIsvyD+tgctbiAdFTlGmvf+LRWSr6C+/M+cJp2w tt/YQkY2uedGmOUd2h6tC3Su6hVPbdmne9VNQtV+PDttBiM7DkQiIBxAv5ffyXfVkL/f YwQUFM9u1NBgFxDILCgDFGNaWH3g29dgk0lsUF5lKBl/xpkipUhpEQjyODlN8gjnDdg3 RZgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=R43MGhl9; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m3si1923698ejk.485.2020.09.09.11.05.41; Wed, 09 Sep 2020 11:05:42 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=R43MGhl9; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729161AbgIISFd (ORCPT + 6 others); Wed, 9 Sep 2020 14:05:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:59138 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728015AbgIISEa (ORCPT ); Wed, 9 Sep 2020 14:04:30 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E730C221EB; Wed, 9 Sep 2020 18:02:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674561; bh=pIGED+JyPxgowS0lFF9cJwDhp/9iv4X0tN+lMhcd7Mw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R43MGhl91+eUaPZyD7+9F+Az4Z/tMZG1bA68KGhFD78EqUYeu9nksdvdUlxHsnk24 Ul3vM1VuAKaJIpxnwAd0Y5DwXYGKm/ozhtoX5/pwkqBakiHjRPhbSc4ddSornCFXib oO0N64/ZbR5UeEclZcX7gt0enpQtDdiZ1lIcKdNM= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Charles-Antoine Couret Subject: [PATCH v2 14/20] dt-bindings:iio:adc:adi,ad7949 yaml conversion Date: Wed, 9 Sep 2020 18:59:40 +0100 Message-Id: <20200909175946.395313-15-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Simple SPI driver. I've added the #io-channel-cells as an optional parameter to allow use of this device as a provider of ADC capabilities to other devices. Signed-off-by: Jonathan Cameron Cc: Charles-Antoine Couret --- .../devicetree/bindings/iio/adc/ad7949.txt | 16 ------ .../bindings/iio/adc/adi,ad7949.yaml | 57 +++++++++++++++++++ 2 files changed, 57 insertions(+), 16 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/ad7949.txt b/Documentation/devicetree/bindings/iio/adc/ad7949.txt deleted file mode 100644 index c7f5057356b1..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/ad7949.txt +++ /dev/null @@ -1,16 +0,0 @@ -* Analog Devices AD7949/AD7682/AD7689 - -Required properties: - - compatible: Should be one of - * "adi,ad7949" - * "adi,ad7682" - * "adi,ad7689" - - reg: spi chip select number for the device - - vref-supply: The regulator supply for ADC reference voltage - -Example: -adc@0 { - compatible = "adi,ad7949"; - reg = <0>; - vref-supply = <&vdd_supply>; -}; diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml new file mode 100644 index 000000000000..9b56bd4d5510 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/adi,ad7949.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD7949/AD7682/AD7689 analog to digital converters + +maintainers: + - Charles-Antoine Couret + +description: | + Specifications on the converters can be found at: + AD7949: + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7949.pdf + AD7682/AD7698: + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7682_7689.pdf + +properties: + compatible: + enum: + - adi,ad7682 + - adi,ad7689 + - adi,ad7949 + + reg: + maxItems: 1 + + vref-supply: + description: + ADC reference voltage supply + + spi-max-frequency: true + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - vref-supply + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "adi,ad7949"; + reg = <0>; + vref-supply = <&vdd_supply>; + }; + }; +... From patchwork Wed Sep 9 17:59:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249539 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp57354ilk; Wed, 9 Sep 2020 11:06:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTdRDd7dNkSYK0FqnGxo7yKLGkSxNl2NtZCAvR3/j05HAZlm7XMwUWRH9Bp7phxD7XbFrA X-Received: by 2002:a17:906:6805:: with SMTP id k5mr4645395ejr.397.1599674761867; Wed, 09 Sep 2020 11:06:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674761; cv=none; d=google.com; s=arc-20160816; b=SckQzAzZY7ZLhmZzLXJRLhJqFH933X+U2Ez89UqqW/wXwGkiFKiTxdM8qgHrSB/BNy rgkqrATrYJTI8fmeAkeiew+cukV4JLNTQe5ofeyGKEBrN0Fn1YdrlJoW85YaVgbpzHsp hn7ax39PyE/vemVnidDmuv0ayU+VUrTgkJAmwmuomAXxLX/A1tV7ISPmgHQg5Xnv6EGJ yCjkfKsdRxNotD+TocpJNAjUOeV2dxaYbZ5BCk/Zn8EAXZRYopTa/L5QWRKz2PfB3qi0 JAyi1fguFPY7t0Xfuv5ZN4kQU+V8aM/KnAvvkmKeeRRtHrMjBMSpCEhtN7+IhmhlkC63 7j0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DhQP9s+Hc/qTvBAy2oRaJqRsvJjUfyk1GJOvD/bzz7c=; b=kPcIP62fVqBH+KcREIuqk4aTzKXHuCv1kAxHjQ+oVClCfXksmDu17FOY2nHXS4ev+k EWN3aLDe/2OWcqHXk/UvU1jHbplxHGd+ArAbXw/pDlGUeBlNCb250cIaUM8ay6xEo8Lp H91f/7vC17+t9iThBCNTArhyPpi6foNw+f0N3POptm5cVPmu1b9jeaLPQI76UuLn7d9M 8wGUxVJQrQRxtVwvQ4UznvD779rbvi4ZlaAUutcoGf3TDvQAe9apftTs+FpNmSxb0w9q 1h8q6zgZjV5pZMN4tvGjF/3VPoRBWY7W1xT32du/cUd5dlpphzTdxRB0d04eNbo1U6Ng fq0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=W24mOEv0; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g1si2010474ejz.637.2020.09.09.11.06.01; Wed, 09 Sep 2020 11:06:01 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=W24mOEv0; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729692AbgIISGA (ORCPT + 6 others); Wed, 9 Sep 2020 14:06:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:60328 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728970AbgIISEa (ORCPT ); Wed, 9 Sep 2020 14:04:30 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7762321D94; Wed, 9 Sep 2020 18:02:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674562; bh=jPSQ5f2VhFS8sUid0ibRHmjsn7fdN/hAJrcv0JAeDtA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W24mOEv0gIZV09yyg3JBUWCIFwB4j0moz5WL1EjyQV7FqHeXrmgWmOKq8YNOl8uX3 /hlodM5VNuOukXlVsWIBIKWB1jJ+X4OufYEV1riNrt43mpG3DcBRK+BlYhYuLpuX1V 9H5VVp+gvQjWGCwLQdKO2+qRT/T0/0p7jyl7nK0Q= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Michael Hennerich Subject: [PATCH v2 15/20] dt-bindings:iio:adc:ad7768-1 yaml conversion Date: Wed, 9 Sep 2020 18:59:41 +0100 Message-Id: <20200909175946.395313-16-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Fairly straight conversion. The one oddity in the original binding is that spi-cpha and spi-cpol were not marked as required, but were in the example. Looking at the datasheet, there isn't any documented flexibility in the possible SPI modes, so I have moved these to requires. For spi-max-frequency I have gone the other way. I absolutely agree that it is good to specify this in the dt-binding, but it's not strictly required. As Stefan's email is bouncing I have gone with Michael as maintainer of this one as it falls under the ADI catch all entry in MAINTAINERS. Signed-off-by: Jonathan Cameron Cc: Michael Hennerich --- .../bindings/iio/adc/adi,ad7768-1.txt | 41 --------- .../bindings/iio/adc/adi,ad7768-1.yaml | 89 +++++++++++++++++++ 2 files changed, 89 insertions(+), 41 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.txt b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.txt deleted file mode 100644 index 9f5b88cf680d..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.txt +++ /dev/null @@ -1,41 +0,0 @@ -Analog Devices AD7768-1 ADC device driver - -Required properties for the AD7768-1: - -- compatible: Must be "adi,ad7768-1" -- reg: SPI chip select number for the device -- spi-max-frequency: Max SPI frequency to use - see: Documentation/devicetree/bindings/spi/spi-bus.txt -- clocks: phandle to the master clock (mclk) - see: Documentation/devicetree/bindings/clock/clock-bindings.txt -- clock-names: Must be "mclk". -- interrupts: IRQ line for the ADC - see: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt -- vref-supply: vref supply can be used as reference for conversion -- adi,sync-in-gpios: must be the device tree identifier of the SYNC-IN pin. Enables - synchronization of multiple devices that require simultaneous sampling. - A pulse is always required if the configuration is changed in any way, for example - if the filter decimation rate changes. As the line is active low, it should - be marked GPIO_ACTIVE_LOW. - -Optional properties: - - - reset-gpios : GPIO spec for the RESET pin. If specified, it will be asserted during - driver probe. As the line is active low, it should be marked GPIO_ACTIVE_LOW. - -Example: - - adc@0 { - compatible = "adi,ad7768-1"; - reg = <0>; - spi-max-frequency = <2000000>; - spi-cpol; - spi-cpha; - vref-supply = <&adc_vref>; - interrupts = <25 IRQ_TYPE_EDGE_RISING>; - interrupt-parent = <&gpio>; - adi,sync-in-gpios = <&gpio 22 GPIO_ACTIVE_LOW>; - reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>; - clocks = <&ad7768_mclk>; - clock-names = "mclk"; - }; diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml new file mode 100644 index 000000000000..d3733ad8785a --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml @@ -0,0 +1,89 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/adi,ad7768-1.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD7768-1 ADC device driver + +maintainers: + - Michael Hennerich + +description: | + Datasheet at: + https://www.analog.com/media/en/technical-documentation/data-sheets/ad7768-1.pdf + +properties: + compatible: + const: adi,ad7768-1 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + const: mclk + + interrupts: + maxItems: 1 + + vref-supply: + description: + ADC reference voltage supply + + adi,sync-in-gpios: + description: + Enables synchronization of multiple devices that require simultaneous + sampling. A pulse is always required if the configuration is changed + in any way, for example if the filter decimation rate changes. + As the line is active low, it should be marked GPIO_ACTIVE_LOW. + + reset-gpios: + maxItems: 1 + + spi-max-frequency: true + + spi-cpol: true + spi-cpha : true + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - clocks + - clock-names + - vref-supply + - spi-cpol + - spi-cpha + - adi,sync-in-gpios + +additionalProperties: false + +examples: + - | + #include + #include + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "adi,ad7768-1"; + reg = <0>; + spi-max-frequency = <2000000>; + spi-cpol; + spi-cpha; + vref-supply = <&adc_vref>; + interrupts = <25 IRQ_TYPE_EDGE_RISING>; + interrupt-parent = <&gpio>; + adi,sync-in-gpios = <&gpio 22 GPIO_ACTIVE_LOW>; + reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>; + clocks = <&ad7768_mclk>; + clock-names = "mclk"; + }; + }; +... From patchwork Wed Sep 9 17:59:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249535 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp57041ilk; Wed, 9 Sep 2020 11:05:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvyNQZJamEFZzC7XJJVj0TTo98l7/Ux3u9sUfo+ilM4vHKzVKT+JwFU9xmjeSnQXKxJ6rm X-Received: by 2002:aa7:d3da:: with SMTP id o26mr5151697edr.169.1599674740895; Wed, 09 Sep 2020 11:05:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674740; cv=none; d=google.com; s=arc-20160816; b=ZNoh42/vZQLfWZua5yKOCIwy6FqjAlwtFTaVwChwoB7oQeU3QhUuxXsboa0ewmf2Yr s0A03O4xJtC/IFAzI2i9k4LsFVEH1Z9aQ0Liw4tKIYyuOTa7gKnAEFF7B6F1XcEaWlsO tAFNrD0/lvGYkXKbH1IaNxA8e+E0fWrpT8tchxHdw3OWYdXO6SAi+PWvU6wBz6f+O/qg 3uPxsQSrjPh06xicobGwe2k8DeO28sjMM4D30ZwXMY5jkjJz2nUg5wWMtEyWaM/qhI+w LlI6kQbHPBJ6ZpfC5QKxPk/o/+eqIoOgNJhQbD44WC1NZ/HZbRnp+Hv7AzBR5/FFBtej Ia/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+AZGtLqWBfC/VA9+Lom3QV/R8ysXyVLe7w8FIXX5ICo=; b=yT5M1Wmj7Sr6MTIetaFP4IcIT4GJztnVxPYapqGrhqjkyHP7mjFFMV7wVkxsWIuaKZ zcMeSD+ke8hF3N1S0klZMkVTvAYA/790boiDCUB2IHHRn9dIaE5JSd+dAQIwNtZdNvMo 9Q7d/7JiNqf4oR/GzaID8Q4T/+vl/NwuyW8Zc4+YVd3ggqbAd9NGk2FRJ00jQ2eLYx74 7Y5hZvGrw/dD8kYUxzDe4S6coxznFm3RWOvaMQZYBMNHEM1krg6E9I9vyTeufaIY+QIO AuCvSs/FwgZuLZ90g5ouU0fNkxtYf8upMn0z9axVghcvV0WqRkDyGb1eJH7Ym9HXTFIn YFCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HHHkKG4d; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m3si1923698ejk.485.2020.09.09.11.05.40; Wed, 09 Sep 2020 11:05:40 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HHHkKG4d; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729129AbgIISFb (ORCPT + 6 others); Wed, 9 Sep 2020 14:05:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:59278 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729251AbgIISEa (ORCPT ); Wed, 9 Sep 2020 14:04:30 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 02AC022206; Wed, 9 Sep 2020 18:02:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674564; bh=a8NvT8GrB3MC2P5uCmXgeNzeGo+67sqznTDHWFubi94=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HHHkKG4d6onNz4L+yBN8fDaH2QBpQ2H7wCEBFx2DQnaV6QzCmxHOgn1KR3571xf3J F+y/QD8yrxccCUGUmk43mp8qFUWW512Xdr0OJjgWu0ax5pPV/RpAOym4Y5xf78v6CR aGnJkMmBdlc399xF28iVK3nEBdTNXrlpgFEdZEU0= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Dirk Eibach , Daniel Baluta Subject: [PATCH v2 16/20] dt-bindings:iio:adc:ti,ads1015 yaml conversion Date: Wed, 9 Sep 2020 18:59:42 +0100 Message-Id: <20200909175946.395313-17-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron This binding was moved over from hwmon some time ago so is a bit unusual in terms of IIO bindings. However, conversion was fairly straight forwards. I've listed both Dirk (who think wrote original binding) and Daniel who added the IIO driver for this device. Signed-off-by: Jonathan Cameron Cc: Dirk Eibach Cc: Daniel Baluta --- .../devicetree/bindings/iio/adc/ads1015.txt | 73 ----------- .../bindings/iio/adc/ti,ads1015.yaml | 113 ++++++++++++++++++ 2 files changed, 113 insertions(+), 73 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/ads1015.txt b/Documentation/devicetree/bindings/iio/adc/ads1015.txt deleted file mode 100644 index 918a507d1159..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/ads1015.txt +++ /dev/null @@ -1,73 +0,0 @@ -ADS1015 (I2C) - -This device is a 12-bit A-D converter with 4 inputs. - -The inputs can be used single ended or in certain differential combinations. - -For configuration all possible combinations are mapped to 8 channels: - 0: Voltage over AIN0 and AIN1. - 1: Voltage over AIN0 and AIN3. - 2: Voltage over AIN1 and AIN3. - 3: Voltage over AIN2 and AIN3. - 4: Voltage over AIN0 and GND. - 5: Voltage over AIN1 and GND. - 6: Voltage over AIN2 and GND. - 7: Voltage over AIN3 and GND. - -Each channel can be configured individually: - - pga is the programmable gain amplifier (values are full scale) - 0: +/- 6.144 V - 1: +/- 4.096 V - 2: +/- 2.048 V (default) - 3: +/- 1.024 V - 4: +/- 0.512 V - 5: +/- 0.256 V - - data_rate in samples per second - 0: 128 - 1: 250 - 2: 490 - 3: 920 - 4: 1600 (default) - 5: 2400 - 6: 3300 - -1) The /ads1015 node - - Required properties: - - - compatible : must be "ti,ads1015" - - reg : I2C bus address of the device - - #address-cells : must be <1> - - #size-cells : must be <0> - - The node contains child nodes for each channel that the platform uses. - - Example ADS1015 node: - - ads1015@49 { - compatible = "ti,ads1015"; - reg = <0x49>; - #address-cells = <1>; - #size-cells = <0>; - - [ child node definitions... ] - } - -2) channel nodes - - Required properties: - - - reg : the channel number - - Optional properties: - - - ti,gain : the programmable gain amplifier setting - - ti,datarate : the converter data rate - - Example ADS1015 channel node: - - channel@4 { - reg = <4>; - ti,gain = <3>; - ti,datarate = <5>; - }; diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads1015.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads1015.yaml new file mode 100644 index 000000000000..c7c850b7ecc6 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads1015.yaml @@ -0,0 +1,113 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,ads1015.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI ADS1015 4 channel I2C analog to digital converter + +maintainers: + - Dirk Eibach + - Daniel Baluta + +description: | + Datasheet at: https://www.ti.com/lit/gpn/ads1015 + Supports both single ended and differential channels. + +properties: + compatible: + const: ti,ads1015 + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + +additionalProperties: false + +patternProperties: + "^channel@[0-7]+$": + type: object + description: + Child nodes needed for each channel that the platform uses. + + properties: + reg: + description: | + 0: Voltage over AIN0 and AIN1. + 1: Voltage over AIN0 and AIN3. + 2: Voltage over AIN1 and AIN3. + 3: Voltage over AIN2 and AIN3. + 4: Voltage over AIN0 and GND. + 5: Voltage over AIN1 and GND. + 6: Voltage over AIN2 and GND. + 7: Voltage over AIN3 and GND. + items: + - minimum: 0 + maximum: 7 + + ti,gain: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 5 + description: | + pga is the programmable gain amplifier (values are full scale) + 0: +/- 6.144 V + 1: +/- 4.096 V + 2: +/- 2.048 V (default) + 3: +/- 1.024 V + 4: +/- 0.512 V + 5: +/- 0.256 V + + ti,datarate: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 6 + description: | + Data acquisition rate in samples per second + 0: 128 + 1: 250 + 2: 490 + 3: 920 + 4: 1600 (default) + 5: 2400 + 6: 3300 + + required: + - reg + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + adc@49 { + compatible = "ti,ads1015"; + reg = <0x49>; + #address-cells = <1>; + #size-cells = <0>; + channel@0 { + reg = <0>; + }; + channel@4 { + reg = <4>; + ti,gain = <3>; + ti,datarate = <5>; + }; + }; + }; +... From patchwork Wed Sep 9 17:59:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249542 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp57442ilk; Wed, 9 Sep 2020 11:06:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxZXXx9YYsV+GNNU3+b6cGTUUSzGs05y/aeEdO7kJllY6hnw3hhQ2cfKzuEYgJHQuDTJgd X-Received: by 2002:a17:906:6805:: with SMTP id k5mr4645826ejr.397.1599674767243; Wed, 09 Sep 2020 11:06:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674767; cv=none; d=google.com; s=arc-20160816; b=Ny19mlnf8etlbt42CKy+q3OPu8nUle29srHllPIoJidufodWTJCP8Z1fmOcBdK4x3f 6f05qR0/A/jb933zgSH3TKOs4Sdw3+YJ02oLtjTc+NCHT0q5RcKd89Tvzcn/zK2KNqzX 2/xZMtzdzGMVJ5N5UeXZGq8EWz4t3pm9E+pxjRJUs2GbyimfZUZ1IgFwPzTuSW5CjM1K Q9feMkE/XyO0N2MX72qnv7gWOIXunwZBONSgrAXz/PU/um5RHPsNCVbPyRXM/yIIfuqo slN9UPSpKsqeqsQ+SeysfQ+0fY5nMLhgdbRXCDh3volkHi/J5Z0AaOu32LbyIN+1Bpgw RD3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zIFAN+nqD3m61TdryM/IrPyYirQeFVvLlkxVgIaLloY=; b=a78d7V9/TFoTKWB3LlWJiQ6e83QLptHak/P2zpWhId5IpqH0aFy5I5gOoZNNndgHRu VZ0Dlf0DyjWbSoxQ8eKqBSr+iVDfltW1OCABmQ6zxLxmL+yPyKPx85x2HfujjmcDQN0Y 63rs+3KEv44ZBGg8icnNyBGFjJNBdK9QuXb/KKBOhZJObsFxaE5Rh4HbOswul5hCpJgf lbbJepc115et12nuX5S5ixvcx0GHKKzN4xp9FTzXt5Ot6ouRBwsoYDpBwhzE8SqcZrPu 7bX4adTaXXNR19fkAp3RRgjSrZiRiQKKr9wVggMzTEVG+Rm7Tm9cB+Iqw5Ul5HpobQGW lASQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WWkUUKGH; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g1si2010474ejz.637.2020.09.09.11.06.07; Wed, 09 Sep 2020 11:06:07 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WWkUUKGH; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726414AbgIISGE (ORCPT + 6 others); Wed, 9 Sep 2020 14:06:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:60330 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729298AbgIISEa (ORCPT ); Wed, 9 Sep 2020 14:04:30 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A273F221EC; Wed, 9 Sep 2020 18:02:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674565; bh=gT/krbdOva64tyJhEml19mVo5QwxHJLHEdlb5tBEbzE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WWkUUKGHUzM8AofFDzPL3oQ9afFUpxH1rPvJZZhc1SX+6TeJEmc611HhR8fyPYY5f KoY5PC92ACY2j/JUCsHzOHxVqnMfpU1BMIIod4hOecaa2TioBuRKnHRQIJPp8A4eOc ydvFhR75wMNWI03VWuOc4t7NxCmJp6u4RVF0Zm2Q= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Vladimir Barinov Subject: [PATCH v2 17/20] dt-bindings:iio:adc:holt,hi8435 yaml conversion Date: Wed, 9 Sep 2020 18:59:43 +0100 Message-Id: <20200909175946.395313-18-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Very simple binding. I've changed the example to use the node name threshold-detector@0 as sensor@0 seemed too generic. Signed-off-by: Jonathan Cameron Cc: Vladimir Barinov --- .../devicetree/bindings/iio/adc/hi8435.txt | 21 -------- .../bindings/iio/adc/holt,hi8435.yaml | 49 +++++++++++++++++++ 2 files changed, 49 insertions(+), 21 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/hi8435.txt b/Documentation/devicetree/bindings/iio/adc/hi8435.txt deleted file mode 100644 index 3b0348c5e516..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/hi8435.txt +++ /dev/null @@ -1,21 +0,0 @@ -Holt Integrated Circuits HI-8435 threshold detector bindings - -Required properties: - - compatible: should be "holt,hi8435" - - reg: spi chip select number for the device - -Recommended properties: - - spi-max-frequency: definition as per - Documentation/devicetree/bindings/spi/spi-bus.txt - -Optional properties: - - gpios: GPIO used for controlling the reset pin - -Example: -sensor@0 { - compatible = "holt,hi8435"; - reg = <0>; - gpios = <&gpio6 1 0>; - - spi-max-frequency = <1000000>; -}; diff --git a/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml b/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml new file mode 100644 index 000000000000..a35cf3876b86 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/holt,hi8435.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Holt Integrated Circuits HI-8435 SPI threshold detector + +maintainers: + - Vladimir Barinov + +description: | + Datasheet: http://www.holtic.com/documents/427-hi-8435_v-rev-lpdf.do + +properties: + compatible: + const: holt,hi8435 + + reg: + maxItems: 1 + + gpios: + description: + GPIO used for controlling the reset pin + + spi-max-frequency: true + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + threshold-detector@0 { + compatible = "holt,hi8435"; + reg = <0>; + gpios = <&gpio6 1 0>; + spi-max-frequency = <1000000>; + }; + }; +... From patchwork Wed Sep 9 17:59:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249541 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp57437ilk; Wed, 9 Sep 2020 11:06:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySL/bz9PbZpB0TnFr2NMVyl/+fBOf9+94rgBeWKB8gZyVHKxwCDnBHJM7dYA8nDQJ4Lua/ X-Received: by 2002:a05:6402:615:: with SMTP id n21mr5113280edv.59.1599674766865; Wed, 09 Sep 2020 11:06:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674766; cv=none; d=google.com; s=arc-20160816; b=W3H5utN4NZbC9JNU5bk90TC0c13NcuIsjkGsTIBWsVlfXFn18w0tFWbl1zQ33vKjO/ MxD00bULYdcspXeVdJZcP2Jgb1KIc5Uw/H9K1FtQF2AudiwtEq1CX8wOKO4wbHn+momz Cv7fpMIQYBztaJ6TISKgseBRV9km+jo9SUh9x0LggMnG1DRsKtuA+Wz9GszGEdhmhvJb plqSeAkWm9d4qmoz80hLcKXD2Vhy09wIKablOmfDOXKFZMObpZd9+gCP7ZiqJUyhtSkY mVC0/TWaygP37ZVNGwtKkumHlPFoPmDxi1yHOqkq9gwJ8A1OCXFFu2qr2WO5EVFJh/BO L3ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/ytZmWNd3Dqp0C+x1xaHSHC+OqTRiw8k04bBktXIJ0s=; b=jhzGzGMTE8s9H6t382/r3wnndnUABMZiS7OKb7Ij1v/pKJ2y6VhJX+fJUCGWezRkx9 37y+U2O+KgA/+Z8mZwYp55SA5Badd1xPKHk4+191grJ46mGv9sFNlccJf50I3Ohn9ZPW QGl32XQrXd5XKdTIvlgnMJx8EuQWjJ87zSiI77MT6f7SoEntt8+PgCpEPu5Dv1yzZkPI BitgxvJP1FmO7Ajio5JAeincN4arxMEu63L6GfUayEUl0uRQaba3MEyBsyE+Rd2QljpK XkUwfYhspXVKI8Ul4UIMVVWxiB1+iJ3WY722jigv/GX70YWprUB5HgVtDsGgAk+SnDeV 7/oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qrhv+HZ9; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g1si2010474ejz.637.2020.09.09.11.06.06; Wed, 09 Sep 2020 11:06:06 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qrhv+HZ9; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725975AbgIISGD (ORCPT + 6 others); Wed, 9 Sep 2020 14:06:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:59294 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729413AbgIISEa (ORCPT ); Wed, 9 Sep 2020 14:04:30 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2B583221ED; Wed, 9 Sep 2020 18:02:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674567; bh=XsA/KwLH20jYQsxFhotRa3aBcZsNa3G1wvA7EsbQ1gA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qrhv+HZ9n5TxZmfqOg1gIPr10/hgJzOR6XUqMYmwbkGmiDOuvdpDYbwe1AhtYzbPW F0qm3jzll1CXpm4+xZjHasKySaVETIKcziQ+J1ZZuWjLH/HZ7ZwqSkwU7ZqGEzXTL7 zbdpdczBw/9zNSd5V1RfxLf2/gZs/VxzLouWN4wE= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Martin Blumenstingl , Kevin Hilman , Neil Armstrong , Jerome Brunet Subject: [PATCH v2 18/20] dt-bindings:iio:adc:amlogic, meson-saradc yaml conversion Date: Wed, 9 Sep 2020 18:59:44 +0100 Message-Id: <20200909175946.395313-19-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron This binding is non trivial due to the range of different parts supported having several subtle quirks. Martin has helped clarify some of them. Note, I haven't restricted the amlogic,hhi-sysctrl to only be present on the relevant parts if nvmem stuff also is, but it would seem to be rather odd if it were otherwise. Perhaps we look to make this binding more restrictive at a later date. Signed-off-by: Jonathan Cameron Cc: Martin Blumenstingl Cc: Kevin Hilman Cc: Neil Armstrong Cc: Jerome Brunet --- .../bindings/iio/adc/amlogic,meson-saradc.txt | 48 ------ .../iio/adc/amlogic,meson-saradc.yaml | 149 ++++++++++++++++++ 2 files changed, 149 insertions(+), 48 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.txt b/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.txt deleted file mode 100644 index d57e9df25f4f..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.txt +++ /dev/null @@ -1,48 +0,0 @@ -* Amlogic Meson SAR (Successive Approximation Register) A/D converter - -Required properties: -- compatible: depending on the SoC this should be one of: - - "amlogic,meson8-saradc" for Meson8 - - "amlogic,meson8b-saradc" for Meson8b - - "amlogic,meson8m2-saradc" for Meson8m2 - - "amlogic,meson-gxbb-saradc" for GXBB - - "amlogic,meson-gxl-saradc" for GXL - - "amlogic,meson-gxm-saradc" for GXM - - "amlogic,meson-axg-saradc" for AXG - - "amlogic,meson-g12a-saradc" for AXG - along with the generic "amlogic,meson-saradc" -- reg: the physical base address and length of the registers -- interrupts: the interrupt indicating end of sampling -- clocks: phandle and clock identifier (see clock-names) -- clock-names: mandatory clocks: - - "clkin" for the reference clock (typically XTAL) - - "core" for the SAR ADC core clock - optional clocks: - - "adc_clk" for the ADC (sampling) clock - - "adc_sel" for the ADC (sampling) clock mux -- vref-supply: the regulator supply for the ADC reference voltage -- #io-channel-cells: must be 1, see ../iio-bindings.txt - -Optional properties: -- amlogic,hhi-sysctrl: phandle to the syscon which contains the 5th bit - of the TSC (temperature sensor coefficient) on - Meson8b and Meson8m2 (which used to calibrate the - temperature sensor) -- nvmem-cells: phandle to the temperature_calib eFuse cells -- nvmem-cell-names: if present (to enable the temperature sensor - calibration) this must contain "temperature_calib" - - -Example: - saradc: adc@8680 { - compatible = "amlogic,meson-gxl-saradc", "amlogic,meson-saradc"; - #io-channel-cells = <1>; - reg = <0x0 0x8680 0x0 0x34>; - interrupts = ; - clocks = <&xtal>, - <&clkc CLKID_SAR_ADC>, - <&clkc CLKID_SANA>, - <&clkc CLKID_SAR_ADC_CLK>, - <&clkc CLKID_SAR_ADC_SEL>; - clock-names = "clkin", "core", "sana", "adc_clk", "adc_sel"; - }; diff --git a/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.yaml b/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.yaml new file mode 100644 index 000000000000..6d94bf76900e --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.yaml @@ -0,0 +1,149 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/amlogic,meson-saradc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic Meson SAR (Successive Approximation Register) A/D converter + +maintainers: + - Martin Blumenstingl + +description: + Binding covers a range of ADCs found on amlogic meson SoCs. + +properties: + compatible: + oneOf: + - const: amlogic,meson-saradc + - items: + - enum: + - amlogic,meson8-saradc + - amlogic,meson8b-saradc + - amlogic,meson8m2-saradc + - amlogic,meson-gxbb-saradc + - amlogic,meson-gxl-saradc + - amlogic,meson-gxm-saradc + - amlogic,meson-axg-saradc + - amlogic,meson-g12a-saradc + - const: amlogic,meson-saradc + + reg: + maxItems: 1 + + interrupts: + description: Interrupt indicates end of sampling. + maxItems: 1 + + clocks: true + + clock-names: true + + vref-supply: true + + "#io-channel-cells": + const: 1 + + amlogic,hhi-sysctrl: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Syscon which contains the 5th bit of the TSC (temperature sensor + coefficient) on Meson8b and Meson8m2 (which used to calibrate the + temperature sensor) + + nvmem-cells: + description: phandle to the temperature_calib eFuse cells + + nvmem-cell-names: + const: temperature_calib + +allOf: + - if: + properties: + compatible: + contains: + enum: + - amlogic,meson8-saradc + - amlogic,meson8b-saradc + - amlogic,meson8m2-saradc + then: + properties: + nvmem-cells: true + nvmem-cell-names: true + clock-names: + items: + - const: clkin + - const: core + minItems: 2 + clocks: + minItems: 2 + else: + properties: + nvmem-cells: false + mvmem-cel-names: false + clock-names: + items: + - const: clkin + - const: core + - const: adc_clk + - const: adc_sel + minItems: 4 + clocks: + minItems: 4 + + - if: + properties: + compatible: + contains: + enum: + - amlogic,meson8b-saradc + - amlogic,meson8m2-saradc + then: + properties: + amlogic,hhi-sysctrl: true + else: + properties: + amlogic,hhi-sysctrl: false + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - "#io-channel-cells" + +additionalProperties: false + +examples: + - | + #include + #include + #include + soc { + #address-cells = <2>; + #size-cells = <2>; + adc@8680 { + compatible = "amlogic,meson-gxl-saradc", "amlogic,meson-saradc"; + #io-channel-cells = <1>; + reg = <0x0 0x8680 0x0 0x34>; + interrupts = ; + clocks = <&xtal>, + <&clkc CLKID_SAR_ADC>, + <&clkc CLKID_SAR_ADC_CLK>, + <&clkc CLKID_SAR_ADC_SEL>; + clock-names = "clkin", "core", "adc_clk", "adc_sel"; + }; + adc@9680 { + compatible = "amlogic,meson8b-saradc", "amlogic,meson-saradc"; + #io-channel-cells = <1>; + reg = <0x0 0x9680 0x0 0x34>; + interrupts = ; + clocks = <&xtal>, <&clkc CLKID_SAR_ADC>; + clock-names = "clkin", "core"; + nvmem-cells = <&tsens_caldata>; + nvmem-cell-names = "temperature_calib"; + amlogic,hhi-sysctrl = <&hhi>; + }; + }; +... From patchwork Wed Sep 9 17:59:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249538 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp57133ilk; Wed, 9 Sep 2020 11:05:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCwkF5Fej5JGh0OAiPeA69ln5TR2g23H5poEW9OM6Z3FiXA1368w6EgKPLyNKCAAyXkATT X-Received: by 2002:a17:906:934f:: with SMTP id p15mr4991280ejw.497.1599674745429; Wed, 09 Sep 2020 11:05:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674745; cv=none; d=google.com; s=arc-20160816; b=AfQhir+RyQY05ilmhFIQut3wCab1AJ0xwafhK6c3icOfW7Z7KaSjp530HLgGbP96y1 5OCAJB0uywFufvBFHWcm8rZaTONxhO9gNkWskH95MAL45nOEY4iP5iqNBoT8fJx3RrZg CaL0aAnx4JdIRXN2v8F/7ACVdAiKUI0Q3L66+I07hRzsQnbSfzhUOthHPdNTazfpRih9 HFnFT1cL40DeY3M42v7DynYSR2iVTbGPXEGDt6aE+H8ufucZtBvISyc1ZAHcOKu6jTBO J4dXS9JYa5yVDSkx+oHYcM6LJCw2KD2rnNQvxNC62Naaotf7P/B5PxcxY9nr9BHdKHLF K+Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RWZ764Dc0jbdRDKRwQPHlJDvXLQ/R4u6JXCXJv68JOQ=; b=h2CQHby8vqcyQLF+aaUzFBTlNZzDkTn8xE8ab8mCcx8oSFPrBvg9bywU+R/UYSY7V5 zJld5miMK98lATzHpbcLzhQ3X3BVzoOnQxLeyiGu7pVJbjeFbltkPVlIVMLhF65T8Jf6 yLNAK/95x1EJ5DLs62nnhsc/KH2qfcJOlQiMo6gfeWvM20rA+JDbEufec84XzrW2Bu41 kmWGLPl5oRGmE66LDFr4e4a4LeLJiPR1WanlTsgTAYJX2ZhlFe9guKKEX+wcSD//3Ayt 3w11d258jmekH2JBi6+dtBjipIFtmLgLjjRSWs15Od762oo7HJFD34jpryBQGfnZ/VK1 stQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="ABRS/D5U"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m3si1923698ejk.485.2020.09.09.11.05.45; Wed, 09 Sep 2020 11:05:45 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="ABRS/D5U"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726920AbgIISF2 (ORCPT + 6 others); Wed, 9 Sep 2020 14:05:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:60336 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729717AbgIISEa (ORCPT ); Wed, 9 Sep 2020 14:04:30 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 17B2A221EE; Wed, 9 Sep 2020 18:02:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674569; bh=/O5xMlBLoa1fQ2/9iy12YsyhTYvUp2gU+bzHqJg7V8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ABRS/D5Un37VX+NKCyrC9XXvtyXS5hROlQLoEOTpSMknd8DIN8JQX42P/8vDOlKHl GPF/NsokVNjhfRd7j6IPl6H8UTTn9Gk1Ex5ItiuFYdCdH9Rxf0LyOMBZ6gcqZrMbBL +Pk5PdzA9hOEnOV++4gvRWbOI0S4IYaTqqAjV2iE= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Haibo Chen , Shawn Guo , Sascha Hauer Subject: [PATCH v2 19/20] dt-bindings:iio:adc:fsl,imx7d-adc yaml conversion Date: Wed, 9 Sep 2020 18:59:45 +0100 Message-Id: <20200909175946.395313-20-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron A nice simple binding. Only real different from txt is that I dropped some descriptions where the naming of the parameter was self explanatory Signed-off-by: Jonathan Cameron Cc: Haibo Chen Cc: Shawn Guo Cc: Sascha Hauer --- .../bindings/iio/adc/fsl,imx7d-adc.yaml | 62 +++++++++++++++++++ .../devicetree/bindings/iio/adc/imx7d-adc.txt | 24 ------- 2 files changed, 62 insertions(+), 24 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml b/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml new file mode 100644 index 000000000000..dc5eacb38046 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/fsl,imx7d-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale ADC found on the imx7d SoC + +maintainers: + - Haibo Chen + +properties: + compatible: + const: fsl,imx7d-adc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + const: adc + + vref-supply: true + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - vref-supply + - "#io-channel-cells" + +additionalProperties: false + +examples: + - | + #include + #include + #include + soc { + #address-cells = <1>; + #size-cells = <1>; + adc@30610000 { + compatible = "fsl,imx7d-adc"; + reg = <0x30610000 0x10000>; + interrupts = ; + clocks = <&clks IMX7D_ADC_ROOT_CLK>; + clock-names = "adc"; + vref-supply = <®_vcc_3v3_mcu>; + #io-channel-cells = <1>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/adc/imx7d-adc.txt b/Documentation/devicetree/bindings/iio/adc/imx7d-adc.txt deleted file mode 100644 index f1f3a552459b..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/imx7d-adc.txt +++ /dev/null @@ -1,24 +0,0 @@ -Freescale imx7d ADC bindings - -The devicetree bindings are for the ADC driver written for -imx7d SoC. - -Required properties: -- compatible: Should be "fsl,imx7d-adc" -- reg: Offset and length of the register set for the ADC device -- interrupts: The interrupt number for the ADC device -- clocks: The root clock of the ADC controller -- clock-names: Must contain "adc", matching entry in the clocks property -- vref-supply: The regulator supply ADC reference voltage -- #io-channel-cells: Must be 1 as per ../iio-bindings.txt - -Example: -adc1: adc@30610000 { - compatible = "fsl,imx7d-adc"; - reg = <0x30610000 0x10000>; - interrupts = ; - clocks = <&clks IMX7D_ADC_ROOT_CLK>; - clock-names = "adc"; - vref-supply = <®_vcc_3v3_mcu>; - #io-channel-cells = <1>; -}; From patchwork Wed Sep 9 17:59:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249540 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp57368ilk; Wed, 9 Sep 2020 11:06:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQYHG2su2/ZCh6B/lu62gyjouJfVa6F2gHmrTWWeQt7ktWS/TkuLzKxw4E35rezMSmlQtk X-Received: by 2002:a17:906:4f8d:: with SMTP id o13mr4775561eju.20.1599674763054; Wed, 09 Sep 2020 11:06:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674763; cv=none; d=google.com; s=arc-20160816; b=UVFFIZSbrFfu1th8y33KBCv9OaLmMMdf34Y4M+JFfJxf5kftZH8imH2GPMwz+Vj5r/ I+AB76tQHqUX+dujH4Ge9bFh4EHfMGLK+b0MTRrRETzWQzubmgFxqAY/JRFo4i0lU0Ce B90IkqbgKJ6bOUS7KwwA4xpVLkG/1/QTJJ3QnaoYy4SQW4bGO6nX6wIwV8Y2/nbxNmUi UvUUd5hpyy4urYrdCsHMvQsBX3t+GsqM+5zyQ6pO3TJan670FxYH0k/X9P6IpWLxV2sJ uUiGj+TPhBAY5NwwzEejiNqIY+zlsgKBpgtgOQMckreQVbgbabguG911TvG2u1zdf8q3 eT2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=he9HxgsC7oBSgWg4ldOfGLklYYOvwE3bhcAKpb7nMUQ=; b=TXOU8EZcMxz5WLosatF353BlBYh9HELAdYds369QGyTunhx6lldSs7CU5JaMeM8aks HS7Xrpo9kjZkKGE1UhSenaQL4h47iK08oLBrxNtYF2JhIWw1o00paQ5rm3ChZRS4IkSy 16r+kOqukZONxVgs/HVOWGs7u9uNea34CqGs0SqmpLXsGJXYaT+F3s0P89U2go5JwkjE sokxeQ+GOAU8QFLnC6FQ7N40I4YPuRFc4ujNmsZo6bmeD61BVZX6fs+R+kJKHs2AQ0ks KxzQ+wJUHp9SUxjf8Ud0A3MsMODJCqqQij/ilYpkYJCtCwfCzJe0wrcUqulAwToKZwRc yctA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wEBWPEWp; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g1si2010474ejz.637.2020.09.09.11.06.02; Wed, 09 Sep 2020 11:06:03 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wEBWPEWp; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730021AbgIISF6 (ORCPT + 6 others); Wed, 9 Sep 2020 14:05:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:59332 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729692AbgIISEd (ORCPT ); Wed, 9 Sep 2020 14:04:33 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D1DC9221F0; Wed, 9 Sep 2020 18:02:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674571; bh=EUvGSJXR4DV422/EfdQe9chtpD8V1CVrITsxwOrFfEE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wEBWPEWpbnUsohxqr7tDQNtDJS0xZrqi7jd7S9JWmaUu6s6DCR7m44cWazoNoULTf YdmDMjEN88jqIt7di4XJoIy40h4LMJx8XvkHTYFvG1p1QOKlSd9aov19iC76cSseBm GTrLZGavHdnSJND1QKJ+tBdXMc/NqCQeKReM+r3M= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Markus Pargmann , Shawn Guo , Sascha Hauer Subject: [PATCH v2 20/20] dt-bindings:iio:adc:fsl,imx25-gcq yaml conversion Date: Wed, 9 Sep 2020 18:59:46 +0100 Message-Id: <20200909175946.395313-21-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron This binding has a few corners that would have been done different today but hopefully the yaml schema captures the constraints correctly. The child node names are not constrained hence the fairly open regexp. I've also documented the defaults for the two references that the driver seems to use and copied the value descriptions from the header because I think they should be in the dt-binding itself. This is part of a general effort to convert all the IIO bindings over to yaml Signed-off-by: Jonathan Cameron Cc: Markus Pargmann Cc: Shawn Guo Cc: Sascha Hauer --- .../bindings/iio/adc/fsl,imx25-gcq.txt | 57 -------- .../bindings/iio/adc/fsl,imx25-gcq.yaml | 129 ++++++++++++++++++ 2 files changed, 129 insertions(+), 57 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt b/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt deleted file mode 100644 index eebdcec3dab5..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt +++ /dev/null @@ -1,57 +0,0 @@ -Freescale i.MX25 ADC GCQ device - -This is a generic conversion queue device that can convert any of the -analog inputs using the ADC unit of the i.MX25. - -Required properties: - - compatible: Should be "fsl,imx25-gcq". - - reg: Should be the register range of the module. - - interrupts: Should be the interrupt number of the module. - Typically this is <1>. - - #address-cells: Should be <1> (setting for the subnodes) - - #size-cells: Should be <0> (setting for the subnodes) - -Optional properties: - - vref-ext-supply: The regulator supplying the ADC reference voltage. - Required when at least one subnode uses the this reference. - - vref-xp-supply: The regulator supplying the ADC reference voltage on pin XP. - Required when at least one subnode uses this reference. - - vref-yp-supply: The regulator supplying the ADC reference voltage on pin YP. - Required when at least one subnode uses this reference. - -Sub-nodes: -Optionally you can define subnodes which define the reference voltage -for the analog inputs. - -Required properties for subnodes: - - reg: Should be the number of the analog input. - 0: xp - 1: yp - 2: xn - 3: yn - 4: wiper - 5: inaux0 - 6: inaux1 - 7: inaux2 -Optional properties for subnodes: - - fsl,adc-refp: specifies the positive reference input as defined in - - - fsl,adc-refn: specifies the negative reference input as defined in - - -Example: - - adc: adc@50030800 { - compatible = "fsl,imx25-gcq"; - reg = <0x50030800 0x60>; - interrupt-parent = <&tscadc>; - interrupts = <1>; - #address-cells = <1>; - #size-cells = <0>; - - inaux@5 { - reg = <5>; - fsl,adc-refp = ; - fsl,adc-refn = ; - }; - }; diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.yaml b/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.yaml new file mode 100644 index 000000000000..6c4e3ef0862c --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.yaml @@ -0,0 +1,129 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/fsl,imx25-gcq.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale ADC GCQ device + +description: + This is a generic conversion queue device that can convert any of the + analog inputs using the ADC unit of the i.MX25. + +maintainers: + - Markus Pargmann + +properties: + compatible: + const: fsl,imx25-gcq + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + vref-ext-supply: + description: + The regulator supplying the ADC reference voltage. + Required when at least one subnode uses the this reference. + + vref-xp-supply: + description: + The regulator supplying the ADC reference voltage on pin XP. + Required when at least one subnode uses this reference. + + vref-yp-supply: + description: + The regulator supplying the ADC reference voltage on pin YP. + Required when at least one subnode uses this reference. + + "#io-channel-cells": + const: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +required: + - compatible + - reg + - interrupts + - "#address-cells" + - "#size-cells" + +patternProperties: + "[a-z][a-z0-9]+@[0-9a-f]+$": + type: object + description: + Child nodes used to define the reference voltages used for each channel + + properties: + reg: + description: | + Number of the analog input. + 0: xp + 1: yp + 2: xn + 3: yn + 4: wiper + 5: inaux0 + 6: inaux1 + 7: inaux2 + items: + - minimum: 0 + maximum: 7 + + fsl,adc-refp: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Specifies the positive reference input as defined in + + 0: YP voltage reference + 1: XP voltage reference + 2: External voltage reference + 3: Internal voltage reference (default) + minimum: 0 + maximum: 3 + + fsl,adc-refn: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Specifies the negative reference input as defined in + + 0: XN ground reference + 1: YN ground reference + 2: Internal ground reference + 3: External ground reference (default) + minimum: 0 + maximum: 3 + + required: + - reg + +additionalProperties: false + +examples: + - | + #include + soc { + #address-cells = <1>; + #size-cells = <1>; + adc@50030800 { + compatible = "fsl,imx25-gcq"; + reg = <0x50030800 0x60>; + interrupt-parent = <&tscadc>; + interrupts = <1>; + #address-cells = <1>; + #size-cells = <0>; + + inaux@5 { + reg = <5>; + fsl,adc-refp = ; + fsl,adc-refn = ; + }; + }; + }; +...