xref: /freebsd/sys/contrib/device-tree/Bindings/net/can/rcar_can.txt (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1Renesas R-Car CAN controller Device Tree Bindings
2-------------------------------------------------
3
4Required properties:
5- compatible: "renesas,can-r8a7742" if CAN controller is a part of R8A7742 SoC.
6	      "renesas,can-r8a7743" if CAN controller is a part of R8A7743 SoC.
7	      "renesas,can-r8a7744" if CAN controller is a part of R8A7744 SoC.
8	      "renesas,can-r8a7745" if CAN controller is a part of R8A7745 SoC.
9	      "renesas,can-r8a77470" if CAN controller is a part of R8A77470 SoC.
10	      "renesas,can-r8a774a1" if CAN controller is a part of R8A774A1 SoC.
11	      "renesas,can-r8a774b1" if CAN controller is a part of R8A774B1 SoC.
12	      "renesas,can-r8a774c0" if CAN controller is a part of R8A774C0 SoC.
13	      "renesas,can-r8a774e1" if CAN controller is a part of R8A774E1 SoC.
14	      "renesas,can-r8a7778" if CAN controller is a part of R8A7778 SoC.
15	      "renesas,can-r8a7779" if CAN controller is a part of R8A7779 SoC.
16	      "renesas,can-r8a7790" if CAN controller is a part of R8A7790 SoC.
17	      "renesas,can-r8a7791" if CAN controller is a part of R8A7791 SoC.
18	      "renesas,can-r8a7792" if CAN controller is a part of R8A7792 SoC.
19	      "renesas,can-r8a7793" if CAN controller is a part of R8A7793 SoC.
20	      "renesas,can-r8a7794" if CAN controller is a part of R8A7794 SoC.
21	      "renesas,can-r8a7795" if CAN controller is a part of R8A7795 SoC.
22	      "renesas,can-r8a7796" if CAN controller is a part of R8A77960 SoC.
23	      "renesas,can-r8a77961" if CAN controller is a part of R8A77961 SoC.
24	      "renesas,can-r8a77965" if CAN controller is a part of R8A77965 SoC.
25	      "renesas,can-r8a77990" if CAN controller is a part of R8A77990 SoC.
26	      "renesas,can-r8a77995" if CAN controller is a part of R8A77995 SoC.
27	      "renesas,rcar-gen1-can" for a generic R-Car Gen1 compatible device.
28	      "renesas,rcar-gen2-can" for a generic R-Car Gen2 or RZ/G1
29	      compatible device.
30	      "renesas,rcar-gen3-can" for a generic R-Car Gen3 or RZ/G2
31	      compatible device.
32	      When compatible with the generic version, nodes must list the
33	      SoC-specific version corresponding to the platform first
34	      followed by the generic version.
35
36- reg: physical base address and size of the R-Car CAN register map.
37- interrupts: interrupt specifier for the sole interrupt.
38- clocks: phandles and clock specifiers for 3 CAN clock inputs.
39- clock-names: 3 clock input name strings: "clkp1", "clkp2", and "can_clk".
40- pinctrl-0: pin control group to be used for this controller.
41- pinctrl-names: must be "default".
42
43Required properties for R8A774A1, R8A774B1, R8A774C0, R8A774E1, R8A7795,
44R8A77960, R8A77961, R8A77965, R8A77990, and R8A77995:
45For the denoted SoCs, "clkp2" can be CANFD clock. This is a div6 clock and can
46be used by both CAN and CAN FD controller at the same time. It needs to be
47scaled to maximum frequency if any of these controllers use it. This is done
48using the below properties:
49
50- assigned-clocks: phandle of clkp2(CANFD) clock.
51- assigned-clock-rates: maximum frequency of this clock.
52
53Optional properties:
54- renesas,can-clock-select: R-Car CAN Clock Source Select. Valid values are:
55			    <0x0> (default) : Peripheral clock (clkp1)
56			    <0x1> : Peripheral clock (clkp2)
57			    <0x3> : External input clock
58
59Example
60-------
61
62SoC common .dtsi file:
63
64	can0: can@e6e80000 {
65		compatible = "renesas,can-r8a7791", "renesas,rcar-gen2-can";
66		reg = <0 0xe6e80000 0 0x1000>;
67		interrupts = <0 186 IRQ_TYPE_LEVEL_HIGH>;
68		clocks = <&mstp9_clks R8A7791_CLK_RCAN0>,
69			 <&cpg_clocks R8A7791_CLK_RCAN>, <&can_clk>;
70		clock-names = "clkp1", "clkp2", "can_clk";
71		status = "disabled";
72	};
73
74Board specific .dts file:
75
76&can0 {
77	pinctrl-0 = <&can0_pins>;
78	pinctrl-names = "default";
79	status = "okay";
80};
81