xref: /freebsd/sys/contrib/device-tree/Bindings/remoteproc/st,stm32-rproc.yaml (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/remoteproc/st,stm32-rproc.yaml#
5fac71e4eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
78bab661aSEmmanuel Vadottitle: STMicroelectronics STM32 remote processor controller
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotdescription:
10c66ec88fSEmmanuel Vadot  This document defines the binding for the remoteproc component that loads and
11c66ec88fSEmmanuel Vadot  boots firmwares on the ST32MP family chipset.
12c66ec88fSEmmanuel Vadot
13c66ec88fSEmmanuel Vadotmaintainers:
148cc087a1SEmmanuel Vadot  - Fabien Dessenne <fabien.dessenne@foss.st.com>
158cc087a1SEmmanuel Vadot  - Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
16c66ec88fSEmmanuel Vadot
17c66ec88fSEmmanuel Vadotproperties:
18c66ec88fSEmmanuel Vadot  compatible:
19c66ec88fSEmmanuel Vadot    const: st,stm32mp1-m4
20c66ec88fSEmmanuel Vadot
21c66ec88fSEmmanuel Vadot  reg:
22c66ec88fSEmmanuel Vadot    description:
23c66ec88fSEmmanuel Vadot      Address ranges of the RETRAM and MCU SRAM memories used by the remote
24c66ec88fSEmmanuel Vadot      processor.
25c66ec88fSEmmanuel Vadot    maxItems: 3
26c66ec88fSEmmanuel Vadot
27c66ec88fSEmmanuel Vadot  resets:
28*f126890aSEmmanuel Vadot    minItems: 1
29*f126890aSEmmanuel Vadot    maxItems: 2
30*f126890aSEmmanuel Vadot
31*f126890aSEmmanuel Vadot  reset-names:
32*f126890aSEmmanuel Vadot    items:
33*f126890aSEmmanuel Vadot      - const: mcu_rst
34*f126890aSEmmanuel Vadot      - const: hold_boot
35*f126890aSEmmanuel Vadot    minItems: 1
36c66ec88fSEmmanuel Vadot
37c66ec88fSEmmanuel Vadot  st,syscfg-holdboot:
38c66ec88fSEmmanuel Vadot    description: remote processor reset hold boot
39fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
40c9ccf3a3SEmmanuel Vadot    items:
41c9ccf3a3SEmmanuel Vadot      - items:
42c9ccf3a3SEmmanuel Vadot          - description: Phandle of syscon block
43c9ccf3a3SEmmanuel Vadot          - description: The offset of the hold boot setting register
44c9ccf3a3SEmmanuel Vadot          - description: The field mask of the hold boot
45c66ec88fSEmmanuel Vadot
46c66ec88fSEmmanuel Vadot  st,syscfg-tz:
47*f126890aSEmmanuel Vadot    deprecated: true
48c66ec88fSEmmanuel Vadot    description:
49c66ec88fSEmmanuel Vadot      Reference to the system configuration which holds the RCC trust zone mode
50fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
51c9ccf3a3SEmmanuel Vadot    items:
52c9ccf3a3SEmmanuel Vadot      - items:
53c9ccf3a3SEmmanuel Vadot          - description: Phandle of syscon block
54d5b0e70fSEmmanuel Vadot          - description: The offset of the trust zone setting register
55d5b0e70fSEmmanuel Vadot          - description: The field mask of the trust zone state
56c66ec88fSEmmanuel Vadot
57c66ec88fSEmmanuel Vadot  interrupts:
58c66ec88fSEmmanuel Vadot    description: Should contain the WWDG1 watchdog reset interrupt
59c66ec88fSEmmanuel Vadot    maxItems: 1
60c66ec88fSEmmanuel Vadot
61c66ec88fSEmmanuel Vadot  wakeup-source: true
62c66ec88fSEmmanuel Vadot
63c66ec88fSEmmanuel Vadot  mboxes:
64c66ec88fSEmmanuel Vadot    description:
65c66ec88fSEmmanuel Vadot      This property is required only if the rpmsg/virtio functionality is used.
66c66ec88fSEmmanuel Vadot    items:
67c66ec88fSEmmanuel Vadot      - description: |
68c66ec88fSEmmanuel Vadot          A channel (a) used to communicate through virtqueues with the
69c66ec88fSEmmanuel Vadot          remote proc.
70c66ec88fSEmmanuel Vadot          Bi-directional channel:
71c66ec88fSEmmanuel Vadot            - from local to remote = send message
72c66ec88fSEmmanuel Vadot            - from remote to local = send message ack
73c66ec88fSEmmanuel Vadot      - description: |
74c66ec88fSEmmanuel Vadot          A channel (b) working the opposite direction of channel (a)
75c66ec88fSEmmanuel Vadot      - description: |
76c66ec88fSEmmanuel Vadot          A channel (c) used by the local proc to notify the remote proc that it
77c66ec88fSEmmanuel Vadot          is about to be shut down.
78c66ec88fSEmmanuel Vadot          Unidirectional channel:
79c66ec88fSEmmanuel Vadot            - from local to remote, where ACK from the remote means that it is
80c66ec88fSEmmanuel Vadot              ready for shutdown
812eb4d8dcSEmmanuel Vadot      - description: |
822eb4d8dcSEmmanuel Vadot          A channel (d) used by the local proc to notify the remote proc that it
83fac71e4eSEmmanuel Vadot          has to stop interprocessor communication.
842eb4d8dcSEmmanuel Vadot          Unidirectional channel:
85fac71e4eSEmmanuel Vadot            - from local to remote, where ACK from the remote means that communication
862eb4d8dcSEmmanuel Vadot              as been stopped on the remote side.
87c66ec88fSEmmanuel Vadot    minItems: 1
88c66ec88fSEmmanuel Vadot
89c66ec88fSEmmanuel Vadot  mbox-names:
90c66ec88fSEmmanuel Vadot    items:
91c66ec88fSEmmanuel Vadot      - const: vq0
92c66ec88fSEmmanuel Vadot      - const: vq1
93c66ec88fSEmmanuel Vadot      - const: shutdown
942eb4d8dcSEmmanuel Vadot      - const: detach
95c66ec88fSEmmanuel Vadot    minItems: 1
96c66ec88fSEmmanuel Vadot
97c66ec88fSEmmanuel Vadot  memory-region:
98c66ec88fSEmmanuel Vadot    description:
99c66ec88fSEmmanuel Vadot      List of phandles to the reserved memory regions associated with the
100c66ec88fSEmmanuel Vadot      remoteproc device. This is variable and describes the memories shared with
101c66ec88fSEmmanuel Vadot      the remote processor (e.g. remoteproc firmware and carveouts, rpmsg
102c66ec88fSEmmanuel Vadot      vrings, ...).
103c66ec88fSEmmanuel Vadot      (see ../reserved-memory/reserved-memory.txt)
104c66ec88fSEmmanuel Vadot
105c66ec88fSEmmanuel Vadot  st,syscfg-pdds:
106fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
107c66ec88fSEmmanuel Vadot    description: |
108c66ec88fSEmmanuel Vadot      Reference to the system configuration which holds the remote
109c9ccf3a3SEmmanuel Vadot    items:
110c9ccf3a3SEmmanuel Vadot      - items:
111c9ccf3a3SEmmanuel Vadot          - description: Phandle of syscon block
112d5b0e70fSEmmanuel Vadot          - description: The offset of the power setting register
113d5b0e70fSEmmanuel Vadot          - description: The field mask of the PDDS selection
1145def4c47SEmmanuel Vadot
1155def4c47SEmmanuel Vadot  st,syscfg-m4-state:
116fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
1175def4c47SEmmanuel Vadot    description: |
1185def4c47SEmmanuel Vadot      Reference to the tamp register which exposes the Cortex-M4 state.
119c9ccf3a3SEmmanuel Vadot    items:
120c9ccf3a3SEmmanuel Vadot      - items:
121c9ccf3a3SEmmanuel Vadot          - description: Phandle of syscon block with the tamp register
122d5b0e70fSEmmanuel Vadot          - description: The offset of the tamp register
123d5b0e70fSEmmanuel Vadot          - description: The field mask of the Cortex-M4 state
1245def4c47SEmmanuel Vadot
1255def4c47SEmmanuel Vadot  st,syscfg-rsc-tbl:
126fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
1275def4c47SEmmanuel Vadot    description: |
1285def4c47SEmmanuel Vadot      Reference to the tamp register which references the Cortex-M4
1295def4c47SEmmanuel Vadot      resource table address.
130c9ccf3a3SEmmanuel Vadot    items:
131c9ccf3a3SEmmanuel Vadot      - items:
132c9ccf3a3SEmmanuel Vadot          - description: Phandle of syscon block with the tamp register
133d5b0e70fSEmmanuel Vadot          - description: The offset of the tamp register
134d5b0e70fSEmmanuel Vadot          - description: The field mask of the Cortex-M4 resource table address
135c66ec88fSEmmanuel Vadot
136c66ec88fSEmmanuel Vadot  st,auto-boot:
137c66ec88fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/flag
138c66ec88fSEmmanuel Vadot    description:
139c66ec88fSEmmanuel Vadot      If defined, when remoteproc is probed, it loads the default firmware and
140c66ec88fSEmmanuel Vadot      starts the remote processor.
141c66ec88fSEmmanuel Vadot
142c66ec88fSEmmanuel Vadotrequired:
143c66ec88fSEmmanuel Vadot  - compatible
144c66ec88fSEmmanuel Vadot  - reg
145c66ec88fSEmmanuel Vadot  - resets
146*f126890aSEmmanuel Vadot
147*f126890aSEmmanuel VadotallOf:
148*f126890aSEmmanuel Vadot  - if:
149*f126890aSEmmanuel Vadot      properties:
150*f126890aSEmmanuel Vadot        reset-names:
151*f126890aSEmmanuel Vadot          not:
152*f126890aSEmmanuel Vadot            contains:
153*f126890aSEmmanuel Vadot              const: hold_boot
154*f126890aSEmmanuel Vadot    then:
155*f126890aSEmmanuel Vadot      required:
156c66ec88fSEmmanuel Vadot        - st,syscfg-holdboot
157*f126890aSEmmanuel Vadot    else:
158*f126890aSEmmanuel Vadot      properties:
159*f126890aSEmmanuel Vadot        st,syscfg-holdboot: false
160c66ec88fSEmmanuel Vadot
161c66ec88fSEmmanuel VadotadditionalProperties: false
162c66ec88fSEmmanuel Vadot
163c66ec88fSEmmanuel Vadotexamples:
164c66ec88fSEmmanuel Vadot  - |
165c66ec88fSEmmanuel Vadot    #include <dt-bindings/reset/stm32mp1-resets.h>
166*f126890aSEmmanuel Vadot    m4@10000000 {
167c66ec88fSEmmanuel Vadot      compatible = "st,stm32mp1-m4";
168c66ec88fSEmmanuel Vadot      reg = <0x10000000 0x40000>,
169c66ec88fSEmmanuel Vadot            <0x30000000 0x40000>,
170c66ec88fSEmmanuel Vadot            <0x38000000 0x10000>;
171c66ec88fSEmmanuel Vadot      resets = <&rcc MCU_R>;
172*f126890aSEmmanuel Vadot      reset-names = "mcu_rst";
173*f126890aSEmmanuel Vadot      /* Hold boot managed using system config*/
174c66ec88fSEmmanuel Vadot      st,syscfg-holdboot = <&rcc 0x10C 0x1>;
175*f126890aSEmmanuel Vadot      st,syscfg-rsc-tbl = <&tamp 0x144 0xFFFFFFFF>;
176*f126890aSEmmanuel Vadot      st,syscfg-m4-state = <&tamp 0x148 0xFFFFFFFF>;
177*f126890aSEmmanuel Vadot    };
178*f126890aSEmmanuel Vadot  - |
179*f126890aSEmmanuel Vadot    #include <dt-bindings/reset/stm32mp1-resets.h>
180*f126890aSEmmanuel Vadot    m4@10000000 {
181*f126890aSEmmanuel Vadot      compatible = "st,stm32mp1-m4";
182*f126890aSEmmanuel Vadot      reg = <0x10000000 0x40000>,
183*f126890aSEmmanuel Vadot            <0x30000000 0x40000>,
184*f126890aSEmmanuel Vadot            <0x38000000 0x10000>;
185*f126890aSEmmanuel Vadot      /* Hold boot managed using SCMI reset controller */
186*f126890aSEmmanuel Vadot      resets = <&scmi MCU_R>, <&scmi MCU_HOLD_BOOT_R>;
187*f126890aSEmmanuel Vadot      reset-names = "mcu_rst", "hold_boot";
1885def4c47SEmmanuel Vadot      st,syscfg-rsc-tbl = <&tamp 0x144 0xFFFFFFFF>;
1895def4c47SEmmanuel Vadot      st,syscfg-m4-state = <&tamp 0x148 0xFFFFFFFF>;
190c66ec88fSEmmanuel Vadot    };
191c66ec88fSEmmanuel Vadot
192c66ec88fSEmmanuel Vadot...
193