1Renesas R-Car CAN FD controller Device Tree Bindings 2---------------------------------------------------- 3 4Required properties: 5- compatible: Must contain one or more of the following: 6 - "renesas,rcar-gen3-canfd" for R-Car Gen3 and RZ/G2 compatible controllers. 7 - "renesas,r8a774a1-canfd" for R8A774A1 (RZ/G2M) compatible controller. 8 - "renesas,r8a774c0-canfd" for R8A774C0 (RZ/G2E) compatible controller. 9 - "renesas,r8a7795-canfd" for R8A7795 (R-Car H3) compatible controller. 10 - "renesas,r8a7796-canfd" for R8A7796 (R-Car M3-W) compatible controller. 11 - "renesas,r8a77965-canfd" for R8A77965 (R-Car M3-N) compatible controller. 12 - "renesas,r8a77970-canfd" for R8A77970 (R-Car V3M) compatible controller. 13 - "renesas,r8a77980-canfd" for R8A77980 (R-Car V3H) compatible controller. 14 - "renesas,r8a77990-canfd" for R8A77990 (R-Car E3) compatible controller. 15 - "renesas,r8a77995-canfd" for R8A77995 (R-Car D3) compatible controller. 16 17 When compatible with the generic version, nodes must list the 18 SoC-specific version corresponding to the platform first, followed by the 19 family-specific and/or generic versions. 20 21- reg: physical base address and size of the R-Car CAN FD register map. 22- interrupts: interrupt specifiers for the Channel & Global interrupts 23- clocks: phandles and clock specifiers for 3 clock inputs. 24- clock-names: 3 clock input name strings: "fck", "canfd", "can_clk". 25- pinctrl-0: pin control group to be used for this controller. 26- pinctrl-names: must be "default". 27 28Required child nodes: 29The controller supports two channels and each is represented as a child node. 30The name of the child nodes are "channel0" and "channel1" respectively. Each 31child node supports the "status" property only, which is used to 32enable/disable the respective channel. 33 34Required properties for R8A774A1, R8A774C0, R8A7795, R8A7796, R8A77965, 35R8A77990, and R8A77995: 36In the denoted SoCs, canfd clock is a div6 clock and can be used by both CAN 37and CAN FD controller at the same time. It needs to be scaled to maximum 38frequency if any of these controllers use it. This is done using the below 39properties: 40 41- assigned-clocks: phandle of canfd clock. 42- assigned-clock-rates: maximum frequency of this clock. 43 44Optional property: 45The controller can operate in either CAN FD only mode (default) or 46Classical CAN only mode. The mode is global to both the channels. In order to 47enable the later, define the following optional property. 48 - renesas,no-can-fd: puts the controller in Classical CAN only mode. 49 50Example 51------- 52 53SoC common .dtsi file: 54 55 canfd: can@e66c0000 { 56 compatible = "renesas,r8a7795-canfd", 57 "renesas,rcar-gen3-canfd"; 58 reg = <0 0xe66c0000 0 0x8000>; 59 interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>, 60 <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; 61 clocks = <&cpg CPG_MOD 914>, 62 <&cpg CPG_CORE R8A7795_CLK_CANFD>, 63 <&can_clk>; 64 clock-names = "fck", "canfd", "can_clk"; 65 assigned-clocks = <&cpg CPG_CORE R8A7795_CLK_CANFD>; 66 assigned-clock-rates = <40000000>; 67 power-domains = <&cpg>; 68 status = "disabled"; 69 70 channel0 { 71 status = "disabled"; 72 }; 73 74 channel1 { 75 status = "disabled"; 76 }; 77 }; 78 79Board specific .dts file: 80 81E.g. below enables Channel 1 alone in the board in Classical CAN only mode. 82 83&canfd { 84 pinctrl-0 = <&canfd1_pins>; 85 pinctrl-names = "default"; 86 renesas,no-can-fd; 87 status = "okay"; 88 89 channel1 { 90 status = "okay"; 91 }; 92}; 93 94E.g. below enables Channel 0 alone in the board using External clock 95as fCAN clock. 96 97&canfd { 98 pinctrl-0 = <&canfd0_pins &can_clk_pins>; 99 pinctrl-names = "default"; 100 status = "okay"; 101 102 channel0 { 103 status = "okay"; 104 }; 105}; 106