Skip to content

Commit e40719d

Browse files
committed
Merge tag 'tegra-for-4.10-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers
firmware: Add Tegra IVC and BPMP support IVC is an inter-processor communication protocol that uses shared memory to exchange data between processors. The BPMP driver makes use of this to communicate with the Boot and Power Management Processor (BPMP) and uses an additional hardware synchronization primitive from the HSP block to signal availability of new data (doorbell). Firmware running on the BPMP implements a number of services such as the control of clocks and resets within the system, or the ability to ungate or gate power partitions. * tag 'tegra-for-4.10-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: dt-bindings: firmware: Allow child nodes inside the Tegra BPMP dt-bindings: Add power domains to Tegra BPMP firmware firmware: tegra: Add BPMP support firmware: tegra: Add IVC library dt-bindings: firmware: Add bindings for Tegra BPMP Signed-off-by: Olof Johansson <[email protected]>
2 parents dd3eedd + b704ed8 commit e40719d

File tree

13 files changed

+4747
-0
lines changed

13 files changed

+4747
-0
lines changed
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
NVIDIA Tegra Boot and Power Management Processor (BPMP)
2+
3+
The BPMP is a specific processor in Tegra chip, which is designed for
4+
booting process handling and offloading the power management, clock
5+
management, and reset control tasks from the CPU. The binding document
6+
defines the resources that would be used by the BPMP firmware driver,
7+
which can create the interprocessor communication (IPC) between the CPU
8+
and BPMP.
9+
10+
Required properties:
11+
- name : Should be bpmp
12+
- compatible
13+
Array of strings
14+
One of:
15+
- "nvidia,tegra186-bpmp"
16+
- mboxes : The phandle of mailbox controller and the mailbox specifier.
17+
- shmem : List of the phandle of the TX and RX shared memory area that
18+
the IPC between CPU and BPMP is based on.
19+
- #clock-cells : Should be 1.
20+
- #power-domain-cells : Should be 1.
21+
- #reset-cells : Should be 1.
22+
23+
This node is a mailbox consumer. See the following files for details of
24+
the mailbox subsystem, and the specifiers implemented by the relevant
25+
provider(s):
26+
27+
- .../mailbox/mailbox.txt
28+
- .../mailbox/nvidia,tegra186-hsp.txt
29+
30+
This node is a clock, power domain, and reset provider. See the following
31+
files for general documentation of those features, and the specifiers
32+
implemented by this node:
33+
34+
- .../clock/clock-bindings.txt
35+
- <dt-bindings/clock/tegra186-clock.h>
36+
- ../power/power_domain.txt
37+
- <dt-bindings/power/tegra186-powergate.h>
38+
- .../reset/reset.txt
39+
- <dt-bindings/reset/tegra186-reset.h>
40+
41+
The BPMP implements some services which must be represented by separate nodes.
42+
For example, it can provide access to certain I2C controllers, and the I2C
43+
bindings represent each I2C controller as a device tree node. Such nodes should
44+
be nested directly inside the main BPMP node.
45+
46+
Software can determine whether a child node of the BPMP node represents a device
47+
by checking for a compatible property. Any node with a compatible property
48+
represents a device that can be instantiated. Nodes without a compatible
49+
property may be used to provide configuration information regarding the BPMP
50+
itself, although no such configuration nodes are currently defined by this
51+
binding.
52+
53+
The BPMP firmware defines no single global name-/numbering-space for such
54+
services. Put another way, the numbering scheme for I2C buses is distinct from
55+
the numbering scheme for any other service the BPMP may provide (e.g. a future
56+
hypothetical SPI bus service). As such, child device nodes will have no reg
57+
property, and the BPMP node will have no #address-cells or #size-cells property.
58+
59+
The shared memory bindings for BPMP
60+
-----------------------------------
61+
62+
The shared memory area for the IPC TX and RX between CPU and BPMP are
63+
predefined and work on top of sysram, which is an SRAM inside the chip.
64+
65+
See ".../sram/sram.txt" for the bindings.
66+
67+
Example:
68+
69+
hsp_top0: hsp@03c00000 {
70+
...
71+
#mbox-cells = <2>;
72+
};
73+
74+
sysram@30000000 {
75+
compatible = "nvidia,tegra186-sysram", "mmio-sram";
76+
reg = <0x0 0x30000000 0x0 0x50000>;
77+
#address-cells = <2>;
78+
#size-cells = <2>;
79+
ranges = <0 0x0 0x0 0x30000000 0x0 0x50000>;
80+
81+
cpu_bpmp_tx: shmem@4e000 {
82+
compatible = "nvidia,tegra186-bpmp-shmem";
83+
reg = <0x0 0x4e000 0x0 0x1000>;
84+
label = "cpu-bpmp-tx";
85+
pool;
86+
};
87+
88+
cpu_bpmp_rx: shmem@4f000 {
89+
compatible = "nvidia,tegra186-bpmp-shmem";
90+
reg = <0x0 0x4f000 0x0 0x1000>;
91+
label = "cpu-bpmp-rx";
92+
pool;
93+
};
94+
};
95+
96+
bpmp {
97+
compatible = "nvidia,tegra186-bpmp";
98+
mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_DB TEGRA_HSP_DB_MASTER_BPMP>;
99+
shmem = <&cpu_bpmp_tx &cpu_bpmp_rx>;
100+
#clock-cells = <1>;
101+
#power-domain-cells = <1>;
102+
#reset-cells = <1>;
103+
104+
i2c {
105+
compatible = "...";
106+
...
107+
};
108+
};

drivers/firmware/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,5 +210,6 @@ source "drivers/firmware/broadcom/Kconfig"
210210
source "drivers/firmware/google/Kconfig"
211211
source "drivers/firmware/efi/Kconfig"
212212
source "drivers/firmware/meson/Kconfig"
213+
source "drivers/firmware/tegra/Kconfig"
213214

214215
endmenu

drivers/firmware/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ obj-y += meson/
2626
obj-$(CONFIG_GOOGLE_FIRMWARE) += google/
2727
obj-$(CONFIG_EFI) += efi/
2828
obj-$(CONFIG_UEFI_CPER) += efi/
29+
obj-y += tegra/

drivers/firmware/tegra/Kconfig

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
menu "Tegra firmware driver"
2+
3+
config TEGRA_IVC
4+
bool "Tegra IVC protocol"
5+
depends on ARCH_TEGRA
6+
help
7+
IVC (Inter-VM Communication) protocol is part of the IPC
8+
(Inter Processor Communication) framework on Tegra. It maintains the
9+
data and the different commuication channels in SysRAM or RAM and
10+
keeps the content is synchronization between host CPU and remote
11+
processors.
12+
13+
config TEGRA_BPMP
14+
bool "Tegra BPMP driver"
15+
depends on ARCH_TEGRA && TEGRA_HSP_MBOX && TEGRA_IVC
16+
help
17+
BPMP (Boot and Power Management Processor) is designed to off-loading
18+
the PM functions which include clock/DVFS/thermal/power from the CPU.
19+
It needs HSP as the HW synchronization and notification module and
20+
IVC module as the message communication protocol.
21+
22+
This driver manages the IPC interface between host CPU and the
23+
firmware running on BPMP.
24+
25+
endmenu

drivers/firmware/tegra/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
obj-$(CONFIG_TEGRA_BPMP) += bpmp.o
2+
obj-$(CONFIG_TEGRA_IVC) += ivc.o

0 commit comments

Comments
 (0)