215 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/net/can/renesas,rcar-canfd.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Renesas R-Car CAN FD Controller8 9maintainers:10 - Fabrizio Castro <fabrizio.castro.jz@renesas.com>11 12properties:13 compatible:14 oneOf:15 - items:16 - enum:17 - renesas,r8a774a1-canfd # RZ/G2M18 - renesas,r8a774b1-canfd # RZ/G2N19 - renesas,r8a774c0-canfd # RZ/G2E20 - renesas,r8a774e1-canfd # RZ/G2H21 - renesas,r8a7795-canfd # R-Car H322 - renesas,r8a7796-canfd # R-Car M3-W23 - renesas,r8a77961-canfd # R-Car M3-W+24 - renesas,r8a77965-canfd # R-Car M3-N25 - renesas,r8a77970-canfd # R-Car V3M26 - renesas,r8a77980-canfd # R-Car V3H27 - renesas,r8a77990-canfd # R-Car E328 - renesas,r8a77995-canfd # R-Car D329 - const: renesas,rcar-gen3-canfd # R-Car Gen3 and RZ/G230 31 - items:32 - enum:33 - renesas,r8a779a0-canfd # R-Car V3U34 - renesas,r8a779g0-canfd # R-Car V4H35 - renesas,r8a779h0-canfd # R-Car V4M36 - const: renesas,rcar-gen4-canfd # R-Car Gen437 38 - items:39 - enum:40 - renesas,r9a07g043-canfd # RZ/G2UL and RZ/Five41 - renesas,r9a07g044-canfd # RZ/G2{L,LC}42 - renesas,r9a07g054-canfd # RZ/V2L43 - const: renesas,rzg2l-canfd # RZ/G2L family44 45 reg:46 maxItems: 147 48 interrupts: true49 50 clocks:51 maxItems: 352 53 clock-names:54 items:55 - const: fck56 - const: canfd57 - const: can_clk58 59 power-domains:60 maxItems: 161 62 resets: true63 64 renesas,no-can-fd:65 $ref: /schemas/types.yaml#/definitions/flag66 description:67 The controller can operate in either CAN FD only mode (default) or68 Classical CAN only mode. The mode is global to all channels.69 Specify this property to put the controller in Classical CAN only mode.70 71 assigned-clocks:72 description:73 Reference to the CANFD clock. The CANFD clock is a div6 clock and can be74 used by both CAN (if present) and CAN FD controllers at the same time.75 It needs to be scaled to maximum frequency if any of these controllers76 use it.77 78 assigned-clock-rates:79 description: Maximum frequency of the CANFD clock.80 81patternProperties:82 "^channel[0-7]$":83 type: object84 description:85 The controller supports multiple channels and each is represented as a86 child node. Each channel can be enabled/disabled individually.87 88 properties:89 phys:90 maxItems: 191 92 additionalProperties: false93 94required:95 - compatible96 - reg97 - interrupts98 - interrupt-names99 - clocks100 - clock-names101 - power-domains102 - resets103 - assigned-clocks104 - assigned-clock-rates105 - channel0106 - channel1107 108allOf:109 - $ref: can-controller.yaml#110 111 - if:112 properties:113 compatible:114 contains:115 enum:116 - renesas,rzg2l-canfd117 then:118 properties:119 interrupts:120 items:121 - description: CAN global error interrupt122 - description: CAN receive FIFO interrupt123 - description: CAN0 error interrupt124 - description: CAN0 transmit interrupt125 - description: CAN0 transmit/receive FIFO receive completion interrupt126 - description: CAN1 error interrupt127 - description: CAN1 transmit interrupt128 - description: CAN1 transmit/receive FIFO receive completion interrupt129 130 interrupt-names:131 items:132 - const: g_err133 - const: g_recc134 - const: ch0_err135 - const: ch0_rec136 - const: ch0_trx137 - const: ch1_err138 - const: ch1_rec139 - const: ch1_trx140 141 resets:142 maxItems: 2143 144 reset-names:145 items:146 - const: rstp_n147 - const: rstc_n148 149 required:150 - reset-names151 else:152 properties:153 interrupts:154 items:155 - description: Channel interrupt156 - description: Global interrupt157 158 interrupt-names:159 items:160 - const: ch_int161 - const: g_int162 163 resets:164 maxItems: 1165 166 - if:167 properties:168 compatible:169 contains:170 const: renesas,r8a779h0-canfd171 then:172 patternProperties:173 "^channel[5-7]$": false174 else:175 if:176 not:177 properties:178 compatible:179 contains:180 const: renesas,rcar-gen4-canfd181 then:182 patternProperties:183 "^channel[2-7]$": false184 185unevaluatedProperties: false186 187examples:188 - |189 #include <dt-bindings/clock/r8a7795-cpg-mssr.h>190 #include <dt-bindings/interrupt-controller/arm-gic.h>191 #include <dt-bindings/power/r8a7795-sysc.h>192 193 canfd: can@e66c0000 {194 compatible = "renesas,r8a7795-canfd",195 "renesas,rcar-gen3-canfd";196 reg = <0xe66c0000 0x8000>;197 interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>,198 <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;199 interrupt-names = "ch_int", "g_int";200 clocks = <&cpg CPG_MOD 914>,201 <&cpg CPG_CORE R8A7795_CLK_CANFD>,202 <&can_clk>;203 clock-names = "fck", "canfd", "can_clk";204 assigned-clocks = <&cpg CPG_CORE R8A7795_CLK_CANFD>;205 assigned-clock-rates = <40000000>;206 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;207 resets = <&cpg 914>;208 209 channel0 {210 };211 212 channel1 {213 };214 };215