From patchwork Mon Feb 12 12:45:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 128025 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3173720ljc; Mon, 12 Feb 2018 04:45:52 -0800 (PST) X-Google-Smtp-Source: AH8x224SnALVHKMG8xzZ+QUBVeeQ6mhjKEVXlT5VARJ8NTufsQ9x1RymHDiDlDuXIevR6GOqHl68 X-Received: by 2002:a17:902:7683:: with SMTP id m3-v6mr7256613pll.316.1518439551896; Mon, 12 Feb 2018 04:45:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518439551; cv=none; d=google.com; s=arc-20160816; b=S881uwB2wlOVGjB4hikNGD+aOH6Wj+eOMK7e7EBTbL6C88TmzNiAp3345qC5B5inDP Fvyr5UaqV1tzHY7emhuzXS3puEo6jFfBEkCSaH2MDTBZH2K43tBcSrDTDD8C2lmRQZ1Y XRC+H/fZz8WJnpUxaTRNRSTZBxExnVzxYD9QvM9twx29t3aczBunDW5MWalr9Lq//pv1 RdIlEgDx70yRGmfQcCpytxY2m8wwnYdeoKFib4dBJdNzFphqpeqr2MxuIXV7zeVutaZb ySLkqmJyT9T/oNpZdcOQfLpLrleOCq0Hy+NrXUHjuS9zauVMOJ2oP3/rrn1PXiguzoi3 r5Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=3N7X/S8kil9ZpfY7pwzxvrtUgUFH/B0/I7GCZipwUCM=; b=gwbMuHNzP33v6S/8N74dAoDwAsDv3dvxFv9tdw44h8Hyc7lz+adLNHEsY3np81zpAN jIAL9SD0dl3s0ewRN28DJKsQ9VKfO95HhFN7D0ARzaSCbYlS9fXo3LhzXyqsdAYi4HGo mihE5o3POW6E4XwHIYbcyERw+IhSUUZg2a1r3ukFfQlo/kTYB9425/XoXH7JVw7ayTiH K0uTClMunI2ofbbYmir/xka2wAYS2wZY59Z75+/RmYsZDQ/5KU4CMRr5JalmA0zDUZQt wC1I5StAoEv36DwuJ9F5Qm8aMHApBCo9+k6m8tz1CgKeGJGM/E8dgwdw81u6pk7Z7KeX Reiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=PVbQxUbO; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l14si5129059pgs.521.2018.02.12.04.45.51; Mon, 12 Feb 2018 04:45:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=PVbQxUbO; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934684AbeBLMpu (ORCPT + 5 others); Mon, 12 Feb 2018 07:45:50 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:33572 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934681AbeBLMpt (ORCPT ); Mon, 12 Feb 2018 07:45:49 -0500 Received: by mail-lf0-f67.google.com with SMTP id j193so4289011lfe.0 for ; Mon, 12 Feb 2018 04:45:49 -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=GTuZT81qp8RF++rGzl75R5qcI6AEPbDS7/Jgvtjse3I=; b=PVbQxUbOXH0BpmNRYdfLRNeLgWY7spLx6K/6FPOWYZ3Etrh3nu4RAZ/y1+N++pGHtZ gfK2F6Hid0PHrd4esAClpBsw3OW3VkmyYDIWRkl3DYegasc/TCkcdCg4YALWaftuJwmI F6WizdF9nru09jS2E3NqmZNjTLnPyP6ECAQ+w= 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=GTuZT81qp8RF++rGzl75R5qcI6AEPbDS7/Jgvtjse3I=; b=WQwXjBf1K88i0v4JNETUp7PawaM+WCIHisAzXFZ16YxgRj6/bY/VyLQOS3+g8qGgC/ FPJ9BDT1rESNvJ9N3BdiboZEYU8yuHkRilTmYkxRY3FUoS75Wh8rJm01V+vs59RAnukZ yu87QV16zwkwiX896NynXI41YjhzIThR0yU+rpDkdVPACm0d01DMSW+6MkRuN5Pb/B8o RjXcEWd5aJQNjG7k3ZqWxmYYnKZ78PZRcJ7Oj1yTnoreSZrLspf4gaZKTmzHKvYZ3pyz SMhFTHaREX6usd+fYZqdzevtREm2eHpri0rvrBidusRf3jPdmT2YcgxyCtkGZIMj/XOD fVzA== X-Gm-Message-State: APf1xPBwIReo5GhbsGMK3EKU2k1RFnLuKw7W8wBx/xdG5D04gvLUzaQT p6y3EKn0dwlLRkKLgvPv8jpRVA== X-Received: by 10.25.105.17 with SMTP id e17mr6758940lfc.138.1518439548498; Mon, 12 Feb 2018 04:45:48 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id 5sm1588740ljv.29.2018.02.12.04.45.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Feb 2018 04:45:47 -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, Rob Herring Subject: [PATCH 3/3] spi: spi-gpio: Augment device tree bindings Date: Mon, 12 Feb 2018 13:45:32 +0100 Message-Id: <20180212124532.25776-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180212124532.25776-1-linus.walleij@linaro.org> References: <20180212124532.25776-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 Cc: Rob Herring Signed-off-by: Linus Walleij --- Documentation/devicetree/bindings/spi/spi-gpio.txt | 24 ++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) -- 2.14.3 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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>;