15956d97fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 25956d97fSEmmanuel Vadot%YAML 1.2 35956d97fSEmmanuel Vadot--- 45956d97fSEmmanuel Vadot$id: http://devicetree.org/schemas/net/can/renesas,rcar-canfd.yaml# 55956d97fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 65956d97fSEmmanuel Vadot 75956d97fSEmmanuel Vadottitle: Renesas R-Car CAN FD Controller 85956d97fSEmmanuel Vadot 95956d97fSEmmanuel Vadotmaintainers: 105956d97fSEmmanuel Vadot - Fabrizio Castro <fabrizio.castro.jz@renesas.com> 115956d97fSEmmanuel Vadot 125956d97fSEmmanuel Vadotproperties: 135956d97fSEmmanuel Vadot compatible: 145956d97fSEmmanuel Vadot oneOf: 155956d97fSEmmanuel Vadot - items: 165956d97fSEmmanuel Vadot - enum: 175956d97fSEmmanuel Vadot - renesas,r8a774a1-canfd # RZ/G2M 185956d97fSEmmanuel Vadot - renesas,r8a774b1-canfd # RZ/G2N 195956d97fSEmmanuel Vadot - renesas,r8a774c0-canfd # RZ/G2E 205956d97fSEmmanuel Vadot - renesas,r8a774e1-canfd # RZ/G2H 215956d97fSEmmanuel Vadot - renesas,r8a7795-canfd # R-Car H3 225956d97fSEmmanuel Vadot - renesas,r8a7796-canfd # R-Car M3-W 23d5b0e70fSEmmanuel Vadot - renesas,r8a77961-canfd # R-Car M3-W+ 245956d97fSEmmanuel Vadot - renesas,r8a77965-canfd # R-Car M3-N 255956d97fSEmmanuel Vadot - renesas,r8a77970-canfd # R-Car V3M 265956d97fSEmmanuel Vadot - renesas,r8a77980-canfd # R-Car V3H 275956d97fSEmmanuel Vadot - renesas,r8a77990-canfd # R-Car E3 285956d97fSEmmanuel Vadot - renesas,r8a77995-canfd # R-Car D3 295956d97fSEmmanuel Vadot - const: renesas,rcar-gen3-canfd # R-Car Gen3 and RZ/G2 305956d97fSEmmanuel Vadot 31354d7675SEmmanuel Vadot - items: 32354d7675SEmmanuel Vadot - enum: 33*cb7aa33aSEmmanuel Vadot - renesas,r8a779a0-canfd # R-Car V3U 34*cb7aa33aSEmmanuel Vadot - renesas,r8a779g0-canfd # R-Car V4H 35*cb7aa33aSEmmanuel Vadot - const: renesas,rcar-gen4-canfd # R-Car Gen4 36*cb7aa33aSEmmanuel Vadot 37*cb7aa33aSEmmanuel Vadot - items: 38*cb7aa33aSEmmanuel Vadot - enum: 398bab661aSEmmanuel Vadot - renesas,r9a07g043-canfd # RZ/G2UL and RZ/Five 40354d7675SEmmanuel Vadot - renesas,r9a07g044-canfd # RZ/G2{L,LC} 41c9ccf3a3SEmmanuel Vadot - renesas,r9a07g054-canfd # RZ/V2L 42354d7675SEmmanuel Vadot - const: renesas,rzg2l-canfd # RZ/G2L family 43354d7675SEmmanuel Vadot 445956d97fSEmmanuel Vadot reg: 455956d97fSEmmanuel Vadot maxItems: 1 465956d97fSEmmanuel Vadot 47354d7675SEmmanuel Vadot interrupts: true 485956d97fSEmmanuel Vadot 495956d97fSEmmanuel Vadot clocks: 505956d97fSEmmanuel Vadot maxItems: 3 515956d97fSEmmanuel Vadot 525956d97fSEmmanuel Vadot clock-names: 535956d97fSEmmanuel Vadot items: 545956d97fSEmmanuel Vadot - const: fck 555956d97fSEmmanuel Vadot - const: canfd 565956d97fSEmmanuel Vadot - const: can_clk 575956d97fSEmmanuel Vadot 585956d97fSEmmanuel Vadot power-domains: 595956d97fSEmmanuel Vadot maxItems: 1 605956d97fSEmmanuel Vadot 61354d7675SEmmanuel Vadot resets: true 625956d97fSEmmanuel Vadot 635956d97fSEmmanuel Vadot renesas,no-can-fd: 645956d97fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 655956d97fSEmmanuel Vadot description: 665956d97fSEmmanuel Vadot The controller can operate in either CAN FD only mode (default) or 67*cb7aa33aSEmmanuel Vadot Classical CAN only mode. The mode is global to all channels. 685956d97fSEmmanuel Vadot Specify this property to put the controller in Classical CAN only mode. 695956d97fSEmmanuel Vadot 705956d97fSEmmanuel Vadot assigned-clocks: 715956d97fSEmmanuel Vadot description: 725956d97fSEmmanuel Vadot Reference to the CANFD clock. The CANFD clock is a div6 clock and can be 735956d97fSEmmanuel Vadot used by both CAN (if present) and CAN FD controllers at the same time. 745956d97fSEmmanuel Vadot It needs to be scaled to maximum frequency if any of these controllers 755956d97fSEmmanuel Vadot use it. 765956d97fSEmmanuel Vadot 775956d97fSEmmanuel Vadot assigned-clock-rates: 785956d97fSEmmanuel Vadot description: Maximum frequency of the CANFD clock. 795956d97fSEmmanuel Vadot 805956d97fSEmmanuel VadotpatternProperties: 818bab661aSEmmanuel Vadot "^channel[0-7]$": 825956d97fSEmmanuel Vadot type: object 835956d97fSEmmanuel Vadot description: 848bab661aSEmmanuel Vadot The controller supports multiple channels and each is represented as a 858bab661aSEmmanuel Vadot child node. Each channel can be enabled/disabled individually. 868bab661aSEmmanuel Vadot 87*cb7aa33aSEmmanuel Vadot properties: 88*cb7aa33aSEmmanuel Vadot phys: 89*cb7aa33aSEmmanuel Vadot maxItems: 1 90*cb7aa33aSEmmanuel Vadot 918bab661aSEmmanuel Vadot additionalProperties: false 925956d97fSEmmanuel Vadot 935956d97fSEmmanuel Vadotrequired: 945956d97fSEmmanuel Vadot - compatible 955956d97fSEmmanuel Vadot - reg 965956d97fSEmmanuel Vadot - interrupts 97d5b0e70fSEmmanuel Vadot - interrupt-names 985956d97fSEmmanuel Vadot - clocks 995956d97fSEmmanuel Vadot - clock-names 1005956d97fSEmmanuel Vadot - power-domains 1015956d97fSEmmanuel Vadot - resets 1025956d97fSEmmanuel Vadot - assigned-clocks 1035956d97fSEmmanuel Vadot - assigned-clock-rates 1045956d97fSEmmanuel Vadot - channel0 1055956d97fSEmmanuel Vadot - channel1 1065956d97fSEmmanuel Vadot 1078bab661aSEmmanuel VadotallOf: 1088bab661aSEmmanuel Vadot - $ref: can-controller.yaml# 1098bab661aSEmmanuel Vadot 1108bab661aSEmmanuel Vadot - if: 111354d7675SEmmanuel Vadot properties: 112354d7675SEmmanuel Vadot compatible: 113354d7675SEmmanuel Vadot contains: 114354d7675SEmmanuel Vadot enum: 115354d7675SEmmanuel Vadot - renesas,rzg2l-canfd 116354d7675SEmmanuel Vadot then: 117354d7675SEmmanuel Vadot properties: 118354d7675SEmmanuel Vadot interrupts: 119354d7675SEmmanuel Vadot items: 120354d7675SEmmanuel Vadot - description: CAN global error interrupt 121354d7675SEmmanuel Vadot - description: CAN receive FIFO interrupt 122354d7675SEmmanuel Vadot - description: CAN0 error interrupt 123354d7675SEmmanuel Vadot - description: CAN0 transmit interrupt 124354d7675SEmmanuel Vadot - description: CAN0 transmit/receive FIFO receive completion interrupt 125354d7675SEmmanuel Vadot - description: CAN1 error interrupt 126354d7675SEmmanuel Vadot - description: CAN1 transmit interrupt 127354d7675SEmmanuel Vadot - description: CAN1 transmit/receive FIFO receive completion interrupt 128354d7675SEmmanuel Vadot 129354d7675SEmmanuel Vadot interrupt-names: 130354d7675SEmmanuel Vadot items: 131354d7675SEmmanuel Vadot - const: g_err 132354d7675SEmmanuel Vadot - const: g_recc 133354d7675SEmmanuel Vadot - const: ch0_err 134354d7675SEmmanuel Vadot - const: ch0_rec 135354d7675SEmmanuel Vadot - const: ch0_trx 136354d7675SEmmanuel Vadot - const: ch1_err 137354d7675SEmmanuel Vadot - const: ch1_rec 138354d7675SEmmanuel Vadot - const: ch1_trx 139354d7675SEmmanuel Vadot 140354d7675SEmmanuel Vadot resets: 141354d7675SEmmanuel Vadot maxItems: 2 142354d7675SEmmanuel Vadot 143354d7675SEmmanuel Vadot reset-names: 144354d7675SEmmanuel Vadot items: 145354d7675SEmmanuel Vadot - const: rstp_n 146354d7675SEmmanuel Vadot - const: rstc_n 147354d7675SEmmanuel Vadot 148354d7675SEmmanuel Vadot required: 149354d7675SEmmanuel Vadot - reset-names 150354d7675SEmmanuel Vadot else: 151354d7675SEmmanuel Vadot properties: 152354d7675SEmmanuel Vadot interrupts: 153354d7675SEmmanuel Vadot items: 154354d7675SEmmanuel Vadot - description: Channel interrupt 155354d7675SEmmanuel Vadot - description: Global interrupt 156354d7675SEmmanuel Vadot 157354d7675SEmmanuel Vadot interrupt-names: 158354d7675SEmmanuel Vadot items: 159354d7675SEmmanuel Vadot - const: ch_int 160354d7675SEmmanuel Vadot - const: g_int 161354d7675SEmmanuel Vadot 162354d7675SEmmanuel Vadot resets: 163354d7675SEmmanuel Vadot maxItems: 1 164354d7675SEmmanuel Vadot 1658bab661aSEmmanuel Vadot - if: 1668bab661aSEmmanuel Vadot not: 1678bab661aSEmmanuel Vadot properties: 1688bab661aSEmmanuel Vadot compatible: 1698bab661aSEmmanuel Vadot contains: 170*cb7aa33aSEmmanuel Vadot const: renesas,rcar-gen4-canfd 1718bab661aSEmmanuel Vadot then: 1728bab661aSEmmanuel Vadot patternProperties: 1738bab661aSEmmanuel Vadot "^channel[2-7]$": false 1748bab661aSEmmanuel Vadot 1755956d97fSEmmanuel VadotunevaluatedProperties: false 1765956d97fSEmmanuel Vadot 1775956d97fSEmmanuel Vadotexamples: 1785956d97fSEmmanuel Vadot - | 1795956d97fSEmmanuel Vadot #include <dt-bindings/clock/r8a7795-cpg-mssr.h> 1805956d97fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 1815956d97fSEmmanuel Vadot #include <dt-bindings/power/r8a7795-sysc.h> 1825956d97fSEmmanuel Vadot 1835956d97fSEmmanuel Vadot canfd: can@e66c0000 { 1845956d97fSEmmanuel Vadot compatible = "renesas,r8a7795-canfd", 1855956d97fSEmmanuel Vadot "renesas,rcar-gen3-canfd"; 1865956d97fSEmmanuel Vadot reg = <0xe66c0000 0x8000>; 1875956d97fSEmmanuel Vadot interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>, 1885956d97fSEmmanuel Vadot <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; 189d5b0e70fSEmmanuel Vadot interrupt-names = "ch_int", "g_int"; 1905956d97fSEmmanuel Vadot clocks = <&cpg CPG_MOD 914>, 1915956d97fSEmmanuel Vadot <&cpg CPG_CORE R8A7795_CLK_CANFD>, 1925956d97fSEmmanuel Vadot <&can_clk>; 1935956d97fSEmmanuel Vadot clock-names = "fck", "canfd", "can_clk"; 1945956d97fSEmmanuel Vadot assigned-clocks = <&cpg CPG_CORE R8A7795_CLK_CANFD>; 1955956d97fSEmmanuel Vadot assigned-clock-rates = <40000000>; 1965956d97fSEmmanuel Vadot power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 1975956d97fSEmmanuel Vadot resets = <&cpg 914>; 1985956d97fSEmmanuel Vadot 1995956d97fSEmmanuel Vadot channel0 { 2005956d97fSEmmanuel Vadot }; 2015956d97fSEmmanuel Vadot 2025956d97fSEmmanuel Vadot channel1 { 2035956d97fSEmmanuel Vadot }; 2045956d97fSEmmanuel Vadot }; 205