summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorDong Aisheng <b29396@freescale.com>2014-06-19 18:49:37 +0800
committerNitin Garg <nitin.garg@freescale.com>2015-01-15 21:17:30 -0600
commit6b3b42d449b3657dfe0f2e1272e455a98b10fc0c (patch)
tree2cca7a32869bf34f82bd661ac196a6f9356176b5 /Documentation
parentdbf73e20a29cc4515e559d58b1feeaa8574d21e2 (diff)
ENGR00319455-1 can: m_can: add Bosch M_CAN controller support
The patch adds the basic CAN TX/RX function support for Bosch M_CAN controller. For TX, only one dedicated tx buffer is used for sending data. For RX, RXFIFO 0 is used for receiving data to avoid overflow. Rx FIFO 1 and Rx Buffers are not used currently, as well as Tx Event FIFO. Due to the message ram can be shared by multi m_can instances and the fifo element is configurable which is SoC dependant, the design is to parse the message ram related configuration data from device tree rather than hardcode define it in driver which can make the message ram using fully transparently to M_CAN controller driver, then we can gain better driver maintainability and future features upgrade. M_CAN also supports CANFD protocol features like data payload up to 64 bytes and bitrate switch at runtime, however, this patch still does not add the support for these features. Signed-off-by: Dong Aisheng <b29396@freescale.com> (cherry picked from commit a0dd1cb47d5792902eb380b70af292b4ba64d4b0)
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/devicetree/bindings/net/can/m_can.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/net/can/m_can.txt b/Documentation/devicetree/bindings/net/can/m_can.txt
new file mode 100644
index 000000000000..2b22d027e6b6
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/can/m_can.txt
@@ -0,0 +1,29 @@
+Bosch MCAN controller Device Tree Bindings
+-------------------------------------------------
+
+Required properties:
+- compatible : Should be "bosch,m_can" for M_CAN controllers
+- reg : physical base address and size of the M_CAN
+ registers map and message ram
+- interrupts : property with a value describing the interrupt
+ number
+- clocks : clocks used by controller
+- mram-cfg : message ram configuration data, the format is
+ <offset sidf_elems xidf_elems rxf1_elems rxb_elems txe_elems txb_elems>
+ The 'offset' is the address offset inside the message ram. This is usually set
+ if you're using the shared message ram while the other part is used by another
+ m_can controller.
+ The left cell are all the number of each elements inside the message ram.
+ Please refer to 2.4.1 Message RAM Con.guration in Bosch M_CAN user mannual
+ for each elements definition.
+
+Example:
+canfd1: canfd@020e8000 {
+ compatible = "bosch,m_can";
+ reg = <0x020e8000 0x4000>, <0x02298000 0x4000>;
+ reg-names = "canfd", "message_ram";
+ interrupts = <0 114 0x04>;
+ clocks = <&clks IMX6SX_CLK_CANFD>;
+ mram-cfg = <0x0 0 0 32 32 32 0 1>;
+ status = "disabled";
+};