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: 129557 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3330072lja; Sun, 25 Feb 2018 23:46:13 -0800 (PST) X-Google-Smtp-Source: AH8x2243bqeVN7VQb/zqK8EEvHItLlLahaTZT0DYAkRcJ1MWwx8i11HtYE8MHifuYEu+mZdEMQuZ X-Received: by 2002:a17:902:820a:: with SMTP id x10-v6mr9886301pln.364.1519631173735; Sun, 25 Feb 2018 23:46:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519631173; cv=none; d=google.com; s=arc-20160816; b=kGHEvmYNmxVHUbjIHoVFReEGUaQZKdApg1BTw5mw3J7BUb341rtog/tS6/rhDKgaC2 PV2S/2ALmBclQ4HJ68PT4ll/rHCsdGtzCy8mpPLhkoojE0rwLm/mE9BAk0eN3OEoKoyA JD7/PRQZ+zzhyzloWSSLNWPlOJnFKlFg/jGcTHtr3gTSxQTZUqy+qei4u58WSRbjub0W hIEGEkD78e1Aktx0MuzV+bGULhYun99Zwu2V2huXFwOgY+NInDxTI3mOaVK5l6ksciFz fvAfwjbln8+o8q0q7EE+IgCaSgEwueYaFdPWcTGNLAySuO0/UabWRR8PgsqgwA5igsWN ACTw== 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=/jgd+/zPcvR9Ms277my4o4G833mspc7zzd6wIDgZ/YE=; b=Vu8bWJMnZdUKpG8gHRY2MZYW5v9vU+lRltyRCSlxCuR/d4Gz+frcw0NPxl9NsFLsQi 3Ekki962GKJy5pzKG6Mz51tHpm8u0li1gXVUEVEpctn2jfHLYHyuP7IXJlhyGoV5He1z 6mnd7qIMaK8eWghrNWeSMUyTux0oD3CSBfFzBq4IEcW5KeqvAT5aB+iZGLwir96f1nvC ZFQZhX1xE4LQ001a+TK002RE2y3OJMGNJ1L7ig8Kx7NJCEChpFJuizeOAjSRrKx5AcF/ EUPnzZdOwuP5Q/6bHovVSVDqHUYGGQeGZFqkA92VtpwjymYLsdcKfmAL71b7iySKGcwS LmoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=MOWdLd4M; spf=pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-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 b2-v6si6508086pll.483.2018.02.25.23.46.13; Sun, 25 Feb 2018 23:46:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-spi-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=MOWdLd4M; spf=pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-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 S1750882AbeBZHqM (ORCPT + 1 other); 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-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 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(-) -- 2.14.3 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" 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>;