From patchwork Sun Nov 18 04:25:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matheus Tavares X-Patchwork-Id: 10687693 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 DDA81109C for ; Sun, 18 Nov 2018 04:26:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDD3129F29 for ; Sun, 18 Nov 2018 04:26:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C083A29F61; Sun, 18 Nov 2018 04:26:52 +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 4F95929F29 for ; Sun, 18 Nov 2018 04:26:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727056AbeKROp3 (ORCPT ); Sun, 18 Nov 2018 09:45:29 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:34041 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727033AbeKROp2 (ORCPT ); Sun, 18 Nov 2018 09:45:28 -0500 Received: by mail-qk1-f193.google.com with SMTP id a132so43892133qkg.1 for ; Sat, 17 Nov 2018 20:26:28 -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=LbTCHeHGilCnfPYHT4tj0WlGCcK4WPxi/1Koox5eezY=; b=TTYvO4L9TcRHBUUw2NnvzLiUiM3++li0s4a7l/VOBv/6bAH987r2kgUZTvtYFJumC1 UZy91qqULKSAqYS7er192QUFA+Ti3kKn4PrCqc0WRTkFrTOWJWHNPbqVuQdONeZRt4mT pdxQI3CpZMm854UoKowpiJdiRQAmw6WGn0HKrTwxKQCASX9MYIJ/aPQo/VydLkvaGyaB ea4PCOASYqGNHsYBnkuS64WMIG4TqlTdaDu/M0OH342KyoOw6IfvjlVAYQTWzmnn+WKC CJ2GvZKGI+S+FypjbCpeSdslYANH4uAI3ZoIOfVykmAUNS6HqYd5R8T9gB+uVbNCTIjB T78A== 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=LbTCHeHGilCnfPYHT4tj0WlGCcK4WPxi/1Koox5eezY=; b=edM+sW1eWCOb0Zz2HX5XdsCnmlAZTWiqgGsP6qkxs2WchgfYW7ATjZT/e8rVhYVKA/ 2BPc8Kfequx3blGBBTJnK2Qs0CY5PtfQe56d5VD254KRAARp+3ux332i+C23e6oBokzj 7RsYPfZbh5Ei/Dp0jljq70vCFIOcD1ErJyRWw/MEmnIUx2/k+zl7Lekc3/JdWJhKYR67 3oxPRMSQxe+KwLdGL5+lPR8QfLIKm5wsizxwHuciQ6GT5db9iCB0DfwR4/N91+HdnyaM OdFvNeunXkvs1cdeY6De8JOEgDGoBKQVPnPdsBM6K40jkWAD1OVdc8YCLPtgYsCMPb5n 8Y5A== X-Gm-Message-State: AGRZ1gJbe6+hiQ/tpSvyhWplrpDLTZ0JMcEOuWDM8gfztfJ96HJd0Max QL+aY7OW4JwMEhkPFeAfEhOH4A== X-Google-Smtp-Source: AJdET5cj17K9hOJ2qdLJcjLj5wyrp0r54jer/usB4snabjxxPT/OptGG0AG3DMR4u3kDF/hJOzUtjA== X-Received: by 2002:ac8:22ca:: with SMTP id g10mr16745011qta.105.1542515187492; Sat, 17 Nov 2018 20:26:27 -0800 (PST) Received: from mango.spo.virtua.com.br ([2804:14c:81:942d::1]) by smtp.gmail.com with ESMTPSA id b6sm16112350qtq.29.2018.11.17.20.26.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Nov 2018 20:26:27 -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 v2 4/7] dt-bindings:iio:resolver: Add docs for ad2s90 Date: Sun, 18 Nov 2018 02:25:37 -0200 Message-Id: <20181118042540.12697-5-matheus.bernardino@usp.br> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181118042540.12697-1-matheus.bernardino@usp.br> References: <20181118042540.12697-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 --- 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 | 28 +++++++++++++++++++ 1 file changed, 28 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..594417539938 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/resolver/ad2s90.txt @@ -0,0 +1,28 @@ +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. + +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; +};