From patchwork Fri Feb 16 18:50:00 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: 202324 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp717041dyb; Fri, 16 Feb 2024 10:51:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXOdqo4kEMqrSBmaqSzViE4W0LeAujfAZLkvSUjXZ4t5kLQfCBpisQd1caudG2BABlUIku+NOrRuvj+WErT9FZmAmeDvA== X-Google-Smtp-Source: AGHT+IHAYSFYqS5arGx6z2dm4SFkPmpZUINLHRYJHbITq2FFoG4gO0C+iXtCwThcY4iC/vElfaNf X-Received: by 2002:ac8:5994:0:b0:42d:c742:3652 with SMTP id e20-20020ac85994000000b0042dc7423652mr7822310qte.30.1708109497262; Fri, 16 Feb 2024 10:51:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708109497; cv=pass; d=google.com; s=arc-20160816; b=JSAKFFRScP7/bFrhZO7XHC3CDJ7xD0ElB/9XAmUPLU7S6bxe7qzQ+7xDFhyTXCo/oZ 5k6oUzji/4bfKnzQdRv6FLzXSBdObJvjmSPTL/4OCxF/TNiNeDVQB0ZFwlL7DE8fswuv A3IgehnK5pWjC/BskK1CV3iSHcHVq5/B+/lqP1HLhiM0jJ8Ze1F5Shra4Au8YagmNZxv FJ17+q4DTJWsMgP2/AL0ItCAGiBx8wOVUhbuXuQpPoCoPivMWBqamKWBz9qTnnT3FFKp AP56kpjrpm7ENr/AP4bTYUXme1yQUf5AFqMZoiG1Rh8AqcNsHZ36w/dfn8sRS2d3rk// 5NvA== 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=zHwNYHO6VgPzYuzf1LgzanCXD3ZVvxcYnm0QJLg6r0E=; b=A4rBmoPTlTR9UujPmrIGZLE5vuIbq/myxEgwgeKM7ZzajUQwVBY6Ipg3qLfYcdulWt PxQH/8val1iPEXOolomHOw9+xla2BC75rrZyv0Et74I2l7FlwiPGH0k0hI29Czyzniw3 UWET++8/1UJ2f+maOvQvhez3z+PRo0wFdRTcDnNtuU4D/w5TSNm5bgo7fNXFYw8sbMaB y9YOJBqgcKZjCYRRa25lD+n0FKViBYDaJkh2w6/MoyzWuED0Y0y3bTNwxRb56x27QXwz 7y8TEbWGJha4XC2rW/6bUwHVGS8q+LXp8FGPwZyTD7c194W3+V1/83x3Ee9rRk/TyDIx 2WGA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=QN4IOHq7; 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-69208-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69208-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id i18-20020ac85e52000000b0042c7d02bf1esi495212qtx.161.2024.02.16.10.51.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 10:51:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69208-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=QN4IOHq7; 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-69208-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69208-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9BB991C236FF for ; Fri, 16 Feb 2024 18:51:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 507C11419A1; Fri, 16 Feb 2024 18:50:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b="QN4IOHq7" 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 6DF121339B1; Fri, 16 Feb 2024 18:50:18 +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=1708109422; cv=none; b=WXAoS4JymXo1vtbfchtUeRDpN1fpZ9Tbqi6uu6xCo4f6Mn6LELdY7Uy9uqzLDMewbpOll56+A/zEKYL9nKJH0DstAvat3q9rD44Ifz4VQhKyIU5k/gALfcMr6aBu7C2VzSjD+DpNK3JOFnnoLdcKKN+PHvUqcjrcPKIPJ0i2ep8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708109422; c=relaxed/simple; bh=MzFWAiynKIMfBbcmFyJFSn3s5kPBd8miZrCSWWhxnWw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=O6DwL2KuEhgWfI9ZdfQCk40S1au0GhxjHJQPJvdAQtmEMXFTnZy+lBY6T5HfQiEUjaS/KHr4Av0UBQvMp2XIfojUOCVG5RlNsY+ca8w1hkB7+6U97UaGOUgmG/6pbhN9t7KDBGqQWJPkb882HoBe+VnbSb2Ajn7jWmUw6zDDdes= 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=QN4IOHq7; 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=1708109416; bh=MzFWAiynKIMfBbcmFyJFSn3s5kPBd8miZrCSWWhxnWw=; h=From:To:Cc:Subject:Date:References:From; b=QN4IOHq7BlavFvAkl+8X+T0McgyiMLgH9xVxteDKFHXdf1rY9BA3lOF72pfWweGN2 oS3uNWJkohj802NTT10VZuaRT6SckI6gj+evmsE7TqL+wFtQT+yH/yIbyLzgabinOX b5a+zYKmQcch11L2NwB2q91OsOEtQZ8WsGLl2vdY= From: =?utf-8?q?Ond=C5=99ej_Jirman?= To: 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, linux-kernel@vger.kernel.org, =?utf-8?q?Ond?= =?utf-8?q?=C5=99ej_Jirman?= , Conor Dooley Subject: [PATCH v3 2/4] dt-bindings: iio: magnetometer: Add Voltafield AF8133J Date: Fri, 16 Feb 2024 19:50:00 +0100 Message-ID: <20240216185008.1370618-3-megi@xff.cz> In-Reply-To: <20240216185008.1370618-1-megi@xff.cz> References: <20240216185008.1370618-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: 1791082623884470606 X-GMAIL-MSGID: 1791082623884470606 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>; + }; + };