1*5956d97fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*5956d97fSEmmanuel Vadot%YAML 1.2 3*5956d97fSEmmanuel Vadot--- 4*5956d97fSEmmanuel Vadot$id: http://devicetree.org/schemas/net/can/renesas,rcar-can.yaml# 5*5956d97fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*5956d97fSEmmanuel Vadot 7*5956d97fSEmmanuel Vadottitle: Renesas R-Car CAN Controller 8*5956d97fSEmmanuel Vadot 9*5956d97fSEmmanuel Vadotmaintainers: 10*5956d97fSEmmanuel Vadot - Sergei Shtylyov <sergei.shtylyov@gmail.com> 11*5956d97fSEmmanuel Vadot 12*5956d97fSEmmanuel Vadotproperties: 13*5956d97fSEmmanuel Vadot compatible: 14*5956d97fSEmmanuel Vadot oneOf: 15*5956d97fSEmmanuel Vadot - items: 16*5956d97fSEmmanuel Vadot - enum: 17*5956d97fSEmmanuel Vadot - renesas,can-r8a7778 # R-Car M1-A 18*5956d97fSEmmanuel Vadot - renesas,can-r8a7779 # R-Car H1 19*5956d97fSEmmanuel Vadot - const: renesas,rcar-gen1-can # R-Car Gen1 20*5956d97fSEmmanuel Vadot 21*5956d97fSEmmanuel Vadot - items: 22*5956d97fSEmmanuel Vadot - enum: 23*5956d97fSEmmanuel Vadot - renesas,can-r8a7742 # RZ/G1H 24*5956d97fSEmmanuel Vadot - renesas,can-r8a7743 # RZ/G1M 25*5956d97fSEmmanuel Vadot - renesas,can-r8a7744 # RZ/G1N 26*5956d97fSEmmanuel Vadot - renesas,can-r8a7745 # RZ/G1E 27*5956d97fSEmmanuel Vadot - renesas,can-r8a77470 # RZ/G1C 28*5956d97fSEmmanuel Vadot - renesas,can-r8a7790 # R-Car H2 29*5956d97fSEmmanuel Vadot - renesas,can-r8a7791 # R-Car M2-W 30*5956d97fSEmmanuel Vadot - renesas,can-r8a7792 # R-Car V2H 31*5956d97fSEmmanuel Vadot - renesas,can-r8a7793 # R-Car M2-N 32*5956d97fSEmmanuel Vadot - renesas,can-r8a7794 # R-Car E2 33*5956d97fSEmmanuel Vadot - const: renesas,rcar-gen2-can # R-Car Gen2 and RZ/G1 34*5956d97fSEmmanuel Vadot 35*5956d97fSEmmanuel Vadot - items: 36*5956d97fSEmmanuel Vadot - enum: 37*5956d97fSEmmanuel Vadot - renesas,can-r8a774a1 # RZ/G2M 38*5956d97fSEmmanuel Vadot - renesas,can-r8a774b1 # RZ/G2N 39*5956d97fSEmmanuel Vadot - renesas,can-r8a774c0 # RZ/G2E 40*5956d97fSEmmanuel Vadot - renesas,can-r8a774e1 # RZ/G2H 41*5956d97fSEmmanuel Vadot - renesas,can-r8a7795 # R-Car H3 42*5956d97fSEmmanuel Vadot - renesas,can-r8a7796 # R-Car M3-W 43*5956d97fSEmmanuel Vadot - renesas,can-r8a77961 # R-Car M3-W+ 44*5956d97fSEmmanuel Vadot - renesas,can-r8a77965 # R-Car M3-N 45*5956d97fSEmmanuel Vadot - renesas,can-r8a77990 # R-Car E3 46*5956d97fSEmmanuel Vadot - renesas,can-r8a77995 # R-Car D3 47*5956d97fSEmmanuel Vadot - const: renesas,rcar-gen3-can # R-Car Gen3 and RZ/G2 48*5956d97fSEmmanuel Vadot 49*5956d97fSEmmanuel Vadot reg: 50*5956d97fSEmmanuel Vadot maxItems: 1 51*5956d97fSEmmanuel Vadot 52*5956d97fSEmmanuel Vadot interrupts: 53*5956d97fSEmmanuel Vadot maxItems: 1 54*5956d97fSEmmanuel Vadot 55*5956d97fSEmmanuel Vadot clocks: 56*5956d97fSEmmanuel Vadot maxItems: 3 57*5956d97fSEmmanuel Vadot 58*5956d97fSEmmanuel Vadot clock-names: 59*5956d97fSEmmanuel Vadot items: 60*5956d97fSEmmanuel Vadot - const: clkp1 61*5956d97fSEmmanuel Vadot - const: clkp2 62*5956d97fSEmmanuel Vadot - const: can_clk 63*5956d97fSEmmanuel Vadot 64*5956d97fSEmmanuel Vadot power-domains: 65*5956d97fSEmmanuel Vadot maxItems: 1 66*5956d97fSEmmanuel Vadot 67*5956d97fSEmmanuel Vadot resets: 68*5956d97fSEmmanuel Vadot maxItems: 1 69*5956d97fSEmmanuel Vadot 70*5956d97fSEmmanuel Vadot renesas,can-clock-select: 71*5956d97fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 72*5956d97fSEmmanuel Vadot enum: [ 0, 1, 3 ] 73*5956d97fSEmmanuel Vadot default: 0 74*5956d97fSEmmanuel Vadot description: | 75*5956d97fSEmmanuel Vadot R-Car CAN Clock Source Select. Valid values are: 76*5956d97fSEmmanuel Vadot <0x0> (default) : Peripheral clock (clkp1) 77*5956d97fSEmmanuel Vadot <0x1> : Peripheral clock (clkp2) 78*5956d97fSEmmanuel Vadot <0x3> : External input clock 79*5956d97fSEmmanuel Vadot 80*5956d97fSEmmanuel Vadot assigned-clocks: 81*5956d97fSEmmanuel Vadot description: 82*5956d97fSEmmanuel Vadot Reference to the clkp2 (CANFD) clock. 83*5956d97fSEmmanuel Vadot On R-Car Gen3 and RZ/G2 SoCs, "clkp2" is the CANFD clock. This is a div6 84*5956d97fSEmmanuel Vadot clock and can be used by both CAN and CAN FD controllers at the same 85*5956d97fSEmmanuel Vadot time. It needs to be scaled to maximum frequency if any of these 86*5956d97fSEmmanuel Vadot controllers use it. 87*5956d97fSEmmanuel Vadot 88*5956d97fSEmmanuel Vadot assigned-clock-rates: 89*5956d97fSEmmanuel Vadot description: Maximum frequency of the CANFD clock. 90*5956d97fSEmmanuel Vadot 91*5956d97fSEmmanuel Vadotrequired: 92*5956d97fSEmmanuel Vadot - compatible 93*5956d97fSEmmanuel Vadot - reg 94*5956d97fSEmmanuel Vadot - interrupts 95*5956d97fSEmmanuel Vadot - clocks 96*5956d97fSEmmanuel Vadot - clock-names 97*5956d97fSEmmanuel Vadot - power-domains 98*5956d97fSEmmanuel Vadot 99*5956d97fSEmmanuel VadotallOf: 100*5956d97fSEmmanuel Vadot - $ref: can-controller.yaml# 101*5956d97fSEmmanuel Vadot 102*5956d97fSEmmanuel Vadot - if: 103*5956d97fSEmmanuel Vadot not: 104*5956d97fSEmmanuel Vadot properties: 105*5956d97fSEmmanuel Vadot compatible: 106*5956d97fSEmmanuel Vadot contains: 107*5956d97fSEmmanuel Vadot const: renesas,rcar-gen1-can 108*5956d97fSEmmanuel Vadot then: 109*5956d97fSEmmanuel Vadot required: 110*5956d97fSEmmanuel Vadot - resets 111*5956d97fSEmmanuel Vadot 112*5956d97fSEmmanuel Vadot - if: 113*5956d97fSEmmanuel Vadot properties: 114*5956d97fSEmmanuel Vadot compatible: 115*5956d97fSEmmanuel Vadot contains: 116*5956d97fSEmmanuel Vadot const: renesas,rcar-gen3-can 117*5956d97fSEmmanuel Vadot then: 118*5956d97fSEmmanuel Vadot required: 119*5956d97fSEmmanuel Vadot - assigned-clocks 120*5956d97fSEmmanuel Vadot - assigned-clock-rates 121*5956d97fSEmmanuel Vadot 122*5956d97fSEmmanuel VadotunevaluatedProperties: false 123*5956d97fSEmmanuel Vadot 124*5956d97fSEmmanuel Vadotexamples: 125*5956d97fSEmmanuel Vadot - | 126*5956d97fSEmmanuel Vadot #include <dt-bindings/clock/r8a7791-cpg-mssr.h> 127*5956d97fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 128*5956d97fSEmmanuel Vadot #include <dt-bindings/power/r8a7791-sysc.h> 129*5956d97fSEmmanuel Vadot 130*5956d97fSEmmanuel Vadot can0: can@e6e80000 { 131*5956d97fSEmmanuel Vadot compatible = "renesas,can-r8a7791", "renesas,rcar-gen2-can"; 132*5956d97fSEmmanuel Vadot reg = <0xe6e80000 0x1000>; 133*5956d97fSEmmanuel Vadot interrupts = <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>; 134*5956d97fSEmmanuel Vadot clocks = <&cpg CPG_MOD 916>, 135*5956d97fSEmmanuel Vadot <&cpg CPG_CORE R8A7791_CLK_RCAN>, <&can_clk>; 136*5956d97fSEmmanuel Vadot clock-names = "clkp1", "clkp2", "can_clk"; 137*5956d97fSEmmanuel Vadot power-domains = <&sysc R8A7791_PD_ALWAYS_ON>; 138*5956d97fSEmmanuel Vadot resets = <&cpg 916>; 139*5956d97fSEmmanuel Vadot }; 140