1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/net/can/bosch,c_can.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Bosch C_CAN/D_CAN controller Device Tree Bindings
8
9description: Bosch C_CAN/D_CAN controller for CAN bus
10
11maintainers:
12  - Dario Binacchi <dariobin@libero.it>
13
14allOf:
15  - $ref: can-controller.yaml#
16
17properties:
18  compatible:
19    oneOf:
20      - enum:
21          - bosch,c_can
22          - bosch,d_can
23          - ti,dra7-d_can
24          - ti,am3352-d_can
25      - items:
26          - enum:
27              - ti,am4372-d_can
28          - const: ti,am3352-d_can
29
30  reg:
31    maxItems: 1
32
33  interrupts:
34    minItems: 1
35    maxItems: 4
36
37  power-domains:
38    description: |
39      Should contain a phandle to a PM domain provider node and an args
40      specifier containing the DCAN device id value. It's mandatory for
41      Keystone 2 66AK2G SoCs only.
42    maxItems: 1
43
44  clocks:
45    description: |
46      CAN functional clock phandle.
47    maxItems: 1
48
49  clock-names:
50    maxItems: 1
51
52  syscon-raminit:
53    description: |
54      Handle to system control region that contains the RAMINIT register,
55      register offset to the RAMINIT register and the CAN instance number (0
56      offset).
57    $ref: /schemas/types.yaml#/definitions/phandle-array
58    items:
59      items:
60        - description: The phandle to the system control region.
61        - description: The register offset.
62        - description: The CAN instance number.
63
64  resets:
65    maxItems: 1
66
67required:
68  - compatible
69  - reg
70  - interrupts
71  - clocks
72
73if:
74  properties:
75    compatible:
76      contains:
77        enum:
78          - bosch,d_can
79
80then:
81  properties:
82    interrupts:
83      minItems: 4
84      maxItems: 4
85      items:
86        - description: Error and status IRQ
87        - description: Message object IRQ
88        - description: RAM ECC correctable error IRQ
89        - description: RAM ECC non-correctable error IRQ
90
91else:
92  properties:
93    interrupts:
94      maxItems: 1
95      items:
96        - description: Error and status IRQ
97
98additionalProperties: false
99
100examples:
101  - |
102    #include <dt-bindings/reset/altr,rst-mgr.h>
103
104    can@ffc00000 {
105       compatible = "bosch,d_can";
106       reg = <0xffc00000 0x1000>;
107       interrupts = <0 131 4>, <0 132 4>, <0 133 4>, <0 134 4>;
108       clocks = <&can0_clk>;
109       resets = <&rst CAN0_RESET>;
110    };
111  - |
112    can@0 {
113        compatible = "ti,am3352-d_can";
114        reg = <0x0 0x2000>;
115        clocks = <&dcan1_fck>;
116        clock-names = "fck";
117        syscon-raminit = <&scm_conf 0x644 1>;
118        interrupts = <55>;
119    };
120