From patchwork Mon Feb 12 17:53:54 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: 199980 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp93906dyb; Mon, 12 Feb 2024 10:26:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUiROn7dsRqdQ+ZDr6ZIZn4oO+LF3zzHRjOdUVtrctkNEsT2bDEGqk2p2p4p6ZBTKdBZ1jTRTmbPSi8tMZHuuBXlPEMFQ== X-Google-Smtp-Source: AGHT+IFCxOY8jAq53JpFJGpcYFL6HeYwUzRh2ayhTKsW+pSJmqvfUS5dBN0g8k5SsDMlETwK120t X-Received: by 2002:a17:903:489:b0:1d9:751f:3746 with SMTP id jj9-20020a170903048900b001d9751f3746mr6473347plb.49.1707762396019; Mon, 12 Feb 2024 10:26:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707762396; cv=pass; d=google.com; s=arc-20160816; b=MGdeHSZPS02x469kcG0WPSKxvXMFfGFjyZ0T1ueEMWTTarQpnYkmL550Vhk+Xox7H3 jMcB5/J9o5qnoR+XQimM8RuI/yaH+0ZoburFjTi30JNGXPL+QL8Ho0/9v7sWFMFMPF4F l/OIUnwnV5j1ZqyiiGSEGbEDvtJP/ZuS+FvrVRjbS5l7vBf5M94FklPmWwzCoAtJAz6I dS82Rl9UAlPu4Lk75wAtu2OGbPd+xQ7TEha1PRkjZJrGWp7xM8kHbgweBO8lNZ1ztjBc sCrqWcNjr/PzXr8GkjAyd7TcUayYrC94HhH1fcehl3b+ZvfLnjymZzMovOSJg2qsK00N DAYA== 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=5T7EhmOku2KKpjHHLouL2eWIz2MSP0Su4QqpE2iLans=; fh=0pdE9TOMGc1yTf+fll7vWKhTw+iX+zwpZkeXheKjjqw=; b=vLyIe2qEFtdbJQQsu4kLQ+12VK1ZmB0KOwAMesbR0jbqrrMx5WWP7786IsEmlEZDiI nCuWdWAU+ue0g5mZjfIZuP7cVLEIb/cNcUZjYjidu4K9rUcBN6RSx9NFuoFSS5vnns1q qX7SFh7QwbGJGDNk99ffuf/87kdd/m7Y9W2TAvbqCHdVvrN+tivyWAVmZiiIQ4GIumBw DPxVC7HOkp+eYe534bj+YpgnzscOF8d9cEyObz2CzHYeHZpPuLP+FX8eo0U6uNvuWhvP 8f927dazrYnUrMxdLrjuGDjxXzlkWRhmpUo433sASxsb08jYAWfNqi+hCnCPbtjj/VjJ Rdcw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=xnSouA+T; 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-62151-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62151-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz X-Forwarded-Encrypted: i=2; AJvYcCW9tGkeZQ/5jj/qRL/5Cty2LZVI3/ueZmcZlnCa0VB1aRVjMllNlf+1zg/J9G9rYiybk3251Sb+R8AgQFhhuKQ86tmmCQ== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id n1-20020a170902d2c100b001d7105e7ff9si590887plc.546.2024.02.12.10.26.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 10:26:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-62151-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=xnSouA+T; 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-62151-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62151-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 7B014B2B09B for ; Mon, 12 Feb 2024 17:58:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 183544D13B; Mon, 12 Feb 2024 17:54:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b="xnSouA+T" 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 2D3F945BEC; Mon, 12 Feb 2024 17:54:16 +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=1707760459; cv=none; b=LTtP8QOCRxDj+ewGJWUTvzVGVaaa4yF34RCXJJjNfR3YqjGFBMFFJQ2pbbhlzBqaa2CcyptusNQpd8IEDaq6J0O28vdLsS3zOef0bV/i/QMTebjOVn3IHrLz2OIevzWhYlxkgnoc0EK+howItnTxp12d3cuM/LGZqU9CfPkhSdE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707760459; c=relaxed/simple; bh=oF9i+Z8BdopTqVTnBumsz4Nu/Iy7VmW+wAYqm2kOVt4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=oAczeDaRutAVU3R1hRHcj11/a6l5LLLaSv2eorYjKi15D1gtL65s4u2hIF7EytkHEjZo9nILTIv6wH/82SSKJzsqGjLh8uFm6MZwA3YFX5QdlmaRW3iVfOdnD+Y7g7wgbLOIcrGeYPgvEEzmOKpwuSWauzecgoBnU/N652DZ1DA= 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=xnSouA+T; 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=1707760454; bh=oF9i+Z8BdopTqVTnBumsz4Nu/Iy7VmW+wAYqm2kOVt4=; h=From:To:Cc:Subject:Date:References:From; b=xnSouA+T8OAdh2amQX5sJlpaKHMJ6LK8nbkiDRhmQOwVNcjGBl6Po95bAsnLkyn04 tfvwds7hXsmDCuHnNEZFqgqmz3Pk4S02ZYCn0u1EUkSp/pVFjbXN7iQ8MWS6x/IQFa ixxH0fx3VrR4yuhzef3IN1J7F9gaBFoHI3lsVfJs= 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?= Subject: [PATCH v2 2/4] dt-bindings: iio: magnetometer: Add Voltafield AF8133J Date: Mon, 12 Feb 2024 18:53:54 +0100 Message-ID: <20240212175410.3101973-3-megi@xff.cz> In-Reply-To: <20240212175410.3101973-1-megi@xff.cz> References: <20240212175410.3101973-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: 1790718661931870527 X-GMAIL-MSGID: 1790718661931870527 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>; + }; + };