From patchwork Wed Aug 7 14:58:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Ceclan, Dumitru" X-Patchwork-Id: 13756408 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.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 6DD2A7B3F3; Wed, 7 Aug 2024 14:58:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723042690; cv=none; b=nvUDdEHUozPBlmOQB0wEVbISPN08gYFLkb0xHFV4SbcmFsZ3TRk8OcRPwGe5/SGQ9RwK4nKn0XXILQN+r5I4Ch8DPZScLWd5Y1Kva1ipfbGcUMCqrippxQpp1MR0eZLo38QlMljfTa5nX0m2rAcOKAJdsMdpzPgP/r4CvWYbny4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723042690; c=relaxed/simple; bh=0s0PrjcM83z5fbsB4LsplD5/khHSXg5gF3xvH6Kw6pk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Nua6jBfIj7pt+ka9BzX5JQvok7uUFSciEx2JE2yX56sm5nhXBOlUdlTY7m5zMYdgXLxA2onDgmv/ECjNPlq3A92ccNeGjqtSIs6n1UWJOdY/qFKgOAn6MqnkHBEADb7g0SdT+0PfxXODSu8b6tsk9k3kAImI81bD4S597GN/RJU= 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=EKRtRu63; arc=none smtp.client-ip=209.85.128.45 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EKRtRu63" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4257d5fc9b7so18267865e9.2; Wed, 07 Aug 2024 07:58:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723042687; x=1723647487; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=EF2DlLSnOdk/pKo666emHKjkZPGYV9IYLaoN6XXm07Y=; b=EKRtRu63pfhpnNclH+dPYWMNBuYuedewIDQ8bCZ3tITiHheQLyjjOPqm3uS8tA+Bdp lFz7CFCreUZ03j8ybdBSvCpIRBA2sKjPiPD1tHFe8kimEv9W35ncCYaTd1GgKOdZXv4A QWT7qxGqn6i/ff38Vp5k3is9DoC0MvMn/Ud0Knu0ataO/cfJOjBqdMxGrMlV7LAT5jUm doU1vtj9w5vtItRiUVxZcvKF8Jxssb8hBqvJuhCLnltuGzL69k2O3Heg9/Xmx0l9FlIO S5wna/scPx+oO5/UUqY0+0EuAzmVRs6nHUDTwDus/0/mQKJ9WtHuh6aP4osh5koy0eH7 ExXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723042687; x=1723647487; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EF2DlLSnOdk/pKo666emHKjkZPGYV9IYLaoN6XXm07Y=; b=Eg7x2r2cstcIsd8KU0jnhNnJifUdSMEr5ewZVZ4PXrBFTew6vDSd4ahbQAuxz702on ysbIIAtrNPCQARdT4+fIhQYIKCbOiTXg2LaJLK9Mg8HtWHZZrkPlbJr7gscW9NfIhOr0 BdvQ0Hpqzyr0rnweNyBjciaW9MtxDJHRltvpU+4KZDs0+gx/O9WLycgVzg9tc2NbWkBf 3/9AYdcsmGIgnwGBA+MfkOogHPsl3eCzebX8uij61z6PleM5aieFuTWz0HclJZoekJkH V755x+XU2bR6HvAE5RP2K7jiTNOUA2f7/VPpux/y562nIC7yJCgf3HvMxGAF0KgZ5WYe Itvw== X-Forwarded-Encrypted: i=1; AJvYcCXDTUe/0W2nyMRICX48G33l44Gk8NU6Gd8Ncqz42luykYONAEe8PMaMEA9zKz0IH9gC7OXyWRdbLdM0hWlWTMQo1ODyq9MUXktM0loJpDEvekUGyVdQL7PCsUluzaJpGTr1HQvLhX7VeTpReG3RuWSuCXNKltMbx9rbxoKAefqJQL4f9w== X-Gm-Message-State: AOJu0Yxq9yR6GOO0B9qh6qMKqQB3Z3bsVvRUVEQ6tqFCfgo9CzZ2Pc4g IpV3sA+ow2oS7AhlyHi+WAHlgpvueQIyjyhHmkEZ1XABD2HKlpp9 X-Google-Smtp-Source: AGHT+IFcxYBvFAX9Q25QB9HvsKHSFuSnAuQwh+rvgADOOYrg9ExFofPYxZONBpmwuglFR3cLJbEoiA== X-Received: by 2002:a05:600c:198d:b0:426:59d3:8cae with SMTP id 5b1f17b1804b1-428e6b043damr161430145e9.13.1723042686232; Wed, 07 Aug 2024 07:58:06 -0700 (PDT) Received: from HYB-hhAwRlzzMZb.ad.analog.com ([5.2.194.157]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42905971993sm33273055e9.16.2024.08.07.07.58.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Aug 2024 07:58:05 -0700 (PDT) From: Dumitru Ceclan X-Google-Original-From: Dumitru Ceclan Date: Wed, 07 Aug 2024 17:58:04 +0300 Subject: [PATCH 1/2] dt-bindings: adc: ad7173: add support for ad4113 Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240807-ad4113-v1-1-2d338f702c7b@analog.com> References: <20240807-ad4113-v1-0-2d338f702c7b@analog.com> In-Reply-To: <20240807-ad4113-v1-0-2d338f702c7b@analog.com> To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: mitrutz_ceclan@gmail.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dumitru Ceclan X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1723042684; l=1645; i=dumitru.ceclan@analog.com; s=20240313; h=from:subject:message-id; bh=0s0PrjcM83z5fbsB4LsplD5/khHSXg5gF3xvH6Kw6pk=; b=TeroV0fI6VLi5JS3WeJTWsMwljxsGPCc1nexNU8ytevlgW22FyIgcAmpFHuoL0sElepfyWb3P T4Bs4rathtEA4sw2lZJSSasOnZCgOImTiRkKWBiB26Ps/YqFhQ/jNK6 X-Developer-Key: i=dumitru.ceclan@analog.com; a=ed25519; pk=HdqMlVyrcazwoiai7oN6ghU+Bj1pusGUFRl30jhS7Bo= This commit adds bindings support for AD4113. The AD4113 is a low power, low noise, 16-bit, Σ-Δ analog-to-digital converter (ADC) that integrates an analog front end (AFE) for four fully differential or eight single-ended inputs. Signed-off-by: Dumitru Ceclan --- Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml index 17c5d39cc2c1..ad15cf9bc2ff 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml @@ -28,6 +28,7 @@ description: | Datasheets for supported chips: https://www.analog.com/media/en/technical-documentation/data-sheets/AD4111.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/AD4112.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/AD4114.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/AD4115.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/AD4116.pdf @@ -44,6 +45,7 @@ properties: enum: - adi,ad4111 - adi,ad4112 + - adi,ad4113 - adi,ad4114 - adi,ad4115 - adi,ad4116 @@ -331,6 +333,7 @@ allOf: enum: - adi,ad4111 - adi,ad4112 + - adi,ad4113 - adi,ad4114 - adi,ad4115 - adi,ad4116 From patchwork Wed Aug 7 14:58:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Ceclan, Dumitru" X-Patchwork-Id: 13756409 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 35BA581AD7; Wed, 7 Aug 2024 14:58:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723042690; cv=none; b=eeVtl4vza0ZFDVZpDenvzxaPl6DYd9o//Ow2wx+Ybiqz0u16wENoFY6slE9UNg25VfJnWXfqCedfJCi3EiItE5ZNoW/cjqES7UeIWjlQH0rR4iisjS/eNUEwiFfH+OdvJPuHo3m7LYaQk/C+re+rGFH0VditKEh0HNaBjmogO1U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723042690; c=relaxed/simple; bh=684IISxg8vaXAJXLeWrPuba5w804vEdG4sa39zu06b0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KoycnNfQr/i7Wmu8PwD2Y8sYhhyyEau5KwYDk5ZpGizTabtCE1IO0Xsy2tSKM/+ym46p0blpXEzJsQaPIkGkh5uHooEeE0JnYoJ676dLqIV69y2D/L+VXIgfb+wmVAK7sXT9uJfahIin0kvBjbebm+Se/7NeRNeJ1khL6qY05XU= 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=VinEj13i; arc=none smtp.client-ip=209.85.128.43 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VinEj13i" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-42819654737so13268565e9.1; Wed, 07 Aug 2024 07:58:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723042687; x=1723647487; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=HNpPNkP50fJTrVWUrfvyS64Vg7K67/EiLu5HJxO6FNU=; b=VinEj13iKbnpUOYuJENHhWaO5S1Xvm7HBzh8NdF38JTsGMJA/RLKyyUZQ8DL42Wzjn se1m6pJRr05iEQlPgzv/RKQPGcs3kE8GGZNLDoEQdeqkx0OqEAnaG0GMk8hxRWZIumuz jfHHb7CPNcCS7niUgOYFE9zm+kb+TN8Nz9ePEVfA2/2qUq8BdIK/0Vr8/joOO1MK/1z+ Z4qdDdxReNjrwUO5VteGScKLPvSZQ4jBDzrjKz3fYmsV8YvLJJ1VKipg6XgX6jCWdP3v kfsYyNIiQEcEpPBOhhaipCOoLW1UF7ialkhBmJ2NoCg9Cy9wrKlwPECX0SnawligZI1h VAYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723042687; x=1723647487; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HNpPNkP50fJTrVWUrfvyS64Vg7K67/EiLu5HJxO6FNU=; b=pSImZolnv7q2rPjCIOxRyg+zBKcj+5FuZCwnqe0fvShPJZbwr0/BKVC5FFlHKVbgGm 3g5TpF8MG+Tw8g+ddNgZaEXmiNFW/JOMgOOeaTT3q5dZDrTqS6XOrK1+/GpBsqHhSBGT YnSqtvd2tNXX48T+QbWTVP8kx+iUHK4txPbLenLQfWWU87ee74d+DBBBYfCXhm5jKIIl 2M7bKk3YIiJOpv8kRZSRZji888xM2YzRGUCS3iwzum+de86jn0uFwgT+Vw3s2zb0QtGJ RiTZXRJ5a6c0RtDMo26L+cgFtStWVVIqAi/+FrSch2Xk4Iq0Wc+8TvIXKJc7qqe2HiBg fsJA== X-Forwarded-Encrypted: i=1; AJvYcCUz6f6T9XTzYmwApAlUXjWJ+iEEGkQujb11LoE2+od+4oJozgWtJF5VX+BPwJe0c1DjmK63RFqr/OBydZ4Rwh/OyCF214Mze8dkgctoRjbXw9gjnFoj69OHG2ybHtlxZTVNhhJQOU3oaVIUlpXUM7jHCNVWetgf9/TwmKhgz4Gepm4ikg== X-Gm-Message-State: AOJu0YwLOMqss6+LxTw6Q97B6DVgpOQj9SjSBtPnNUXxBWw4ndk28mIM 7rECkkPdbaDkzJ6FRf7rydzcgBHyMHG/TYC4ydRfi+nr5vUTXLdb X-Google-Smtp-Source: AGHT+IFoLKMRR4oqyU27FQklDGMTnP7tyGvM3y7Fp1AgDO9bMqSdSlFhEHOXQIykI/6uf1IXvUaXMA== X-Received: by 2002:a05:600c:1c8a:b0:424:ad14:6b79 with SMTP id 5b1f17b1804b1-428e6af7f46mr139110875e9.8.1723042687311; Wed, 07 Aug 2024 07:58:07 -0700 (PDT) Received: from HYB-hhAwRlzzMZb.ad.analog.com ([5.2.194.157]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42905971993sm33273055e9.16.2024.08.07.07.58.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Aug 2024 07:58:07 -0700 (PDT) From: Dumitru Ceclan X-Google-Original-From: Dumitru Ceclan Date: Wed, 07 Aug 2024 17:58:05 +0300 Subject: [PATCH 2/2] iio: adc: ad7173: add support for ad4113 Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240807-ad4113-v1-2-2d338f702c7b@analog.com> References: <20240807-ad4113-v1-0-2d338f702c7b@analog.com> In-Reply-To: <20240807-ad4113-v1-0-2d338f702c7b@analog.com> To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: mitrutz_ceclan@gmail.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dumitru Ceclan X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1723042684; l=2795; i=dumitru.ceclan@analog.com; s=20240313; h=from:subject:message-id; bh=684IISxg8vaXAJXLeWrPuba5w804vEdG4sa39zu06b0=; b=zovgOhTELuu+1gvA3WETOHtCX0OjRgWhxPh8Q6k1mTVMe09Bm5Ub3qAJApNrkyqgaq3zDxHdS 8HSWhhp6P3PAkn1JnRCaYks1gPHEOREesSOJ3FXMPnH0qbFeLdtWVQz X-Developer-Key: i=dumitru.ceclan@analog.com; a=ed25519; pk=HdqMlVyrcazwoiai7oN6ghU+Bj1pusGUFRl30jhS7Bo= This commit adds support for the AD4113 ADC. The AD4113 is a low power, low noise, 16-bit, Σ-Δ analog-to-digital converter (ADC) that integrates an analog front end (AFE) for four fully differential or eight single-ended inputs. Signed-off-by: Dumitru Ceclan Reviewed-by: Nuno Sa --- drivers/iio/adc/ad7173.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc/ad7173.c b/drivers/iio/adc/ad7173.c index a854f2d30174..82b63f9705b3 100644 --- a/drivers/iio/adc/ad7173.c +++ b/drivers/iio/adc/ad7173.c @@ -3,7 +3,7 @@ * AD717x and AD411x family SPI ADC driver * * Supported devices: - * AD4111/AD4112/AD4114/AD4115/AD4116 + * AD4111/AD4112/AD4113/AD4114/AD4115/AD4116 * AD7172-2/AD7172-4/AD7173-8/AD7175-2 * AD7175-8/AD7176-2/AD7177-2 * @@ -84,6 +84,7 @@ #define AD4111_ID AD7173_ID #define AD4112_ID AD7173_ID #define AD4114_ID AD7173_ID +#define AD4113_ID 0x31D0 #define AD4116_ID 0x34d0 #define AD4115_ID 0x38d0 #define AD7175_8_ID 0x3cd0 @@ -294,6 +295,23 @@ static const struct ad7173_device_info ad4112_device_info = { .num_sinc5_data_rates = ARRAY_SIZE(ad7173_sinc5_data_rates), }; +static const struct ad7173_device_info ad4113_device_info = { + .name = "ad4113", + .id = AD4113_ID, + .num_voltage_in_div = 8, + .num_channels = 16, + .num_configs = 8, + .num_voltage_in = 8, + .num_gpios = 2, + .higher_gpio_bits = true, + .has_vincom_input = true, + .has_input_buf = true, + .has_int_ref = true, + .clock = 2 * HZ_PER_MHZ, + .sinc5_data_rates = ad7173_sinc5_data_rates, + .num_sinc5_data_rates = ARRAY_SIZE(ad7173_sinc5_data_rates), +}; + static const struct ad7173_device_info ad4114_device_info = { .name = "ad4114", .id = AD4114_ID, @@ -1437,6 +1455,7 @@ static int ad7173_probe(struct spi_device *spi) static const struct of_device_id ad7173_of_match[] = { { .compatible = "adi,ad4111", .data = &ad4111_device_info }, { .compatible = "adi,ad4112", .data = &ad4112_device_info }, + { .compatible = "adi,ad4113", .data = &ad4113_device_info }, { .compatible = "adi,ad4114", .data = &ad4114_device_info }, { .compatible = "adi,ad4115", .data = &ad4115_device_info }, { .compatible = "adi,ad4116", .data = &ad4116_device_info }, @@ -1454,6 +1473,7 @@ MODULE_DEVICE_TABLE(of, ad7173_of_match); static const struct spi_device_id ad7173_id_table[] = { { "ad4111", (kernel_ulong_t)&ad4111_device_info }, { "ad4112", (kernel_ulong_t)&ad4112_device_info }, + { "ad4113", (kernel_ulong_t)&ad4113_device_info }, { "ad4114", (kernel_ulong_t)&ad4114_device_info }, { "ad4115", (kernel_ulong_t)&ad4115_device_info }, { "ad4116", (kernel_ulong_t)&ad4116_device_info },