From patchwork Sun Nov 15 21:26:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 324369 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp2856771ils; Sun, 15 Nov 2020 13:26:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJwYpeTqzUrFKOZLbkxBOMpl8X+rr7fpS1yRDcGRI8pgKYLlX3P7KQeuK2eL4mgoS1UOfIzN X-Received: by 2002:a05:6402:229a:: with SMTP id cw26mr13428941edb.271.1605475599108; Sun, 15 Nov 2020 13:26:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605475599; cv=none; d=google.com; s=arc-20160816; b=xsbqLt4lGHFMZv77PYBHMLiJcfi7Ip3pEZ2QIWQ3w15412X3ePJEbClBmqlw1Ee5al /F4tni3nvkxdb2FHEbzf+QrzuBdYIe0eTkp2YWLQfTAk3sKhwTRWsLMKZ5JaE4gFJxnp Vx8I6w3xh+f7YVqeXkWirdnE16dxd5aHrvIKRrAjej6PUCfKvT+zuKCj9uWUefwqbcqO rzqp8Oj9+SRZ1pE280P0sZO1NhQO/HYkyWRbtRQ2sd3iCFEfO17WQ/od/KsfSz3baeC4 3npJbrU3CLwFLG+uFMqiz6gSgeTpP55Ukw2AzWOpy7jbBRK5LcwBjH43FNZhkXyTss6T 8DOw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=kNRQyWFC1luLFZtivM+492qWfKb/Alm/CyFKDv0IwIk=; b=MVAi7FPKgRlg3t2+SVpHSBHDzi6c1HzlQ4cl3Yo3QQLtYy9eL0Z9fHX6VvRt0KUFDv I8yRaRhkR2PuMuqE1E/+Q+McuXr5x0VSKJ90niP+5N+cqDCDb/5eulpvl1g6TqJXjLJN 4cFaYsvreaeyvgvIbZP2bRkFtzGbjluD9NaprKcgsWrSmWzWCWk3kjcqSW74ETsbVmYb wViEWiy2wJYTPyP9LNKtdcSrKaqEjOVEkVjucvtGb058bXJxTnXfmycvvMf4UWESAurP q2E9KU4ycWcLgewG5iF39VCMpqUvsdxe33ryYXyHwBbNcpx6cIdJMDEjtfERxmVRLcYO 5+fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qptWnQmU; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi26si12583420edb.553.2020.11.15.13.26.38; Sun, 15 Nov 2020 13:26:39 -0800 (PST) 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=@linaro.org header.s=google header.b=qptWnQmU; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727531AbgKOV0i (ORCPT + 6 others); Sun, 15 Nov 2020 16:26:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727425AbgKOV0h (ORCPT ); Sun, 15 Nov 2020 16:26:37 -0500 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 530B4C0613D1 for ; Sun, 15 Nov 2020 13:26:37 -0800 (PST) Received: by mail-lf1-x142.google.com with SMTP id d17so22324912lfq.10 for ; Sun, 15 Nov 2020 13:26:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kNRQyWFC1luLFZtivM+492qWfKb/Alm/CyFKDv0IwIk=; b=qptWnQmU4BdfqZIMN1EBPAGW03FyLftg+ifITV0ESGN4n7AhriRM1w1TVgtPR0lR05 afpqmLFLJ8G14NcBgWEm5oe7vTPpMyB3UVMZOlet2IFOPOtdsak5Kn7gOlvSgPw1UNyo dUhjlc4R80cfYiZYP1RgLWHQHmRgtwdrh+hqIEBESkC9BEv4jxVbPKtukwDXJo6SOCEH UUTULfWZPglNqugPlDN7Cq5ctClZsQylncu+FwMHCTSIgam27SgxSD3TETzNFko3x2o/ b9D3R/NMrnJnzpwc5juP5wNv0lZXRWw2BHdpfRdOB8UvU0RIaT4H06H3uiUOWEnb/9LT 0hqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kNRQyWFC1luLFZtivM+492qWfKb/Alm/CyFKDv0IwIk=; b=lHTl9rUXIiMqg9+FNrE3ebwPSZdd7mike7h92Ac85AE/mSmQbTf7vXMPw6R5jYI0P0 Ea2truDk98TeDgipzebNvnp3AqJ6v4b2DvQPyU5xDDi0otX0KkdUJk1wQ8JEfAeguy1Z wV4wEy0b4W7mBBeX8viaSHNfMmEvUQ51ce4Jw3ajt+pTUbY9IzxZwTkiKWUdCzXAqece yA+krBD7aQ6PYSywkUZjyhVOfoib7iu7FcSZOjEpc9EAQK5CU/SkFyokzEcemQX30rKN BijxvtF01YIjc9KaXjYRx+g7Zi7NthJLjmapKPln2QH4tkZszLUSM9FkxHO/9yW0hmRl g+Zg== X-Gm-Message-State: AOAM532zcOtJrt2RQT5pV6cQjv+P5iXIBcYdbo0L2jIlO6mIUDkt9Sqa s5/jvRtSEevEfWAsDnewXP0O7g== X-Received: by 2002:ac2:490f:: with SMTP id n15mr4654541lfi.158.1605475595659; Sun, 15 Nov 2020 13:26:35 -0800 (PST) Received: from localhost.bredbandsbolaget (c-92d7225c.014-348-6c756e10.bbcust.telenor.se. [92.34.215.146]) by smtp.gmail.com with ESMTPSA id p204sm2482178lfa.168.2020.11.15.13.26.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Nov 2020 13:26:34 -0800 (PST) From: Linus Walleij To: Jonathan Cameron , linux-iio@vger.kernel.org Cc: Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Linus Walleij , devicetree@vger.kernel.org, phone-devel@vger.kernel.org Subject: [PATCH] iio: accel: yamaha-yas: Add DT bindings Date: Sun, 15 Nov 2020 22:26:33 +0100 Message-Id: <20201115212633.626241-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds device tree bindings for the Yamaha YAS5xx magnetometers/compass sensors. Cc: devicetree@vger.kernel.org Cc: phone-devel@vger.kernel.org Signed-off-by: Linus Walleij --- I am still working on the actual driver for the magnetometer but why not send out the DT bindings for review, the hardware variants are easy to describe. --- .../bindings/iio/magnetometer/yamaha,yas.yaml | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/yamaha,yas.yaml -- 2.26.2 diff --git a/Documentation/devicetree/bindings/iio/magnetometer/yamaha,yas.yaml b/Documentation/devicetree/bindings/iio/magnetometer/yamaha,yas.yaml new file mode 100644 index 000000000000..6fc4cfe4a417 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/magnetometer/yamaha,yas.yaml @@ -0,0 +1,80 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/magnetometer/yamaha,yas.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Yamaha YAS5xx magnetometer sensors + +maintainers: + - Linus Walleij + +description: + The Yamaha YAS5xx magnetometers is a line of 3-axis magnetometers + first introduced by Yamaha in 2006 with the YAS529. Over the years + this magnetometer has been minatyrized and appeared in a number of + different variants. + +properties: + compatible: + oneOf: + - enum: + - yamaha,yas529 + - yamaha,yas530 + - yamaha,yas532 + - yamaha,yas533 + - yamaha,yas535 + - yamaha,yas536 + - yamaha,yas537 + - yamaha,yas539 + + reg: + maxItems: 1 + + reset-gpios: + maxItems: 1 + description: The YAS5xx sensors has a RSTN pin used to reset + the logic inside the sensor. This GPIO line should connect + to that pin and be marked as GPIO_ACTIVE_LOW. + + interrupts: + maxItems: 1 + description: Interrupt for INT pin for variants that support + interrupt generation. This polarity, whether the interrupt + is active on the rising or the falling edge, is configurable + in the hardware. + + vdd-supply: + description: An optional regulator providing core power supply + on the VDD pin, typically 1.8 V or 3.0 V. + + iovdd-supply: + description: An optional regulator providing I/O power supply + for the I2C interface on the IOVDD pin, typically 1.8 V. + This is not present on all variants of the component, some + have only the VDD voltage. + + mount-matrix: + description: An optional 3x3 mounting rotation matrix. + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + magnetometer@2e { + compatible = "yamaha,yas530"; + reg = <0x2e>; + vdd-supply = <&ldo1_reg>; + iovdd-supply = <&ldo2_reg>; + reset-gpios = <&gpio6 12 GPIO_ACTIVE_LOW>; + }; + };