From patchwork Sat Oct 31 18:48:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320122 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451406ilc; Sat, 31 Oct 2020 11:51:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuSU5Z8mJdzGG9g1SUeq0KyeOkuVvqQXP62eHJYlodQ+VmGS3bZ3eTTrEA02rSrNYEPQSb X-Received: by 2002:a17:906:12c1:: with SMTP id l1mr7937727ejb.528.1604170298720; Sat, 31 Oct 2020 11:51:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170298; cv=none; d=google.com; s=arc-20160816; b=Ra0fRuSQQmJtTzZczoMrBnagkd753DvO/JPAoyziIeBNUStBp4MqAlgEzyFZU2tZVw GGf5/SrANMdzdGCK403JqKbxbCInlCsSdLY2argEOecPBKMKKuap8AjqytDonz8a9I6x wgdTnaYqDdpenC0tHPGUVI8pgcwhDKJ+kJeuBtLsifsZ7LFaVb5ElWeuE5qMvKp8slQQ /9/fFwX3odI1HsnF06LMwrGvec5ECLgyk7vWAYfGcZLwIyK9MO4XVnG1O/cYFXdDW7Oz gYPpKrPhHPL66ykSVPJkiOGA3Xqof9E6pK4L/+73Xj7NBS2MoxnAudeXSSf8cy71IjY2 ALSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cGnRknjL0QvjhmEbJdh1L9cldeUL5rO1ID/r0RkXM68=; b=APZ/YUCmEJ/ZUKWw50DamNAzU1+n9PtFHXoffG9SkAIjYFH6CkI9EVDbmmB0boG+0P uo6xEHVvkSDXYtt5ubGdMZgvJJ0GVhaTUk93MjJBMr828RZnobBqcaHulmio/Fz8NPfV gusZbNgdAdcHfTzt8QePA6thP8ma9+FxzrAiqzA05J/8mU/E7Gpk85s20L4zxzmotNcJ sJ8WadgbKJdXR1B0CIXMnZZCPlEbw6Q2UPZIDFpkv7LzRcMdxr6GavrtOsFWcDbYGiwq vMWBGCfo95YLqGo8oTCoyNAAFuGSIU+vOR71lySzuUq2PrVuMipW0nH1P5ToHD4NcEyn ZWEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FudiSD2i; 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 f2si7081562ejc.542.2020.10.31.11.51.38; Sat, 31 Oct 2020 11:51:38 -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=FudiSD2i; 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 S1728339AbgJaSv3 (ORCPT + 6 others); Sat, 31 Oct 2020 14:51:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:34492 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727967AbgJaSv3 (ORCPT ); Sat, 31 Oct 2020 14:51: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 ADCB62071A; Sat, 31 Oct 2020 18:51:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170288; bh=MYhs3hNCLQomh8x5nP0aznfDVJVGlsc86c+feN2oOUQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FudiSD2ifLVDRUJqLdKqZuIhdvk0ddC6tosNZ6I3aY3dmpr+hCzDRjsI9CUPTluOR ZJnVdMXruzWIME0O8+ll8Qwsq2OY0lMoW6s97lz/Z8G8yNATTnJbfSEI+HY4GXwB5V XkiRANIFTLs8j7FtLyNIMpdwMDQqjGGJlAScX81k= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Matheus Tavares , Alexandru Ardelean Subject: [PATCH 01/46] dt-bindings:iio:resolver:adi, ad2s90: Conversion of binding to yaml. Date: Sat, 31 Oct 2020 18:48:09 +0000 Message-Id: <20201031184854.745828-2-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Simple binding with a good description of why the spi-max-frequency is, in practice not as high as the datasheet implies. I've set the maximum as per the value established in the description. Signed-off-by: Jonathan Cameron Cc: Matheus Tavares Cc: Alexandru Ardelean --- .../bindings/iio/resolver/ad2s90.txt | 31 ---------- .../bindings/iio/resolver/adi,ad2s90.yaml | 60 +++++++++++++++++++ 2 files changed, 60 insertions(+), 31 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/resolver/ad2s90.txt b/Documentation/devicetree/bindings/iio/resolver/ad2s90.txt deleted file mode 100644 index 477d41fa6467..000000000000 --- a/Documentation/devicetree/bindings/iio/resolver/ad2s90.txt +++ /dev/null @@ -1,31 +0,0 @@ -Analog Devices AD2S90 Resolver-to-Digital Converter - -https://www.analog.com/en/products/ad2s90.html - -Required properties: - - compatible: should be "adi,ad2s90" - - reg: SPI chip select number for the device - - spi-max-frequency: set maximum clock frequency, must be 830000 - - spi-cpol and spi-cpha: - Either SPI mode (0,0) or (1,1) must be used, so specify none or both of - spi-cpha, spi-cpol. - -See for more details: - Documentation/devicetree/bindings/spi/spi-bus.txt - -Note about max frequency: - Chip's max frequency, as specified in its datasheet, is 2Mhz. But a 600ns - delay is expected between the application of a logic LO to CS and the - application of SCLK, as also specified. And since the delay is not - implemented in the spi code, to satisfy it, SCLK's period should be at most - 2 * 600ns, so the max frequency should be 1 / (2 * 6e-7), which gives - roughly 830000Hz. - -Example: -resolver@0 { - compatible = "adi,ad2s90"; - reg = <0>; - spi-max-frequency = <830000>; - spi-cpol; - spi-cpha; -}; diff --git a/Documentation/devicetree/bindings/iio/resolver/adi,ad2s90.yaml b/Documentation/devicetree/bindings/iio/resolver/adi,ad2s90.yaml new file mode 100644 index 000000000000..81e4bdfc17c4 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/resolver/adi,ad2s90.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/resolver/adi,ad2s90.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD2S90 Resolver-to-Digital Converter + +maintainers: + - Matheus Tavares + +description: | + Datasheet: https://www.analog.com/en/products/ad2s90.html + +properties: + compatible: + const: adi,ad2s90 + + reg: + maxItems: 1 + + spi-max-frequency: + maximum: 830000 + description: | + Chip's max frequency, as specified in its datasheet, is 2Mhz. But a 600ns + delay is expected between the application of a logic LO to CS and the + application of SCLK, as also specified. And since the delay is not + implemented in the spi code, to satisfy it, SCLK's period should be at + most 2 * 600ns, so the max frequency should be 1 / (2 * 6e-7), which gives + roughly 830000Hz. + + spi-cpol: true + + spi-cpha: true + +additionalProperties: false + +required: + - compatible + - reg + +dependencies: + spi-cpol: [ spi-cpha ] + spi-cpha: [ spi-cpol ] + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + resolver@0 { + compatible = "adi,ad2s90"; + reg = <0>; + spi-max-frequency = <830000>; + spi-cpol; + spi-cpha; + }; + }; +... From patchwork Sat Oct 31 18:48:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 314639 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BBE4EC388F7 for ; Sat, 31 Oct 2020 18:51:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 812CB2076D for ; Sat, 31 Oct 2020 18:51:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170291; bh=dmNcGpk/in1UROXkjsC592GjkjKjgweuFnqYOK/Zceg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=hWpQ1v4P+UjDL+qeGw9tXmmv9VDg6cjzJeNsqh0VrsgidiMjYplaMg09yBbG45FoW mRIWqu1gvAwXQw/fXNZSFQY609FRtj/g0ygL+fqPNNKExGQewck2RwsyC3Oll1cbJU vdgJUuh8018rl+Wa+lCcwuVG1ewaIl3QHAAmaT0Q= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728361AbgJaSva (ORCPT ); Sat, 31 Oct 2020 14:51:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:34520 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727967AbgJaSva (ORCPT ); Sat, 31 Oct 2020 14:51:30 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 42C5B20706; Sat, 31 Oct 2020 18:51:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170290; bh=dmNcGpk/in1UROXkjsC592GjkjKjgweuFnqYOK/Zceg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qQz/THYtOXglvYM9rBFLDt9xt2dodRRbjaGM3aPSw/MmNAuIkZ4VQuRs77HO3ot/l YoqNE2xz834mCKf8IhgR2LG4TUK5c8X5QPNQNQaj/s5/PU3TrYUApp/tiRIyVxtTET XcMI357qpM18nA8v2MipdR7TiVqIAWx/EiO8ep8o= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Phil Reid Subject: [PATCH 02/46] dt-bindings:iio:potentiometer:adi, ad5272 yaml conversion Date: Sat, 31 Oct 2020 18:48:10 +0000 Message-Id: <20201031184854.745828-3-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Simple direct conversion from txt to yaml as part of a general aim of converting all IIO bindings to this machine readable format. Signed-off-by: Jonathan Cameron Cc: Phil Reid Reviewed-by: Phil Reid --- .../bindings/iio/potentiometer/ad5272.txt | 27 ---------- .../iio/potentiometer/adi,ad5272.yaml | 50 +++++++++++++++++++ 2 files changed, 50 insertions(+), 27 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/potentiometer/ad5272.txt b/Documentation/devicetree/bindings/iio/potentiometer/ad5272.txt deleted file mode 100644 index f9b2eef946aa..000000000000 --- a/Documentation/devicetree/bindings/iio/potentiometer/ad5272.txt +++ /dev/null @@ -1,27 +0,0 @@ -* Analog Devices AD5272 digital potentiometer - -The node for this device must be a child node of a I2C controller, hence -all mandatory properties for your controller must be specified. See directory: - - Documentation/devicetree/bindings/i2c - -for more details. - -Required properties: - - compatible: Must be one of the following, depending on the model: - adi,ad5272-020 - adi,ad5272-050 - adi,ad5272-100 - adi,ad5274-020 - adi,ad5274-100 - -Optional properties: - - reset-gpios: GPIO specification for the RESET input. This is an - active low signal to the AD5272. - -Example: -ad5272: potentiometer@2f { - reg = <0x2F>; - compatible = "adi,ad5272-020"; - reset-gpios = <&gpio3 6 GPIO_ACTIVE_HIGH>; -}; diff --git a/Documentation/devicetree/bindings/iio/potentiometer/adi,ad5272.yaml b/Documentation/devicetree/bindings/iio/potentiometer/adi,ad5272.yaml new file mode 100644 index 000000000000..b9b7d383bff1 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/potentiometer/adi,ad5272.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/potentiometer/adi,ad5272.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD5272 digital potentiometer + +maintainers: + - Phil Reid + +description: | + Datasheet: https://www.analog.com/en/products/ad5272.html + +properties: + compatible: + enum: + - adi,ad5272-020 + - adi,ad5272-050 + - adi,ad5272-100 + - adi,ad5274-020 + - adi,ad5274-100 + + reg: + maxItems: 1 + + reset-gpios: + description: + Active low signal to the AD5272 RESET input. + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + potentiometer@2f { + compatible = "adi,ad5272-020"; + reg = <0x2F>; + reset-gpios = <&gpio3 6 GPIO_ACTIVE_HIGH>; + }; + }; +... From patchwork Sat Oct 31 18:48:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320124 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451418ilc; Sat, 31 Oct 2020 11:51:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPVwC5m/EiZ/xOgxsIq9imcMTLJfeWkdgfkxVaTW7PMExRfkrtCqva00GzTh/zQgZGTsuP X-Received: by 2002:a17:906:6b82:: with SMTP id l2mr3013711ejr.241.1604170300768; Sat, 31 Oct 2020 11:51:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170300; cv=none; d=google.com; s=arc-20160816; b=Y98wVVNzCx7YUEp3tIMxxO/mHmICGv20yFrKi0lxRbA/cjSJycDX2ClGa2VwQJI7LY KJxHb+5iY0e+rNsDGLyedaIelSj17MTp5pCV512kYW/NKpzWZcPCm5IFE4zd1KKOgQjj 3iK0XC1K56JCO9wHN1+9GnhnIzdREUxgkk+piL5OABVF16VgeTF2KKRkCgYUJ2ySGvxT 1zTASoOc4RziFyxWbTr2Wnssq1sgQPTrNwbIp1rmvygGhHDZBi5QWmVoTrGBqYLyNg1H JhBzOW8zw1LPe3d2uB5GNWJHD4h5DWyXepGFfnRqdFBtoC7Rz1iFkZ+ANtmyuN0b78Bl ia9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4k5Myay05AM2Oo0xfCoDhU14IQFwKo1Bf+NVKofElMA=; b=wLq5kqEyFtcupuOAUDnw0WkS0Wr4c3IurI+vm+nhlp884yw0ivskNozFCtER3A1kUJ mTbOFPqVNKn4mdIkc1lY1CaFZ3jz+fdM6NhN4/exmTenT0X0V8+dKtTnONEfDGqL/VsV tU8LFIWhFvouTqjfaz9cEaHY9JYfe8GZVGCyfMogtdGuzp4XtbN2x/hkz2Shb3is79og dUGJA3dYzk/9SdrwST/3bHWIjJXOUkQbjxWKtOpzSKdK6g+DizDYaPtH0Bo/X+lg77UK zA0nkniI0UqAq71y8rrAcsP15dQmaJ5z7Ss5RLgYR79MnS4KFMyy2GsJD/XzzBgz07Fc TdRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2T4fdgxK; 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 f2si7081562ejc.542.2020.10.31.11.51.40; Sat, 31 Oct 2020 11:51:40 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2T4fdgxK; 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 S1728369AbgJaSvc (ORCPT + 6 others); Sat, 31 Oct 2020 14:51:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:34626 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727967AbgJaSvc (ORCPT ); Sat, 31 Oct 2020 14:51: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 A9CF42072C; Sat, 31 Oct 2020 18:51:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170291; bh=L/wwVjEw4yK3HrrDGnVbqNPnHVt+3J4zsBLbrQeLoAg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2T4fdgxKWVVEeH2UN1eUM9k6+gBC3+VXRUiuufb3sPEKEHo+mQMiQkFX4jl7cysTl k+EWLnlaI98RNCbnXqHDhBoLT+QZKh5x8Mq69RaboVGxKxtoGNUUM0O+ETG2CZlelZ nahgLs6rU6GwU18JSfv8wPoBOFxCxpTtfe1DsiSA= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Slawomir Stepien Subject: [PATCH 03/46] dt-bindings:iio:potentiometer:microchip, mcp4131 txt to yaml conversion Date: Sat, 31 Oct 2020 18:48:11 +0000 Message-Id: <20201031184854.745828-4-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron This binding is very simple, but I think the very large number of compatible values make it unsuitable for moving to trivial-devices.yaml. Main change in the conversion was reordering the compatible list to numerical order. Signed-off-by: Jonathan Cameron Cc: Slawomir Stepien --- .../bindings/iio/potentiometer/mcp4131.txt | 84 --------------- .../iio/potentiometer/microchip,mcp4131.yaml | 102 ++++++++++++++++++ 2 files changed, 102 insertions(+), 84 deletions(-) -- 2.28.0 Reviewed-by: Slawomir Stepien diff --git a/Documentation/devicetree/bindings/iio/potentiometer/mcp4131.txt b/Documentation/devicetree/bindings/iio/potentiometer/mcp4131.txt deleted file mode 100644 index 3ccba16f7035..000000000000 --- a/Documentation/devicetree/bindings/iio/potentiometer/mcp4131.txt +++ /dev/null @@ -1,84 +0,0 @@ -* Microchip MCP413X/414X/415X/416X/423X/424X/425X/426X Digital Potentiometer - driver - -The node for this driver must be a child node of a SPI controller, hence -all mandatory properties described in - - Documentation/devicetree/bindings/spi/spi-bus.txt - -must be specified. - -Required properties: - - compatible: Must be one of the following, depending on the - model: - "microchip,mcp4131-502" - "microchip,mcp4131-103" - "microchip,mcp4131-503" - "microchip,mcp4131-104" - "microchip,mcp4132-502" - "microchip,mcp4132-103" - "microchip,mcp4132-503" - "microchip,mcp4132-104" - "microchip,mcp4141-502" - "microchip,mcp4141-103" - "microchip,mcp4141-503" - "microchip,mcp4141-104" - "microchip,mcp4142-502" - "microchip,mcp4142-103" - "microchip,mcp4142-503" - "microchip,mcp4142-104" - "microchip,mcp4151-502" - "microchip,mcp4151-103" - "microchip,mcp4151-503" - "microchip,mcp4151-104" - "microchip,mcp4152-502" - "microchip,mcp4152-103" - "microchip,mcp4152-503" - "microchip,mcp4152-104" - "microchip,mcp4161-502" - "microchip,mcp4161-103" - "microchip,mcp4161-503" - "microchip,mcp4161-104" - "microchip,mcp4162-502" - "microchip,mcp4162-103" - "microchip,mcp4162-503" - "microchip,mcp4162-104" - "microchip,mcp4231-502" - "microchip,mcp4231-103" - "microchip,mcp4231-503" - "microchip,mcp4231-104" - "microchip,mcp4232-502" - "microchip,mcp4232-103" - "microchip,mcp4232-503" - "microchip,mcp4232-104" - "microchip,mcp4241-502" - "microchip,mcp4241-103" - "microchip,mcp4241-503" - "microchip,mcp4241-104" - "microchip,mcp4242-502" - "microchip,mcp4242-103" - "microchip,mcp4242-503" - "microchip,mcp4242-104" - "microchip,mcp4251-502" - "microchip,mcp4251-103" - "microchip,mcp4251-503" - "microchip,mcp4251-104" - "microchip,mcp4252-502" - "microchip,mcp4252-103" - "microchip,mcp4252-503" - "microchip,mcp4252-104" - "microchip,mcp4261-502" - "microchip,mcp4261-103" - "microchip,mcp4261-503" - "microchip,mcp4261-104" - "microchip,mcp4262-502" - "microchip,mcp4262-103" - "microchip,mcp4262-503" - "microchip,mcp4262-104" - -Example: -mcp4131: mcp4131@0 { - compatible = "mcp4131-502"; - reg = <0>; - spi-max-frequency = <500000>; -}; diff --git a/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp4131.yaml b/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp4131.yaml new file mode 100644 index 000000000000..834d17ae3730 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp4131.yaml @@ -0,0 +1,102 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/potentiometer/microchip,mcp4131.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Microchip MCP413X/414X/415X/416X/423X/424X/425X/426X Digital Potentiometer +maintainers: + - Slawomir Stepien + +properties: + compatible: + enum: + - microchip,mcp4131-103 + - microchip,mcp4131-104 + - microchip,mcp4131-502 + - microchip,mcp4131-503 + - microchip,mcp4132-103 + - microchip,mcp4132-104 + - microchip,mcp4132-502 + - microchip,mcp4132-503 + - microchip,mcp4141-103 + - microchip,mcp4141-104 + - microchip,mcp4141-502 + - microchip,mcp4141-503 + - microchip,mcp4142-103 + - microchip,mcp4142-104 + - microchip,mcp4142-502 + - microchip,mcp4142-503 + - microchip,mcp4151-103 + - microchip,mcp4151-104 + - microchip,mcp4151-502 + - microchip,mcp4151-503 + - microchip,mcp4152-103 + - microchip,mcp4152-104 + - microchip,mcp4152-502 + - microchip,mcp4152-503 + - microchip,mcp4161-103 + - microchip,mcp4161-104 + - microchip,mcp4161-502 + - microchip,mcp4161-503 + - microchip,mcp4162-103 + - microchip,mcp4162-104 + - microchip,mcp4162-502 + - microchip,mcp4162-503 + - microchip,mcp4231-103 + - microchip,mcp4231-104 + - microchip,mcp4231-502 + - microchip,mcp4231-503 + - microchip,mcp4232-103 + - microchip,mcp4232-104 + - microchip,mcp4232-502 + - microchip,mcp4232-503 + - microchip,mcp4241-103 + - microchip,mcp4241-104 + - microchip,mcp4241-502 + - microchip,mcp4241-503 + - microchip,mcp4242-103 + - microchip,mcp4242-104 + - microchip,mcp4242-502 + - microchip,mcp4242-503 + - microchip,mcp4251-103 + - microchip,mcp4251-104 + - microchip,mcp4251-502 + - microchip,mcp4251-503 + - microchip,mcp4252-103 + - microchip,mcp4252-104 + - microchip,mcp4252-502 + - microchip,mcp4252-503 + - microchip,mcp4261-103 + - microchip,mcp4261-104 + - microchip,mcp4261-502 + - microchip,mcp4261-503 + - microchip,mcp4262-103 + - microchip,mcp4262-104 + - microchip,mcp4262-502 + - microchip,mcp4262-503 + + reg: + maxItems: 1 + + spi-max-frequency: true + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + potentiometer@0 { + compatible = "mcp4131-502"; + reg = <0>; + spi-max-frequency = <500000>; + }; + }; +... From patchwork Sat Oct 31 18:48:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 314638 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 428A6C388F7 for ; Sat, 31 Oct 2020 18:51:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0F53E20729 for ; Sat, 31 Oct 2020 18:51:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170295; bh=WKV36q4UiFqh94PWNWGqvJw5ltboEidH/EpBsVhJWR8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=k5UjdgxlLslXT8IA/rPI4tkkVoU4vX5NRTiQnBoYbtIbpJQ/VaQWdGsddRkxaa6AU BViXO/XnNlNAkObCvY1Vj/ZtKYRIb8saZQl8XG5B5i9B5UEjYt3ma8T5ZzvTWGYFi4 MGEOtEJEspQt5gzyBaE3Y4iF4VVkjNadez0cGP1Y= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727967AbgJaSve (ORCPT ); Sat, 31 Oct 2020 14:51:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:34656 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728395AbgJaSvd (ORCPT ); Sat, 31 Oct 2020 14:51:33 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1B0BA20723; Sat, 31 Oct 2020 18:51:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170293; bh=WKV36q4UiFqh94PWNWGqvJw5ltboEidH/EpBsVhJWR8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GHmJqDlBy5PGrG+f9fSic28HL/SouLq/Yuyc+WpqVF1lMKU9wzFVG2gaWMnbkC4Db 3zcJKcULon8iorftd8Z7VIIu1kqKbrcYc26r2idfRBHhWaah+JtYPqHVwngFmbf8XC fTqgvOBXoSsNZHweqqR7uKGebCQa3XI7yGY1P43g= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Chris Coffey Subject: [PATCH 04/46] dt-bindings:iio:potentiometer:microchip, mcp41010 txt to yaml conversion Date: Sat, 31 Oct 2020 18:48:12 +0000 Message-Id: <20201031184854.745828-5-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron A simple binding that I almost just move to trivial devices. The small amount of additional documentation and relatively large number of compatible entries convinced me to suggest we keep this one separately documented. Signed-off-by: Jonathan Cameron Cc: Chris Coffey --- .../bindings/iio/potentiometer/mcp41010.txt | 28 ----------- .../iio/potentiometer/microchip,mcp41010.yaml | 48 +++++++++++++++++++ 2 files changed, 48 insertions(+), 28 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/potentiometer/mcp41010.txt b/Documentation/devicetree/bindings/iio/potentiometer/mcp41010.txt deleted file mode 100644 index 4f245e8469fd..000000000000 --- a/Documentation/devicetree/bindings/iio/potentiometer/mcp41010.txt +++ /dev/null @@ -1,28 +0,0 @@ -* Microchip MCP41010/41050/41100/42010/42050/42100 Digital Potentiometer - -Datasheet publicly available at: -https://ww1.microchip.com/downloads/en/devicedoc/11195c.pdf - -The node for this driver must be a child node of a SPI controller, hence -all mandatory properties described in - - Documentation/devicetree/bindings/spi/spi-bus.txt - -must be specified. - -Required properties: - - compatible: Must be one of the following, depending on the - model: - "microchip,mcp41010" - "microchip,mcp41050" - "microchip,mcp41100" - "microchip,mcp42010" - "microchip,mcp42050" - "microchip,mcp42100" - -Example: -potentiometer@0 { - compatible = "microchip,mcp41010"; - reg = <0>; - spi-max-frequency = <500000>; -}; diff --git a/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp41010.yaml b/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp41010.yaml new file mode 100644 index 000000000000..567697d996ec --- /dev/null +++ b/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp41010.yaml @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/potentiometer/microchip,mcp41010.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Microchip MCP41010/41050/41100/42010/42050/42100 Digital Potentiometer + +maintainers: + - Chris Coffey + +description: | + Datasheet: https://ww1.microchip.com/downloads/en/devicedoc/11195c.pdf + +properties: + compatible: + enum: + - microchip,mcp41010 + - microchip,mcp41050 + - microchip,mcp41100 + - microchip,mcp42010 + - microchip,mcp42050 + - microchip,mcp42100 + + reg: + maxItems: 1 + + spi-max-frequency: true + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + potentiometer@0 { + compatible = "microchip,mcp41010"; + reg = <0>; + spi-max-frequency = <500000>; + }; + }; +... From patchwork Sat Oct 31 18:48:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320126 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451441ilc; Sat, 31 Oct 2020 11:51:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMDnyqTyeJFW2UZP8y4RKYLKUPMCmQw3y8oph2gIAC9SEvLiKvHSAO/r10ShQiiUmHl0bj X-Received: by 2002:a50:f316:: with SMTP id p22mr9018735edm.201.1604170302602; Sat, 31 Oct 2020 11:51:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170302; cv=none; d=google.com; s=arc-20160816; b=VJO1jN5b9OspWoyZAYmr/1URFS6WSvb+vAL2+kRQSc2MxKsdyJ3FjS0TeiggyqWLgk HAMa3lb3Z+6MSzLVi8nhfqSXYps/egplEEclF5PFx8IepjTof4bsuEKraoXws+RSwcFx tyo4G3zmZzHHRs2rNvNRJQiT1Cwm4jkZXlmKqjRDMyvca1MzjoXwhJUVXNStCvfo1NTk w4lBg70N7hKp+2NvwK17orEYeShbxZvHsISIJVwo/PU0X8Z/7z97T6ChYtueof3VlZGh OSn5q6jp32+YDALcs2chFMB1eqIvgZNCJDsfA/Nxs588DouFTnhQX+SgSVYVuD06C3wn dZog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1DLhDLpEPl1KraOqoQuF2E+x2TsVcfrKcSl06I1lfxQ=; b=bsEdCiMFDk4piPETVGqhpFIpkjGDgHtRvKm20wAZ6i0BuHPI73LEk6IPi9B2v8NwNL z9xz1N69eFtextIbQ+ojWzh5aDjWJvYh/ZOrz6CcKXfuSQ2DKdtItiE5z8QY6zGwicuI mdqpU8Xk+SgNxXGG9job9n6mgPK/UyAvlpdJrqTGNkahOo9ORlqvVUeik2+VBd+6+Z6N w62hJinYg3j5aOXof7/PQX4a5HM+wOeX4/4SXyL8oKiT0fFO9rgdZvi7RO+iWYTP8L0a FyUZ2m3IP5F9gjKDlwylx0ThrkmWLdSNYsEK7KjeBKva1rs2uiVwnfp6/idfLEznvpOj gBIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oj1g4dvo; 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 f2si7081562ejc.542.2020.10.31.11.51.42; Sat, 31 Oct 2020 11:51: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=oj1g4dvo; 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 S1728400AbgJaSvg (ORCPT + 6 others); Sat, 31 Oct 2020 14:51:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:34686 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728395AbgJaSvf (ORCPT ); Sat, 31 Oct 2020 14:51:35 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 82D3420720; Sat, 31 Oct 2020 18:51:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170294; bh=GL5NLMdYAIJDAG2pgmplmCsOw7mxQvaz0GX+UG2FpR4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oj1g4dvoursWtKCmfQ6m0XnBGkbFRD0K8Vx5+6fAX1yvQTqW3hKa0pU2rq/Osm5so aEB/BHSCKPfVjBlVD2x1VvATqQPXwz6poq4t5o/uWNKJrOXvCf+Nl24YGayg9HRROM V8teHVEhVTosFqzKgWpRLs1l8SOaqAmbUiR7oKfo= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Marcelo Schmitt , Gabriel Capella , Alexandru Ardelean Subject: [PATCH 05/46] dt-bindings:iio:impedance-analyzer:adi, ad5933 yaml conversion. Date: Sat, 31 Oct 2020 18:48:13 +0000 Message-Id: <20201031184854.745828-6-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron The example in this one had a completely wrong compatible so I've fixed that. Otherwise, a fairly simple conversion. Note the driver itself is still in staging. Looking back at the last discussion around this, I think we were just waiting for some test results on some refactors. As such the binding should be stable even if the driver might need a little more love and attention. Signed-off-by: Jonathan Cameron Cc: Marcelo Schmitt Cc: Gabriel Capella Cc: Alexandru Ardelean --- .../iio/impedance-analyzer/ad5933.txt | 26 -------- .../iio/impedance-analyzer/adi,ad5933.yaml | 59 +++++++++++++++++++ 2 files changed, 59 insertions(+), 26 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/impedance-analyzer/ad5933.txt b/Documentation/devicetree/bindings/iio/impedance-analyzer/ad5933.txt deleted file mode 100644 index 5ff38728ff91..000000000000 --- a/Documentation/devicetree/bindings/iio/impedance-analyzer/ad5933.txt +++ /dev/null @@ -1,26 +0,0 @@ -Analog Devices AD5933/AD5934 Impedance Converter, Network Analyzer - -https://www.analog.com/media/en/technical-documentation/data-sheets/AD5933.pdf -https://www.analog.com/media/en/technical-documentation/data-sheets/AD5934.pdf - -Required properties: - - compatible : should be one of - "adi,ad5933" - "adi,ad5934" - - reg : the I2C address. - - vdd-supply : The regulator supply for DVDD, AVDD1 and AVDD2 when they - are connected together. - -Optional properties: -- clocks : external clock reference. -- clock-names : must be "mclk" if clocks is set. - -Example for a I2C device node: - - impedance-analyzer@0d { - compatible = "adi,adxl345"; - reg = <0x0d>; - vdd-supply = <&vdd_supply>; - clocks = <&ref_clk>; - clock-names = "mclk"; - }; diff --git a/Documentation/devicetree/bindings/iio/impedance-analyzer/adi,ad5933.yaml b/Documentation/devicetree/bindings/iio/impedance-analyzer/adi,ad5933.yaml new file mode 100644 index 000000000000..2ad043554b9c --- /dev/null +++ b/Documentation/devicetree/bindings/iio/impedance-analyzer/adi,ad5933.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/impedance-analyzer/adi,ad5933.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD5933/AD5934 Impedance Converter, Network Analyzer + +maintainers: + - Marcelo Schmitt + - Gabriel Capella + +description: | + https://www.analog.com/media/en/technical-documentation/data-sheets/AD5933.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/AD5934.pdf + +properties: + compatible: + enum: + - adi,ad5933 + - adi,ad5934 + + reg: + maxItems: 1 + + vdd-supply: + description: | + The regulator supply for DVDD, AVDD1 and AVDD2 when they + are connected together. Used to calculate voltage scaling of measurement + channels. + + clocks: + maxItems: 1 + + clock-names: + const: mclk + +additionalProperties: false + +required: + - compatible + - reg + - vdd-supply + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + impedance-analyzer@d { + compatible = "adi,ad5933"; + reg = <0x0d>; + vdd-supply = <&vdd_supply>; + clocks = <&ref_clk>; + clock-names = "mclk"; + }; + }; +... From patchwork Sat Oct 31 18:48:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 314637 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4AF5FC55179 for ; Sat, 31 Oct 2020 18:51:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1BE8220724 for ; Sat, 31 Oct 2020 18:51:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170298; bh=KjGYay2ITMr/cJxUpcpyVNbSXDT6KAOvgzmxPMfreIA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=nYKP5+RisHlFw7kubq6CR1F84n7xBBYOogz4D853DNbwlGHRfb31ueNh7754y5Ilp SPistuZI7+hHP+mjBLl7st6OT2H/H6gTHK5IUMFgIilcHHezRoEwZE7981x/pSNSMJ Cu1RLRlEQ008Vo1/JhwQmZSpjCmK4Xy74Iq4wx20= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728395AbgJaSvh (ORCPT ); Sat, 31 Oct 2020 14:51:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:34722 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSvg (ORCPT ); Sat, 31 Oct 2020 14:51: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 40EE62071A; Sat, 31 Oct 2020 18:51:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170296; bh=KjGYay2ITMr/cJxUpcpyVNbSXDT6KAOvgzmxPMfreIA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SrsHROi3HW/azXQRN66ayjd2XhvAsjApB0gaBmfWs2U8SF1cwwfI2bvTDktLibuY3 2z0GXmS6m+Wjla4m7X+UtLa905e4x8iIfYl1mJ5NzWriIr8vLPfRY5Gzts/3l104OQ VkBnyhph0b6yBMpESxcIh3yAPOFlSHpWr2iLHMyg= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Karol Wrona Subject: [PATCH 06/46] dt-bindings:iio:samsung, sensorhub-rinato: yaml conversion Date: Sat, 31 Oct 2020 18:48:14 +0000 Message-Id: <20201031184854.745828-7-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Renamed to be more specific as I would be surprised if this is the only sensorhub Samsung have ever shipped. Fixed missing reg property in the example Signed-off-by: Jonathan Cameron Cc: Karol Wrona --- .../iio/samsung,sensorhub-rinato.yaml | 72 +++++++++++++++++++ .../devicetree/bindings/iio/sensorhub.txt | 24 ------- 2 files changed, 72 insertions(+), 24 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/samsung,sensorhub-rinato.yaml b/Documentation/devicetree/bindings/iio/samsung,sensorhub-rinato.yaml new file mode 100644 index 000000000000..62366cbd37e5 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/samsung,sensorhub-rinato.yaml @@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/samsung,sensorhub-rinato.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung Sensorhub driver + +maintainers: + - Karol Wrona + +description: | + Sensorhub is a MCU which manages several sensors and also plays the role + of a virtual sensor device. + +properties: + compatible: + enum: + - samsung,sensorhub-rinato + - samsung,sensorhub-thermostat + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + ap-mcu-gpios: + maxItems: 1 + description: + Application Processor to sensorhub line - used during communication + + mcu-ap-gpios: + maxItems: 1 + description: + Sensorhub to Application Processor - used during communication + + mcu-reset-gpios: + maxItems: 1 + description: + Reset the sensorhub. + + spi-max-frequency: true + +additionalProperties: false + +required: + - compatible + - reg + - interrupts + - ap-mcu-gpios + - mcu-ap-gpios + - mcu-reset-gpios + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + sensorhub@0 { + compatible = "samsung,sensorhub-rinato"; + reg = <0>; + spi-max-frequency = <5000000>; + interrupt-parent = <&gpx0>; + interrupts = <2 0>; + ap-mcu-gpios = <&gpx0 0 0>; + mcu-ap-gpios = <&gpx0 4 0>; + mcu-reset-gpios = <&gpx0 5 0>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/sensorhub.txt b/Documentation/devicetree/bindings/iio/sensorhub.txt deleted file mode 100644 index b6ac0457d4ea..000000000000 --- a/Documentation/devicetree/bindings/iio/sensorhub.txt +++ /dev/null @@ -1,24 +0,0 @@ -Samsung Sensorhub driver - -Sensorhub is a MCU which manages several sensors and also plays the role -of a virtual sensor device. - -Required properties: -- compatible: "samsung,sensorhub-rinato" or "samsung,sensorhub-thermostat" -- spi-max-frequency: max SPI clock frequency -- interrupts: communication interrupt -- ap-mcu-gpios: [out] ap to sensorhub line - used during communication -- mcu-ap-gpios: [in] sensorhub to ap - used during communication -- mcu-reset-gpios: [out] sensorhub reset - -Example: - - shub_spi: shub { - compatible = "samsung,sensorhub-rinato"; - spi-max-frequency = <5000000>; - interrupt-parent = <&gpx0>; - interrupts = <2 0>; - ap-mcu-gpios = <&gpx0 0 0>; - mcu-ap-gpios = <&gpx0 4 0>; - mcu-reset-gpios = <&gpx0 5 0>; - }; From patchwork Sat Oct 31 18:48:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320128 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451454ilc; Sat, 31 Oct 2020 11:51:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkV01Kxi3TltiVaxJc0as/145s4e04QxT7cJ8iwAUO1jmALwFLHZppkukqdXAzl8sCdmMX X-Received: by 2002:aa7:ce18:: with SMTP id d24mr9171720edv.9.1604170304226; Sat, 31 Oct 2020 11:51:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170304; cv=none; d=google.com; s=arc-20160816; b=rtLQoDLyBQy0/wIR5DBGL9SLFn+aNZWClIEm/2xra9nKLWIYtNrjVE2uSzn50GQci+ KG+KjEbns6qz+fYJ4Auh22lrKjend8ccg6Qe0O6ft7lvmDvRYFtjOiap3wxGy3eO9PZM rl2oiCKa4MuYqomUigk4UnVHPUGjew7yr5Mo9++wGVZ8T0KY3EPcwNVCne5Aw073di4J HSGPOwEqSCsWwuo68DTFfMVc0XFwUWUN7EBEMvcUpz/PsgjDapQ08IU7V7RrJVjMvy0e bmbe0drZHlMyqCHIBNYkRdVeh09lqlXghSqoZeA2Hv1pi8I4LcqheZSgZ2zQgrrzGHk4 +OoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ANm2ogH9Tke3xgoSaJKi1H0bfoE0Zffw99KoE5EZ42s=; b=cYbga5FnzxzLwz/HnzItvDhP92oZBFBaW0tpLX4HU5aqhP/5ypebrU2VwIDEGimL2o lXHnjfaK8G575i9r3si2M6HBPDSos4xOiJIYFRtxsK4ikw0XNxMAN1Uvf8gvSfNKmzBl yERtfPVbaAQGyYbU5kKetj8NsPHfZZmBO0cqMW1piQS0DTFI0YGXLadDt36ZJHecGt1/ 1GMEfb4KU8Jyh5+SYbCFzZdo1MpzcWTZM8fX2Jueel7vq+EB75HcShFqUn+gDNbVnU7Y l5LwlfZpza5pWLkrTO21BPcsIHFNXe1GU8b/15/NvpUU2zoj1N+31dxDACQXEkcoDgbt Ssyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=obWHc3kU; 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 f2si7081562ejc.542.2020.10.31.11.51.44; Sat, 31 Oct 2020 11:51: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=obWHc3kU; 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 S1728406AbgJaSvi (ORCPT + 6 others); Sat, 31 Oct 2020 14:51:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:34754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSvi (ORCPT ); Sat, 31 Oct 2020 14:51: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 A6C2320706; Sat, 31 Oct 2020 18:51:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170297; bh=MaZ6juAQAdHg0lqTc61n3ArH0OeqT0UeAm+1s/Ey5bU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=obWHc3kULienRvsK2Ombc2HQVI5ou+4ztA4MD8ieP/q2r4iucp/0mvflUQAlkoEV8 fOEXxyUHatc3zxkgBDCEjDm+AdV9riLh9XASGFt8O3laS+wPBxDrVVrUADRmvEm657 ZiO+CtfNdyVWf5QEAsuVXW6nzPfEnEWlHhvPuRKs= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , "Andrew F . Davis" Subject: [PATCH 07/46] dt-bindings:iio:health:ti, afe4403: txt to yaml binding Date: Sat, 31 Oct 2020 18:48:15 +0000 Message-Id: <20201031184854.745828-8-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron A few questions came up whilst converting this one. 1) What is actually required? - Checking Linux driver, interrupt is not, and the tx-supply could be supplied by a stub regulator as long as it's always on. As such I have reduced the required list to just compatible and reg. 2) What is the regulator called? - It's tx-supply in the binding doc, but the driver request tx_sup I've left this alone for now. Andrew could you confirm what is intended for this? Signed-off-by: Jonathan Cameron Cc: Andrew F. Davis --- .../bindings/iio/health/afe4403.txt | 33 ------------ .../bindings/iio/health/ti,afe4403.yaml | 54 +++++++++++++++++++ 2 files changed, 54 insertions(+), 33 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/health/afe4403.txt b/Documentation/devicetree/bindings/iio/health/afe4403.txt deleted file mode 100644 index 8e412054d6d5..000000000000 --- a/Documentation/devicetree/bindings/iio/health/afe4403.txt +++ /dev/null @@ -1,33 +0,0 @@ -Texas Instruments AFE4403 Heart rate and Pulse Oximeter - -Required properties: - - compatible : Should be "ti,afe4403". - - reg : SPI chip select address of device. - - tx-supply : Regulator supply to transmitting LEDs. - - interrupts : The interrupt line the device ADC_RDY pin is - connected to. For details refer to, - ../../interrupt-controller/interrupts.txt. - -Optional properties: - - reset-gpios : GPIO used to reset the device. - For details refer to, ../../gpio/gpio.txt. - -For other required and optional properties of SPI slave nodes -please refer to ../../spi/spi-bus.txt. - -Example: - -&spi0 { - heart_mon@0 { - compatible = "ti,afe4403"; - reg = <0>; - spi-max-frequency = <10000000>; - - tx-supply = <&vbat>; - - interrupt-parent = <&gpio1>; - interrupts = <28 IRQ_TYPE_EDGE_RISING>; - - reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; - }; -}; diff --git a/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml b/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml new file mode 100644 index 000000000000..5c86db65c033 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml @@ -0,0 +1,54 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/health/ti,afe4403.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments AFE4403 Heart rate and Pulse Oximeter + +maintainers: + - Andrew F. Davis + +properties: + compatible: + const: ti,afe4403 + + reg: + maxItems: 1 + + tx-supply: + description: Supply to transmitting LEDs. + + interrupts: + maxItems: 1 + description: Connected to ADC_RDY pin. + + reset-gpios: true + + spi-max-frequency: true + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + #include + #include + spi { + #address-cells = <1>; + #size-cells = <0>; + + heart_mon@0 { + compatible = "ti,afe4403"; + reg = <0>; + spi-max-frequency = <10000000>; + tx-supply = <&vbat>; + interrupt-parent = <&gpio1>; + interrupts = <28 IRQ_TYPE_EDGE_RISING>; + reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; + }; + }; +... From patchwork Sat Oct 31 18:48:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 314636 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 271B8C388F7 for ; Sat, 31 Oct 2020 18:51:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E248A20731 for ; Sat, 31 Oct 2020 18:51:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170300; bh=e/MkVrjRakw7cLnmR3YugQ6Pwb34z3r6wXW5JBj6mss=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=r7sZrA5eNRXt21RRySSMbm4uI7nW9i6+lLSyupI1S4vUtckHdkUeTAE4wmnVJyQZJ 6ewQCXbBCFlRArQo7y+YUrQznDBKeStAh9ckHIytuEhToHOMpYbDysFwm8DBtdY8hZ iIuORLnbyUablZhxaXscTZ/FS1RsnNsQ4LkIdDQ0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728410AbgJaSvk (ORCPT ); Sat, 31 Oct 2020 14:51:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:34790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSvk (ORCPT ); Sat, 31 Oct 2020 14:51:40 -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 19A2820702; Sat, 31 Oct 2020 18:51:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170299; bh=e/MkVrjRakw7cLnmR3YugQ6Pwb34z3r6wXW5JBj6mss=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LtpWeygI1e5Ap4EvY8OlSPnBCVaiO9OZBLB9MLK6Lo4+SWW9Yz0u2n8vd4LJPJsbW Mld4g7ZijLcREllJuPlBh4uzEFP1jmWYAkCaZBiY7i+C0BpzyX6prCwOSNJR2Y/0B4 iCchAtiXb8XISYmc3Wtt2sk4l16EMgMVIHoxr1Bk= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , "Andrew F . Davis" Subject: [PATCH 08/46] dt-bindings:iio:health:ti, afe4404: txt to yaml conversion Date: Sat, 31 Oct 2020 18:48:16 +0000 Message-Id: <20201031184854.745828-9-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron This basically has same questions as for the afe4403. We could combine the two bindings, but as the drivers are separate and it would be a little fiddly due to different buses let's keep the separating. To repeat questions from the ti,afe4403 binding. A few questions came up whilst converting this one. 1) What is actually required? - Checking Linux driver, interrupt is not, and the tx-supply could be supplied by a stub regulator as long as it's always on. As such I have reduced the required list to just compatible and reg. 2) What is the regulator called? - It's tx-supply in the binding doc, but the driver request tx_sup I've left this alone for now. Andrew could you confirm what is intended for this? Signed-off-by: Jonathan Cameron Cc: Andrew F. Davis --- .../bindings/iio/health/afe4404.txt | 29 ----------- .../bindings/iio/health/ti,afe4404.yaml | 51 +++++++++++++++++++ 2 files changed, 51 insertions(+), 29 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/health/afe4404.txt b/Documentation/devicetree/bindings/iio/health/afe4404.txt deleted file mode 100644 index 0b52830a0d9c..000000000000 --- a/Documentation/devicetree/bindings/iio/health/afe4404.txt +++ /dev/null @@ -1,29 +0,0 @@ -Texas Instruments AFE4404 Heart rate and Pulse Oximeter - -Required properties: - - compatible : Should be "ti,afe4404". - - reg : I2C address of the device. - - tx-supply : Regulator supply to transmitting LEDs. - - interrupts : The interrupt line the device ADC_RDY pin is - connected to. For details refer to, - ../interrupt-controller/interrupts.txt. - -Optional properties: - - reset-gpios : GPIO used to reset the device. - For details refer to, ../gpio/gpio.txt. - -Example: - -&i2c2 { - heart_mon@58 { - compatible = "ti,afe4404"; - reg = <0x58>; - - tx-supply = <&vbat>; - - interrupt-parent = <&gpio1>; - interrupts = <28 IRQ_TYPE_EDGE_RISING>; - - reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; - }; -}; diff --git a/Documentation/devicetree/bindings/iio/health/ti,afe4404.yaml b/Documentation/devicetree/bindings/iio/health/ti,afe4404.yaml new file mode 100644 index 000000000000..187b99b22312 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/health/ti,afe4404.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/health/ti,afe4404.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments AFE4404 Heart rate and Pulse Oximeter + +maintainers: + - Andrew F. Davis + +properties: + compatible: + const: ti,afe4403 + + reg: + maxItems: 1 + + tx-supply: + description: Supply to transmitting LEDs. + + interrupts: + maxItems: 1 + description: Connected to ADC_RDY pin. + + reset-gpios: true + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + #include + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + heart_mon@58 { + compatible = "ti,afe4404"; + reg = <0x58>; + tx-supply = <&vbat>; + interrupt-parent = <&gpio1>; + interrupts = <28 IRQ_TYPE_EDGE_RISING>; + reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; + }; + }; +... From patchwork Sat Oct 31 18:48:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320130 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451461ilc; Sat, 31 Oct 2020 11:51:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzW+jFZrOY2iG5Sdg4U3kBT3Yr2myJkST+NcycN5rEkQd1W+UGhosvnV/G7WLWKKJRAj5H/ X-Received: by 2002:a50:a454:: with SMTP id v20mr8683948edb.98.1604170305647; Sat, 31 Oct 2020 11:51:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170305; cv=none; d=google.com; s=arc-20160816; b=kOX+3Kk8aItk9PwA1aOyAJnTKOCEvPmKNPJeptmeESdnmhPi/lCnNfWNR5O4r9Efk6 M6Vws+RtsUWaELcPDuARo5z0uDbTdN9L4KSy12Y2sjRD3Gp3qkkX45CQ7MMez9r4yjtY z5NuZ6twkoEL13MkMOURIfO775noN+uzjnwtNFSAmY7G3zInAhMGRNKiYiKVepvgvCeC 4ZMf6jGxZ1KfMufmfpUSXVz2vrQnNAIyuIlwifKb5JpMxXnv0tNPw1OUwf3Z1ju7tV48 BZH/es5tAWfmX6l5eTQHvqirm82vWsj9dnNz23p2KTsahej/crUHJaz860GwKJpl5DFu +xZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=e2WGK/zd8VM4XGjjKYFMNzAiIZ/MsT/XUb3r/D/HkbQ=; b=uC5NkVaLg6eb9OUH064q+ODSKVoHtvk/uNIM7Rf5FauoZWY/b9/IgwAa+J6v9vwsMq cXd40Ej6s8XHgi5S7v5/44VPpRDYH8VFde8JlP7CFPUpwVikK9IkIZdzdwc3azJegC6i 1zaVqxv9CP4b8RSFaMDDf+hmrK2IiUwOarEsz2bUsGhZkl8+Gus5HO7a8cannEmTTGAj yF5TgBTO+xBtkqt52cq8WLI77v8wlJCXEdvvSZJY18nk7+v7zqB/3sTPsudZG2jrYnsp RGlCApRtVTFo4F5z525zN96TulfWPpAH+Y0ZeKHweWLlsYl4OcWfLfQK3rJCFWU+nNJL HLIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=g0NhWWG8; 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 f2si7081562ejc.542.2020.10.31.11.51.45; Sat, 31 Oct 2020 11:51: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=g0NhWWG8; 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 S1728413AbgJaSvl (ORCPT + 6 others); Sat, 31 Oct 2020 14:51:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:34820 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSvl (ORCPT ); Sat, 31 Oct 2020 14:51: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 8ABC82072C; Sat, 31 Oct 2020 18:51:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170300; bh=/J/l2AeYF3yjpmCWShBDSDO5jTSeg87IzhAe74Zry/k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g0NhWWG83362h1NELyxDN9oTMv+3WTI+z5ID8WvS/yGorBkMbEydAUrpINNFOQpSh heI86BZp13epzxiJB3ieX9lZzNCWBndiIpEZM06v/Svfm+nvPtuAKn6J9Dm0mEWgeg dn9iFRyBGvJ4VhoSNmfVNU+PpPb/grH/OUB9u5BE= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron Subject: [PATCH 09/46] dt-bindings:iio:health:maxim, max30100: txt to yaml conversion Date: Sat, 31 Oct 2020 18:48:17 +0000 Message-Id: <20201031184854.745828-10-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Straight forward conversion. As with other bindings I've dropped any standrd description, but kept the unusual bits, in thisscase the maxim,led-current-microamp and it's description. Signed-off-by: Jonathan Cameron --- .../bindings/iio/health/max30100.txt | 28 ---------- .../bindings/iio/health/maxim,max30100.yaml | 52 +++++++++++++++++++ 2 files changed, 52 insertions(+), 28 deletions(-) -- 2.28.0 Acked-by: Matt Ranostay diff --git a/Documentation/devicetree/bindings/iio/health/max30100.txt b/Documentation/devicetree/bindings/iio/health/max30100.txt deleted file mode 100644 index 0054908a6e74..000000000000 --- a/Documentation/devicetree/bindings/iio/health/max30100.txt +++ /dev/null @@ -1,28 +0,0 @@ -Maxim MAX30100 heart rate and pulse oximeter sensor - -* https://datasheets.maximintegrated.com/en/ds/MAX30100.pdf - -Required properties: - - compatible: must be "maxim,max30100" - - reg: the I2C address of the sensor - - interrupts: the sole interrupt generated by the device - - Refer to interrupt-controller/interrupts.txt for generic - interrupt client node bindings. - -Optional properties: - - maxim,led-current-microamp: configuration for LED current in microamperes - while the engine is running. First indexed value is the configuration for - the RED LED, and second value is for the IR LED. - - Refer to the datasheet for the allowed current values. - -Example: - -max30100@57 { - compatible = "maxim,max30100"; - reg = <0x57>; - maxim,led-current-microamp = <24000 50000>; - interrupt-parent = <&gpio1>; - interrupts = <16 2>; -}; diff --git a/Documentation/devicetree/bindings/iio/health/maxim,max30100.yaml b/Documentation/devicetree/bindings/iio/health/maxim,max30100.yaml new file mode 100644 index 000000000000..5684f2f61bcc --- /dev/null +++ b/Documentation/devicetree/bindings/iio/health/maxim,max30100.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/health/maxim,max30100.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX30100 heart rate and pulse oximeter sensor + +maintainers: + - Matt Ranostay + +properties: + compatible: + const: maxim,max30100 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + description: Connected to ADC_RDY pin. + + maxim,led-current-microamp: + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 2 + maxItems: 2 + description: | + LED current whilst the engine is running. First indexed value is + the configuration for the RED LED, and second value is for the IR LED. + +additionalProperties: false + +required: + - compatible + - reg + - interrupts + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + heart-rate@57 { + compatible = "maxim,max30100"; + reg = <0x57>; + maxim,led-current-microamp = <24000 50000>; + interrupt-parent = <&gpio1>; + interrupts = <16 2>; + }; + }; +... From patchwork Sat Oct 31 18:48:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 314635 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D46EFC56201 for ; Sat, 31 Oct 2020 18:51:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C77F20756 for ; Sat, 31 Oct 2020 18:51:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170303; bh=rZZAFoFY4fH119A17bhKvecRhAVptqTzLDX3wh/v2so=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=WVtNMzc85ZG9Qeq2UbHxK568kJ+l7wRHf9zmBW3SE6O+DgJhR5uCbInxW8txe4RMj YNyYfBxfLugjTxRMlidQp+oBFjFQTwH9YLox8y4IKcg2M+ChlqWkPRCl4Qo9xrIPLm 6aTYspmgYytK7wgZpPmd3LWRYsvTLWxTc0ui0hk8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728414AbgJaSvm (ORCPT ); Sat, 31 Oct 2020 14:51:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:34848 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSvm (ORCPT ); Sat, 31 Oct 2020 14:51:42 -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 CA60F20739; Sat, 31 Oct 2020 18:51:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170301; bh=rZZAFoFY4fH119A17bhKvecRhAVptqTzLDX3wh/v2so=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LiTsmGbQ31yFLrlHFUrUfUJUioOLxwB2G+7iHre475fwOpUKbfE1kNgXCSwkqkuB4 rNsRCQEmcVKzO5JRg95OzvsJC+Z5pm2kaBtedHi0/SZiT97eChabNSyaJbtimCptMX VTVY+9I9JS9HZEy156so1v3B46TDGfwyiUIWsLw4= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Matt Ranostay Subject: [PATCH 10/46] dt-bindings:iio:health:maxim, max30102: txt to yaml conversion Date: Sat, 31 Oct 2020 18:48:18 +0000 Message-Id: <20201031184854.745828-11-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Straight forward binding. Title was a bit of a challenge to keep short as this binding covers sensors for two entirely different purposes. Signed-off-by: Jonathan Cameron Cc: Matt Ranostay Acked-by: Matt Ranostay --- .../bindings/iio/health/max30102.txt | 33 -------- .../bindings/iio/health/maxim,max30102.yaml | 75 +++++++++++++++++++ 2 files changed, 75 insertions(+), 33 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/health/max30102.txt b/Documentation/devicetree/bindings/iio/health/max30102.txt deleted file mode 100644 index 7ef7ae40ae4f..000000000000 --- a/Documentation/devicetree/bindings/iio/health/max30102.txt +++ /dev/null @@ -1,33 +0,0 @@ -Maxim MAX30102 heart rate and pulse oximeter sensor -Maxim MAX30105 optical particle-sensing module - -* https://datasheets.maximintegrated.com/en/ds/MAX30102.pdf -* https://datasheets.maximintegrated.com/en/ds/MAX30105.pdf - -Required properties: - - compatible: must be "maxim,max30102" or "maxim,max30105" - - reg: the I2C address of the sensor - - interrupts: the sole interrupt generated by the device - - Refer to interrupt-controller/interrupts.txt for generic - interrupt client node bindings. - -Optional properties: - - maxim,red-led-current-microamp: configuration for red LED current - - maxim,ir-led-current-microamp: configuration for IR LED current - - maxim,green-led-current-microamp: configuration for green LED current - (max30105 only) - - Note that each step is approximately 200 microamps, ranging from 0 uA to - 50800 uA. - -Example: - -max30102@57 { - compatible = "maxim,max30102"; - reg = <0x57>; - maxim,red-led-current-microamp = <7000>; - maxim,ir-led-current-microamp = <7000>; - interrupt-parent = <&gpio1>; - interrupts = <16 2>; -}; diff --git a/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml b/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml new file mode 100644 index 000000000000..67d40f4a91a7 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml @@ -0,0 +1,75 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/health/maxim,max30102.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX30102 heart rate and pulse oximeter and MAX30105 particle-sensor + +maintainers: + - Matt Ranostay + +properties: + compatible: + enum: + - maxim,max30102 + - maxim,max30105 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + description: Connected to ADC_RDY pin. + + maxim,red-led-current-microamp: + $ref: /schemas/types.yaml#/definitions/uint32 + description: RED LED current. Each step is approximately 200 microamps. + minimum: 0 + maximum: 50800 + + maxim,ir-led-current-microamp: + $ref: /schemas/types.yaml#/definitions/uint32 + description: IR LED current. Each step is approximately 200 microamps. + minimum: 0 + maximum: 50800 + + maxim,green-led-current-microamp: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Green LED current. Each step is approximately 200 microamps. + minimum: 0 + maximum: 50800 + +allOf: + - if: + properties: + compatible: + contains: + const: maxim,max30100 + then: + properties: + maxim,green-led-current-microamp: false + +additionalProperties: false + +required: + - compatible + - reg + - interrupts + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + heart-rate@57 { + compatible = "maxim,max30102"; + reg = <0x57>; + maxim,red-led-current-microamp = <7000>; + maxim,ir-led-current-microamp = <7000>; + interrupt-parent = <&gpio1>; + interrupts = <16 2>; + }; + }; +... From patchwork Sat Oct 31 18:48:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320132 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451485ilc; Sat, 31 Oct 2020 11:51:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwj1AV8sQoVQSmtPMPyot/a6einMqotm1Rjx1sdAl2++GwraSf1XBTbF9lJevLirdeVPE7n X-Received: by 2002:a05:6402:1456:: with SMTP id d22mr8732615edx.77.1604170307141; Sat, 31 Oct 2020 11:51:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170307; cv=none; d=google.com; s=arc-20160816; b=HDDDFCzDjnGLz/3MB2pX/g21aq0pqKS9oU+czcRxRDJquCCoSwaJ7q0GDs/WhdzlNt PUfahmyro/kCp81m57eiY+/TSSnQ1qn/fNEcjJBa183wIrAZxvubdpJ0BUW6nBXlsBQ5 h0Ck8DVXrIh88ERG210ZftTTdlpxJYt89Pkdw2ZU5vd8WQWHEaMxamd6WjW39dj9sCiG fNF+gixMJnZRAQU6eKefT39CHI3m5eZu/BVIeGWMEfrHmPm2Q04U2T7jxhAIX+sccpxX gFwGoEK75uCTLMpPT0UzCosiq/ysjsLTsfkOQu2kB/IAuGp9fcS0ygr5oIgBYmqQl4/f JGUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wE+v+EWDbbMxAEoZxpU8W2TBDUCJVJIoz4rwBNwHtUc=; b=IEtBm/JHzNMVa9RSPAsAElolIgSXrVmnas1eT6vp4hn8DEjwmMqhnvr8YCbo/1NY3r sv85JdTCDEd8x/9OdfjcuzXnuuEXBwTQMNMFHJFmGi9LtQme99OaB0HCQXhO2Q7kgXbq YzWwIZJLOTgtLYgoeDRx3Sm0dYNiVdq/bJHjTc0ZrWJlzLhDgR8tm76WxyZrwZ8Tt0kt zClGWRhzQTaA46cfhifSfc+TYG1LQs92ksrEWZUknhji7hFRb2pK9keco3917oigxIBo Y8enDh8bc3ezhgYwzSnFD47DqsFc6bSzwEJqXJ0NO2szqwA1ktq6yvfmDD3dc3UKBR7V Id8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Qas9zPA9; 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 f2si7081562ejc.542.2020.10.31.11.51.46; Sat, 31 Oct 2020 11:51:47 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Qas9zPA9; 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 S1728417AbgJaSvo (ORCPT + 6 others); Sat, 31 Oct 2020 14:51:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:34880 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSvo (ORCPT ); Sat, 31 Oct 2020 14:51: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 3C05020731; Sat, 31 Oct 2020 18:51:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170303; bh=vIemXMQMymDLIT1z/e12ErAzM2pvezHbH0Eu/XLXaeM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qas9zPA9MuPk5kGxPeZ5s6yBYHik9kvY3GW+oirPyCWOx9oEqeXPaAxyYGWxRmNMA 9SQEtK9ecUBbLqW4jt/Fqd7U4P35pAfaV8PY5KJGTDu2wDLqREjsOhH490FhSyKYGu bjV2LWTfFVI3idiFrkb7frkDcLLNHSndjMr+NpKY= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Alexandru Ardelean Subject: [PATCH 11/46] dt-bindings:iio:imu:adi, adis16480: txt to yaml conversion Date: Sat, 31 Oct 2020 18:48:19 +0000 Message-Id: <20201031184854.745828-12-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Alexandru is currently listed as maintainer on basis of last person to touch the binding. Whilst the driver only uses one interrupt, the hardware can route events to one and dataready signal to the other so we should allow for either 1 or 2 interrupts. Signed-off-by: Jonathan Cameron Cc: Alexandru Ardelean --- .../bindings/iio/imu/adi,adis16480.txt | 86 ------------ .../bindings/iio/imu/adi,adis16480.yaml | 130 ++++++++++++++++++ 2 files changed, 130 insertions(+), 86 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/imu/adi,adis16480.txt b/Documentation/devicetree/bindings/iio/imu/adi,adis16480.txt deleted file mode 100644 index cd903a1d880d..000000000000 --- a/Documentation/devicetree/bindings/iio/imu/adi,adis16480.txt +++ /dev/null @@ -1,86 +0,0 @@ - -Analog Devices ADIS16480 and similar IMUs - -Required properties for the ADIS16480: - -- compatible: Must be one of - * "adi,adis16375" - * "adi,adis16480" - * "adi,adis16485" - * "adi,adis16488" - * "adi,adis16490" - * "adi,adis16495-1" - * "adi,adis16495-2" - * "adi,adis16495-3" - * "adi,adis16497-1" - * "adi,adis16497-2" - * "adi,adis16497-3" -- reg: SPI chip select number for the device -- spi-max-frequency: Max SPI frequency to use - see: Documentation/devicetree/bindings/spi/spi-bus.txt -- spi-cpha: See Documentation/devicetree/bindings/spi/spi-bus.txt -- spi-cpol: See Documentation/devicetree/bindings/spi/spi-bus.txt -- interrupts: interrupt mapping for IRQ, accepted values are: - * IRQF_TRIGGER_RISING - * IRQF_TRIGGER_FALLING - -Optional properties: - -- interrupt-names: Data ready line selection. Valid values are: - * DIO1 - * DIO2 - * DIO3 - * DIO4 - If this field is left empty, DIO1 is assigned as default data ready - signal. -- reset-gpios: must be the device tree identifier of the RESET pin. As the line - is active low, it should be marked GPIO_ACTIVE_LOW. -- clocks: phandle to the external clock. Should be set according to - "clock-names". - If this field is left empty together with the "clock-names" field, then - the internal clock is used. -- clock-names: The name of the external clock to be used. Valid values are: - * sync: In sync mode, the internal clock is disabled and the frequency - of the external clock signal establishes therate of data - collection and processing. See Fig 14 and 15 in the datasheet. - The clock-frequency must be: - * 3000 to 4500 Hz for adis1649x devices. - * 700 to 2400 Hz for adis1648x devices. - * pps: In Pulse Per Second (PPS) Mode, the rate of data collection and - production is equal to the product of the external clock - frequency and the scale factor in the SYNC_SCALE register, see - Table 154 in the datasheet. - The clock-frequency must be: - * 1 to 128 Hz for adis1649x devices. - * This mode is not supported by adis1648x devices. - If this field is left empty together with the "clocks" field, then the - internal clock is used. -- adi,ext-clk-pin: The DIOx line to be used as an external clock input. - Valid values are: - * DIO1 - * DIO2 - * DIO3 - * DIO4 - Each DIOx pin supports only one function at a time (data ready line - selection or external clock input). When a single pin has two - two assignments, the enable bit for the lower priority function - automatically resets to zero (disabling the lower priority function). - Data ready has highest priority. - If this field is left empty, DIO2 is assigned as default external clock - input pin. - -Example: - - imu@0 { - compatible = "adi,adis16495-1"; - reg = <0>; - spi-max-frequency = <3200000>; - spi-cpol; - spi-cpha; - interrupts = <25 IRQF_TRIGGER_FALLING>; - interrupt-parent = <&gpio>; - interrupt-names = "DIO2"; - clocks = <&adis16495_sync>; - clock-names = "sync"; - adi,ext-clk-pin = "DIO1"; - }; diff --git a/Documentation/devicetree/bindings/iio/imu/adi,adis16480.yaml b/Documentation/devicetree/bindings/iio/imu/adi,adis16480.yaml new file mode 100644 index 000000000000..5dbe24be9925 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/imu/adi,adis16480.yaml @@ -0,0 +1,130 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/imu/adi,adis16480.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices ADIS16480 and similar IMUs + +maintainers: + - Alexandru Ardelean + +properties: + compatible: + enum: + - adi,adis16375 + - adi,adis16480 + - adi,adis16485 + - adi,adis16488 + - adi,adis16490 + - adi,adis16495-1 + - adi,adis16495-2 + - adi,adis16495-3 + - adi,adis16497-1 + - adi,adis16497-2 + - adi,adis16497-3 + + reg: + maxItems: 1 + + interrupts: + minItems: 1 + maxItems: 2 + description: | + Accepted interrupt types are: + * IRQ_TYPE_EDGE_RISING + * IRQ_TYPE_EDGE_FALLING + + interrupt-names: + minItems: 1 + maxItems: 2 + description: + Default if not supplied is DIO1. + items: + enum: + - DIO1 + - DIO2 + - DIO3 + - DIO4 + + spi-max-frequency: true + + spi-cpha: true + spi-cpol: true + + reset-gpios: + maxItems: 1 + description: Connected to RESET pin which is active low. + + clocks: + maxItems: 1 + description: If not provided, then the internal clock is used. + + clock-names: + description: | + sync: In sync mode, the internal clock is disabled and the frequency + of the external clock signal establishes therate of data + collection and processing. See Fig 14 and 15 in the datasheet. + The clock-frequency must be: + * 3000 to 4500 Hz for adis1649x devices. + * 700 to 2400 Hz for adis1648x devices. + pps: In Pulse Per Second (PPS) Mode, the rate of data collection and + production is equal to the product of the external clock + frequency and the scale factor in the SYNC_SCALE register, see + Table 154 in the datasheet. + The clock-frequency must be: + * 1 to 128 Hz for adis1649x devices. + * This mode is not supported by adis1648x devices. + enum: + - sync + - pps + + adi,ext-clk-pin: + $ref: /schemas/types.yaml#/definitions/string + description: | + The DIOx line to be used as an external clock input. + Each DIOx pin supports only one function at a time (data ready line + selection or external clock input). When a single pin has two + two assignments, the enable bit for the lower priority function + automatically resets to zero (disabling the lower priority function). + Data ready has highest priority. + If not provided then DIO2 is assigned as default external clock + input pin. + enum: + - DIO1 + - DIO2 + - DIO3 + - DIO4 + +additionalProperties: false + +required: + - compatible + - reg + - interrupts + - spi-cpha + - spi-cpol + - spi-max-frequency + +examples: + - | + #include + spi { + #address-cells = <1>; + #size-cells = <0>; + + imu@0 { + compatible = "adi,adis16495-1"; + reg = <0>; + spi-max-frequency = <3200000>; + spi-cpol; + spi-cpha; + interrupts = <25 IRQ_TYPE_EDGE_FALLING>; + interrupt-parent = <&gpio>; + interrupt-names = "DIO2"; + clocks = <&adis16495_sync>; + clock-names = "sync"; + adi,ext-clk-pin = "DIO1"; + }; + }; +... From patchwork Sat Oct 31 18:48:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 314634 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D72C3C55178 for ; Sat, 31 Oct 2020 18:51:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9ABC220724 for ; Sat, 31 Oct 2020 18:51:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170306; bh=DstVnFbZayPbgyMcQkevxdRm5qMfbFamaSpzD3oG09U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=lXTB3ZMLTJ6B1TNEJRjuT+2IRVJYJt+TuPP6C/qZvM/lGqSH5IztK2SDuRxM7SiWC QVv4CQg/TtoxQ3c2fZvpLVEABn5tdmViE0lGAZFDFI8wyu3ESqWAcQTWcqApKIX3yD ylBryOAfUA+zK1k43tJDsDhg1+/j++OErp4qYaJU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728419AbgJaSvq (ORCPT ); Sat, 31 Oct 2020 14:51:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:34916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSvp (ORCPT ); Sat, 31 Oct 2020 14:51: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 A213D2076D; Sat, 31 Oct 2020 18:51:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170304; bh=DstVnFbZayPbgyMcQkevxdRm5qMfbFamaSpzD3oG09U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KVQoUuL34G0doJzs3BXZaVhS6sS//3ZdlmLul+a7s7RVoMl/zFD2AQVcGuSpy4Lzk SgAZYA1GShByw8JLVMhpKALP4l3NXGhx/HSIM1RCXuMZc6zPmjpjRiaEe96CzFZWaf j7HO7p5EK8V05PoBYBljtleCCK8zkci60CWrWTQU= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Lorenzo Bianconi Subject: [PATCH 12/46] dt-bindings:iio:imu:st, lsm6dsx: txt to yaml conversion Date: Sat, 31 Oct 2020 18:48:20 +0000 Message-Id: <20201031184854.745828-13-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Straight forward conversion, but there are a few generic properties in here like wakeup-source which should probably have schema in a more generic location. Signed-off-by: Jonathan Cameron Cc: Lorenzo Bianconi --- .../bindings/iio/imu/st,lsm6dsx.yaml | 86 +++++++++++++++++++ .../bindings/iio/imu/st_lsm6dsx.txt | 49 ----------- 2 files changed, 86 insertions(+), 49 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml b/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml new file mode 100644 index 000000000000..49d0687e0c06 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml @@ -0,0 +1,86 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/imu/st,lsm6dsx.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STM 6-axis (acc + gyro) IMU Mems sensors + +maintainers: + - Lorenzo Bianconi + +description: + Devices have both I2C and SPI interfaces. + +properties: + compatible: + enum: + - st,lsm6ds3 + - st,lsm6ds3h + - st,lsm6dsl + - st,lsm6dsm + - st,ism330dlc + - st,lsm6dso + - st,asm330lhh + - st,lsm6dsox + - st,lsm6dsr + - st,lsm6ds3tr-c + - st,ism330dhcx + - st,lsm9ds1-imu + - st,lsm6ds0 + - st,lsm6dsrx + - st,lsm6dst + + reg: + maxItems: 1 + + interrupts: + minItems: 1 + maxItems: 2 + description: + Supports up to 2 interrupt lines via the INT1 and INT2 pins. + + spi-max-frequency: true + + st,drdy-int-pin: + $ref: '/schemas/types.yaml#/definitions/uint32' + description: | + The pin on the package that will be used to signal data ready + enum: + - 1 + - 2 + + st,pullups: + type: boolean + description: enable/disable internal i2c controller pullup resistors. + + drive-open-drain: + type: boolean + description: + The interrupt/data ready line will be configured as open drain, which + is useful if several sensors share the same interrupt line. + + wakeup-source: + $ref: /schemas/types.yaml#/definitions/flag + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + imu@6b { + compatible = "st,lsm6dsm"; + reg = <0x6b>; + interrupt-parent = <&gpio0>; + interrupts = <0 IRQ_TYPE_EDGE_RISING>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt b/Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt deleted file mode 100644 index 7c6742d3e992..000000000000 --- a/Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt +++ /dev/null @@ -1,49 +0,0 @@ -* ST_LSM6DSx driver for STM 6-axis (acc + gyro) imu Mems sensors - -Required properties: -- compatible: must be one of: - "st,lsm6ds3" - "st,lsm6ds3h" - "st,lsm6dsl" - "st,lsm6dsm" - "st,ism330dlc" - "st,lsm6dso" - "st,asm330lhh" - "st,lsm6dsox" - "st,lsm6dsr" - "st,lsm6ds3tr-c" - "st,ism330dhcx" - "st,lsm9ds1-imu" - "st,lsm6ds0" - "st,lsm6dsrx" - "st,lsm6dst" -- reg: i2c address of the sensor / spi cs line - -Optional properties: -- st,drdy-int-pin: the pin on the package that will be used to signal - "data ready" (valid values: 1 or 2). -- st,pullups : enable/disable internal i2c controller pullup resistors. -- drive-open-drain: the interrupt/data ready line will be configured - as open drain, which is useful if several sensors share the same - interrupt line. This is a boolean property. - (This binding is taken from pinctrl/pinctrl-bindings.txt) - If the requested interrupt is configured as IRQ_TYPE_LEVEL_HIGH or - IRQ_TYPE_EDGE_RISING a pull-down resistor is needed to drive the line - when it is not active, whereas a pull-up one is needed when interrupt - line is configured as IRQ_TYPE_LEVEL_LOW or IRQ_TYPE_EDGE_FALLING. -- interrupts: interrupt mapping for IRQ. It should be configured with - flags IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_EDGE_RISING, IRQ_TYPE_LEVEL_LOW or - IRQ_TYPE_EDGE_FALLING. -- wakeup-source: Enables wake up of host system on event. - - Refer to interrupt-controller/interrupts.txt for generic interrupt - client node bindings. - -Example: - -lsm6dsm@6b { - compatible = "st,lsm6dsm"; - reg = <0x6b>; - interrupt-parent = <&gpio0>; - interrupts = <0 IRQ_TYPE_EDGE_RISING>; -}; From patchwork Sat Oct 31 18:48:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320134 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451498ilc; Sat, 31 Oct 2020 11:51:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxapFOP/h8nqZbC+aKlOX02PdazxoXuYy5fYvFhQnBED1zTXXrriWISIm9cujXMbfOI5KHr X-Received: by 2002:a50:f316:: with SMTP id p22mr9018977edm.201.1604170308554; Sat, 31 Oct 2020 11:51:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170308; cv=none; d=google.com; s=arc-20160816; b=D8TmNNQxuL1nBNNNJL1XHB8XTcijW8jyckdanqtRtzKdHq8X7eyWc1OTgTbQTjLKhk GSLKCrg4+GU+/pt6jPdM95xqrZNJ8i8MLM+p/1akJ2VrZ/gTfXkHebhZAuM5sLmNIi+5 CODKo35zYnmDLeShKP9U8zs05Hi9YTZpjiRYPP1Lb1HTazRBXVEIqWat2cY+Fg86gSoN S/G80b8jtvJiwIhApfb3tcVSiZ5FDsF5M7rdwwXN8anaw+xBVwPZoMU2bKXhNxE8VvmI rBrFJSJnMA9JyhRS64MffWRsTe3Z6XGgRumwJWp0K+k+iA2sUsmT2DfB1qPSif1UyLzT rDcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=F0UL6ldpSWfGUaR2XsrlPhuZSBsTIPfuWrSwonMRvSQ=; b=lUb0iGmaMKTOokrt608Iu73Vmew5A2+a5HmtZKkqenXVEBZBoM2t7kkeGeAgcNVQBE S/PE2DJLJpRJ5KpNT5tm76BzWd7FV77QDDBHjiiuaOqSA/TnUwybCEOFzrYOCnPe13fb jAKu5J+AE+sL3bfn5chWniTmWgOeijCD7FdMAALFGnA5vi0dKngt0z8BVJ+PhuK4d8Ov Y6uHfcZVg0lQPyzrTIG1Vc0sQZ8e3EA3UnMhctsBXKqWj2p0e982X35iavRMPIcxdS7Y WvrWUSk+gbh6sxSHnCexdckg3c2LAX8gP9m5wtLuHa5ZYqXlTnw2Zn6tiVLplfL691gX 9U5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NsNwXQxb; 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 f2si7081562ejc.542.2020.10.31.11.51.48; Sat, 31 Oct 2020 11:51: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=NsNwXQxb; 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 S1728421AbgJaSvr (ORCPT + 6 others); Sat, 31 Oct 2020 14:51:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:34948 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSvq (ORCPT ); Sat, 31 Oct 2020 14:51:46 -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 1B3472072C; Sat, 31 Oct 2020 18:51:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170306; bh=78147WRxiyxt7sN1gLHlmXA7ziYE9l/25sqw0GzfE2A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NsNwXQxby4zp5/ZDPxXM5tEnmn0XIQyLvqrVBu/S4XnFgRPso4l/N23F6Taf9vcTH ZrY/nq5RSzgD/HGJ817S5wS4NoO1GVB6LApGKQG9Jk9c57YAqrtW0RfmHGHx6XZyu+ WnRHKLjVI/BH7UP8mBRa9c7RPrB1j/i39WJ5V+sk= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Oleksandr Kravchenko Subject: [PATCH 13/46] dt-bindings:iio:light:avago, apds9300: txt to yaml conversion. Date: Sat, 31 Oct 2020 18:48:21 +0000 Message-Id: <20201031184854.745828-14-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron This could have gone in trivial-devices.yaml, but there was a datasheet link so I've given it a minimal file of it's own. Very simple binding and so a very simple conversion. Signed-off-by: Jonathan Cameron Cc: Oleksandr Kravchenko --- .../bindings/iio/light/apds9300.txt | 21 --------- .../bindings/iio/light/avago,apds9300.yaml | 44 +++++++++++++++++++ 2 files changed, 44 insertions(+), 21 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/light/apds9300.txt b/Documentation/devicetree/bindings/iio/light/apds9300.txt deleted file mode 100644 index 3aa6db3ee99d..000000000000 --- a/Documentation/devicetree/bindings/iio/light/apds9300.txt +++ /dev/null @@ -1,21 +0,0 @@ -* Avago APDS9300 ambient light sensor - -https://www.avagotech.com/docs/AV02-1077EN - -Required properties: - - - compatible : should be "avago,apds9300" - - reg : the I2C address of the sensor - -Optional properties: - - - interrupts : interrupt mapping for GPIO IRQ - -Example: - -apds9300@39 { - compatible = "avago,apds9300"; - reg = <0x39>; - interrupt-parent = <&gpio2>; - interrupts = <29 8>; -}; diff --git a/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml b/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml new file mode 100644 index 000000000000..1cc026b9a62b --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/avago,apds9300.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/light/avago,apds9300.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Avago APDS9300 ambient light sensor + +maintainers: + - Oleksandr Kravchenko + +description: | + Datasheet at https://www.avagotech.com/docs/AV02-1077EN + +properties: + compatible: + const: avago,apds9300 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + light-sensor@39 { + compatible = "avago,apds9300"; + reg = <0x39>; + interrupt-parent = <&gpio2>; + interrupts = <29 8>; + }; + }; +... From patchwork Sat Oct 31 18:48:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 314633 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4998DC5517A for ; Sat, 31 Oct 2020 18:51:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1098520720 for ; Sat, 31 Oct 2020 18:51:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170309; bh=hvXOic1rUJfkQMhsWqepgHIYm8GKrgC2Efi+g7GSWbg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Pjp1VHTgiL2yAz+ZetRMJSequporrsZRcFtNb+wNugG6nrt9Y+0BY5mJlP3o5tb9g bcDSTMVULYUeijyAHguuYPqMG7HF25V8qMERDswPsuzWzpXORUORl2Niew6h8FvtMf FgKSgymiNWQcpfwydc6wFMaZuUnOAiuC0bacwJUs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728423AbgJaSvs (ORCPT ); Sat, 31 Oct 2020 14:51:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:34984 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSvs (ORCPT ); Sat, 31 Oct 2020 14:51: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 84B9E20729; Sat, 31 Oct 2020 18:51:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170307; bh=hvXOic1rUJfkQMhsWqepgHIYm8GKrgC2Efi+g7GSWbg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H8FEXIo2rPEjbSO6MfHDZBvWDAjtuLZxJu2JWwiZKUjXO3YOmzTDZiTPIv5Za4D2Q +8GSzVMnfSfEtVx5zkEEcb3TjHP3d3J+NTQGJC3A0WomNJZ1SjVSEaxgbcmSGK1HrS ipE5LrKCDTlJihP3R5narpIUKb8FbLUtIU4lPKEw= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Matt Ranostay Subject: [PATCH 14/46] dt-bindings:iio:light:avago, apds9960: txt to yaml conversion Date: Sat, 31 Oct 2020 18:48:22 +0000 Message-Id: <20201031184854.745828-15-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Very simple binding that we could move into trivial-devices.yaml with a small loss of documentation. Signed-off-by: Jonathan Cameron Cc: Matt Ranostay Acked-by: Matt Ranostay --- .../bindings/iio/light/apds9960.txt | 21 --------- .../bindings/iio/light/avago,apds9960.yaml | 44 +++++++++++++++++++ 2 files changed, 44 insertions(+), 21 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/light/apds9960.txt b/Documentation/devicetree/bindings/iio/light/apds9960.txt deleted file mode 100644 index c53ddb81c4aa..000000000000 --- a/Documentation/devicetree/bindings/iio/light/apds9960.txt +++ /dev/null @@ -1,21 +0,0 @@ -* Avago APDS9960 gesture/RGB/ALS/proximity sensor - -https://www.avagotech.com/docs/AV02-4191EN - -Required properties: - - - compatible: must be "avago,apds9960" - - reg: the I2c address of the sensor - - interrupts : the sole interrupt generated by the device - - Refer to interrupt-controller/interrupts.txt for generic interrupt client - node bindings. - -Example: - -apds9960@39 { - compatible = "avago,apds9960"; - reg = <0x39>; - interrupt-parent = <&gpio1>; - interrupts = <16 1>; -}; diff --git a/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml b/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml new file mode 100644 index 000000000000..eae8c7327c0f --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/avago,apds9960.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/light/avago,apds9960.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Avago APDS9960 gesture/RGB/ALS/proximity sensor + +maintainers: + - Matt Ranostay + +description: | + Datasheet at https://www.avagotech.com/docs/AV02-4191EN + +properties: + compatible: + const: avago,apds9960 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + light-sensor@39 { + compatible = "avago,apds9960"; + reg = <0x39>; + interrupt-parent = <&gpio1>; + interrupts = <16 1>; + }; + }; +... From patchwork Sat Oct 31 18:48:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320136 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451517ilc; Sat, 31 Oct 2020 11:51:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqyPwiTFWD4y1TljRU88A9RLeOcl94QCtJd6DmW3cpFdns2iVmTslbsQIDIJASAryhL4HH X-Received: by 2002:a50:bb06:: with SMTP id y6mr8924322ede.278.1604170311329; Sat, 31 Oct 2020 11:51:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170311; cv=none; d=google.com; s=arc-20160816; b=UVHpweZUWGqYevNL6Psl70/wBD4e9Rtfwkq/glgyU8FUomK7+iLXBcjuYF9nbZNn67 4ghR8etoa+4YHF0BrEdeY8FZo5aJuPF/PLLf8CgSOa9uDWdxra70F3YYqJwEnkSpmHsB JyRk0dx9pK/lrUVJpXWL542hDVOiKPWeLf/5Er/X3l0EbiXxQP7rOn9gxY59U00HbUEI XTrPgTzJsLdOJAjatnoh+W3kbGy1PRT1mBAfufjTWOffX1utKEyxpBEMyx47Opznnrr2 nb13Z+8K1ZmaWiwLkqG4y/z/LXxyQ7a2jT7uBBVGFZtbGyFEVd/0Y4cMWFDIID6XbmC4 bF+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ixgWOrBKk6UFhtIW7yv0Z8nGSf8PnHifYieL21VjC0Y=; b=ahjiiQ2LUdPfTbPMdGkq1dxG0DpQeakT8eMZF6uDAitKXuXjCpqM5flbm5b7u8r9sD PrIlEnMp/If2eWGfDhIa98Dv8NJnkfheMwtcQhY5Iyf7HcOIXqeA/RXIanoxPySB7PqX LDFFYbZMf7joOuaWMuych/Zz00lUswHJhdWxoZ2pxYMGOrKuM7/v4KIiwthiZMKXZLpw UMum1TncjFaOn9YTEhoL1QkMy4lGhRS2psfdDD7r1q/uRsimEh8eQHOH6g+mYg+VOK3d PzD12GcLAcN0/PjO71URy4WUITBUfe/6C5WY+Q+64rPkbPuZi2AKDQZlxrG6p6KVA6mX Wv5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EmbrdeW9; 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 f2si7081562ejc.542.2020.10.31.11.51.51; Sat, 31 Oct 2020 11:51: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=EmbrdeW9; 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 S1728426AbgJaSvu (ORCPT + 6 others); Sat, 31 Oct 2020 14:51:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:35038 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSvu (ORCPT ); Sat, 31 Oct 2020 14:51: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 5137A20702; Sat, 31 Oct 2020 18:51:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170309; bh=qfobvL+xm68LRQrtL991IA3t1PNEVyCflIA+rDZs1YE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EmbrdeW9q5kLLyBvc6zjJzPnfGO4yS2obD43kgPO8BeYWlvCFd1N5y1ahx5xYlV3Y GqEuglx8Y8guV/Km0QcdQa0nwJmHn/rFk1AXLUwJBv6AAq61bfHhLgNzGOJ/uGs2oD zkn3g73KcBM/Wqt9i6lKiF4VGLWWaRqjDlICl2XI= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Beomho Seo Subject: [PATCH 15/46] dt-bindings:iio:light:capella, cm36651: txt to yaml conversion. Date: Sat, 31 Oct 2020 18:48:23 +0000 Message-Id: <20201031184854.745828-16-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Straight forward conversion with no changes beyond the node name in the example Signed-off-by: Jonathan Cameron Cc: Beomho Seo --- .../bindings/iio/light/capella,cm36651.yaml | 48 +++++++++++++++++++ .../devicetree/bindings/iio/light/cm36651.txt | 26 ---------- 2 files changed, 48 insertions(+), 26 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/light/capella,cm36651.yaml b/Documentation/devicetree/bindings/iio/light/capella,cm36651.yaml new file mode 100644 index 000000000000..446d94f3a89f --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/capella,cm36651.yaml @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/light/capella,cm36651.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Capella CM36651 I2C Proximity and Color Light sensor + +maintainers: + - Beomho Seo + +properties: + compatible: + const: capella,cm36651 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + vled-supply: + description: | + Supply for the IR_LED which is part of the cm36651 for proximity detection. + +additionalProperties: false + +required: + - compatible + - reg + - interrupts + - vled-supply + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + light-sensor@18 { + compatible = "capella,cm36651"; + reg = <0x18>; + interrupt-parent = <&gpx0>; + interrupts = <2 0>; + vled-supply = <&ps_als_reg>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/light/cm36651.txt b/Documentation/devicetree/bindings/iio/light/cm36651.txt deleted file mode 100644 index c03e19db4550..000000000000 --- a/Documentation/devicetree/bindings/iio/light/cm36651.txt +++ /dev/null @@ -1,26 +0,0 @@ -* Capella CM36651 I2C Proximity and Color Light sensor - -Required properties: -- compatible: must be "capella,cm36651" -- reg: the I2C address of the device -- interrupts: interrupt-specifier for the sole interrupt - generated by the device -- vled-supply: regulator for the IR LED. IR_LED is a part - of the cm36651 for proximity detection. - As covered in ../../regulator/regulator.txt - -Example: - - i2c_cm36651: i2c-gpio { - /* ... */ - - cm36651@18 { - compatible = "capella,cm36651"; - reg = <0x18>; - interrupt-parent = <&gpx0>; - interrupts = <2 0>; - vled-supply = <&ps_als_reg>; - }; - - /* ... */ - }; From patchwork Sat Oct 31 18:48:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 314632 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19F2AC55179 for ; Sat, 31 Oct 2020 18:51:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DBFD520724 for ; Sat, 31 Oct 2020 18:51:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170312; bh=O5f3jidJR7i/UOt0KKH563VuD2QIarTgrn6pmkRfU2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=C4qtd3bNWLgS0YOjPN5L21R284D2J0OkbZSPuZUT5kY1M0pioSmSEw7A4kWLLWu6N G4v7AC6nVnj99M9L0GrvMGeQVPkTSl/7usgmU5wk9o53bEB+auKLezC2QIGNrI4YcM naODg5KJNZQV9G16n1WsksK7wSIo4dip3NUyyHes= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728427AbgJaSvw (ORCPT ); Sat, 31 Oct 2020 14:51:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:35070 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSvv (ORCPT ); Sat, 31 Oct 2020 14:51: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 C016320720; Sat, 31 Oct 2020 18:51:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170311; bh=O5f3jidJR7i/UOt0KKH563VuD2QIarTgrn6pmkRfU2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u53l/HiY6JgFd7EOBq28TBH2nany3TyjulFBXFEDFptpLHGdiWHE4UxQxkeyFVnmA rYfzKGBNIB63gMIX1SmrtKyMS7ZUsFZKsS3Y4qg2mtrKVvRIvDTcNdZ5D6Wj7yr8bl wuTsPiJrkpCtIC2/YYiE6qbSqA0Wgfqlz/hVRi9w= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Jacek Anaszewski , Kyungmin Park Subject: [PATCH 16/46] dt-bindings:iio:light:sharp, gp2ap020a00f: txt to yaml conversion. Date: Sat, 31 Oct 2020 18:48:24 +0000 Message-Id: <20201031184854.745828-17-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Simple conversion. Maintainers as per original binding file authors, but that was a long time back so as with others, if email addresses bounce I'll switch this to me. Signed-off-by: Jonathan Cameron Cc: Jacek Anaszewski Cc: Kyungmin Park --- .../bindings/iio/light/gp2ap020a00f.txt | 21 -------- .../iio/light/sharp,gp2ap020a00f.yaml | 49 +++++++++++++++++++ 2 files changed, 49 insertions(+), 21 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/light/gp2ap020a00f.txt b/Documentation/devicetree/bindings/iio/light/gp2ap020a00f.txt deleted file mode 100644 index 9231c82317ad..000000000000 --- a/Documentation/devicetree/bindings/iio/light/gp2ap020a00f.txt +++ /dev/null @@ -1,21 +0,0 @@ -* Sharp GP2AP020A00F I2C Proximity/ALS sensor - -The proximity detector sensor requires power supply -for its built-in led. It is also defined by this binding. - -Required properties: - - - compatible : should be "sharp,gp2ap020a00f" - - reg : the I2C slave address of the light sensor - - interrupts : interrupt specifier for the sole interrupt generated - by the device - - vled-supply : VLED power supply, as covered in ../regulator/regulator.txt - -Example: - -gp2ap020a00f@39 { - compatible = "sharp,gp2ap020a00f"; - reg = <0x39>; - interrupts = <2 0>; - vled-supply = <...>; -}; diff --git a/Documentation/devicetree/bindings/iio/light/sharp,gp2ap020a00f.yaml b/Documentation/devicetree/bindings/iio/light/sharp,gp2ap020a00f.yaml new file mode 100644 index 000000000000..d6a4b47467f2 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/sharp,gp2ap020a00f.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/light/sharp,gp2ap020a00f.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sharp GP2AP020A00F I2C Proximity/ALS sensor + +maintainers: + - Jacek Anaszewski + - Kyungmin Park + +description: | + The proximity detector sensor requires power supply for its built-in led. + +properties: + compatible: + const: sharp,gp2ap020a00f + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + vled-supply: true + +additionalProperties: false + +required: + - compatible + - reg + - interrupts + - vled-supply + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + light-sensor@39 { + compatible = "sharp,gp2ap020a00f"; + reg = <0x39>; + interrupts = <2 0>; + vled-supply = <&als_reg>; + }; + }; +... From patchwork Sat Oct 31 18:48:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320138 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451552ilc; Sat, 31 Oct 2020 11:51:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQcPOKEBG8nHr8Iou/8rkMBaXThnzE9ZYi4Y0ZQsQvtc8HWSqap65OXg80EAFXft+BR/fQ X-Received: by 2002:a50:950e:: with SMTP id u14mr8784267eda.260.1604170314206; Sat, 31 Oct 2020 11:51:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170314; cv=none; d=google.com; s=arc-20160816; b=iMs1H5QHqR//zU39usjc57pbLYxTxh5aj2JIrXgfMWP0UwS39OiX3uzBfWp9Sdl22Y 15NeeHjblhOYO6Q/UgdTPee+sKIrkCJmWR1939kL7Mi1hrptr3V/ds+uKCUZf68pAMZE DfFJV/WCe5K7Hk24nkZWZJjM0hVliCJN2eTJ+6+RBXVmcCeF3qLrpVd6nbbFyvJuAmXy Bns0Pfh0kPvQ3HifrHOVbaP7Ne5TaxQtPr6EddpT85MA7LxAVIgEdMW+agkLsZ/yFLKN 668SOm1EE2oxSsbp0pT+wPPU4INFeqhxvoTzvismzpHItjUHFukimLQOQAcLbSOvOjiq SNUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sTY15/rgOt6kgTuPNCFk8r9rg1EtEKRMFFiWRmkT+6Y=; b=GQ36HfG+0gmFrfO7lZuhlOFxrC3eb67nD9t8/5+JDC2a9iEXowTkkZaGQwpgAy4fAS stIrKq7CSArqrpwuC9RMZpTMt7MXCDcwfrJEuouYHvqUS4umFeHxuOXcXJH7M4UWa06T 3wzGjUILQb3kbyIq9Y6S5OqBr11xQVj+HmrtzcK6trylNxH7ed5Aph96TxHcGoq/bNjY Ap01MZS66lfNtQvGoh3WdN4VJN6PfO+uXBPmdILAR3x6ZXsxrkutA5iC7lqT4xj8twlD ZnGDGEmHNbLfpelVq8uXk73kX0SqaHCp2P1nfThEqs/FajXQkPmxVtF4UqP4cIiT1KvL yMIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GdENXmvM; 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 f2si7081562ejc.542.2020.10.31.11.51.54; Sat, 31 Oct 2020 11:51:54 -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=GdENXmvM; 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 S1728431AbgJaSvx (ORCPT + 6 others); Sat, 31 Oct 2020 14:51:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:35086 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSvx (ORCPT ); Sat, 31 Oct 2020 14:51: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 629AE2071A; Sat, 31 Oct 2020 18:51:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170312; bh=dyozSHBidbCpE68HDPMTN5188ZmV/mBciN/Dv709ZRU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GdENXmvMx/J/PeKGH2T0a8lsao9nVsDjKQPyen76ssNu9NrxMlAsU1FANd4E80d4g rDoZgVhQPJsOF/smBi2FDBAgJKhs1S4yWnhvQVm5LBNuEcCFH8wb18T/v/IW2mHU0O /r2fJzRCd5lN4PgXeHP9vns7lQ3SnG0JRmEO1Jds= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Robert Eshleman Subject: [PATCH 17/46] dt-bindings:iio:light:maxim, max44009: txt to yaml conversion. Date: Sat, 31 Oct 2020 18:48:25 +0000 Message-Id: <20201031184854.745828-18-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Straight forward format conversion. Signed-off-by: Jonathan Cameron Cc: Robert Eshleman --- .../bindings/iio/light/max44009.txt | 24 ---------- .../bindings/iio/light/maxim,max44009.yaml | 45 +++++++++++++++++++ 2 files changed, 45 insertions(+), 24 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/light/max44009.txt b/Documentation/devicetree/bindings/iio/light/max44009.txt deleted file mode 100644 index 4a98848e35c0..000000000000 --- a/Documentation/devicetree/bindings/iio/light/max44009.txt +++ /dev/null @@ -1,24 +0,0 @@ -* MAX44009 Ambient Light Sensor - -Required properties: - -- compatible: should be "maxim,max44009" -- reg: the I2C address of the device (default is <0x4a>) - -Optional properties: - -- interrupts: interrupt mapping for GPIO IRQ. Should be configured with - IRQ_TYPE_EDGE_FALLING. - -Refer to interrupt-controller/interrupts.txt for generic interrupt client -node bindings. - -Example: - -light-sensor@4a { - compatible = "maxim,max44009"; - reg = <0x4a>; - - interrupt-parent = <&gpio1>; - interrupts = <17 IRQ_TYPE_EDGE_FALLING>; -}; diff --git a/Documentation/devicetree/bindings/iio/light/maxim,max44009.yaml b/Documentation/devicetree/bindings/iio/light/maxim,max44009.yaml new file mode 100644 index 000000000000..5911bd93bcb1 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/maxim,max44009.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/light/maxim,max44009.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MAX44009 Ambient Light Sensor + +maintainers: + - Robert Eshleman + +properties: + compatible: + const: maxim,max44009 + + reg: + maxItems: 1 + description: Default address is 0x4a + + interrupts: + maxItems: 1 + description: Should be configured with type IRQ_TYPE_EDGE_FALLING + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + light-sensor@4a { + compatible = "maxim,max44009"; + reg = <0x4a>; + + interrupt-parent = <&gpio1>; + interrupts = <17 IRQ_TYPE_EDGE_FALLING>; + }; + }; +... From patchwork Sat Oct 31 18:48:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 314631 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0CBDC388F7 for ; Sat, 31 Oct 2020 18:51:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C8C420729 for ; Sat, 31 Oct 2020 18:51:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170315; bh=q8M0ngosIXnnFuLGJvLw9/VYkcC7swEZP+Mvf/JvSCQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=fC6fwgB7zimGssMTgcN26IthjdnzcDTrzQ18jKwlVv2R9kaYyWZeAZlRwXjaB+kJj mTMbvAFjPbVVhzXaNWBtF9iSdDvFVv4a+9tn6AeF4VnlCYgqbovPzFYOw3bR4/HTx4 RSfpE8SWsc957PvClvTfW4Vd6UIpbAsSDlgIhGwg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728433AbgJaSvz (ORCPT ); Sat, 31 Oct 2020 14:51:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:35122 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSvy (ORCPT ); Sat, 31 Oct 2020 14:51:54 -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 CF5462072C; Sat, 31 Oct 2020 18:51:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170313; bh=q8M0ngosIXnnFuLGJvLw9/VYkcC7swEZP+Mvf/JvSCQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ic7dJTmFhM3GkZTCRxiZMjK1JbJMosywq4c2/wsG4QR7fWBE2RoJ7fwfg2Al8aNJR SqsP9HD3tytG4IYdWyze8IeKF6OPQ7y45WOvc8NqtZK9CfM4w5j/BytTPrQnq6ihnn 7dlTkE4V8jrS6AsqcJNFRFIR8ylTaY7XNUjWkU64= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Andreas Dannenberg Subject: [PATCH 18/46] dt-bindings:iio:light:ti, opt3001: txt to yaml conversion Date: Sat, 31 Oct 2020 18:48:26 +0000 Message-Id: <20201031184854.745828-19-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Straight forward format conversion of this simple binding. Signed-off-by: Jonathan Cameron Cc: Andreas Dannenberg --- .../devicetree/bindings/iio/light/opt3001.txt | 25 ---------- .../bindings/iio/light/ti,opt3001.yaml | 47 +++++++++++++++++++ 2 files changed, 47 insertions(+), 25 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/light/opt3001.txt b/Documentation/devicetree/bindings/iio/light/opt3001.txt deleted file mode 100644 index 9e6f2998e751..000000000000 --- a/Documentation/devicetree/bindings/iio/light/opt3001.txt +++ /dev/null @@ -1,25 +0,0 @@ -* Texas Instruments OPT3001 Ambient Light Sensor - -The driver supports interrupt-driven and interrupt-less operation, depending -on whether an interrupt property has been populated into the DT. Note that -the optional generation of IIO events on rising/falling light threshold changes -requires the use of interrupts. Without interrupts, only the simple reading -of the current light value is supported through the IIO API. - -https://www.ti.com/product/opt3001 - -Required properties: - - compatible: should be "ti,opt3001" - - reg: the I2C address of the sensor - -Optional properties: - - interrupts: interrupt mapping for GPIO IRQ (configure for falling edge) - -Example: - -opt3001@44 { - compatible = "ti,opt3001"; - reg = <0x44>; - interrupt-parent = <&gpio1>; - interrupts = <28 IRQ_TYPE_EDGE_FALLING>; -}; diff --git a/Documentation/devicetree/bindings/iio/light/ti,opt3001.yaml b/Documentation/devicetree/bindings/iio/light/ti,opt3001.yaml new file mode 100644 index 000000000000..441e9343fc97 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/ti,opt3001.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/light/ti,opt3001.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments OPT3001 Ambient Light Sensor + +maintainers: + - Andreas Dannenberg + +description: | + The device supports interrupt-driven and interrupt-less operation, depending + on whether an interrupt property has been populated into the DT. + +properties: + compatible: + const: ti,opt3001 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + description: Should be configured with type IRQ_TYPE_EDGE_FALLING + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + light-sensor@44 { + compatible = "ti,opt3001"; + reg = <0x44>; + interrupt-parent = <&gpio1>; + interrupts = <28 IRQ_TYPE_EDGE_FALLING>; + }; + }; +... From patchwork Sat Oct 31 18:48:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320140 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451573ilc; Sat, 31 Oct 2020 11:51:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySdHYTHqVbkmMcNgkNcUJjD948w/TFoaHzxruLB2B4v+evqGlPhvSlUi+ebJHY45uZpx9t X-Received: by 2002:a17:907:2714:: with SMTP id w20mr8649496ejk.515.1604170317336; Sat, 31 Oct 2020 11:51:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170317; cv=none; d=google.com; s=arc-20160816; b=uABntIPXOQgmI0FuSKKTLL++anrz9PXm6leHzFtnhhM3jm/bmqiUMiKW8v4HBePMV/ q4XLtYlKgv4n2JGly1HBj69WtV3wTmdK+8arO3V5uszvlQAQPbJ09kKDH5TOL4pIQU+Y czvlRSa9A7bysvpBh1eHx2q/oGFIrKJczkG0cWRybMBlNCEU/CpaLD7aqsTrirIKdAby gSecLDCPzXHkt+Rwu2sYJjXFwuuXLLk/iKSuGmRZdnePVDbkVpIcbQbO2er+fLwmwOCz ew5K8niy6CUL4RKuxCZgKJLHi/EQ8BDjIKBAfall31JTTkOS8IXtulTS+e/IMlneh4yW 0UMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2clTAvbPcA2/diNIrYc1E7pEuS9GOxJFS1BvBHaexlw=; b=CoCj5WtI+650OAwPmVqrHdVxEpOb0KsxwuUPnli5KyFM+eGPsMLvkJtY/TPJC579Ar 2vqTV1RlbswxPWca4kOIK9Lc2/7aHFwxZZXHRhJmX9mH2q6i9WtImbiWBexivGmtd8BW f8sAuAyAgtTxsxXau02XzbNssjxKFsfaaWuYpDjm9jV0V8Xjb1Szu4j+IYHAzRYPuefF XM+vyb+NhIa9wJu5EXXEFMLWKj4IbLz9U0Rh28aF79L4kTrNEsrsJyHgY3TYVPi2yDPH Mtv3IG0h1E6JzaZy/oFW2knQ0PJWMZQD0mi6JuUeI641Eu6KMNbgQ7/nhwuM9sCbZfCI 2t5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=q5k9XMBf; 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 f2si7081562ejc.542.2020.10.31.11.51.57; Sat, 31 Oct 2020 11:51: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=q5k9XMBf; 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 S1728435AbgJaSv4 (ORCPT + 6 others); Sat, 31 Oct 2020 14:51:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:35152 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSv4 (ORCPT ); Sat, 31 Oct 2020 14:51:56 -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 49B1820706; Sat, 31 Oct 2020 18:51:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170315; bh=6Mz4UZ4WYPbinv3v7/uGVxfb3CPipsu5OPcEBeAiI2c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q5k9XMBfC9hcfjffqWywQ4J5Y0t1Q7H+1EnPJiQQLZzenf0B0SntpEgcjbjqxaElB Spd4TGQnDy40xFjx9g79uG4sVkMSQ86RXQ3cMl052ANEWfKoq9qHfNWBTzHw2cZvxE mqgMeOyj29uvFGg16NuOJvbLhVLxZFdPH3vj0uW0= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron Subject: [PATCH 19/46] dt-bindings:iio:light:upisemi, us51882: txt to yaml conversion. Date: Sat, 31 Oct 2020 18:48:27 +0000 Message-Id: <20201031184854.745828-20-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron I don't have an up to date address for Adriana Reus so I've put myself as the binding maintainer for this one. I'm happy to hand over to Adriana or anyone else who wants take it on! This has a lot of optional tuning parameters. The docs are modified to try and put the default values in the description of each one rather than a forwards reference to the example. Signed-off-by: Jonathan Cameron --- .../bindings/iio/light/upisemi,us5182.yaml | 75 +++++++++++++++++++ .../devicetree/bindings/iio/light/us5182d.txt | 45 ----------- 2 files changed, 75 insertions(+), 45 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/light/upisemi,us5182.yaml b/Documentation/devicetree/bindings/iio/light/upisemi,us5182.yaml new file mode 100644 index 000000000000..b9dc8ae25bf0 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/upisemi,us5182.yaml @@ -0,0 +1,75 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/light/upisemi,us5182.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: UPISEMI us5182d I2C ALS and Proximity sensor + +maintainers: + - Jonathan Cameron + +properties: + compatible: + const: upisemi,asd5182 + + reg: + maxItems: 1 + + upsemi,glass-coef: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + glass attenuation factor - compensation factor of resolution 1000 + for material transmittance. Default: 1000 + + upisemi,dark-ths: + $ref: /schemas/types.yaml#/definitions/uint16-array + minItems: 8 + maxItems: 8 + description: + 16-bit thresholds (adc counts) corresponding to every scale. + + upisemi,upper-dark-gain: + $ref: /schemas/types.yaml#/definitions/uint8 + description: | + 8-bit dark gain compensation factor(4 int and 4 fractional bits - Q4.4) + applied when light > threshold. Default: 0. + + upisemi,lower-dark-gain: + $ref: /schemas/types.yaml#/definitions/uint8 + description: | + 8-bit dark gain compensation factor(4 int and 4 fractional bits - Q4.4) + applied when light < threshold. Default: 0x16 + + upisemi,continuous: + $ref: /schemas/types.yaml#definitions/flag + description: | + This chip has two power modes: one-shot (chip takes one measurement and + then shuts itself down) and continuous (chip takes continuous + measurements). The one-shot mode is more power-friendly but the + continuous mode may be more reliable. If this property is specified + the continuous mode will be used instead of the default one-shot one for + raw reads. + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + light-sensor@39 { + compatible = "upisemi,usd5182"; + reg = <0x39>; + upisemi,glass-coef = < 1000 >; + upisemi,dark-ths = /bits/ 16 <170 200 512 512 800 2000 4000 8000>; + upisemi,upper-dark-gain = /bits/ 8 <0x00>; + upisemi,lower-dark-gain = /bits/ 8 <0x16>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/light/us5182d.txt b/Documentation/devicetree/bindings/iio/light/us5182d.txt deleted file mode 100644 index a61979997f37..000000000000 --- a/Documentation/devicetree/bindings/iio/light/us5182d.txt +++ /dev/null @@ -1,45 +0,0 @@ -* UPISEMI us5182d I2C ALS and Proximity sensor - -Required properties: -- compatible: must be "upisemi,usd5182" -- reg: the I2C address of the device - -Optional properties: -- upisemi,glass-coef: glass attenuation factor - compensation factor of - resolution 1000 for material transmittance. - -- upisemi,dark-ths: array of 8 elements containing 16-bit thresholds (adc - counts) corresponding to every scale. - -- upisemi,upper-dark-gain: 8-bit dark gain compensation factor(4 int and 4 - fractional bits - Q4.4) applied when light > threshold - -- upisemi,lower-dark-gain: 8-bit dark gain compensation factor(4 int and 4 - fractional bits - Q4.4) applied when light < threshold - -- upisemi,continuous: This chip has two power modes: one-shot (chip takes one - measurement and then shuts itself down) and continuous ( - chip takes continuous measurements). The one-shot mode is - more power-friendly but the continuous mode may be more - reliable. If this property is specified the continuous - mode will be used instead of the default one-shot one for - raw reads. - -If the optional properties are not specified these factors will default to the -values in the below example. -The glass-coef defaults to no compensation for the covering material. -The threshold array defaults to experimental values that work with US5182D -sensor on evaluation board - roughly between 12-32 lux. -There will be no dark-gain compensation by default when ALS > thresh -(0 * dark-gain), and a 1.35 compensation factor when ALS < thresh. - -Example: - - usd5182@39 { - compatible = "upisemi,usd5182"; - reg = <0x39>; - upisemi,glass-coef = < 1000 >; - upisemi,dark-ths = /bits/ 16 <170 200 512 512 800 2000 4000 8000>; - upisemi,upper-dark-gain = /bits/ 8 <0x00>; - upisemi,lower-dark-gain = /bits/ 8 <0x16>; - }; From patchwork Sat Oct 31 18:48:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 314630 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AD37C55178 for ; Sat, 31 Oct 2020 18:51:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1326820724 for ; Sat, 31 Oct 2020 18:51:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170318; bh=PIlhQlJ6RI+wDnZrSZOBiPJJxTqENBthr5Qdxd7tOa8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=nfuwRhLnJa1wkInyw6hth3Mb6Yqwt7X8GQu28BoUKp7/QZnwyxjVKWTSyVWZS9fRg OZL3/NdPKNdlmWmk0ynbcyyAiVVpXtV4pzuZOkJxVx59FzzulozoE8Vx7/w76l8Vk0 9DB9N0hrwuFKb7emRh+CUYylmTm4YTu8YO1BxpKM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728436AbgJaSv5 (ORCPT ); Sat, 31 Oct 2020 14:51:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:35182 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSv5 (ORCPT ); Sat, 31 Oct 2020 14:51: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 9331520739; Sat, 31 Oct 2020 18:51:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170316; bh=PIlhQlJ6RI+wDnZrSZOBiPJJxTqENBthr5Qdxd7tOa8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0vRQzQ3uO2raeKX3Bfggs+qAEn4cKf+8BWR3J7XPDqPTenRDhVna7QpACyOKlf3+y j3EJOCpFQNH9FTjBfz2p3sfDqyobA26+Rd2xD7KIggRHPDnbNx5H34EGv7T4z9smzt jGJ7TMlF1r1OzM/eXv8V+BBXrkZGbbZmvtqszV14= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Lorenzo Bianconi Subject: [PATCH 20/46] dt-bindings:iio:light:st, uvis25: txt to yaml conversion for this UV sensor Date: Sat, 31 Oct 2020 18:48:28 +0000 Message-Id: <20201031184854.745828-21-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron For the example, node name is uv-sensor because the standard option of light-sensor seemed a little too generic for this. This one could have just been moved to trivial-devices.yaml but for now I have kept it as a separate doc. Signed-off-by: Jonathan Cameron Cc: Lorenzo Bianconi --- .../bindings/iio/light/st,uvis25.yaml | 42 +++++++++++++++++++ .../devicetree/bindings/iio/light/uvis25.txt | 22 ---------- 2 files changed, 42 insertions(+), 22 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/light/st,uvis25.yaml b/Documentation/devicetree/bindings/iio/light/st,uvis25.yaml new file mode 100644 index 000000000000..c86e5e1d135e --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/st,uvis25.yaml @@ -0,0 +1,42 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/light/st,uvis25.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ST UVIS25 uv sensor + +maintainers: + - Lorenzo Bianconi + +properties: + compatible: + const: st,uvis25 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + uv-sensor@47 { + compatible = "st,uvis25"; + reg = <0x47>; + interrupt-parent = <&gpio0>; + interrupts = <0 IRQ_TYPE_EDGE_RISING>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/light/uvis25.txt b/Documentation/devicetree/bindings/iio/light/uvis25.txt deleted file mode 100644 index 043c139d91e6..000000000000 --- a/Documentation/devicetree/bindings/iio/light/uvis25.txt +++ /dev/null @@ -1,22 +0,0 @@ -* ST UVIS25 uv sensor - -Required properties: -- compatible: should be "st,uvis25" -- reg: i2c address of the sensor / spi cs line - -Optional properties: -- interrupts: interrupt mapping for IRQ. It should be configured with - flags IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_EDGE_RISING, IRQ_TYPE_LEVEL_LOW or - IRQ_TYPE_EDGE_FALLING. - - Refer to interrupt-controller/interrupts.txt for generic interrupt - client node bindings. - -Example: - -uvis25@47 { - compatible = "st,uvis25"; - reg = <0x47>; - interrupt-parent = <&gpio0>; - interrupts = <0 IRQ_TYPE_EDGE_RISING>; -}; From patchwork Sat Oct 31 18:48:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320142 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451599ilc; Sat, 31 Oct 2020 11:51:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0ETZizKJOEeFFFnGne4BF99T8CmbUZfHzq8zZ/1B1yMr1dfZwEFhuzIG/ZiYqYHd9BfGE X-Received: by 2002:a17:907:c23:: with SMTP id ga35mr8027367ejc.36.1604170319805; Sat, 31 Oct 2020 11:51:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170319; cv=none; d=google.com; s=arc-20160816; b=yJG23xtDKUL1hZ1hxZTH2aI+JG1UmryxL2XBO2mo7WTNjRmz3K5M33oSIdTLJzakh2 RR2Q5o9kFwR4zq4mZgd1ykRM8CJSeImOcuXULBAHpUeaaySj8o7M8mu3G23Br66Agz2R CkH4BlymmN/UQ0pNR2+wS5pXL25bzUpaTAi3zp0horJDqmeZ390gDihXfi2d9z5ra5DC egxwxwG3qKsLpjWNIhP4lpEh8XH+HGW8g0FSrgtPFLno+o8shXBBbLW+A/oitJqjpqE1 LB7mvEYmQBqtpaFsOUNpJkF7+sFnbylcDP8R2juo2ExCxME2MdSmTNXjAjh7rFzZpNGJ 1q4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=aDUY093FGrn+a83TgPZjxk/O8fneaWzR46ziW3cyw0U=; b=C6ayHtFjfcAgFGn2rDD02sqrd21Hp5RlL6H/+XIOFJC+P6xlPM5W10w/xTVN3oqj+c WAyn9YfW1R0dCvz49PaBnt1wys7Mu6nn+DtqVuvnba7rIflMnjUlsi+1tZ49cgB3k1iN fjvhqIc5Ch91Pf4aS2eJWl5Aynp9gb8CYy85twYt+UDwqSNQSt3r6HixtVpsmL+lEKo4 tVay1LQ4CKe818MDivdCzrmYBgxMz4E42iSYNhOniCkwa4VJnTa0hm6E4YtAU3GqYIdT U4Ul00QPsRAjNxuoKkUW9j8F2dK2qRVG8+QjuJAX2QWjH6RXTqoU3+S7DPjCgWLzMem+ GbUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=P7j4qujy; 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 f2si7081562ejc.542.2020.10.31.11.51.59; Sat, 31 Oct 2020 11:51:59 -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=P7j4qujy; 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 S1728439AbgJaSv6 (ORCPT + 6 others); Sat, 31 Oct 2020 14:51:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:35216 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSv6 (ORCPT ); Sat, 31 Oct 2020 14:51:58 -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 0A41220720; Sat, 31 Oct 2020 18:51:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170318; bh=8szzC/jL0BENPAx1vuAE9Kiv9H7uUJBWVNZ6zb2rL1k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P7j4qujyuVml6scetbqEBb4QF2xgNJX3SxBpXtQ28v5NdGvql6GBY+Qwdpujz/leM tdeGMv7Dj3TCZ44P8pzF2Wc7qZ1/SU8jHWgg7xAHQKnAtFovIoxSe/a3llbnDmVF7D Ta0uiwTg+xgcKjQIKMJaMVlYs86QeCNvWKs/VtTU= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Parthiban Nallathambi Subject: [PATCH 21/46] dt-bindings:iio:light:vishay, vcnl4035: txt to yaml conversion Date: Sat, 31 Oct 2020 18:48:29 +0000 Message-Id: <20201031184854.745828-22-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Only significant change in here was dropping the statement that the i2c address should be 60. The datasheet suggests there are variants available with several different addresses. Signed-off-by: Jonathan Cameron Cc: Parthiban Nallathambi --- .../bindings/iio/light/vcnl4035.txt | 18 -------- .../bindings/iio/light/vishay,vcnl4035.yaml | 45 +++++++++++++++++++ 2 files changed, 45 insertions(+), 18 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/light/vcnl4035.txt b/Documentation/devicetree/bindings/iio/light/vcnl4035.txt deleted file mode 100644 index c07c7f052556..000000000000 --- a/Documentation/devicetree/bindings/iio/light/vcnl4035.txt +++ /dev/null @@ -1,18 +0,0 @@ -VISHAY VCNL4035 - Ambient Light and proximity sensor - -Link to datasheet: https://www.vishay.com/docs/84251/vcnl4035x01.pdf - -Required properties: - - -compatible: should be "vishay,vcnl4035" - -reg: I2C address of the sensor, should be 0x60 - -interrupts: interrupt mapping for GPIO IRQ (level active low) - -Example: - -light-sensor@60 { - compatible = "vishay,vcnl4035"; - reg = <0x60>; - interrupt-parent = <&gpio4>; - interrupts = <11 IRQ_TYPE_LEVEL_LOW>; -}; diff --git a/Documentation/devicetree/bindings/iio/light/vishay,vcnl4035.yaml b/Documentation/devicetree/bindings/iio/light/vishay,vcnl4035.yaml new file mode 100644 index 000000000000..e41c25817dd8 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/vishay,vcnl4035.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/light/vishay,vcnl4035.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: VISHAY VCNL4035 ambient Light and proximity sensor + +maintainers: + - Parthiban Nallathambi + +description: | + Datasheet at https://www.vishay.com/docs/84251/vcnl4035x01.pdf + +properties: + compatible: + const: vishay,vcnl4035 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + light-sensor@60 { + compatible = "vishay,vcnl4035"; + reg = <0x60>; + interrupt-parent = <&gpio4>; + interrupts = <11 IRQ_TYPE_LEVEL_LOW>; + }; + }; +... From patchwork Sat Oct 31 18:48:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 314628 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B103C55178 for ; Sat, 31 Oct 2020 18:52:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 494CB20739 for ; Sat, 31 Oct 2020 18:52:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170321; bh=dkhq8aeKyBrwS8VEAzZqhk9tRqNu7aZfA0D9vLmY4JE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=2n/yRL68RKfL2tw7AKp4Gj8F5F0IZiv3PUpA7WSYZHlG7CrW75yZ5kMQQ5UcIpCM9 d8Yy4byxpdiJBlio9Cj+kiP4hI0EMSpMPK48NBm/t0FXgeKrDThsa1KKjuOvNGY7aj HVxHUHvlLU0BVsAEb/P8HU127TP4z5sngwMX2nhs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728441AbgJaSwA (ORCPT ); Sat, 31 Oct 2020 14:52:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:35262 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSwA (ORCPT ); Sat, 31 Oct 2020 14:52:00 -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 8002920702; Sat, 31 Oct 2020 18:51:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170319; bh=dkhq8aeKyBrwS8VEAzZqhk9tRqNu7aZfA0D9vLmY4JE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=azppVyUOdHvR2GFBehbtQylQxl7id0OrrhSDozR4LePqJ3PeXAbXTAHGUne8tx8Hu Lqsh9OBNNJGOt1TFwj4jsUl+IDfN0v6HX5rIz4n68o21eGvDno54HtiaQF7jRelqAJ mT/6PBrnytkj1gni0gD44GfkLrZFbdJwC1UEqwiw= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Manivannan Sadhasivam , Peter Meerwald-Stadler Subject: [PATCH 22/46] dt-bindings:iio:light:st, vl6180: txt to yaml format conversion. Date: Sat, 31 Oct 2020 18:48:30 +0000 Message-Id: <20201031184854.745828-23-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron I'm not sure anyone would use this part primarily as an ALS, given the time of flight laser also present, but I'll stick with the original decision on where to put the binding. Added interrupts property as the device has a GPIO interrupt even if the driver is not currently using it. Signed-off-by: Jonathan Cameron Cc: Manivannan Sadhasivam Cc: Peter Meerwald-Stadler Acked-by: Manivannan Sadhasivam --- .../bindings/iio/light/st,vl6180.yaml | 45 +++++++++++++++++++ .../devicetree/bindings/iio/light/vl6180.txt | 15 ------- 2 files changed, 45 insertions(+), 15 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/light/st,vl6180.yaml b/Documentation/devicetree/bindings/iio/light/st,vl6180.yaml new file mode 100644 index 000000000000..27c36ab7990d --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/st,vl6180.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/light/st,vl6180.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicro VL6180 ALS, range and proximity sensor + +maintainers: + - Manivannan Sadhasivam + - Peter Meerwald-Stadler + +description: | + Proximity sensing module incorporating time of flight sensor + Datasheet at https://www.st.com/resource/en/datasheet/vl6180x.pdf + +properties: + compatible: + const: st,vl6180 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + proximity@29 { + compatible = "st,vl6180"; + reg = <0x29>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/light/vl6180.txt b/Documentation/devicetree/bindings/iio/light/vl6180.txt deleted file mode 100644 index fb9137d85df9..000000000000 --- a/Documentation/devicetree/bindings/iio/light/vl6180.txt +++ /dev/null @@ -1,15 +0,0 @@ -STMicro VL6180 - ALS, range and proximity sensor - -Link to datasheet: https://www.st.com/resource/en/datasheet/vl6180x.pdf - -Required properties: - - -compatible: should be "st,vl6180" - -reg: the I2C address of the sensor - -Example: - -vl6180@29 { - compatible = "st,vl6180"; - reg = <0x29>; -}; From patchwork Sat Oct 31 18:48:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320144 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451619ilc; Sat, 31 Oct 2020 11:52:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFgfFSDWei7CPh2RNflEMM5wqjioS1pn5uvAFKmBpckoEW+EtQJZSg25K/K7efX8G/f+Wv X-Received: by 2002:a17:906:d20a:: with SMTP id w10mr6480005ejz.3.1604170323109; Sat, 31 Oct 2020 11:52:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170323; cv=none; d=google.com; s=arc-20160816; b=EPj5m07MgdjMoWnoI8HByaM5LZfhHL4uEifkx3+259qR2MiiT7CbsjMBbjUc3B2tcf ynMJBLNXs5z+744HgLtRJBUF3B8E/GXwYa+NKdf7XmG/GE7l34vyRrzMa08vBMFMCBI8 pl0chVjnGMZWvjmneu8hFBU338PR4f/mkvPACoy/VFWiJYW6OpVPy14V5ecPhnDz08gz 02/8t5yijQBX//0if6QC6pX/XcfKDltMTKCVsokzKQw0pPIarZG0gYQm27pQGOSKXezo pLUe6LIGxe+rFh4OO2WhJ1XK45+quD///qpCJeYiObavmT7Q26TL0/9iruNWxemCduZ+ vM9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bnSBGPCXLf209qS6+1Yq4J3TcD+479e9jTN60dJOWFU=; b=IvULr4R8XyStC/DXElO3as9qaXuqkOfB11sGmlOpYjA9BJsim9IZf3jh53rn1AXV2M 0wurXBh+z0VkJhSivbcvBdz4FDsQRdTbbx9bmUZJktD+cb38gpFxkxwlUJ6xB3BUQwPC FZ8uP3Uoacg4d+fEQDCN7PHFOTTQHnJxLumTMmYDGJzry5aqXRCCeh1BH69I8TXkqOt+ MH5Qd2DRKhQbo+jSekeM1A/MQ4cwGrvzkAOaIhZTT+M/d02J82atSPSnqC/wlJD6JZh6 L6+GS3wtFTvnGDmC44aMCdOdy0yd0nSYvoY7sroy5J8Lb19K5sB6kmGHv4I5mObikPzw qlWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DJ5CcmD+; 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 f2si7081562ejc.542.2020.10.31.11.52.02; Sat, 31 Oct 2020 11:52: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=DJ5CcmD+; 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 S1728444AbgJaSwC (ORCPT + 6 others); Sat, 31 Oct 2020 14:52:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:35292 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSwB (ORCPT ); Sat, 31 Oct 2020 14:52:01 -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 3F8D92071A; Sat, 31 Oct 2020 18:52:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170321; bh=Nu2J9vKa1fygViBKeycZdTwrrBZvrFRMzcwEz4+VvgU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DJ5CcmD+xZGItti+vzbWQD9zWPB1sWl9cqFHqlCRZSrFIPsoYavXd57ye6PNiUP1z 4hMYltUgD6L8xPm9pB9C7p65shdyNZ2OQJTQl629pgzax9ymZSBYZc0d/CH+DaSAkA jBafqGlSo2zeXs5SmPQCE8bWrxajqDpzBInLrx4A= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Anson Huang Subject: [PATCH 23/46] dt-bindings:iio:magnetometer:fsl, mag3110: txt to yaml conversion Date: Sat, 31 Oct 2020 18:48:31 +0000 Message-Id: <20201031184854.745828-24-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Dropped a few bits of help text in here that didn't seem to add anything that wasn't fairly obvious. Otherwise simple format conversion Signed-off-by: Jonathan Cameron Cc: Anson Huang --- .../iio/magnetometer/fsl,mag3110.yaml | 48 +++++++++++++++++++ .../bindings/iio/magnetometer/mag3110.txt | 27 ----------- 2 files changed, 48 insertions(+), 27 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/magnetometer/fsl,mag3110.yaml b/Documentation/devicetree/bindings/iio/magnetometer/fsl,mag3110.yaml new file mode 100644 index 000000000000..6b54d32323fc --- /dev/null +++ b/Documentation/devicetree/bindings/iio/magnetometer/fsl,mag3110.yaml @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/magnetometer/fsl,mag3110.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale MAG3110 magnetometer sensor + +maintainers: + - Anson Huang + +properties: + compatible: + const: fsl,mag3110 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + vdd-supply: true + + vddio-supply: true + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + magnetometer@e { + compatible = "fsl,mag3110"; + reg = <0x0e>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c3_mag3110_int>; + interrupt-parent = <&gpio3>; + interrupts = <16 IRQ_TYPE_EDGE_RISING>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/magnetometer/mag3110.txt b/Documentation/devicetree/bindings/iio/magnetometer/mag3110.txt deleted file mode 100644 index bdd40bcaaa1f..000000000000 --- a/Documentation/devicetree/bindings/iio/magnetometer/mag3110.txt +++ /dev/null @@ -1,27 +0,0 @@ -* FREESCALE MAG3110 magnetometer sensor - -Required properties: - - - compatible : should be "fsl,mag3110" - - reg : the I2C address of the magnetometer - -Optional properties: - - - interrupts: the sole interrupt generated by the device - - Refer to interrupt-controller/interrupts.txt for generic interrupt client - node bindings. - - - vdd-supply: phandle to the regulator that provides power to the sensor. - - vddio-supply: phandle to the regulator that provides power to the sensor's IO. - -Example: - -magnetometer@e { - compatible = "fsl,mag3110"; - reg = <0x0e>; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_i2c3_mag3110_int>; - interrupt-parent = <&gpio3>; - interrupts = <16 IRQ_TYPE_EDGE_RISING>; -}; From patchwork Sat Oct 31 18:48:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 314629 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90E87C56201 for ; Sat, 31 Oct 2020 18:52:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5BDC720739 for ; Sat, 31 Oct 2020 18:52:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170324; bh=wnXWTxJo+4XkKc+gpzNSmMjl4Sp4fe6181L7kywo6ZE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=FJr/TCwNkF4C8w2mfaFl2Vr9vOtP4B89cmmb1IbgI7pOfYJnH75qMrFhE6wH9UvvW e57YaUp1P5pKbV3WQh9C7GQMje3cDM3rO5t3gQUC+4m1FEOwR+pNsnLgpt+9JB5gLG 4nqSBKfUUit24APzgkld/7gkvc6+rvBmCLmxUPf4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728445AbgJaSwD (ORCPT ); Sat, 31 Oct 2020 14:52:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:35334 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSwD (ORCPT ); Sat, 31 Oct 2020 14:52:03 -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 B1DE920720; Sat, 31 Oct 2020 18:52:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170322; bh=wnXWTxJo+4XkKc+gpzNSmMjl4Sp4fe6181L7kywo6ZE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sfwk2KOdtHjK4IBBbw911ciLf0qCBJLM4zybtFM6pVrSXxsrjjMr/9JTSUGkMLYBh 48iuJY6u9EgdXgtkptIWOL3CfI2HF+PQ+kQVeKEpPXKhFUV6QrxqxhHqBwn07xO3mQ 65SXxmP+1Q2U47Y0nrH5DsELub+msKLOEF68bhAY= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Linus Walleij Subject: [PATCH 24/46] dt-bindings:iio:magnetometer:asahi-kasei, ak8974: txt to yaml format conversion Date: Sat, 31 Oct 2020 18:48:32 +0000 Message-Id: <20201031184854.745828-25-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Simple conversion. I have pruned descriptions that did not add much useful detail. Note that the mount-matrix description will form part of a generic IIO binding. No need to repeat that in every driver that uses it. Signed-off-by: Jonathan Cameron Cc: Linus Walleij Reviewed-by: Linus Walleij --- .../bindings/iio/magnetometer/ak8974.txt | 31 ---------- .../iio/magnetometer/asahi-kasei,ak8974.yaml | 57 +++++++++++++++++++ 2 files changed, 57 insertions(+), 31 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt b/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt deleted file mode 100644 index 7f06eff3b504..000000000000 --- a/Documentation/devicetree/bindings/iio/magnetometer/ak8974.txt +++ /dev/null @@ -1,31 +0,0 @@ -* Asahi Kasei AK8974 magnetometer sensor - -Required properties: - -- compatible: - * "asahi-kasei,ak8974" - * "alps,hscdtd008a" -- reg : the I2C address of the magnetometer - -Optional properties: - -- avdd-supply: regulator supply for the analog voltage - (see regulator/regulator.txt) -- dvdd-supply: regulator supply for the digital voltage - (see regulator/regulator.txt) -- interrupts: data ready (DRDY) and interrupt (INT1) lines - from the chip, the DRDY interrupt must be placed first. - The interrupts can be triggered on rising or falling - edges alike. -- mount-matrix: an optional 3x3 mounting rotation matrix - -Example: - -ak8974@f { - compatible = "asahi-kasei,ak8974"; - reg = <0x0f>; - avdd-supply = <&foo_reg>; - dvdd-supply = <&bar_reg>; - interrupts = <0 IRQ_TYPE_EDGE_RISING>, - <1 IRQ_TYPE_EDGE_RISING>; -}; diff --git a/Documentation/devicetree/bindings/iio/magnetometer/asahi-kasei,ak8974.yaml b/Documentation/devicetree/bindings/iio/magnetometer/asahi-kasei,ak8974.yaml new file mode 100644 index 000000000000..cefb70def188 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/magnetometer/asahi-kasei,ak8974.yaml @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/magnetometer/asahi-kasei,ak8974.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Asahi Kasei AK8974 magnetometer sensor + +maintainers: + - Linus Walleij + +properties: + compatible: + enum: + - alps,hscdtd008a + - asahi-kasei,ak8974 + + reg: + maxItems: 1 + + interrupts: + minItems: 1 + maxItems: 2 + description: | + Data ready (DRDY) and interrupt (INT1) lines from the chip. The DRDY + interrupt must be placed first. The interrupts can be triggered on + rising or falling edges. + + avdd-supply: true + + dvdd-supply: true + + mount-matrix: true + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + magnetometer@f { + compatible = "asahi-kasei,ak8974"; + reg = <0x0f>; + avdd-supply = <&foo_reg>; + dvdd-supply = <&bar_reg>; + interrupts = <0 IRQ_TYPE_EDGE_RISING>, + <1 IRQ_TYPE_EDGE_RISING>; + }; + }; +... From patchwork Sat Oct 31 18:48:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320146 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451641ilc; Sat, 31 Oct 2020 11:52:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2vdh5g950+d/CtewfFvBQ5qA6/NMgqwZGABhepGtsRxO7tp7LyJ7+WzSj+Q/gxx0wRwui X-Received: by 2002:a17:906:824a:: with SMTP id f10mr8768753ejx.167.1604170325960; Sat, 31 Oct 2020 11:52:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170325; cv=none; d=google.com; s=arc-20160816; b=e2dyO19k9/tZpBG2iwkspICOt7gHpBsed6kx+0D8ek7WmTtdMSjw3VFPd2qF8H07+i WZed4A7/xq5iDgA/N3Ftbd3djYu7oPEUsB9XuZGD/clVVMdjOVEWQ9a7s+9u+ZJnUMpd yco3t6IxhW44AR7KmRiiLoQ7wlkXpqpq6pFmWvHx+gOGBcrFvML5/8/eY+Gx6QugNLLD QozNDz7Hd3kAQclgng10nySG7vLZiLVj1KEMyQsThbaLo+6m1GCpClfRdpIcMBmPTBpT bqZjwI6iFAHdTSKnHB+qqUGX6CVZE3JS98CQmM8S69s3DG3mg21PDXOfnQ64Qq36YQgf 78bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vVMTmSrA/Vvg8teae1D8ghNLp0AkTYo0ACCBpGnJXF8=; b=eneFd8tO9jsvuX5DzIcnIPjuZvicX4hxrudz1eGL9203RkJEiys/tteLP9yUR3OobD TGR5Fp8VbHQLmeSCdOKhRMhTSMTyRTQp/+cqfewDRC/0rmqjInwwJxhltk5zd2G7FaIf FHDxb2ploH5+ml+2xTDKLS6Beg/GV/jJRApo8vuU+WA4YgTm7+JG7zIzmlGapS313DdY pt5QfobP24FwwSZgszOtfRkAXD+0WlJBq9RwQe5v0jhl6kAhl+HFX+mnIXA14x+0K0Yr /DEf87BJDDAKrfcfCGpJE9ak9WOtOiOJDwhJTq5FsfkRHZNIBVsCUwbgs8BE2EJcKZnJ em2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=J0GJJ9ym; 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 f2si7081562ejc.542.2020.10.31.11.52.05; Sat, 31 Oct 2020 11:52: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=J0GJJ9ym; 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 S1728448AbgJaSwE (ORCPT + 6 others); Sat, 31 Oct 2020 14:52:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:35354 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSwE (ORCPT ); Sat, 31 Oct 2020 14:52:04 -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 2079E20729; Sat, 31 Oct 2020 18:52:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170324; bh=tOcrwtbSr7hbcaF8Jv3E95/oHdOCgnCEyE5zuMQCuk4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J0GJJ9ymvQ+NSSbeLP9HuyeqTHC6hApz7L2AM0zQRWeqC4xjgzioaF+ZAdDipUHUo /1z8RF7hFaXrf/4ijhVXX0y8bZdJ6x6nLMZdteP1nN8zs40/XQh3AkGciAwFFIVSoU YLRR9Q2kla6TRwum1ey22+IceElicQhrU6psdkMc= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron Subject: [PATCH 25/46] dt-bindings:iio:magnetometer:bosch, bmc150_magn: txt to yaml conversion. Date: Sat, 31 Oct 2020 18:48:33 +0000 Message-Id: <20201031184854.745828-26-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron This describes the bindings for both stand along magnetometers and ones which form part of a multi chip package. Given original author hasn't been active remotely recently I've put myself as maintainer for this one. I would of course like to hand this over to someone more appropriate so shout out if this is you! Signed-off-by: Jonathan Cameron --- .../bindings/iio/magnetometer/bmc150_magn.txt | 25 --------- .../iio/magnetometer/bosch,bmc150_magn.yaml | 55 +++++++++++++++++++ 2 files changed, 55 insertions(+), 25 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt b/Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt deleted file mode 100644 index 22912e43b60c..000000000000 --- a/Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt +++ /dev/null @@ -1,25 +0,0 @@ -* Bosch BMC150 magnetometer sensor - -http://ae-bst.resource.bosch.com/media/products/dokumente/bmc150/BST-BMC150-DS000-04.pdf - -Required properties: - - - compatible : should be one of: - "bosch,bmc150_magn" - "bosch,bmc156_magn" - "bosch,bmm150" - "bosch,bmm150_magn" (DEPRECATED, use bosch,bmm150) - - reg : the I2C address of the magnetometer - -Optional properties: - - - interrupts : interrupt mapping for GPIO IRQ - -Example: - -bmc150_magn@12 { - compatible = "bosch,bmc150_magn"; - reg = <0x12>; - interrupt-parent = <&gpio1>; - interrupts = <0 1>; -}; diff --git a/Documentation/devicetree/bindings/iio/magnetometer/bosch,bmc150_magn.yaml b/Documentation/devicetree/bindings/iio/magnetometer/bosch,bmc150_magn.yaml new file mode 100644 index 000000000000..cdef7aeba708 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/magnetometer/bosch,bmc150_magn.yaml @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/magnetometer/bosch,bmc150_magn.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Bosch BMC150 magnetometer sensor + +maintainers: + - Jonathan Cameron + +description: | + Supports a range of parts, some of which form part of a multi die + package that also contains other sensors. The interface is independent + however, so a separate driver is used to support the magnetometer part. + Datasheet at: + http://ae-bst.resource.bosch.com/media/products/dokumente/bmc150/BST-BMC150-DS000-04.pdf + +properties: + compatible: + description: + Note the bmm150_magn is a deprecated compatible as this part contains only + a magnetometer. + enum: + - bosch,bmc150_magn + - bosch,bmc156_magn + - bosch,bmm150 + - bosch,bmm150_magn + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + magnetometer@12 { + compatible = "bosch,bmc150_magn"; + reg = <0x12>; + interrupt-parent = <&gpio1>; + interrupts = <0 1>; + }; + }; +... From patchwork Sat Oct 31 18:48: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: 314627 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2677C5DF9D for ; Sat, 31 Oct 2020 18:52:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 85D0E2074F for ; Sat, 31 Oct 2020 18:52:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170326; bh=YrwOjfuiPOuHCounAvfePwYGXB2gT4eZEuIKvYEc7c0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=BXHp0HLapYZEUAvhyOWZRY7Iptd8XM7r3al7/czhDedxzArTOAEXJ3KJK0IE7je7u BOx4ehyQGucn6oB+eh7ScDCMuX145eLPc8amhPtf3cYlDK8UUlpssWHyQKJwf1dOYs sEeSLIas4ch9jC88SD8t7Z7UdUY0Skd56a5PJpZY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728450AbgJaSwG (ORCPT ); Sat, 31 Oct 2020 14:52:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:35396 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSwF (ORCPT ); Sat, 31 Oct 2020 14:52:05 -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 641DC20731; Sat, 31 Oct 2020 18:52:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170325; bh=YrwOjfuiPOuHCounAvfePwYGXB2gT4eZEuIKvYEc7c0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dyQUC0zTdEbfT9nILYzqIARV6f0rSPGxUSJ96Esh4cZrbMAdtd6+ZvsdgJT3HQl+H bQqc3L5Iv7djMQnV1s1wZFUZTYHVTgyVjMwxP6DNZAxBUQuE5w6FfuHxOE5KfxhuLu Wg/Li3pUyXkFcEPU8oq9M5m7+lNrNYKVwFfrWFXU= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Neil Brown Subject: [PATCH 26/46] dt-bindings:iio:magnetometer:honeywell, hmc5843: txt to yaml format conversion Date: Sat, 31 Oct 2020 18:48:34 +0000 Message-Id: <20201031184854.745828-27-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Mostly a straight conversion, but the txt file had an oddity. It documented a gpios property for what appeared to be in interrupt line. There are mainline dts that have this as interrupts, so I've converted it to that. Signed-off-by: Jonathan Cameron Cc: Neil Brown --- .../bindings/iio/magnetometer/hmc5843.txt | 21 --------- .../iio/magnetometer/honeywell,hmc5843.yaml | 43 +++++++++++++++++++ 2 files changed, 43 insertions(+), 21 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/magnetometer/hmc5843.txt b/Documentation/devicetree/bindings/iio/magnetometer/hmc5843.txt deleted file mode 100644 index 8e191eef014e..000000000000 --- a/Documentation/devicetree/bindings/iio/magnetometer/hmc5843.txt +++ /dev/null @@ -1,21 +0,0 @@ -* Honeywell HMC5843 magnetometer sensor - -Required properties: - - - compatible : should be "honeywell,hmc5843" - Other models which are supported with driver are: - "honeywell,hmc5883" - "honeywell,hmc5883l" - "honeywell,hmc5983" - - reg : the I2C address of the magnetometer - typically 0x1e - -Optional properties: - - - gpios : should be device tree identifier of the magnetometer DRDY pin - -Example: - -hmc5843@1e { - compatible = "honeywell,hmc5843" - reg = <0x1e>; -}; diff --git a/Documentation/devicetree/bindings/iio/magnetometer/honeywell,hmc5843.yaml b/Documentation/devicetree/bindings/iio/magnetometer/honeywell,hmc5843.yaml new file mode 100644 index 000000000000..5e778c98584e --- /dev/null +++ b/Documentation/devicetree/bindings/iio/magnetometer/honeywell,hmc5843.yaml @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/magnetometer/honeywell,hmc5843.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Honeywell HMC5843 magnetometer sensor + +maintainers: + - Neil Brown + +properties: + compatible: + enum: + - honeywell,hmc5843 + - honeywell,hmc5883 + - honeywell,hmc5883l + - honeywell,hmc5983 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + magnetometer@1e { + compatible = "honeywell,hmc5843"; + reg = <0x1e>; + }; + }; +... From patchwork Sat Oct 31 18:48:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320148 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451660ilc; Sat, 31 Oct 2020 11:52:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+UidGw1BhFpUIleylZVQLJGKsXPPIEZ1dl2sQ+AeHXZImYgK3CGol5fNNdYxirykvneuq X-Received: by 2002:a50:f316:: with SMTP id p22mr9019818edm.201.1604170328779; Sat, 31 Oct 2020 11:52:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170328; cv=none; d=google.com; s=arc-20160816; b=k06nydqgkGdT/jZr2xdYIeYfUsPWT3p19+W53NXpg7TjG8ku/ahmKMRt4Mp7HVdBRf iVPt5vKx54VDleV5qAySbuO7xAJgATqU97ebFL+71PEynRTs8jheRfDSpurHaDPO6G4t V1gAlIVqeQ+Zr+tmT54XArxk4EcW2Us7nhoU+LfaV/74CUEh9nnt6wf7wvTeAL7oxuFM skNKtdWHdatUUxPlPJE/RAMM5m1YgjiiprDrJaJi06MFFDYuinKjpBbE8Jw6AFrxKh5l 6KuqPqSNTv1ys5/ZO1AgnlVWvKTbkHKExlVSi4X4wOxnDbLMTmo244B8aStIK1Y72sHW sJVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iieXr0EeXIUI6H+hkNZwhz4ryOQU9RwP3O9v5IZhYVM=; b=CJtnYb3ZxmP6uymZSkVcJD01c3V2vgs7uAmSKe9Pwtr25o+5DhbgG5pA0nz5DtIW+0 cyjGa/G1px/sYojkroAB9CpXDlGEsyHXq80mO3bcwzvoiaTsO5IZZmV4RQNWMtC5+Woo IowKJoEnXAfBZZ/gfnkDwFPzQlOWfN+E6NAW5e0egQ59+nt/wWzJ53ErKRjVFeFKUKnO 7xEHGSwnMQVy9aFSFx5i29oQp2Bg4g3Xeuh5r4CPrAsmUbajBvv9hhHPaWtrmlHo034R p0cwBeVYQFr+QxJdR984c6leu2v0T+JI7v9q7GVnamCCfU7oEMFgu/xRY+OKvLOcW0Xt 0OYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Cgi159GZ; 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 f2si7081562ejc.542.2020.10.31.11.52.08; Sat, 31 Oct 2020 11:52:08 -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=Cgi159GZ; 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 S1728452AbgJaSwH (ORCPT + 6 others); Sat, 31 Oct 2020 14:52:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:35440 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSwH (ORCPT ); Sat, 31 Oct 2020 14:52:07 -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 CEB812072C; Sat, 31 Oct 2020 18:52:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170326; bh=7/W6pWkdZfo3RBWAX/m2CGUiB8efM1eukGKrO2FOxTo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cgi159GZ4sSnk9QHNFPnqo4D4ZODh1Nm3KwnqXHKr+pRIFfvqIuAqFIXV7zlznL81 gUZ2JaCnN/XSZEfDCHxeKhdQShgIejcSJOOS+jJXnLTrlR1SaXmBxfu0Wnjvqn+5vk g3Y2NzeJXEUAnypTNgR5ZC6yEtp+XHgOJaIovE0A= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Song Qiang Subject: [PATCH 27/46] dt-bindings:iio:magnetometer:pni, rm3100: txt to yaml conversion. Date: Sat, 31 Oct 2020 18:48:35 +0000 Message-Id: <20201031184854.745828-28-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Simple binding format conversion. Signed-off-by: Jonathan Cameron Cc: Song Qiang --- .../bindings/iio/magnetometer/pni,rm3100.txt | 20 --------- .../bindings/iio/magnetometer/pni,rm3100.yaml | 42 +++++++++++++++++++ 2 files changed, 42 insertions(+), 20 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.txt b/Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.txt deleted file mode 100644 index 497c932e9e39..000000000000 --- a/Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.txt +++ /dev/null @@ -1,20 +0,0 @@ -* PNI RM3100 3-axis magnetometer sensor - -Required properties: - -- compatible : should be "pni,rm3100" -- reg : the I2C address or SPI chip select number of the sensor. - -Optional properties: - -- interrupts: data ready (DRDY) from the chip. - The interrupts can be triggered on level high. - -Example: - -rm3100: rm3100@20 { - compatible = "pni,rm3100"; - reg = <0x20>; - interrupt-parent = <&gpio0>; - interrupts = <4 IRQ_TYPE_LEVEL_HIGH>; -}; diff --git a/Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.yaml b/Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.yaml new file mode 100644 index 000000000000..a845cdd23e7b --- /dev/null +++ b/Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.yaml @@ -0,0 +1,42 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/magnetometer/pni,rm3100.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: PNI RM3100 3-axis magnetometer sensor + +maintainers: + - Song Qiang + +properties: + compatible: + const: pni,rm3100 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + magnetometer@20 { + compatible = "pni,rm3100"; + reg = <0x20>; + interrupt-parent = <&gpio0>; + interrupts = <4 IRQ_TYPE_LEVEL_HIGH>; + }; + }; +... From patchwork Sat Oct 31 18:48:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 314626 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB7D9C5517A for ; Sat, 31 Oct 2020 18:52:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7442320659 for ; Sat, 31 Oct 2020 18:52:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170330; bh=NgA6N01IC4MfkFs0igFXXfwZNvymcYzAxkgKMJSZPMQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=0bT4/3omGlKkRQ+i6AvuZMLy3aKGjF/ssV3N8oW3H3nQq4L5wkYmKoZ6B5eq22CQI PQ4tOJ3nCoMqkZnfNIJUhk1ZC1ZTpO5+LMij6Ryf+vGaeTRVwp1B85sA8ukd67A4WW m7kNolz6uarNJMYRUxwBzsYWqcJ5mhOodDITGPlM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728454AbgJaSwJ (ORCPT ); Sat, 31 Oct 2020 14:52:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:35484 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSwJ (ORCPT ); Sat, 31 Oct 2020 14:52:09 -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 4636320724; Sat, 31 Oct 2020 18:52:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170328; bh=NgA6N01IC4MfkFs0igFXXfwZNvymcYzAxkgKMJSZPMQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VOYb0IabtPbF4z8pSZINIeJ8nFkx5jg/ooBdEBUU7MdUP+sQmVFNV5YY6WfwYPwzU 0NlwVqDb5lNlfSRYmMWRbycfY0AQZuGxs1C/cEl3tN4aWEFD2NTAJR2LsJTgV+WrkH Cu5CRWKk0669BooIUALJ54oQ6aDwuoLMuo7u8PHw= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Ludovic Desroches , Eugen Hristev Subject: [PATCH 28/46] dt-bindings:iio:adc:atmel, sama5d2-adc: txt to yaml conversion Date: Sat, 31 Oct 2020 18:48:36 +0000 Message-Id: <20201031184854.745828-29-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Whilst this binding has a lot of elements they are all fairly standard. Hence pretty much direct txt to yaml line by line conversion. Signed-off-by: Jonathan Cameron Cc: Ludovic Desroches Cc: Eugen Hristev --- .../bindings/iio/adc/at91-sama5d2_adc.txt | 50 --------- .../bindings/iio/adc/atmel,sama5d2-adc.yaml | 104 ++++++++++++++++++ 2 files changed, 104 insertions(+), 50 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/adc/at91-sama5d2_adc.txt b/Documentation/devicetree/bindings/iio/adc/at91-sama5d2_adc.txt deleted file mode 100644 index 07c59f301b31..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/at91-sama5d2_adc.txt +++ /dev/null @@ -1,50 +0,0 @@ -* AT91 SAMA5D2 Analog to Digital Converter (ADC) - -Required properties: - - compatible: Should be "atmel,sama5d2-adc" or "microchip,sam9x60-adc". - - reg: Should contain ADC registers location and length. - - interrupts: Should contain the IRQ line for the ADC. - - clocks: phandle to device clock. - - clock-names: Must be "adc_clk". - - vref-supply: Supply used as reference for conversions. - - vddana-supply: Supply for the adc device. - - atmel,min-sample-rate-hz: Minimum sampling rate, it depends on SoC. - - atmel,max-sample-rate-hz: Maximum sampling rate, it depends on SoC. - - atmel,startup-time-ms: Startup time expressed in ms, it depends on SoC. - - atmel,trigger-edge-type: One of possible edge types for the ADTRG hardware - trigger pin. When the specific edge type is detected, the conversion will - start. Possible values are rising, falling, or both. - This property uses the IRQ edge types values: IRQ_TYPE_EDGE_RISING , - IRQ_TYPE_EDGE_FALLING or IRQ_TYPE_EDGE_BOTH - -Optional properties: - - dmas: Phandle to dma channel for the ADC. - - dma-names: Must be "rx" when dmas property is being used. - See ../../dma/dma.txt for details. - - #io-channel-cells: in case consumer drivers are attached, this must be 1. - See for details. - -Properties for consumer drivers: - - Consumer drivers can be connected to this producer device, as specified - in - - Channels exposed are specified in: - - -Example: - -adc: adc@fc030000 { - compatible = "atmel,sama5d2-adc"; - reg = <0xfc030000 0x100>; - interrupts = <40 IRQ_TYPE_LEVEL_HIGH 7>; - clocks = <&adc_clk>; - clock-names = "adc_clk"; - atmel,min-sample-rate-hz = <200000>; - atmel,max-sample-rate-hz = <20000000>; - atmel,startup-time-ms = <4>; - vddana-supply = <&vdd_3v3_lp_reg>; - vref-supply = <&vdd_3v3_lp_reg>; - atmel,trigger-edge-type = ; - dmas = <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) | AT91_XDMAC_DT_PERID(25))>; - dma-names = "rx"; - #io-channel-cells = <1>; -} diff --git a/Documentation/devicetree/bindings/iio/adc/atmel,sama5d2-adc.yaml b/Documentation/devicetree/bindings/iio/adc/atmel,sama5d2-adc.yaml new file mode 100644 index 000000000000..9b282c3ee8fb --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/atmel,sama5d2-adc.yaml @@ -0,0 +1,104 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/atmel,sama5d2-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: AT91 SAMA5D2 Analog to Digital Converter (ADC) + +maintainers: + - Ludovic Desroches + - Eugen Hristev + +properties: + compatible: + enum: + - atmel,sama5d2-adc + - microchip,sam9x60-adc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + const: adc_clk + + vref-supply: true + vddana-supply: true + + atmel,min-sample-rate-hz: + $ref: '/schemas/types.yaml#/definitions/uint32' + description: Minimum sampling rate, it depends on SoC. + + atmel,max-sample-rate-hz: + $ref: '/schemas/types.yaml#/definitions/uint32' + description: Maximum sampling rate, it depends on SoC. + + atmel,startup-time-ms: + $ref: '/schemas/types.yaml#/definitions/uint32' + description: Startup time expressed in ms, it depends on SoC. + + atmel,trigger-edge-type: + $ref: '/schemas/types.yaml#/definitions/uint32' + description: + One of possible edge types for the ADTRG hardware trigger pin. + When the specific edge type is detected, the conversion will + start. Should be one of IRQ_TYPE_EDGE_RISING, IRQ_TYPE_EDGE_FALLING + or IRQ_TYPE_EDGE_BOTH. + enum: [1, 2, 3] + + dmas: + maxItems: 1 + + dma-names: + const: rx + + "#io-channel-cells": + const: 1 + +additionalProperties: false + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - vref-supply + - vddana-supply + - atmel,min-sample-rate-hz + - atmel,max-sample-rate-hz + - atmel,startup-time-ms + - atmel,trigger-edge-type + +examples: + - | + #include + #include + soc { + #address-cells = <1>; + #size-cells = <1>; + + adc@fc030000 { + compatible = "atmel,sama5d2-adc"; + reg = <0xfc030000 0x100>; + interrupts = <40 IRQ_TYPE_LEVEL_HIGH 7>; + clocks = <&adc_clk>; + clock-names = "adc_clk"; + atmel,min-sample-rate-hz = <200000>; + atmel,max-sample-rate-hz = <20000000>; + atmel,startup-time-ms = <4>; + vddana-supply = <&vdd_3v3_lp_reg>; + vref-supply = <&vdd_3v3_lp_reg>; + atmel,trigger-edge-type = ; + dmas = <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) | AT91_XDMAC_DT_PERID(25))>; + dma-names = "rx"; + #io-channel-cells = <1>; + }; + }; +... From patchwork Sat Oct 31 18:48:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320150 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451724ilc; Sat, 31 Oct 2020 11:52:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwv+SR1UQy4lPn0iUJJIP1CjDLCZmX757PRX95p06BzRV5izFkB0eIXCbgEj1nmxTxkknQB X-Received: by 2002:a50:ab0e:: with SMTP id s14mr2758403edc.172.1604170335977; Sat, 31 Oct 2020 11:52:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170335; cv=none; d=google.com; s=arc-20160816; b=jCstn6+kN3z316cBsVy64pDT7Anx8aIRHciz6gpdqPkLt3Y+n+B2YiQCt+2yTLLZ/F dXEoKXB+K2V/3x3Iv9pnkeIJ79yuzpC3uNM2UMW9ejCYO0EnJMojrph5WyDcAwelG8J3 npImSS53F4jAcFY/IKdgkAGjwt8nOPbPWYTY74xh6EvXA8Ou1GJg2Yq4wjJ0NNsTJ6FQ ms+HyLJsLGA93dwc4jbcEPWSgruZShh6Z6aAORKGmL02bjw4nYjwcJSctnUuQ7nf5ALb h/Ccc20Fe8gDzl5CmZW9Kf+Hr3m8i3pHzYusRp5uV/JvwlZQ1uwLoP7SwjUVGHKlS4H3 1iCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AEtSLf96bQicTmvKZCTfZTGRtNK/Fv33xodJMMtznik=; b=daB7y5mGcwdRzSrPku8GRXNFPusqbkTeWUOlsPzK5pHXNrbugWEvCZY4+/yqICeG5K w6Jp7ZHws90z8jCBdnbbw5L+gHHIXdAjfMCpbi2/3yeW0PjdHcPAsiTvGaYFNFlRvmFH DM3A33yNkgsTrst/kyVBfGzsIkYyS/saryQTl85gO+I/aTF340+Z+LJNETlDYPeA/Az1 PDyH9+7MBBSqrVI9wajZJTuumuaexxwGoQpKebidIowcoimdXWxLzdNJ3kzoR9DEuqeM UmRQSFyAIDnj1hM0p5ABe/rL0VWlkCdPVuK8JWGHuoB/H4CqkWDWto/R7nhkbtfNNPcd Iomw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iEz621He; 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 f2si7081562ejc.542.2020.10.31.11.52.15; Sat, 31 Oct 2020 11:52:15 -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=iEz621He; 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 S1728460AbgJaSwO (ORCPT + 6 others); Sat, 31 Oct 2020 14:52:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:35520 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728399AbgJaSwL (ORCPT ); Sat, 31 Oct 2020 14:52:11 -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 EB64A20706; Sat, 31 Oct 2020 18:52:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170330; bh=1Q0ZJ/Wana9Pw/ke3PIV+04f2kJRfZw43bG3mikPiHQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iEz621HeRFYd/wuqe6Ad7T4yAeuxtpMGOtpITNc/Ydqipaf7rresHThPcVRP2faWv slf+U/DZWNU1o+91vtOsTp3uyo/0GaLsafYbYy5jMEx36WFhMwxS1MwTKMJofjwlD8 82bin0QiHMFqak1DH9bB/891v4//c5KSzf6IjSt8= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Alexandre Belloni , Nicolas Ferre , Ludovic Desroches Subject: [PATCH 29/46] dt-bindings:iio:adc:atmel, sama9260-adc: conversion to yaml from at91_adc.txt Date: Sat, 31 Oct 2020 18:48:37 +0000 Message-Id: <20201031184854.745828-30-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron This binding raises a few questions. 1) Do we need #address-cells and #size-cells as the child nodes don't have a reg property? A few dtsi files include these so if we drop the requirement we will need to clean those up as well. 2) Renamed to a specific part. Given we have another at91 ADC binding it is clear now this won't cover all at91 parts so lets name it after a specific part. 3) For atmel,adc-res-names the description is a big vague. Are other resolution names allowed? We don't seem to have any currently. There are a few things we would do differently in an ADC binding if we were starting from scratch but we are stuck with what we have (which made sense back when this was written!) We may be able to tighten up some elements of this binding in the future by careful checking of what values properties can actually take. Signed-off-by: Jonathan Cameron Cc: Alexandre Belloni Cc: Nicolas Ferre Cc: Ludovic Desroches --- .../devicetree/bindings/iio/adc/at91_adc.txt | 83 -------- .../bindings/iio/adc/atmel,sama9260-adc.yaml | 178 ++++++++++++++++++ 2 files changed, 178 insertions(+), 83 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/adc/at91_adc.txt b/Documentation/devicetree/bindings/iio/adc/at91_adc.txt deleted file mode 100644 index f65b04fb7962..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/at91_adc.txt +++ /dev/null @@ -1,83 +0,0 @@ -* AT91's Analog to Digital Converter (ADC) - -Required properties: - - compatible: Should be "atmel,-adc" - can be "at91sam9260", "at91sam9g45" or "at91sam9x5" - - reg: Should contain ADC registers location and length - - interrupts: Should contain the IRQ line for the ADC - - clock-names: tuple listing input clock names. - Required elements: "adc_clk", "adc_op_clk". - - clocks: phandles to input clocks. - - atmel,adc-channels-used: Bitmask of the channels muxed and enabled for this - device - - atmel,adc-startup-time: Startup Time of the ADC in microseconds as - defined in the datasheet - - atmel,adc-vref: Reference voltage in millivolts for the conversions - - atmel,adc-res: List of resolutions in bits supported by the ADC. List size - must be two at least. - - atmel,adc-res-names: Contains one identifier string for each resolution - in atmel,adc-res property. "lowres" and "highres" - identifiers are required. - -Optional properties: - - atmel,adc-use-external-triggers: Boolean to enable the external triggers - - atmel,adc-use-res: String corresponding to an identifier from - atmel,adc-res-names property. If not specified, the highest - resolution will be used. - - atmel,adc-sleep-mode: Boolean to enable sleep mode when no conversion - - atmel,adc-sample-hold-time: Sample and Hold Time in microseconds - - atmel,adc-ts-wires: Number of touchscreen wires. Should be 4 or 5. If this - value is set, then the adc driver will enable touchscreen - support. - NOTE: when adc touchscreen is enabled, the adc hardware trigger will be - disabled. Since touchscreen will occupy the trigger register. - - atmel,adc-ts-pressure-threshold: a pressure threshold for touchscreen. It - makes touch detection more precise. - -Optional trigger Nodes: - - Required properties: - * trigger-name: Name of the trigger exposed to the user - * trigger-value: Value to put in the Trigger register - to activate this trigger - - Optional properties: - * trigger-external: Is the trigger an external trigger? - -Examples: -adc0: adc@fffb0000 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "atmel,at91sam9260-adc"; - reg = <0xfffb0000 0x100>; - interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>; - clocks = <&adc_clk>, <&adc_op_clk>; - clock-names = "adc_clk", "adc_op_clk"; - atmel,adc-channels-used = <0xff>; - atmel,adc-startup-time = <40>; - atmel,adc-use-external-triggers; - atmel,adc-vref = <3300>; - atmel,adc-res = <8 10>; - atmel,adc-res-names = "lowres", "highres"; - atmel,adc-use-res = "lowres"; - - trigger0 { - trigger-name = "external-rising"; - trigger-value = <0x1>; - trigger-external; - }; - trigger1 { - trigger-name = "external-falling"; - trigger-value = <0x2>; - trigger-external; - }; - - trigger2 { - trigger-name = "external-any"; - trigger-value = <0x3>; - trigger-external; - }; - - trigger3 { - trigger-name = "continuous"; - trigger-value = <0x6>; - }; -}; diff --git a/Documentation/devicetree/bindings/iio/adc/atmel,sama9260-adc.yaml b/Documentation/devicetree/bindings/iio/adc/atmel,sama9260-adc.yaml new file mode 100644 index 000000000000..c480e835e5a8 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/atmel,sama9260-adc.yaml @@ -0,0 +1,178 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/atmel,sama9260-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: AT91 sama9260 and similar Analog to Digital Converter (ADC) + +maintainers: + - Alexandre Belloni + +properties: + compatible: + enum: + - atmel,at91sam9260-adc + - atmel,at91sam9rl-adc + - atmel,at91sam9g45-adc + - atmel,at91sam9x5-adc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + minItems: 2 + maxItems: 2 + + clock-names: + items: + - const: adc_clk + - const: adc_op_clk + + atmel,adc-channels-used: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Bitmask of the channels muxed and enabled for this device + + atmel,adc-startup-time: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Startup Time of the ADC in microseconds as defined in the datasheet + + atmel,adc-vref: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Reference voltage in millivolts for the conversions + + atmel,adc-res: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: List of resolutions in bits supported by the ADC. + minItems: 2 + + atmel,adc-res-names: + $ref: /schemas/types.yaml#/definitions/string-array + description: | + Contains one identifier string for each resolution in atmel,adc-res + property. lowres and highres identifiers are required. + + atmel,adc-use-external-triggers: + $ref: /schemas/types.yaml#/definitions/flag + description: Enable the external triggers + + atmel,adc-use-res: + $ref: /schemas/types.yaml#/definitions/string + description: + String corresponding to an identifier from atmel,adc-res-names property. + If not specified, the highest resolution will be used. + + atmel,adc-sleep-mode: + $ref: /schemas/types.yaml#/definitions/flag + description: Enable sleep mode when no conversion + + atmel,adc-sample-hold-time: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Sample and Hold Time in microseconds + + atmel,adc-ts-wires: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Number of touchscreen wires. Must be set to enable touchscreen. + NOTE: when adc touchscreen is enabled, the adc hardware trigger will be + disabled. Since touchscreen will occupy the trigger register. + enum: + - 4 + - 5 + + atmel,adc-ts-pressure-threshold: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Pressure threshold for touchscreen. + + "#io-channel-cells": + const: 1 + +additionalProperties: false + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - atmel,adc-channels-used + - atmel,adc-startup-time + - atmel,adc-vref + - atmel,adc-res + - atmel,adc-res-names + +patternProperties: + "^(trigger)[0-9]$": + type: object + description: Child node to describe a trigger exposed to the user. + properties: + trigger-name: + $ref: /schemas/types.yaml#/definitions/string + description: Identifying name. + + trigger-value: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Value to put in the Trigger register to activate this trigger + + trigger-external: + $ref: /schemas/types.yaml#/definitions/flag + description: This trigger is provided from an external pin. + + additionalProperties: false + required: + - trigger-name + - trigger-value + +examples: + - | + #include + #include + soc { + #address-cells = <1>; + #size-cells = <1>; + + adc@fffb0000 { + compatible = "atmel,at91sam9260-adc"; + reg = <0xfffb0000 0x100>; + interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>; + clocks = <&adc_clk>, <&adc_op_clk>; + clock-names = "adc_clk", "adc_op_clk"; + atmel,adc-channels-used = <0xff>; + atmel,adc-startup-time = <40>; + atmel,adc-use-external-triggers; + atmel,adc-vref = <3300>; + atmel,adc-res = <8 10>; + atmel,adc-res-names = "lowres", "highres"; + atmel,adc-use-res = "lowres"; + + trigger0 { + trigger-name = "external-rising"; + trigger-value = <0x1>; + trigger-external; + }; + + trigger1 { + trigger-name = "external-falling"; + trigger-value = <0x2>; + trigger-external; + }; + + trigger2 { + trigger-name = "external-any"; + trigger-value = <0x3>; + trigger-external; + }; + + trigger3 { + trigger-name = "continuous"; + trigger-value = <0x6>; + }; + }; + }; +... From patchwork Sat Oct 31 18:48:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320152 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451743ilc; Sat, 31 Oct 2020 11:52:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKFjZ6p+OKg4O9j8WJo48Rc0vIo9RtWm264B7iUOdgJ4pbRPRCVRX+JordDMAibto/+8xK X-Received: by 2002:aa7:d6da:: with SMTP id x26mr8752132edr.238.1604170337517; Sat, 31 Oct 2020 11:52:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170337; cv=none; d=google.com; s=arc-20160816; b=Zr02SGWP8+pGx9vR7e0bTUM6V2T4wehu2MYaRyD4sE4SxhEPlzapk3njV8D4RxNQRE ZNXbqmC/zq2QiU7Ibofals1pjLdwF2qsjAXduhR4q99NXj31uuP9JuWiZUmzNcMCBgre yXMWpKxU9dtqIn3i7+JzFIJnlZ6OqRIf0qk65vk4XC1hcBhim590EZT+WiKCWQZHKq5+ lKzL2ZdbDzT5jkgpTdykg26B/+y1+DKO9lTbEMi1gTpzq7CKoHv6BoZYp9wy2l+qN3wv frh8IGA9dB11Rycr8WQ2hZ51295+DMZxAbw428f0tbMx7Q1kNV+xNowAKxT/bWW8R6Mv viYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=E8E7X1t0hdS7pyFRpaGvhgJn+A6FiIdwi1QRdaH+0KU=; b=RCGfqSfMJgpHKpIfRXLgY/5FCNxcg3Zn0LQinea4f/j5j1XOatiNyEjt0e4U7DUkXA +ZiM4I1ieGqcs+GiyZQgpxhQ2LHNUsF888wFvbmMqxtG6Vjz1behASojLZKlWcsp/pJT PjbCTKw0OYz2AAPr8XM+hHZ9KTh8vDEbNGp9eGrkgInLRcorl/7lN7J6wB+q5qCeh8pT Llk0J4bngZBIIGLgaQWsdrAB+m6WLCAb/UjImLAqvmU+V9pGTpvgzOIhoCNt90rUUazg gCEJdmctfFDElH4pfnywu8FAz5jQ8hcdjVVMscepNyd9eY6Wqy/909fj/eOKP0Y36cKL h3LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BzIQBnrH; 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 f2si7081562ejc.542.2020.10.31.11.52.17; Sat, 31 Oct 2020 11:52:17 -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=BzIQBnrH; 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 S1728470AbgJaSwP (ORCPT + 6 others); Sat, 31 Oct 2020 14:52:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:35564 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728456AbgJaSwN (ORCPT ); Sat, 31 Oct 2020 14:52:13 -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 B2434205ED; Sat, 31 Oct 2020 18:52:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170331; bh=+pI2CXGiE+I6mLa2YboecZU7GwgiJdcZktZELuuO7IA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BzIQBnrHlsDu9L6+6qARiYOGB+IrePopZmX9O+pJpDoBoUl0v030tLyK/cCCnlOEW o6dHxdpdh50BdADxCWpDs8Xl/CRe149n9pw/lyrG2btWYAkmK6ahLPb5QPBiiFC0xd Vy/0WynSwm0N4CZ522rdz8WJLGMzV9YwWgdH7XmY= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Marek Vasut Subject: [PATCH 30/46] dt-bindings:iio:adc:renesas, rcar-gyroadc: txt to yaml conversion. Date: Sat, 31 Oct 2020 18:48:38 +0000 Message-Id: <20201031184854.745828-31-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron This is a somewhat unusual device, in that it effectively does spi offload. That means that it doesn't act as a full SPI master, but supports some functionality. As such it supports a subset of specific SPI ADCs. There is potential for a future clash in bindings, but as these are simple devices hopefully that will not occur. One addition to this from testing it against existing dts files was to add a resets property. This is specified in arch/arm/boot/dts/r8a7791.dtsi If it's the dtsi that is wrong and not the binding doc, then we can fix that instead. Signed-off-by: Jonathan Cameron Cc: Marek Vasut --- .../bindings/iio/adc/renesas,gyroadc.txt | 98 ------------ .../iio/adc/renesas,rcar-gyroadc.yaml | 141 ++++++++++++++++++ 2 files changed, 141 insertions(+), 98 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/adc/renesas,gyroadc.txt b/Documentation/devicetree/bindings/iio/adc/renesas,gyroadc.txt deleted file mode 100644 index df5b9f2ad8d8..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/renesas,gyroadc.txt +++ /dev/null @@ -1,98 +0,0 @@ -* Renesas R-Car GyroADC device driver - -The GyroADC block is a reduced SPI block with up to 8 chipselect lines, -which supports the SPI protocol of a selected few SPI ADCs. The SPI ADCs -are sampled by the GyroADC block in a round-robin fashion and the result -presented in the GyroADC registers. - -Required properties: -- compatible: Should be "", "renesas,rcar-gyroadc". - The should be one of: - renesas,r8a7791-gyroadc - for the GyroADC block present - in r8a7791 SoC - renesas,r8a7792-gyroadc - for the GyroADC with interrupt - block present in r8a7792 SoC -- reg: Address and length of the register set for the device -- clocks: References to all the clocks specified in the clock-names - property as specified in - Documentation/devicetree/bindings/clock/clock-bindings.txt. -- clock-names: Shall contain "fck". The "fck" is the GyroADC block clock. -- power-domains: Must contain a reference to the PM domain, if available. -- #address-cells: Should be <1> (setting for the subnodes) for all ADCs - except for "fujitsu,mb88101a". Should be <0> (setting for - only subnode) for "fujitsu,mb88101a". -- #size-cells: Should be <0> (setting for the subnodes) - -Sub-nodes: -You must define subnode(s) which select the connected ADC type and reference -voltage for the GyroADC channels. - -Required properties for subnodes: -- compatible: Should be either of: - "fujitsu,mb88101a" - - Fujitsu MB88101A compatible mode, - 12bit sampling, up to 4 channels can be sampled in - round-robin fashion. One Fujitsu chip supplies four - GyroADC channels with data as it contains four ADCs - on the chip and thus for 4-channel operation, single - MB88101A is required. The Cx chipselect lines of the - MB88101A connect directly to two CHS lines of the - GyroADC, no demuxer is required. The data out line - of each MB88101A connects to a shared input pin of - the GyroADC. - "ti,adcs7476" or "ti,adc121" or "adi,ad7476" - - TI ADCS7476 / TI ADC121 / ADI AD7476 compatible mode, - 15bit sampling, up to 8 channels can be sampled in - round-robin fashion. One TI/ADI chip supplies single - ADC channel with data, thus for 8-channel operation, - 8 chips are required. A 3:8 chipselect demuxer is - required to connect the nCS line of the TI/ADI chips - to the GyroADC, while MISO line of each TI/ADI ADC - connects to a shared input pin of the GyroADC. - "maxim,max1162" or "maxim,max11100" - - Maxim MAX1162 / Maxim MAX11100 compatible mode, - 16bit sampling, up to 8 channels can be sampled in - round-robin fashion. One Maxim chip supplies single - ADC channel with data, thus for 8-channel operation, - 8 chips are required. A 3:8 chipselect demuxer is - required to connect the nCS line of the MAX chips - to the GyroADC, while MISO line of each Maxim ADC - connects to a shared input pin of the GyroADC. -- reg: Should be the number of the analog input. Should be present - for all ADCs except "fujitsu,mb88101a". -- vref-supply: Reference to the channel reference voltage regulator. - -Example: - vref_max1162: regulator-vref-max1162 { - compatible = "regulator-fixed"; - - regulator-name = "MAX1162 Vref"; - regulator-min-microvolt = <4096000>; - regulator-max-microvolt = <4096000>; - }; - - adc@e6e54000 { - compatible = "renesas,r8a7791-gyroadc", "renesas,rcar-gyroadc"; - reg = <0 0xe6e54000 0 64>; - clocks = <&mstp9_clks R8A7791_CLK_GYROADC>; - clock-names = "fck"; - power-domains = <&sysc R8A7791_PD_ALWAYS_ON>; - - pinctrl-0 = <&adc_pins>; - pinctrl-names = "default"; - - #address-cells = <1>; - #size-cells = <0>; - - adc@0 { - reg = <0>; - compatible = "maxim,max1162"; - vref-supply = <&vref_max1162>; - }; - - adc@1 { - reg = <1>; - compatible = "maxim,max1162"; - vref-supply = <&vref_max1162>; - }; - }; diff --git a/Documentation/devicetree/bindings/iio/adc/renesas,rcar-gyroadc.yaml b/Documentation/devicetree/bindings/iio/adc/renesas,rcar-gyroadc.yaml new file mode 100644 index 000000000000..aeaa9d372450 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/renesas,rcar-gyroadc.yaml @@ -0,0 +1,141 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/renesas,rcar-gyroadc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas R-Car GyroADC + +maintainers: + - Marek Vasut + +description: | + The GyroADC block is a reduced SPI block with up to 8 chipselect lines, + which supports the SPI protocol of a selected few SPI ADCs. The SPI ADCs + are sampled by the GyroADC block in a round-robin fashion and the result + presented in the GyroADC registers. + The ADC bindings should match with that of the devices connected to a + full featured SPI bus. + +properties: + compatible: + items: + - enum: + - renesas,r8a7791-gyroadc + - renesas,r8a7792-gyroadc + - const: renesas,rcar-gyroadc + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + const: fck + + power-domains: true + + resets: true + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +additionalProperties: false + +required: + - compatible + - reg + - clocks + - clock-names + - "#address-cells" + - "#size-cells" + +patternProperties: + "^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-fA-F]+$": + type: object + properties: + compatible: + description: | + fujitsu,mb88101a + - Fujitsu MB88101A compatible mode, + 12bit sampling, up to 4 channels can be sampled in round-robin + fashion. One Fujitsu chip supplies four GyroADC channels with + data as it contains four ADCs on the chip and thus for 4-channel + operation, single MB88101A is required. The Cx chipselect lines + of the MB88101A connect directly to two CHS lines of the GyroADC, + no demuxer is required. The data out line of each MB88101A + connects to a shared input pin of the GyroADC. + ti,adcs7476 or ti,adc121 or adi,ad7476 + - TI ADCS7476 / TI ADC121 / ADI AD7476 compatible mode, 15bit + sampling, up to 8 channels can be sampled in round-robin + fashion. One TI/ADI chip supplies single ADC channel with data, + thus for 8-channel operation, 8 chips are required. + A 3:8 chipselect demuxer is required to connect the nCS line + of the TI/ADI chips to the GyroADC, while MISO line of each + TI/ADI ADC connects to a shared input pin of the GyroADC. + maxim,max1162 or maxim,max11100 + - Maxim MAX1162 / Maxim MAX11100 compatible mode, 16bit sampling, + up to 8 channels can be sampled in round-robin fashion. One + Maxim chip supplies single ADC channel with data, thus for + 8-channel operation, 8 chips are required. + A 3:8 chipselect demuxer is required to connect the nCS line + of the MAX chips to the GyroADC, while MISO line of each Maxim + ADC connects to a shared input pin of the GyroADC. + enum: + - adi,7476 + - fujitsu,mb88101a + - maxim,max1162 + - maxim,max11100 + - ti,adcs7476 + - ti,adc121 + + reg: true + + vref-supply: true + + additionalProperties: false + + required: + - compatible + - reg + - vref-supply + +examples: + - | + #include + #include + soc { + #address-cells = <2>; + #size-cells = <2>; + + adc@e6e54000 { + compatible = "renesas,r8a7791-gyroadc", "renesas,rcar-gyroadc"; + reg = <0 0xe6e54000 0 64>; + clocks = <&mstp9_clks R8A7791_CLK_GYROADC>; + clock-names = "fck"; + power-domains = <&sysc R8A7791_PD_ALWAYS_ON>; + + pinctrl-0 = <&adc_pins>; + pinctrl-names = "default"; + + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + reg = <0>; + compatible = "maxim,max1162"; + vref-supply = <&vref_max1162>; + }; + + adc@1 { + reg = <1>; + compatible = "maxim,max1162"; + vref-supply = <&vref_max1162>; + }; + }; + }; +... From patchwork Sat Oct 31 18:48:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 314625 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12495C55178 for ; Sat, 31 Oct 2020 18:52:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C596F20729 for ; Sat, 31 Oct 2020 18:52:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170335; bh=8pPbzMTtYqPwgfVAYgw1UGJat1LPuOQLCSUFbh6djDI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=2R5ARXdl5FpCgkO3vLFykYzMloBsulW5HeShApEDaM6/s3GiXR2INlFVc4dgvgiKm 7LtYyPgOD4qEdIoXJ8Pq+GOpJaKeFY+5rUaBmybezje5PfrpRjrzG8UVqaggNP/Ggw 74KMUGe/0Y0Y3aK4vLCAIm7dpcdusigSTvJz5yiU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728464AbgJaSwP (ORCPT ); Sat, 31 Oct 2020 14:52:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:35586 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728457AbgJaSwN (ORCPT ); Sat, 31 Oct 2020 14:52:13 -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 23DCD20702; Sat, 31 Oct 2020 18:52:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170333; bh=8pPbzMTtYqPwgfVAYgw1UGJat1LPuOQLCSUFbh6djDI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zLQid0J6QenuIM15HPvEazlRN6VYWlQlWns5YXe18lcEx19+fbFxHxYxv3i0ZPSqx bucHGkZXkmb7kbHal65h+yhc9wLofbilCPfKhzDuI9zTyoe6J5WoSC6uh1vA7T/bvA xqIxZiBerAdByFF9v4nEqdstmLL1g++P5Qb5uf00= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Quentin Schulz Subject: [PATCH 31/46] dt-bindings:iio:adc:x-powers, axp209-adc: txt to yaml conversion Date: Sat, 31 Oct 2020 18:48:39 +0000 Message-Id: <20201031184854.745828-32-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron This is a very small binding. It might make sense at some stage to just roll it into the parent mfd. For now, converted as is. The main advantage of this document is the identification of the channel index values when this is used as a provider of ADC channels to consumers. Signed-off-by: Jonathan Cameron Cc: Quentin Schulz --- .../bindings/iio/adc/axp20x_adc.txt | 48 ------------- .../bindings/iio/adc/x-powers,axp209-adc.yaml | 67 +++++++++++++++++++ 2 files changed, 67 insertions(+), 48 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/adc/axp20x_adc.txt b/Documentation/devicetree/bindings/iio/adc/axp20x_adc.txt deleted file mode 100644 index 7a6313913923..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/axp20x_adc.txt +++ /dev/null @@ -1,48 +0,0 @@ -* X-Powers AXP ADC bindings - -Required properties: - - compatible: should be one of: - - "x-powers,axp209-adc", - - "x-powers,axp221-adc", - - "x-powers,axp813-adc", - - #io-channel-cells: should be 1, - -Example: - -&axp22x { - adc { - compatible = "x-powers,axp221-adc"; - #io-channel-cells = <1>; - }; -}; - -ADC channels and their indexes per variant: - -AXP209 ------- - 0 | acin_v - 1 | acin_i - 2 | vbus_v - 3 | vbus_i - 4 | pmic_temp - 5 | gpio0_v - 6 | gpio1_v - 7 | ipsout_v - 8 | batt_v - 9 | batt_chrg_i -10 | batt_dischrg_i - -AXP22x ------- - 0 | pmic_temp - 1 | batt_v - 2 | batt_chrg_i - 3 | batt_dischrg_i - -AXP813 ------- - 0 | pmic_temp - 1 | gpio0_v - 2 | batt_v - 3 | batt_chrg_i - 4 | batt_dischrg_i diff --git a/Documentation/devicetree/bindings/iio/adc/x-powers,axp209-adc.yaml b/Documentation/devicetree/bindings/iio/adc/x-powers,axp209-adc.yaml new file mode 100644 index 000000000000..288a5ac31a16 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/x-powers,axp209-adc.yaml @@ -0,0 +1,67 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/x-powers,axp209-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: X-Powers AXP ADC bindings + +maintainers: + - Quentin Schulz + +description: | + ADC is frequently used as a provider to consumers of the ADC channels. + Device is a child of an axp209 multifunction device + ADC channels and their indexes per variant: + + AXP209 + ------ + 0 | acin_v + 1 | acin_i + 2 | vbus_v + 3 | vbus_i + 4 | pmic_temp + 5 | gpio0_v + 6 | gpio1_v + 7 | ipsout_v + 8 | batt_v + 9 | batt_chrg_i + 10 | batt_dischrg_i + + AXP22x + ------ + 0 | pmic_temp + 1 | batt_v + 2 | batt_chrg_i + 3 | batt_dischrg_i + + AXP813 + ------ + 0 | pmic_temp + 1 | gpio0_v + 2 | batt_v + 3 | batt_chrg_i + 4 | batt_dischrg_i + + +properties: + compatible: + enum: + - x-powers,axp209-adc + - x-powers,axp221-adc + - x-powers,axp813-adc + + "#io-channel-cells": + const: 1 + +additionalProperties: false + +examples: + - | + axp221 { + adc { + compatible = "x-powers,axp221-adc"; + #io-channel-cells = <1>; + }; + }; +... From patchwork Sat Oct 31 18:48:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 314624 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71D2AC61DD8 for ; Sat, 31 Oct 2020 18:52:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3104D20729 for ; Sat, 31 Oct 2020 18:52:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170339; bh=rOdJDd+LJuwod0XrZrCl2cCPfz8HWsCPRSOYhfgmjyE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=pZb8xXJHFrRq/+MK/s3ldFWA3BVBkcplsKwUxQB674l3OvATKk2pArUX9wnfVwaMY wP1s2o5jIoq4MmFsLxxZ6SDnT6d88XIE3yN/bzPkdnfnQVH8y1wRNwfnMuhraeW56I bLTj7xynRQLDMCQvpUH7CtFZRu6rzLpzaTCjH5g4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728472AbgJaSwR (ORCPT ); Sat, 31 Oct 2020 14:52:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:35616 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728459AbgJaSwP (ORCPT ); Sat, 31 Oct 2020 14:52:15 -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 865B82071A; Sat, 31 Oct 2020 18:52:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170334; bh=rOdJDd+LJuwod0XrZrCl2cCPfz8HWsCPRSOYhfgmjyE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RldDUS9kMTVbc0c8tyg9XvP0uDO6OwnSja+ddr3j5oO/Iou5DyRXr5gsmZgDe/U+B oiDpQEq2Xvy394AwQsuISMXlAgdLsq0IUGVCe1JD8Z43/1qBE6w7HaFBUaiXhXTmPR xmBsFEYtv6wbybM08wxUP7URwgWiJXRUZH2N/Kxw= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Raveendra Padasalagi Subject: [PATCH 32/46] dt-bindings:iio:adc:brcm, iproc-static-adc: txt to yaml conversion Date: Sat, 31 Oct 2020 18:48:40 +0000 Message-Id: <20201031184854.745828-33-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron A few questions came up in this one. 1) Why does the txt file document io-channel-ranges as a required property. That property is for iio-channel consumers, and this is a provider. I have dropped it. 2) The example had an @180a6000 for the ADC but given it uses syscon for all access, it doesn't have its own reg etc. I've dropped that from the binding example. Note this example was lifted directly from bcm-cygnus.dtsi so both issues are present there as well. Signed-off-by: Jonathan Cameron Cc: Raveendra Padasalagi --- .../iio/adc/brcm,iproc-static-adc.txt | 40 ----------- .../iio/adc/brcm,iproc-static-adc.yaml | 70 +++++++++++++++++++ 2 files changed, 70 insertions(+), 40 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/adc/brcm,iproc-static-adc.txt b/Documentation/devicetree/bindings/iio/adc/brcm,iproc-static-adc.txt deleted file mode 100644 index 7b1b1e4086d4..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/brcm,iproc-static-adc.txt +++ /dev/null @@ -1,40 +0,0 @@ -* Broadcom's IPROC Static ADC controller - -Broadcom iProc ADC controller has 8 channels 10bit ADC. -Allows user to convert analog input voltage values to digital. - -Required properties: - -- compatible: Must be "brcm,iproc-static-adc" - -- adc-syscon: Handler of syscon node defining physical base address of the - controller and length of memory mapped region. - -- #io-channel-cells = <1>; As ADC has multiple outputs - refer to Documentation/devicetree/bindings/iio/iio-bindings.txt for details. - -- io-channel-ranges: - refer to Documentation/devicetree/bindings/iio/iio-bindings.txt for details. - -- clocks: Clock used for this block. - -- clock-names: Clock name should be given as tsc_clk. - -- interrupts: interrupt line number. - -For example: - - ts_adc_syscon: ts_adc_syscon@180a6000 { - compatible = "brcm,iproc-ts-adc-syscon","syscon"; - reg = <0x180a6000 0xc30>; - }; - - adc: adc@180a6000 { - compatible = "brcm,iproc-static-adc"; - adc-syscon = <&ts_adc_syscon>; - #io-channel-cells = <1>; - io-channel-ranges; - clocks = <&asiu_clks BCM_CYGNUS_ASIU_ADC_CLK>; - clock-names = "tsc_clk"; - interrupts = ; - }; diff --git a/Documentation/devicetree/bindings/iio/adc/brcm,iproc-static-adc.yaml b/Documentation/devicetree/bindings/iio/adc/brcm,iproc-static-adc.yaml new file mode 100644 index 000000000000..c562d25bee3b --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/brcm,iproc-static-adc.yaml @@ -0,0 +1,70 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/brcm,iproc-static-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom's IPROC Static ADC controller + +maintainers: + - Raveendra Padasalagi + +description: | + Broadcom iProc ADC controller has 8 10bit channels + +properties: + compatible: + const: brcm,iproc-static-adc + + adc-syscon: + $ref: /schemas/types.yaml#/definitions/phandle + description: + syscon node defining physical base address of the controller and length + of memory mapped region. + + "#io-channel-cells": + const: 1 + + clocks: + maxItems: 1 + + clock-names: + const: tsc_clk + + interrupts: + maxItems: 1 + +additionalProperties: false + +required: + - compatible + - adc-syscon + - "#io-channel-cells" + - clocks + - clock-names + - interrupts + +examples: + - | + #include + #include + #include + soc { + #address-cells = <1>; + #size-cells = <1>; + + ts_adc_syscon: ts_adc_syscon@180a6000 { + compatible = "brcm,iproc-ts-adc-syscon","syscon"; + reg = <0x180a6000 0xc30>; + }; + + adc { + compatible = "brcm,iproc-static-adc"; + adc-syscon = <&ts_adc_syscon>; + #io-channel-cells = <1>; + clocks = <&asiu_clks BCM_CYGNUS_ASIU_ADC_CLK>; + clock-names = "tsc_clk"; + interrupts = ; + }; + }; +... From patchwork Sat Oct 31 18:48:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320153 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451765ilc; Sat, 31 Oct 2020 11:52:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8gxmsAmWufhTywTBqEVzpQxmFrFP7t4qSI/+XrFmS3GufXBxt6NKXCOJq+012OX/jHf4g X-Received: by 2002:a17:906:a018:: with SMTP id p24mr5308527ejy.462.1604170340699; Sat, 31 Oct 2020 11:52:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170340; cv=none; d=google.com; s=arc-20160816; b=XXA7QlcFMz5aYM4rYIDxJLN/dQapsfJHRMS4j6Ct15pS2nfTCigv9/c4TOdyaY8GED E3uhFYgaakDWsk2JDpvYnn0SYTum9C/3o01fKS0YVZed8S1y+59y3sSOE1gecpXKFKm1 7TaddUbzFfkud8NX7HwP7kNNP08F8WTA7sdUpPlUdI7IRm0YDTU8Vp4iRXICV4oUKbmP u6K4rPU7aLrmqWC61KLjpecOp6Oqooi4jHn0CeJTHy+QHM6SHyH/+Ow7CBzzU3mA2h8k d8n0aIAgZtOh3TQDeydy6iCL3OEhkbO5dqs5NV/EsFq4ipBG2SQiQLRVfcbQtz50tbGR ohLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vewE/82lx8csjqjHDlZZqgqxEDPLmt0eCFDp97OkaTA=; b=dLJWwYAnbVj4P5wkam7vjwvYuhGVRaObfrr6YTAEmZ80uY2rprBsKv8ZSK3GXA/iL6 ew7F30Ix4bIT6VIW2uEmD+D8HjmGfzULYas0Mu9eD4YW5RhVdrdk45wpaBUKLLkeL7DA tTfY5P29wkOeSUVGrisXeOAdzH4P52rSxX/fAmIptDSAArGgvKHUNwTug5xfz/Q94iPv UafL8RLDF57yv1ZRcYUsIo7WX3l8/bDcdMQJlZz8wH0NsdppMlDjko7i0WKCIB5855fr 9Ikd6JeP+LlyZROoMbHabuAGQnyYxJNjdRoq78Yo/Akj2aJRNuChGC8zEUiYxMxTt11A Ihag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pD2edyou; 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 lf20si7059512ejb.332.2020.10.31.11.52.20; Sat, 31 Oct 2020 11:52:20 -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=pD2edyou; 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 S1728459AbgJaSwR (ORCPT + 6 others); Sat, 31 Oct 2020 14:52:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:35668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728458AbgJaSwR (ORCPT ); Sat, 31 Oct 2020 14:52:17 -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 EB8AC20720; Sat, 31 Oct 2020 18:52:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170336; bh=iFGwE/9PSfd7hpDY+R4VCPz8RfOLa8Ub95oGrw/tXgA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pD2edyoutsZ01IHWc6s/zNkLbvDIBzOjfQFXsJjUkeXTrfMwd3nts/p9pUyUEc7TK +M6CaqLSVHSrINIXsnfiZHWHTGu500peFXSUvYNaeKk5ZB12CywpZiPxIIGiQFc3xm NjN6dZ+M4tiefMg/YxgnhTa0yz+oL6AtnH+F3Ub8= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Zhiyong Tao , Matthias Brugger Subject: [PATCH 33/46] dt-bindings:iio:adc:mediatek, mt2701-auxadc: rename and yaml conversion. Date: Sat, 31 Oct 2020 18:48:41 +0000 Message-Id: <20201031184854.745828-34-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron The current driver and indeed binding are named after a part that they do not list in the compatible. Hence renamed the binding to reflect one that does. >From the driver it looks like there is a lot more backwards compatibility than the binding currently reflects. We could consider expressing that more explicitly in the yaml for the compatible property. I have added one explicit pair that was present in the upstream dtsi files. I added Matthias alongside Zhiyong Tao because I don't think Zhiyong Tao has reviewed recent patches. Please let me know if this isn't the right thing to do. Signed-off-by: Jonathan Cameron Cc: Zhiyong Tao Cc: Matthias Brugger --- .../iio/adc/mediatek,mt2701-auxadc.yaml | 77 +++++++++++++++++++ .../bindings/iio/adc/mt6577_auxadc.txt | 34 -------- 2 files changed, 77 insertions(+), 34 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml b/Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml new file mode 100644 index 000000000000..5b21a9fba5dd --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/mediatek,mt2701-auxadc.yaml @@ -0,0 +1,77 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/mediatek,mt2701-auxadc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek AUXADC - ADC on Mediatek mobile SoC (mt65xx/mt81xx/mt27xx) + +maintainers: + - Zhiyong Tao + - Matthias Brugger + +description: | + The Auxiliary Analog/Digital Converter (AUXADC) is an ADC found + in some Mediatek SoCs which among other things measures the temperatures + in the SoC. It can be used directly with register accesses, but it is also + used by thermal controller which reads the temperatures from the AUXADC + directly via its own bus interface. See mediatek-thermal bindings + for the Thermal Controller which holds a phandle to the AUXADC. + +properties: + compatible: + oneOf: + - enum: + - mediatek,mt2701-auxadc + - mediatek,mt2712-auxadc + - mediatek,mt6765-auxadc + - mediatek,mt7622-auxadc + - mediatek,mt8173-auxadc + - items: + - enum: + - mediatek,mt7623-auxadc + - const: mediatek,mt2701-auxadc + - items: + - enum: + - mediatek,mt8183-auxadc + - mediatek,mt8516-auxadc + - const: mediatek,mt8173-auxadc + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + const: main + + "#io-channel-cells": + const: 1 + +additionalProperties: false + +required: + - compatible + - reg + - clocks + - clock-names + - "#io-channel-cells" + +examples: + - | + #include + soc { + #address-cells = <2>; + #size-cells = <2>; + + adc@11001000 { + compatible = "mediatek,mt8183-auxadc", + "mediatek,mt8173-auxadc"; + reg = <0 0x11001000 0 0x1000>; + clocks = <&infracfg CLK_INFRA_AUXADC>; + clock-names = "main"; + #io-channel-cells = <1>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/adc/mt6577_auxadc.txt b/Documentation/devicetree/bindings/iio/adc/mt6577_auxadc.txt deleted file mode 100644 index 1b7ff9e5615a..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/mt6577_auxadc.txt +++ /dev/null @@ -1,34 +0,0 @@ -* Mediatek AUXADC - Analog to Digital Converter on Mediatek mobile soc (mt65xx/mt81xx/mt27xx) -=============== - -The Auxiliary Analog/Digital Converter (AUXADC) is an ADC found -in some Mediatek SoCs which among other things measures the temperatures -in the SoC. It can be used directly with register accesses, but it is also -used by thermal controller which reads the temperatures from the AUXADC -directly via its own bus interface. See -Documentation/devicetree/bindings/thermal/mediatek-thermal.txt -for the Thermal Controller which holds a phandle to the AUXADC. - -Required properties: - - compatible: Should be one of: - - "mediatek,mt2701-auxadc": For MT2701 family of SoCs - - "mediatek,mt2712-auxadc": For MT2712 family of SoCs - - "mediatek,mt6765-auxadc": For MT6765 family of SoCs - - "mediatek,mt7622-auxadc": For MT7622 family of SoCs - - "mediatek,mt8173-auxadc": For MT8173 family of SoCs - - "mediatek,mt8183-auxadc", "mediatek,mt8173-auxadc": For MT8183 family of SoCs - - "mediatek,mt8516-auxadc", "mediatek,mt8173-auxadc": For MT8516 family of SoCs - - reg: Address range of the AUXADC unit. - - clocks: Should contain a clock specifier for each entry in clock-names - - clock-names: Should contain "main". - - #io-channel-cells: Should be 1, see ../iio-bindings.txt - -Example: - -auxadc: adc@11001000 { - compatible = "mediatek,mt2701-auxadc"; - reg = <0 0x11001000 0 0x1000>; - clocks = <&pericfg CLK_PERI_AUXADC>; - clock-names = "main"; - #io-channel-cells = <1>; -}; From patchwork Sat Oct 31 18:48:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320155 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451775ilc; Sat, 31 Oct 2020 11:52:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnP8sdAevBZcOrKIdAOqgN5kg86ErPkzmpDdkGJaXj6oUFfvvA0rLU9NjQ0f/w219/Tei7 X-Received: by 2002:a17:906:3daa:: with SMTP id y10mr8178987ejh.23.1604170341997; Sat, 31 Oct 2020 11:52:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170341; cv=none; d=google.com; s=arc-20160816; b=Rs5KinE+INuGCG0Cq+m0CDhO0e14yCT0Z9nN406eMsmeh+5yOOmTCVh9xsKRD8r1SQ z1Y2m+Eu9YcoQBDABQZFiFQgO+ll0IJBAPbHkR18X71LejJB/rQGgGVnn6YEOFYF0Mhx ZZy9GxqSl5rCZanQmH2/Tm7ADx9QEm4flL+cmAY01vYWrBymz2GRcrdW1vVOkoaf+E7l wMJxfSfBAV1n2P+DnJBB2onE/ng0W7KyPg6saYv/lMIv7qq5/hNb0G42nNz3keyjewm7 FMFuqnBuxNSWl4/SdrcP4KIVhCwCmXiQRmz7qkTjj/rkmjLLW290QkhqWAahyNRj/r1E Tmww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OV+6qN/+vt4yEyL0OnB1WbeyM+c2fu8tUOAQ79Ht31g=; b=auHEgHs1xmr7Yml1ynz6ywvfNWkd4mkW9K6ye2cJGlOSFYteZLH3IUgUjsWbHSVqNb UieC0JWZf5zmYS6Mtm3JXqcSENiTmsY364ZXC555vANFx22SlWMjwymQT3jtL5Ww97Q5 LrL0Rz0PGgEqkPKuTIAY/y05iDd6poqC75lOCL3mKAUhdcUtIOvZ/LfeI0e27e4/F91Q ihp0FOVBwuK7yX0Tj4c0G+Zbp9I7RsSkaQMUlZ77IM+Bpis6YUzXkiDs8bzrNPlVzDV0 Y4wKtTJggaKpLV/GM3OuiQb1c1iHfyFceZLA5uaC9lAZUwGnEYscU8HL7Nb6vU2D31jp bOAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zkbopPTB; 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 lf20si7059512ejb.332.2020.10.31.11.52.21; Sat, 31 Oct 2020 11:52:21 -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=zkbopPTB; 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 S1728476AbgJaSwT (ORCPT + 6 others); Sat, 31 Oct 2020 14:52:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:35724 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728475AbgJaSwS (ORCPT ); Sat, 31 Oct 2020 14:52:18 -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 7EBD7205ED; Sat, 31 Oct 2020 18:52:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170337; bh=VQJKRRT65H62Y++NqT8W0EZxvj3p7YWlonqQD0nA/9g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zkbopPTB0lLMwVaFvL5s1bpA+FLiALky6tjGbRaap2pDe1WXxg+zCzRS+tc7OFnMa qp4bxVKuLsY2fgIq+eWUs0X2eTVjrb15KAkt0b6daD9eBN6XtRXT8lCI+mfNqayIgU psRR4ZfOw6TzK5udnxNbH/qHQM68rnyosNPS8Was= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Tony Lindgren Subject: [PATCH 34/46] dt-bindings:iio:adc:ti, palmas-gpadc: txt to yaml format conversion. Date: Sat, 31 Oct 2020 18:48:42 +0000 Message-Id: <20201031184854.745828-35-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Simple conversion of the binding doc for this subnode of the palmas PMIC. Given age of driver and lack interaction with original authors, I've guessed at Tony for a maintainer on this one. Tony, if you are happy with that great, otherwise I can default back to myself. Signed-off-by: Jonathan Cameron Cc: Tony Lindgren --- .../bindings/iio/adc/palmas-gpadc.txt | 48 ---------- .../bindings/iio/adc/ti,palmas-gpadc.yaml | 87 +++++++++++++++++++ 2 files changed, 87 insertions(+), 48 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/adc/palmas-gpadc.txt b/Documentation/devicetree/bindings/iio/adc/palmas-gpadc.txt deleted file mode 100644 index 4bb9a86065d1..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/palmas-gpadc.txt +++ /dev/null @@ -1,48 +0,0 @@ -* Palmas general purpose ADC IP block devicetree bindings - -Channels list: - 0 battery type - 1 battery temp NTC (optional current source) - 2 GP - 3 temp (with ext. diode, optional current source) - 4 GP - 5 GP - 6 VBAT_SENSE - 7 VCC_SENSE - 8 Backup Battery voltage - 9 external charger (VCHG) - 10 VBUS - 11 DC-DC current probe (how does this work?) - 12 internal die temp - 13 internal die temp - 14 USB ID pin voltage - 15 test network - -Required properties: -- compatible : Must be "ti,palmas-gpadc". -- #io-channel-cells: Should be set to <1>. - -Optional sub-nodes: -ti,channel0-current-microamp: Channel 0 current in uA. - Values are rounded to derive 0uA, 5uA, 15uA, 20uA. -ti,channel3-current-microamp: Channel 3 current in uA. - Values are rounded to derive 0uA, 10uA, 400uA, 800uA. -ti,enable-extended-delay: Enable extended delay. - -Example: - -pmic { - compatible = "ti,twl6035-pmic", "ti,palmas-pmic"; - ... - gpadc { - compatible = "ti,palmas-gpadc"; - interrupts = <18 0 - 16 0 - 17 0>; - #io-channel-cells = <1>; - ti,channel0-current-microamp = <5>; - ti,channel3-current-microamp = <10>; - }; - }; - ... -}; diff --git a/Documentation/devicetree/bindings/iio/adc/ti,palmas-gpadc.yaml b/Documentation/devicetree/bindings/iio/adc/ti,palmas-gpadc.yaml new file mode 100644 index 000000000000..692dacd0fee5 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/ti,palmas-gpadc.yaml @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,palmas-gpadc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Palmas general purpose ADC IP block devicetree bindings + +maintainers: + - Tony Lindgren + +description: | + This ADC is often used to provide channels via the io-channels + consumer framework. + Channels list: + 0 battery type + 1 battery temp NTC (optional current source) + 2 GP + 3 temp (with ext. diode, optional current source) + 4 GP + 5 GP + 6 VBAT_SENSE + 7 VCC_SENSE + 8 Backup Battery voltage + 9 external charger (VCHG) + 10 VBUS + 11 DC-DC current probe (how does this work?) + 12 internal die temp + 13 internal die temp + 14 USB ID pin voltage + 15 test network + +properties: + compatible: + const: ti,palmas-gpadc + + interrupts: + minItems: 1 + maxItems: 3 + + "#io-channel-cells": + const: 1 + + ti,channel0-current-microamp: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Channel 0 current in uA. + enum: + - 0 + - 5 + - 15 + - 20 + + ti,channel3-current-microamp: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Channel 3 current in uA. + enum: + - 0 + - 10 + - 400 + - 800 + + ti,enable-extended-delay: + $ref: /schemas/types.yaml#/definitions/flag + description: Enable extended delay. + +additionalProperties: false + +required: + - compatible + - "#io-channel-cells" + +examples: + - | + #include + pmic { + compatible = "ti,twl6035-pmic", "ti,palmas-pmic"; + adc { + compatible = "ti,palmas-gpadc"; + interrupts = <18 0 + 16 0 + 17 0>; + #io-channel-cells = <1>; + ti,channel0-current-microamp = <5>; + ti,channel3-current-microamp = <10>; + }; + }; +... From patchwork Sat Oct 31 18:48:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320158 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451809ilc; Sat, 31 Oct 2020 11:52:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEDpxH6xDhZyjeWzwp79bzG5TUkANDTOBrGuVFf0iSxi6FL6/3NF3xIrM14T4pI9cDfB3B X-Received: by 2002:a17:906:3997:: with SMTP id h23mr8025164eje.191.1604170346750; Sat, 31 Oct 2020 11:52:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170346; cv=none; d=google.com; s=arc-20160816; b=mI6NDifPv8B5o3I+ed8xSopsn0cb9Ku6j87ccB/wYQ1CBEhMXiGR83ZGZVU+VKJV6U 4+eAkIHbxZYhJhPpJIwCKihEBhB6Fn7NNSGopN9o7O3WkSzyq71J8RusnriFxqnndTei 33AOVigI7MA6tX+ybbyKIEjMMeV1XG9AQ+5tf3kDwLcb6qBqaxNMQjxA4YegIunfVV6F dISIc644N8Lj7fJv4wN/J2ISP5WgdKI1yKkClx2ufebOIyOrN6n9qJ09Nlq9GzjOdd3d EcLsQSBSFpGzyiJn4q6IwUWtgNYM8nzt0AOSevAQ6Z4pbtfrk4iVmTB6Ogklv4OKE026 rrpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Cdz63892loVu+G5tjEczFPfczqkzb3G76QJlsFNbEoE=; b=qM/TzvDAYQDPMBXCfGL79RA7zw3sZhUkWu656PtIipSUJdhC3h7j7x7UYJustq+qq3 GiHgSfEjv0xnH3hdwHX8ZFvDa6s65Z2lJbzBelzsZwAIecCkT6yylJMqEMtEq/uN+lOs 6RHpx6G51xVlDTfK9pc/w+tttYBkkr2Wuy/6wgfBS7RDHWjMa7cAs4g2t7EXpbn3Aa8a VcXghtUMgosCVo9tMI6RPECloW86xwDOSRvMXTUa0h3ng41PDHxu8+ghX8hl3uwXBHyR UbHs8+ivf0FmK+Vwfd3END3vCKB1T4kwx3qi/EFpVnQ/O2MOFemxGjOHcsTVfdfBnQve cwMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=x0CznKxk; 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 a6si6987899ejp.422.2020.10.31.11.52.26; Sat, 31 Oct 2020 11:52:26 -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=x0CznKxk; 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 S1728482AbgJaSwV (ORCPT + 6 others); Sat, 31 Oct 2020 14:52:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:35768 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728458AbgJaSwU (ORCPT ); Sat, 31 Oct 2020 14:52:20 -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 EA6C420724; Sat, 31 Oct 2020 18:52:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170339; bh=IRPUBaVia/ExN9xck1J1VThVGmNv3x7KfgS5uFnE/dE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=x0CznKxkkNv0wqnjgEQp6pP/cDxDRsGL6NzEIzRmmt0cQLID0mVeuYC6C3A2RmWoV RgFu4iugOjAvPa7X6wkFVkcRDWrzkd8GkM8Lp8HG/H3kVxG8xI0yVKq/WB/B+N0X1N HOOPu9irgq8KwZN3a/QrzyBhMETwMQX4Emn2P0DY= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Linus Walleij Subject: [PATCH 35/46] dt-bindings:iio:adc:qcom, pm8018-adc: yaml conversion and rename. Date: Sat, 31 Oct 2020 18:48:43 +0000 Message-Id: <20201031184854.745828-36-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Renamed to match a listed compatible rather than relying on wildcards with all their usual problems. Dropped the reference supply as a requirement as at least one dtsi doesn't include it and the example never did. Signed-off-by: Jonathan Cameron Cc: Linus Walleij --- .../bindings/iio/adc/qcom,pm8018-adc.yaml | 166 ++++++++++++++++++ .../bindings/iio/adc/qcom,pm8xxx-xoadc.txt | 157 ----------------- 2 files changed, 166 insertions(+), 157 deletions(-) -- 2.28.0 Reviewed-by: Linus Walleij diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,pm8018-adc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,pm8018-adc.yaml new file mode 100644 index 000000000000..d186b713d6a7 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/qcom,pm8018-adc.yaml @@ -0,0 +1,166 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/qcom,pm8018-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm's PM8xxx voltage XOADC + +maintainers: + - Linus Walleij + +description: | + The Qualcomm PM8xxx PMICs contain a HK/XO ADC (Housekeeping/Crystal + oscillator ADC) encompassing PM8018, PM8038, PM8058 and PM8921. + +properties: + compatible: + enum: + - qcom,pm8018-adc + - qcom,pm8038-adc + - qcom,pm8058-adc + - qcom,pm8921-adc + + reg: + maxItems: 1 + description: + ADC base address in the PMIC, typically 0x197. + + xoadc-ref-supply: + description: + The reference voltage may vary with PMIC variant but is typically + something like 2.2 or 1.8V. + + interrupts: + maxItems: 1 + + "#address-cells": + const: 2 + description: + The first cell is the prescaler (on PM8058) or premux (on PM8921) + with two valid bits so legal values are 0x00, 0x01 or 0x02. + The second cell is the main analog mux setting (0x00..0x0f). + The combination of prescaler/premux and analog mux uniquely addresses + a hardware channel on all systems. + + "#size-cells": + const: 0 + + "#io-channel-cells": + const: 2 + description: + The cells are precaler or premux followed by the analog muxing line. + +additionalProperties: false + +required: + - compatible + - reg + - "#io-channel-cells" + - "#address-cells" + - "#size-cells" + - adc-channel@c + - adc-channel@d + - adc-channel@f + +patternProperties: + "^(adc-channel@)[0-9a-f]$": + type: object + description: | + ADC channel specific configuration. + Note that channels c, d and f must be present for calibration. + These three nodes are used for absolute and ratiometric calibration + and only need to have these reg values: they are by hardware definition + 1:1 ratio converters that sample 625, 1250 and 0 milliV and create + an interpolation calibration for all other ADCs. + + properties: + reg: + maxItems: 1 + + qcom,decimation: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + This parameter is used to decrease the ADC sampling rate. + Quicker measurements can be made by reducing the decimation ratio. + Valid values are 512, 1024, 2048, 4096. + If the property is not found, a default value of 512 will be used. + + qcom,ratiometric: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Channel calibration type. If this property is specified + VADC will use a special voltage references for channel + calibration. The available references are specified in the + as a u32 value setting (see below) and it is compulsory + to also specify this reference if ratiometric calibration + is selected. + + If the property is not found, the channel will be + calibrated with the 0.625V and 1.25V reference channels, also + known as an absolute calibration. + + The reference voltage pairs when using ratiometric calibration: + 0 = XO_IN/XOADC_GND + 1 = PMIC_IN/XOADC_GND + 2 = PMIC_IN/BMS_CSP + 3 (invalid) + 4 = XOADC_GND/XOADC_GND + 5 = XOADC_VREF/XOADC_GND + + additionalProperties: false + + required: + - reg + +examples: + - | + #include + pmic { + #address-cells = <1>; + #size-cells = <0>; + + adc@197 { + compatible = "qcom,pm8058-adc"; + reg = <0x197>; + interrupts-extended = <&pm8058 76 IRQ_TYPE_EDGE_RISING>; + #address-cells = <2>; + #size-cells = <0>; + #io-channel-cells = <2>; + + vcoin: adc-channel@0 { + reg = <0x00 0x00>; + }; + vbat: adc-channel@1 { + reg = <0x00 0x01>; + }; + dcin: adc-channel@2 { + reg = <0x00 0x02>; + }; + ichg: adc-channel@3 { + reg = <0x00 0x03>; + }; + vph_pwr: adc-channel@4 { + reg = <0x00 0x04>; + }; + usb_vbus: adc-channel@a { + reg = <0x00 0x0a>; + }; + die_temp: adc-channel@b { + reg = <0x00 0x0b>; + }; + ref_625mv: adc-channel@c { + reg = <0x00 0x0c>; + }; + ref_1250mv: adc-channel@d { + reg = <0x00 0x0d>; + }; + ref_325mv: adc-channel@e { + reg = <0x00 0x0e>; + }; + ref_muxoff: adc-channel@f { + reg = <0x00 0x0f>; + }; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,pm8xxx-xoadc.txt b/Documentation/devicetree/bindings/iio/adc/qcom,pm8xxx-xoadc.txt deleted file mode 100644 index 3ae06127789e..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/qcom,pm8xxx-xoadc.txt +++ /dev/null @@ -1,157 +0,0 @@ -Qualcomm's PM8xxx voltage XOADC - -The Qualcomm PM8xxx PMICs contain a HK/XO ADC (Housekeeping/Crystal -oscillator ADC) encompassing PM8018, PM8038, PM8058 and PM8921. - -Required properties: - -- compatible: should be one of: - "qcom,pm8018-adc" - "qcom,pm8038-adc" - "qcom,pm8058-adc" - "qcom,pm8921-adc" - -- reg: should contain the ADC base address in the PMIC, typically - 0x197. - -- xoadc-ref-supply: should reference a regulator that can supply - a reference voltage on demand. The reference voltage may vary - with PMIC variant but is typically something like 2.2 or 1.8V. - -The following required properties are standard for IO channels, see -iio-bindings.txt for more details, but notice that this particular -ADC has a special addressing scheme that require two cells for -identifying each ADC channel: - -- #address-cells: should be set to <2>, the first cell is the - prescaler (on PM8058) or premux (on PM8921) with two valid bits - so legal values are 0x00, 0x01 or 0x02. The second cell - is the main analog mux setting (0x00..0x0f). The combination - of prescaler/premux and analog mux uniquely addresses a hardware - channel on all systems. - -- #size-cells: should be set to <0> - -- #io-channel-cells: should be set to <2>, again the cells are - precaler or premux followed by the analog muxing line. - -- interrupts: should refer to the parent PMIC interrupt controller - and reference the proper ADC interrupt. - -Required subnodes: - -The ADC channels are configured as subnodes of the ADC. - -Since some of them are used for calibrating the ADC, these nodes are -compulsory: - -adc-channel@c { - reg = <0x00 0x0c>; -}; - -adc-channel@d { - reg = <0x00 0x0d>; -}; - -adc-channel@f { - reg = <0x00 0x0f>; -}; - -These three nodes are used for absolute and ratiometric calibration -and only need to have these reg values: they are by hardware definition -1:1 ratio converters that sample 625, 1250 and 0 milliV and create -an interpolation calibration for all other ADCs. - -Optional subnodes: any channels other than channels [0x00 0x0c], -[0x00 0x0d] and [0x00 0x0f] are optional. - -Required channel node properties: - -- reg: should contain the hardware channel number in the range - 0 .. 0xff (8 bits). - -Optional channel node properties: - -- qcom,decimation: - Value type: - Definition: This parameter is used to decrease the ADC sampling rate. - Quicker measurements can be made by reducing the decimation ratio. - Valid values are 512, 1024, 2048, 4096. - If the property is not found, a default value of 512 will be used. - -- qcom,ratiometric: - Value type: - Definition: Channel calibration type. If this property is specified - VADC will use a special voltage references for channel - calibration. The available references are specified in the - as a u32 value setting (see below) and it is compulsory - to also specify this reference if ratiometric calibration - is selected. - - If the property is not found, the channel will be - calibrated with the 0.625V and 1.25V reference channels, also - known as an absolute calibration. - The reference voltage pairs when using ratiometric calibration: - 0 = XO_IN/XOADC_GND - 1 = PMIC_IN/XOADC_GND - 2 = PMIC_IN/BMS_CSP - 3 (invalid) - 4 = XOADC_GND/XOADC_GND - 5 = XOADC_VREF/XOADC_GND - -Example: - -xoadc: xoadc@197 { - compatible = "qcom,pm8058-adc"; - reg = <0x197>; - interrupts-extended = <&pm8058 76 IRQ_TYPE_EDGE_RISING>; - #address-cells = <2>; - #size-cells = <0>; - #io-channel-cells = <2>; - - vcoin: adc-channel@0 { - reg = <0x00 0x00>; - }; - vbat: adc-channel@1 { - reg = <0x00 0x01>; - }; - dcin: adc-channel@2 { - reg = <0x00 0x02>; - }; - ichg: adc-channel@3 { - reg = <0x00 0x03>; - }; - vph_pwr: adc-channel@4 { - reg = <0x00 0x04>; - }; - usb_vbus: adc-channel@a { - reg = <0x00 0x0a>; - }; - die_temp: adc-channel@b { - reg = <0x00 0x0b>; - }; - ref_625mv: adc-channel@c { - reg = <0x00 0x0c>; - }; - ref_1250mv: adc-channel@d { - reg = <0x00 0x0d>; - }; - ref_325mv: adc-channel@e { - reg = <0x00 0x0e>; - }; - ref_muxoff: adc-channel@f { - reg = <0x00 0x0f>; - }; -}; - -/* IIO client node */ -iio-hwmon { - compatible = "iio-hwmon"; - io-channels = <&xoadc 0x00 0x01>, /* Battery */ - <&xoadc 0x00 0x02>, /* DC in (charger) */ - <&xoadc 0x00 0x04>, /* VPH the main system voltage */ - <&xoadc 0x00 0x0b>, /* Die temperature */ - <&xoadc 0x00 0x0c>, /* Reference voltage 1.25V */ - <&xoadc 0x00 0x0d>, /* Reference voltage 0.625V */ - <&xoadc 0x00 0x0e>; /* Reference voltage 0.325V */ -}; From patchwork Sat Oct 31 18:48:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 314623 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21E38C56202 for ; Sat, 31 Oct 2020 18:52:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E36FF2071A for ; Sat, 31 Oct 2020 18:52:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170342; bh=OgNZaLL9is87mgr0oVwVZNGbswE0xE79YT7Ep8Q7uvI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=OcFi5t2I70jLOYeHyyGhSO+dKeNCwHBKEiJ/07VJUSlfoGIflnJvuFNqU5aWRPYro oGf0iXsZly/X5BUR/9nRUwG5p0IViy9bPMyW3emeNHUq7YLjAwSOoGthaiyRPC3B5b hciHgk6OC8JPY2jbPtBxlOUopYAojE01LgI5mFKM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728458AbgJaSwV (ORCPT ); Sat, 31 Oct 2020 14:52:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:35842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728478AbgJaSwU (ORCPT ); Sat, 31 Oct 2020 14:52:20 -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 5A8EF20706; Sat, 31 Oct 2020 18:52:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170340; bh=OgNZaLL9is87mgr0oVwVZNGbswE0xE79YT7Ep8Q7uvI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2XYTMd9+PELNaYP5zEMv5LBIPexMCAdr3HZ16WnyGt7LXNnqEE9N2COWd/Lwl6Vam HDtFMSaDQ72LgsVez7pAkAGGU8sLb76xb5kyWgTKMfBxRkmnZ1eX5R1Zyg8HmFigNe 6tICK9+t3olo1CjJPNI71QOP+K0mnmcS5LpvGw8Q= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , "Ivan T . Ivanov" Subject: [PATCH 36/46] dt-bindings:iio:adc:qcom, spmi-iadc: txt to yaml format conversion. Date: Sat, 31 Oct 2020 18:48:44 +0000 Message-Id: <20201031184854.745828-37-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Straight forward conversion. Not heard from Ivan in a while so if the email bounces, I'll change the maintainer to myself for this binding unless anyone else comes forwards. Signed-off-by: Jonathan Cameron Cc: Ivan T. Ivanov --- .../bindings/iio/adc/qcom,spmi-iadc.txt | 46 -------------- .../bindings/iio/adc/qcom,spmi-iadc.yaml | 62 +++++++++++++++++++ 2 files changed, 62 insertions(+), 46 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.txt b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.txt deleted file mode 100644 index 4e36d6e2f7b6..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.txt +++ /dev/null @@ -1,46 +0,0 @@ -Qualcomm's SPMI PMIC current ADC - -QPNP PMIC current ADC (IADC) provides interface to clients to read current. -A 16 bit ADC is used for current measurements. IADC can measure the current -through an external resistor (channel 1) or internal (built-in) resistor -(channel 0). When using an external resistor it is to be described by -qcom,external-resistor-micro-ohms property. - -IADC node: - -- compatible: - Usage: required - Value type: - Definition: Should contain "qcom,spmi-iadc". - -- reg: - Usage: required - Value type: - Definition: IADC base address and length in the SPMI PMIC register map - -- interrupts: - Usage: optional - Value type: - Definition: End of ADC conversion. - -- qcom,external-resistor-micro-ohms: - Usage: optional - Value type: - Definition: Sense resister value in micro Ohm. - If not defined value of 10000 micro Ohms will be used. - -Example: - /* IADC node */ - pmic_iadc: iadc@3600 { - compatible = "qcom,spmi-iadc"; - reg = <0x3600 0x100>; - interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>; - qcom,external-resistor-micro-ohms = <10000>; - #io-channel-cells = <1>; - }; - - /* IIO client node */ - bat { - io-channels = <&pmic_iadc 0>; - io-channel-names = "iadc"; - }; diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.yaml new file mode 100644 index 000000000000..359e1ede0ae2 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-iadc.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/qcom,spmi-iadc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm's SPMI PMIC current ADC + +maintainers: + - Ivan T. Ivanov + +description: | + QPNP PMIC current ADC (IADC) provides interface to clients to read current. + A 16 bit ADC is used for current measurements. IADC can measure the current + through an external resistor (channel 1) or internal (built-in) resistor + (channel 0). When using an external resistor it is to be described by + qcom,external-resistor-micro-ohms property. + +properties: + compatible: + const: qcom,spmi-iadc + + reg: + description: IADC base address and length in the SPMI PMIC register map + maxItems: 1 + + qcom,external-resistor-micro-ohms: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Sensor resistor value. If not defined value of 10000 micro Ohms + will be used. + + interrupts: + maxItems: 1 + description: + End of conversion interrupt. + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + spmi_bus { + #address-cells = <1>; + #size-cells = <0>; + pmic_iadc: adc@3600 { + compatible = "qcom,spmi-iadc"; + reg = <0x3600 0x100>; + interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>; + qcom,external-resistor-micro-ohms = <10000>; + #io-channel-cells = <1>; + }; + }; +... + From patchwork Sat Oct 31 18:48: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: 320157 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451802ilc; Sat, 31 Oct 2020 11:52:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwv7MVQ/AFveuWPNcNznMQDyBYzzNOpJ/smqJUAD4tYui8/0sPSsA4aB1C0suiYVQAR3jm5 X-Received: by 2002:a17:906:f752:: with SMTP id jp18mr6629336ejb.331.1604170345801; Sat, 31 Oct 2020 11:52:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170345; cv=none; d=google.com; s=arc-20160816; b=Jhu6lc9yZSbE4m3DGESzMdYDUwDI19YezMJb8GJoigkylZmSBCa/xpfYqF+9FSDSjs aBj1vtW4qg6ZRMBDAkxnQTL8Vh+QzJIFPOWF4udGoNvQaNsExpXPmeVwLQBYiVUx+aYB Nd8VWO25TgOZNoV7HDXsvqEymiPmIxQEbixRn1wxigM0VGAVTJa83wtgRFsB1fGEFGeN VjfmFRBLeHtt4gdP4TSwWwBpDEqzNZHdkhPeFvGdP4bFNOIl+9dmR0miaLJM61Xh/JsD bQ7RYcvqa6Yj+7wY5Kcwu1B1A7JEMHLBAiTk7BdZmylBXBtB0yQes61/2cA/i4L5Mm69 vv5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=odRCQMgeu904JdN/dw8lxiKd7Cs+fPRcu0ZxFGP1Ke8=; b=jh1q90vzhl97fTQ4/C/0ps9HqgGzWEFufJkEBjAJblTp9aT/s7pZ+7owts4DhX9hW6 u3mKKXjebT79Vwb2AuTBXeg6XPyXKOm/ZuHgPOrwv/fyh8+Nj+LzrXacICm+AFJMwnDg oNortdLihCh+trFBO2piiTCLQJoAdpOcbv7/2vm91+XDBj0QEIruHLCBPtQatjhwE6Mh sNp2hSs/F1ZvUFKzgiKu1o/hUaV45LkmhgvtK5yxhFZ1ZeC42NVfYRGBBYsbicLGBNxP cteE3Tu3cAivczzRrViS/gqaJlCh/OGSmgcA8vaQ+Ynq0zFNf531wNtGz4g/73DS9tVN a/4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PPA1W63L; 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 a6si6987899ejp.422.2020.10.31.11.52.25; Sat, 31 Oct 2020 11:52:25 -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=PPA1W63L; 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 S1728490AbgJaSwX (ORCPT + 6 others); Sat, 31 Oct 2020 14:52:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:35878 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728487AbgJaSwW (ORCPT ); Sat, 31 Oct 2020 14:52:22 -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 BEDF020720; Sat, 31 Oct 2020 18:52:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170341; bh=iHy3qiKeE26nqQxdj2SbGtb4ptFCdtFFFG/BnMSMSc4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PPA1W63LH8K1ePeMW9h9fQ30TK7lJtTQgLNOnCDbNYnHvgSc35rYRPq0Q6roTu4Gd DunoxfdnLz8h04sv6Rdt2xliPlOVMeoM7999cfXxtx8kAj8T+dHzWTINxMGJ5zxRJ0 hG7+TCyDxBldEifPufVzj/XHW4mNTj2pf4tjbwe0= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Dan Murphy Subject: [PATCH 37/46] dt-binding:iio:adc:ti, ads124s08: txt to yaml format conversion. Date: Sat, 31 Oct 2020 18:48:45 +0000 Message-Id: <20201031184854.745828-38-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Simple binding so straight forward format conversion. Signed-off-by: Jonathan Cameron Cc: Dan Murphy --- .../bindings/iio/adc/ti,ads124s08.yaml | 52 +++++++++++++++++++ .../bindings/iio/adc/ti-ads124s08.txt | 25 --------- 2 files changed, 52 insertions(+), 25 deletions(-) -- 2.28.0 Reviewed-by: Dan Murphy diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml new file mode 100644 index 000000000000..5912a52953fa --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,ads124s08.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments' ads124s08 and ads124s06 ADC chip + +maintainers: + - Dan Murphy + +properties: + compatible: + enum: + - ti,ads124s06 + - ti,ads124s08 + + reg: + maxItems: 1 + + spi-max-frequency: true + + spi-cpha: true + + reset-gpios: + maxItems: 1 + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "ti,ads124s08"; + reg = <0>; + spi-max-frequency = <1000000>; + spi-cpha; + reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/adc/ti-ads124s08.txt b/Documentation/devicetree/bindings/iio/adc/ti-ads124s08.txt deleted file mode 100644 index ecf807bb32f7..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/ti-ads124s08.txt +++ /dev/null @@ -1,25 +0,0 @@ -* Texas Instruments' ads124s08 and ads124s06 ADC chip - -Required properties: - - compatible : - "ti,ads124s08" - "ti,ads124s06" - - reg : spi chip select number for the device - -Recommended properties: - - spi-max-frequency : Definition as per - Documentation/devicetree/bindings/spi/spi-bus.txt - - spi-cpha : Definition as per - Documentation/devicetree/bindings/spi/spi-bus.txt - -Optional properties: - - reset-gpios : GPIO pin used to reset the device. - -Example: -adc@0 { - compatible = "ti,ads124s08"; - reg = <0>; - spi-max-frequency = <1000000>; - spi-cpha; - reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; -}; From patchwork Sat Oct 31 18:48: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: 314622 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55EABC63777 for ; Sat, 31 Oct 2020 18:52:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0CE1120720 for ; Sat, 31 Oct 2020 18:52:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170347; bh=lFoRnEgeCn8mOtEpZtlP77+0c9x7C8iwtZqX5zeXFHk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=WkStfs3YemO2iDQuryR9lsRORUotEwdMaq3c83x4e2n4UqM69THKUkFz14/P8G02z LhrkpUZMsBxwBaaXG2pcD1bppBwfUjnHwyA1C5fEIb/aeGuMfaQt70lei8bPmXQ851 p9uzhhVUipeKAWOXrii7yJxQ8sGr8xxMvvMGjk0k= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728478AbgJaSwZ (ORCPT ); Sat, 31 Oct 2020 14:52:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:35918 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728475AbgJaSwZ (ORCPT ); Sat, 31 Oct 2020 14:52:25 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3699120659; Sat, 31 Oct 2020 18:52:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170343; bh=lFoRnEgeCn8mOtEpZtlP77+0c9x7C8iwtZqX5zeXFHk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q+44F0zo9iCJMnUNVCgCQeBbdQ/xJClvM3+fHtcQRKXF13LYmvwSwMNhrKl+8EXgU LmNr36bWUHM4fm8bpqdFG2bSFcwJhwzNkGiZEyMP+j52gZKe+zCWcu1oJ2od80+Nc5 RRMq5Isj91W5fB/MokBrXzH1YUP20c9tpozq7J/s= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Michael Hennerich Subject: [PATCH 38/46] dt-bindings:iio:dac:ad5592r: txt to yaml format conversion. Date: Sat, 31 Oct 2020 18:48:46 +0000 Message-Id: <20201031184854.745828-39-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron This is a more complex binding. Whilst conversion is straight forward I am unsure if the full nature of required properties has been captured. Signed-off-by: Jonathan Cameron Cc: Michael Hennerich --- .../devicetree/bindings/iio/dac/ad5592r.txt | 155 -------------- .../bindings/iio/dac/adi,ad5592r.yaml | 201 ++++++++++++++++++ 2 files changed, 201 insertions(+), 155 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/dac/ad5592r.txt b/Documentation/devicetree/bindings/iio/dac/ad5592r.txt deleted file mode 100644 index 989f96f31c66..000000000000 --- a/Documentation/devicetree/bindings/iio/dac/ad5592r.txt +++ /dev/null @@ -1,155 +0,0 @@ -Analog Devices AD5592R/AD5593R DAC/ADC device driver - -Required properties for the AD5592R: - - compatible: Must be "adi,ad5592r" - - reg: SPI chip select number for the device - - spi-max-frequency: Max SPI frequency to use (< 30000000) - - spi-cpol: The AD5592R requires inverse clock polarity (CPOL) mode - -Required properties for the AD5593R: - - compatible: Must be "adi,ad5593r" - - reg: I2C address of the device - -Required properties for all supported chips: - - #address-cells: Should be 1. - - #size-cells: Should be 0. - - channel nodes: - Each child node represents one channel and has the following - Required properties: - * reg: Pin on which this channel is connected to. - * adi,mode: Mode or function of this channel. - Macros specifying the valid values - can be found in . - - The following values are currently supported: - * CH_MODE_UNUSED (the pin is unused) - * CH_MODE_ADC (the pin is ADC input) - * CH_MODE_DAC (the pin is DAC output) - * CH_MODE_DAC_AND_ADC (the pin is DAC output - but can be monitored by an ADC, since - there is no disadvantage this - this should be considered as the - preferred DAC mode) - * CH_MODE_GPIO (the pin is registered - with GPIOLIB) - Optional properties: - * adi,off-state: State of this channel when unused or the - device gets removed. Macros specifying the - valid values can be found in - . - - * CH_OFFSTATE_PULLDOWN (the pin is pulled down) - * CH_OFFSTATE_OUT_LOW (the pin is output low) - * CH_OFFSTATE_OUT_HIGH (the pin is output high) - * CH_OFFSTATE_OUT_TRISTATE (the pin is - tristated output) - - -Optional properties: - - vref-supply: Phandle to the external reference voltage supply. This should - only be set if there is an external reference voltage connected to the VREF - pin. If the property is not set the internal 2.5V reference is used. - - reset-gpios : GPIO spec for the RESET pin. If specified, it will be - asserted during driver probe. - - gpio-controller: Marks the device node as a GPIO controller. - - #gpio-cells: Should be 2. The first cell is the GPIO number and the second - cell specifies GPIO flags, as defined in . - -AD5592R Example: - - #include - - vref: regulator-vref { - compatible = "regulator-fixed"; - regulator-name = "vref-ad559x"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - }; - - ad5592r@0 { - #size-cells = <0>; - #address-cells = <1>; - #gpio-cells = <2>; - compatible = "adi,ad5592r"; - reg = <0>; - - spi-max-frequency = <1000000>; - spi-cpol; - - vref-supply = <&vref>; /* optional */ - reset-gpios = <&gpio0 86 0>; /* optional */ - gpio-controller; - - channel@0 { - reg = <0>; - adi,mode = ; - }; - channel@1 { - reg = <1>; - adi,mode = ; - }; - channel@2 { - reg = <2>; - adi,mode = ; - }; - channel@3 { - reg = <3>; - adi,mode = ; - adi,off-state = ; - }; - channel@4 { - reg = <4>; - adi,mode = ; - adi,off-state = ; - }; - channel@5 { - reg = <5>; - adi,mode = ; - adi,off-state = ; - }; - channel@6 { - reg = <6>; - adi,mode = ; - adi,off-state = ; - }; - channel@7 { - reg = <7>; - adi,mode = ; - adi,off-state = ; - }; - }; - -AD5593R Example: - - #include - - ad5593r@10 { - #size-cells = <0>; - #address-cells = <1>; - #gpio-cells = <2>; - compatible = "adi,ad5593r"; - reg = <0x10>; - gpio-controller; - - channel@0 { - reg = <0>; - adi,mode = ; - adi,off-state = ; - }; - channel@1 { - reg = <1>; - adi,mode = ; - adi,off-state = ; - }; - channel@2 { - reg = <2>; - adi,mode = ; - adi,off-state = ; - }; - channel@6 { - reg = <6>; - adi,mode = ; - adi,off-state = ; - }; - }; diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5592r.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5592r.yaml new file mode 100644 index 000000000000..c49646825c37 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5592r.yaml @@ -0,0 +1,201 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/adi,ad5592r.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD5592R/AD5593R DAC/ADC + +maintainers: + - Michael Hennerich + +properties: + compatible: + enum: + - adi,ad5592r + - adi,ad5593r + + reg: + maxItems: 1 + + spi-max-frequency: + maximum: 30000000 + + spi-cpol: true + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + "#io-channel-cells": + const: 1 + + vref-supply: + description: If not set internal 2.5V reference used. + + reset-gpios: + maxItems: 1 + + gpio-controller: + description: Marks the device node as a GPIO controller. + + "#gpio-cells": + const: 2 + description: + The first cell is the GPIO number and the second cell specifies + GPIO flags, as defined in . + +required: + - compatible + - reg + - "#address-cells" + - "#size-cells" + +allOf: + - if: + properties: + compatible: + contains: + const: adi,ad5592r + then: + required: + - spi-cpol + else: + properties: + spi-cpol: false + +additionalProperties: false + +patternProperties: + "^(channel@)[0-7]$": + type: object + description: Child node to describe a channel + properties: + reg: + maxItems: 1 + + adi,mode: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Mode or function of this channel. + Macros specifying the valid values can be found in + . + + The following values are currently supported: + * CH_MODE_UNUSED (the pin is unused) + * CH_MODE_ADC (the pin is ADC input) + * CH_MODE_DAC (the pin is DAC output) + * CH_MODE_DAC_AND_ADC (the pin is DAC output but can be monitored + by an ADC, since there is no disadvantage this should be + considered as the preferred DAC mode) + * CH_MODE_GPIO (the pin is registered with GPIOLIB) + + adi,off-state: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + State of this channel when unused or the device gets removed. + Macros specifying the valid values can be found in + . + * CH_OFFSTATE_PULLDOWN (the pin is pulled down) + * CH_OFFSTATE_OUT_LOW (the pin is output low) + * CH_OFFSTATE_OUT_HIGH (the pin is output high) + * CH_OFFSTATE_OUT_TRISTATE (the pin is tristated output) + + required: + - reg + - adi,mode + + additionalProperties: false + +examples: + - | + #include + spi { + #address-cells = <1>; + #size-cells = <0>; + + addac@0 { + compatible = "adi,ad5592r"; + #size-cells = <0>; + #address-cells = <1>; + #gpio-cells = <2>; + reg = <0>; + + spi-max-frequency = <1000000>; + spi-cpol; + + vref-supply = <&vref>; + reset-gpios = <&gpio0 86 0>; + gpio-controller; + + channel@0 { + reg = <0>; + adi,mode = ; + }; + channel@1 { + reg = <1>; + adi,mode = ; + }; + channel@2 { + reg = <2>; + adi,mode = ; + }; + channel@3 { + reg = <3>; + adi,mode = ; + adi,off-state = ; + }; + channel@4 { + reg = <4>; + adi,mode = ; + adi,off-state = ; + }; + channel@5 { + reg = <5>; + adi,mode = ; + adi,off-state = ; + }; + channel@6 { + reg = <6>; + adi,mode = ; + adi,off-state = ; + }; + channel@7 { + reg = <7>; + adi,mode = ; + adi,off-state = ; + }; + }; + ad5593r@10 { + compatible = "adi,ad5593r"; + #size-cells = <0>; + #address-cells = <1>; + #gpio-cells = <2>; + reg = <0x10>; + gpio-controller; + + channel@0 { + reg = <0>; + adi,mode = ; + adi,off-state = ; + }; + channel@1 { + reg = <1>; + adi,mode = ; + adi,off-state = ; + }; + channel@2 { + reg = <2>; + adi,mode = ; + adi,off-state = ; + }; + channel@6 { + reg = <6>; + adi,mode = ; + adi,off-state = ; + }; + }; + }; +... From patchwork Sat Oct 31 18:48: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: 320163 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451848ilc; Sat, 31 Oct 2020 11:52:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxa6EHU5xsD2wCRKazrB6ovHnGiJKJWWKfl5DCQp03TFg2t7dLZU9J3ZM7M7rzmH6wcv5+I X-Received: by 2002:a05:6402:1c8e:: with SMTP id cy14mr2376232edb.39.1604170352899; Sat, 31 Oct 2020 11:52:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170352; cv=none; d=google.com; s=arc-20160816; b=w4uktffm7jRRKa2aLDijo7ueqruDrWXRcrU/NENrYm4fed9RnwWr3nWi49v3PDFImx OUiO+k9t44Bk/s7GgJIZ2B9mD6W/V1RL0RnrAkZT6Lkr9mx2qEjAUHQfhpc2XXsU7O/w vKB3Ta3ceHDOCEXfWrCEeItaKsQ+/o7fn41cFRO9ohMlN5wV031mNnBJU7C5ShMEItSo PpZKkAjMPIZfqkuFC4a75C/ZCm69ycSvJcfjxn8ITePlepdhRYGRb2cTTgqu+35VsdR/ IM6YwCGT4pu45Fx8dQcaVKk5Hpq4YeaUroycB9qiXSEvH5oGYPz5QIC3tUmAxFckJwC1 6GoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Pyq+8MJOwAyF1rThdTFNNWsF60JJSfMHMEyzJJJlVr0=; b=H8USzks9PN68z5pU4aCwQnLXfmkpuYwUIZ02/CgYoX79KFZ3p1GvguoVscYa6PSVOL d3gXOVS6d9FFFHx0Gmm+PyCA1LURnKHwRYdRnYDvNaozLit91YB0MXwAyL+63vBWg1A5 x36ij7ra7xmRWfMIMrBJDVCPR+Zq7qQhhT8l3pMxb01mPkrJE53zkh3ZH03fmi3s+tZW WRIN+IpRQMYeeXdEv2sRC2mFKR0TaAfGWfZNPS7JttepNKdsc35pHn7BwJS2EhEVQFdZ CbQyYGQxIngt0Y+9D7DnaYEXIhStjmQfBsKLUKAQk884KkSkCMc9AvqF/G8f6Vy/0dmj jSkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jTRLmfKO; 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 a6si6987899ejp.422.2020.10.31.11.52.32; Sat, 31 Oct 2020 11:52:32 -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=jTRLmfKO; 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 S1728493AbgJaSw1 (ORCPT + 6 others); Sat, 31 Oct 2020 14:52:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:35966 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728487AbgJaSw0 (ORCPT ); Sat, 31 Oct 2020 14:52:26 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9920320724; Sat, 31 Oct 2020 18:52:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170344; bh=Pm/yy0Q2hxf7hDFcvvd7sLFGzR+up/N4nay/Lf6oWcI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jTRLmfKONuYBK6rXBqPrrvYWmxB1u09i8yxy2mnwSdzWRsOf2ZVmGd3enPdL+pEhv tBx9slVHL1uRtVC8cVCPw8EMuMCHDZHhV922ajUdbvIu8jaQTg/IyG+X9CE1dGNI1B fM3ip7VbWe4dsBbG/mz6e5/xjacH09uJE+NAW410= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Sean Nyekjaer Subject: [PATCH 39/46] dt-bindings:iio:dac:ad5755: txt to yaml format conversion. Date: Sat, 31 Oct 2020 18:48:47 +0000 Message-Id: <20201031184854.745828-40-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Straight forward conversion. Only fiddly bit is the XOR of spi-cpol and spi-cpha. Signed-off-by: Jonathan Cameron Cc: Sean Nyekjaer --- .../devicetree/bindings/iio/dac/ad5755.txt | 124 ------------ .../bindings/iio/dac/adi,ad5755.yaml | 178 ++++++++++++++++++ 2 files changed, 178 insertions(+), 124 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/dac/ad5755.txt b/Documentation/devicetree/bindings/iio/dac/ad5755.txt deleted file mode 100644 index 502e1e55adbd..000000000000 --- a/Documentation/devicetree/bindings/iio/dac/ad5755.txt +++ /dev/null @@ -1,124 +0,0 @@ -* Analog Devices AD5755 IIO Multi-Channel DAC Linux Driver - -Required properties: - - compatible: Has to contain one of the following: - adi,ad5755 - adi,ad5755-1 - adi,ad5757 - adi,ad5735 - adi,ad5737 - - - reg: spi chip select number for the device - - spi-cpha or spi-cpol: is the only modes that is supported - -Recommended properties: - - spi-max-frequency: Definition as per - Documentation/devicetree/bindings/spi/spi-bus.txt - -Optional properties: -See include/dt-bindings/iio/ad5755.h - - adi,ext-dc-dc-compenstation-resistor: boolean set if the hardware have an - external resistor and thereby bypasses - the internal compensation resistor. - - adi,dc-dc-phase: - Valid values for DC DC Phase control is: - 0: All dc-to-dc converters clock on the same edge. - 1: Channel A and Channel B clock on the same edge, - Channel C and Channel D clock on opposite edges. - 2: Channel A and Channel C clock on the same edge, - Channel B and Channel D clock on opposite edges. - 3: Channel A, Channel B, Channel C, and Channel D - clock 90 degrees out of phase from each other. - - adi,dc-dc-freq-hz: - Valid values for DC DC frequency is [Hz]: - 250000 - 410000 - 650000 - - adi,dc-dc-max-microvolt: - Valid values for the maximum allowed Vboost voltage supplied by - the dc-to-dc converter is: - 23000000 - 24500000 - 27000000 - 29500000 - -Optional for every channel: - - adi,mode: - Valid values for DAC modes is: - 0: 0 V to 5 V voltage range. - 1: 0 V to 10 V voltage range. - 2: Plus minus 5 V voltage range. - 3: Plus minus 10 V voltage range. - 4: 4 mA to 20 mA current range. - 5: 0 mA to 20 mA current range. - 6: 0 mA to 24 mA current range. - - adi,ext-current-sense-resistor: boolean set if the hardware a external - current sense resistor. - - adi,enable-voltage-overrange: boolean enable voltage overrange - - adi,slew: Array of slewrate settings should contain 3 fields: - 1: Should be either 0 or 1 in order to enable or disable slewrate. - 2: Slew rate settings: - Valid values for the slew rate update frequency: - 64000 - 32000 - 16000 - 8000 - 4000 - 2000 - 1000 - 500 - 250 - 125 - 64 - 32 - 16 - 8 - 4 - 0 - 3: Slew step size: - Valid values for the step size LSBs: - 1 - 2 - 4 - 16 - 32 - 64 - 128 - 256 - -Example: -dac@0 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "adi,ad5755"; - reg = <0>; - spi-max-frequency = <1000000>; - spi-cpha; - adi,dc-dc-phase = <0>; - adi,dc-dc-freq-hz = <410000>; - adi,dc-dc-max-microvolt = <23000000>; - channel@0 { - reg = <0>; - adi,mode = <4>; - adi,ext-current-sense-resistor; - adi,slew = <0 64000 1>; - }; - channel@1 { - reg = <1>; - adi,mode = <4>; - adi,ext-current-sense-resistor; - adi,slew = <0 64000 1>; - }; - channel@2 { - reg = <2>; - adi,mode = <4>; - adi,ext-current-sense-resistor; - adi,slew = <0 64000 1>; - }; - channel@3 { - reg = <3>; - adi,mode = <4>; - adi,ext-current-sense-resistor; - adi,slew = <0 64000 1>; - }; -}; diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5755.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5755.yaml new file mode 100644 index 000000000000..74edff3e8408 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5755.yaml @@ -0,0 +1,178 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/adi,ad5755.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD5755 Multi-Channel DAC + +maintainers: + - Sean Nyekjaer + +properties: + compatible: + enum: + - adi,ad5755 + - adi,ad5755-1 + - adi,ad5757 + - adi,ad5735 + - adi,ad5737 + + reg: + maxItems: 1 + + spi-cpha: + description: Either this or spi-cpol but not both. + spi-cpol: true + + spi-max-frequency: true + + adi,ext-dc-dc-compenstation-resistor: + $ref: /schemas/types.yaml#/definitions/flag + description: + Set if the hardware have an external resistor and thereby bypasses + the internal compensation resistor. + + adi,dc-dc-phase: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1, 2, 3] + description: | + Valid values for DC DC Phase control is: + 0: All dc-to-dc converters clock on the same edge. + 1: Channel A and Channel B clock on the same edge, + Channel C and Channel D clock on opposite edges. + 2: Channel A and Channel C clock on the same edge, + Channel B and Channel D clock on opposite edges. + 3: Channel A, Channel B, Channel C, and Channel D + clock 90 degrees out of phase from each other. + + adi,dc-dc-freq-hz: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [250000, 410000, 650000] + + adi,dc-dc-max-microvolt: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Maximum allowed Vboost voltage supplied by the dc-to-dc converter. + enum: [23000000, 24500000, 27000000, 29500000] + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + +additionalProperties: false + +patternProperties: + "^(channel@)[0-7]$": + type: object + description: Child node to describe a channel + properties: + reg: + maxItems: 1 + + adi,mode: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 6 + description: | + Valid values for DAC modes is: + 0: 0 V to 5 V voltage range. + 1: 0 V to 10 V voltage range. + 2: Plus minus 5 V voltage range. + 3: Plus minus 10 V voltage range. + 4: 4 mA to 20 mA current range. + 5: 0 mA to 20 mA current range. + 6: 0 mA to 24 mA current range. + + adi,ext-current-sense-resistor: + $ref: /schemas/types.yaml#/definitions/flag + description: + Set if the hardware has an external current sense resistor + + adi,enable-voltage-overrange: + $ref: /schemas/types.yaml#/definitions/flag + description: Enable voltage overrange + + adi,slew: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: | + Array of slewrate settings should contain 3 fields: + 1: Should be either 0 or 1 in order to enable or disable slewrate. + 2: Slew rate update frequency + 3: Slew step size + items: + - enum: [0, 1] + - enum: [64000, 32000, 16000, 8000, 4000, 2000, 1000, 500, 250, 125, 64, 32, 16, 8, 4, 0] + - enum: [1, 2, 4, 16, 32, 64, 128, 256] + + required: + - reg + + additionalProperties: false + +allOf: + - $ref: '#/definitions/cpolXORcpha' + +definitions: + cpolXORcpha: + not: + required: [spi-cpha, spi-cpol] + oneOf: + - required: + - spi-cpha + - required: + - spi-cpol + +examples: + - | + #include + spi { + #address-cells = <1>; + #size-cells = <0>; + + dac@0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "adi,ad5755"; + reg = <0>; + spi-max-frequency = <1000000>; + spi-cpha; + adi,dc-dc-phase = <0>; + adi,dc-dc-freq-hz = <410000>; + adi,dc-dc-max-microvolt = <23000000>; + channel@0 { + reg = <0>; + adi,mode = <4>; + adi,ext-current-sense-resistor; + adi,slew = <0 64000 1>; + }; + channel@1 { + reg = <1>; + adi,mode = <4>; + adi,ext-current-sense-resistor; + adi,slew = <0 64000 1>; + }; + channel@2 { + reg = <2>; + adi,mode = <4>; + adi,ext-current-sense-resistor; + adi,slew = <0 64000 1>; + }; + channel@3 { + reg = <3>; + adi,mode = <4>; + adi,ext-current-sense-resistor; + adi,slew = <0 64000 1>; + }; + }; + }; +... From patchwork Sat Oct 31 18:48: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: 320161 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451840ilc; Sat, 31 Oct 2020 11:52:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGh7a2HSCCwdns3famFSVtZux0xiS9wzn6K39Pg5PhuMy5fyNKnF25y2+Zb1bOv9fx+6IR X-Received: by 2002:a50:9f03:: with SMTP id b3mr8416461edf.268.1604170351652; Sat, 31 Oct 2020 11:52:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170351; cv=none; d=google.com; s=arc-20160816; b=CpmFsSHGGXwc98AAFB8AzBt/jCO8csN4EmRyhVC9/nv8y5UKsp2BmXVSShH88H6b35 7WKdomp8/+AZ0kZ4vcCCQIlLSqWD9t4Qpq19fhY0m5NsJQFZWtbqxjPphQSf//PX2w/0 HKpfX7HdioeS7HPO7RczW5EzW9w2jsAph9PoGqb98K4o7oSuociKuPw0p8c65098ZRte jlqLnQ9z2yLGRXeOJmYlWHYKgcrb9T2rEvQ7h+eSlFS4Q/kAgyMwsqOJXbWxbl//zGhN mH4je5V5KOBaO3Cimjd7E1G/7GbKLLFVKG5K33o9PXb2dCVRXtM9P4NMvC0/mLNZF/FS VrPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oBc6+sL6FKIOsIG/sIxvWK6jg7eMAaTCCE0IefXaOQ0=; b=ZfUKXKYzGfAeWvBNscZKk/RvlQnp/MTszDjYeSEqqiMqAvYsi5MtTwQkF/hJcI65LO A9848F/IRAcTOVG2c4sG5mlkhBiWpW2LxmwAkdCePafJaaG0zZHaaXFT/s5QpF7gUg5D 4xbTSdQNrOnPcAGjvZth77H6asyT7z4jZZUWubqFEiEQKP/ZbOsXC9kWMzR59F+Cl7AH grmrG10L4psOa5QcecF3EobhEFJiJYO3DUgQXvPu9723MQQyK2mVK+wY/yEo3T4pS1j9 zR4PJjjnBGQ4jMCpgq1KVSlBqsvwAL/rSspN0H1HAN2kcQngTiNC8Byhxgcefd7PUmDz IFHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DYeur7FX; 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 a6si6987899ejp.422.2020.10.31.11.52.31; Sat, 31 Oct 2020 11:52:31 -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=DYeur7FX; 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 S1728487AbgJaSw1 (ORCPT + 6 others); Sat, 31 Oct 2020 14:52:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:36024 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728475AbgJaSw0 (ORCPT ); Sat, 31 Oct 2020 14:52:26 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0D8FE2071A; Sat, 31 Oct 2020 18:52:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170346; bh=w/JP463PBTxpEqz/QATAd4Hh7N8EcveM++zge7NlHKQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DYeur7FXGr4tBH586epLHcw6Bufm2qf0fZ9BmCTDGDO6VeTKO9WbFfltraXotqIsZ NWjiBuGyig6eDN2LFSe88vZadHUS3vKfdPyOLzYWH+JFrEytXZzpJ+7h910x51Dj2P KQ18CGzVLr0GpLj7OpRoEX51kG5nvIc8DYVYLoCg= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Oleksandr Kravchenko Subject: [PATCH 40/46] dt-bindings:iio:accel:bosch, bma180: txt to yaml format conversion. Date: Sat, 31 Oct 2020 18:48:48 +0000 Message-Id: <20201031184854.745828-41-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron One question in here is whether we want to constrain the number of interrupts. Some parts definitely only have 1 such pin, and others 2 pins but I can not find information on the bma254. Signed-off-by: Jonathan Cameron Cc: Oleksandr Kravchenko --- .../devicetree/bindings/iio/accel/bma180.txt | 35 ----------- .../bindings/iio/accel/bosch,bma180.yaml | 62 +++++++++++++++++++ 2 files changed, 62 insertions(+), 35 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/accel/bma180.txt b/Documentation/devicetree/bindings/iio/accel/bma180.txt deleted file mode 100644 index 33da4a6fdb39..000000000000 --- a/Documentation/devicetree/bindings/iio/accel/bma180.txt +++ /dev/null @@ -1,35 +0,0 @@ -* Bosch BMA023 / BMA150/ BMA180 / BMA25x / SMB380 triaxial acceleration sensor - -https://media.digikey.com/pdf/Data%20Sheets/Bosch/BMA150.pdf -http://omapworld.com/BMA180_111_1002839.pdf -http://ae-bst.resource.bosch.com/media/products/dokumente/bma250/bst-bma250-ds002-05.pdf - -Required properties: - - - compatible : should be one of: - "bosch,bma023" - "bosch,bma150" - "bosch,bma180" - "bosch,bma250" - "bosch,bma254" - "bosch,smb380" - - reg : the I2C address of the sensor - - vdd-supply : regulator phandle connected to the VDD pin - - vddio-supply : regulator phandle connected to the VDDIO pin - -Optional properties: - - - interrupts : interrupt mapping for GPIO IRQ, it should by configured with - flags IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING - For the bma250 the first interrupt listed must be the one - connected to the INT1 pin, the second (optional) interrupt - listed must be the one connected to the INT2 pin. - -Example: - -bma180@40 { - compatible = "bosch,bma180"; - reg = <0x40>; - interrupt-parent = <&gpio6>; - interrupts = <18 (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)>; -}; diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma180.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma180.yaml new file mode 100644 index 000000000000..14e48290ffe3 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma180.yaml @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/accel/bosch,bma180.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Bosch BMA023 / BMA150/ BMA180 / BMA25x / SMB380 triaxial accelerometers + +maintainers: + - Oleksandr Kravchenko + +description: | + https://media.digikey.com/pdf/Data%20Sheets/Bosch/BMA150.pdf + http://omapworld.com/BMA180_111_1002839.pdf + http://ae-bst.resource.bosch.com/media/products/dokumente/bma250/bst-bma250-ds002-05.pdf + +properties: + compatible: + enum: + - bosch,bma023 + - bosch,bma150 + - bosch,bma180 + - bosch,bma250 + - bosch,bma254 + - bosch,smb380 + + reg: + maxItems: 1 + + vdd-supply: true + + vddio-supply: true + + interrupts: + minItems: 1 + maxItems: 2 + description: | + Type should be either IRQ_TYPE_LEVEL_HIGH or IRQ_TYPE_EDGE_RISING. + For the bma250 the first interrupt listed must be the one + connected to the INT1 pin, the second (optional) interrupt + listed must be the one connected to the INT2 pin. + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + accel@40 { + compatible = "bosch,bma180"; + reg = <0x40>; + interrupt-parent = <&gpio6>; + interrupts = <18 (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)>; + }; + }; +... From patchwork Sat Oct 31 18:48: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: 314621 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8558C5DF9D for ; Sat, 31 Oct 2020 18:52:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B67A620729 for ; Sat, 31 Oct 2020 18:52:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170349; bh=A2pwFngauHoS66hH5BWqmxkQXqVJk7bmvyKpRg8LrxI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=JZQG4iKOM2OdI5IkjSUf4YTbfElueYj7Yw2cjk7vZb0KLJWUfqbFo0CMbO5skU2qV jVIeJuIphxDn0/P8ei2dKkjpgNyzMYnvV27cLb7fJKmG7rOzqudRpwKaU5yZYsXwvZ 9BQZiHwG1sxyI2umlwWbM2HLeJFdA/QNTslc//TY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728492AbgJaSw2 (ORCPT ); Sat, 31 Oct 2020 14:52:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:36074 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728500AbgJaSw2 (ORCPT ); Sat, 31 Oct 2020 14:52: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 7794620739; Sat, 31 Oct 2020 18:52:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170347; bh=A2pwFngauHoS66hH5BWqmxkQXqVJk7bmvyKpRg8LrxI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V5q/KaW+DYjAB9BOs2dTXK+mmC97z/1A14893uL5HnBrT1Bu5B2xC/kbVXBBZXU4z QCLr21ZUmTrFaHOryx0Vb65AMkFRrtG5lPIjwb1FUxRY9ps6Ux5x6sM0zXBYPUmiz/ 4MSJ8GGxfpAWG4HkBW77cTN7d+U2VFrlkNesgKNE= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Dmitry Osipenko , Robert Yang Subject: [PATCH 41/46] dt-bindings:iio:accel:kionix, kxcjk1013: txt to yaml format conversion. Date: Sat, 31 Oct 2020 18:48:49 +0000 Message-Id: <20201031184854.745828-42-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Very simple binding hence a straight forward conversion. Signed-off-by: Jonathan Cameron Cc: Dmitry Osipenko Cc: Robert Yang --- .../bindings/iio/accel/kionix,kxcjk1013.txt | 24 ---------- .../bindings/iio/accel/kionix,kxcjk1013.yaml | 46 +++++++++++++++++++ 2 files changed, 46 insertions(+), 24 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/accel/kionix,kxcjk1013.txt b/Documentation/devicetree/bindings/iio/accel/kionix,kxcjk1013.txt deleted file mode 100644 index ce950e162d5d..000000000000 --- a/Documentation/devicetree/bindings/iio/accel/kionix,kxcjk1013.txt +++ /dev/null @@ -1,24 +0,0 @@ -Kionix KXCJK-1013 Accelerometer device tree bindings - -Required properties: - -- compatible: Must be one of: - "kionix,kxcjk1013" - "kionix,kxcj91008" - "kionix,kxtj21009" - "kionix,kxtf9" - - reg: i2c slave address - -Optional properties: - - - mount-matrix: an optional 3x3 mounting rotation matrix - -Example: - -kxtf9@f { - compatible = "kionix,kxtf9"; - reg = <0x0F>; - mount-matrix = "0", "1", "0", - "1", "0", "0", - "0", "0", "1"; -}; diff --git a/Documentation/devicetree/bindings/iio/accel/kionix,kxcjk1013.yaml b/Documentation/devicetree/bindings/iio/accel/kionix,kxcjk1013.yaml new file mode 100644 index 000000000000..5667d09dfe6a --- /dev/null +++ b/Documentation/devicetree/bindings/iio/accel/kionix,kxcjk1013.yaml @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/accel/kionix,kxcjk1013.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Kionix KXCJK-1013 Accelerometer + +maintainers: + - Robert Yang + +properties: + compatible: + enum: + - kionix,kxcjk1013 + - kionix,kxcj91008 + - kionix,kxtj21009 + - kionix,kxtf9 + + reg: + maxItems: 1 + + mount-matrix: + description: an optional 3x3 mounting rotation matrix. + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + accel@f { + compatible = "kionix,kxtf9"; + reg = <0x0F>; + mount-matrix = "0", "1", "0", + "1", "0", "0", + "0", "0", "1"; + }; + }; +... From patchwork Sat Oct 31 18:48: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: 314620 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B1A7C55178 for ; Sat, 31 Oct 2020 18:52:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F146120729 for ; Sat, 31 Oct 2020 18:52:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170352; bh=tF5TMG9YDsXu44meERg+4haDV0Vs3wDEY5Fb2FlRqDg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=pv53Dw20flmbU7kMte/gTSgevp41A76nNo1KENC6vdR49WawIC8m4trjeyv2VOeRI K7QPfhum0srQ6zcdWKGZxwK4WooWwOQzJvZlbK52IkmFgGpNgSFLyPARQOcXIVznfq rRFTjgXu4yyY5NpW0y8RY5rUiiXfexXnq7wucl+Q= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728504AbgJaSwa (ORCPT ); Sat, 31 Oct 2020 14:52:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:36106 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728500AbgJaSw3 (ORCPT ); Sat, 31 Oct 2020 14:52: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 0E4CA205ED; Sat, 31 Oct 2020 18:52:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170349; bh=tF5TMG9YDsXu44meERg+4haDV0Vs3wDEY5Fb2FlRqDg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mnOmJgBXNUfrIh7d46bWySZWEFFW/ikSLr7d5xS0L+UyjYQjzh5x+rjw5NfSEMIsk psu73h00PqawrGh/bM5U1QPSJF/7fvrOPdnx8v4TaK3EOkbYMKYJO+RHnakORXUdGV 3wvyXf65mXgT2zFkN7m20yqztcElgVfBXi0P0z3Q= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Martin Kepplinger Subject: [PATCH 42/46] dt-bindings:iio:accel:fsl, mma8452: txt to yaml conversion. Date: Sat, 31 Oct 2020 18:48:50 +0000 Message-Id: <20201031184854.745828-43-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Simple binding so mostly straight forward to convert. Original binding was unclear on how many interrupts there are. The device has two such lines, whilst I believe the driver currently only uses one at a time. The binding should allow both to be specified. Signed-off-by: Jonathan Cameron Cc: Martin Kepplinger --- .../bindings/iio/accel/fsl,mma8452.yaml | 62 +++++++++++++++++++ .../devicetree/bindings/iio/accel/mma8452.txt | 35 ----------- 2 files changed, 62 insertions(+), 35 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/accel/fsl,mma8452.yaml b/Documentation/devicetree/bindings/iio/accel/fsl,mma8452.yaml new file mode 100644 index 000000000000..3b8e5ebdf90c --- /dev/null +++ b/Documentation/devicetree/bindings/iio/accel/fsl,mma8452.yaml @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/accel/fsl,mma8452.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: + Freescale MMA8451Q, MMA8452Q, MMA8453Q, MMA8652FC, MMA8653FC or FXLS8471Q + triaxial accelerometer + +maintainers: + - Martin Kepplinger + +properties: + compatible: + enum: + - fsl,mma8451 + - fsl,mma8452 + - fsl,mma8453 + - fsl,mma8652 + - fsl,mma8653 + - fsl,fxls8471 + + reg: + maxItems: 1 + + interrupts: + description: + 2 highly configurable interrupt lines exist. + minItems: 1 + maxItems: 2 + + interrupt-names: + description: Specify which interrupt line is in use. + enum: + - INT1 + - INT2 + + vdd-supply: true + vddio-supply: true + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + accel@1d { + compatible = "fsl,mma8453"; + reg = <0x1d>; + interrupt-parent = <&gpio1>; + interrupts = <5 0>; + interrupt-names = "INT2"; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/accel/mma8452.txt b/Documentation/devicetree/bindings/iio/accel/mma8452.txt deleted file mode 100644 index e132394375a1..000000000000 --- a/Documentation/devicetree/bindings/iio/accel/mma8452.txt +++ /dev/null @@ -1,35 +0,0 @@ -Freescale MMA8451Q, MMA8452Q, MMA8453Q, MMA8652FC, MMA8653FC or FXLS8471Q -triaxial accelerometer - -Required properties: - - - compatible: should contain one of - * "fsl,mma8451" - * "fsl,mma8452" - * "fsl,mma8453" - * "fsl,mma8652" - * "fsl,mma8653" - * "fsl,fxls8471" - - - reg: the I2C address of the chip - -Optional properties: - - - interrupts: interrupt mapping for GPIO IRQ - - - interrupt-names: should contain "INT1" and/or "INT2", the accelerometer's - interrupt line in use. - - - vdd-supply: phandle to the regulator that provides vdd power to the accelerometer. - - - vddio-supply: phandle to the regulator that provides vddio power to the accelerometer. - -Example: - - mma8453fc@1d { - compatible = "fsl,mma8453"; - reg = <0x1d>; - interrupt-parent = <&gpio1>; - interrupts = <5 0>; - interrupt-names = "INT2"; - }; From patchwork Sat Oct 31 18:48: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: 314619 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D89EFC63699 for ; Sat, 31 Oct 2020 18:52:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AD61D205ED for ; Sat, 31 Oct 2020 18:52:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170353; bh=MVEG3qMzlUAecaJDH4LWqO64zUsYGda59XuCuxESiXg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=XpcAHWs8KrLSnsyNgXiEqA8xAekVWl/wQcT5GgNu1SoGz8Kr76v4b7neAZVGboyTU RnM2jKGFIcUAAOkZlxw/XVFo3Qkg2QtnBjz5WLX8Vu+w88G1JQIpsEofVBH5YuPfH1 C4rh1p5xtnOzG3lFEjuHt/VVkhPyYZ9XB9YlIkFw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728338AbgJaSwc (ORCPT ); Sat, 31 Oct 2020 14:52:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:36142 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728500AbgJaSwa (ORCPT ); Sat, 31 Oct 2020 14:52:30 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 738DB20720; Sat, 31 Oct 2020 18:52:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170350; bh=MVEG3qMzlUAecaJDH4LWqO64zUsYGda59XuCuxESiXg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OXfmaBPO/2t310lbNvj5aawakQh5tAJV58AvdEvEiLanKIBTCTY225HgXRu6nPnKT c/c9z5fIRw4I4DTRK74KWj5LkAw5O7jxdpyZ+Hw/fkWIqPQbG9FruBnDz3vSn8x7+G qUHUy0Aa4iOLXd3rJGn7pJ1txMQ1epBlXO2ZoiXY= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , "H . Nikolaus Schaller" Subject: [PATCH 43/46] dt-bindings:iio:gyro:bosch, bmg180: txt to yaml format conversion. Date: Sat, 31 Oct 2020 18:48:51 +0000 Message-Id: <20201031184854.745828-44-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Very simple direct conversion of existing txt file. Signed-off-by: Jonathan Cameron Cc: H. Nikolaus Schaller --- .../bindings/iio/gyroscope/bmg160.txt | 20 -------- .../bindings/iio/gyroscope/bosch,bmg160.yaml | 46 +++++++++++++++++++ 2 files changed, 46 insertions(+), 20 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/gyroscope/bmg160.txt b/Documentation/devicetree/bindings/iio/gyroscope/bmg160.txt deleted file mode 100644 index bb43d1ad9c9f..000000000000 --- a/Documentation/devicetree/bindings/iio/gyroscope/bmg160.txt +++ /dev/null @@ -1,20 +0,0 @@ -* Bosch BMG160 triaxial rotation sensor (gyroscope) - -Required properties: - - - compatible : should be "bosch,bmg160", "bosch,bmi055_gyro" or "bosch,bmi088_gyro" - - reg : the I2C address of the sensor (0x69) - -Optional properties: - - - interrupts : interrupt mapping for GPIO IRQ, it should by configured with - flags IRQ_TYPE_EDGE_RISING - -Example: - -bmg160@69 { - compatible = "bosch,bmg160"; - reg = <0x69>; - interrupt-parent = <&gpio6>; - interrupts = <18 (IRQ_TYPE_EDGE_RISING)>; -}; diff --git a/Documentation/devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml b/Documentation/devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml new file mode 100644 index 000000000000..0466483be6bb --- /dev/null +++ b/Documentation/devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/gyroscope/bosch,bmg160.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Bosch BMG160 triaxial rotation sensor (gyroscope) + +maintainers: + - H. Nikolaus Schaller + +properties: + compatible: + enum: + - bosch,bmg160 + - bosch,bmi055_gyro + - bosch,bmi088_gyro + + reg: + maxItems: 1 + + interrupts: + minItems: 1 + description: + Should be configured with type IRQ_TYPE_EDGE_RISING. + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + gyroscope@69 { + compatible = "bosch,bmg160"; + reg = <0x69>; + interrupt-parent = <&gpio6>; + interrupts = <18 IRQ_TYPE_EDGE_RISING>; + }; + }; +... From patchwork Sat Oct 31 18:48: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: 320165 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451865ilc; Sat, 31 Oct 2020 11:52:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpYNXxVSGvpqzZwlgDL/hUri8TGABPMuzR3iHyhwx7tKIci1MhGLHtZe33SIwIFyjIG+be X-Received: by 2002:aa7:cd42:: with SMTP id v2mr8514946edw.191.1604170354592; Sat, 31 Oct 2020 11:52:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170354; cv=none; d=google.com; s=arc-20160816; b=gXgbfmfDUjL5YybcLExFjEJRZUSaSI54H71PlYFwj8QCsG2TDI7IlMG4DkPyrwJcoM FygHKKovNVFnrE6TBxqPmhr6uRJkNAVgP2Z8GmouJhCaUfjGRdNKd+FPA8o0DyJycuXv 5a/S93622+7lZeWy4uGE5hIxGDOjte1S7umUvCg9WvKHwZaQxV1H1vBH+BCy9sRNClcH pqoBLLm1DLKKji7xNHAM3jAibksgl5qMFmGpM/u4hQHvZNktlq0tAHOB1OAG3V3sUnyA ps+Zh69RaBKzjCXOW6QvBrxiy/G0+N7OSqTtMsH5LAE4+zKTbMldRhoGkjxnTtm1ekV7 xBrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JMJkVDgGkLaaHFaFL1Rgiaaubc9Mh0mpMWJokFXWXR8=; b=vyRl+EivUmAJslzn4qwODaDqq7hf/I7zKy4tkdftzJMMA6GuqZ/7TjyxYcjtxA3lAA mV7IIyrf5E78iY0DWPZuenN42uKU3Nj38fxRnfONMVV55pL8gFaAF5m1k8szZd0nk9xL T9XZyUHiv1EkayEsVUrA1s1dhs0ek/itjLU0lXlBPXaQlHZvhXnxDGQQsmW2qEncAFrj ILk9tvkZ5mjVt09NiZ8f7oDeyAUYgjR9F6+70XYzxzZOmn4EFrX6Ov1Cw5GCS+3eWohq zXEuctLJRYERkrXdz9KSW6yLEZqQ60X23aCVy0CbgOUlbLN0SwsOG3C5nmmBojm6u93v /A2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cToFJa6b; 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 a6si6987899ejp.422.2020.10.31.11.52.34; Sat, 31 Oct 2020 11:52:34 -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=cToFJa6b; 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 S1728500AbgJaSwd (ORCPT + 6 others); Sat, 31 Oct 2020 14:52:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:36186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728506AbgJaSwc (ORCPT ); Sat, 31 Oct 2020 14:52: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 D9AD52076D; Sat, 31 Oct 2020 18:52:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170351; bh=q+9qFioQStB85n5E27SelRkE1z+NinrYgWML/HvCCJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cToFJa6by7oqPN8jKK2ihTuKLDzx7PVtM3uzgcF+dnJyspjDFpH7c1H+lge6CKwU3 nMFMKlmXW/KajfonmC6cxcWVuJMv0JoGkmqJ4MfJei2XYcpLGo21BtzIi274m9mRgn 8LBnE0veLugBTlOO7I6YpEEPHuN23AMw6J7HrNAY= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Denis Ciocca Subject: [PATCH 44/46] dt-bindings:iio:st, st-sensors: txt to yaml conversion. Date: Sat, 31 Oct 2020 18:48:52 +0000 Message-Id: <20201031184854.745828-45-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron This binding document covers a very large number of different sensors. As such the existing documentation is less specific than it could be (such as which devices have 2 interrupt pin options). That can be improved later. Denis, are you happy to be listed as maintainer for this one? If not feel free to suggestion someone else. Signed-off-by: Jonathan Cameron Cc: Denis Ciocca --- .../bindings/iio/st,st-sensors.yaml | 123 ++++++++++++++++++ .../devicetree/bindings/iio/st-sensors.txt | 82 ------------ 2 files changed, 123 insertions(+), 82 deletions(-) -- 2.28.0 Acked-by: Denis Ciocca diff --git a/Documentation/devicetree/bindings/iio/st,st-sensors.yaml b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml new file mode 100644 index 000000000000..db291a9390b7 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/st,st-sensors.yaml @@ -0,0 +1,123 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/st,st-sensors.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics MEMS sensors + +description: | + Note that whilst this covers many STMicro MEMs sensors, some more complex + IMUs need their own bindings. + The STMicroelectronics sensor devices are pretty straight-forward I2C or + SPI devices, all sharing the same device tree descriptions no matter what + type of sensor it is. + +maintainers: + - Denis Ciocca + +properties: + compatible: + description: | + Some values are deprecated. + st,lis3lv02d (deprecated, use st,lis3lv02dl-accel) + st,lis302dl-spi (deprecated, use st,lis3lv02dl-accel) + enum: + # Accelerometers + - st,lis3lv02d + - st,lis302dl-spi + - st,lis3lv02dl-accel + - st,lsm303dlh-accel + - st,lsm303dlhc-accel + - st,lis3dh-accel + - st,lsm330d-accel + - st,lsm330dl-accel + - st,lsm330dlc-accel + - st,lis331dl-accel + - st,lis331dlh-accel + - st,lsm303dl-accel + - st,lsm303dlm-accel + - st,lsm330-accel + - st,lsm303agr-accel + - st,lis2dh12-accel + - st,h3lis331dl-accel + - st,lng2dm-accel + - st,lis3l02dq + - st,lis2dw12 + - st,lis3dhh + - st,lis3de + - st,lis2de12 + - st,lis2hh12 + # Gyroscopes + - st,l3g4200d-gyro + - st,lsm330d-gyro + - st,lsm330dl-gyro + - st,lsm330dlc-gyro + - st,l3gd20-gyro + - st,l3gd20h-gyro + - st,l3g4is-gyro + - st,lsm330-gyro + - st,lsm9ds0-gyro + # Magnetometers + - st,lsm303agr-magn + - st,lsm303dlh-magn + - st,lsm303dlhc-magn + - st,lsm303dlm-magn + - st,lis3mdl-magn + - st,lis2mdl + - st,lsm9ds1-magn + # Pressure sensors + - st,lps001wp-press + - st,lps25h-press + - st,lps331ap-press + - st,lps22hb-press + - st,lps33hw + - st,lps35hw + - st,lps22hh + + reg: + maxItems: 1 + + interrupts: + minItems: 1 + + vdd-supply: true + vddio-supply: true + + st,drdy-int-pin: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Some sensors have multiple possible pins via which they can provide + a data ready interrupt. This selects which one. + enum: + - 1 + - 2 + + drive-open-drain: + $ref: /schemas/types.yaml#/definitions/flag + description: | + The interrupt/data ready line will be configured as open drain, which + is useful if several sensors share the same interrupt line. + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + accelerometer@1d { + compatible = "st,lis3lv02dl-accel"; + reg = <0x1d>; + interrupt-parent = <&gpio2>; + interrupts = <18 IRQ_TYPE_EDGE_RISING>; + pinctrl-0 = <&lis3lv02dl_nhk_mode>; + pinctrl-names = "default"; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/st-sensors.txt b/Documentation/devicetree/bindings/iio/st-sensors.txt deleted file mode 100644 index 3213599c5071..000000000000 --- a/Documentation/devicetree/bindings/iio/st-sensors.txt +++ /dev/null @@ -1,82 +0,0 @@ -STMicroelectronics MEMS sensors - -The STMicroelectronics sensor devices are pretty straight-forward I2C or -SPI devices, all sharing the same device tree descriptions no matter what -type of sensor it is. - -Required properties: -- compatible: see the list of valid compatible strings below -- reg: the I2C or SPI address the device will respond to - -Optional properties: -- vdd-supply: an optional regulator that needs to be on to provide VDD - power to the sensor. -- vddio-supply: an optional regulator that needs to be on to provide the - VDD IO power to the sensor. -- st,drdy-int-pin: the pin on the package that will be used to signal - "data ready" (valid values: 1 or 2). This property is not configurable - on all sensors. -- drive-open-drain: the interrupt/data ready line will be configured - as open drain, which is useful if several sensors share the same - interrupt line. (This binding is taken from pinctrl/pinctrl-bindings.txt) - This is a boolean property. - -Sensors may also have applicable pin control settings, those use the -standard bindings from pinctrl/pinctrl-bindings.txt. - -Valid compatible strings: - -Accelerometers: -- st,lis3lv02d (deprecated, use st,lis3lv02dl-accel) -- st,lis302dl-spi (deprecated, use st,lis3lv02dl-accel) -- st,lis3lv02dl-accel -- st,lsm303dlh-accel -- st,lsm303dlhc-accel -- st,lis3dh-accel -- st,lsm330d-accel -- st,lsm330dl-accel -- st,lsm330dlc-accel -- st,lis331dl-accel -- st,lis331dlh-accel -- st,lsm303dl-accel -- st,lsm303dlm-accel -- st,lsm330-accel -- st,lsm303agr-accel -- st,lis2dh12-accel -- st,h3lis331dl-accel -- st,lng2dm-accel -- st,lis3l02dq -- st,lis2dw12 -- st,lis3dhh -- st,lis3de -- st,lis2de12 -- st,lis2hh12 - -Gyroscopes: -- st,l3g4200d-gyro -- st,lsm330d-gyro -- st,lsm330dl-gyro -- st,lsm330dlc-gyro -- st,l3gd20-gyro -- st,l3gd20h-gyro -- st,l3g4is-gyro -- st,lsm330-gyro -- st,lsm9ds0-gyro - -Magnetometers: -- st,lsm303agr-magn -- st,lsm303dlh-magn -- st,lsm303dlhc-magn -- st,lsm303dlm-magn -- st,lis3mdl-magn -- st,lis2mdl -- st,lsm9ds1-magn - -Pressure sensors: -- st,lps001wp-press -- st,lps25h-press -- st,lps331ap-press -- st,lps22hb-press -- st,lps33hw -- st,lps35hw -- st,lps22hh From patchwork Sat Oct 31 18:48: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: 314618 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,T_FUZZY_SPRM,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99087C56201 for ; Sat, 31 Oct 2020 18:52:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 63B30205ED for ; Sat, 31 Oct 2020 18:52:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170359; bh=XwPqLcNJtMME21zPbSKPcpiAuMe1PlO5Q8RRyezbGlM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=C7IhmndezroiAAcLne0EdFF0CEO6OYo04a/32IoxTOPwERtEJrkfVCsMoN23HFZhk zieStIIKbE7l0pg1eUGQsrAr9CIe3dJIOqvKiof/Eqy0zcyXZws3B8BCvury9W3VHv ToSePKwDTDG9P1ze2zX8MqKfCPesP2Nqg7EuBlT8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728518AbgJaSwi (ORCPT ); Sat, 31 Oct 2020 14:52:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:36248 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728509AbgJaSwe (ORCPT ); Sat, 31 Oct 2020 14:52: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 4D7F520659; Sat, 31 Oct 2020 18:52:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170353; bh=XwPqLcNJtMME21zPbSKPcpiAuMe1PlO5Q8RRyezbGlM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hR6lZo54IjW9aM5+Ew7FZBgkTYeTt35o5QPtcE5nnDIRmXLD1smGq5K3Ftj3vI7vb rdhV3qAy7E+xQwPUo+coz+H5/48kKn92oGMjWQ3z4rN5pJk2Sc15wyzHw4aMNfkNYH va3C8iMfERUDq81dmFUU5Mc7nHS/oU3ZigyJ8kEA= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Michael Hennerich Subject: [PATCH 45/46] dt-bindings:iio:frequency:adi, adf4350: txt to yaml format conversion. Date: Sat, 31 Oct 2020 18:48:53 +0000 Message-Id: <20201031184854.745828-46-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron This is a large but fairly simple binding. It may well be possible to constrain some of the properties more than currently done, but that would involve diving into datasheets for the supported parts. Hence for this initial conversion just use the information that was in the txt file. Signed-off-by: Jonathan Cameron Cc: Michael Hennerich --- .../bindings/iio/frequency/adf4350.txt | 86 -------- .../bindings/iio/frequency/adi,adf4350.yaml | 190 ++++++++++++++++++ 2 files changed, 190 insertions(+), 86 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/frequency/adf4350.txt b/Documentation/devicetree/bindings/iio/frequency/adf4350.txt deleted file mode 100644 index f8c181d81d2d..000000000000 --- a/Documentation/devicetree/bindings/iio/frequency/adf4350.txt +++ /dev/null @@ -1,86 +0,0 @@ -Analog Devices ADF4350/ADF4351 device driver - -Required properties: - - compatible: Should be one of - * "adi,adf4350": When using the ADF4350 device - * "adi,adf4351": When using the ADF4351 device - - reg: SPI chip select numbert for the device - - spi-max-frequency: Max SPI frequency to use (< 20000000) - - clocks: From common clock binding. Clock is phandle to clock for - ADF435x Reference Clock (CLKIN). - -Optional properties: - - gpios: GPIO Lock detect - If set with a valid phandle and GPIO number, - pll lock state is tested upon read. - - adi,channel-spacing: Channel spacing in Hz (influences MODULUS). - - adi,power-up-frequency: If set in Hz the PLL tunes to - the desired frequency on probe. - - adi,reference-div-factor: If set the driver skips dynamic calculation - and uses this default value instead. - - adi,reference-doubler-enable: Enables reference doubler. - - adi,reference-div2-enable: Enables reference divider. - - adi,phase-detector-polarity-positive-enable: Enables positive phase - detector polarity. Default = negative. - - adi,lock-detect-precision-6ns-enable: Enables 6ns lock detect precision. - Default = 10ns. - - adi,lock-detect-function-integer-n-enable: Enables lock detect - for integer-N mode. Default = factional-N mode. - - adi,charge-pump-current: Charge pump current in mA. - Default = 2500mA. - - adi,muxout-select: On chip multiplexer output selection. - Valid values for the multiplexer output are: - 0: Three-State Output (default) - 1: DVDD - 2: DGND - 3: R-Counter output - 4: N-Divider output - 5: Analog lock detect - 6: Digital lock detect - - adi,low-spur-mode-enable: Enables low spur mode. - Default = Low noise mode. - - adi,cycle-slip-reduction-enable: Enables cycle slip reduction. - - adi,charge-cancellation-enable: Enabled charge pump - charge cancellation for integer-N modes. - - adi,anti-backlash-3ns-enable: Enables 3ns antibacklash pulse width - for integer-N modes. - - adi,band-select-clock-mode-high-enable: Enables faster band - selection logic. - - adi,12bit-clk-divider: Clock divider value used when - adi,12bit-clkdiv-mode != 0 - - adi,clk-divider-mode: - Valid values for the clkdiv mode are: - 0: Clock divider off (default) - 1: Fast lock enable - 2: Phase resync enable - - adi,aux-output-enable: Enables auxiliary RF output. - - adi,aux-output-fundamental-enable: Selects fundamental VCO output on - the auxiliary RF output. Default = Output of RF dividers. - - adi,mute-till-lock-enable: Enables Mute-Till-Lock-Detect function. - - adi,output-power: Output power selection. - Valid values for the power mode are: - 0: -4dBm (default) - 1: -1dBm - 2: +2dBm - 3: +5dBm - - adi,aux-output-power: Auxiliary output power selection. - Valid values for the power mode are: - 0: -4dBm (default) - 1: -1dBm - 2: +2dBm - 3: +5dBm - - -Example: - lo_pll0_rx_adf4351: adf4351-rx-lpc@4 { - compatible = "adi,adf4351"; - reg = <4>; - spi-max-frequency = <10000000>; - clocks = <&clk0_ad9523 9>; - clock-names = "clkin"; - adi,channel-spacing = <10000>; - adi,power-up-frequency = <2400000000>; - adi,phase-detector-polarity-positive-enable; - adi,charge-pump-current = <2500>; - adi,output-power = <3>; - adi,mute-till-lock-enable; - }; diff --git a/Documentation/devicetree/bindings/iio/frequency/adi,adf4350.yaml b/Documentation/devicetree/bindings/iio/frequency/adi,adf4350.yaml new file mode 100644 index 000000000000..d7f20b8518e0 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/frequency/adi,adf4350.yaml @@ -0,0 +1,190 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/frequency/adi,adf4350.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices ADF4350/ADF4351 wideband synthesizer + +maintainers: + - Michael Hennerich + +properties: + compatible: + enum: + - adi,adf4350 + - adi,adf4351 + + reg: + maxItems: 1 + + spi-max-frequency: + maximum: 20000000 + + clocks: + maxItems: 1 + description: Clock to provide CLKIN reference clock signal. + + clock-names: + const: clkin + + gpios: + maxItems: 1 + description: Lock detect GPIO. + + adi,channel-spacing: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Channel spacing in Hz (influences MODULUS). + + adi,power-up-frequency: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + If set the PLL tunes to this frequency (in Hz) on driver probe. + + adi,reference-div-factor: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + If set the driver skips dynamic calculation and uses this default + value instead. + + adi,reference-doubler-enable: + $ref: /schemas/types.yaml#/definitions/flag + description: Enables reference doubler. + + adi,reference-div2-enable: + $ref: /schemas/types.yaml#/definitions/flag + description: Enables reference divider. + + adi,phase-detector-polarity-positive-enable: + $ref: /schemas/types.yaml#/definitions/flag + description: Enables positive phase detector polarity. Default negative. + + adi,lock-detect-precision-6ns-enable: + $ref: /schemas/types.yaml#/definitions/flag + description: Enables 6ns lock detect precision. Default = 10ns. + + adi,lock-detect-function-integer-n-enable: + $ref: /schemas/types.yaml#/definitions/flag + description: + Enables lock detect for integer-N mode. Default = factional-N mode. + + adi,charge-pump-current: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Charge pump current in mA. Default = 2500mA. + + adi,muxout-select: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 6 + description: | + On chip multiplexer output selection. + Valid values for the multiplexer output are: + 0: Three-State Output (default) + 1: DVDD + 2: DGND + 3: R-Counter output + 4: N-Divider output + 5: Analog lock detect + 6: Digital lock detect + + adi,low-spur-mode-enable: + $ref: /schemas/types.yaml#/definitions/flag + description: Enables low spur mode. Default = Low noise mode. + + adi,cycle-slip-reduction-enable: + $ref: /schemas/types.yaml#/definitions/flag + description: Enables cycle slip reduction. + + adi,charge-cancellation-enable: + $ref: /schemas/types.yaml#/definitions/flag + description: + Enabled charge pump charge cancellation for integer-N modes. + + adi,anti-backlash-3ns-enable: + $ref: /schemas/types.yaml#/definitions/flag + description: + Enables 3ns antibacklash pulse width for integer-N modes. + + adi,band-select-clock-mode-high-enable: + $ref: /schemas/types.yaml#/definitions/flag + description: Enables faster band selection logic. + + adi,12bit-clk-divider: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Clock divider value used when adi,12bit-clkdiv-mode != 0 + + adi,clk-divider-mode: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1, 2] + description: | + Valid values for the clkdiv mode are: + 0: Clock divider off (default) + 1: Fast lock enable + 2: Phase resync enable + + adi,aux-output-enable: + $ref: /schemas/types.yaml#/definitions/flag + description: Enables auxiliary RF output. + + adi,aux-output-fundamental-enable: + $ref: /schemas/types.yaml#/definitions/flag + description: | + Selects fundamental VCO output on the auxiliary RF output. + Default = Output of RF dividers. + + adi,mute-till-lock-enable: + $ref: /schemas/types.yaml#/definitions/flag + description: Enables Mute-Till-Lock-Detect function. + + adi,output-power: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1, 2, 3] + description: | + Output power selection. + Valid values for the power mode are: + 0: -4dBm (default) + 1: -1dBm + 2: +2dBm + 3: +5dBm + + adi,aux-output-power: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1, 2, 3] + description: | + Auxiliary output power selection. + Valid values for the power mode are: + 0: -4dBm (default) + 1: -1dBm + 2: +2dBm + 3: +5dBm + +additionalProperties: false + +required: + - compatible + - reg + - clocks + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + pll@4 { + compatible = "adi,adf4351"; + reg = <4>; + spi-max-frequency = <10000000>; + clocks = <&clk0_ad9523 9>; + clock-names = "clkin"; + adi,channel-spacing = <10000>; + adi,power-up-frequency = <2400000000>; + adi,phase-detector-polarity-positive-enable; + adi,charge-pump-current = <2500>; + adi,output-power = <3>; + adi,mute-till-lock-enable; + }; + }; +... From patchwork Sat Oct 31 18:48: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: 320166 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2451903ilc; Sat, 31 Oct 2020 11:52:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzluDskVCbJ+vIdILWGg2OfJ7TttN6RZqrS3LabNdFZTCtWmS9INMCvQM2gpNAsUntMs0g3 X-Received: by 2002:a17:906:a195:: with SMTP id s21mr7845619ejy.146.1604170358176; Sat, 31 Oct 2020 11:52:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604170358; cv=none; d=google.com; s=arc-20160816; b=mWWMqQK/geEb/n3pvhGw4ThF2HyhzkMRiDfxnQOiyfuexg0Q1PFbwN0mlKFLJzL98P r0UWMw6RYxIo0V770HzEtX/+gGedV4nlHq/pTfTBNMBXvP0pKltzG2txunDDX74Xz/h5 uDT+zQeo9bQBh8r9D/XYTm/2PD9rDhRdVkwuitALDu63SwsQwYce02SjEwoXjQ5lc6wA eye0Y4R+CPft20gUkzxhilSnJ1xZ5y43/7BmchlBnMw//a9jwZo30LCF6Ud0oKPFDxfr jJn0u93VptNcsvyoNG3CLNEUlf063ptXkWX4RtICCXIaAFfZ6Q7XFdhi9m0UIiI6dduL EwXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RCEYkTQ8cSrrmsWCml62n+kKNPU8KKpax9fK/4vq9wc=; b=f7qwQmUBqg6cX+fN1MeMQuDtIm0fEK6jjQy5l9OEsbYukTwjCeIImHJ/dEyMUWezI6 LcoCCYbCRVSmHuCxxQCDlJPhxdpoV/OlpP6yY/feUE5U+N+o4KXIRYyb1OuN4uSJJt49 68ERMf/iiIdb5crgmFzDskqb9wa0lWTv8kk0x4kEXxsP41PpEkOmOvQz/mH56WbPZPf2 Woc7m3FVVLyxWlUsdwIQWYrVUQvxNi5vBE2lo879Xt3N4357qKAqXvBafGtThXPtPego zJBHqBhdLvhN/SQAAa+8BTigeJP+D0Np5cdN7dvHQrX/bMtdJb/xk9S5cCkq5q20VfJF zTNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jE4VO6NI; 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 a6si6987899ejp.422.2020.10.31.11.52.38; Sat, 31 Oct 2020 11:52:38 -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=jE4VO6NI; 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 S1728514AbgJaSwf (ORCPT + 6 others); Sat, 31 Oct 2020 14:52:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:36300 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728510AbgJaSwf (ORCPT ); Sat, 31 Oct 2020 14:52:35 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B65CD2072C; Sat, 31 Oct 2020 18:52:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604170354; bh=MELyhTcu0o8qVgu/wSpV74BV8KVA1g7r1Xgta+7Lbiw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jE4VO6NIbSr9atTl1qjUojZJA50LJkssDkEyDGbeuUe4tE5jokZ8xCFGEd336GhV6 6JMliLNNUL8/KNpPCzAgcKKpnmn0dWrSqtqPnsuQVutcCBcFuTRHTUufogm7Qy4bNB YfoTATWr2DFkzNG4ao6q9vG8C71NGB6cAbHQMcZI= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Patrick Havelange Subject: [PATCH 46/46] dt-bindings:iio:temperature: Drop generic binding file. Date: Sat, 31 Oct 2020 18:48:54 +0000 Message-Id: <20201031184854.745828-47-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031184854.745828-1-jic23@kernel.org> References: <20201031184854.745828-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron So far, the thermocouple-type property described in here is only used in a single driver. Whilst I would like it to be more generally used that hasn't happened yet and I don't see a reason to maintain this small file in the hope that it happens. I pushed for this generic binding in the first place. Hopefully we can bring it back at somepoint. Signed-off-by: Jonathan Cameron Cc: Patrick Havelange --- .../bindings/iio/temperature/temperature-bindings.txt | 7 ------- 1 file changed, 7 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/temperature/temperature-bindings.txt b/Documentation/devicetree/bindings/iio/temperature/temperature-bindings.txt deleted file mode 100644 index 8f339cab74ae..000000000000 --- a/Documentation/devicetree/bindings/iio/temperature/temperature-bindings.txt +++ /dev/null @@ -1,7 +0,0 @@ -If the temperature sensor device can be configured to use some specific -thermocouple type, you can use the defined types provided in the file -"include/dt-bindings/iio/temperature/thermocouple.h". - -Property: -thermocouple-type: A single cell representing the type of the thermocouple - used by the device.