aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-08-22 22:42:25 -0400
committerDavid S. Miller <davem@davemloft.net>2014-08-22 22:42:25 -0400
commit3f8a2b746e3aece61f9c4714b86d1484d66461f0 (patch)
tree6702a2dde309d87b15c4a1c9b03adfb6a496786c /Documentation/devicetree/bindings/net
parent13322f2e664333b40ea7c71df8785e6f4bba1e68 (diff)
parent3a73aeff37c2e425b11d19c19e42e8269d58d417 (diff)
Merge tag 'linux-can-next-for-3.18-20140820' of git://gitorious.org/linux-can/linux-can-next
Marc Kleine-Budde says: ==================== pull-request: can-next 2014-08-20 this is a pull request of 10 patches for net-next/master. There is one patch by Wolfram Sang to clean up the build system. Two patches by Stefan Agner that add vf610 support to the flexcan driver. Dong Aisheng add support for bosch's m_can core, which is found in the new freescale ARM SoCs. Sergei Shtylyov improves the rcar_can driver by supporting all input clocks and adding device tree support. The next patch is a small cleanup for the bit rate calculation function by Lad, Prabhakar. And finally a patch by Himangi Saraogi, which converts the mcp251x driver to use dmam_alloc_coherent. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/devicetree/bindings/net')
-rw-r--r--Documentation/devicetree/bindings/net/can/m_can.txt67
-rw-r--r--Documentation/devicetree/bindings/net/can/rcar_can.txt43
2 files changed, 110 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..9e331777c203
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/can/m_can.txt
@@ -0,0 +1,67 @@
1Bosch MCAN controller Device Tree Bindings
2-------------------------------------------------
3
4Required properties:
5- compatible : Should be "bosch,m_can" for M_CAN controllers
6- reg : physical base address and size of the M_CAN
7 registers map and Message RAM
8- reg-names : Should be "m_can" and "message_ram"
9- interrupts : Should be the interrupt number of M_CAN interrupt
10 line 0 and line 1, could be same if sharing
11 the same interrupt.
12- interrupt-names : Should contain "int0" and "int1"
13- clocks : Clocks used by controller, should be host clock
14 and CAN clock.
15- clock-names : Should contain "hclk" and "cclk"
16- pinctrl-<n> : Pinctrl states as described in bindings/pinctrl/pinctrl-bindings.txt
17- pinctrl-names : Names corresponding to the numbered pinctrl states
18- bosch,mram-cfg : Message RAM configuration data.
19 Multiple M_CAN instances can share the same Message
20 RAM and each element(e.g Rx FIFO or Tx Buffer and etc)
21 number in Message RAM is also configurable,
22 so this property is telling driver how the shared or
23 private Message RAM are used by this M_CAN controller.
24
25 The format should be as follows:
26 <offset sidf_elems xidf_elems rxf0_elems rxf1_elems
27 rxb_elems txe_elems txb_elems>
28 The 'offset' is an address offset of the Message RAM
29 where the following elements start from. This is
30 usually set to 0x0 if you're using a private Message
31 RAM. The remain cells are used to specify how many
32 elements are used for each FIFO/Buffer.
33
34 M_CAN includes the following elements according to user manual:
35 11-bit Filter 0-128 elements / 0-128 words
36 29-bit Filter 0-64 elements / 0-128 words
37 Rx FIFO 0 0-64 elements / 0-1152 words
38 Rx FIFO 1 0-64 elements / 0-1152 words
39 Rx Buffers 0-64 elements / 0-1152 words
40 Tx Event FIFO 0-32 elements / 0-64 words
41 Tx Buffers 0-32 elements / 0-576 words
42
43 Please refer to 2.4.1 Message RAM Configuration in
44 Bosch M_CAN user manual for details.
45
46Example:
47SoC dtsi:
48m_can1: can@020e8000 {
49 compatible = "bosch,m_can";
50 reg = <0x020e8000 0x4000>, <0x02298000 0x4000>;
51 reg-names = "m_can", "message_ram";
52 interrupts = <0 114 0x04>,
53 <0 114 0x04>;
54 interrupt-names = "int0", "int1";
55 clocks = <&clks IMX6SX_CLK_CANFD>,
56 <&clks IMX6SX_CLK_CANFD>;
57 clock-names = "hclk", "cclk";
58 bosch,mram-cfg = <0x0 0 0 32 0 0 0 1>;
59 status = "disabled";
60};
61
62Board dts:
63&m_can1 {
64 pinctrl-names = "default";
65 pinctrl-0 = <&pinctrl_m_can1>;
66 status = "enabled";
67};
diff --git a/Documentation/devicetree/bindings/net/can/rcar_can.txt b/Documentation/devicetree/bindings/net/can/rcar_can.txt
new file mode 100644
index 000000000000..002d8440bf66
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/can/rcar_can.txt
@@ -0,0 +1,43 @@
1Renesas R-Car CAN controller Device Tree Bindings
2-------------------------------------------------
3
4Required properties:
5- compatible: "renesas,can-r8a7778" if CAN controller is a part of R8A7778 SoC.
6 "renesas,can-r8a7779" if CAN controller is a part of R8A7779 SoC.
7 "renesas,can-r8a7790" if CAN controller is a part of R8A7790 SoC.
8 "renesas,can-r8a7791" if CAN controller is a part of R8A7791 SoC.
9- reg: physical base address and size of the R-Car CAN register map.
10- interrupts: interrupt specifier for the sole interrupt.
11- clocks: phandles and clock specifiers for 3 CAN clock inputs.
12- clock-names: 3 clock input name strings: "clkp1", "clkp2", "can_clk".
13- pinctrl-0: pin control group to be used for this controller.
14- pinctrl-names: must be "default".
15
16Optional properties:
17- renesas,can-clock-select: R-Car CAN Clock Source Select. Valid values are:
18 <0x0> (default) : Peripheral clock (clkp1)
19 <0x1> : Peripheral clock (clkp2)
20 <0x3> : Externally input clock
21
22Example
23-------
24
25SoC common .dtsi file:
26
27 can0: can@e6e80000 {
28 compatible = "renesas,can-r8a7791";
29 reg = <0 0xe6e80000 0 0x1000>;
30 interrupts = <0 186 IRQ_TYPE_LEVEL_HIGH>;
31 clocks = <&mstp9_clks R8A7791_CLK_RCAN0>,
32 <&cpg_clocks R8A7791_CLK_RCAN>, <&can_clk>;
33 clock-names = "clkp1", "clkp2", "can_clk";
34 status = "disabled";
35 };
36
37Board specific .dts file:
38
39&can0 {
40 pinctrl-0 = <&can0_pins>;
41 pinctrl-names = "default";
42 status = "okay";
43};