From patchwork Tue Nov 17 12:18:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 324580 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp4119471ils; Tue, 17 Nov 2020 04:18:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJwiv4IKMl6VulYC5R/41jlz2rhleY6hgx6tEku8P3gw33BSfyaXOb41RVLJoChAMtfyJDz1 X-Received: by 2002:a17:906:1614:: with SMTP id m20mr18804025ejd.258.1605615496334; Tue, 17 Nov 2020 04:18:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605615496; cv=none; d=google.com; s=arc-20160816; b=AvMosoF4bQIua1Ub03tj1nWLDJ3UIa4Y30+Ej/K8r984JqxCOLffz+l29oO9AoMsi2 2Mzlnj1Fbc9Jxh4ntgt2+iGAOSodrWJYhZ0k9H8KT3jhrCZsCeyJY9fKqb5n5tQ5oJZh aoVc0+H9wA7V9KQJdJdLNVMWbJFdKTvTOUzsJ6WP/uiBBU7AvOmvizy3W19hDQiaODwo hqm8/suYnS5qqXYTfsvrfGOuH/5bmJXebu6DFQ0ZUCNzBe5AqO2+hBcm4b8VC4FxyX88 2rViphTaKJsfzjbupqLNxKt5cl9cmJVf3Nx7WbIdslSn6jSFRhWJj6MlzxTger9qWLMT fa0Q== 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=DAZbZSxcI71M0LVfy83Qq3cXSi4UOJMbtQEtUu1ICRM=; b=mhcENmXkc5UQSyDirmE3WC4tjZnEjuxLK5Bt8VWN5kYdXGeWQwALqXFo8CuoEdVj47 x11dPne+B4XBdJysWQjNI9SfsAdnOLu/mda10NlC+1IUA2z6bw44W01O90jXCQfXvQ0Q ITGvPM5UOSgiQj81W7HCAPy3w86xQMZVW3Cih3jv4mYDm95GQ488CDC7gu1ZLQ0U+1fz G7WduLp09as+bOaHiF/ezY//v+qzDSFV2RR6szen4zehKeWxQwsSROnxn4dizboG4qRg o/+fgvB9UnWq5e2by6f7Ylz8/nmcDniljCysra2BLy4MImaehi/AOJKKzXhycFB12ZBF bSGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="a/OvA6+h"; 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 r23si14021281eds.96.2020.11.17.04.18.16; Tue, 17 Nov 2020 04:18:16 -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="a/OvA6+h"; 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 S1726536AbgKQMSP (ORCPT + 6 others); Tue, 17 Nov 2020 07:18:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725355AbgKQMSP (ORCPT ); Tue, 17 Nov 2020 07:18:15 -0500 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE4BCC0617A7 for ; Tue, 17 Nov 2020 04:18:14 -0800 (PST) Received: by mail-lj1-x22f.google.com with SMTP id r17so23993256ljg.5 for ; Tue, 17 Nov 2020 04:18:14 -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=DAZbZSxcI71M0LVfy83Qq3cXSi4UOJMbtQEtUu1ICRM=; b=a/OvA6+hoEi29hwk3HyX2fSLzesinExvg2iQ/BKLYFn4Cu9I6THdyqY0Ctr9qRvf/y 2zEgpAhH53lMWZj5qslla8oHnNtbyAo2PLjBUqD/i2FaYOuVKbxinK0QLZYcDE61B/We 1ek/ZP4VdUeCGS8CurzeWoL/v537JFTM4psogQPCy2VqvwPs7fpyXvL2IEv8y/NHUB9J t9+j0T3DtBxAyMO6b6appok9bYGDKBvY2QDelSJZLljnoDbHXQMccheQ2/FtruogT61l U66XS/NgyfcnxJ4jFPqi/3vYDzqVJFdnFU8WOLxxYm5/CF+m4WjGr3gIcut+YfD3qId8 7dtw== 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=DAZbZSxcI71M0LVfy83Qq3cXSi4UOJMbtQEtUu1ICRM=; b=ObywiGFA3/ujK5l63W06TCdYcYI0a9YGAt9CwvrDumG7YI9Fw6gXUGzxVdNXs7E/y/ AoprIu2XStut9ac0o1IcIEAh6tpEUuPoxqIsryHw0pBHcSyz83oQcSauk3u+8HZ9+BlG 4NRAvWMZBgeOoiS2XB2ZWc6YF6ikIMrmZWyy3wPneKPyuY3QkIf/5dkk57tgvJZzLpVZ 8pyv048ol5H3vlAei2UfEnLc+6Pnwsv1YYsunbKYGiXAPEUnoa7XHiWpu3F4RmZnnpyg iMAxKK2js3uWUIJvLJRe/+KJrplP55t8iQvjYpTBbJIl5KzmCKMDi/BBBPzETO+pcexV UZKw== X-Gm-Message-State: AOAM531Ic5k72IcRjSC1osqloPzz8X66VeXU85E94F0zG8oM3LYhYijn S/tiaKsMdOndB4QzncJ1WuGh8w== X-Received: by 2002:a2e:a312:: with SMTP id l18mr1787582lje.231.1605615492979; Tue, 17 Nov 2020 04:18:12 -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 f25sm3116380lfc.234.2020.11.17.04.18.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Nov 2020 04:18:12 -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 v2] iio: accel: yamaha-yas: Add DT bindings Date: Tue, 17 Nov 2020 13:18:10 +0100 Message-Id: <20201117121810.830743-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 --- ChangeLog v1->v2: - Add Yamaha to the vendor list, I was surprised to find they were not yet listed. 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. This makes it possibe for people to include these magnetometers in device trees. --- .../bindings/iio/magnetometer/yamaha,yas.yaml | 80 +++++++++++++++++++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + 2 files changed, 82 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>; + }; + }; diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 2735be1a8470..0340674c72bd 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -1210,6 +1210,8 @@ patternProperties: description: Shenzhen Xunlong Software CO.,Limited "^xylon,.*": description: Xylon + "^yamaha,.*": + description: Yamaha Corporation "^ylm,.*": description: Shenzhen Yangliming Electronic Technology Co., Ltd. "^yna,.*":