From patchwork Sat Jul 21 19:59:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Folkesson X-Patchwork-Id: 10539015 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B3B9CA68F for ; Sun, 22 Jul 2018 00:57:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D4EB288D0 for ; Sat, 21 Jul 2018 20:22:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4FD5828B3D; Sat, 21 Jul 2018 20:22:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A195C288D0 for ; Sat, 21 Jul 2018 20:22:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728145AbeGUVQZ (ORCPT ); Sat, 21 Jul 2018 17:16:25 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:35180 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727974AbeGUVQY (ORCPT ); Sat, 21 Jul 2018 17:16:24 -0400 Received: by mail-lf1-f67.google.com with SMTP id f18-v6so3925880lfc.2; Sat, 21 Jul 2018 13:22:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pB4WGB3VFQ2FWQ619kOnwU1YCO9kt/VNE4GZTFk+Soo=; b=iCJq6L04KGEIMI42wdezBl/33AzT6FXRXFMmk9jfw3jszsOq3CTrfj1vuhq8drFcLz JiIZffkm8R4TbJ76FL4c0weIl/LV23CqwuTN7BwMHHw1wS4r4Qef5ENU2Ofp1YT5Pfv0 SXDlfyKjtg6yX3qHoQXbph34jOq7+Dk2zalogOC0Z+yAkof+F+vnAtFi279kGbaxtxR6 M8AF3vMYrUBNSOheU7qxDnpmIpEGEjsRweYzrIMCmBmAiC8+jRhPzlXB9AxbHWxL1ZvC RHiK6X5Z2YavSAV6/upIhDEJ1WQxyWE0Donf4XqiKyNGwizUXuCms1zWZYWCqatFlDIK pF7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pB4WGB3VFQ2FWQ619kOnwU1YCO9kt/VNE4GZTFk+Soo=; b=cw69JunA+DSVqSzNHvxfDMH1idSLATt53K/9a4Wqhoie38QwdeWUizKxR+0Mq6zYfl x458pAtuq1cuH1eoUxBTt0kRSi3eLvnPeUn6DhQVqY4nqLytLTeaXe7CPZU1u70Hseva 0Y6uorgc6grMCWtbDNPxJmS2awiIjEkG3fAJLvoVVQQOTVhKDSdrdCyvDpVqST1ikuJZ 9GP9+Wrv+Cm3rjbOMsgBrDGbbGiinXM1QAdL+O0PZ4W2PWzcgt9k7UGICNmNKjFK0f9l wDcjnbOcn1jKuujFk2pyYxNgD6i5QLkVHsHYuSfbbjbN0heFGP8dUzntzQaP8FNpaeWn bCJw== X-Gm-Message-State: AOUpUlFq7edSoP215HfIiwHU6FZS+Te0KnSfbuF9bx4Cq0TxHHv002i0 AmuQFrOuxs6IPiOKZGRYL4Y= X-Google-Smtp-Source: AAOMgpdqyoDiDCgDmf1nZ/9AwuzkyVTU78Z+L/Jcz7t7zpY0EXwqIXW1WEE1lSie0PDh/L1vPtM6GQ== X-Received: by 2002:a19:8e5c:: with SMTP id q89-v6mr3905923lfd.35.1532204544282; Sat, 21 Jul 2018 13:22:24 -0700 (PDT) Received: from localhost.localdomain (c-2ec2f9f0-74736162.cust.telenor.se. [46.194.249.240]) by smtp.gmail.com with ESMTPSA id z5-v6sm756742lff.96.2018.07.21.13.22.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Jul 2018 13:22:23 -0700 (PDT) From: Marcus Folkesson To: Marcus Folkesson , Kent Gustavsson , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Mark Rutland Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] dt-bindings: iio: adc: add bindings for mcp3911 Date: Sat, 21 Jul 2018 21:59:22 +0200 Message-Id: <20180721195923.7610-2-marcus.folkesson@gmail.com> X-Mailer: git-send-email 2.11.0.rc2 In-Reply-To: <20180721195923.7610-1-marcus.folkesson@gmail.com> References: <20180721195923.7610-1-marcus.folkesson@gmail.com> Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP MCP3911 is a dual channel Analog Front End (AFE) containing two synchronous sampling delta-sigma Analog-to-Digital Converters (ADC). Signed-off-by: Marcus Folkesson Signed-off-by: Kent Gustavsson --- .../devicetree/bindings/iio/adc/mcp3911.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/mcp3911.txt diff --git a/Documentation/devicetree/bindings/iio/adc/mcp3911.txt b/Documentation/devicetree/bindings/iio/adc/mcp3911.txt new file mode 100644 index 000000000000..e233ee94ad96 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/mcp3911.txt @@ -0,0 +1,33 @@ +* Microchip MCP3911 Dual channel analog front end (ADC) + +Required properties: + - compatible: Should be "microchip,mcp3911" + - reg: SPI chip select number for the device + +Recommended properties: + - spi-max-frequency: Definition as per + Documentation/devicetree/bindings/spi/spi-bus.txt. + Max frequency for this chip is 20MHz. + +Optional properties: + - device-addr: Device address when multiple MCP3911 chips are present on the + same SPI bus. Valid values are 0-3. Defaults to 0. + - external-clock: Use external clock instead of crystal oscillator. + - external-vref: Use external voltage reference + - vref-supply: Phandle to the external reference voltage supply. (only valid in combination with `external-vref`) + - ch0-width: width for channel0. Valid widths are 16 and 24bits. + - ch1-width: width for channel1. Valid widths are 16 and 24bits. + + +Example: +adc@0 { + compatible = "microchip,mcp3911"; + reg = <0>; + spi-max-frequency = <20000000>; + device-addr = <0>; + ch0-width = <16>; + ch1-width = <24>; + external-clock; + external-vref; + vref-supply = <&vref_reg>; +};