From patchwork Wed Sep 9 17:59:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249528 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp56379ilk; Wed, 9 Sep 2020 11:04:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpf5XQUIfdHGu7CExA++ibOuaqalA53FT3C203AsNGZCLmhY0FJwp0i8wy540+lcn9tA88 X-Received: by 2002:a17:906:660f:: with SMTP id b15mr5111829ejp.333.1599674693983; Wed, 09 Sep 2020 11:04:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674693; cv=none; d=google.com; s=arc-20160816; b=vqbHpNsA9OiC6dc8iHRW+68/OWvCMyUoCNQqzBIHbbmemfSMoPgXg6ue5n1NaDaGst pJbuW/bCCSjv2/nCbxp5M7GGaAK+6AGrn+p8NWDhzvoahffizZVC1MbsZLG5MTK9P9oy zmqDuk9MrOY6rThlsWux/Jq3MCYY7B5hKpTVyiqHA03C5lmaCcwRFjPYh+wE+ahMgmO5 xmZS0MmK+pRe+Ytrc/uP4+biKyrfGNuh1/PONcLAOV9k4FpRURl4eOx/Apkzv829SGL1 VGfZjg9yIjJa6ad5F8flQEfScMaXB6vbORBdf8kBeBO5BVzphsXmDSltuxwFMMYjD6mb qfww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wWXT8vvamAklxCfgSR4rf2i7Fh9Jfowuvu+atZhhMOY=; b=luzd7FIQAJFESjDcJ8CZRAB1n9DDm82vznsdhtTS2N0WDWBxCDoSNUKH3nD5RM4w2c D8KC4U0/jWHtjE4K8MfWcsmkRXhnnoOYzFPnLVeL62CugRFhN3jD6hu0pafMq6VUUkqV pfYZXK/vES6LEnHCLUC4Xihfk03O679RtKYHN8RloTSA7Xrlfz/UuQI/bH51gh66Wp0u FBsZ2FCgiauxC0EMcig+70+1ZUeT5BHhcaYDwJO8lj97KG1cOE2bgR2RLTkoVjW3TrXJ Xl021wooBiv5sNApriBXVurK/Mxz/Cpb1NgWNOWBKob+T209KIGQxqrm1RAxwA98KIyQ ++Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SCnqyJKJ; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si1886631ejx.468.2020.09.09.11.04.53; Wed, 09 Sep 2020 11:04:53 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SCnqyJKJ; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726535AbgIISEq (ORCPT + 6 others); Wed, 9 Sep 2020 14:04:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:59342 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730150AbgIISCc (ORCPT ); Wed, 9 Sep 2020 14:02:32 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 04EEC21D7F; Wed, 9 Sep 2020 18:02:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674552; bh=Vkxc4nvRxLNd/4fVhUI0rHJQwWPuuRyejX1IfR3WD3k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SCnqyJKJVtGZjKRo/BwveSZQtbpE2XRJ9R48NcNH40tnPXCz4rlA/ViAKp65QfI9s PYSwS5fd7f+F4a/Mr+mJC2wv58addF4ufOxMsZXS4Y9uCuGDgP6KDVP78qijyeh0yW F4ue2leHULwQPu9d9a2AYoosvqIbjheQoKjaDaHE= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Tomer Maimon Subject: [PATCH v2 08/20] dt-bindings:iio:adc:nuvoton, npcm750-adc yaml conversion Date: Wed, 9 Sep 2020 18:59:34 +0100 Message-Id: <20200909175946.395313-9-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Renamed the file to reflect the only compatible. Added #io-channel-cells to make it easier to support consumers of the ADC channels this device provides. Signed-off-by: Jonathan Cameron Cc: Tomer Maimon --- .../bindings/iio/adc/nuvoton,npcm-adc.txt | 26 -------- .../bindings/iio/adc/nuvoton,npcm750-adc.yaml | 64 +++++++++++++++++++ 2 files changed, 64 insertions(+), 26 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm-adc.txt b/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm-adc.txt deleted file mode 100644 index ef8eeec1a997..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm-adc.txt +++ /dev/null @@ -1,26 +0,0 @@ -Nuvoton NPCM Analog to Digital Converter (ADC) - -The NPCM ADC is a 10-bit converter for eight channel inputs. - -Required properties: -- compatible: "nuvoton,npcm750-adc" for the NPCM7XX BMC. -- reg: specifies physical base address and size of the registers. -- interrupts: Contain the ADC interrupt with flags for falling edge. -- resets : phandle to the reset control for this device. - -Optional properties: -- clocks: phandle of ADC reference clock, in case the clock is not - added the ADC will use the default ADC sample rate. -- vref-supply: The regulator supply ADC reference voltage, in case the - vref-supply is not added the ADC will use internal voltage - reference. - -Example: - -adc: adc@f000c000 { - compatible = "nuvoton,npcm750-adc"; - reg = <0xf000c000 0x8>; - interrupts = ; - clocks = <&clk NPCM7XX_CLK_ADC>; - resets = <&rstc NPCM7XX_RESET_IPSRST1 NPCM7XX_RESET_ADC>; -}; diff --git a/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm750-adc.yaml b/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm750-adc.yaml new file mode 100644 index 000000000000..001cf263b7d5 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm750-adc.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/nuvoton,npcm750-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton NPCM BMC Analog to Digital Converter (ADC) + +maintainers: + - Tomer Maimon + +description: + The NPCM ADC is a 10-bit converter for eight channel inputs. + +properties: + compatible: + const: nuvoton,npcm750-adc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + description: ADC interrupt, should be set for falling edge. + + resets: + maxItems: 1 + + clocks: + maxItems: 1 + description: If not provided the defulat ADC sample rate will be used. + + vref-supply: + description: If not supplied, the internal voltage reference will be used. + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - interrupts + - resets + +additionalProperties: false + +examples: + - | + #include + #include + #include + #include + soc { + #address-cells = <1>; + #size-cells = <1>; + adc@f000c000 { + compatible = "nuvoton,npcm750-adc"; + reg = <0xf000c000 0x8>; + interrupts = ; + clocks = <&clk NPCM7XX_CLK_ADC>; + resets = <&rstc NPCM7XX_RESET_IPSRST1 NPCM7XX_RESET_ADC>; + }; + }; +...