All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: srinivas.kandagatla@linaro.org, linux-kernel@vger.kernel.org,
	Rob Herring <robh+dt@kernel.org>,
	Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Cc: linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk,
	catalin.marinas@arm.com, will@kernel.org,
	devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
	bcm-kernel-feedback-list@broadcom.com, tim.gover@raspberrypi.com,
	phil@raspberrypi.com
Subject: [PATCH v3 3/5] ARM: dts: bcm2711: Add reserved memory template to hold firmware configuration
Date: Tue, 12 Jan 2021 15:23:40 +0100	[thread overview]
Message-ID: <20210112142342.7290-4-nsaenzjulienne@suse.de> (raw)
In-Reply-To: <20210112142342.7290-1-nsaenzjulienne@suse.de>

RPi4's co-processor will copy the board's bootloader[1] configuration
into memory for the OS to consume. Specifically, for the bootloader
configuration and upgrade user-space routines to query it through
nvmem's sysfs interface.

Introduce a reserved-memory area template for the co-processor to edit
before booting the system so as for Linux not to overwrite that memory
and to expose it as an nvmem device.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Tested-by: Tim Gover <tim.gover@raspberrypi.com>

[1] https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md
---

Changes since v1:
 - Introduce compatible string
 - Change alias name to something more explicit

 arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
index 403bacf986eb..3b4ab947492a 100644
--- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
@@ -25,6 +25,7 @@ aliases {
 		emmc2bus = &emmc2bus;
 		ethernet0 = &genet;
 		pcie0 = &pcie0;
+		blconfig = &blconfig;
 	};
 
 	leds {
@@ -218,6 +219,22 @@ &pwm1 {
 	status = "okay";
 };
 
+&rmem {
+	/*
+	 * RPi4's co-processor will copy the board's bootloader configuration
+	 * into memory for the OS to consume. It'll also update this node with
+	 * its placement information.
+	 */
+	blconfig: nvram@0 {
+		compatible = "raspberrypi,bootloader-config", "nvmem-rmem";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		reg = <0x0 0x0 0x0>;
+		no-map;
+		status = "disabled";
+	};
+};
+
 /* SDHCI is used to control the SDIO for wireless */
 &sdhci {
 	#address-cells = <1>;
-- 
2.29.2


WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: srinivas.kandagatla@linaro.org, linux-kernel@vger.kernel.org,
	Rob Herring <robh+dt@kernel.org>,
	Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Cc: devicetree@vger.kernel.org, tim.gover@raspberrypi.com,
	catalin.marinas@arm.com, linux@armlinux.org.uk,
	bcm-kernel-feedback-list@broadcom.com,
	linux-rpi-kernel@lists.infradead.org, will@kernel.org,
	phil@raspberrypi.com, linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 3/5] ARM: dts: bcm2711: Add reserved memory template to hold firmware configuration
Date: Tue, 12 Jan 2021 15:23:40 +0100	[thread overview]
Message-ID: <20210112142342.7290-4-nsaenzjulienne@suse.de> (raw)
In-Reply-To: <20210112142342.7290-1-nsaenzjulienne@suse.de>

RPi4's co-processor will copy the board's bootloader[1] configuration
into memory for the OS to consume. Specifically, for the bootloader
configuration and upgrade user-space routines to query it through
nvmem's sysfs interface.

Introduce a reserved-memory area template for the co-processor to edit
before booting the system so as for Linux not to overwrite that memory
and to expose it as an nvmem device.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Tested-by: Tim Gover <tim.gover@raspberrypi.com>

[1] https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md
---

Changes since v1:
 - Introduce compatible string
 - Change alias name to something more explicit

 arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
index 403bacf986eb..3b4ab947492a 100644
--- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
@@ -25,6 +25,7 @@ aliases {
 		emmc2bus = &emmc2bus;
 		ethernet0 = &genet;
 		pcie0 = &pcie0;
+		blconfig = &blconfig;
 	};
 
 	leds {
@@ -218,6 +219,22 @@ &pwm1 {
 	status = "okay";
 };
 
+&rmem {
+	/*
+	 * RPi4's co-processor will copy the board's bootloader configuration
+	 * into memory for the OS to consume. It'll also update this node with
+	 * its placement information.
+	 */
+	blconfig: nvram@0 {
+		compatible = "raspberrypi,bootloader-config", "nvmem-rmem";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		reg = <0x0 0x0 0x0>;
+		no-map;
+		status = "disabled";
+	};
+};
+
 /* SDHCI is used to control the SDIO for wireless */
 &sdhci {
 	#address-cells = <1>;
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2021-01-12 14:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-12 14:23 [PATCH v3 0/5] Expose RPi4's bootloader configuration Nicolas Saenz Julienne
2021-01-12 14:23 ` Nicolas Saenz Julienne
2021-01-12 14:23 ` [PATCH v3 1/5] dt-bindings: nvmem: Add bindings for rmem driver Nicolas Saenz Julienne
2021-01-12 14:23   ` Nicolas Saenz Julienne
2021-01-14 20:17   ` Rob Herring
2021-01-14 20:17     ` Rob Herring
2021-01-12 14:23 ` [PATCH v3 2/5] nvmem: Add driver to expose reserved memory as nvmem Nicolas Saenz Julienne
2021-01-12 14:23   ` Nicolas Saenz Julienne
2021-01-12 14:23 ` Nicolas Saenz Julienne [this message]
2021-01-12 14:23   ` [PATCH v3 3/5] ARM: dts: bcm2711: Add reserved memory template to hold firmware configuration Nicolas Saenz Julienne
2021-01-12 14:23 ` [PATCH v3 4/5] arm64: defconfig: Enable nvmem's rmem driver Nicolas Saenz Julienne
2021-01-12 14:23   ` Nicolas Saenz Julienne
2021-01-12 14:23 ` [PATCH v3 5/5] ARM: multi_v7_defconfig: " Nicolas Saenz Julienne
2021-01-12 14:23   ` Nicolas Saenz Julienne
2021-01-18 16:50 ` [PATCH v3 0/5] Expose RPi4's bootloader configuration Srinivas Kandagatla
2021-01-18 16:50   ` Srinivas Kandagatla
2021-01-25 21:04 ` Nicolas Saenz Julienne
2021-01-25 21:04   ` Nicolas Saenz Julienne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210112142342.7290-4-nsaenzjulienne@suse.de \
    --to=nsaenzjulienne@suse.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=phil@raspberrypi.com \
    --cc=robh+dt@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tim.gover@raspberrypi.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.