From patchwork Sat Nov 24 00:23:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matheus Tavares X-Patchwork-Id: 10696399 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 97C4813BF for ; Sat, 24 Nov 2018 00:24:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 864CD2B437 for ; Sat, 24 Nov 2018 00:24:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A64F2B5D7; Sat, 24 Nov 2018 00:24:12 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 1A1202B437 for ; Sat, 24 Nov 2018 00:24:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728326AbeKXLKF (ORCPT ); Sat, 24 Nov 2018 06:10:05 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:34500 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728313AbeKXLKE (ORCPT ); Sat, 24 Nov 2018 06:10:04 -0500 Received: by mail-qt1-f195.google.com with SMTP id r14so12058521qtp.1 for ; Fri, 23 Nov 2018 16:23:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=usp-br.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oroyWqz7mhwKQukHd290ZNW1AWaEfORaZNjSC7qXdww=; b=BYGwc2t+78nSAvWlAoJvLaAmAwN1ZVk/Qj4LJBbed0k+XO9/aUiy2xhGc+hK/hAZkZ pMd3w5zXmFXuwuf2G243LRnK0uNgHb9aqyFJektF4xj6Q+yUQ3iXwBmgRSaRC9iO3IUf 31slpD2Wj0RlAyR8AvmRyZPQvtIzskP2hActL81Z9i9Xx1J2vfAQSGVuwAdfX0q1orH6 ZpOz19zw+LV323H1nDqnm/Hcc1ZRyJmLOnSZmLvktSGtW3nKXbG7LXRDrhHqEJvwEG1g Qc+Vs9BxjQgALn1oDeUu9+dQoo336blSsGIqYtVH+wyGW7g/p6vard7M3meDK6+7owe/ 1Jiw== 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=oroyWqz7mhwKQukHd290ZNW1AWaEfORaZNjSC7qXdww=; b=FejVnGx8SpTGjZPKfcCnrEOd0IB/ovG1R9kJclc6jVySZasCtdljOI0UwEeF2vstUH 6QCeNVCDHiTrrSU+b4UZIGzueFr3pJmDgSZWiTopVdWvbkzLFWkuzMdy/dc79X1crpQf pvRBVg3JNl0RNQqpwGMu+IBc4K1ExusB60y+IwDhis+8PvGNFzV1lpBtY5+Iu3Gd/rz4 cFi3xfa8u4mWlxKud2PUzWJEZscOK1+XTcRu6N+8bO2fLnYStCQPittWuRyf9HxjtFzw xjdfCywQJMKgF2gTrxl3X1YxJ+dmiZYuQyHjVQK3voKZo5UIDcdyn8Utr9x2wqiG1oDv yPag== X-Gm-Message-State: AA+aEWbrBRGAVal2iHiYzpXdHx85OFTVMQb0ZfZdnyb3TV7sQz+wI4GO vSNW07ZipOwKTUZaZLAL44ED2w== X-Google-Smtp-Source: AJdET5frUkPkzzrbrfSqMk1BTi1FOy8WYbKVrirfDYOci7yt9b8LyaBNeWMjvjxM65hKPnQhEOZNcg== X-Received: by 2002:ac8:543:: with SMTP id c3mr16913925qth.34.1543019022545; Fri, 23 Nov 2018 16:23:42 -0800 (PST) Received: from mango.spo.virtua.com.br ([2804:14c:81:942d::3]) by smtp.gmail.com with ESMTPSA id o34sm26707515qte.4.2018.11.23.16.23.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Nov 2018 16:23:42 -0800 (PST) From: Matheus Tavares To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Hartmut Knaack , Peter Meerwald-Stadler , Greg Kroah-Hartman , Rob Herring , Mark Rutland Cc: linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Alexandru Ardelean , kernel-usp@googlegroups.com, victorcolombo@gmail.com Subject: [PATCH v3 4/7] dt-bindings:iio:resolver: Add docs for ad2s90 Date: Fri, 23 Nov 2018 22:23:09 -0200 Message-Id: <20181124002312.6923-5-matheus.bernardino@usp.br> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181124002312.6923-1-matheus.bernardino@usp.br> References: <20181124002312.6923-1-matheus.bernardino@usp.br> 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 This patch adds the device tree binding documentation for the ad2s90 resolver-to-digital converter. Signed-off-by: Matheus Tavares Reviewed-by: Rob Herring --- Changes in v3: - Added reference to spi-bus documentation after spi properties, as suggested by Alexandru Ardelean. Changes in v2: - Rewritten 'spi-cpol and spi-cpha' item to say that the device can work in either mode (0,0) or (1,1) and explain how they should be specified in DT. .../bindings/iio/resolver/ad2s90.txt | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/resolver/ad2s90.txt diff --git a/Documentation/devicetree/bindings/iio/resolver/ad2s90.txt b/Documentation/devicetree/bindings/iio/resolver/ad2s90.txt new file mode 100644 index 000000000000..477d41fa6467 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/resolver/ad2s90.txt @@ -0,0 +1,31 @@ +Analog Devices AD2S90 Resolver-to-Digital Converter + +https://www.analog.com/en/products/ad2s90.html + +Required properties: + - compatible: should be "adi,ad2s90" + - reg: SPI chip select number for the device + - spi-max-frequency: set maximum clock frequency, must be 830000 + - spi-cpol and spi-cpha: + Either SPI mode (0,0) or (1,1) must be used, so specify none or both of + spi-cpha, spi-cpol. + +See for more details: + Documentation/devicetree/bindings/spi/spi-bus.txt + +Note about max frequency: + Chip's max frequency, as specified in its datasheet, is 2Mhz. But a 600ns + delay is expected between the application of a logic LO to CS and the + application of SCLK, as also specified. And since the delay is not + implemented in the spi code, to satisfy it, SCLK's period should be at most + 2 * 600ns, so the max frequency should be 1 / (2 * 6e-7), which gives + roughly 830000Hz. + +Example: +resolver@0 { + compatible = "adi,ad2s90"; + reg = <0>; + spi-max-frequency = <830000>; + spi-cpol; + spi-cpha; +};