From: Mark Jonas <mark.jonas@de.bosch.com>
To: Wolfgang Grandegger <wg@grandegger.com>,
Marc Kleine-Budde <mkl@pengutronix.de>
Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, hs@denx.de, yi.zhu5@cn.bosch.com,
petar.petrovic2@de.bosch.com, stephan.baetge@de.bosch.com,
andy.shevchenko@gmail.com, socketcan@hartkopp.net,
o.rempel@pengutronix.de, Mark Jonas <mark.jonas@de.bosch.com>
Subject: [PATCH v2 5/5] spi,can,char: add companion DT binding documentation
Date: Wed, 13 Jun 2018 16:37:21 +0200 [thread overview]
Message-ID: <1528900641-18677-6-git-send-email-mark.jonas@de.bosch.com> (raw)
In-Reply-To: <1528900641-18677-1-git-send-email-mark.jonas@de.bosch.com>
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
prev parent reply other threads:[~2018-06-13 14:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-05 18:43 [PATCH 0/5] can: enable multi-queue for SocketCAN devices Mark Jonas
2018-06-05 18:43 ` [PATCH 1/5] " Mark Jonas
2018-06-05 18:43 ` [PATCH 2/5] spi: implement companion-spi driver Mark Jonas
2018-06-06 18:47 ` Andy Shevchenko
2018-06-07 14:58 ` AW: " Jonas Mark (BT-FIR/ENG1)
2018-06-08 6:03 ` Oleksij Rempel
2018-06-05 18:43 ` [PATCH 3/5] char: implement companion-char driver Mark Jonas
2018-06-05 18:43 ` [PATCH 4/5] can: implement companion-can driver Mark Jonas
2018-06-05 18:44 ` [PATCH 5/5] spi,can,char: add companion DT binding documentation Mark Jonas
2018-06-06 18:06 ` [PATCH 0/5] can: enable multi-queue for SocketCAN devices Andy Shevchenko
2018-06-07 7:22 ` Oliver Hartkopp
2018-06-13 14:37 ` [PATCH v2 " Mark Jonas
2018-06-13 14:37 ` [PATCH v2 1/5] " Mark Jonas
2018-07-20 14:34 ` Marc Kleine-Budde
2018-06-13 14:37 ` [PATCH v2 2/5] spi: implement companion-spi driver Mark Jonas
2018-06-13 14:37 ` [PATCH v2 3/5] char: implement companion-char driver Mark Jonas
2018-06-13 14:37 ` [PATCH v2 4/5] can: implement companion-can driver Mark Jonas
2018-06-13 14:37 ` Mark Jonas [this message]
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=1528900641-18677-6-git-send-email-mark.jonas@de.bosch.com \
--to=mark.jonas@de.bosch.com \
--cc=andy.shevchenko@gmail.com \
--cc=hs@denx.de \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=petar.petrovic2@de.bosch.com \
--cc=socketcan@hartkopp.net \
--cc=stephan.baetge@de.bosch.com \
--cc=wg@grandegger.com \
--cc=yi.zhu5@cn.bosch.com \
/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).