Received: by 2002:a05:7412:361b:b0:f9:2edb:3e4d with SMTP id ie27csp112410rdb; Sun, 17 Dec 2023 17:25:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IGAwntTU21RXjPbqMfB3CWZJgc1M8zUh0CqcE+dniLRNOngqScPFj5BK/JWL/6yPiU1OQCp X-Received: by 2002:a05:620a:2953:b0:780:e87d:aff2 with SMTP id n19-20020a05620a295300b00780e87daff2mr1538453qkp.104.1702862752101; Sun, 17 Dec 2023 17:25:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702862752; cv=none; d=google.com; s=arc-20160816; b=KkORgPm3rGdssbnu9kEQ07UX22ian1/qU2gaZOHG7IC9pbYMQIbTTxkn6FBlsfM+l0 tPa695+PXjh6xkrB2jH6TeNxHiDZVPMsjBDAUzHLC/ARyVSq9IGzA1RvQl4tx+RoiDDo JLOxjXQGZ9r+FgDG4ws8u/aMA7ty97Ic+sCK95r8brx3oVEp/MwA3T6EmIPfFjlTgA82 xywMYcqPoG5qc8UXN0QnjfdkLWlEHASGuTfxzc0MQ2hvOdrX3reiDaw6HYKlwRlnDopR SUqnGI0cuyOuDKnxFFIILZ8uSLrCuDWPtwcgWg99mSvoAHbDJQp53ImZUOIUAnZTHa8j /oBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=EHRHA7JfQFuNpMI/anLcoQ4nrN4AoQWbZ++49Uu8LtQ=; fh=uOkJoWP514ozR4dh8O9kdRPsyh8pTZ4e++3kZDeN5TE=; b=Ay/HfOZ/iwNDW6K0xGLRa2z/SzJRmOahdn1t7a4Vha7YhocNUdyhtEnDfK2ncRulrF s1rUKNTzhWaFjtwmX4U+EPrOiqbadKzV5ZVzMUS5+YXTFKMltE6do7StxWCOPyoDdnyD i9Wd/UqePtld85g6YelcGLDrb7L2zJhijrdKN0wg0hxKn9D7D3LYZAr9EO51zm4kL7tE DqznRIYGPn8dnrtgJYaZRWc77lidBub0NquHgZmfLIRmGJI9yR43rNbhf4wZvFwbRzRF An+blu2NB2fMsOUFK+02GFr+QHc9xl2wnIqxfwn8NHz8LUGAVXMYKC2cYGDbi14cIWc/ n3fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=oeq+JOhm; spf=pass (google.com: domain of linux-kernel+bounces-2903-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2903-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 13-20020a05620a048d00b0077d76649b2bsi21999107qkr.535.2023.12.17.17.25.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 17:25:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2903-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=oeq+JOhm; spf=pass (google.com: domain of linux-kernel+bounces-2903-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2903-linux.lists.archive=gmail.com@vger.kernel.org" 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 C758D1C21EDD for ; Mon, 18 Dec 2023 01:25:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AE3F01FDC; Mon, 18 Dec 2023 01:25:43 +0000 (UTC) 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="oeq+JOhm" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (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 CBB275396 for ; Mon, 18 Dec 2023 01:25:39 +0000 (UTC) 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 Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-2cc5e48779aso13088511fa.2 for ; Sun, 17 Dec 2023 17:25:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1702862738; x=1703467538; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=EHRHA7JfQFuNpMI/anLcoQ4nrN4AoQWbZ++49Uu8LtQ=; b=oeq+JOhmu3gPsxl/Xeit5ZrkreAtqgh9bX47lpTi8djKfcz5xnX0KtwxCIEUO/1UeX DKJ2WW8lHwpeTdTouAuciWyMtrhB5zvqLHqmUjazIdOzsM9HgSUCbyOVUvS9ftR1PAyJ S7vPYNcmZ1nlvWbRfCTemm4EJtYpZnO9M1zNB4U+drPp9fsnNIQn2n0qzdK3wgkgCpz5 +PWVITo66C/B2LCQNcnQL2xsCNgbmZULNPY0+nZKzZ8zkxa58soDPrB2WyUASnhEVy45 kJaZtEMe80UJc1V345eKsdKUmqb2JyHxjw96i0G9rZyOjBUwT09L62ZDzAPGKkM59zuu U/eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702862738; x=1703467538; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EHRHA7JfQFuNpMI/anLcoQ4nrN4AoQWbZ++49Uu8LtQ=; b=g23eQEbfniBNEakwArurGfXsLOdnFeOjnKZPM3bSNSTWSQ+S7KeIzqaxF4hmcoL0Gy bGY3IyGtTQb1OXS+XXgfgUJBApUB8k74J5erSrMVXMXNJ0VeAs3sZxacCNUWFep5ub+l LoU0c5zHbnD0a0vv/n6cIUwi1W4VD0Sp975kpfZKWQlAbew3EFTseQxHHPaodN65P4w3 9Rw1XTE4qHzji7Se/cq0zrHH9X3CV6bGv/bUXb/MedgKHWSfm6EZEDJYr6PC5XpLq2Ue g/WJbYJqNWvotUiVzD7KNUQgvwHKLy3D10VXI9JzUfKv5uWGi0gjEnj2DtIynqmpGBOT 2e4Q== X-Gm-Message-State: AOJu0YxS+2fZJeMnEsgft/2yw6FxAMmStFuu5P4hLTiPIPUSSI6An4d2 YPXq9T0Tg2GoITWcwHqfGzQlq5GAks8j62DJRc6gQg== X-Received: by 2002:a05:651c:12c8:b0:2cc:1f97:b573 with SMTP id 8-20020a05651c12c800b002cc1f97b573mr5112517lje.106.1702862737939; Sun, 17 Dec 2023 17:25:37 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231217180836.584828-1-anshulusr@gmail.com> In-Reply-To: <20231217180836.584828-1-anshulusr@gmail.com> From: David Lechner Date: Sun, 17 Dec 2023 19:25:26 -0600 Message-ID: Subject: Re: [PATCH v2 1/2] dt-bindings: iio: dac: add MCP4821 To: Anshul Dalal Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, Jonathan Cameron , devicetree@vger.kernel.org, Conor Dooley , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , linux-kernel-mentees@lists.linuxfoundation.org, Shuah Khan , Conor Dooley Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Dec 17, 2023 at 12:11=E2=80=AFPM Anshul Dalal = wrote: > > Adds support for MCP48xx series of DACs. > > Datasheet: https://ww1.microchip.com/downloads/en/DeviceDoc/22244B.pdf #M= CP48x1 > Datasheet: https://ww1.microchip.com/downloads/en/DeviceDoc/20002249B.pdf= #MCP48x2 > Reviewed-by: Conor Dooley > Signed-off-by: Anshul Dalal > > --- > > Changes for v2: > - Changed order in device table to numerical > - Made vdd_supply required > - Added 'Reviewed-by: Conor Dooley' > > Previous versions: > v1: https://lore.kernel.org/lkml/20231117073040.685860-1-anshulusr@gmail.= com/ > --- > .../bindings/iio/dac/microchip,mcp4821.yaml | 64 +++++++++++++++++++ > 1 file changed, 64 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/dac/microchip,m= cp4821.yaml > > diff --git a/Documentation/devicetree/bindings/iio/dac/microchip,mcp4821.= yaml b/Documentation/devicetree/bindings/iio/dac/microchip,mcp4821.yaml > new file mode 100644 > index 000000000000..97da9f9ef450 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/dac/microchip,mcp4821.yaml > @@ -0,0 +1,64 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/dac/microchip,mcp4821.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Microchip MCP4821 and similar DACs > + > +description: | > + Supports MCP48x1 (single channel) and MCP48x2 (dual channel) series of= DACs. > + Device supports simplex communication over SPI in Mode 0,1 and Mode 1,= 1. It seems like SPI modes usually only have one number in them, i.e. mode 1 and mode 3 in this case, I'm guessing. > + > + +---------+--------------+-------------+ > + | Device | Resolution | Channels | > + |---------|--------------|-------------| > + | MCP4801 | 8-bit | 1 | > + | MCP4802 | 8-bit | 2 | > + | MCP4811 | 10-bit | 1 | > + | MCP4812 | 10-bit | 2 | > + | MCP4821 | 12-bit | 1 | > + | MCP4822 | 12-bit | 2 | > + +---------+--------------+-------------+ > + > + Datasheet: > + MCP48x1: https://ww1.microchip.com/downloads/en/DeviceDoc/22244B.pdf > + MCP48x2: https://ww1.microchip.com/downloads/en/DeviceDoc/20002249B.= pdf > + > +maintainers: > + - Anshul Dalal > + > +properties: > + compatible: > + enum: > + - microchip,mcp4801 > + - microchip,mcp4802 > + - microchip,mcp4811 > + - microchip,mcp4812 > + - microchip,mcp4821 > + - microchip,mcp4822 > + > + reg: > + maxItems: 1 > + > + vdd-supply: true What about the SHDN and LDAC pins? It seems like all should have an ldac-gpios property and MCP48x1 should have a shdn-gpios property for these. > + > +required: > + - compatible > + - reg > + - vdd-supply > + > +additionalProperties: false > + > +examples: > + - | > + spi { > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + > + dac@0 { > + compatible =3D "microchip,mcp4821"; > + reg =3D <0>; > + vdd-supply =3D <&vdd_regulator>; > + }; > + }; > -- > 2.43.0 > >