xref: /freebsd/sys/contrib/device-tree/Bindings/remoteproc/ti,omap-remoteproc.yaml (revision c9ccf3a32da427475985b85d7df023ccfb138c27)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/remoteproc/ti,omap-remoteproc.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: OMAP4+ Remoteproc Devices
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Suman Anna <s-anna@ti.com>
11c66ec88fSEmmanuel Vadot
12c66ec88fSEmmanuel Vadotdescription:
13c66ec88fSEmmanuel Vadot  The OMAP family of SoCs usually have one or more slave processor sub-systems
14c66ec88fSEmmanuel Vadot  that are used to offload some of the processor-intensive tasks, or to manage
15c66ec88fSEmmanuel Vadot  other hardware accelerators, for achieving various system level goals.
16c66ec88fSEmmanuel Vadot
17c66ec88fSEmmanuel Vadot  The processor cores in the sub-system are usually behind an IOMMU, and may
18c66ec88fSEmmanuel Vadot  contain additional sub-modules like Internal RAM and/or ROMs, L1 and/or L2
19c66ec88fSEmmanuel Vadot  caches, an Interrupt Controller, a Cache Controller etc.
20c66ec88fSEmmanuel Vadot
21c66ec88fSEmmanuel Vadot  The OMAP SoCs usually have a DSP processor sub-system and/or an IPU processor
22c66ec88fSEmmanuel Vadot  sub-system. The DSP processor sub-system can contain any of the TI's C64x,
23c66ec88fSEmmanuel Vadot  C66x or C67x family of DSP cores as the main execution unit. The IPU processor
24c66ec88fSEmmanuel Vadot  sub-system usually contains either a Dual-Core Cortex-M3 or Dual-Core
25c66ec88fSEmmanuel Vadot  Cortex-M4 processors.
26c66ec88fSEmmanuel Vadot
27c66ec88fSEmmanuel Vadot  Each remote processor sub-system is represented as a single DT node. Each node
28c66ec88fSEmmanuel Vadot  has a number of required or optional properties that enable the OS running on
29c66ec88fSEmmanuel Vadot  the host processor (MPU) to perform the device management of the remote
30c66ec88fSEmmanuel Vadot  processor and to communicate with the remote processor. The various properties
31c66ec88fSEmmanuel Vadot  can be classified as constant or variable. The constant properties are
32c66ec88fSEmmanuel Vadot  dictated by the SoC and does not change from one board to another having the
33c66ec88fSEmmanuel Vadot  same SoC. Examples of constant properties include 'iommus', 'reg'. The
34c66ec88fSEmmanuel Vadot  variable properties are dictated by the system integration aspects such as
35c66ec88fSEmmanuel Vadot  memory on the board, or configuration used within the corresponding firmware
36c66ec88fSEmmanuel Vadot  image. Examples of variable properties include 'mboxes', 'memory-region',
37c66ec88fSEmmanuel Vadot  'timers', 'watchdog-timers' etc.
38c66ec88fSEmmanuel Vadot
39c66ec88fSEmmanuel Vadotproperties:
40c66ec88fSEmmanuel Vadot  compatible:
41c66ec88fSEmmanuel Vadot    enum:
42c66ec88fSEmmanuel Vadot      - ti,omap4-dsp
43c66ec88fSEmmanuel Vadot      - ti,omap5-dsp
44c66ec88fSEmmanuel Vadot      - ti,dra7-dsp
45c66ec88fSEmmanuel Vadot      - ti,omap4-ipu
46c66ec88fSEmmanuel Vadot      - ti,omap5-ipu
47c66ec88fSEmmanuel Vadot      - ti,dra7-ipu
48c66ec88fSEmmanuel Vadot
49c66ec88fSEmmanuel Vadot  iommus:
50c66ec88fSEmmanuel Vadot    minItems: 1
51c66ec88fSEmmanuel Vadot    maxItems: 2
52c66ec88fSEmmanuel Vadot    description: |
53c66ec88fSEmmanuel Vadot      phandles to OMAP IOMMU nodes, that need to be programmed
54c66ec88fSEmmanuel Vadot      for this remote processor to access any external RAM memory or
55c66ec88fSEmmanuel Vadot      other peripheral device address spaces. This property usually
56c66ec88fSEmmanuel Vadot      has only a single phandle. Multiple phandles are used only in
57c66ec88fSEmmanuel Vadot      cases where the sub-system has different ports for different
58c66ec88fSEmmanuel Vadot      sub-modules within the processor sub-system (eg: DRA7 DSPs),
59c66ec88fSEmmanuel Vadot      and need the same programming in both the MMUs.
60c66ec88fSEmmanuel Vadot
61c66ec88fSEmmanuel Vadot  mboxes:
62c66ec88fSEmmanuel Vadot    minItems: 1
63c66ec88fSEmmanuel Vadot    maxItems: 2
64c66ec88fSEmmanuel Vadot    description: |
65c66ec88fSEmmanuel Vadot      OMAP Mailbox specifier denoting the sub-mailbox, to be used for
66c66ec88fSEmmanuel Vadot      communication with the remote processor. The specifier format is
67c66ec88fSEmmanuel Vadot      as per the bindings,
685956d97fSEmmanuel Vadot      Documentation/devicetree/bindings/mailbox/ti,omap-mailbox.yaml
69c66ec88fSEmmanuel Vadot      This property should match with the sub-mailbox node used in
70c66ec88fSEmmanuel Vadot      the firmware image.
71c66ec88fSEmmanuel Vadot
72c66ec88fSEmmanuel Vadot  clocks:
735def4c47SEmmanuel Vadot    maxItems: 1
74c66ec88fSEmmanuel Vadot    description: |
75c66ec88fSEmmanuel Vadot      Main functional clock for the remote processor
76c66ec88fSEmmanuel Vadot
77c66ec88fSEmmanuel Vadot  resets:
785def4c47SEmmanuel Vadot    minItems: 1
795def4c47SEmmanuel Vadot    maxItems: 2
80c66ec88fSEmmanuel Vadot    description: |
81c66ec88fSEmmanuel Vadot      Reset handles for the remote processor
82c66ec88fSEmmanuel Vadot
83c66ec88fSEmmanuel Vadot  firmware-name:
84c66ec88fSEmmanuel Vadot    description: |
85c66ec88fSEmmanuel Vadot      Default name of the firmware to load to the remote processor.
86c66ec88fSEmmanuel Vadot
87c66ec88fSEmmanuel Vadot# Optional properties:
88c66ec88fSEmmanuel Vadot# --------------------
89c66ec88fSEmmanuel Vadot# Some of these properties are mandatory on some SoCs, and some are optional
90c66ec88fSEmmanuel Vadot# depending on the configuration of the firmware image to be executed on the
91c66ec88fSEmmanuel Vadot# remote processor. The conditions are mentioned for each property.
92c66ec88fSEmmanuel Vadot#
93c66ec88fSEmmanuel Vadot# The following are the optional properties:
94c66ec88fSEmmanuel Vadot
95c66ec88fSEmmanuel Vadot  memory-region:
962eb4d8dcSEmmanuel Vadot    maxItems: 1
97c66ec88fSEmmanuel Vadot    description: |
98c66ec88fSEmmanuel Vadot      phandle to the reserved memory node to be associated
99c66ec88fSEmmanuel Vadot      with the remoteproc device. The reserved memory node
100c66ec88fSEmmanuel Vadot      can be a CMA memory node, and should be defined as
101c66ec88fSEmmanuel Vadot      per the bindings,
102c66ec88fSEmmanuel Vadot      Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
103c66ec88fSEmmanuel Vadot
104c66ec88fSEmmanuel Vadot  reg:
105c66ec88fSEmmanuel Vadot    description: |
106c66ec88fSEmmanuel Vadot      Address space for any remoteproc memories present on
107c66ec88fSEmmanuel Vadot      the SoC. Should contain an entry for each value in
108c66ec88fSEmmanuel Vadot      'reg-names'. These are mandatory for all DSP and IPU
109c66ec88fSEmmanuel Vadot      processors that have them (OMAP4/OMAP5 DSPs do not have
110c66ec88fSEmmanuel Vadot      any RAMs)
111c66ec88fSEmmanuel Vadot
112c66ec88fSEmmanuel Vadot  reg-names:
113c66ec88fSEmmanuel Vadot    description: |
114c66ec88fSEmmanuel Vadot      Required names for each of the address spaces defined in
115c66ec88fSEmmanuel Vadot      the 'reg' property. Expects the names from the following
116c66ec88fSEmmanuel Vadot      list, in the specified order, each representing the corresponding
117c66ec88fSEmmanuel Vadot      internal RAM memory region.
118c66ec88fSEmmanuel Vadot    minItems: 1
119c66ec88fSEmmanuel Vadot    items:
120c66ec88fSEmmanuel Vadot      - const: l2ram
121c66ec88fSEmmanuel Vadot      - const: l1pram
122c66ec88fSEmmanuel Vadot      - const: l1dram
123c66ec88fSEmmanuel Vadot
124c66ec88fSEmmanuel Vadot  ti,bootreg:
125c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
126*c9ccf3a3SEmmanuel Vadot    items:
127*c9ccf3a3SEmmanuel Vadot      - items:
128*c9ccf3a3SEmmanuel Vadot          - description: phandle to the System Control Configuration region
129*c9ccf3a3SEmmanuel Vadot          - description: register offset of the boot address register
130*c9ccf3a3SEmmanuel Vadot          - description: the bit shift within the register
131*c9ccf3a3SEmmanuel Vadot    description:
132*c9ccf3a3SEmmanuel Vadot      This property is required for all the DSP instances on OMAP4, OMAP5
133*c9ccf3a3SEmmanuel Vadot      and DRA7xx SoCs.
134c66ec88fSEmmanuel Vadot
135c66ec88fSEmmanuel Vadot  ti,autosuspend-delay-ms:
136c66ec88fSEmmanuel Vadot    description: |
137c66ec88fSEmmanuel Vadot      Custom autosuspend delay for the remoteproc in milliseconds.
138c66ec88fSEmmanuel Vadot      Recommended values is preferable to be in the order of couple
139c66ec88fSEmmanuel Vadot      of seconds. A negative value can also be used to disable the
140c66ec88fSEmmanuel Vadot      autosuspend behavior.
141c66ec88fSEmmanuel Vadot
142c66ec88fSEmmanuel Vadot  ti,timers:
143c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
144*c9ccf3a3SEmmanuel Vadot    items:
145*c9ccf3a3SEmmanuel Vadot      maxItems: 1
146c66ec88fSEmmanuel Vadot    description: |
147c66ec88fSEmmanuel Vadot      One or more phandles to OMAP DMTimer nodes, that serve
148c66ec88fSEmmanuel Vadot      as System/Tick timers for the OS running on the remote
149c66ec88fSEmmanuel Vadot      processors. This will usually be a single timer if the
150c66ec88fSEmmanuel Vadot      processor sub-system is running in SMP mode, or one per
151c66ec88fSEmmanuel Vadot      core in the processor sub-system. This can also be used
152c66ec88fSEmmanuel Vadot      to reserve specific timers to be dedicated to the
153c66ec88fSEmmanuel Vadot      remote processors.
154c66ec88fSEmmanuel Vadot
155c66ec88fSEmmanuel Vadot      This property is mandatory on remote processors requiring
156c66ec88fSEmmanuel Vadot      external tick wakeup, and to support Power Management
157c66ec88fSEmmanuel Vadot      features. The timers to be used should match with the
158c66ec88fSEmmanuel Vadot      timers used in the firmware image.
159c66ec88fSEmmanuel Vadot
160c66ec88fSEmmanuel Vadot  ti,watchdog-timers:
161c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
162*c9ccf3a3SEmmanuel Vadot    items:
163*c9ccf3a3SEmmanuel Vadot      maxItems: 1
164c66ec88fSEmmanuel Vadot    description: |
165c66ec88fSEmmanuel Vadot      One or more phandles to OMAP DMTimer nodes, used to
166c66ec88fSEmmanuel Vadot      serve as Watchdog timers for the processor cores. This
167c66ec88fSEmmanuel Vadot      will usually be one per executing processor core, even
168c66ec88fSEmmanuel Vadot      if the processor sub-system is running a SMP OS.
169c66ec88fSEmmanuel Vadot
170c66ec88fSEmmanuel Vadot      The timers to be used should match with the watchdog
171c66ec88fSEmmanuel Vadot      timers used in the firmware image.
172c66ec88fSEmmanuel Vadot
173c66ec88fSEmmanuel Vadotif:
174c66ec88fSEmmanuel Vadot  properties:
175c66ec88fSEmmanuel Vadot    compatible:
176c66ec88fSEmmanuel Vadot      enum:
177c66ec88fSEmmanuel Vadot        - ti,dra7-dsp
178c66ec88fSEmmanuel Vadotthen:
179c66ec88fSEmmanuel Vadot  properties:
180c66ec88fSEmmanuel Vadot    reg:
181c66ec88fSEmmanuel Vadot      minItems: 3
182c66ec88fSEmmanuel Vadot      maxItems: 3
183c66ec88fSEmmanuel Vadot  required:
184c66ec88fSEmmanuel Vadot    - reg
185c66ec88fSEmmanuel Vadot    - reg-names
186c66ec88fSEmmanuel Vadot    - ti,bootreg
187c66ec88fSEmmanuel Vadot
188c66ec88fSEmmanuel Vadotelse:
189c66ec88fSEmmanuel Vadot  if:
190c66ec88fSEmmanuel Vadot    properties:
191c66ec88fSEmmanuel Vadot      compatible:
192c66ec88fSEmmanuel Vadot        enum:
193c66ec88fSEmmanuel Vadot          - ti,omap4-ipu
194c66ec88fSEmmanuel Vadot          - ti,omap5-ipu
195c66ec88fSEmmanuel Vadot          - ti,dra7-ipu
196c66ec88fSEmmanuel Vadot  then:
197c66ec88fSEmmanuel Vadot    properties:
198c66ec88fSEmmanuel Vadot      reg:
199c66ec88fSEmmanuel Vadot        minItems: 1
200c66ec88fSEmmanuel Vadot        maxItems: 1
201c66ec88fSEmmanuel Vadot      ti,bootreg: false
202c66ec88fSEmmanuel Vadot    required:
203c66ec88fSEmmanuel Vadot      - reg
204c66ec88fSEmmanuel Vadot      - reg-names
205c66ec88fSEmmanuel Vadot
206c66ec88fSEmmanuel Vadot  else:
207c66ec88fSEmmanuel Vadot    properties:
208c66ec88fSEmmanuel Vadot      reg: false
209c66ec88fSEmmanuel Vadot    required:
210c66ec88fSEmmanuel Vadot      - ti,bootreg
211c66ec88fSEmmanuel Vadot
212c66ec88fSEmmanuel Vadotrequired:
213c66ec88fSEmmanuel Vadot  - compatible
214c66ec88fSEmmanuel Vadot  - iommus
215c66ec88fSEmmanuel Vadot  - mboxes
216c66ec88fSEmmanuel Vadot  - clocks
217c66ec88fSEmmanuel Vadot  - resets
218c66ec88fSEmmanuel Vadot  - firmware-name
219c66ec88fSEmmanuel Vadot
220c66ec88fSEmmanuel VadotadditionalProperties: false
221c66ec88fSEmmanuel Vadot
222c66ec88fSEmmanuel Vadotexamples:
223c66ec88fSEmmanuel Vadot  - |
224c66ec88fSEmmanuel Vadot
225c66ec88fSEmmanuel Vadot    //Example 1: OMAP4 DSP
226c66ec88fSEmmanuel Vadot
227c66ec88fSEmmanuel Vadot    /* DSP Reserved Memory node */
228c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/omap4.h>
229c66ec88fSEmmanuel Vadot    reserved-memory {
230c66ec88fSEmmanuel Vadot        #address-cells = <1>;
231c66ec88fSEmmanuel Vadot        #size-cells = <1>;
232c66ec88fSEmmanuel Vadot
233c66ec88fSEmmanuel Vadot        dsp_memory_region: dsp-memory@98000000 {
234c66ec88fSEmmanuel Vadot            compatible = "shared-dma-pool";
235c66ec88fSEmmanuel Vadot            reg = <0x98000000 0x800000>;
236c66ec88fSEmmanuel Vadot            reusable;
237c66ec88fSEmmanuel Vadot        };
238c66ec88fSEmmanuel Vadot    };
239c66ec88fSEmmanuel Vadot
240c66ec88fSEmmanuel Vadot    /* DSP node */
241c66ec88fSEmmanuel Vadot    ocp {
242c66ec88fSEmmanuel Vadot        dsp: dsp {
243c66ec88fSEmmanuel Vadot            compatible = "ti,omap4-dsp";
244c66ec88fSEmmanuel Vadot            ti,bootreg = <&scm_conf 0x304 0>;
245c66ec88fSEmmanuel Vadot            iommus = <&mmu_dsp>;
246c66ec88fSEmmanuel Vadot            mboxes = <&mailbox &mbox_dsp>;
247c66ec88fSEmmanuel Vadot            memory-region = <&dsp_memory_region>;
248c66ec88fSEmmanuel Vadot            ti,timers = <&timer5>;
249c66ec88fSEmmanuel Vadot            ti,watchdog-timers = <&timer6>;
250c66ec88fSEmmanuel Vadot            clocks = <&tesla_clkctrl OMAP4_DSP_CLKCTRL 0>;
251c66ec88fSEmmanuel Vadot            resets = <&prm_tesla 0>, <&prm_tesla 1>;
252c66ec88fSEmmanuel Vadot            firmware-name = "omap4-dsp-fw.xe64T";
253c66ec88fSEmmanuel Vadot        };
254c66ec88fSEmmanuel Vadot    };
255c66ec88fSEmmanuel Vadot
256c66ec88fSEmmanuel Vadot  - |+
257c66ec88fSEmmanuel Vadot
258c66ec88fSEmmanuel Vadot    //Example 2: OMAP5 IPU
259c66ec88fSEmmanuel Vadot
260c66ec88fSEmmanuel Vadot    /* IPU Reserved Memory node */
261c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/omap5.h>
262c66ec88fSEmmanuel Vadot    reserved-memory {
263c66ec88fSEmmanuel Vadot        #address-cells = <2>;
264c66ec88fSEmmanuel Vadot        #size-cells = <2>;
265c66ec88fSEmmanuel Vadot
266c66ec88fSEmmanuel Vadot        ipu_memory_region: ipu-memory@95800000 {
267c66ec88fSEmmanuel Vadot            compatible = "shared-dma-pool";
268c66ec88fSEmmanuel Vadot            reg = <0 0x95800000 0 0x3800000>;
269c66ec88fSEmmanuel Vadot            reusable;
270c66ec88fSEmmanuel Vadot        };
271c66ec88fSEmmanuel Vadot    };
272c66ec88fSEmmanuel Vadot
273c66ec88fSEmmanuel Vadot    /* IPU node */
274c66ec88fSEmmanuel Vadot    ocp {
275c66ec88fSEmmanuel Vadot        #address-cells = <1>;
276c66ec88fSEmmanuel Vadot        #size-cells = <1>;
277c66ec88fSEmmanuel Vadot
278c66ec88fSEmmanuel Vadot        ipu: ipu@55020000 {
279c66ec88fSEmmanuel Vadot            compatible = "ti,omap5-ipu";
280c66ec88fSEmmanuel Vadot            reg = <0x55020000 0x10000>;
281c66ec88fSEmmanuel Vadot            reg-names = "l2ram";
282c66ec88fSEmmanuel Vadot            iommus = <&mmu_ipu>;
283c66ec88fSEmmanuel Vadot            mboxes = <&mailbox &mbox_ipu>;
284c66ec88fSEmmanuel Vadot            memory-region = <&ipu_memory_region>;
285c66ec88fSEmmanuel Vadot            ti,timers = <&timer3>, <&timer4>;
286c66ec88fSEmmanuel Vadot            ti,watchdog-timers = <&timer9>, <&timer11>;
287c66ec88fSEmmanuel Vadot            clocks = <&ipu_clkctrl OMAP5_MMU_IPU_CLKCTRL 0>;
288c66ec88fSEmmanuel Vadot            resets = <&prm_core 2>;
289c66ec88fSEmmanuel Vadot            firmware-name = "omap5-ipu-fw.xem4";
290c66ec88fSEmmanuel Vadot        };
291c66ec88fSEmmanuel Vadot    };
292c66ec88fSEmmanuel Vadot
293c66ec88fSEmmanuel Vadot  - |+
294c66ec88fSEmmanuel Vadot
295c66ec88fSEmmanuel Vadot    //Example 3: DRA7xx/AM57xx DSP
296c66ec88fSEmmanuel Vadot
297c66ec88fSEmmanuel Vadot    /* DSP1 Reserved Memory node */
298c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/dra7.h>
299c66ec88fSEmmanuel Vadot    reserved-memory {
300c66ec88fSEmmanuel Vadot        #address-cells = <2>;
301c66ec88fSEmmanuel Vadot        #size-cells = <2>;
302c66ec88fSEmmanuel Vadot
303c66ec88fSEmmanuel Vadot        dsp1_memory_region: dsp1-memory@99000000 {
304c66ec88fSEmmanuel Vadot            compatible = "shared-dma-pool";
305c66ec88fSEmmanuel Vadot            reg = <0x0 0x99000000 0x0 0x4000000>;
306c66ec88fSEmmanuel Vadot            reusable;
307c66ec88fSEmmanuel Vadot        };
308c66ec88fSEmmanuel Vadot    };
309c66ec88fSEmmanuel Vadot
310c66ec88fSEmmanuel Vadot    /* DSP1 node */
311c66ec88fSEmmanuel Vadot    ocp {
312c66ec88fSEmmanuel Vadot        #address-cells = <1>;
313c66ec88fSEmmanuel Vadot        #size-cells = <1>;
314c66ec88fSEmmanuel Vadot
315c66ec88fSEmmanuel Vadot        dsp1: dsp@40800000 {
316c66ec88fSEmmanuel Vadot            compatible = "ti,dra7-dsp";
317c66ec88fSEmmanuel Vadot            reg = <0x40800000 0x48000>,
318c66ec88fSEmmanuel Vadot                  <0x40e00000 0x8000>,
319c66ec88fSEmmanuel Vadot                  <0x40f00000 0x8000>;
320c66ec88fSEmmanuel Vadot            reg-names = "l2ram", "l1pram", "l1dram";
321c66ec88fSEmmanuel Vadot            ti,bootreg = <&scm_conf 0x55c 0>;
322c66ec88fSEmmanuel Vadot            iommus = <&mmu0_dsp1>, <&mmu1_dsp1>;
323c66ec88fSEmmanuel Vadot            mboxes = <&mailbox5 &mbox_dsp1_ipc3x>;
324c66ec88fSEmmanuel Vadot            memory-region = <&dsp1_memory_region>;
325c66ec88fSEmmanuel Vadot            ti,timers = <&timer5>;
326c66ec88fSEmmanuel Vadot            ti,watchdog-timers = <&timer10>;
327c66ec88fSEmmanuel Vadot            resets = <&prm_dsp1 0>;
328c66ec88fSEmmanuel Vadot            clocks = <&dsp1_clkctrl DRA7_DSP1_MMU0_DSP1_CLKCTRL 0>;
329c66ec88fSEmmanuel Vadot            firmware-name = "dra7-dsp1-fw.xe66";
330c66ec88fSEmmanuel Vadot        };
331c66ec88fSEmmanuel Vadot    };
332