From patchwork Sat Sep 5 17:29: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: 249180 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420977ilg; Sat, 5 Sep 2020 10:33:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/QQBpeavJB1RNycYpuS6S78tz5G/8AJzO/oBsMq0b/hW5PDe/eVsFu6GM3IRhaXNu6D3B X-Received: by 2002:aa7:dc16:: with SMTP id b22mr14064970edu.252.1599327194018; Sat, 05 Sep 2020 10:33:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327194; cv=none; d=google.com; s=arc-20160816; b=aa576DhCaVAMRPnfksFhFlafJwcdIJalnIHvV5DcHIS0YjlaEfR8YUDIZCEG/XZeGX RGCbDhWAGriibTar1Ey/R9irXUf/4lz+HDAsd9Y3PbbcAiGSrFfF0afSsEM8DWH1vaPN b6fNVfVveSGF2i3TrSU1VMQD/oJRpaNRbX6VEtbP7wpV6JzqRC9TwKjYNIjuo7P17s/0 9/HO09TceF83zqh/FZRKiDyyGvf7KzikUf/SOzOpYZ3Rt6bX19vdujskIR9CZ5WM6GfF +OY4iQMAn9ay5FzrtAz0NQob5aJAMTYNOUuaokThVb9cIDVwpUYNjfSZkJsah9ddxiiG wDgg== 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=P3ntEwfoYsOzEjEzaOy4CQi1hcYUKU6+9lmWGAFVrlqsD4DJxH6/6PX1g8LW8+wxaZ zlNB1kIq3rYLU2GoZVcPNRcEq4x60Az/LbeSX7BN5tjGWLfYXr8PIXJTtg3TyE5VjboA zcI+k1S9n20iP4fH/nBWYzOZ6XCtEIFufv4+ujV5Qw/jMrp7J2P0xcmRoWNbhBEPK00f fVb9DJY4IIvxgZCiae2fheAQWwA07p/DVPfRT8EvhEH13vos2FjZQZ602gKekKutcj5m vu4ipmoN+Xigt33pud913cVROvy5OHfCg6BVNLvVhojsYH56ednoiqI389EZZD5bgcRL FT2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rJzTPQ9H; 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 u17si5687486ejk.29.2020.09.05.10.33.13; Sat, 05 Sep 2020 10:33:14 -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=rJzTPQ9H; 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 S1726568AbgIERcd (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:60182 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727875AbgIERc2 (ORCPT ); Sat, 5 Sep 2020 13:32: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 076572086A; Sat, 5 Sep 2020 17:32:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327147; bh=LEeUU+rrD5hpO7lkr4ZcwemfFSGeHmj8P3ohRK9wtLM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rJzTPQ9H4Eny+HO4mCvZEwnDo0ZwjmDf6nYmi68jLKpxGzTH8JId9F6NPoVbrZwRG LMKiEvTBj13Cpv7/m47acibbyzN5B+5Cgk8qLL1mt1dfrBKwTiGyTbIlmC6reSuR8X YTn5a7qHM9+l3IxuopA6cblzHhcgx6va+O7UcehI= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Fugang Duan , Shawn Guo , Sascha Hauer Subject: [PATCH 01/20] dt-bindings:iio:adc:fsl, vf610-adc conversion to yaml. Date: Sat, 5 Sep 2020 18:29:45 +0100 Message-Id: <20200905173004.216081-2-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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 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 Sat Sep 5 17:29: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: 249161 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420666ilg; Sat, 5 Sep 2020 10:32:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhBwpDMoe0hwOb3Rr5HCr/YSevTKCoJ+AaQZoKRKcuNwtEZCWzayvSLqmX2zyNc3UioVcR X-Received: by 2002:aa7:cf0e:: with SMTP id a14mr14597181edy.81.1599327162770; Sat, 05 Sep 2020 10:32:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327162; cv=none; d=google.com; s=arc-20160816; b=F4FK/wR5RB3nxTEMeaxgAjn1NGSrE35njcaVcLbOe/VXqWSA6vKW5zbrkVQEj8uC2B QvT0FWDyHj0uiEa7pt39Y0sj9Jw/6miylNJd2XRKHn4x77u0GjRvrKVQIIoT90UaTCIg nIdEivfixm7QrYmE2M4mjNjnjI8oEzxL0z1nH6Zx1rMlS0u4UzTp8Pz05P58Wl3Nvgn5 l47sdkGlNwcRLyrK69VkoU+YIimbJKX5pxxafocqx9MY+kPdoV6BpxSrQWSvIuCswkH+ eigbLd3xjoEfxhgOqR4wLgteskaXtMsE64T7HfiaoJxt0zxB6wilEnOyYSe89oVPwkIb 79WQ== 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=UtsEeBMZ/76u1KiESo6nXWbN/20yqbbQGzirKUsBFNY=; b=yoR8UU+cVG6Ms5pwrovD10hWLFCdoRor9wqzu1f8I0LVZoWwukPVsWb9caPTUin9od /7Myfq4wMQa33cukxoLn09sZ/gEnwbKKCol9y+TIn5e6vuz2tfvjTp5RVJQTVdbQMw+z 5xF3KfwSHPCOOUja3A6VdIhI1Zz3XmRrtprFRZjuCNDQFUT86EHAWih7A4DL13ObxQQR zMmBMDAQxfKGVgLTHIPIP9NKudr/Tr5FXjQuK6u3yujYQoy82ltsLbXdfwu9P+4VaRlq ubHJXRKerbaYuW8dbXn98UoGL/QTFKxmlY0GVp87S0UZQnWSSrKsX0A3ONJXi3SDr1sg oiWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Kj1MdPJQ; 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 u17si5687486ejk.29.2020.09.05.10.32.42; Sat, 05 Sep 2020 10:32: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=Kj1MdPJQ; 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 S1728103AbgIERci (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:60202 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728042AbgIERc3 (ORCPT ); Sat, 5 Sep 2020 13:32: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 BD406208DB; Sat, 5 Sep 2020 17:32:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327148; bh=InoOPER+dfdK3R3/ShfHnrpVuku/J1rJIDnlIxp0e60=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kj1MdPJQcZxTjbbi8FQUUid/I/SpkKZg1jt/ucLSNsE8WLXoBF+Ux8vmaF2vts9a3 FLfxLwd/l01tqMdIFOuI2bnjMErMfv6KqJhJPPNWji+hcdo1rICd09/S98YfwB11Ne ICCvmYStydYWOTrDS0byhATbH4Knuu34Va2uQGYs= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Sebastian Reichel Subject: [PATCH 02/20] dt-bindings:iio:adc:ti,twl4030-madc yaml conversion Date: Sat, 5 Sep 2020 18:29:46 +0100 Message-Id: <20200905173004.216081-3-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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 Cc: 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 Acked-by: Sebastian Reichel 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 Sat Sep 5 17:29:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249178 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420957ilg; Sat, 5 Sep 2020 10:33:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRo9/ZD+Piu2VOhq9KXdIxcjrs3PYSUjA8QyAHonAzbptVk75enVpfZl1eaymG6wCEETyX X-Received: by 2002:a50:9fe6:: with SMTP id c93mr14343092edf.151.1599327191688; Sat, 05 Sep 2020 10:33:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327191; cv=none; d=google.com; s=arc-20160816; b=JirLvedhwQd3MA4x3fbFQQ+lk9srGHBNuSvTkebRU065CcCzbHVVIRFzhRRM8VxyZ+ GTd/Xok1duG7WmY9xJN4lLgoMZt2s4z18VJ7pCGG29bA8aSoDy92Rc1GWEEm3BADBX+e XdMQJxrN3BPhnoM7RxZ/oBwaDGdh1KwDxJoHZSOx3mXqZdlDBIQOopfqkd3WF0BtXeYP b+n6eVM81+T5BHAJr6VnOIgLkzG06mEw89Jw9MLwak055j889Phd5DE2z3ngMmrvz5Ig mblzn/bsQX3L+VEFEFOBi5Mo7rA22iO5/sH/xMDBfW4oGZ2n49pRB95FlYkj1LCmaiLf tJWg== 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=g8jZtrzoZDPBTRssOc1W9BlGjQFeHBRJWI1K6CPxI6OlQJRh1Dg2ZdeS0eQAc1N6DH L35MDg2yRAQiFEgy8ItDHDPekhVGk8H+GgioT1LbY4VJXvzihh9BdPn1cffZEB0NMZ7y n4NYdL7fWarvDt79WB+Nr9x8pHWrnchUVIQnWP0zK72RLnckK/k3W0HzREvpkrabQupw JEiQTBM/SW/BrOJZF7UCempcHUhCP4BnunRzpBmR2UxBEcfoDeLqQtFWnDEk9GGkbo3v T8uu4/DLVWN4dvG3n2jEr27e2mtey70xEtVaNMYb6MEX8Md+ZyAw9Myp/xF9no2avK5m 7rQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mvE8bDGV; 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 u17si5687486ejk.29.2020.09.05.10.33.11; Sat, 05 Sep 2020 10:33: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=mvE8bDGV; 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 S1728390AbgIERcg (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:60208 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728103AbgIERcb (ORCPT ); Sat, 5 Sep 2020 13:32:31 -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 2C61F2098B; Sat, 5 Sep 2020 17:32:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327150; bh=FdK1l3fo6UgGdK6dGnHyf2ZFaNBIdLfR1npsQ9CW2AY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mvE8bDGVDBmqFZXu3j7udNuvaOBbL7oKUFk6V5Ro+z3R5ASA8rg4P8nYox60vE3JH 9Kg6QxyHXjrX877Y9mz5xxfXHwBKEMwdSShrOg4FCXKOiNEelMWH1lM4F09GyphlQk DpjV9Enq6sc9rG8CDyeSZmr+sABUQxUEMAFfjIwM= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Stefan Agner Subject: [PATCH 03/20] dt-bindings:iio:adc:st,stmpe-adc yaml conversion Date: Sat, 5 Sep 2020 18:29:47 +0100 Message-Id: <20200905173004.216081-4-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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 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 Sat Sep 5 17:29:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249162 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420671ilg; Sat, 5 Sep 2020 10:32:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaUAPMTN3cc7mD+49kF7niEelRF5V5xKvQ0ZSY9KngAiO4d+xwqzXMZsNFiFb8/6Y0UbY6 X-Received: by 2002:a50:fa94:: with SMTP id w20mr13980413edr.206.1599327163406; Sat, 05 Sep 2020 10:32:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327163; cv=none; d=google.com; s=arc-20160816; b=a3gSVJCN2sTjTzO4LZhp8aqrJ0rDFL5mZkC3giyDgM/Yiy3pf0CAD+IYWA1A6vqiqB 5czASZH7bNujsUFfGPX+14CPt/BQ7E4qZ0Jd9Mkno9XQ1WCM1QtSQEZ2C1oRGRz8kFZz GQVkgP5hS1fI9FmBZxjL1FssBZwpLaO6vnIpSyVXfPtR17hOWZYzlN2rWvphzWvUz6Ln mpYYN35cz6nb3raDd7D5p/+e6pVqkLa56Cder58DPlX+fgDuRvWjhMvBMoXhii6n+LME jj3UBTDjT5q1Tak6scL14ST5kRecrGcZTFPwg4CxWyA2/nG78JEl7t9ZEJhKMZEp3gig LT7Q== 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=sySKnJXuJzZh6fqJQgW07F9HAE+HHPKr/6ViXvwnFhnD50LapruAzKBOFLaAMbBnv0 uYZoE9/jhO+tF+Xt52BjhgENrZxl+K/NZjUQi+vQ2EQQdU7qENpf8Dg8U8GoTooocY8N Fl+iN9Ld6vW1EbccweDXqVUb08iXxGoO9CvZUQHG8EaAlrWA349iKvfyVimUArQlMOJl YEW11LjFqu9ZcU+3Kgdv5ZdOCP7JaSbLF4N2g15IVtoy3rsgkQPLFMjTazO+BNCQ53wz rFUOaFf+sixL+q8Vx0aHYJPx/h4cgtGBdq7wv4t/FVG6fdcCxrVhr8K2YKUg0KU9wn+7 KPVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XM6m8Ptz; 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 u17si5687486ejk.29.2020.09.05.10.32.43; Sat, 05 Sep 2020 10:32:43 -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=XM6m8Ptz; 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 S1728400AbgIERcj (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:60218 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728257AbgIERcc (ORCPT ); Sat, 5 Sep 2020 13:32: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 A05C220C09; Sat, 5 Sep 2020 17:32:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327152; bh=KoEd7JhadoV/WuAlOl/OSAE8z4BEPt6pY8SVVSs0NxU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XM6m8PtzYabdvgh2YrS0AApxsvkrh6BzaFoGU1cWWKBJWqf0wFL+DJ+aZcRbzUed7 uEiPooVPhnN5oSPmlT3UaosyjzchnQb4pUNvei8ekwC9VSy+3l+NgHU9tFd4CY9Fmh Dt6QLTmKL0HmOnnCSlgYWfCdgXvl0MkEzPcPlk00= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Rick Altherr , Joel Stanley , Andrew Jeffery Subject: [PATCH 04/20] dt-bindings:iio:adc: aspeed,ast2400 yaml conversion Date: Sat, 5 Sep 2020 18:29:48 +0100 Message-Id: <20200905173004.216081-5-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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 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 Sat Sep 5 17:29:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249179 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420970ilg; Sat, 5 Sep 2020 10:33:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEJ6NiJEOjrOaGbxpAHXSdObD0apTl4wPQV9X2KjWKHVcvd56FVEUqrJzeXe1PX2TSbYJy X-Received: by 2002:a17:907:40c1:: with SMTP id nv1mr6613601ejb.318.1599327193630; Sat, 05 Sep 2020 10:33:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327193; cv=none; d=google.com; s=arc-20160816; b=bUNt2gL4fcJmGcmDVotUp5ZlSEFj7kogl6sWONVx3c+h17RtVgGCZbsPMOFmDVQydQ mQWZ/lTIA0kBuaqrM8i97SPdZIydqPE4qHYyyirV8fbjk8M8INpxb6Ot3+GfrYVg7OZg zHLyN0T21bJO4Oii+OXPrYMgjm7kWdjhE9Si5UMxQI90UXEy5nV28HMhdHXSlAxEU1wZ uWwVIjxtTU1juIKXhbLxRX/RrU+8TCla4AvwFBC96jAgmpA654o01Ft+f3+jN+B25YQS NJ6/rydKSKPXhVb8CVHxJHrJbri0jOFpyIriB0yuJw44W38SEXSauKcp3CiVt/WlD69O VUiQ== 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=OQJfqhlCL/Oi78vZv2d9I8ZP7RH42sunmTudNgPGa5w=; b=gUWnNgxskyxtQbRZllvhiI0aWZaZVFgUhnMMVNd8GJ9l/SwUJYlaB/+rBIIN2hUXIV s/Y963bwzLeRNlADHDFsI58gF+iSRAOLo56N7NJ1LahI7k0NdqO+2mc7LIjEnphU57/N 9uhNF+oYzFxEEWyyy4+EtB/+kW5T1+gALFuFfcC/Pu8QYvBKq5X2a8kq+bR0N83hjIXt BnKr/p2tguPETU8mqf1VTjSLwVJet8kjeXgdkT2BW/27pxnFv+NfhBF38cw1eM9cR92R 11Bh39hcy/pGWfCd+xsaKmccm4rJdXzgYf+egPO4hVPRWlTGQDKdCZ+KEEy7U6G34yJX hCnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YwHFc6O4; 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 u17si5687486ejk.29.2020.09.05.10.33.13; Sat, 05 Sep 2020 10:33:13 -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=YwHFc6O4; 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 S1728470AbgIERdK (ORCPT + 6 others); Sat, 5 Sep 2020 13:33:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:60230 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728376AbgIERce (ORCPT ); Sat, 5 Sep 2020 13:32: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 5702C208FE; Sat, 5 Sep 2020 17:32:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327153; bh=dj7sY8XR4e2NJSncNf247eOtg7Oz4MBwoP7y68zXUEM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YwHFc6O4rgNmkW7IF5Jn+2eZqlt7LO4PpniTqIgKBk78wAv76EsPj7QpmdvJ8ssYp M3n1HdWxLLKMCxuJjx0My3m/xXF+1U+HDNC49asauLg53nEo3Tj1mywWdzuIgFj7up eMYZTJgGNKZshwo2GhYWd8rBWgWjr1ZKeCxrCZtw= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Antoine Tenart Subject: [PATCH 05/20] dt-bindings:iio:adc:marvell, berlin2-adc yaml conversion Date: Sat, 5 Sep 2020 18:29:49 +0100 Message-Id: <20200905173004.216081-6-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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 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..496cddbe96ca --- /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,belin2-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Berlin 2 Analog to Digital Convertor (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 Sat Sep 5 17:29:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249163 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420684ilg; Sat, 5 Sep 2020 10:32:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJze9/aQ1BOiYDpO1yyWNiSD8H2b4uhSBQR3XHnj/URB/uKQvFfCp7/wHhj+uvksnWpO3w9V X-Received: by 2002:aa7:dc18:: with SMTP id b24mr14721009edu.224.1599327164690; Sat, 05 Sep 2020 10:32:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327164; cv=none; d=google.com; s=arc-20160816; b=OBrb6K0Qm3KFO5/Gp+YuUjRr505cGtClrNFqYdinVrlAv/8+GkHn8/fFJz4lo5IGMD 90X0+TwvAzcGO+AQvlJkvvey/nuXgKX19LAIc3VUKfEtxOjaKPyu+By6+dS+8AZq+mUd Qd+A8ExArIBB7BlNV9nvfaLWnW7zQJeY8dl+aQP7HUHmV/8cauYKFSG3wgsKmUlDBT65 h1n6ur/uYSqYIXqUfuZNpph6hChsHbooKf3AAr11xP+THeBAV3TWN9LLlwOfhwGOsuqK XoRkmT5Pr7Oy8g7iP/2IK52KDWr3JPBoULaCWj2ZhQLnxR7T0vnSuTg23/FjQR0U8gRi RR3w== 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=dt6iZR+BZwwNCZE69yRQWXAroawG42QLP/Z+kK1S9BI=; b=T2FJqXol4hpTxApXw3EKCyTnMuTl/CpOhX/8upabscqlp0mnE+nyXsVxk4K3oFY8O/ cidbOBELhU6b+l8xthjhnXeesctpcPhj84Jpg2F9IYCi2eWsLI23mZRvRi7hPF4JKsFw 23YBacJXHQx3WW7WEKANqk+OO62/S3XFViyuMsu51vJg9nVLUfNVx3YAsopmZLUEcy+w vHYe2iIu2aQFALC9UB/BuPk4HaYTIEs2Lv5/jXmyt8rlYMv+YCtIKBhXXsJM2nXaJxhx KwJp1S2QyEljefPKbSuXGZeSbr4kjaZi3BCZucFs83oSXqN3z/ibtCv2PHc/SRJY5eqw fm4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GufMpEaY; 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 u17si5687486ejk.29.2020.09.05.10.32.44; Sat, 05 Sep 2020 10:32: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=GufMpEaY; 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 S1728257AbgIERck (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:60238 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728387AbgIERcg (ORCPT ); Sat, 5 Sep 2020 13:32:36 -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 C22A5208C7; Sat, 5 Sep 2020 17:32:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327155; bh=a8ctN4vLi4L4BOmXkKHNhXkcj6q2WOTNv5GAPASrTe4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GufMpEaYIE5QZmoLM/aBo0l/8Bxaeo8TlJKHQnmVbrYNmSZtnfNnAZAO+BbnaxQu5 MXhQ7LCcgQeDIYKjJPASPL9yG5Bb3y+sQVhOZ3eJljqeHZDQ+x6jB/mfpnyuIwwZIy wjne1IHhk7UTYGGKIjBJNSuJUZnl+lw7hHqkxyYs= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Baolin Wang , Orson Zhai , Chunyan Zhang Subject: [PATCH 06/20] dt-bindings:iio:adc:sprd,sc2720-adc yaml conversion. Date: Sat, 5 Sep 2020 18:29:50 +0100 Message-Id: <20200905173004.216081-7-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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 Cc: Baolin Wang Cc: Orson Zhai 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 Acked-by: Orson Zhai 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..57df6439dd9d --- /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 Sat Sep 5 17:29:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249166 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420740ilg; Sat, 5 Sep 2020 10:32:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxy+X8FLAXce8j81Ak4ozjI0l/JhXM7upOpv+4OzvsZcWFKmxTOSjbY2TKJjIh9RucEN8MZ X-Received: by 2002:a17:906:a141:: with SMTP id bu1mr13315999ejb.303.1599327168519; Sat, 05 Sep 2020 10:32:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327168; cv=none; d=google.com; s=arc-20160816; b=gIR2aDhjgXOU+rMnJ9hQZlKRVZ95yUthObf9cQ3SbNxjRLfEQUvLUBOx0fRqnIuAm8 mH7TNjs6O71h6eU08IlDYGb6H6qDzY2Cw3/RuDwr+RBUvgW4O4KT0YCkA49J+njGfljS 8qDcn257fonVxXFD6Uk7fkpHcyRoUGy0EEtDzFNXhprS06ruOdezs5Jwo+l0JSQORkpD bhqUywkUU3WQOeYTe/bh3kJFXfg1T+rVV2Xn/QFfYGnknCvp4CXyjXz7QgDdm0WbVQuG 5gCJgbchA5xRY1EJcRaiPwtdZLtAD2HBqE5uHxwl5tbh6uQqmqUxPGX85M1yFFajTxjM AcAA== 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=OGeK8oI82WGGt8MTttN5Y2zat78nWFEwsIpwqhX/hCf2Az464LDYZ58yP2gDKuHftL SFrM7pS0M5uVmpdiUBhX6d+CsSoP4oijGe+vF3N84oLjXDPh9cOkCAVprS9ftmH0Fg36 sv2xx9vOTxj9GeO4+UO1Yg7sYa8eM0Y1G+o6A9xH9MZZxBqTn9EVn2K7GV2cfeWzCNRY GoLAbzyOIKrQeuClVl7TTEtwBFklwr7X2OjSl/2Gbl/hFlUc7uPdvM3Uw4rHmct0+sS8 ojfQdLYgQVZH/w0Zsv8O9m9gOszDZD4Bzp/NO37o6QgCsJmUQnSrF7A4gPtTeurVN/4H rfUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=n6ht+dl7; 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 u17si5687486ejk.29.2020.09.05.10.32.48; Sat, 05 Sep 2020 10:32:48 -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=n6ht+dl7; 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 S1728387AbgIERco (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:60288 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728393AbgIERch (ORCPT ); Sat, 5 Sep 2020 13:32: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 80280208DB; Sat, 5 Sep 2020 17:32:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327156; bh=4WGAK8AbbHJfYhD9ddvP6Zim7kuzGr7UghvSwQy6YRo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n6ht+dl7eb8KORmudM5jKs+Bl2/heHXE20ZZwYcba7EAyV9JwWg7ZqSYtPHzhNuuI +YHqLTKf6Ia+pL46Ml/SSh9xPN6SEMLzFvEsC9OS9lLeFxVscUzY4wvw/VjhHB+609 TZtWGykiG1aVGxfHsS+ZVIKXYwE5DW6iPlPj6jvA= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Alexandre Belloni , Maxime Ripard Subject: [PATCH 07/20] dt-bindings:iio:adc:nuvoton,nau7802 yaml conversion Date: Sat, 5 Sep 2020 18:29:51 +0100 Message-Id: <20200905173004.216081-8-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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 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 Sat Sep 5 17:29:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249164 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420694ilg; Sat, 5 Sep 2020 10:32:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFTVBPQHu+IGynLDo1yu5rq26CMUgEmqDk4Fex8O3JX6UvXTy4iLVHb12ot54r3vmyuQuD X-Received: by 2002:aa7:dd11:: with SMTP id i17mr13945466edv.170.1599327165357; Sat, 05 Sep 2020 10:32:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327165; cv=none; d=google.com; s=arc-20160816; b=kZdcu1HP2dRd6J/0kLkf/Jf98LwH4rqa/IADNUvm1FRiHcvwBtjFzzAI6VU1XDFWD3 +U6sVfRIlsgnJGRw1KfoPVxKBYIUD7LDEQlxtzIExnih4RfwehyJl9ixMD9wCSDyegIG KKqoJqD1bVKieZFCHICTaDqpiQ0SyEkZbss8hkEHCl0hhd2f55ojNJAmEBwtzEkBag3a P/m6GZtJvk2VNsAjYHyqAu60OfrB+lwU3GrPSv5seWla4Hmj0BMicxxNkc0iqE169uhX IqCoghKaP9e8ZjtzEGa/iq03RsYDID57VGejhcHq0ybDhQP+kDNKKlBEBBv+cX8KBqAa HnTw== 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=jGOnjN2Sy5ZrE7VoxBIKMeTr36ZbSVTPRcDaKQVvvoM=; b=Q8uA3hQWwOK1J+T/x5LiZfrQtktPu70mrTsVPZ3wa3F7vRdsDHq9Bj+7mhi5XWaExU 4WX29wU6V2DjaTHEXyZGhuA1lufysAu5snH20rCpSES1DlTAkmM+u2YXeh6sG8c/j30r CL9Vd674Jspy/dNi09sHAMpvFX62hp4vbcx5m897PEe7Mxk+JodsqUtZOJY9CLkiYiMy 6cJdBKNzAd+Dw5QejAvKz7q1j+CL0C6fU3HvRKKVKO0Vac8jk1CnsxeIw812keQGAcNU N7proTUxYIiHKtA8ogUkvVL6oGmL3ZzBKMgRPeivauDHv5G0quJG3yYagIaqmHNAiW+T AKpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BFRor7VH; 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 u17si5687486ejk.29.2020.09.05.10.32.45; Sat, 05 Sep 2020 10:32: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=BFRor7VH; 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 S1728442AbgIERcm (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:60298 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727875AbgIERci (ORCPT ); Sat, 5 Sep 2020 13:32:38 -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 1373420760; Sat, 5 Sep 2020 17:32:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327158; bh=yVzMrl68x91g4MIaNHgNpaL4VqCsGXD9sO86U7mJ/wY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BFRor7VH2/K61atCVGhCPrdsE7kmjg6CCeB7T1oD4TxG2N/ESCiPfnN6lgCAJKfhv RDd5ou0JPLlJWhl67YlTH+9aEoAluk8vRy/2Q9Z3KJ5/pnGWHjj8lkTojBigBXdNQC xcpz0es0ikJ73hG6b+Z/O7ajeKaQnGB+tqHgHPJ4= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Tomer Maimon Subject: [PATCH 08/20] dt-bindings:iio:adc:nuvoton, npcm750-adc yaml conversion Date: Sat, 5 Sep 2020 18:29:52 +0100 Message-Id: <20200905173004.216081-9-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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 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..59382e2805d1 --- /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 Sat Sep 5 17:29:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249177 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420945ilg; Sat, 5 Sep 2020 10:33:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFYV6oMMae/8UYUjPtV7YeWu4goT//6heL+W3HthlMy4TSitiAh7D4Ty9YfLm87icQqP8t X-Received: by 2002:aa7:ce15:: with SMTP id d21mr14317490edv.284.1599327190614; Sat, 05 Sep 2020 10:33:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327190; cv=none; d=google.com; s=arc-20160816; b=GC8Pys8bIiwcz+xlrugBwG0XEp6D/t/J2VMCSFOsoorlBvWgFBEZQVimv5OtaiaiKB 6DK6pOajelFMRjRBU9jUhgp2Pet6MzHPDy9AF5a8vkPr1iHKpuPOuji1iloVcRSmnenV oCTlHUOAW9KSWzgIeMO14SVl2+8nrNLvaU5PQ6z2yMyaR/F7MGf/0NN++TNhhQ0odP4w HcVQHqR2QNkS8g28xGfGvzt4QJcNQg22iXLv8bfjIFrgaUL+19WtW7XMn5gKXT9x6+4Y O5+X1ltnUpVPj9vV4iS34FVfrm55vrkSER9CA/WWDpsblm9ANLF7zk+5nFG0pWToBZu1 Pkkg== 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=dQ+UiT3z2h013iA/FD1wMEOGKnyzv/7SUA44cyRR7g+oXpmNYu7EkzP0yxh5ob+7+K lx55GsmIBADK8PEsbKOcgqY+t3HyQk4kQ1T/6J0zhb6bYygjI+ZLN2YFtG+1OWMpp+pe sZ98hlC7N/IqiljDibER2ifv4EsbS+y2cE1ftYZxRT7MvmFNSMrsQhfJAfqWHt4b8Wuq iny0nznBoP0/FF6ljGC7z+ZP015FyJfrfi3LT11cpf7vi9s4Ptb5wzXxo0XqsK3rRKWH KYYLkfpaYglA56XZUvw/W72vC89JzxKThyCVrtiYBpnlgG3SA86cY2QQ87TFejL7bfh9 5nng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ywELv7ss; 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 u17si5687486ejk.29.2020.09.05.10.33.10; Sat, 05 Sep 2020 10:33:10 -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=ywELv7ss; 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 S1728423AbgIERcm (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:60288 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728405AbgIERcj (ORCPT ); Sat, 5 Sep 2020 13:32:39 -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 80B4C20C09; Sat, 5 Sep 2020 17:32:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327159; bh=32NlETNlgjAzx6DtnmnvP+RC6sufGpUZINDy8r4BguE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ywELv7ssqtTRdsQoPAtm7tnbt507S+K9Ot3Yi7+RUHIrRZGR4i8iYok1nNOH60zjJ EG1J799+LVTNoWNvy15EN6rXjcaBI1dfGIdW5/vHIJj19QY5DBPo4iSrE4fXBideFj NUzN/r67tgSPhK0GlWIIB+VQskbk3oFm+C41pkXw= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Joachim Eastwood Subject: [PATCH 09/20] dt-bindings:iio:adc:nxp,lpc1850-adc yaml conversion Date: Sat, 5 Sep 2020 18:29:53 +0100 Message-Id: <20200905173004.216081-10-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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 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 Sat Sep 5 17:29:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249165 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420707ilg; Sat, 5 Sep 2020 10:32:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxVbPYY0ubEA/SucjfGlKHAijoY6UV2GOrB2UysEeFFwDL7jaL19bLt1yXeJmw1v20TqWe X-Received: by 2002:aa7:dc18:: with SMTP id b24mr14721103edu.224.1599327166209; Sat, 05 Sep 2020 10:32:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327166; cv=none; d=google.com; s=arc-20160816; b=y2FOe9Eq8gC/7//GJgcJ9wUg75k5JqudRmz0M9IK8G1kBWFI+HjzQYd1qBaW3S8Nu6 hMxYBGw4fFdEuw0m0m0PVCtkcfbBTOqF5EySEdy3NmeFjai9IOWahqQmn1o++zm3eFTY JG+Nx7W3vqzDdyVQg2/ICdhQKQGSgLbN/b+L3PmbbRBS4qb+r9XYfmL24FyqpqA8Wxp8 zV0hnn8vzEHY2fMAB6EA5wRpLAqlBkQQ8hcIyLL5CXtBDRIHBUudy5aTRnvQjr72Ym2k KDA2gNAZj0gaZ+Q2UVzINDm4XKIApV5YzJRAtD/rscHTPpuWTcXd8Ib3IGNyVNIUpplF EWjw== 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=xF8KuriA0DdKdki5nKltrIYMD79BMz+7ZJiIuD1/BQaK6YXDIIW99l/m5ss4lxuPd5 pIWytFTAFlsgQgK93azNAX3I2LLUA7RuUmVlIHgYdwOSYa6ApLys/iQfpWklN4VEL5Vv cMAQrBCUXlYPUoToQMlWIDxtxN86MKbX++QB6kIcctdbFEMJKii3UM5aUU7++77eTeW0 nz/ZtLzskX4xUKYvq3cn3nIJAokSxZ+lx0TQp+oga2EtV2GNWFXNSBbfN56g/dem6nN/ 3vUxu8Dba5WsVuOlzAI4Q8zIWGU5bQdLXX1+sCk1P71jJvao6szJVvBPnW42oGq6zCap LA0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sgicZQzF; 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 u17si5687486ejk.29.2020.09.05.10.32.45; Sat, 05 Sep 2020 10:32:46 -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=sgicZQzF; 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 S1728443AbgIERcn (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:60342 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728387AbgIERcl (ORCPT ); Sat, 5 Sep 2020 13:32:41 -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 E2414208FE; Sat, 5 Sep 2020 17:32:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327160; bh=E38bXaztWbprGXLGB3ZptLRYv4BC3A7eIgpDTMmcQ14=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sgicZQzFKsBeyZiSxeRpzebkXK4FZo5JwMq5/hIgD8gYnYX8OPA/Z5/VTme3ZtHrv j+GGu1QEIWjshH6yIvgWU1ha+QHgOOhgk+L7mH3RFkfRDpnt416aZLtWlNhPwsqSZk U4YYb646wWoyMSn3tydO5HQnHwQ7B/rWMbZBFCUM= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Gregory Clement Subject: [PATCH 10/20] dt-bindings:iio:adc:lpc3220-adc yaml conversion Date: Sat, 5 Sep 2020 18:29:54 +0100 Message-Id: <20200905173004.216081-11-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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 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 Sat Sep 5 17:29:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249167 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420759ilg; Sat, 5 Sep 2020 10:32:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvgib8yh8lkkFWABqdhQS+jVIlVDt3cZb5N7YB9y+1qRSlhRqmARljwyM1Fd3xSCfDH3CG X-Received: by 2002:a17:906:5a83:: with SMTP id l3mr14037730ejq.14.1599327171064; Sat, 05 Sep 2020 10:32:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327171; cv=none; d=google.com; s=arc-20160816; b=XjZNyjInYdBGtSulu/l1im5rXsRZ40jQ9bRhpvXtI9+pV/1aqv1QrmwkbxCP8b0NHK YEI74Umb3Yr++I1V/NKiKNhaN9pOmjIjJNckgSfRfxd+mRw/OccfLlM/XbJyYUTlk7Tp SGi1YMZ3Nrr7O4oULfJhqQGJZt7LfKQHDfQwZu6yt3p3RnN25z+iksvrsCY3mmL+Cn+S YfhtFMkGv6u4FqxjW84TbbgCOX7yYwlBRkK8CFtThedAjkD2EOkJoGTmSEiHOdD5qKtC /9kbuQzqlch3m2JsA4Uzqelda0400kRwiuUd7Fre3mBkpjCzYA0ZOoYdckgMPWXbIkK8 pfkQ== 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=nKoUx1LkbY4LsBZyXlrVXaRXhRqil2dIVwqnr6BCA9ny0qULa8QD0p5+fqVAizHYsS uEMqcp/z0O8M0C4Z9Z4+1Y5D0fgjgyD5TWZhufXLn6aKRKl9Iq0NBPJ7kgxY8SlZRLxp UkS8pYv6cHwc1mS6TRnIRGQ38n8xvRrEDbPgpluTNb9xzY80TohMxMZlPEVhw8u+8YZ8 i8ajEM1SeL3KOSHT8n6RCt1PXFKAfy2RoZ8dBUjitOFdXB9vfW9X8bVvljQZG5mjukMz SZBeu+uSL6GxYEMniKfpnL6wLcUMXQTJPt3wSsg86vfEl1GrXO1HbC/i4q2g4eZtu9Nt wRGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=O+z0XvlW; 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 u17si5687486ejk.29.2020.09.05.10.32.50; Sat, 05 Sep 2020 10:32:51 -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=O+z0XvlW; 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 S1728458AbgIERcp (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:60390 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728426AbgIERcn (ORCPT ); Sat, 5 Sep 2020 13:32:43 -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 513512098B; Sat, 5 Sep 2020 17:32:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327162; bh=XpngdjpF08FQex0xcA2ugQ5BaeqEMiH6ImmMdQcJOM8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O+z0XvlWfcptQ4ypMjyQ13xcsk+UvRXXZvMFoPgZiBtecrtRH9ql8NvcX0M593mvS YzPPAGR3K3j/0G5KSMtbrzvuoWGNPASEXPY+zyKH90Xp4vRWDMy3MXIWmirAd12wzL U7MrFh2xlHQ4226rGfeoLz/xag8ag0UEmUMy2xDM= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Tony Lindgren Subject: [PATCH 11/20] dt-bindings:iio:adc:motorola, cpcap-adc yaml conversion Date: Sat, 5 Sep 2020 18:29:55 +0100 Message-Id: <20200905173004.216081-12-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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 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 Sat Sep 5 17:29:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249175 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420897ilg; Sat, 5 Sep 2020 10:33:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybAtpi9qY27xB7JWTcDdt3R21tonpre5FOXxWy/u6zqepugHW39s2gBcb63Di/65LtqE8q X-Received: by 2002:a17:906:4685:: with SMTP id a5mr9401307ejr.446.1599327185477; Sat, 05 Sep 2020 10:33:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327185; cv=none; d=google.com; s=arc-20160816; b=F4G0o2WXwy5Hv3kAs7JUYoZxmB9kTtl1uwMyrqoVKu/ina0uNyZZUsUsjnAjykDugT yMRBapY0UZVuA3gTGAKsTEp0zY1CKMMWK6MWnvzBIxs7rrLbcTEtVHYJNEoxlWy8Jowq D1d3yTFC7a68zwcrmb0jsCQVlmhEYXQNSn1LNY3eZUBuPdQJSat4CvjbVE/dfZTMbIuB vqbVdfnL8XpNogqO9pQetnPfjgNgP6J6OkMqoCroYNPItZ1Jr1r60fO69/gH2vTg0Ywb NS+WNvuC0GF1x59qvzEb/JjbiUOfPq6h9yTBdyUIQRnHehbyIcw0UGuClymgQuyUuPhz pUqg== 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=SvAr1IaqJcu0Ch+fEAzAApNjTyrUCRBFdLASr4jra9c=; b=BVluZWUcRKf4J6njGzkeQzuUbH0phCq7AEohSL0wtHU+L5S79+ciXeLiaxzbUoLTdE +sI4TtUBXRXJ90Vl5u4+B9A/lWFuVC+LiD4RISqswfTDmird0/4HnmjTQysdFIeU/Z+3 OjhPYhoew6Y8KYvCFqs8Is6MFMM8vFRXMgpCd/HOyxeMAdqQvRiNGcvm75Zm1pIurABw vukLBC6D2l4h4HVdObGHsAJHdI1wsp6/EkfB/fEI2vsuQYWVOr9p4ivdIP6EhVvWket1 cv3rDVpTZnRLHlkVw/9+/sYrTjFokUQsJl7Y4ANuF/iJjJjgPRyaRA+Uv0NVBimgqK6e LulA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cQ6IGkmb; 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 u17si5687486ejk.29.2020.09.05.10.33.05; Sat, 05 Sep 2020 10:33:05 -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=cQ6IGkmb; 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 S1728483AbgIERcs (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:60418 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728445AbgIERco (ORCPT ); Sat, 5 Sep 2020 13:32:44 -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 B342E20DD4; Sat, 5 Sep 2020 17:32:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327163; bh=1IL0MVyoisyJ6afqne2x4ewY/YCiP8wNlnqRsz+1SE0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cQ6IGkmbzY/478Bbsr8I5ZPAio/lizum3yqtkLYl+0UB+d6oeJAjMgFyJVpYlmn3D k8gIZYIUpAForI2Ey7hACd9VEK3onVEWVjC+RXec4D+za0frK8H5PlxRoJBB1Bm2IW h62EhvZodijWrrVx+OCFkYDXFlEr/MoeM6Z2EEjQ= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Adam Thomson Subject: [PATCH 12/20] dt-bindings:iio:adc:dlg,da9150-gpadc yaml conversion Date: Sat, 5 Sep 2020 18:29:56 +0100 Message-Id: <20200905173004.216081-13-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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 Cc: 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 Acked-by: Adam Thomson 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 Sat Sep 5 17:29:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249176 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420941ilg; Sat, 5 Sep 2020 10:33:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvdLLWGQrT3NJeyCdgUdkf3tSFIgezgQpJiImxe+ZCRvVZ+B1OuABM3ODPSXDfFMvioe3F X-Received: by 2002:a17:906:77d1:: with SMTP id m17mr13565149ejn.96.1599327190267; Sat, 05 Sep 2020 10:33:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327190; cv=none; d=google.com; s=arc-20160816; b=tHzxkmjs2BZV+jKcWteJ+ETEurFRIwMN0ulUKbtdeAE8mBxwwildx1g6hLsYkvw3eL ZDyGOM2On0VGqGcJlHJdReipG68W1CeG6wxU6YkrEu3WA2eOVBV32UdxryT2SJXdaht7 CdEAokmWH5Qfmwf6EactIPJkS1dxCNUQ2fzV8n9/1cb69dyNgt9xvsGO0ktOWL86OIjk mjEevSAMmHeod4kI804d0hV8pZBov9vrC8gedKwzb1/kMj0BEg4pSJaUffmNH0sClHi4 sp+LDMFl974Uk9s1VrNL8M7Ny+zkIR11q/OlC4RoZ02p5XOpJbCJkb5IdtyHI09Y0kTn gpIw== 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=9SydJVmd1GvANJIthVbPoprvB5ALe8nqljVhwr6t3BM=; b=qlxZWC/m9D7+OAqpBV8Bengz52fEx6lJljRyl8gpKFQxc/SMuWAaVFnviTte0c1T8S s3kf1rdMx/LfinvdG2n0/FCcGxGD/1vqxOAvlur/YcLXIW4Y+36nPm8YvwNha4nIFo9f B85jn8AG5X0KSa7U/eNZ2L8KcpxzMOEzKecWLXIuXQ45f8MGpjvUYs9R131z988ls2O8 4k5qyCYLaxl6nxGlU2NmJFYvbLQHpVwUl50jrzG3AC3Kr3iSYiOdw1IM/S5vrb0D0m5S 6AyH5FkNxFy8Sc4WSkZQiM4nYR/ij3KNJtt8jPouY9Y8Bw62cs6MLnZFNIvCWQ3nX2oD BTnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HTAsQBv1; 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 u17si5687486ejk.29.2020.09.05.10.33.10; Sat, 05 Sep 2020 10:33:10 -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=HTAsQBv1; 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 S1728580AbgIERdF (ORCPT + 6 others); Sat, 5 Sep 2020 13:33:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:60460 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728459AbgIERcp (ORCPT ); Sat, 5 Sep 2020 13:32:45 -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 1FE7D20760; Sat, 5 Sep 2020 17:32:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327165; bh=3VEbxW/JWesur5P76EKWlc6CVFWvzP9iSLLTM79UxgY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HTAsQBv1w6Nl93W/C6lzeHKZ3ADXBRUu7MGBMKVc3kmv7tEwAW3YJMESvuNq9f3rH 0bk9nG5TnF9ChVfKC39N59jW44vKOufZ0eT9v2P7tpOtJU0R25fk2ErewuN/j3P5yP 9ItiHkHxYfP6452gFH1HARAi1GkAEPCNl5O352b8= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Phani Movva Subject: [PATCH 13/20] dt-bindings:iio:adc:cosmic,10001-adc yaml conversion Date: Sat, 5 Sep 2020 18:29:57 +0100 Message-Id: <20200905173004.216081-14-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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 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..313a3b9642f9 --- /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 Sat Sep 5 17:29:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249174 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420885ilg; Sat, 5 Sep 2020 10:33:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6BuyNYt8FGZo64V88bwXA2l2MzWT0cmirU3WrLMX5jxeU9zkGDAdb4VkmTA4/Z36bza0D X-Received: by 2002:a05:6402:1694:: with SMTP id a20mr13976123edv.286.1599327184464; Sat, 05 Sep 2020 10:33:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327184; cv=none; d=google.com; s=arc-20160816; b=dxBU4a3lfRZ44O9rDaLhGmgr5I3b3CyHa8jCg71lHGecZfHKeVZb1dQ/KCBje1PLom iTyHf67aA8zTJwEBzygxa+i59vcex0LKiwnMUO8MLOppuPu2YnMnJamYAN5l3dClLsKo D8dndDgly4fXYRSSSgq1JdCUeOVpf8AaEku2wlFkXRhxSbVL+fAeH6a7yOBXzvkXhBFd itqF7QVSnYmJfSoOm6jP/4FiEdJIaNQCYvGzgwfDfm6sjv/RXNmjNw5OoTJZ1l6JnDp3 H/hRkHrMKtsIeCZg93riVbut3KBbuhizyGcogYv9jQ5+SNTob0m6aOziOwd9XM8INQP3 0v1A== 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=uaXjgo+XWS17uBAeuYt/LyWodCx/EL9FNwlQ1IbS0/EBCkoTiHrWtC5vDftZ6x/svg yti+MPlmo2c4TEY7PNjLB5FSoLpUTYB/E1GA5wenhY5OKeF2WEkZdSGRO+vGMW+YYBi2 RmstmT0y7wVVJOfSCvQ+zAoX4s9pVHdIvDJ3ymuVAch8qhNAVcaj6ZhKd8wavkpb8Kkk Pc0Gq0G5QycjQktfj1+3+h4I8HTq63/yP2h49ww1OvraF0OKK9ZWDtRCalmCSO8oozvU Pr7aIStbyrksbAbcceA4iUZo6lod+Dawpp2OUhE7dvV0pvx3gzZ2t/HQ4z5oedpqmjP/ 3L4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DaUXEQqT; 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 u17si5687486ejk.29.2020.09.05.10.33.04; Sat, 05 Sep 2020 10:33:04 -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=DaUXEQqT; 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 S1728507AbgIERcx (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:60480 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728463AbgIERcr (ORCPT ); Sat, 5 Sep 2020 13:32:47 -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 80F332086A; Sat, 5 Sep 2020 17:32:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327166; bh=pIGED+JyPxgowS0lFF9cJwDhp/9iv4X0tN+lMhcd7Mw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DaUXEQqTYpFt8LoRvtdUWDNzynOeIWM+cbLPoSCGUdOTzr6I/Uz42ufWuBh25aNWf xQOgFcx1/b+9w9UuAmV57N53D2ftfN8GNNUFDnKlo3mpbsYf1Xg+BN3FpdfqJTQMn4 vdlRi+PrcWp+Nfv7TCar7AC8SWBybHHzxAisgvpA= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Charles-Antoine Couret Subject: [PATCH 14/20] dt-bindings:iio:adc:adi,ad7949 yaml conversion Date: Sat, 5 Sep 2020 18:29:58 +0100 Message-Id: <20200905173004.216081-15-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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 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 Sat Sep 5 17:29:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249168 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420797ilg; Sat, 5 Sep 2020 10:32:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZsbo8t4WlT5Uj+Vm7laAhkWH2GcNj73DEuuGnjKkP2gFsWq/r6msURmJ+EICol1V9Dn+8 X-Received: by 2002:a17:906:7248:: with SMTP id n8mr2480166ejk.160.1599327175318; Sat, 05 Sep 2020 10:32:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327175; cv=none; d=google.com; s=arc-20160816; b=XbAhc6+f90zIM735/sIerKKj7KrNUBHX3HpUPC+q37AXCV/mtmqF/slhX+TiH5xCju dwStTK4kZ5cPAO/HGWw4jmUJ/pUOSXvgpr/xEDCzBCAvJg0MqalquzHn+od7It6i9Jwd aivvGmEjaUi9/yUK45mG/RY4WA+Svynj8J9uhDLDbjdAebc02rJE1Cp/iVv0YU+5JurC tCAcWzFQXsYnLGOJth7JeUQ8va9N0oe7q7yGEljmh/2byzYWyKtPtj9mq3aVTsHrvGKb Yhhs8IxkZLl6maJAhdGQaAUbn8UWkfKOSXAtz+paYrm3THJYzaPfIpZA8fLhdapz76PM 0h1g== 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=DvZD2Ciyf1YBeS++iPP6gQejRdV2JEKevwLMMYDAA5M=; b=JT3//3J1rqs/jHKZkpHSA4TEE0xZp13XpAm6FuEVaaD2MkzPJfSoS2fle9WrvdkG4A RuWPPg3HEkrN70WN5PyN/wq3s2rynRUKBYBxmdx7f3UOJfTC4k+cPBNkfMtpvz0EZdTi s7xGlobgz4cxTfvMGyxVvh1p79R1gEOnIUS5oTMCqUYtDZNHyZbcOd36xDGpR9vowtbz ljqsdUfETflS1HwF6X8ev3vElDpeDaq5ta2FcHpIUYoKXFoa1bvD+McgHmwbft12Xg4M rYcWmnhlmWvOf45zHdq9hVauL7cxLXKCrUIMD9T0QDP0uoCHtbsfCVm94RsG4Bdrqdne QKdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TS58A5x4; 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 u17si5687486ejk.29.2020.09.05.10.32.55; Sat, 05 Sep 2020 10:32:55 -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=TS58A5x4; 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 S1728494AbgIERcw (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:60488 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728473AbgIERcs (ORCPT ); Sat, 5 Sep 2020 13:32:48 -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 E6D292078E; Sat, 5 Sep 2020 17:32:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327168; bh=RBeBn26VqXSvtc29tYTwUVWtUqRK71pOOETdakTP+Z0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TS58A5x4T3xwdFaeBWIKcP60Y235hLXXvwtgnhMWl+0cgdR7jS3dKaO+7DdcGtMnX gQtDzPADQ9oH1VdBAsXNGbOtRGf2dFN+Kt/BvQKsvFRQqVgRwIvZhhZHxqoj3pssJr bOvUmOnuaAcQqxdWn8q3RDDuescuv2Ed3Cg4o3K4= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Stefan Popa Subject: [PATCH 15/20] dt-bindings:iio:adc:ad7768-1 yaml conversion Date: Sat, 5 Sep 2020 18:29:59 +0100 Message-Id: <20200905173004.216081-16-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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. Signed-off-by: Jonathan Cameron Cc: Stefan Popa --- .../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 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..a2c559d0c947 --- /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: + - Stefan Popa + +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 Sat Sep 5 17:30:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249169 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420815ilg; Sat, 5 Sep 2020 10:32:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKyMXfG/naW1F3nOrKD7Cg4Rdg1uDJquTvA7mMwON9bKihQdD16tJ0DuPqsxCaoht/NIIG X-Received: by 2002:a17:906:2a14:: with SMTP id j20mr14018586eje.376.1599327178003; Sat, 05 Sep 2020 10:32:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327177; cv=none; d=google.com; s=arc-20160816; b=qSiCUsaLwTBj8F3Ad6TdU7Cr7b1mD7SpDQ2mJEEsf2rPUiHItXjiGvoVM2j/wth52a xdRFoiDpc2CjvDtIe53Hu3K/gToX4oGZao7aO4eG17zSEXKWeo/kOV9bN4tcmRah29Oh iUOhEWWGvMSZud3oNSG4ZJ3rVTroam5MpxdAutJCMgOlJTmSGtU2f/BQBMyNlCDGUMl6 XxUez4fzEF77+f53tj4dFHBUIeMXisZCnJPOzXD7dz/B/skFetkUbjynir0OmUxQBBsS Ftii7LXs7EIA3khBejPy2CEsFmwM/VjO39gEkfwKrgnertzmN782pd0H92eteucO2ySF vzhg== 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=1UK13ry1NWZolMndpwFLK3tzFGWN/DTMAgtFQwKYgvQ=; b=lW0c3govZuuiRsERAacG0kl/3K/tU6Q69woL4ZOYoogZQodhN7quK7PEBZTSxcjVtV yoGcL9q1+XhD4Fp2Cy6M7u67buZNQqmY0j74F3r+Q7YQplMruGqgtMjGoGVDAGFtEr66 fzRlB5oOFH+7LPZuZ5CGxNx5Ktyp58eA7J4uG/0x/76FJkg1WmMHIrnnn9p/D4+VxqrB lU2HeckO7gMtROwV+e1SIqc0v04l5Wyf0BhOYBr/MwFXXO22FkB6/4jf0VrM3r3ADOef Ct3i5lNyreK9DzXDJaYqN1pcYXQEc7VEY6kkXZC2TTY6XnNIysy5DUJj3glCDh0nyX0l nsbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gzJfw2uv; 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 u17si5687486ejk.29.2020.09.05.10.32.57; Sat, 05 Sep 2020 10:32:57 -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=gzJfw2uv; 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 S1728561AbgIERcz (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:60508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728491AbgIERcu (ORCPT ); Sat, 5 Sep 2020 13:32:50 -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 572E720C09; Sat, 5 Sep 2020 17:32:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327169; bh=ZHLq/myecu/flZM0tIz8OTjV/nj46E8SpKq8pgcSX3Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gzJfw2uvXP4Z3gTUsQ7OlJrPzjslNpghdm3wQlhLJWCAcxxDmxtfM3cOX9KbRU+Cj tFmCGkvSix8r/cUYiKidJEwsPch+IcijtW+7Ji6CSf8wOTrN09EtIg58N8KK5fJ8rJ FtacF0fvsqTiHIlr9Dd1yu3rQuw3uey4p1XHWg6I= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Dirk Eibach , Daniel Baluta Subject: [PATCH 16/20] dt-bindings:iio:adc:ti,ads1015 yaml conversion Date: Sat, 5 Sep 2020 18:30:00 +0100 Message-Id: <20200905173004.216081-17-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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 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..9922ca78ccd0 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads1015.yaml @@ -0,0 +1,113 @@ +# SPDX-License-Identifier: GPL-2.0 +%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 aquisition 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 Sat Sep 5 17:30:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249170 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420820ilg; Sat, 5 Sep 2020 10:32:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTYYd9R9b9lKYWxxLrnDmqRWqx6jr0J23Np6Lg8qcPqb6nRi5WcmVHpF4YTu89hbqDCyQi X-Received: by 2002:aa7:da16:: with SMTP id r22mr14659066eds.132.1599327178872; Sat, 05 Sep 2020 10:32:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327178; cv=none; d=google.com; s=arc-20160816; b=dd+kQahQzdrYk7p2pOqEjnMy4jMDDg0QYmbxE87FnTOS+aAnV46+0CWnClTKXD4h+l BP3pWhaiii0DgUQUoTMiq9pXaZaLPq8yZxo9XxIFADo1c4+EZyjw5KaEqpMlwhrzUD6N j00QNIbx6k8Y8ZsmNS5am/dd7ZEPA9dWFuO3hXWMaURX4OcCz7+BnK7A3J4w/J3IQYWT Lt20sU8/PFJYnR6NWR/9lBNIxFjR9GeeTAAf73VSB6LOiWb5lZzw/aYAL9z1ylEjCEUq iXe4v8MthUvDuME7VCcJFLjZgU5oCsBHi6KVyDbr146hE9ViGFwcTjoNB+InTe4vl7aR 5Ueg== 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=gDVcE1b1DY7pAi48mT1OdANFdSX46z1BCWxframRdpk=; b=zVhhLiuuXAVGAF35w6MhZGktzCpLLl7NGLgcv8RxWZZCleyPjSzrDLvvJYKYhIf/wM 2cU4KyQ68ElFT1+EplPp8POs5w3ySrgpftmx8qjzOdsDw6NuG0N106DQ2vp1EmXj6b4u WFSSK/OzASys8jVtxjc/ndAv5wHZr35FqpJnoVAEEv7yfFF9U7mrGQaLBrZJ8Nu0B/dM fpKrDy/9rQpOkifdzbWPHReef+e+tlvL2Be3ZIeZi0vEXNMK7Gmqr1Hrs+7gB29ykT3r fYH8KgJMP1XsPKyDIk2cZhi0g2uYQSBUx8QJYV9E7g8Vzcb5U/kLsBjwd06xUC9LPWCD W/WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="TB/ugh41"; 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 u17si5687486ejk.29.2020.09.05.10.32.58; Sat, 05 Sep 2020 10:32: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="TB/ugh41"; 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 S1728491AbgIERc5 (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:60532 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728445AbgIERcv (ORCPT ); Sat, 5 Sep 2020 13:32:51 -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 DF1E7208DB; Sat, 5 Sep 2020 17:32:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327170; bh=D/xeIW7B0P3+axp/oO/rsfBk7WsGfDLCbQBzyamngHY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TB/ugh41LEEa4fEErW706dX9CbmCATlgLRdqYkMiSnXS5X+3MBu3xaJOwqhLVfRS0 hntCDeu1Jjpfchy5KDY8czZdwGF+TRv5EJu4nsDuI5qO+hwJ8037RqSV8PX4UJBMbu 2JaDte6ShFO6I23ihNU9+aoA+y0BzQ3LaGmCxWcQ= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Vladimir Barinov Subject: [PATCH 17/20] dt-bindings:iio:adc:holt,hi8435 yaml conversion Date: Sat, 5 Sep 2020 18:30:01 +0100 Message-Id: <20200905173004.216081-18-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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 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..4ff08e9fcc74 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: GPL-2.0 +%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 Sat Sep 5 17:30:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249173 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420872ilg; Sat, 5 Sep 2020 10:33:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziFnBiDCTq4SuWn/3tqPm9VQg/R9+n6gjJPKsWrqhQI3YQxvEfOHc1DgrVMqpYKFFkwu0E X-Received: by 2002:a17:906:14c9:: with SMTP id y9mr13817331ejc.523.1599327183778; Sat, 05 Sep 2020 10:33:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327183; cv=none; d=google.com; s=arc-20160816; b=D21uLUIRZzj293jSzovUOQwo6JcnPlXAJvHShkQ+iReelRML2AAg2LqFSrZXcXnPJ+ njtU7LHJ5kzo2CrrogT9HFD326Yl8z0QOKWK36JE+1ih3xjU+8rUag6kba4popbOsTEk mRa2+t2M3VkzAUtcIuiGcH1Vlpdt+FZ4WAFqv+dbmoH+9VEb1qQoqbq8fr/MqNzhtGTY J6QbsjjdhQ9vgh58IwAnug8FLULW/ClEO6D7HYtcw2kSgVAOU85L8f/C5bkHzPk/Q10L MykwuHVOVJknKJLYE32X/bfugLuD6aZ/6MFDQ9paXEKnlhYFpBmjAdT/aK8WL72GKXfd KMmA== 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=NSB9wCcDe1YHMcF+JE18tN7nMYA86fWPAfX6AtxGvks=; b=sUeoGQBStVrBOurTVJ+5Et/v9MbB32KLVWkEuXT+O/T6A0lWWSOu2v8e8t3/2Zy2+y q8rzfLO4lyn+6w1Stcdl0vhwAqWLOncSoDiVrP1HVdvHaU870MQUtNvr6awTkVIiLLei EzroxGlmKxbQOgSeMfZXIdjqCrPYilR2tA0Hm5e4VgwLo+b+vCt4WFyC0j/4mWEaM5DZ +nkjzCqvDeLMgkYtSmNd14T2LLSGfJsTJ5n0lyDjDez2i3t+enIU32fcVIYIYe6EprkW NfPW+TedSARYep1QTZtr07v/OdlmE6QSTQE+JwW1YigDMYV3IL3VPlYwpEIlKwirbq/Y hICQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0vlhsZKA; 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 u17si5687486ejk.29.2020.09.05.10.33.03; Sat, 05 Sep 2020 10:33: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=0vlhsZKA; 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 S1728445AbgIERc5 (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:60552 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728505AbgIERcx (ORCPT ); Sat, 5 Sep 2020 13:32:53 -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 514992086A; Sat, 5 Sep 2020 17:32:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327172; bh=qy01rmyWth+JbNoz0SAKoaOPUAA74MAp1IUG3oTg0pM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0vlhsZKAg9RsSW6m3o6t4mSdP6qPRz+X3B//Q2mJ+42mGmPzF+9Ky9v+d0pisOFwL Kpw4nkulBtZfjp5aSYqS7HWbxPdn8CD13dVkw3BaCgjUuR+coI4GFvdsTFhrD0P6p0 M4hI885lLjQPinBS7jTKFrGgJdA7KovHLXw22fvA= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Martin Blumenstingl , Kevin Hilman , Neil Armstrong , Jerome Brunet Subject: [PATCH 18/20] dt-bindings:iio:adc:amlogic, meson-saradc yaml conversion Date: Sat, 5 Sep 2020 18:30:02 +0100 Message-Id: <20200905173004.216081-19-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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. I am far from sure I have these correct. For example: 1) Can we have the clock adc_sel without adc_clk? 2) 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 | 145 ++++++++++++++++++ 2 files changed, 145 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..5b2e07828c3d --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.yaml @@ -0,0 +1,145 @@ +# 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: + minItems: 2 + maxItems: 4 + + clock-names: + items: + - const: clkin + - const: core + - const: adc_clk + - const: adc_sel + minItems: 2 + maxItems: 4 + + 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 + else: + properties: + nvmem-cells: false + mvmem-cel-names: false + + - 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>, + <&clkc CLKID_SAR_ADC_CLK>, + <&clkc CLKID_SAR_ADC_SEL>; + clock-names = "clkin", "core"; + nvmem-cells = <&tsens_caldata>; + nvmem-cell-names = "temperature_calib"; + amlogic,hhi-sysctrl = <&hhi>; + }; + }; +... From patchwork Sat Sep 5 17:30:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249171 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420853ilg; Sat, 5 Sep 2020 10:33:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz88FXTFPRZvyHkgcIPvRw2PRyhETzhIPKN74gwy+KruhluUJE6KqTdNsbNgb7EHrDTdFd0 X-Received: by 2002:a17:907:40c1:: with SMTP id nv1mr6613044ejb.318.1599327182555; Sat, 05 Sep 2020 10:33:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327182; cv=none; d=google.com; s=arc-20160816; b=rlHN1sVdvFsIcQAbcWjLb4tMhadrr2fN+hsS8ZCoSnBMnMJ0S3OvlemNgZcwmw9Gm/ aud5GjGrximkgKilSB372yNmMGLPZxl4t+42rXzqMwnJ2peltuLbwZhmHLTtuvrGwtjA 9QgplNR17+BezHibHMTd2JO2Xe7mTJ8nRPF7evHz9wLKiD+3F2ERsChHljA+tSlT0v7a yBFRKLFuCaj3ua3FGcaYJo5w4B3Gjvyh2ObZ+T9NfT1/GnOdwEZAglok8Khl5vPcwBRx ewr1OBZGuhA4XFWuWALWcA2Ke0jD4ln32+GpAbQJXsW8HvRzNEZ8AcO9ENLL29FFh7e3 jg1g== 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=J5Um8AG7q6nlQCbUu0ko+tNR1fufDcYps8Zy1IHCjOnCuoce0JZ/6LOs60KAsZK0Zb auozC6L6thyu4oTl3655AGltcOUu7lPo9eecEhvc9IR9quorStE1NEfnt2igZSPjzenP msV3jBE/+9+GCt2+zN8/siKWKVmrg6p3jg9XvOXyYKlzExOyIymY8TGrr42Btm5Zpew5 zy/g8kt0aBe2t2bxcNs1LxsxOtsBOtwK4Aph0wmxppgmOWdZh6baV23Bk0kaJX9JZRYB JaWIy8O84gaUk9RCR9zeQa/Tkv2tFYvREBdQjMDz5hvUoYq9270xNPEREfXg0lBVA7zm ekDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PNA0Omff; 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 u17si5687486ejk.29.2020.09.05.10.33.01; Sat, 05 Sep 2020 10:33:02 -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=PNA0Omff; 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 S1728572AbgIERc6 (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:60562 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728555AbgIERcz (ORCPT ); Sat, 5 Sep 2020 13:32:55 -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 2E1FA2078E; Sat, 5 Sep 2020 17:32:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327174; bh=/O5xMlBLoa1fQ2/9iy12YsyhTYvUp2gU+bzHqJg7V8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PNA0OmffL8B+EFA74jkL30PsnbFjizr0IdOPyVRrWgFIJqe3d8gJGv/IdeIQlS+E+ R5yZAmSzfnlwNtbHGefyWfjbX8+kDE/7j3Yugw1BTnOxr/UbYdDVwpyqtbtiaw+h+q s1e3r1j58itqnah7URwHH1QhA+HIxdShlyHEG3Ng= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Haibo Chen , Shawn Guo , Sascha Hauer Subject: [PATCH 19/20] dt-bindings:iio:adc:fsl,imx7d-adc yaml conversion Date: Sat, 5 Sep 2020 18:30:03 +0100 Message-Id: <20200905173004.216081-20-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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 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 Sat Sep 5 17:30:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249172 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420861ilg; Sat, 5 Sep 2020 10:33:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6GpBJLwOlktfsqXgaWyHSaB87aosUh6phBCx+qSMtwruGCt2wgaVtFiqD0b8GmlzybWUr X-Received: by 2002:a17:906:6a52:: with SMTP id n18mr13092155ejs.58.1599327182923; Sat, 05 Sep 2020 10:33:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327182; cv=none; d=google.com; s=arc-20160816; b=jcw4uQ3CKsB5ID2qUMnvfHlLx945mnWpgYU/QSFthHmlJ/TX0uehOfe3bLP90OpMrx fiU1NCZClZRI4UcJr93umFuITpc3YuY4PMO74Q8mSyzUgdpRm1xGSMzRcpseILV0SQxe IXQ74P/JsAmiQVOMAeXQwwm56VysONCMNQxX33IxYzmK40v+XVI0Vy+VSTVD//jenYFb X6zNJYa5Kob8e+4Bt3IhMSfmD9aUwMs29/VP36G6sQI58tR3R/W7NpFShqPHUhwcj5Rd Ff95B0E3RXCL255vGH2PLwRJ0v0ij2Bnft2gRXMouNwPq4mhFZ/hgOz6dyNAaOrFANxI mbGQ== 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=KPp7HrrOxXvLjK0mDNtbiN5JZDL7FDcuqGIPhc4pGt0=; b=R03CX/L3iZ/4q1q7XIoQy73ONROWjai7Vo+VdUOmotOPLdemR84Wccgm1XZPURZkEp 7ymujcmxUIcoI5WBVxvY1uTw4wR2mTcj4Wb5jqKS7vV1wON2XoPBmlHzEuFbYAM6xxHX mDoSUjbA5qZWx4h4dF1TINK1oFMkhxaHFuhAgBRJyX4sxPrZ887bRJffI+42fXgy93Zx zAkP8zET727ClrpfxyMMkM2vrWt5kDcyXx/9WIYWwoCyC2poTYy0wK/6WeSzncsKTqBQ zSKop0TuR99XqwBjgjaXnhHf5O5IqzbcpImRJRHm+zz3g/pjduvQlvoB9HovrzYyobNA dqKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AqYyjD8Y; 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 u17si5687486ejk.29.2020.09.05.10.33.02; Sat, 05 Sep 2020 10:33:02 -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=AqYyjD8Y; 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 S1728555AbgIERc6 (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:60600 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728563AbgIERc5 (ORCPT ); Sat, 5 Sep 2020 13:32:57 -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 E06D5208DB; Sat, 5 Sep 2020 17:32:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327176; bh=G31arKrxrxxTxPGo3NOGEU4jamcW0b4IRC0IeztScz0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AqYyjD8YDk6rgP8frq8UTUTnelg9IpS2nkGb5jiS7BDZAsqZIbEO7BBvMaqjSzFLE 4OU00KdgALC2xb6kbsYcCdfSmPyxsv2rDNnCcuEOE4beksCT2QoI9NGCZzQqPVC+Fj y9NUQdDjxEaKHVqGSlQudEWpFsZZicpObxnSCBT4= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Markus Pargmann , Shawn Guo , Sascha Hauer Subject: [PATCH 20/20] dt-bindings:iio:adc:fsl,imx25-gcq yaml conversion Date: Sat, 5 Sep 2020 18:30:04 +0100 Message-Id: <20200905173004.216081-21-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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 contraints 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 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 = ; + }; + }; + }; +...