xref: /freebsd/sys/contrib/device-tree/Bindings/net/can/renesas,rcar-canfd.yaml (revision 5956d97f4b3204318ceb6aa9c77bd0bc6ea87a41)
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-canfd.yaml#
5*5956d97fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*5956d97fSEmmanuel Vadot
7*5956d97fSEmmanuel Vadottitle: Renesas R-Car CAN FD Controller
8*5956d97fSEmmanuel Vadot
9*5956d97fSEmmanuel Vadotmaintainers:
10*5956d97fSEmmanuel Vadot  - Fabrizio Castro <fabrizio.castro.jz@renesas.com>
11*5956d97fSEmmanuel Vadot
12*5956d97fSEmmanuel VadotallOf:
13*5956d97fSEmmanuel Vadot  - $ref: can-controller.yaml#
14*5956d97fSEmmanuel Vadot
15*5956d97fSEmmanuel Vadotproperties:
16*5956d97fSEmmanuel Vadot  compatible:
17*5956d97fSEmmanuel Vadot    oneOf:
18*5956d97fSEmmanuel Vadot      - items:
19*5956d97fSEmmanuel Vadot          - enum:
20*5956d97fSEmmanuel Vadot              - renesas,r8a774a1-canfd     # RZ/G2M
21*5956d97fSEmmanuel Vadot              - renesas,r8a774b1-canfd     # RZ/G2N
22*5956d97fSEmmanuel Vadot              - renesas,r8a774c0-canfd     # RZ/G2E
23*5956d97fSEmmanuel Vadot              - renesas,r8a774e1-canfd     # RZ/G2H
24*5956d97fSEmmanuel Vadot              - renesas,r8a7795-canfd      # R-Car H3
25*5956d97fSEmmanuel Vadot              - renesas,r8a7796-canfd      # R-Car M3-W
26*5956d97fSEmmanuel Vadot              - renesas,r8a77965-canfd     # R-Car M3-N
27*5956d97fSEmmanuel Vadot              - renesas,r8a77970-canfd     # R-Car V3M
28*5956d97fSEmmanuel Vadot              - renesas,r8a77980-canfd     # R-Car V3H
29*5956d97fSEmmanuel Vadot              - renesas,r8a77990-canfd     # R-Car E3
30*5956d97fSEmmanuel Vadot              - renesas,r8a77995-canfd     # R-Car D3
31*5956d97fSEmmanuel Vadot          - const: renesas,rcar-gen3-canfd # R-Car Gen3 and RZ/G2
32*5956d97fSEmmanuel Vadot
33*5956d97fSEmmanuel Vadot  reg:
34*5956d97fSEmmanuel Vadot    maxItems: 1
35*5956d97fSEmmanuel Vadot
36*5956d97fSEmmanuel Vadot  interrupts:
37*5956d97fSEmmanuel Vadot    items:
38*5956d97fSEmmanuel Vadot      - description: Channel interrupt
39*5956d97fSEmmanuel Vadot      - description: Global interrupt
40*5956d97fSEmmanuel Vadot
41*5956d97fSEmmanuel Vadot  clocks:
42*5956d97fSEmmanuel Vadot    maxItems: 3
43*5956d97fSEmmanuel Vadot
44*5956d97fSEmmanuel Vadot  clock-names:
45*5956d97fSEmmanuel Vadot    items:
46*5956d97fSEmmanuel Vadot      - const: fck
47*5956d97fSEmmanuel Vadot      - const: canfd
48*5956d97fSEmmanuel Vadot      - const: can_clk
49*5956d97fSEmmanuel Vadot
50*5956d97fSEmmanuel Vadot  power-domains:
51*5956d97fSEmmanuel Vadot    maxItems: 1
52*5956d97fSEmmanuel Vadot
53*5956d97fSEmmanuel Vadot  resets:
54*5956d97fSEmmanuel Vadot    maxItems: 1
55*5956d97fSEmmanuel Vadot
56*5956d97fSEmmanuel Vadot  renesas,no-can-fd:
57*5956d97fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
58*5956d97fSEmmanuel Vadot    description:
59*5956d97fSEmmanuel Vadot      The controller can operate in either CAN FD only mode (default) or
60*5956d97fSEmmanuel Vadot      Classical CAN only mode.  The mode is global to both the channels.
61*5956d97fSEmmanuel Vadot      Specify this property to put the controller in Classical CAN only mode.
62*5956d97fSEmmanuel Vadot
63*5956d97fSEmmanuel Vadot  assigned-clocks:
64*5956d97fSEmmanuel Vadot    description:
65*5956d97fSEmmanuel Vadot      Reference to the CANFD clock.  The CANFD clock is a div6 clock and can be
66*5956d97fSEmmanuel Vadot      used by both CAN (if present) and CAN FD controllers at the same time.
67*5956d97fSEmmanuel Vadot      It needs to be scaled to maximum frequency if any of these controllers
68*5956d97fSEmmanuel Vadot      use it.
69*5956d97fSEmmanuel Vadot
70*5956d97fSEmmanuel Vadot  assigned-clock-rates:
71*5956d97fSEmmanuel Vadot    description: Maximum frequency of the CANFD clock.
72*5956d97fSEmmanuel Vadot
73*5956d97fSEmmanuel VadotpatternProperties:
74*5956d97fSEmmanuel Vadot  "^channel[01]$":
75*5956d97fSEmmanuel Vadot    type: object
76*5956d97fSEmmanuel Vadot    description:
77*5956d97fSEmmanuel Vadot      The controller supports two channels and each is represented as a child
78*5956d97fSEmmanuel Vadot      node.  Each child node supports the "status" property only, which
79*5956d97fSEmmanuel Vadot      is used to enable/disable the respective channel.
80*5956d97fSEmmanuel Vadot
81*5956d97fSEmmanuel Vadotrequired:
82*5956d97fSEmmanuel Vadot  - compatible
83*5956d97fSEmmanuel Vadot  - reg
84*5956d97fSEmmanuel Vadot  - interrupts
85*5956d97fSEmmanuel Vadot  - clocks
86*5956d97fSEmmanuel Vadot  - clock-names
87*5956d97fSEmmanuel Vadot  - power-domains
88*5956d97fSEmmanuel Vadot  - resets
89*5956d97fSEmmanuel Vadot  - assigned-clocks
90*5956d97fSEmmanuel Vadot  - assigned-clock-rates
91*5956d97fSEmmanuel Vadot  - channel0
92*5956d97fSEmmanuel Vadot  - channel1
93*5956d97fSEmmanuel Vadot
94*5956d97fSEmmanuel VadotunevaluatedProperties: false
95*5956d97fSEmmanuel Vadot
96*5956d97fSEmmanuel Vadotexamples:
97*5956d97fSEmmanuel Vadot  - |
98*5956d97fSEmmanuel Vadot    #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
99*5956d97fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
100*5956d97fSEmmanuel Vadot    #include <dt-bindings/power/r8a7795-sysc.h>
101*5956d97fSEmmanuel Vadot
102*5956d97fSEmmanuel Vadot    canfd: can@e66c0000 {
103*5956d97fSEmmanuel Vadot            compatible = "renesas,r8a7795-canfd",
104*5956d97fSEmmanuel Vadot                         "renesas,rcar-gen3-canfd";
105*5956d97fSEmmanuel Vadot            reg = <0xe66c0000 0x8000>;
106*5956d97fSEmmanuel Vadot            interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>,
107*5956d97fSEmmanuel Vadot                         <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
108*5956d97fSEmmanuel Vadot            clocks = <&cpg CPG_MOD 914>,
109*5956d97fSEmmanuel Vadot                     <&cpg CPG_CORE R8A7795_CLK_CANFD>,
110*5956d97fSEmmanuel Vadot                     <&can_clk>;
111*5956d97fSEmmanuel Vadot            clock-names = "fck", "canfd", "can_clk";
112*5956d97fSEmmanuel Vadot            assigned-clocks = <&cpg CPG_CORE R8A7795_CLK_CANFD>;
113*5956d97fSEmmanuel Vadot            assigned-clock-rates = <40000000>;
114*5956d97fSEmmanuel Vadot            power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
115*5956d97fSEmmanuel Vadot            resets = <&cpg 914>;
116*5956d97fSEmmanuel Vadot
117*5956d97fSEmmanuel Vadot            channel0 {
118*5956d97fSEmmanuel Vadot            };
119*5956d97fSEmmanuel Vadot
120*5956d97fSEmmanuel Vadot            channel1 {
121*5956d97fSEmmanuel Vadot            };
122*5956d97fSEmmanuel Vadot    };
123