18a5e7d19SGeert Uytterhoeven# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 28a5e7d19SGeert Uytterhoeven%YAML 1.2 38a5e7d19SGeert Uytterhoeven--- 48a5e7d19SGeert Uytterhoeven$id: http://devicetree.org/schemas/net/can/renesas,rcar-canfd.yaml# 58a5e7d19SGeert Uytterhoeven$schema: http://devicetree.org/meta-schemas/core.yaml# 68a5e7d19SGeert Uytterhoeven 78a5e7d19SGeert Uytterhoeventitle: Renesas R-Car CAN FD Controller 88a5e7d19SGeert Uytterhoeven 98a5e7d19SGeert Uytterhoevenmaintainers: 108a5e7d19SGeert Uytterhoeven - Fabrizio Castro <fabrizio.castro.jz@renesas.com> 118a5e7d19SGeert Uytterhoeven 128a5e7d19SGeert UytterhoevenallOf: 138a5e7d19SGeert Uytterhoeven - $ref: can-controller.yaml# 148a5e7d19SGeert Uytterhoeven 158a5e7d19SGeert Uytterhoevenproperties: 168a5e7d19SGeert Uytterhoeven compatible: 178a5e7d19SGeert Uytterhoeven oneOf: 188a5e7d19SGeert Uytterhoeven - items: 198a5e7d19SGeert Uytterhoeven - enum: 208a5e7d19SGeert Uytterhoeven - renesas,r8a774a1-canfd # RZ/G2M 218a5e7d19SGeert Uytterhoeven - renesas,r8a774b1-canfd # RZ/G2N 228a5e7d19SGeert Uytterhoeven - renesas,r8a774c0-canfd # RZ/G2E 238a5e7d19SGeert Uytterhoeven - renesas,r8a774e1-canfd # RZ/G2H 248a5e7d19SGeert Uytterhoeven - renesas,r8a7795-canfd # R-Car H3 258a5e7d19SGeert Uytterhoeven - renesas,r8a7796-canfd # R-Car M3-W 268a5e7d19SGeert Uytterhoeven - renesas,r8a77965-canfd # R-Car M3-N 278a5e7d19SGeert Uytterhoeven - renesas,r8a77970-canfd # R-Car V3M 288a5e7d19SGeert Uytterhoeven - renesas,r8a77980-canfd # R-Car V3H 298a5e7d19SGeert Uytterhoeven - renesas,r8a77990-canfd # R-Car E3 308a5e7d19SGeert Uytterhoeven - renesas,r8a77995-canfd # R-Car D3 318a5e7d19SGeert Uytterhoeven - const: renesas,rcar-gen3-canfd # R-Car Gen3 and RZ/G2 328a5e7d19SGeert Uytterhoeven 331aa5a06cSLad Prabhakar - items: 341aa5a06cSLad Prabhakar - enum: 351aa5a06cSLad Prabhakar - renesas,r9a07g044-canfd # RZ/G2{L,LC} 361aa5a06cSLad Prabhakar - const: renesas,rzg2l-canfd # RZ/G2L family 371aa5a06cSLad Prabhakar 38*d6254d52SUlrich Hecht - const: renesas,r8a779a0-canfd # R-Car V3U 39*d6254d52SUlrich Hecht 408a5e7d19SGeert Uytterhoeven reg: 418a5e7d19SGeert Uytterhoeven maxItems: 1 428a5e7d19SGeert Uytterhoeven 431aa5a06cSLad Prabhakar interrupts: true 448a5e7d19SGeert Uytterhoeven 458a5e7d19SGeert Uytterhoeven clocks: 468a5e7d19SGeert Uytterhoeven maxItems: 3 478a5e7d19SGeert Uytterhoeven 488a5e7d19SGeert Uytterhoeven clock-names: 498a5e7d19SGeert Uytterhoeven items: 508a5e7d19SGeert Uytterhoeven - const: fck 518a5e7d19SGeert Uytterhoeven - const: canfd 528a5e7d19SGeert Uytterhoeven - const: can_clk 538a5e7d19SGeert Uytterhoeven 548a5e7d19SGeert Uytterhoeven power-domains: 558a5e7d19SGeert Uytterhoeven maxItems: 1 568a5e7d19SGeert Uytterhoeven 571aa5a06cSLad Prabhakar resets: true 588a5e7d19SGeert Uytterhoeven 598a5e7d19SGeert Uytterhoeven renesas,no-can-fd: 608a5e7d19SGeert Uytterhoeven $ref: /schemas/types.yaml#/definitions/flag 618a5e7d19SGeert Uytterhoeven description: 628a5e7d19SGeert Uytterhoeven The controller can operate in either CAN FD only mode (default) or 638a5e7d19SGeert Uytterhoeven Classical CAN only mode. The mode is global to both the channels. 648a5e7d19SGeert Uytterhoeven Specify this property to put the controller in Classical CAN only mode. 658a5e7d19SGeert Uytterhoeven 668a5e7d19SGeert Uytterhoeven assigned-clocks: 678a5e7d19SGeert Uytterhoeven description: 688a5e7d19SGeert Uytterhoeven Reference to the CANFD clock. The CANFD clock is a div6 clock and can be 698a5e7d19SGeert Uytterhoeven used by both CAN (if present) and CAN FD controllers at the same time. 708a5e7d19SGeert Uytterhoeven It needs to be scaled to maximum frequency if any of these controllers 718a5e7d19SGeert Uytterhoeven use it. 728a5e7d19SGeert Uytterhoeven 738a5e7d19SGeert Uytterhoeven assigned-clock-rates: 748a5e7d19SGeert Uytterhoeven description: Maximum frequency of the CANFD clock. 758a5e7d19SGeert Uytterhoeven 768a5e7d19SGeert UytterhoevenpatternProperties: 778a5e7d19SGeert Uytterhoeven "^channel[01]$": 788a5e7d19SGeert Uytterhoeven type: object 798a5e7d19SGeert Uytterhoeven description: 808a5e7d19SGeert Uytterhoeven The controller supports two channels and each is represented as a child 818a5e7d19SGeert Uytterhoeven node. Each child node supports the "status" property only, which 828a5e7d19SGeert Uytterhoeven is used to enable/disable the respective channel. 838a5e7d19SGeert Uytterhoeven 848a5e7d19SGeert Uytterhoevenrequired: 858a5e7d19SGeert Uytterhoeven - compatible 868a5e7d19SGeert Uytterhoeven - reg 878a5e7d19SGeert Uytterhoeven - interrupts 888a5e7d19SGeert Uytterhoeven - clocks 898a5e7d19SGeert Uytterhoeven - clock-names 908a5e7d19SGeert Uytterhoeven - power-domains 918a5e7d19SGeert Uytterhoeven - resets 928a5e7d19SGeert Uytterhoeven - assigned-clocks 938a5e7d19SGeert Uytterhoeven - assigned-clock-rates 948a5e7d19SGeert Uytterhoeven - channel0 958a5e7d19SGeert Uytterhoeven - channel1 968a5e7d19SGeert Uytterhoeven 971aa5a06cSLad Prabhakarif: 981aa5a06cSLad Prabhakar properties: 991aa5a06cSLad Prabhakar compatible: 1001aa5a06cSLad Prabhakar contains: 1011aa5a06cSLad Prabhakar enum: 1021aa5a06cSLad Prabhakar - renesas,rzg2l-canfd 1031aa5a06cSLad Prabhakarthen: 1041aa5a06cSLad Prabhakar properties: 1051aa5a06cSLad Prabhakar interrupts: 1061aa5a06cSLad Prabhakar items: 1071aa5a06cSLad Prabhakar - description: CAN global error interrupt 1081aa5a06cSLad Prabhakar - description: CAN receive FIFO interrupt 1091aa5a06cSLad Prabhakar - description: CAN0 error interrupt 1101aa5a06cSLad Prabhakar - description: CAN0 transmit interrupt 1111aa5a06cSLad Prabhakar - description: CAN0 transmit/receive FIFO receive completion interrupt 1121aa5a06cSLad Prabhakar - description: CAN1 error interrupt 1131aa5a06cSLad Prabhakar - description: CAN1 transmit interrupt 1141aa5a06cSLad Prabhakar - description: CAN1 transmit/receive FIFO receive completion interrupt 1151aa5a06cSLad Prabhakar 1161aa5a06cSLad Prabhakar interrupt-names: 1171aa5a06cSLad Prabhakar items: 1181aa5a06cSLad Prabhakar - const: g_err 1191aa5a06cSLad Prabhakar - const: g_recc 1201aa5a06cSLad Prabhakar - const: ch0_err 1211aa5a06cSLad Prabhakar - const: ch0_rec 1221aa5a06cSLad Prabhakar - const: ch0_trx 1231aa5a06cSLad Prabhakar - const: ch1_err 1241aa5a06cSLad Prabhakar - const: ch1_rec 1251aa5a06cSLad Prabhakar - const: ch1_trx 1261aa5a06cSLad Prabhakar 1271aa5a06cSLad Prabhakar resets: 1281aa5a06cSLad Prabhakar maxItems: 2 1291aa5a06cSLad Prabhakar 1301aa5a06cSLad Prabhakar reset-names: 1311aa5a06cSLad Prabhakar items: 1321aa5a06cSLad Prabhakar - const: rstp_n 1331aa5a06cSLad Prabhakar - const: rstc_n 1341aa5a06cSLad Prabhakar 1351aa5a06cSLad Prabhakar required: 1361aa5a06cSLad Prabhakar - interrupt-names 1371aa5a06cSLad Prabhakar - reset-names 1381aa5a06cSLad Prabhakarelse: 1391aa5a06cSLad Prabhakar properties: 1401aa5a06cSLad Prabhakar interrupts: 1411aa5a06cSLad Prabhakar items: 1421aa5a06cSLad Prabhakar - description: Channel interrupt 1431aa5a06cSLad Prabhakar - description: Global interrupt 1441aa5a06cSLad Prabhakar 1451aa5a06cSLad Prabhakar interrupt-names: 1461aa5a06cSLad Prabhakar items: 1471aa5a06cSLad Prabhakar - const: ch_int 1481aa5a06cSLad Prabhakar - const: g_int 1491aa5a06cSLad Prabhakar 1501aa5a06cSLad Prabhakar resets: 1511aa5a06cSLad Prabhakar maxItems: 1 1521aa5a06cSLad Prabhakar 1538a5e7d19SGeert UytterhoevenunevaluatedProperties: false 1548a5e7d19SGeert Uytterhoeven 1558a5e7d19SGeert Uytterhoevenexamples: 1568a5e7d19SGeert Uytterhoeven - | 1578a5e7d19SGeert Uytterhoeven #include <dt-bindings/clock/r8a7795-cpg-mssr.h> 1588a5e7d19SGeert Uytterhoeven #include <dt-bindings/interrupt-controller/arm-gic.h> 1598a5e7d19SGeert Uytterhoeven #include <dt-bindings/power/r8a7795-sysc.h> 1608a5e7d19SGeert Uytterhoeven 1618a5e7d19SGeert Uytterhoeven canfd: can@e66c0000 { 1628a5e7d19SGeert Uytterhoeven compatible = "renesas,r8a7795-canfd", 1638a5e7d19SGeert Uytterhoeven "renesas,rcar-gen3-canfd"; 1648a5e7d19SGeert Uytterhoeven reg = <0xe66c0000 0x8000>; 1658a5e7d19SGeert Uytterhoeven interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>, 1668a5e7d19SGeert Uytterhoeven <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; 1678a5e7d19SGeert Uytterhoeven clocks = <&cpg CPG_MOD 914>, 1688a5e7d19SGeert Uytterhoeven <&cpg CPG_CORE R8A7795_CLK_CANFD>, 1698a5e7d19SGeert Uytterhoeven <&can_clk>; 1708a5e7d19SGeert Uytterhoeven clock-names = "fck", "canfd", "can_clk"; 1718a5e7d19SGeert Uytterhoeven assigned-clocks = <&cpg CPG_CORE R8A7795_CLK_CANFD>; 1728a5e7d19SGeert Uytterhoeven assigned-clock-rates = <40000000>; 1738a5e7d19SGeert Uytterhoeven power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 1748a5e7d19SGeert Uytterhoeven resets = <&cpg 914>; 1758a5e7d19SGeert Uytterhoeven 1768a5e7d19SGeert Uytterhoeven channel0 { 1778a5e7d19SGeert Uytterhoeven }; 1788a5e7d19SGeert Uytterhoeven 1798a5e7d19SGeert Uytterhoeven channel1 { 1808a5e7d19SGeert Uytterhoeven }; 1818a5e7d19SGeert Uytterhoeven }; 182