summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/net/can/rcar_can.txt
blob: 6a595634781637522b5998c3a723ee1fbcc18edb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Renesas R-Car CAN controller Device Tree Bindings
-------------------------------------------------

Required properties:
- compatible: "renesas,can-r8a7742" if CAN controller is a part of R8A7742 SoC.
	      "renesas,can-r8a7743" if CAN controller is a part of R8A7743 SoC.
	      "renesas,can-r8a7744" if CAN controller is a part of R8A7744 SoC.
	      "renesas,can-r8a7745" if CAN controller is a part of R8A7745 SoC.
	      "renesas,can-r8a77470" if CAN controller is a part of R8A77470 SoC.
	      "renesas,can-r8a774a1" if CAN controller is a part of R8A774A1 SoC.
	      "renesas,can-r8a774b1" if CAN controller is a part of R8A774B1 SoC.
	      "renesas,can-r8a774c0" if CAN controller is a part of R8A774C0 SoC.
	      "renesas,can-r8a774e1" if CAN controller is a part of R8A774E1 SoC.
	      "renesas,can-r8a7778" if CAN controller is a part of R8A7778 SoC.
	      "renesas,can-r8a7779" if CAN controller is a part of R8A7779 SoC.
	      "renesas,can-r8a7790" if CAN controller is a part of R8A7790 SoC.
	      "renesas,can-r8a7791" if CAN controller is a part of R8A7791 SoC.
	      "renesas,can-r8a7792" if CAN controller is a part of R8A7792 SoC.
	      "renesas,can-r8a7793" if CAN controller is a part of R8A7793 SoC.
	      "renesas,can-r8a7794" if CAN controller is a part of R8A7794 SoC.
	      "renesas,can-r8a7795" if CAN controller is a part of R8A7795 SoC.
	      "renesas,can-r8a7796" if CAN controller is a part of R8A7796 SoC.
	      "renesas,can-r8a77965" if CAN controller is a part of R8A77965 SoC.
	      "renesas,can-r8a77990" if CAN controller is a part of R8A77990 SoC.
	      "renesas,can-r8a77995" if CAN controller is a part of R8A77995 SoC.
	      "renesas,rcar-gen1-can" for a generic R-Car Gen1 compatible device.
	      "renesas,rcar-gen2-can" for a generic R-Car Gen2 or RZ/G1
	      compatible device.
	      "renesas,rcar-gen3-can" for a generic R-Car Gen3 or RZ/G2
	      compatible device.
	      When compatible with the generic version, nodes must list the
	      SoC-specific version corresponding to the platform first
	      followed by the generic version.

- reg: physical base address and size of the R-Car CAN register map.
- interrupts: interrupt specifier for the sole interrupt.
- clocks: phandles and clock specifiers for 3 CAN clock inputs.
- clock-names: 3 clock input name strings: "clkp1", "clkp2", and "can_clk".
- pinctrl-0: pin control group to be used for this controller.
- pinctrl-names: must be "default".

Required properties for R8A774A1, R8A774B1, R8A774C0, R8A774E1, R8A7795,
R8A7796, R8A77965, R8A77990, and R8A77995:
For the denoted SoCs, "clkp2" can be CANFD clock. This is a div6 clock and can
be used by both CAN and CAN FD controller at the same time. It needs to be
scaled to maximum frequency if any of these controllers use it. This is done
using the below properties:

- assigned-clocks: phandle of clkp2(CANFD) clock.
- assigned-clock-rates: maximum frequency of this clock.

Optional properties:
- renesas,can-clock-select: R-Car CAN Clock Source Select. Valid values are:
			    <0x0> (default) : Peripheral clock (clkp1)
			    <0x1> : Peripheral clock (clkp2)
			    <0x3> : External input clock

Example
-------

SoC common .dtsi file:

	can0: can@e6e80000 {
		compatible = "renesas,can-r8a7791", "renesas,rcar-gen2-can";
		reg = <0 0xe6e80000 0 0x1000>;
		interrupts = <0 186 IRQ_TYPE_LEVEL_HIGH>;
		clocks = <&mstp9_clks R8A7791_CLK_RCAN0>,
			 <&cpg_clocks R8A7791_CLK_RCAN>, <&can_clk>;
		clock-names = "clkp1", "clkp2", "can_clk";
		status = "disabled";
	};

Board specific .dts file:

&can0 {
	pinctrl-0 = <&can0_pins>;
	pinctrl-names = "default";
	status = "okay";
};