Merge tag 'fscache-next-20210829' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / net / can / bosch,m_can.yaml
1 # SPDX-License-Identifier: GPL-2.0
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/net/can/bosch,m_can.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Bosch MCAN controller Bindings
8
9 description: Bosch MCAN controller for CAN bus
10
11 maintainers:
12   - Sriram Dash <sriram.dash@samsung.com>
13
14 properties:
15   compatible:
16     const: bosch,m_can
17
18   reg:
19     items:
20       - description: M_CAN registers map
21       - description: message RAM
22
23   reg-names:
24     items:
25       - const: m_can
26       - const: message_ram
27
28   interrupts:
29     items:
30       - description: interrupt line0
31       - description: interrupt line1
32     minItems: 1
33
34   interrupt-names:
35     items:
36       - const: int0
37       - const: int1
38     minItems: 1
39
40   clocks:
41     items:
42       - description: peripheral clock
43       - description: bus clock
44
45   clock-names:
46     items:
47       - const: hclk
48       - const: cclk
49
50   bosch,mram-cfg:
51     description: |
52       Message RAM configuration data.
53       Multiple M_CAN instances can share the same Message RAM
54       and each element(e.g Rx FIFO or Tx Buffer and etc) number
55       in Message RAM is also configurable, so this property is
56       telling driver how the shared or private Message RAM are
57       used by this M_CAN controller.
58
59       The format should be as follows:
60       <offset sidf_elems xidf_elems rxf0_elems rxf1_elems rxb_elems txe_elems txb_elems>
61       The 'offset' is an address offset of the Message RAM where
62       the following elements start from. This is usually set to
63       0x0 if you're using a private Message RAM. The remain cells
64       are used to specify how many elements are used for each FIFO/Buffer.
65
66       M_CAN includes the following elements according to user manual:
67       11-bit Filter     0-128 elements / 0-128 words
68       29-bit Filter     0-64 elements / 0-128 words
69       Rx FIFO 0 0-64 elements / 0-1152 words
70       Rx FIFO 1 0-64 elements / 0-1152 words
71       Rx Buffers        0-64 elements / 0-1152 words
72       Tx Event FIFO     0-32 elements / 0-64 words
73       Tx Buffers        0-32 elements / 0-576 words
74
75       Please refer to 2.4.1 Message RAM Configuration in Bosch
76       M_CAN user manual for details.
77     $ref: /schemas/types.yaml#/definitions/int32-array
78     items:
79       items:
80         - description: The 'offset' is an address offset of the Message RAM where
81             the following elements start from. This is usually set to 0x0 if
82             you're using a private Message RAM.
83           default: 0
84         - description: 11-bit Filter 0-128 elements / 0-128 words
85           minimum: 0
86           maximum: 128
87         - description: 29-bit Filter 0-64 elements / 0-128 words
88           minimum: 0
89           maximum: 64
90         - description: Rx FIFO 0 0-64 elements / 0-1152 words
91           minimum: 0
92           maximum: 64
93         - description: Rx FIFO 1 0-64 elements / 0-1152 words
94           minimum: 0
95           maximum: 64
96         - description: Rx Buffers 0-64 elements / 0-1152 words
97           minimum: 0
98           maximum: 64
99         - description: Tx Event FIFO 0-32 elements / 0-64 words
100           minimum: 0
101           maximum: 32
102         - description: Tx Buffers 0-32 elements / 0-576 words
103           minimum: 0
104           maximum: 32
105     maxItems: 1
106
107   power-domains:
108     description:
109       Power domain provider node and an args specifier containing
110       the can device id value.
111     maxItems: 1
112
113   can-transceiver:
114     $ref: can-transceiver.yaml#
115
116   phys:
117     maxItems: 1
118
119 required:
120   - compatible
121   - reg
122   - reg-names
123   - interrupts
124   - interrupt-names
125   - clocks
126   - clock-names
127   - bosch,mram-cfg
128
129 additionalProperties: false
130
131 examples:
132   - |
133     #include <dt-bindings/clock/imx6sx-clock.h>
134     can@20e8000 {
135       compatible = "bosch,m_can";
136       reg = <0x020e8000 0x4000>, <0x02298000 0x4000>;
137       reg-names = "m_can", "message_ram";
138       interrupts = <0 114 0x04>, <0 114 0x04>;
139       interrupt-names = "int0", "int1";
140       clocks = <&clks IMX6SX_CLK_CANFD>,
141                <&clks IMX6SX_CLK_CANFD>;
142       clock-names = "hclk", "cclk";
143       bosch,mram-cfg = <0x0 0 0 32 0 0 0 1>;
144
145       can-transceiver {
146         max-bitrate = <5000000>;
147       };
148     };
149
150 ...