From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76AD1C5ACBF for ; Sun, 15 Mar 2020 13:44:37 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4ED4720575 for ; Sun, 15 Mar 2020 13:44:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Oqq5zZmQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4ED4720575 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BC09B6E14D; Sun, 15 Mar 2020 13:44:36 +0000 (UTC) Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id DE0AC6E156 for ; Sun, 15 Mar 2020 13:44:34 +0000 (UTC) Received: by mail-lj1-x241.google.com with SMTP id g12so15626464ljj.3 for ; Sun, 15 Mar 2020 06:44:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=X45tw5KJlXhhJ3R6ynp7V7JRLgh1AOjgAQ5sYiJA7gQ=; b=Oqq5zZmQwYobC/AnUgTbv+2yNqZC1ysfOc2s7Dq7jJeMNanIhWjon9tWa5pfztJ6Oy Pej2RybnxI+89G9uHBa5IkXk6CoAIE/puDgRbN4dc3gybEtjgASgzlhLXnxUkEg0N53g jQkIaV4mdCElNhUzuuB1FR8JWCm8miXnIcYViF/mUf+gziC95xg6kXReV9Lx4NYnRMs5 A6OfsMYAdo36YXPL913Pb/T2v3A1vCVSEDCufLgZM8jA9Lj0wSarOW5f4eT8/GmzkkJ4 I81/N2rLrQxHi7Ren4MnSl5o1/9CHex0yrqCyUS74kwQsglYxMu2soNbKK/M2VHfol5A P5Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=X45tw5KJlXhhJ3R6ynp7V7JRLgh1AOjgAQ5sYiJA7gQ=; b=nEpzZMnnHrSl9+b2zEBGF0qSI91uL3Gx+ZHR1+Ukh9cqIN/J72GaOBlURiXCcZPSWb gWH9iwFQ9rzuz8uybcFg0AKfCqQYY8nCzp3OtfoQ1VWYU8Vgb/4aE/I2OFlwi0vBomg8 el8NEmZU7meXUXexQexOPiuxs/EX7MJWNqs4lh9AszOtFwyOOriDIwL2PTXq5Fm/gZwl 0EOPqbyUWU8DoMQ8k74usVjlutI/dMUbhH9D1xzwC3/3f+8Drd7ZdBh/0yYl1WF/R8tJ i/mpVrgLwvLHGm0w4niASuG6KypqHjObxM4rl0dTJUhSTpdnwJtNiVi8sM+y0yvIv1jb udzA== X-Gm-Message-State: ANhLgQ3QASJYstOmw4z7B40yQmke3XFWZTshC/liur5ih0AfbS/to4HJ 0+H2HVLu2/tMSUc1PbGqnJQhXCDdmMI= X-Google-Smtp-Source: ADFU+vvKezVrr5pKhPKFDDiDBtGVr/h70AHssvhC8VNZHgZJoJYzPcWqdWCvDfcTSWr33npk2S7GtA== X-Received: by 2002:a2e:3002:: with SMTP id w2mr10976729ljw.82.1584279872839; Sun, 15 Mar 2020 06:44:32 -0700 (PDT) Received: from saturn.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id a9sm23025212lfb.21.2020.03.15.06.44.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Mar 2020 06:44:32 -0700 (PDT) From: Sam Ravnborg To: dri-devel@lists.freedesktop.org, Thierry Reding , Rob Herring , devicetree@vger.kernel.org Subject: [PATCH v1 02/36] dt-bindings: spi: support non-spi bindings as SPI slaves Date: Sun, 15 Mar 2020 14:43:42 +0100 Message-Id: <20200315134416.16527-3-sam@ravnborg.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200315134416.16527-1-sam@ravnborg.org> References: <20200315134416.16527-1-sam@ravnborg.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Ripard , Nikolaus Schaller , Jonathan Bakker , Sandeep Panda , Paul Cercueil , Andrzej Hajda , Laurent Pinchart , Chris Zhong , Marco Franchi , Sam Ravnborg , Stefan Mavrodiev , Jerry Han , Hoegeun Kwon , Tony Lindgren , Nickey Yang , Tomi Valkeinen , Jagan Teki , Robert Chiras , Vinay Simha BN , Marek Belisko , Heiko Schocher , Brian Masney , Guido Gunther , Mark Brown , Alexandre Courbot , Werner Johansson , Purism Kernel Team , Peter Ujfalusi , Lin Huang , Douglas Anderson , linux-spi@vger.kernel.org, Peter Rosin Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Independent bindings can be SPI slaves which for example is the case for several panel bindings. Move SPI slave properties to spi-slave.yaml so the independent SPI slave bindings can include spi-slave.yaml rather than duplicating the properties. Signed-off-by: Sam Ravnborg Cc: Maxime Ripard Cc: Rob Herring Cc: Mark Brown Cc: linux-spi@vger.kernel.org --- .../bindings/spi/spi-controller.yaml | 63 +------------- .../devicetree/bindings/spi/spi-slave.yaml | 83 +++++++++++++++++++ 2 files changed, 86 insertions(+), 60 deletions(-) create mode 100644 Documentation/devicetree/bindings/spi/spi-slave.yaml diff --git a/Documentation/devicetree/bindings/spi/spi-controller.yaml b/Documentation/devicetree/bindings/spi/spi-controller.yaml index 1e0ca6ccf64b..99531c8d10dd 100644 --- a/Documentation/devicetree/bindings/spi/spi-controller.yaml +++ b/Documentation/devicetree/bindings/spi/spi-controller.yaml @@ -67,71 +67,14 @@ patternProperties: "^.*@[0-9a-f]+$": type: object + allOf: + - $ref: spi-slave.yaml# + properties: compatible: description: Compatible of the SPI device. - reg: - minimum: 0 - maximum: 256 - description: - Chip select used by the device. - - spi-3wire: - $ref: /schemas/types.yaml#/definitions/flag - description: - The device requires 3-wire mode. - - spi-cpha: - $ref: /schemas/types.yaml#/definitions/flag - description: - The device requires shifted clock phase (CPHA) mode. - - spi-cpol: - $ref: /schemas/types.yaml#/definitions/flag - description: - The device requires inverse clock polarity (CPOL) mode. - - spi-cs-high: - $ref: /schemas/types.yaml#/definitions/flag - description: - The device requires the chip select active high. - - spi-lsb-first: - $ref: /schemas/types.yaml#/definitions/flag - description: - The device requires the LSB first mode. - - spi-max-frequency: - $ref: /schemas/types.yaml#/definitions/uint32 - description: - Maximum SPI clocking speed of the device in Hz. - - spi-rx-bus-width: - allOf: - - $ref: /schemas/types.yaml#/definitions/uint32 - - enum: [ 1, 2, 4, 8 ] - - default: 1 - description: - Bus width to the SPI bus used for MISO. - - spi-rx-delay-us: - description: - Delay, in microseconds, after a read transfer. - - spi-tx-bus-width: - allOf: - - $ref: /schemas/types.yaml#/definitions/uint32 - - enum: [ 1, 2, 4, 8 ] - - default: 1 - description: - Bus width to the SPI bus used for MOSI. - - spi-tx-delay-us: - description: - Delay, in microseconds, after a write transfer. - required: - compatible - reg diff --git a/Documentation/devicetree/bindings/spi/spi-slave.yaml b/Documentation/devicetree/bindings/spi/spi-slave.yaml new file mode 100644 index 000000000000..fa50d9dfab41 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-slave.yaml @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/spi-slave.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: SPI slave generic binding + +maintainers: + - Mark Brown + +description: | + This document defines device tree properties common to SPI slaves. + It doesn't constitue a device tree binding specification by + itself but is meant to be referenced by device tree bindings. + + When referenced from device tree bindings the properties defined in this + document are defined as follows. The device tree bindings are responsible + for defining whether each property is required or optional. + +properties: + + reg: + minimum: 0 + maximum: 256 + description: + Chip select used by the device. + + spi-3wire: + $ref: /schemas/types.yaml#/definitions/flag + description: + The device requires 3-wire mode. + + spi-cpha: + $ref: /schemas/types.yaml#/definitions/flag + description: + The device requires shifted clock phase (CPHA) mode. + + spi-cpol: + $ref: /schemas/types.yaml#/definitions/flag + description: + The device requires inverse clock polarity (CPOL) mode. + + spi-cs-high: + $ref: /schemas/types.yaml#/definitions/flag + description: + The device requires the chip select active high. + + spi-lsb-first: + $ref: /schemas/types.yaml#/definitions/flag + description: + The device requires the LSB first mode. + + spi-max-frequency: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Maximum SPI clocking speed of the device in Hz. + + spi-rx-bus-width: + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - enum: [ 1, 2, 4, 8 ] + - default: 1 + description: + Bus width to the SPI bus used for MISO. + + spi-rx-delay-us: + description: + Delay, in microseconds, after a read transfer. + + spi-tx-bus-width: + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - enum: [ 1, 2, 4, 8 ] + - default: 1 + description: + Bus width to the SPI bus used for MOSI. + + spi-tx-delay-us: + description: + Delay, in microseconds, after a write transfer. + +... -- 2.20.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel