xref: /linux/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.yaml (revision a1c613ae4c322ddd58d5a8539dbfba2a0380a8c0)
1d289f9deSThierry Reding# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2d289f9deSThierry Reding%YAML 1.2
3d289f9deSThierry Reding---
4d289f9deSThierry Reding$id: http://devicetree.org/schemas/firmware/nvidia,tegra186-bpmp.yaml#
5d289f9deSThierry Reding$schema: http://devicetree.org/meta-schemas/core.yaml#
6d289f9deSThierry Reding
7d289f9deSThierry Redingtitle: NVIDIA Tegra Boot and Power Management Processor (BPMP)
8d289f9deSThierry Reding
9d289f9deSThierry Redingmaintainers:
10d289f9deSThierry Reding  - Thierry Reding <thierry.reding@gmail.com>
11d289f9deSThierry Reding  - Jon Hunter <jonathanh@nvidia.com>
12d289f9deSThierry Reding
13d289f9deSThierry Redingdescription: |
14d289f9deSThierry Reding  The BPMP is a specific processor in Tegra chip, which is designed for
15d289f9deSThierry Reding  booting process handling and offloading the power management, clock
16d289f9deSThierry Reding  management, and reset control tasks from the CPU. The binding document
17d289f9deSThierry Reding  defines the resources that would be used by the BPMP firmware driver,
18d289f9deSThierry Reding  which can create the interprocessor communication (IPC) between the
19d289f9deSThierry Reding  CPU and BPMP.
20d289f9deSThierry Reding
21d289f9deSThierry Reding  This node is a mailbox consumer. See the following files for details
22d289f9deSThierry Reding  of the mailbox subsystem, and the specifiers implemented by the
23d289f9deSThierry Reding  relevant provider(s):
24d289f9deSThierry Reding
25d289f9deSThierry Reding    - .../mailbox/mailbox.txt
26d289f9deSThierry Reding    - .../mailbox/nvidia,tegra186-hsp.yaml
27d289f9deSThierry Reding
28d289f9deSThierry Reding  This node is a clock, power domain, and reset provider. See the
29d289f9deSThierry Reding  following files for general documentation of those features, and the
30d289f9deSThierry Reding  specifiers implemented by this node:
31d289f9deSThierry Reding
32d289f9deSThierry Reding    - .../clock/clock-bindings.txt
33d289f9deSThierry Reding    - <dt-bindings/clock/tegra186-clock.h>
34d289f9deSThierry Reding    - ../power/power-domain.yaml
35d289f9deSThierry Reding    - <dt-bindings/power/tegra186-powergate.h>
36d289f9deSThierry Reding    - .../reset/reset.txt
37d289f9deSThierry Reding    - <dt-bindings/reset/tegra186-reset.h>
38d289f9deSThierry Reding
39d289f9deSThierry Reding  The BPMP implements some services which must be represented by
40d289f9deSThierry Reding  separate nodes. For example, it can provide access to certain I2C
41d289f9deSThierry Reding  controllers, and the I2C bindings represent each I2C controller as a
42d289f9deSThierry Reding  device tree node. Such nodes should be nested directly inside the main
43d289f9deSThierry Reding  BPMP node.
44d289f9deSThierry Reding
45d289f9deSThierry Reding  Software can determine whether a child node of the BPMP node
46d289f9deSThierry Reding  represents a device by checking for a compatible property. Any node
47d289f9deSThierry Reding  with a compatible property represents a device that can be
48d289f9deSThierry Reding  instantiated. Nodes without a compatible property may be used to
49d289f9deSThierry Reding  provide configuration information regarding the BPMP itself, although
50d289f9deSThierry Reding  no such configuration nodes are currently defined by this binding.
51d289f9deSThierry Reding
52d289f9deSThierry Reding  The BPMP firmware defines no single global name-/numbering-space for
53d289f9deSThierry Reding  such services. Put another way, the numbering scheme for I2C buses is
54d289f9deSThierry Reding  distinct from the numbering scheme for any other service the BPMP may
55d289f9deSThierry Reding  provide (e.g. a future hypothetical SPI bus service). As such, child
56d289f9deSThierry Reding  device nodes will have no reg property, and the BPMP node will have no
57d289f9deSThierry Reding  "#address-cells" or "#size-cells" property.
58d289f9deSThierry Reding
59d289f9deSThierry Reding  The shared memory area for the IPC TX and RX between CPU and BPMP are
60*72738fdeSPeter De Schrijver  predefined and work on top of either sysram, which is an SRAM inside the
61*72738fdeSPeter De Schrijver  chip, or in normal SDRAM.
62*72738fdeSPeter De Schrijver  See ".../sram/sram.yaml" for the bindings for the SRAM case.
63*72738fdeSPeter De Schrijver  See "../reserved-memory/nvidia,tegra264-bpmp-shmem.yaml" for bindings for
64*72738fdeSPeter De Schrijver  the SDRAM case.
65d289f9deSThierry Reding
66d289f9deSThierry Redingproperties:
67d289f9deSThierry Reding  compatible:
68d289f9deSThierry Reding    oneOf:
69d289f9deSThierry Reding      - items:
70d289f9deSThierry Reding          - enum:
71d289f9deSThierry Reding              - nvidia,tegra194-bpmp
72d289f9deSThierry Reding              - nvidia,tegra234-bpmp
73d289f9deSThierry Reding          - const: nvidia,tegra186-bpmp
74d289f9deSThierry Reding      - const: nvidia,tegra186-bpmp
75d289f9deSThierry Reding
76d289f9deSThierry Reding  mboxes:
77d289f9deSThierry Reding    description: A phandle and channel specifier for the mailbox used to
78d289f9deSThierry Reding      communicate with the BPMP.
79d289f9deSThierry Reding    maxItems: 1
80d289f9deSThierry Reding
81d289f9deSThierry Reding  shmem:
82d289f9deSThierry Reding    description: List of the phandle to the TX and RX shared memory area
83d289f9deSThierry Reding      that the IPC between CPU and BPMP is based on.
84d289f9deSThierry Reding    minItems: 2
85d289f9deSThierry Reding    maxItems: 2
86d289f9deSThierry Reding
87*72738fdeSPeter De Schrijver  memory-region:
88*72738fdeSPeter De Schrijver    description: phandle to reserved memory region used for IPC between
89*72738fdeSPeter De Schrijver      CPU-NS and BPMP.
90*72738fdeSPeter De Schrijver    maxItems: 1
91*72738fdeSPeter De Schrijver
92d289f9deSThierry Reding  "#clock-cells":
93d289f9deSThierry Reding    const: 1
94d289f9deSThierry Reding
95d289f9deSThierry Reding  "#power-domain-cells":
96d289f9deSThierry Reding    const: 1
97d289f9deSThierry Reding
98d289f9deSThierry Reding  "#reset-cells":
99d289f9deSThierry Reding    const: 1
100d289f9deSThierry Reding
101d289f9deSThierry Reding  interconnects:
102d289f9deSThierry Reding    items:
103d289f9deSThierry Reding      - description: memory read client
104d289f9deSThierry Reding      - description: memory write client
105d289f9deSThierry Reding      - description: DMA read client
106d289f9deSThierry Reding      - description: DMA write client
107d289f9deSThierry Reding
108d289f9deSThierry Reding  interconnect-names:
109d289f9deSThierry Reding    items:
110d289f9deSThierry Reding      - const: read
111d289f9deSThierry Reding      - const: write
112d289f9deSThierry Reding      - const: dma-mem # dma-read
113d289f9deSThierry Reding      - const: dma-write
114d289f9deSThierry Reding
115d289f9deSThierry Reding  iommus:
116d289f9deSThierry Reding    maxItems: 1
117d289f9deSThierry Reding
118d289f9deSThierry Reding  i2c:
119d289f9deSThierry Reding    type: object
120d289f9deSThierry Reding
121d289f9deSThierry Reding  thermal:
122d289f9deSThierry Reding    type: object
123d289f9deSThierry Reding
124d289f9deSThierry RedingadditionalProperties: false
125d289f9deSThierry Reding
126*72738fdeSPeter De SchrijveroneOf:
127*72738fdeSPeter De Schrijver  - required:
128*72738fdeSPeter De Schrijver      - memory-region
129*72738fdeSPeter De Schrijver  - required:
130*72738fdeSPeter De Schrijver      - shmem
131*72738fdeSPeter De Schrijver
132d289f9deSThierry Redingrequired:
133d289f9deSThierry Reding  - compatible
134d289f9deSThierry Reding  - mboxes
135d289f9deSThierry Reding  - "#clock-cells"
136d289f9deSThierry Reding  - "#power-domain-cells"
137d289f9deSThierry Reding  - "#reset-cells"
138d289f9deSThierry Reding
139d289f9deSThierry Redingexamples:
140d289f9deSThierry Reding  - |
141d289f9deSThierry Reding    #include <dt-bindings/interrupt-controller/arm-gic.h>
142d289f9deSThierry Reding    #include <dt-bindings/mailbox/tegra186-hsp.h>
143d289f9deSThierry Reding    #include <dt-bindings/memory/tegra186-mc.h>
144d289f9deSThierry Reding
145d289f9deSThierry Reding    hsp_top0: hsp@3c00000 {
146d289f9deSThierry Reding        compatible = "nvidia,tegra186-hsp";
147d289f9deSThierry Reding        reg = <0x03c00000 0xa0000>;
148d289f9deSThierry Reding        interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
149d289f9deSThierry Reding        interrupt-names = "doorbell";
150d289f9deSThierry Reding        #mbox-cells = <2>;
151d289f9deSThierry Reding    };
152d289f9deSThierry Reding
153d289f9deSThierry Reding    sram@30000000 {
154d289f9deSThierry Reding        compatible = "nvidia,tegra186-sysram", "mmio-sram";
155d289f9deSThierry Reding        reg = <0x30000000 0x50000>;
156d289f9deSThierry Reding        #address-cells = <1>;
157d289f9deSThierry Reding        #size-cells = <1>;
158d289f9deSThierry Reding        ranges = <0x0 0x30000000 0x50000>;
159d289f9deSThierry Reding
160d289f9deSThierry Reding        cpu_bpmp_tx: sram@4e000 {
161d289f9deSThierry Reding            reg = <0x4e000 0x1000>;
162d289f9deSThierry Reding            label = "cpu-bpmp-tx";
163d289f9deSThierry Reding            pool;
164d289f9deSThierry Reding        };
165d289f9deSThierry Reding
166d289f9deSThierry Reding        cpu_bpmp_rx: sram@4f000 {
167d289f9deSThierry Reding            reg = <0x4f000 0x1000>;
168d289f9deSThierry Reding            label = "cpu-bpmp-rx";
169d289f9deSThierry Reding            pool;
170d289f9deSThierry Reding        };
171d289f9deSThierry Reding    };
172d289f9deSThierry Reding
173d289f9deSThierry Reding    bpmp {
174d289f9deSThierry Reding        compatible = "nvidia,tegra186-bpmp";
175d289f9deSThierry Reding        interconnects = <&mc TEGRA186_MEMORY_CLIENT_BPMPR &emc>,
176d289f9deSThierry Reding                        <&mc TEGRA186_MEMORY_CLIENT_BPMPW &emc>,
177d289f9deSThierry Reding                        <&mc TEGRA186_MEMORY_CLIENT_BPMPDMAR &emc>,
178d289f9deSThierry Reding                        <&mc TEGRA186_MEMORY_CLIENT_BPMPDMAW &emc>;
179d289f9deSThierry Reding        interconnect-names = "read", "write", "dma-mem", "dma-write";
180d289f9deSThierry Reding        iommus = <&smmu TEGRA186_SID_BPMP>;
181*72738fdeSPeter De Schrijver        mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_DB TEGRA_HSP_DB_MASTER_BPMP>;
182d289f9deSThierry Reding        shmem = <&cpu_bpmp_tx>, <&cpu_bpmp_rx>;
183d289f9deSThierry Reding        #clock-cells = <1>;
184d289f9deSThierry Reding        #power-domain-cells = <1>;
185d289f9deSThierry Reding        #reset-cells = <1>;
186d289f9deSThierry Reding
187d289f9deSThierry Reding        i2c {
188d289f9deSThierry Reding            compatible = "nvidia,tegra186-bpmp-i2c";
189d289f9deSThierry Reding            nvidia,bpmp-bus-id = <5>;
190d289f9deSThierry Reding            #address-cells = <1>;
191d289f9deSThierry Reding            #size-cells = <0>;
192d289f9deSThierry Reding        };
193d289f9deSThierry Reding
194d289f9deSThierry Reding        thermal {
195d289f9deSThierry Reding            compatible = "nvidia,tegra186-bpmp-thermal";
196d289f9deSThierry Reding            #thermal-sensor-cells = <1>;
197d289f9deSThierry Reding        };
198d289f9deSThierry Reding    };
199*72738fdeSPeter De Schrijver
200*72738fdeSPeter De Schrijver  - |
201*72738fdeSPeter De Schrijver    #include <dt-bindings/mailbox/tegra186-hsp.h>
202*72738fdeSPeter De Schrijver
203*72738fdeSPeter De Schrijver    bpmp {
204*72738fdeSPeter De Schrijver        compatible = "nvidia,tegra186-bpmp";
205*72738fdeSPeter De Schrijver        interconnects = <&mc TEGRA186_MEMORY_CLIENT_BPMPR &emc>,
206*72738fdeSPeter De Schrijver                        <&mc TEGRA186_MEMORY_CLIENT_BPMPW &emc>,
207*72738fdeSPeter De Schrijver                        <&mc TEGRA186_MEMORY_CLIENT_BPMPDMAR &emc>,
208*72738fdeSPeter De Schrijver                        <&mc TEGRA186_MEMORY_CLIENT_BPMPDMAW &emc>;
209*72738fdeSPeter De Schrijver        interconnect-names = "read", "write", "dma-mem", "dma-write";
210*72738fdeSPeter De Schrijver        mboxes = <&hsp_top1 TEGRA_HSP_MBOX_TYPE_DB TEGRA_HSP_DB_MASTER_BPMP>;
211*72738fdeSPeter De Schrijver        memory-region = <&dram_cpu_bpmp_mail>;
212*72738fdeSPeter De Schrijver        #clock-cells = <1>;
213*72738fdeSPeter De Schrijver        #power-domain-cells = <1>;
214*72738fdeSPeter De Schrijver        #reset-cells = <1>;
215*72738fdeSPeter De Schrijver    };
216