linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars Povlsen <lars.povlsen@microchip.com>
To: Mark Brown <broonie@kernel.org>, Peter Rosin <peda@axentia.se>,
	"Rob Herring" <robh+dt@kernel.org>
Cc: Lars Povlsen <lars.povlsen@microchip.com>,
	Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>,
	<linux-spi@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	Serge Semin <fancer.lancer@gmail.com>,
	Serge Semin <Sergey.Semin@baikalelectronics.ru>
Subject: [PATCH v3 6/8] dt-bindings: microchip,sparx5-spi-mux: Add Sparx5 SPI mux driver bindings
Date: Thu, 2 Jul 2020 12:13:29 +0200	[thread overview]
Message-ID: <20200702101331.26375-7-lars.povlsen@microchip.com> (raw)
In-Reply-To: <20200702101331.26375-1-lars.povlsen@microchip.com>

The Microchip Sparx5 SPI controller has two bus segments, and use this
mux to control the bus interface mapping for any chip selects. This
decribes the bindings used to configure the mux driver.

Signed-off-by: Lars Povlsen <lars.povlsen@microchip.com>
---
 .../mux/microchip,sparx5-spi-mux.yaml         | 71 +++++++++++++++++++
 1 file changed, 71 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mux/microchip,sparx5-spi-mux.yaml

diff --git a/Documentation/devicetree/bindings/mux/microchip,sparx5-spi-mux.yaml b/Documentation/devicetree/bindings/mux/microchip,sparx5-spi-mux.yaml
new file mode 100644
index 0000000000000..b0ce3b15a69e5
--- /dev/null
+++ b/Documentation/devicetree/bindings/mux/microchip,sparx5-spi-mux.yaml
@@ -0,0 +1,71 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mux/microchip,sparx5-spi-mux.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip Sparx5 SPI mux
+
+maintainers:
+  - Lars Povlsen <lars.povlsen@microchip.com>
+
+description: |
+  The Microchip Sparx5 SPI controller has two bus segments. In order
+  to switch between the appropriate bus for any given SPI slave
+  (defined by a chip select), this mux driver is used. The device tree
+  node for the mux will define the bus mapping for any chip
+  selects. The default bus mapping for any chip select is "0", such
+  that only non-default mappings need to be explicitly defined.
+
+properties:
+  compatible:
+    enum:
+      - microchip,sparx5-spi-mux
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 0
+
+  '#mux-control-cells':
+    const: 0
+
+required:
+  - compatible
+
+additionalProperties: false
+
+patternProperties:
+  "^mux@[0-9a-f]$":
+    type: object
+
+    properties:
+      reg:
+        description:
+          Chip select to define bus mapping for.
+        minimum: 0
+        maximum: 15
+
+      microchip,bus-interface:
+        description:
+          The bus interface to use for this chip select.
+        $ref: /schemas/types.yaml#/definitions/uint32
+        enum: [0, 1]
+
+    required:
+      - reg
+      - microchip,bus-interface
+
+examples:
+  - |
+    mux: mux-controller {
+      compatible = "microchip,sparx5-spi-mux";
+      #address-cells = <1>;
+      #size-cells = <0>;
+      #mux-control-cells = <0>;
+      mux@e {
+        reg = <14>;
+        microchip,bus-interface = <1>;
+      };
+    };
--
2.27.0

  parent reply	other threads:[~2020-07-02 10:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02 10:13 [PATCH v3 0/8] spi: Adding support for Microchip Sparx5 SoC Lars Povlsen
2020-07-02 10:13 ` [PATCH v3 1/8] spi: dw: Add support for RX sample delay register Lars Povlsen
2020-07-02 10:13 ` [PATCH v3 2/8] arm64: dts: sparx5: Add SPI controller and SPI mux Lars Povlsen
2020-07-02 10:13 ` [PATCH v3 3/8] spi: dw: Add Microchip Sparx5 support Lars Povlsen
2020-07-02 10:13 ` [PATCH v3 4/8] mux: sparx5: Add Sparx5 SPI mux driver Lars Povlsen
2020-07-02 11:33   ` Lars Povlsen
2020-07-02 11:36   ` Peter Rosin
2020-07-03  9:14     ` Lars Povlsen
2020-07-02 10:13 ` [PATCH v3 5/8] dt-bindings: snps,dw-apb-ssi: Add sparx5 support, plus snps,rx-sample-delay-ns property Lars Povlsen
2020-07-13 19:22   ` Rob Herring
2020-07-13 19:52     ` Serge Semin
2020-07-14  8:30       ` Lars Povlsen
2020-07-02 10:13 ` Lars Povlsen [this message]
2020-07-13 19:29   ` [PATCH v3 6/8] dt-bindings: microchip,sparx5-spi-mux: Add Sparx5 SPI mux driver bindings Rob Herring
2020-07-14  8:52     ` Lars Povlsen
2020-07-02 10:13 ` [PATCH v3 7/8] arm64: dts: sparx5: Add spi-nor support Lars Povlsen
2020-07-02 10:13 ` [PATCH v3 8/8] arm64: dts: sparx5: Add spi-nand devices Lars Povlsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200702101331.26375-7-lars.povlsen@microchip.com \
    --to=lars.povlsen@microchip.com \
    --cc=Sergey.Semin@baikalelectronics.ru \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fancer.lancer@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=peda@axentia.se \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).