[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200703141246.17281-2-adrian.fiergolski@fastree3d.com>
Date: Fri, 3 Jul 2020 16:12:44 +0200
From: Adrian Fiergolski <adrian.fiergolski@...tree3d.com>
To: unlisted-recipients:; (no To-header on input)
Cc: geert@...ux-m68k.org, lukas@...ner.de,
Adrian Fiergolski <adrian.fiergolski@...tree3d.com>,
Mark Brown <broonie@...nel.org>,
Rob Herring <robh+dt@...nel.org>, linux-spi@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] dt-bindings: Add documentation for SPI daisy chain driver.
Add documentation for SPI daisy chain driver.
Signed-off-by: Adrian Fiergolski <adrian.fiergolski@...tree3d.com>
---
.../bindings/spi/spi-daisy_chain.txt | 56 +++++++++++++++++++
1 file changed, 56 insertions(+)
create mode 100644 Documentation/devicetree/bindings/spi/spi-daisy_chain.txt
diff --git a/Documentation/devicetree/bindings/spi/spi-daisy_chain.txt b/Documentation/devicetree/bindings/spi/spi-daisy_chain.txt
new file mode 100644
index 000000000000..1e5b046dda83
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi-daisy_chain.txt
@@ -0,0 +1,56 @@
+spi-daisy_chain : The driver handling SPI daisy chains.
+-----------------------------------------------------------
+
+Required properties:
+- compatible : Should be "spi,daisy_chain"
+- reg : Chip select assigned to the chain
+
+ For the SPI devices on a common SPI chain - nodes of daisy_chain):
+- spi-daisy-chain-len : Length (in bytes) of the SPI transfer,
+ when the SPI device is part of a device chain.
+- spi-daisy-chain-noop : Byte string of no-operation command which should
+ be send when device is not addressed during the
+ given SPI transfer
+
+Optional properties:
+ (for the SPI devices on a common SPI chain (nodes of daisy_chain):
+- spi-daisy-chain-bits_per_word : no-operation transfers involve
+ one or more words; word sizes like
+ eight or 12 bits are common.
+ In-memory wordsizes are powers of two
+ bytes (e.g. 20 bit samples use 32 bits).
+ If not defined, it is assumed to be 8.
+
+The daisy chain is a virtual device represented as a regular SPI device. Its
+nodes define physical devices available on the chain. The order of the nodes
+defines the order of the physical devices on the chain: MOSI pin of a device
+represented by the first node is the last one on the MOSI daisy chain. The
+daisy-chain functionality is transparent to the drivers of the physical devices
+on the chain. All nodes share SPI mode, chip select and a max speed of the
+virtual daisy chain device. Once one of the physical devices is being accessed,
+the spi-daisy_chain driver combines this data with no-operation commands of all
+other devices on the chain.
+
+Example:
+
+ daisy_chain0: daisy_chain@0 {
+ compatible = "spi,daisy_chain";
+ spi-max-frequency = <10000000>;
+ reg = <0>;
+
+ dac0: ltc2632@0 {
+ compatible = "lltc,ltc2634-l12";
+ spi-daisy-chain-len = <4>;
+ spi-daisy-chain-noop = [00 F0 00 00];
+ };
+ dac1: ltc2632@1 {
+ compatible = "lltc,ltc2634-l12";
+ spi-daisy-chain-len = <4>;
+ spi-daisy-chain-noop = [00 F0 00 00];
+ };
+ dac2: ltc2632@2 {
+ compatible = "lltc,ltc2634-l12";
+ spi-daisy-chain-len = <4>;
+ spi-daisy-chain-noop = [00 F0 00 00];
+ };
+ };
--
2.27.0
Powered by blists - more mailing lists