From nobody Mon Feb 9 16:17:25 2026 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (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 99AE2158DCD for ; Mon, 19 Aug 2024 06:47:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724050070; cv=none; b=oiN+Xtr0irPWl1j+eN3lKOFkaGsHEF1DFBUVJ/1kEuvIUI54d+EHNseq5SXkS43y6NTsP+1wW34GG4FiBj4noAL45u8+tETiJqrdcPKm2jlBIPiEjpBimpIKUck3/JPWKlUwuux/k/mEUejtnT8ZPyhny0J7GFkbozG4O2FEP1I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724050070; c=relaxed/simple; bh=zjkhjxugrpPcOzPM7cJwvWgeaXdH9eHWxMEf0cBLd6I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=i/5Yz2Ui9Rauh7RcePC73YRs2p/fydRTjflXugUyersDDKN/lr4AFMitFEjoRGoUhecUEx57PDj018oMVI55Sy0vOjwfkHdlIw1lmsxptQT4djulK+2YySn2GIjWP1cUqPUcOTBjjbz/XGG6wi7NzYGsMiyTdXHXMPSCD9pBFMs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=ISYAykmD; arc=none smtp.client-ip=209.85.208.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="ISYAykmD" Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-5beccb39961so549226a12.3 for ; Sun, 18 Aug 2024 23:47:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1724050067; x=1724654867; 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=N5HQOz+OPivxBeIw9/E/M5AYwS74pv+AP5N6QBsRsGE=; b=ISYAykmDCc8rGxGOCLKYBKK5MgppA90pFD7mXNotcWCXBdh55zz4w61UcpqN/zyptJ Z5TNk+PjuNqJClap8KJUd/PzDQ/LhzxlUpFMgG0ESfhXbDjPGTBODiSDltaOYnezgUZR 0qBiAx8hM50RgkRqdol8PWR1nEYe1R+uy75N/24BPEtvrV6JOPt0u/qaOACTv7dwqWGU evzclpuSveHqeMclH5uRFmaWnVcJD6FV0Y1Do88jaT7zQFM7Yc5cbWP7a/K2wWErEfwG DkWTbc++p2Q8wAUv9pm2TjHFKr9O7SRXOsl75SOras9LAfUx2vba0jxiTuOW4+LoxX50 JlSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724050067; x=1724654867; 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=N5HQOz+OPivxBeIw9/E/M5AYwS74pv+AP5N6QBsRsGE=; b=cpDTBFfGuVIrRAy1cxwDWbqg1Frj9zXgS7lujckCXtDusP4P/OXnuWSVx5WMr/imZY fnhFouK4HUGy1nTzqMT5Z9emwwkjS3isn2jy5GeHedHHqaNf7PiKUpkDXZfNAfM7M4w0 H74RNyiPeqqfB/Fz9phnBYcX3x7a1EJ57kbkaTrwlQ9IQ371suOE8I5ngZMU1ZDeoE7y xkP5AdtKSiN+P29WaImG78oHNCfrd5zRJN8avwMJg4N8frStgh8qo/fXOfn3wwOeLA3q mykaLCqmg6ip9LubJ/ZFf8BZxGiz5sXLuetUAh+G9aVSIcjxjc0/TIAnwhJcg11axX3c UxDg== X-Forwarded-Encrypted: i=1; AJvYcCUHN3tYj+bx4wB4nlBNgyrxz6jHIve+2C6BYrsc1ZgMidFrUc0H1sOPUg6+lo+4MzPfdEDaLHMklTPKPnA=@vger.kernel.org X-Gm-Message-State: AOJu0YyVwwpBLnf82261l+uP74jkAidMxcKJGh6gDcw8lQaVzn05fDnv FvcvWeyTkx9sfn+JgFNJ2iy+ELME7X97u0Dlltgluo3Qoc+99jT21T6zjfWZVeY= X-Google-Smtp-Source: AGHT+IF8k63D6kdG9ePEGXSjcSrgL/j5g6ct6jHlHHPqECtDZSi8DlPJDH0Gb7qX2rmHvBmucGwJnA== X-Received: by 2002:a17:907:9717:b0:a83:70d0:7a1e with SMTP id a640c23a62f3a-a8392a6b37dmr419257866b.9.1724050066979; Sun, 18 Aug 2024 23:47:46 -0700 (PDT) Received: from neptune.lan ([188.27.128.229]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a83838c6bfcsm599069966b.28.2024.08.18.23.47.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Aug 2024 23:47:46 -0700 (PDT) From: Alexandru Ardelean To: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: jic23@kernel.org, krzk+dt@kernel.org, robh@kernel.org, lars@metafoo.de, michael.hennerich@analog.com, gstols@baylibre.com, Alexandru Ardelean Subject: [PATCH 6/7] dt-bindings: iio: adc: add adi,ad7606c-{16,18} compatible strings Date: Mon, 19 Aug 2024 09:47:16 +0300 Message-ID: <20240819064721.91494-7-aardelean@baylibre.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240819064721.91494-1-aardelean@baylibre.com> References: <20240819064721.91494-1-aardelean@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The driver will support the AD7606C-16 and AD7606C-18. This change adds the compatible strings for these devices. The AD7606C-16,18 channels also support these (individually configurable) types of channels: - bipolar single-ended - unipolar single-ended - bipolar differential This DT adds support for 'channel@X' nodes' Signed-off-by: Alexandru Ardelean --- .../bindings/iio/adc/adi,ad7606.yaml | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml b/Do= cumentation/devicetree/bindings/iio/adc/adi,ad7606.yaml index 69408cae3db9..f9e177de3f8c 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml @@ -14,6 +14,8 @@ description: | https://www.analog.com/media/en/technical-documentation/data-sheets/AD76= 05-4.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/ad76= 06_7606-6_7606-4.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/AD76= 06B.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/ad76= 06c-16.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/ad76= 06c-18.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/AD76= 16.pdf =20 properties: @@ -24,6 +26,8 @@ properties: - adi,ad7606-6 - adi,ad7606-8 # Referred to as AD7606 (without -8) in the datasheet - adi,ad7606b + - adi,ad7606c-16 + - adi,ad7606c-18 - adi,ad7616 =20 reg: @@ -114,6 +118,30 @@ properties: assumed that the pins are hardwired to VDD. type: boolean =20 +patternProperties: + "^channel@([0-9a-f])$": + type: object + $ref: adc.yaml + unevaluatedProperties: false + + properties: + reg: + description: The channel number. + minimum: 0 + maximum: 7 + + diff-channel: + description: Channel is bipolar differential. + type: boolean + + bipolar: + description: | + Channel is bipolar single-ended. If 'diff-channel' is set, then + the value of this property will be ignored. + type: boolean + required: + - reg + required: - compatible - reg @@ -170,6 +198,21 @@ allOf: adi,conversion-start-gpios: maxItems: 1 =20 + - if: + not: + properties: + compatible: + contains: + enum: + - adi,ad7606c-16 + - adi,ad7606c-18 + then: + patternProperties: + "^channel@([0-9a-f])$": + properties: + diff-channels: false + bipolar: true + unevaluatedProperties: false =20 examples: @@ -202,4 +245,44 @@ examples: standby-gpios =3D <&gpio 24 GPIO_ACTIVE_LOW>; }; }; + - | + #include + #include + spi { + #address-cells =3D <1>; + #size-cells =3D <0>; + + adc@0 { + compatible =3D "adi,ad7606-8"; + reg =3D <0>; + spi-max-frequency =3D <1000000>; + spi-cpol; + spi-cpha; + + avcc-supply =3D <&adc_vref>; + vdrive-supply =3D <&vdd_supply>; + + interrupts =3D <25 IRQ_TYPE_EDGE_FALLING>; + interrupt-parent =3D <&gpio>; + + adi,conversion-start-gpios =3D <&gpio 17 GPIO_ACTIVE_HIGH>; + + adi,conversion-start-gpios =3D <&gpio 17 GPIO_ACTIVE_HIGH>; + reset-gpios =3D <&gpio 27 GPIO_ACTIVE_HIGH>; + adi,first-data-gpios =3D <&gpio 22 GPIO_ACTIVE_HIGH>; + standby-gpios =3D <&gpio 24 GPIO_ACTIVE_LOW>; + + adi,sw-mode; + + channel@1 { + reg =3D <1>; + diff-channel; + }; + + channel@3 { + reg =3D <3>; + bipolar; + }; + }; + }; ... --=20 2.46.0