Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp551244lqp; Sat, 13 Apr 2024 08:13:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWsUL92QmL0Y+GGO2v1q5xoXKPRa6aT+U1oJe2dFvnNrkkw2Xefj/7menj3sqF28fe6GPel5ME7amWPzPTnLHG+a2WXlu0az5TExewg2A== X-Google-Smtp-Source: AGHT+IE7gPfXrTfseSNWT11ej3P+x+DIU8jejZiGMXIMzSyZRZv3dxXRSFSiMeoQE7BVWy03zZLg X-Received: by 2002:a17:902:728b:b0:1e5:b82:2f82 with SMTP id d11-20020a170902728b00b001e50b822f82mr5019464pll.42.1713021219219; Sat, 13 Apr 2024 08:13:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713021219; cv=pass; d=google.com; s=arc-20160816; b=j2j8+EBWdv0rhYOMqHNvyBaVevriy8/hvsMZZksx9+uOYCdjUzuGTUlL5doA2QKQix MOr0hHXV2JJVR6M5yaSouBH9K8JvfFvKA5oDXZhT0RMrrmpruNahzBq5JkiNhIGIMJ5A wj9nKS6MEOJS7bXFztwMmjv0stSkR4LAsMYEH2j2tvTyr3C7+U5xAz7yfaYiZEc043r4 Ei20v6ASgzQB4kB27erTvZUuwlyUHvr3vIKtdrhL8ux9ev80XPMaLn+CBW+UZdHL21ML 8qUSt3e50fLJQl1q/3sjVezejMyi8yPMjot5Eyx9lTpsVKAx6RQildmyichjjmhA8P9u wE3A== 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=/H3yNAmRll7TZn8gfKLPpJ0eOXKDcbG9K2aasqChDaM=; fh=pJqW1z4Y/x+AF0BJqSrcvRcgIvEWRRUQ21TCH9x/L/U=; b=ZAPPRIKM9PboqRiKWosslO5dXGsJ6RUSAVW9pqFPWFJer+0zKhjdEc6lJaPNnU12ti Zk3k3SlgkjWFFUi5j+gepy8OPg/OgmtjIrVtx0ONC+4ofqjBYzIhhp9z9C7/hvziUcr2 0oxCxcmpCW+jt1SGbsdLZPqSIegn6p+G8T4k8XbP7TqZ5PSYhLHwz0PJM14uQrlh7CK2 qY1TduuMCmpSSBCUkOei3mXGZ+PXilAXIsYx7CMnmSTQurnED7cbKXlP5v77IOsYegzn iop86zL8mh+BZ8N+ElJIaWI3gBQXAJyuW6HXph41/RQy1F9oTEgj2fkPKu0DwtAqxZZE n+YA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YrM5Zfpk; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-143766-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143766-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id gu3-20020a056214260300b0069b251195desi4040709qvb.141.2024.04.13.08.13.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 08:13:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143766-linux.lists.archive=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=@gmail.com header.s=20230601 header.b=YrM5Zfpk; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-143766-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143766-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 D41041C20C08 for ; Sat, 13 Apr 2024 15:13:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1C7B0482DD; Sat, 13 Apr 2024 15:13:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YrM5Zfpk" Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (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 A46194597E; Sat, 13 Apr 2024 15:13:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713021192; cv=none; b=kqdQUYmqAlnVsUJwPwwerbGppCU/DCv3xOjOYFS9laeFqBAtgC7dFviVngFOBCoTd7lPPlqfsLD+nLpo8aNlDTiqg1izleDqIQXJ3gmswG6qCu5bXQdU6opuym+k6iXWFV1ujAYqBEiwYZbyeQByFrCd5vEJV44EdqGIdra4iFE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713021192; c=relaxed/simple; bh=l4OkHsjpSQbTmXssYW2Df8eVdehQqIlHb1Z2GfhQPSw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=axW8OGuQ7tAcZ+zvlIpkuM+I/pkVgTgIeTAiCfDt5RhWMImqIwu5bs+TGEvBOM0uetyKJjNFpOh7fJFnLgwVuxNRi4KADWWQixdX5De+tkI0pZr9W/2tKuSAPsH0269l+lxIZgVOsq9lfRC+NPgVMO3syzyVLcL1+qk9fYvPhM4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YrM5Zfpk; arc=none smtp.client-ip=209.85.208.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-55a179f5fa1so1824095a12.0; Sat, 13 Apr 2024 08:13:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713021189; x=1713625989; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/H3yNAmRll7TZn8gfKLPpJ0eOXKDcbG9K2aasqChDaM=; b=YrM5ZfpkQr2EZLvOje6VMzaJo0pBlweWWcnyBnzfomrlkcnmvOXtcLmxKcTCKTYNUR qUZmF7KdL56iL8PemP8uHykJWNwFFuyxLJveTirOj7RVvC9O9K9ZgvzlTmNOjXURrYsV RgmFK2MtQxVh0L8SdWxhQNT5AZfov0+YZxXgQnl0Tfy3Ghzfj/k5MsKImaN7d+5XTTyt HWNagSNBgi7/zIX1TWcfEk9ctvVv3VzXdVLb7aPrkrrJBI68IkfC12V6I+/2fggt/MUV WBymj3eAdmcN4f+n7XsO5DbaKgkepIct7EzQ/BFNjpnD3Nsdzt09mdVYjHpzsJhwjmME C8SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713021189; x=1713625989; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/H3yNAmRll7TZn8gfKLPpJ0eOXKDcbG9K2aasqChDaM=; b=wRKBcnbq+4LuyjbiaIvDmG/rBHm5efpd39RWiARbFheOD7T0+rH4MnOiJ6tyGdWQp8 2ew0rlWgXh67NBtnJ9N/mzDg/yrkNcgPOQMZ6TaEX6/JM0QmVubKBEXiUzoOgLNkMxkm lgkE3Ueh3JsqWY+4ICiuJV6+JAPRGcERQ+560LCEskvKrPiw7CpArhHCBvGVuaCCBNMs GuIRysoKgcqARlo202m8bkawSwns8xBZbyxxPhn64HFiZZ/k1+tzE36ZNeF88IRFMwMh Y45Kb1a0PD8JzA2uSQxNcujjmpkJCCG9HgSKggUKC8n5cfcB55r0AheYmIgycneY2FDY ji0A== X-Forwarded-Encrypted: i=1; AJvYcCWgewle0ut7hkA63m2YW5doJVOr4B/hdsUte6favR9VXdy7xlYAADC5JbjzV6jnzE3UGnIb+gl6jEQ6RBhoAl4KRO2x7ggaiZYMFsmr5VZ2XDdARkwywzfxAbTqEKLTTqy7sK6y42b4rH77kwMTwjavjK2Ks5GUI1t6/ciwpS/pZMiXsQ== X-Gm-Message-State: AOJu0YyOEZGPvhtgHSuQIYG74Kb2PlVrQf7v/e0K0d1Peej/AGR7Z0rI 9vELb6Vwg/Isa0JbujzNv7ohtUuDEKY5PoX+87Zugn4nyO34i5+X X-Received: by 2002:a50:9353:0:b0:56b:dd0f:52e0 with SMTP id n19-20020a509353000000b0056bdd0f52e0mr3498732eda.18.1713021188945; Sat, 13 Apr 2024 08:13:08 -0700 (PDT) Received: from spiri.. ([5.14.146.31]) by smtp.gmail.com with ESMTPSA id w4-20020a056402128400b0056e2b351956sm2749883edv.22.2024.04.13.08.13.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 08:13:08 -0700 (PDT) From: Alisa-Dariana Roman X-Google-Original-From: Alisa-Dariana Roman To: michael.hennerich@analog.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: alexandru.tachici@analog.com, lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, andy@kernel.org, nuno.sa@analog.com, marcelo.schmitt@analog.com, bigunclemax@gmail.com, dlechner@baylibre.com, okan.sahin@analog.com, fr0st61te@gmail.com, alisa.roman@analog.com, marcus.folkesson@gmail.com, schnelle@linux.ibm.com, liambeguin@gmail.com Subject: [PATCH v5 4/5] dt-bindings: iio: adc: ad7192: Add AD7194 support Date: Sat, 13 Apr 2024 18:11:51 +0300 Message-Id: <20240413151152.165682-5-alisa.roman@analog.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240413151152.165682-1-alisa.roman@analog.com> References: <20240413151152.165682-1-alisa.roman@analog.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Unlike the other AD719Xs, AD7194 has configurable differential channels. The user can dynamically configure them in the devicetree. Also add an example for AD7194 devicetree. Signed-off-by: Alisa-Dariana Roman --- .../bindings/iio/adc/adi,ad7192.yaml | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml index ba506af3b73e..855f0a2d7d75 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml @@ -21,8 +21,15 @@ properties: - adi,ad7190 - adi,ad7192 - adi,ad7193 + - adi,ad7194 - adi,ad7195 + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + reg: maxItems: 1 @@ -104,8 +111,43 @@ required: - spi-cpol - spi-cpha +patternProperties: + "^channel@[0-9]+$": + type: object + $ref: adc.yaml + unevaluatedProperties: false + + properties: + reg: + description: The channel index. + minimum: 1 + maximum: 256 + + diff-channels: + description: | + Both inputs can be connected to pins AIN1 to AIN16 by choosing the + appropriate value from 1 to 16. + items: + minimum: 1 + maximum: 16 + + required: + - reg + - diff-channels + allOf: - $ref: /schemas/spi/spi-peripheral-props.yaml# + - if: + properties: + compatible: + enum: + - adi,ad7190 + - adi,ad7192 + - adi,ad7193 + - adi,ad7195 + then: + patternProperties: + "^channel@[0-9]+$": false unevaluatedProperties: false @@ -136,3 +178,35 @@ examples: adi,burnout-currents-enable; }; }; + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "adi,ad7194"; + reg = <0>; + spi-max-frequency = <1000000>; + spi-cpol; + spi-cpha; + clocks = <&ad7192_mclk>; + clock-names = "mclk"; + interrupts = <25 0x2>; + interrupt-parent = <&gpio>; + dvdd-supply = <&dvdd>; + avdd-supply = <&avdd>; + vref-supply = <&vref>; + + channel@1 { + reg = <1>; + diff-channels = <1 6>; + }; + + channel@2 { + reg = <2>; + diff-channels = <16 5>; + }; + }; + }; -- 2.34.1