Skip to contentSkip to conversation

add Tegra210 BPMP driver

PATCH Superseded Timo Alho 3 participants 11 messages Dec 12, 2018 – Dec 27, 2018

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Timo Alho

author
#0 lore raw

cover add Tegra210 BPMP driver

This series adds a driver for Tegra210 BPMP firmware. The BPMP is a specific processor in Tegra210 chip, which runs firmware for assisting in entering deep low power states (suspend to ram), and offloading DRAM memory clock scaling on some platforms.

The series consist of first refactoring the existing BPMP driver by first renaming the terminology used for communication, then splitting out the Tegra186 chip specific parts, and finally adding the needed functionality for Tegra210.

Timo Alho (4):
firmware: tegra: reword messaging terminology
firmware: tegra: refactor bpmp driver
firmware: tegra: add bpmp driver for Tegra210
dt-bindings: firmware: Add bindings for Tegra210 BPMP

 .../bindings/firmware/nvidia,tegra210-bpmp.txt     |  36 +++
 drivers/firmware/tegra/Makefile                    |   2 +
 drivers/firmware/tegra/bpmp-private.h              |  26 ++
 drivers/firmware/tegra/bpmp-t186.c                 | 303 ++++++++++++++++++
 drivers/firmware/tegra/bpmp-t210.c                 | 241 ++++++++++++++
 drivers/firmware/tegra/bpmp.c                      | 354 ++++++++-------------
 include/soc/tegra/bpmp.h                           |  13 +-
 7 files changed, 743 insertions(+), 232 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/firmware/nvidia,tegra210-bpmp.txt
 create mode 100644 drivers/firmware/tegra/bpmp-private.h
 create mode 100644 drivers/firmware/tegra/bpmp-t186.c
 create mode 100644 drivers/firmware/tegra/bpmp-t210.c
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/4 firmware: tegra: reword messaging terminology

As a preparatory change to refactor bpmp driver to support other than t186/t194 chip generations, reword and slightly refactor some of the functions to better match with what is actually happening in the wire-level protocol.

The communication with bpmp is essentially a Remote Procedure Call consisting of "request" and "response". Either side (BPMP or CPU) can initiate the communication. The state machine for communication consists of following steps (from Linux point of view):

Linux initiating the call:
1) check that channel is free to transmit a request (is_req_channel_free)
2) copy request message payload to shared location
3) post the request in channel (post_req)
4) notify BPMP that channel state has been update (ring_doorbell)
5) wait for response (is_resp_ready)
6) copy response message payload from shared location
7) acknowledge the response in channel (ack_resp)

BPMP initiating the call:
1) wait for request (is_req_ready)
2) copy request message payload from shared location
3) acknowledge the request in channel (ack_req)
4) check that channel is free to transmit response (is_resp_channel_free)
5) copy response message payload to shared location
6) post the response message to channel (post_resp)
7) notify BPMP that channel state has been updated (ring_doorbell)

---
 drivers/firmware/tegra/bpmp.c | 106 +++++++++++++++++++++++++++---------------
 1 file changed, 68 insertions(+), 38 deletions(-)
drivers/firmware/tegra/bpmp.c +68 -38
index 689478b..af123de 100644
@@ -96,7 +96,7 @@ static bool tegra_bpmp_message_valid(const struct tegra_bpmp_message *msg)
 	       (msg->rx.size == 0 || msg->rx.data);
 }
 
-static bool tegra_bpmp_master_acked(struct tegra_bpmp_channel *channel)
+static bool tegra_bpmp_is_resp_ready(struct tegra_bpmp_channel *channel)
 {
 	void *frame;
 
@@ -111,7 +111,12 @@ static bool tegra_bpmp_master_acked(struct tegra_bpmp_channel *channel)
 	return true;
 }
 
-static int tegra_bpmp_wait_ack(struct tegra_bpmp_channel *channel)
+static bool tegra_bpmp_is_req_ready(struct tegra_bpmp_channel *channel)
+{
+	return tegra_bpmp_is_resp_ready(channel);
+}
+
+static int tegra_bpmp_wait_resp(struct tegra_bpmp_channel *channel)
 {
 	unsigned long timeout = channel->bpmp->soc->channels.cpu_tx.timeout;
 	ktime_t end;
@@ -119,14 +124,24 @@ static int tegra_bpmp_wait_ack(struct tegra_bpmp_channel *channel)
 	end = ktime_add_us(ktime_get(), timeout);
 
 	do {
-		if (tegra_bpmp_master_acked(channel))
+		if (tegra_bpmp_is_resp_ready(channel))
 			return 0;
 	} while (ktime_before(ktime_get(), end));
 
 	return -ETIMEDOUT;
 }
 
-static bool tegra_bpmp_master_free(struct tegra_bpmp_channel *channel)
+static int tegra_bpmp_ack_resp(struct tegra_bpmp_channel *channel)
+{
+	return tegra_ivc_read_advance(channel->ivc);
+}
+
+static int tegra_bpmp_ack_req(struct tegra_bpmp_channel *channel)
+{
+	return tegra_ivc_read_advance(channel->ivc);
+}
+
+static bool tegra_bpmp_is_req_channel_free(struct tegra_bpmp_channel *channel)
 {
 	void *frame;
 
@@ -141,7 +156,12 @@ static bool tegra_bpmp_master_free(struct tegra_bpmp_channel *channel)
 	return true;
 }
 
-static int tegra_bpmp_wait_master_free(struct tegra_bpmp_channel *channel)
+static bool tegra_bpmp_is_resp_channel_free(struct tegra_bpmp_channel *channel)
+{
+	return tegra_bpmp_is_req_channel_free(channel);
+}
+
+static int tegra_bpmp_wait_req_channel_free(struct tegra_bpmp_channel *channel)
 {
 	unsigned long timeout = channel->bpmp->soc->channels.cpu_tx.timeout;
 	ktime_t start, now;
@@ -149,7 +169,7 @@ static int tegra_bpmp_wait_master_free(struct tegra_bpmp_channel *channel)
 	start = ns_to_ktime(local_clock());
 
 	do {
-		if (tegra_bpmp_master_free(channel))
+		if (tegra_bpmp_is_req_channel_free(channel))
 			return 0;
 
 		now = ns_to_ktime(local_clock());
@@ -158,6 +178,32 @@ static int tegra_bpmp_wait_master_free(struct tegra_bpmp_channel *channel)
 	return -ETIMEDOUT;
 }
 
+static int tegra_bpmp_post_req(struct tegra_bpmp_channel *channel)
+{
+	return tegra_ivc_write_advance(channel->ivc);
+}
+
+static int tegra_bpmp_post_resp(struct tegra_bpmp_channel *channel)
+{
+	return tegra_ivc_write_advance(channel->ivc);
+}
+
+static int tegra_bpmp_ring_doorbell(struct tegra_bpmp *bpmp)
+{
+	int err;
+
+	if (WARN_ON(bpmp->mbox.channel == NULL))
+		return -EINVAL;
+
+	err = mbox_send_message(bpmp->mbox.channel, NULL);
+	if (err < 0)
+		return err;
+
+	mbox_client_txdone(bpmp->mbox.channel, 0);
+
+	return 0;
+}
+
 static ssize_t __tegra_bpmp_channel_read(struct tegra_bpmp_channel *channel,
 					 void *data, size_t size, int *ret)
 {
@@ -166,7 +212,7 @@ static ssize_t __tegra_bpmp_channel_read(struct tegra_bpmp_channel *channel,
 	if (data && size > 0)
 		memcpy(data, channel->ib->data, size);
 
-	err = tegra_ivc_read_advance(channel->ivc);
+	err = tegra_bpmp_ack_resp(channel);
 	if (err < 0)
 		return err;
 
@@ -210,7 +256,7 @@ static ssize_t __tegra_bpmp_channel_write(struct tegra_bpmp_channel *channel,
 	if (data && size > 0)
 		memcpy(channel->ob->data, data, size);
 
-	return tegra_ivc_write_advance(channel->ivc);
+	return tegra_bpmp_post_req(channel);
 }
 
 static struct tegra_bpmp_channel *
@@ -238,7 +284,7 @@ tegra_bpmp_write_threaded(struct tegra_bpmp *bpmp, unsigned int mrq,
 
 	channel = &bpmp->threaded_channels[index];
 
-	if (!tegra_bpmp_master_free(channel)) {
+	if (!tegra_bpmp_is_req_channel_free(channel)) {
 		err = -EBUSY;
 		goto unlock;
 	}
@@ -270,7 +316,7 @@ static ssize_t tegra_bpmp_channel_write(struct tegra_bpmp_channel *channel,
 {
 	int err;
 
-	err = tegra_bpmp_wait_master_free(channel);
+	err = tegra_bpmp_wait_req_channel_free(channel);
 	if (err < 0)
 		return err;
 
@@ -302,13 +348,11 @@ int tegra_bpmp_transfer_atomic(struct tegra_bpmp *bpmp,
 
 	spin_unlock(&bpmp->atomic_tx_lock);
 
-	err = mbox_send_message(bpmp->mbox.channel, NULL);
+	err = tegra_bpmp_ring_doorbell(bpmp);
 	if (err < 0)
 		return err;
 
-	mbox_client_txdone(bpmp->mbox.channel, 0);
-
-	err = tegra_bpmp_wait_ack(channel);
+	err = tegra_bpmp_wait_resp(channel);
 	if (err < 0)
 		return err;
 
@@ -335,12 +379,10 @@ int tegra_bpmp_transfer(struct tegra_bpmp *bpmp,
 	if (IS_ERR(channel))
 		return PTR_ERR(channel);
 
-	err = mbox_send_message(bpmp->mbox.channel, NULL);
+	err = tegra_bpmp_ring_doorbell(bpmp);
 	if (err < 0)
 		return err;
 
-	mbox_client_txdone(bpmp->mbox.channel, 0);
-
 	timeout = usecs_to_jiffies(bpmp->soc->channels.thread.timeout);
 
 	err = wait_for_completion_timeout(&channel->completion, timeout);
@@ -369,38 +411,34 @@ void tegra_bpmp_mrq_return(struct tegra_bpmp_channel *channel, int code,
 {
 	unsigned long flags = channel->ib->flags;
 	struct tegra_bpmp *bpmp = channel->bpmp;
-	struct tegra_bpmp_mb_data *frame;
 	int err;
 
 	if (WARN_ON(size > MSG_DATA_MIN_SZ))
 		return;
 
-	err = tegra_ivc_read_advance(channel->ivc);
+	err = tegra_bpmp_ack_req(channel);
 	if (WARN_ON(err < 0))
 		return;
 
 	if ((flags & MSG_ACK) == 0)
 		return;
 
-	frame = tegra_ivc_write_get_next_frame(channel->ivc);
-	if (WARN_ON(IS_ERR(frame)))
+	if (WARN_ON(!tegra_bpmp_is_resp_channel_free(channel)))
 		return;
 
-	frame->code = code;
+	channel->ob->code = code;
 
 	if (data && size > 0)
-		memcpy(frame->data, data, size);
+		memcpy(channel->ob->data, data, size);
 
-	err = tegra_ivc_write_advance(channel->ivc);
+	err = tegra_bpmp_post_resp(channel);
 	if (WARN_ON(err < 0))
 		return;
 
 	if (flags & MSG_RING) {
-		err = mbox_send_message(bpmp->mbox.channel, NULL);
+		err = tegra_bpmp_ring_doorbell(bpmp);
 		if (WARN_ON(err < 0))
 			return;
-
-		mbox_client_txdone(bpmp->mbox.channel, 0);
 	}
 }
 EXPORT_SYMBOL_GPL(tegra_bpmp_mrq_return);
@@ -638,7 +676,7 @@ static void tegra_bpmp_handle_rx(struct mbox_client *client, void *data)
 	count = bpmp->soc->channels.thread.count;
 	busy = bpmp->threaded.busy;
 
-	if (tegra_bpmp_master_acked(channel))
+	if (tegra_bpmp_is_req_ready(channel))
 		tegra_bpmp_handle_mrq(bpmp, channel->ib->code, channel);
 
 	spin_lock(&bpmp->lock);
@@ -648,7 +686,7 @@ static void tegra_bpmp_handle_rx(struct mbox_client *client, void *data)
 
 		channel = &bpmp->threaded_channels[i];
 
-		if (tegra_bpmp_master_acked(channel)) {
+		if (tegra_bpmp_is_resp_ready(channel)) {
 			tegra_bpmp_channel_signal(channel);
 			clear_bit(i, busy);
 		}
@@ -660,16 +698,8 @@ static void tegra_bpmp_handle_rx(struct mbox_client *client, void *data)
 static void tegra_bpmp_ivc_notify(struct tegra_ivc *ivc, void *data)
 {
 	struct tegra_bpmp *bpmp = data;
-	int err;
 
-	if (WARN_ON(bpmp->mbox.channel == NULL))
-		return;
-
-	err = mbox_send_message(bpmp->mbox.channel, NULL);
-	if (err < 0)
-		return;
-
-	mbox_client_txdone(bpmp->mbox.channel, 0);
+	WARN_ON(tegra_bpmp_ring_doorbell(bpmp));
 }
 
 static int tegra_bpmp_channel_init(struct tegra_bpmp_channel *channel,
Signature · 1 line
2.7.4
#2 lore raw

Re: [PATCH 1/4] firmware: tegra: reword messaging terminology

Quoted 10 lines · Timo Alho

As a preparatory change to refactor bpmp driver to support other than t186/t194 chip generations, reword and slightly refactor some of the functions to better match with what is actually happening in the wire-level protocol.

The communication with bpmp is essentially a Remote Procedure Call consisting of "request" and "response". Either side (BPMP or CPU) can initiate the communication. The state machine for communication consists of following steps (from Linux point of view):

Quoted 5 lines

Linux initiating the call:
1) check that channel is free to transmit a request (is_req_channel_free)
2) copy request message payload to shared location
3) post the request in channel (post_req)
4) notify BPMP that channel state has been update (ring_doorbell)

*updated*

author
#3 lore raw

Re: [PATCH 1/4] firmware: tegra: reword messaging terminology

Hi Sivaram,

Quoted 11 lines · Sivaram Nair
Quoted 10 lines · Timo Alho

As a preparatory change to refactor bpmp driver to support other than t186/t194 chip generations, reword and slightly refactor some of the functions to better match with what is actually happening in the wire-level protocol.

The communication with bpmp is essentially a Remote Procedure Call consisting of "request" and "response". Either side (BPMP or CPU) can initiate the communication. The state machine for communication consists of following steps (from Linux point of view):

Quoted 8 lines
Quoted 5 lines

Linux initiating the call:
1) check that channel is free to transmit a request (is_req_channel_free)
2) copy request message payload to shared location
3) post the request in channel (post_req)
4) notify BPMP that channel state has been update (ring_doorbell)

*updated*

Thanks for taking a look of the whole series. I'll fix the things you pointed out on next version, after receiving more feedback.

author
#4 lore raw

PATCH 2/4 firmware: tegra: refactor bpmp driver

In reply to Timo Alho

Split bpmp driver into common and chip specific parts to facilitae adding support for previous and futurue Tegra chips that are using bpmp as co-processor.

---
 drivers/firmware/tegra/Makefile       |   1 +
 drivers/firmware/tegra/bpmp-private.h |  26 +++
 drivers/firmware/tegra/bpmp-t186.c    | 303 ++++++++++++++++++++++++++++++++++
 drivers/firmware/tegra/bpmp.c         | 247 +++++----------------------
 include/soc/tegra/bpmp.h              |  12 +-
 5 files changed, 381 insertions(+), 208 deletions(-)
 create mode 100644 drivers/firmware/tegra/bpmp-private.h
 create mode 100644 drivers/firmware/tegra/bpmp-t186.c
drivers/firmware/tegra/Makefile +1 -0
index 1b826dc..367d482 100644
@@ -1,4 +1,5 @@
 tegra-bpmp-y			= bpmp.o
+tegra-bpmp-$(CONFIG_ARCH_TEGRA_186_SOC)	+= bpmp-t186.o
 tegra-bpmp-$(CONFIG_DEBUG_FS)	+= bpmp-debugfs.o
 obj-$(CONFIG_TEGRA_BPMP)	+= tegra-bpmp.o
 obj-$(CONFIG_TEGRA_IVC)		+= ivc.o
drivers/firmware/tegra/bpmp-private.h new file +26 -0
new file mode 100644
index 0000000..31c3400
@@ -0,0 +1,26 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2018, NVIDIA CORPORATION.
+ */
+
+#ifndef __FIRMWARE_TEGRA_BPMP_PRIVATE_H
+#define __FIRMWARE_TEGRA_BPMP_PRIVATE_H
+
+#include <soc/tegra/bpmp.h>
+
+struct tegra_bpmp_ops {
+	int (*init)(struct tegra_bpmp *bpmp);
+	void (*deinit)(struct tegra_bpmp *bpmp);
+	bool (*is_resp_ready)(struct tegra_bpmp_channel *channel);
+	bool (*is_req_ready)(struct tegra_bpmp_channel *channel);
+	int (*ack_resp)(struct tegra_bpmp_channel *channel);
+	int (*ack_req)(struct tegra_bpmp_channel *channel);
+	bool (*is_resp_channel_free)(struct tegra_bpmp_channel *channel);
+	bool (*is_req_channel_free)(struct tegra_bpmp_channel *channel);
+	int (*post_resp)(struct tegra_bpmp_channel *channel);
+	int (*post_req)(struct tegra_bpmp_channel *channel);
+	int (*ring_doorbell)(struct tegra_bpmp *bpmp);
+	int (*resume)(struct tegra_bpmp *bpmp);
+};
+
+#endif
drivers/firmware/tegra/bpmp-t186.c new file +303 -0

303 lines not on this page · raw message

drivers/firmware/tegra/bpmp.c +45 -202

368 lines not on this page · raw message

include/soc/tegra/bpmp.h +6 -6
index b02f926..a4818c0 100644
@@ -23,6 +23,7 @@
 #include <soc/tegra/bpmp-abi.h>
 
 struct tegra_bpmp_clk;
+struct tegra_bpmp_ops;
 
 struct tegra_bpmp_soc {
 	struct {
@@ -32,6 +33,8 @@ struct tegra_bpmp_soc {
 			unsigned int timeout;
 		} cpu_tx, thread, cpu_rx;
 	} channels;
+
+	struct tegra_bpmp_ops *ops;
 	unsigned int num_resets;
 };
 
@@ -63,12 +66,7 @@ struct tegra_bpmp_mrq {
 struct tegra_bpmp {
 	const struct tegra_bpmp_soc *soc;
 	struct device *dev;
-
-	struct {
-		struct gen_pool *pool;
-		dma_addr_t phys;
-		void *virt;
-	} tx, rx;
+	void *priv;
 
 	struct {
 		struct mbox_client client;
@@ -173,6 +171,8 @@ static inline bool tegra_bpmp_mrq_is_supported(struct tegra_bpmp *bpmp,
 }
 #endif
 
+void tegra_bpmp_handle_rx(struct tegra_bpmp *bpmp);
+
 #if IS_ENABLED(CONFIG_CLK_TEGRA_BPMP)
 int tegra_bpmp_init_clocks(struct tegra_bpmp *bpmp);
 #else
Signature · 1 line
2.7.4
#5 lore raw

Re: [PATCH 2/4] firmware: tegra: refactor bpmp driver

drivers/firmware/tegra/bpmp.c static bool tegra_bpmp_message_valid(const struct tegra_bpmp_message *msg) · line 112

Quoted 7 lines · Timo Alho

static bool tegra_bpmp_is_req_ready(struct tegra_bpmp_channel *channel) {

drivers/firmware/tegra/bpmp.c +3 -1
-	return tegra_bpmp_is_resp_ready(channel);
+	struct tegra_bpmp *bpmp = channel->bpmp;
+
+	return bpmp->soc->ops->is_req_ready(channel);

Perhaps, write a helper function to return ops pointer from channel and use it here and below?

Quoted 2 lines

+extern struct tegra_bpmp_ops tegra186_bpmp_ops;

Move this to bpmp-private.h?

author
#6 lore raw

PATCH 3/4 firmware: tegra: add bpmp driver for Tegra210

In reply to Timo Alho

This patch adds driver for Tegra210 BPMP firmware.

The BPMP is a specific processor in Tegra210 chip, which runs firmware for assisting in entering deep low power states (suspend to ram), and offloading DRAM memory clock scaling on some platforms.

Based on work by Sivaram Nair <[email protected]>

---
 drivers/firmware/tegra/Makefile    |   1 +
 drivers/firmware/tegra/bpmp-t210.c | 241 +++++++++++++++++++++++++++++++++++++
 drivers/firmware/tegra/bpmp.c      |  47 ++++++--
 include/soc/tegra/bpmp.h           |   1 +
 4 files changed, 281 insertions(+), 9 deletions(-)
 create mode 100644 drivers/firmware/tegra/bpmp-t210.c
drivers/firmware/tegra/Makefile +1 -0
index 367d482..dc41d6f 100644
@@ -1,5 +1,6 @@
 tegra-bpmp-y			= bpmp.o
 tegra-bpmp-$(CONFIG_ARCH_TEGRA_186_SOC)	+= bpmp-t186.o
+tegra-bpmp-$(CONFIG_ARCH_TEGRA_210_SOC)	+= bpmp-t210.o
 tegra-bpmp-$(CONFIG_DEBUG_FS)	+= bpmp-debugfs.o
 obj-$(CONFIG_TEGRA_BPMP)	+= tegra-bpmp.o
 obj-$(CONFIG_TEGRA_IVC)		+= ivc.o
drivers/firmware/tegra/bpmp-t210.c new file +241 -0

241 lines not on this page · raw message

drivers/firmware/tegra/bpmp.c +38 -9

69 lines not on this page · raw message

include/soc/tegra/bpmp.h +1 -0
index a4818c0..efcbeed 100644
@@ -50,6 +50,7 @@ struct tegra_bpmp_channel {
 	struct tegra_bpmp_mb_data *ob;
 	struct completion completion;
 	struct tegra_ivc *ivc;
+	int nr;
 };
 
 typedef void (*tegra_bpmp_mrq_handler_t)(unsigned int mrq,
Signature · 1 line
2.7.4
#7 lore raw

Re: [PATCH 3/4] firmware: tegra: add bpmp driver for Tegra210

drivers/firmware/tegra/bpmp-t210.c line 130

Quoted 3 lines · Timo Alho
drivers/firmware/tegra/bpmp-t210.c new file +3 -0
+}
+
+static irqreturn_t rx_irq(int irq, void *data)

s/rx_irq/tegra210_bpmp_rx_irq/?

drivers/firmware/tegra/bpmp.c static int __maybe_unused tegra_bpmp_resume(struct device *dev) · line 802

Quoted 5 lines
drivers/firmware/tegra/bpmp.c +1 -0
@@ -793,6 +799,7 @@ static int __maybe_unused tegra_bpmp_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(tegra_bpmp_pm_ops, NULL, tegra_bpmp_resume);
 
 extern struct tegra_bpmp_ops tegra186_bpmp_ops;
+extern struct tegra_bpmp_ops tegra210_bpmp_ops;

Move to bpmp-private.h?

author
#8 lore raw

PATCH 4/4 dt-bindings: firmware: Add bindings for Tegra210 BPMP

In reply to Timo Alho

The BPMP is a specific processor in Tegra210 chip, which is designed for boot process handling, assisting in entering deep low power states (suspend to ram), and offloading DRAM memory clock scaling on some platforms.

---
 .../bindings/firmware/nvidia,tegra210-bpmp.txt     | 36 ++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/firmware/nvidia,tegra210-bpmp.txt
Documentation/devicetree/bindings/firmware/nvidia,tegra210-bpmp.txt new file +36 -0
new file mode 100644
index 0000000..de1fb62
@@ -0,0 +1,36 @@
+NVIDIA Tegra210 Boot and Power Management Processor (BPMP)
+
+The Boot and Power Management Processor (BPMP) is a co-processor found
+in Tegra210 SoC. It is designed to handle the early stages of the boot
+process as well as to assisting in entering deep low power state
+(suspend to ram), and also offloading DRAM memory clock scaling on
+some platforms. The binding document defines the resources that would
+be used by the BPMP T210 firmware driver, which can create the
+interprocessor communication (IPC) between the CPU and BPMP.
+
+Required properties:
+- name : Should be bpmp
+- compatible
+    Array of strings
+    One of:
+    - "nvidia,tegra210-bpmp"
+- reg: physicall base address and length for HW synchornization primitives
+       1) base address and length to Tegra 'atomics' hardware
+       2) base address and length to Tegra 'semaphore' hardware
+- interrupts: specifies the interrupt number for receiving messages ("rx")
+              and for triggering messages ("tx")
+
+Optional properties:
+- #clock-cells : Should be 1 for platforms where DRAM clock control is
+                 offloaded to bpmp.
+
+Example:
+
+bpmp {
+	compatible = "nvidia,tegra210-bpmp";
+	reg = <0x0 0x70016000 0x0 0x2000
+	       0x0 0x60001000 0x0 0x1000>;
+	interrupts = <0 6 IRQ_TYPE_NONE>,
+		     <0 4 IRQ_TYPE_EDGE_RISING>;
+	interrupt-names = "tx", "rx";
+};
Signature · 1 line
2.7.4
maintainer
#9 lore raw

Re: [PATCH 4/4] dt-bindings: firmware: Add bindings for Tegra210 BPMP

Quoted 24 lines · Timo Alho

The BPMP is a specific processor in Tegra210 chip, which is designed for boot process handling, assisting in entering deep low power states (suspend to ram), and offloading DRAM memory clock scaling on some platforms.

---
 .../bindings/firmware/nvidia,tegra210-bpmp.txt     | 36 ++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/firmware/nvidia,tegra210-bpmp.txt
Documentation/devicetree/bindings/firmware/nvidia,tegra210-bpmp.txt new file +7 -0
new file mode 100644
index 0000000..de1fb62
@@ -0,0 +1,36 @@
+NVIDIA Tegra210 Boot and Power Management Processor (BPMP)
+
+The Boot and Power Management Processor (BPMP) is a co-processor found
+in Tegra210 SoC. It is designed to handle the early stages of the boot
+process as well as to assisting in entering deep low power state
+(suspend to ram), and also offloading DRAM memory clock scaling on
+some platforms. The binding document defines the resources that would

Documentation/devicetree/bindings/firmware/nvidia,tegra210-bpmp.txt line 17

Quoted 10 lines
Documentation/devicetree/bindings/firmware/nvidia,tegra210-bpmp.txt new file +10 -0
+be used by the BPMP T210 firmware driver, which can create the
+interprocessor communication (IPC) between the CPU and BPMP.
+
+Required properties:
+- name : Should be bpmp
+- compatible
+    Array of strings
+    One of:
+    - "nvidia,tegra210-bpmp"
+- reg: physicall base address and length for HW synchornization primitives

s/physicall/physical/

Documentation/devicetree/bindings/firmware/nvidia,tegra210-bpmp.txt line 29

Quoted 12 lines
Documentation/devicetree/bindings/firmware/nvidia,tegra210-bpmp.txt new file +12 -0
+       1) base address and length to Tegra 'atomics' hardware
+       2) base address and length to Tegra 'semaphore' hardware
+- interrupts: specifies the interrupt number for receiving messages ("rx")
+              and for triggering messages ("tx")
+
+Optional properties:
+- #clock-cells : Should be 1 for platforms where DRAM clock control is
+                 offloaded to bpmp.
+
+Example:
+
+bpmp {

bpmp@70016000

Quoted 10 lines
Documentation/devicetree/bindings/firmware/nvidia,tegra210-bpmp.txt new file +7 -0
+	compatible = "nvidia,tegra210-bpmp";
+	reg = <0x0 0x70016000 0x0 0x2000
+	       0x0 0x60001000 0x0 0x1000>;
+	interrupts = <0 6 IRQ_TYPE_NONE>,
+		     <0 4 IRQ_TYPE_EDGE_RISING>;
+	interrupt-names = "tx", "rx";
+};
Signature · 1 line
2.7.4
author
#10 lore raw

Re: [PATCH 4/4] dt-bindings: firmware: Add bindings for Tegra210 BPMP

Quoted 53 lines · Rob Herring
Quoted 24 lines · Timo Alho

The BPMP is a specific processor in Tegra210 chip, which is designed for boot process handling, assisting in entering deep low power states (suspend to ram), and offloading DRAM memory clock scaling on some platforms.

---
  .../bindings/firmware/nvidia,tegra210-bpmp.txt     | 36 ++++++++++++++++++++++
  1 file changed, 36 insertions(+)

create mode 100644 Documentation/devicetree/bindings/firmware/nvidia,tegra210-bpmp.txt

Documentation/devicetree/bindings/firmware/nvidia,tegra210-bpmp.txt new file +7 -0
new file mode 100644
index 0000000..de1fb62
@@ -0,0 +1,36 @@
+NVIDIA Tegra210 Boot and Power Management Processor (BPMP)
+
+The Boot and Power Management Processor (BPMP) is a co-processor found
+in Tegra210 SoC. It is designed to handle the early stages of the boot
+process as well as to assisting in entering deep low power state
+(suspend to ram), and also offloading DRAM memory clock scaling on
+some platforms. The binding document defines the resources that would

Documentation/devicetree/bindings/firmware/nvidia,tegra210-bpmp.txt line 17

Quoted 10 lines
Documentation/devicetree/bindings/firmware/nvidia,tegra210-bpmp.txt new file +10 -0
+be used by the BPMP T210 firmware driver, which can create the
+interprocessor communication (IPC) between the CPU and BPMP.
+
+Required properties:
+- name : Should be bpmp
+- compatible
+    Array of strings
+    One of:
+    - "nvidia,tegra210-bpmp"
+- reg: physicall base address and length for HW synchornization primitives

s/physicall/physical/

Documentation/devicetree/bindings/firmware/nvidia,tegra210-bpmp.txt line 29

Quoted 12 lines
Documentation/devicetree/bindings/firmware/nvidia,tegra210-bpmp.txt new file +12 -0
+       1) base address and length to Tegra 'atomics' hardware
+       2) base address and length to Tegra 'semaphore' hardware
+- interrupts: specifies the interrupt number for receiving messages ("rx")
+              and for triggering messages ("tx")
+
+Optional properties:
+- #clock-cells : Should be 1 for platforms where DRAM clock control is
+                 offloaded to bpmp.
+
+Example:
+
+bpmp {

bpmp@70016000

Quoted 10 lines
Quoted 10 lines
Documentation/devicetree/bindings/firmware/nvidia,tegra210-bpmp.txt new file +7 -0
+	compatible = "nvidia,tegra210-bpmp";
+	reg = <0x0 0x70016000 0x0 0x2000
+	       0x0 0x60001000 0x0 0x1000>;
+	interrupts = <0 6 IRQ_TYPE_NONE>,
+		     <0 4 IRQ_TYPE_EDGE_RISING>;
+	interrupt-names = "tx", "rx";
+};
Signature · 1 line
2.7.4

Thanks for the comments Rob. I'll clean up the typos in next series.

-Timo