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*8bab661aSEmmanuel Vadot - renesas,r9a07g043-canfd # RZ/G2UL and RZ/Five 34354d7675SEmmanuel Vadot - renesas,r9a07g044-canfd # RZ/G2{L,LC} 35c9ccf3a3SEmmanuel Vadot - renesas,r9a07g054-canfd # RZ/V2L 36354d7675SEmmanuel Vadot - const: renesas,rzg2l-canfd # RZ/G2L family 37354d7675SEmmanuel Vadot 38c9ccf3a3SEmmanuel Vadot - const: renesas,r8a779a0-canfd # R-Car V3U 39c9ccf3a3SEmmanuel Vadot 405956d97fSEmmanuel Vadot reg: 415956d97fSEmmanuel Vadot maxItems: 1 425956d97fSEmmanuel Vadot 43354d7675SEmmanuel Vadot interrupts: true 445956d97fSEmmanuel Vadot 455956d97fSEmmanuel Vadot clocks: 465956d97fSEmmanuel Vadot maxItems: 3 475956d97fSEmmanuel Vadot 485956d97fSEmmanuel Vadot clock-names: 495956d97fSEmmanuel Vadot items: 505956d97fSEmmanuel Vadot - const: fck 515956d97fSEmmanuel Vadot - const: canfd 525956d97fSEmmanuel Vadot - const: can_clk 535956d97fSEmmanuel Vadot 545956d97fSEmmanuel Vadot power-domains: 555956d97fSEmmanuel Vadot maxItems: 1 565956d97fSEmmanuel Vadot 57354d7675SEmmanuel Vadot resets: true 585956d97fSEmmanuel Vadot 595956d97fSEmmanuel Vadot renesas,no-can-fd: 605956d97fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 615956d97fSEmmanuel Vadot description: 625956d97fSEmmanuel Vadot The controller can operate in either CAN FD only mode (default) or 635956d97fSEmmanuel Vadot Classical CAN only mode. The mode is global to both the channels. 645956d97fSEmmanuel Vadot Specify this property to put the controller in Classical CAN only mode. 655956d97fSEmmanuel Vadot 665956d97fSEmmanuel Vadot assigned-clocks: 675956d97fSEmmanuel Vadot description: 685956d97fSEmmanuel Vadot Reference to the CANFD clock. The CANFD clock is a div6 clock and can be 695956d97fSEmmanuel Vadot used by both CAN (if present) and CAN FD controllers at the same time. 705956d97fSEmmanuel Vadot It needs to be scaled to maximum frequency if any of these controllers 715956d97fSEmmanuel Vadot use it. 725956d97fSEmmanuel Vadot 735956d97fSEmmanuel Vadot assigned-clock-rates: 745956d97fSEmmanuel Vadot description: Maximum frequency of the CANFD clock. 755956d97fSEmmanuel Vadot 765956d97fSEmmanuel VadotpatternProperties: 77*8bab661aSEmmanuel Vadot "^channel[0-7]$": 785956d97fSEmmanuel Vadot type: object 795956d97fSEmmanuel Vadot description: 80*8bab661aSEmmanuel Vadot The controller supports multiple channels and each is represented as a 81*8bab661aSEmmanuel Vadot child node. Each channel can be enabled/disabled individually. 82*8bab661aSEmmanuel Vadot 83*8bab661aSEmmanuel Vadot additionalProperties: false 845956d97fSEmmanuel Vadot 855956d97fSEmmanuel Vadotrequired: 865956d97fSEmmanuel Vadot - compatible 875956d97fSEmmanuel Vadot - reg 885956d97fSEmmanuel Vadot - interrupts 89d5b0e70fSEmmanuel Vadot - interrupt-names 905956d97fSEmmanuel Vadot - clocks 915956d97fSEmmanuel Vadot - clock-names 925956d97fSEmmanuel Vadot - power-domains 935956d97fSEmmanuel Vadot - resets 945956d97fSEmmanuel Vadot - assigned-clocks 955956d97fSEmmanuel Vadot - assigned-clock-rates 965956d97fSEmmanuel Vadot - channel0 975956d97fSEmmanuel Vadot - channel1 985956d97fSEmmanuel Vadot 99*8bab661aSEmmanuel VadotallOf: 100*8bab661aSEmmanuel Vadot - $ref: can-controller.yaml# 101*8bab661aSEmmanuel Vadot 102*8bab661aSEmmanuel Vadot - if: 103354d7675SEmmanuel Vadot properties: 104354d7675SEmmanuel Vadot compatible: 105354d7675SEmmanuel Vadot contains: 106354d7675SEmmanuel Vadot enum: 107354d7675SEmmanuel Vadot - renesas,rzg2l-canfd 108354d7675SEmmanuel Vadot then: 109354d7675SEmmanuel Vadot properties: 110354d7675SEmmanuel Vadot interrupts: 111354d7675SEmmanuel Vadot items: 112354d7675SEmmanuel Vadot - description: CAN global error interrupt 113354d7675SEmmanuel Vadot - description: CAN receive FIFO interrupt 114354d7675SEmmanuel Vadot - description: CAN0 error interrupt 115354d7675SEmmanuel Vadot - description: CAN0 transmit interrupt 116354d7675SEmmanuel Vadot - description: CAN0 transmit/receive FIFO receive completion interrupt 117354d7675SEmmanuel Vadot - description: CAN1 error interrupt 118354d7675SEmmanuel Vadot - description: CAN1 transmit interrupt 119354d7675SEmmanuel Vadot - description: CAN1 transmit/receive FIFO receive completion interrupt 120354d7675SEmmanuel Vadot 121354d7675SEmmanuel Vadot interrupt-names: 122354d7675SEmmanuel Vadot items: 123354d7675SEmmanuel Vadot - const: g_err 124354d7675SEmmanuel Vadot - const: g_recc 125354d7675SEmmanuel Vadot - const: ch0_err 126354d7675SEmmanuel Vadot - const: ch0_rec 127354d7675SEmmanuel Vadot - const: ch0_trx 128354d7675SEmmanuel Vadot - const: ch1_err 129354d7675SEmmanuel Vadot - const: ch1_rec 130354d7675SEmmanuel Vadot - const: ch1_trx 131354d7675SEmmanuel Vadot 132354d7675SEmmanuel Vadot resets: 133354d7675SEmmanuel Vadot maxItems: 2 134354d7675SEmmanuel Vadot 135354d7675SEmmanuel Vadot reset-names: 136354d7675SEmmanuel Vadot items: 137354d7675SEmmanuel Vadot - const: rstp_n 138354d7675SEmmanuel Vadot - const: rstc_n 139354d7675SEmmanuel Vadot 140354d7675SEmmanuel Vadot required: 141354d7675SEmmanuel Vadot - reset-names 142354d7675SEmmanuel Vadot else: 143354d7675SEmmanuel Vadot properties: 144354d7675SEmmanuel Vadot interrupts: 145354d7675SEmmanuel Vadot items: 146354d7675SEmmanuel Vadot - description: Channel interrupt 147354d7675SEmmanuel Vadot - description: Global interrupt 148354d7675SEmmanuel Vadot 149354d7675SEmmanuel Vadot interrupt-names: 150354d7675SEmmanuel Vadot items: 151354d7675SEmmanuel Vadot - const: ch_int 152354d7675SEmmanuel Vadot - const: g_int 153354d7675SEmmanuel Vadot 154354d7675SEmmanuel Vadot resets: 155354d7675SEmmanuel Vadot maxItems: 1 156354d7675SEmmanuel Vadot 157*8bab661aSEmmanuel Vadot - if: 158*8bab661aSEmmanuel Vadot not: 159*8bab661aSEmmanuel Vadot properties: 160*8bab661aSEmmanuel Vadot compatible: 161*8bab661aSEmmanuel Vadot contains: 162*8bab661aSEmmanuel Vadot const: renesas,r8a779a0-canfd 163*8bab661aSEmmanuel Vadot then: 164*8bab661aSEmmanuel Vadot patternProperties: 165*8bab661aSEmmanuel Vadot "^channel[2-7]$": false 166*8bab661aSEmmanuel Vadot 1675956d97fSEmmanuel VadotunevaluatedProperties: false 1685956d97fSEmmanuel Vadot 1695956d97fSEmmanuel Vadotexamples: 1705956d97fSEmmanuel Vadot - | 1715956d97fSEmmanuel Vadot #include <dt-bindings/clock/r8a7795-cpg-mssr.h> 1725956d97fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 1735956d97fSEmmanuel Vadot #include <dt-bindings/power/r8a7795-sysc.h> 1745956d97fSEmmanuel Vadot 1755956d97fSEmmanuel Vadot canfd: can@e66c0000 { 1765956d97fSEmmanuel Vadot compatible = "renesas,r8a7795-canfd", 1775956d97fSEmmanuel Vadot "renesas,rcar-gen3-canfd"; 1785956d97fSEmmanuel Vadot reg = <0xe66c0000 0x8000>; 1795956d97fSEmmanuel Vadot interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>, 1805956d97fSEmmanuel Vadot <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; 181d5b0e70fSEmmanuel Vadot interrupt-names = "ch_int", "g_int"; 1825956d97fSEmmanuel Vadot clocks = <&cpg CPG_MOD 914>, 1835956d97fSEmmanuel Vadot <&cpg CPG_CORE R8A7795_CLK_CANFD>, 1845956d97fSEmmanuel Vadot <&can_clk>; 1855956d97fSEmmanuel Vadot clock-names = "fck", "canfd", "can_clk"; 1865956d97fSEmmanuel Vadot assigned-clocks = <&cpg CPG_CORE R8A7795_CLK_CANFD>; 1875956d97fSEmmanuel Vadot assigned-clock-rates = <40000000>; 1885956d97fSEmmanuel Vadot power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 1895956d97fSEmmanuel Vadot resets = <&cpg 914>; 1905956d97fSEmmanuel Vadot 1915956d97fSEmmanuel Vadot channel0 { 1925956d97fSEmmanuel Vadot }; 1935956d97fSEmmanuel Vadot 1945956d97fSEmmanuel Vadot channel1 { 1955956d97fSEmmanuel Vadot }; 1965956d97fSEmmanuel Vadot }; 197