From patchwork Mon Feb 26 07:45:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 10241345 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E863B60386 for ; Mon, 26 Feb 2018 07:46:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C91822998A for ; Mon, 26 Feb 2018 07:46:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BDA5629995; Mon, 26 Feb 2018 07:46:14 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, 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 793EA2998A for ; Mon, 26 Feb 2018 07:46:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750882AbeBZHqM (ORCPT ); Mon, 26 Feb 2018 02:46:12 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:32772 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751963AbeBZHqL (ORCPT ); Mon, 26 Feb 2018 02:46:11 -0500 Received: by mail-lf0-f67.google.com with SMTP id o145so17545573lff.0 for ; Sun, 25 Feb 2018 23:46:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dsYPvK3BFTEwXMF173EPTFaD/8lv/9E7kERgdNpWJGQ=; b=MOWdLd4Ms2Xt+H9BKfkKh9y9xUt1C/H2paBZHcpzsS91FW1f7akvSX2j1pM4UD0qbn JvlRNICa0LW7DqN5SL7sH9zPFoSPvPyXmtVak3WwPFcNTkp13+jUB0D5gyFzxTf+S/tn aZ/KDEz+zkrF5wVit/7jgzASdPsRVzJ7ToYTg= 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=dsYPvK3BFTEwXMF173EPTFaD/8lv/9E7kERgdNpWJGQ=; b=AMF0zG5e4a/3TnezKDE7Y7Pfrv0xPvhE/mkMgp8ObcrPeTWGS7ZI2Ko2mYPNa6+1eB aQsU/MoMYyPopmS90EIXCNO9xItu2gyLN03lrVGsCxgkgbqhDSiOpQB/YGcDRsjPjeEb XLibIfL563FeSMKLFu58ojMDnPK3ht2vNh/mBEULpVD5H1IG+oARYFdlmD0SWr6AwNNo A7UB6s10X5BhBYkCnKv025ktyX983rmxSPUytiMZ4R90mxMfyjSi96qBhax3FtTDSEo8 dGcsOCjjuKqKKFy/DcWSXer9VtidPwEmXhQ1ydsaE7s9qyT5rhwpajHeqZa4MCodO4ou PLEA== X-Gm-Message-State: APf1xPDVyTcmKXhhWZ3t9aNybcwSYSRN8cZEfZYszO6wnVH7hwOZe390 QriUdqUxourWbD7Hrk2bSKcBow== X-Google-Smtp-Source: AG47ELu77mr/Y9sSB0ESn/7QiVKZpwVGlW93KIN14Mm7ddQvLlZUCqG84Adz9EcE5aW5KA+ZC+vyUw== X-Received: by 10.25.32.203 with SMTP id g194mr6559138lfg.101.1519631170056; Sun, 25 Feb 2018 23:46:10 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id 70sm1860772lft.2.2018.02.25.23.46.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 25 Feb 2018 23:46:09 -0800 (PST) From: Linus Walleij To: Mark Brown , linux-spi@vger.kernel.org Cc: linux-gpio@vger.kernel.org, Linus Walleij , devicetree@vger.kernel.org Subject: [PATCH 2/2 v3] spi: spi-gpio: Augment device tree bindings Date: Mon, 26 Feb 2018 08:45:59 +0100 Message-Id: <20180226074559.3227-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180226074559.3227-1-linus.walleij@linaro.org> References: <20180226074559.3227-1-linus.walleij@linaro.org> Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP After we augmented the core to handle "gpio-sck"/"sck-gpios", "gpio-mosi"/"mosi-gpios", "gpio-miso"/"miso-gpios" alike, deprecate the old binding and put the strict modern and recommended binding practice into place as the default for GPIO-based SPI. This reflects the similar change in I2C: commit 7d29f509d2cf ("dt-bindings: i2c: i2c-gpio: Add support for named gpios") Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Collect Rob's ACK. --- Documentation/devicetree/bindings/spi/spi-gpio.txt | 24 ++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/spi/spi-gpio.txt b/Documentation/devicetree/bindings/spi/spi-gpio.txt index a95603bcf6ff..52db562f17a4 100644 --- a/Documentation/devicetree/bindings/spi/spi-gpio.txt +++ b/Documentation/devicetree/bindings/spi/spi-gpio.txt @@ -1,18 +1,30 @@ SPI-GPIO devicetree bindings +This represents a group of 3-n GPIO lines used for bit-banged SPI on dedicated +GPIO lines. + Required properties: - compatible: should be set to "spi-gpio" - #address-cells: should be set to <0x1> - ranges - - gpio-sck: GPIO spec for the SCK line to use - - gpio-miso: GPIO spec for the MISO line to use - - gpio-mosi: GPIO spec for the MOSI line to use + - sck-gpios: GPIO spec for the SCK line to use + - miso-gpios: GPIO spec for the MISO line to use + - mosi-gpios: GPIO spec for the MOSI line to use - cs-gpios: GPIOs to use for chipselect lines. Not needed if num-chipselects = <0>. - num-chipselects: Number of chipselect lines. Should be <0> if a single device with no chip select is connected. +Deprecated bindings: + +These legacy GPIO line bindings can alternatively be used to define the +GPIO lines used, they should not be used in new device trees. + + - gpio-sck: GPIO spec for the SCK line to use + - gpio-miso: GPIO spec for the MISO line to use + - gpio-mosi: GPIO spec for the MOSI line to use + Example: spi { @@ -20,9 +32,9 @@ Example: #address-cells = <0x1>; ranges; - gpio-sck = <&gpio 95 0>; - gpio-miso = <&gpio 98 0>; - gpio-mosi = <&gpio 97 0>; + sck-gpios = <&gpio 95 0>; + miso-gpios = <&gpio 98 0>; + mosi-gpios = <&gpio 97 0>; cs-gpios = <&gpio 125 0>; num-chipselects = <1>;