From patchwork Thu Feb 22 01:13:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 204512 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp1397570dyc; Wed, 21 Feb 2024 17:15:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWDugn7MCD40i7EbQXeGM5cfOP+jggY8W6Etdx3kATkb62onRDjRpfU7n9Mgrxesl3TFyS94SIE3r87+iawZTy5/F4EYQ== X-Google-Smtp-Source: AGHT+IEKcwpvP3dt4QmJdsC8E6qeaq07El4PxLZfd0Dv2LiEM9J1bf6D8o0RyncLj0xgE5zVFKcn X-Received: by 2002:aa7:cfda:0:b0:564:f9f3:801c with SMTP id r26-20020aa7cfda000000b00564f9f3801cmr1970103edy.33.1708564500044; Wed, 21 Feb 2024 17:15:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708564500; cv=pass; d=google.com; s=arc-20160816; b=Mx6NKB9oPHYUP8fuFjqk+NrjcbpLUCsLO6zKeLN4zK0JaRZe49lz/Zwx0FQHybebkX GrUE36zRtpq4xZKiR0bD9IS9tpiR4XvFKXoMt9Dqq0i+mdM73gncWSAG+/VygcKesFPd MdCIicuUPEyh8Kgy/lfpl/Rw7w03xaR6jSMkRAT/TcuubLaqcSMUaxEP9rZxFbbIXXU/ VwMKVTj9/tqbgzPAajLK1CKogibLFGkOG9RRSJRbb3OlBB7m0G4bQUBsiigZK8FIFl/J vVcmJ8aDZEegWYul02/EtT1J1ggyQi6Fb6Bsf8UZpYyCQVO1T8FnZ/1XO40hDshkvIv9 I8uA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=gZsthg0LUjyLfISZmU8raagqBQjcgBxhBYsrULLV5rE=; fh=eOEhqu8RGVogOLzzClkFVU6mYPrDqiSEylXC0P+XAIc=; b=DpT6atrO6uCMzJlU8gd1S0IGjdc8T5gyoWOeAOTUB0vg+6iCB4/ncciz4s6uCsYyHR bdNJPhQ29kUiYQ+PlEBS3oO1SLft8LGcGr3Jm1WQZmAO/ZoXO2BKPM+fssz0OHn50K4B q6zq61AGVOFR8J/la48Iz9qluonSwV2JO/aP37a+i1gB0xqxFrgcze7Qt12CxP5OnyEH J3zw7n+VsjzykHO5O0fUsAReeH0ZwynOqpip1XF8rEOfawRXdSLpib66BZXkFzJh3v7U 2v1KC0onNH28Kzjl3J1LbMBYS2tFJN4i8O4h82PpCDMxLczQhLCJb/m6/s5FizKjTFHy gQOQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=dhMGQMOA; arc=pass (i=1 spf=pass spfdomain=xff.cz dkim=pass dkdomain=xff.cz dmarc=pass fromdomain=xff.cz); spf=pass (google.com: domain of linux-kernel+bounces-75756-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75756-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id d8-20020a056402400800b005643f110e4esi4146950eda.202.2024.02.21.17.14.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 17:15:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75756-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=dhMGQMOA; arc=pass (i=1 spf=pass spfdomain=xff.cz dkim=pass dkdomain=xff.cz dmarc=pass fromdomain=xff.cz); spf=pass (google.com: domain of linux-kernel+bounces-75756-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75756-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A95EA1F225F6 for ; Thu, 22 Feb 2024 01:14:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3978F1799F; Thu, 22 Feb 2024 01:13:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b="dhMGQMOA" Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0FCB8111AC; Thu, 22 Feb 2024 01:13:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.181.215.36 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708564435; cv=none; b=ckoDNbDvClBshKxqQ0rC6ySpd5H2ytpJiBF6KqG75eM81wpBO0NQEE2KewfmHWgsXrPasKxCYyHPiy38oJP0MKm2UT4mSraWHy8aEpLbUPsJmVkTXLRAb69Gzuu8Mswm0vE5kaIdEy0ayUvfAI6pX+3O+j8Ql25v8uZnf/XFxRs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708564435; c=relaxed/simple; bh=MzFWAiynKIMfBbcmFyJFSn3s5kPBd8miZrCSWWhxnWw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dmuQFeOuikvbfYXgUWRfPUOc1pdP/tfiDYug/L7bjyX9c9h5iQ1mlNlT+Bokj6GvAgZ9X0zJ2i0F96fG26JVLKdjPrvKpobTWgF7gvjDrhFLHTufeAP/Esczi5kaJZe345k2R4I7ZUb5c1MwUpIpqp4uUDr4+cye/FeTR9WNH6Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=xff.cz; spf=pass smtp.mailfrom=xff.cz; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b=dhMGQMOA; arc=none smtp.client-ip=195.181.215.36 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=xff.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xff.cz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xff.cz; s=mail; t=1708564424; bh=MzFWAiynKIMfBbcmFyJFSn3s5kPBd8miZrCSWWhxnWw=; h=From:To:Cc:Subject:Date:References:From; b=dhMGQMOA2FK4mh9vjgz7pkGx2PXSrLmgK+AC0RpdVMO828BaO9KvHWSw1n8BiBUmW JaNsidtFsjm6d+LHuPVGWd2piXWtdIs8h7Uhmt22m4tl+VnNWQpat+zk6KgtkEi14G KZLU1f7zbVbLLbbE852xq3eOnzczOExM/O302bDM= From: =?utf-8?q?Ond=C5=99ej_Jirman?= To: linux-kernel@vger.kernel.org, Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrey Skvortsov Cc: Icenowy Zheng , Dalton Durst , Shoji Keita , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, =?utf-8?q?Ond=C5=99ej_Jirman?= , Conor Dooley Subject: [PATCH v4 2/4] dt-bindings: iio: magnetometer: Add Voltafield AF8133J Date: Thu, 22 Feb 2024 02:13:36 +0100 Message-ID: <20240222011341.3232645-3-megi@xff.cz> In-Reply-To: <20240222011341.3232645-1-megi@xff.cz> References: <20240222011341.3232645-1-megi@xff.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791559729404917940 X-GMAIL-MSGID: 1791559729404917940 From: Icenowy Zheng Voltafield AF8133J is a simple magnetometer sensor produced by Voltafield Technology Corp, with dual power supplies (one for core and one for I/O) and active-low reset pin. The sensor has configurable range 1.2 - 2.2 mT and a software controlled standby mode. Add a device tree binding for it. Signed-off-by: Icenowy Zheng Signed-off-by: Ondřej Jirman Reviewed-by: Conor Dooley --- .../iio/magnetometer/voltafield,af8133j.yaml | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/voltafield,af8133j.yaml diff --git a/Documentation/devicetree/bindings/iio/magnetometer/voltafield,af8133j.yaml b/Documentation/devicetree/bindings/iio/magnetometer/voltafield,af8133j.yaml new file mode 100644 index 000000000000..b6ab01a6914a --- /dev/null +++ b/Documentation/devicetree/bindings/iio/magnetometer/voltafield,af8133j.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/magnetometer/voltafield,af8133j.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Voltafield AF8133J magnetometer sensor + +maintainers: + - Ondřej Jirman + +properties: + compatible: + const: voltafield,af8133j + + reg: + maxItems: 1 + + reset-gpios: + description: + A signal for active low reset input of the sensor. (optional; if not + used, software reset over I2C will be used instead) + + avdd-supply: + description: + A regulator that provides AVDD power (Working power, usually 3.3V) to + the sensor. + + dvdd-supply: + description: + A regulator that provides DVDD power (Digital IO power, 1.8V - AVDD) + to the sensor. + + mount-matrix: + description: An optional 3x3 mounting rotation matrix. + +required: + - compatible + - reg + - avdd-supply + - dvdd-supply + +additionalProperties: false + +examples: + - | + #include + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + magnetometer@1c { + compatible = "voltafield,af8133j"; + reg = <0x1c>; + avdd-supply = <®_dldo1>; + dvdd-supply = <®_dldo1>; + reset-gpios = <&pio 1 1 GPIO_ACTIVE_LOW>; + }; + };