Merge branch 'for-4.20' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / net / can / rcar_can.txt
1 Renesas R-Car CAN controller Device Tree Bindings
2 -------------------------------------------------
3
4 Required properties:
5 - compatible: "renesas,can-r8a7743" if CAN controller is a part of R8A7743 SoC.
6               "renesas,can-r8a7744" if CAN controller is a part of R8A7744 SoC.
7               "renesas,can-r8a7745" if CAN controller is a part of R8A7745 SoC.
8               "renesas,can-r8a7778" if CAN controller is a part of R8A7778 SoC.
9               "renesas,can-r8a7779" if CAN controller is a part of R8A7779 SoC.
10               "renesas,can-r8a7790" if CAN controller is a part of R8A7790 SoC.
11               "renesas,can-r8a7791" if CAN controller is a part of R8A7791 SoC.
12               "renesas,can-r8a7792" if CAN controller is a part of R8A7792 SoC.
13               "renesas,can-r8a7793" if CAN controller is a part of R8A7793 SoC.
14               "renesas,can-r8a7794" if CAN controller is a part of R8A7794 SoC.
15               "renesas,can-r8a7795" if CAN controller is a part of R8A7795 SoC.
16               "renesas,can-r8a7796" if CAN controller is a part of R8A7796 SoC.
17               "renesas,rcar-gen1-can" for a generic R-Car Gen1 compatible device.
18               "renesas,rcar-gen2-can" for a generic R-Car Gen2 or RZ/G1
19               compatible device.
20               "renesas,rcar-gen3-can" for a generic R-Car Gen3 compatible device.
21               When compatible with the generic version, nodes must list the
22               SoC-specific version corresponding to the platform first
23               followed by the generic version.
24
25 - reg: physical base address and size of the R-Car CAN register map.
26 - interrupts: interrupt specifier for the sole interrupt.
27 - clocks: phandles and clock specifiers for 3 CAN clock inputs.
28 - clock-names: 3 clock input name strings: "clkp1", "clkp2", "can_clk".
29 - pinctrl-0: pin control group to be used for this controller.
30 - pinctrl-names: must be "default".
31
32 Required properties for "renesas,can-r8a7795" and "renesas,can-r8a7796"
33 compatible:
34 In R8A7795 and R8A7796 SoCs, "clkp2" can be CANFD clock. This is a div6 clock
35 and can be used by both CAN and CAN FD controller at the same time. It needs to
36 be scaled to maximum frequency if any of these controllers use it. This is done
37 using the below properties:
38
39 - assigned-clocks: phandle of clkp2(CANFD) clock.
40 - assigned-clock-rates: maximum frequency of this clock.
41
42 Optional properties:
43 - renesas,can-clock-select: R-Car CAN Clock Source Select. Valid values are:
44                             <0x0> (default) : Peripheral clock (clkp1)
45                             <0x1> : Peripheral clock (clkp2)
46                             <0x3> : Externally input clock
47
48 Example
49 -------
50
51 SoC common .dtsi file:
52
53         can0: can@e6e80000 {
54                 compatible = "renesas,can-r8a7791", "renesas,rcar-gen2-can";
55                 reg = <0 0xe6e80000 0 0x1000>;
56                 interrupts = <0 186 IRQ_TYPE_LEVEL_HIGH>;
57                 clocks = <&mstp9_clks R8A7791_CLK_RCAN0>,
58                          <&cpg_clocks R8A7791_CLK_RCAN>, <&can_clk>;
59                 clock-names = "clkp1", "clkp2", "can_clk";
60                 status = "disabled";
61         };
62
63 Board specific .dts file:
64
65 &can0 {
66         pinctrl-0 = <&can0_pins>;
67         pinctrl-names = "default";
68         status = "okay";
69 };