lkml.org 
[lkml]   [2018]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 5/5] spi,can,char: add companion DT binding documentation
Date
From: Zhu Yi <yi.zhu5@cn.bosch.com>

Signed-off-by: Zhu Yi <yi.zhu5@cn.bosch.com>
Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
---
.../devicetree/bindings/spi/bosch,companion.txt | 82 ++++++++++++++++++++++
1 file changed, 82 insertions(+)
create mode 100644 Documentation/devicetree/bindings/spi/bosch,companion.txt

diff --git a/Documentation/devicetree/bindings/spi/bosch,companion.txt b/Documentation/devicetree/bindings/spi/bosch,companion.txt
new file mode 100644
index 0000000..5ded325
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/bosch,companion.txt
@@ -0,0 +1,82 @@
+Bosch Companion SPI slave device
+
+The functionality bases on an external peripheral chip named Companion.
+It offers two CAN interfaces, each has 8 prioritized transmit FIFOs as
+well as one receive FIFO. Besides CAN, undisclosed additional functions
+can be accessed through the char device.
+
+A standard SPI interface with two additional lines for flow control is
+used. The Companion chip is the SPI slave.
+
+The driver suite consists of three separate drivers. The following
+diagram illustrates the dependencies in layers.
+
+ /dev/companion SocketCAN User Space
+-------------------------------------------------------------------
+ +----------------+ +---------------+
+ | companion-char | | companion-can |
+ +----------------+ +---------------+
+ +----------------------------------+
+ | companion-spi |
+ +----------------------------------+
+ +----------------------------------+
+ | standard SPI subsystem |
+ +----------------------------------+ Linux Kernel
+-------------------------------------------------------------------
+ | | | | | | Hardware
+ CS-+ | | | | +-BUSY
+ CLK--+ | | +---REQUEST
+ MOSI---+ |
+ MISO-----+
+
+Required properties:
+
+- compatible : must be "bosch,companion-spi"
+- interrupt-parent : the phandle of the GPIO controller
+- interrupts : (GPIO) interrupt to which 'request-gpios' is
+ connected to
+- request-gpios : GPIO pin to request SPI master to receive data
+- busy-gpios : GPIO pin to indicate SPI slave is busy
+- cs-gpios : GPIO pin to select SPI slave
+
+Optional properties:
+
+The controller supports at most 2 CAN and 1 char device subnodes. When
+optionally specify the subnodes, the following properties are required:
+
+- CAN subnode
+ - compatible : must be "bosch,companion-can"
+ - clock-frequency: CAN device clock in Hz
+ - port : must be 0 or 1
+
+- Char device subnode
+ - compatible : must be "bosch,companion-char"
+
+Example:
+
+&ecspi1 {
+ companion-spi@0 {
+ compatible = "bosch,companion-spi";
+ interrupt-parent = <&gpio1>;
+ interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
+ request-gpios = <&gpio1 26 GPIO_ACTIVE_LOW>;
+ busy-gpios = <&gpio1 27 GPIO_ACTIVE_LOW>;
+ cs-gpios = <&gpio4 9 GPIO_ACTIVE_LOW>;
+
+ companion-can0 {
+ compatible = "bosch,companion-can";
+ clock-frequency = <28000000>;
+ port = <0>;
+ };
+
+ companion-can1 {
+ compatible = "bosch,companion-can";
+ clock-frequency = <28000000>;
+ port = <1>;
+ };
+
+ companion-char {
+ compatible = "bosch,companion-char";
+ };
+ };
+};
--
2.7.4
\
 
 \ /
  Last update: 2018-06-13 16:39    [W:0.101 / U:3.536 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site