Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3101025pxb; Tue, 12 Jan 2021 06:26:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJyYkuT9tyXBGe7Z2Zv9KUJVG2WGPSlO0EeLqY7hZwLYO8LEoSbJydydIKbxJ0sAZSEqEHkm X-Received: by 2002:a17:906:6a8a:: with SMTP id p10mr3261920ejr.169.1610461614227; Tue, 12 Jan 2021 06:26:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610461614; cv=none; d=google.com; s=arc-20160816; b=U4hAMO22Z0N4UrIkqV9k3D3ETwJiybP83QE4a59jy7wtFj4b2JP6l1gDA5RngckLbQ jBbx+6U6b8RzlcwIU7crx7UUMHbXEjgRd9AeO1klSUMN7N3UqrV/UIztd3qCv43qtm0g b2iaFGZXL3Q2c3BP5JEj3SfSsVh2fDFwyXoKIQhx3BZp5DNaFAKMPRVC/jP7aEVV1xC9 H8xUxtUDsu+3ZtdS+7XgM+HMJWpYBnVSN4y83NGBf5MkoDcw0zAD36/XKL2z06wWRMuv wFOwlDdi/19w+b4TqpDphL7asmTpWldlan0J1Nqu6AVmlnQ4Aj/6eYAnnqXpT6QF8ejo 9cwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=UCUnP0qtEBQ5LOKXysCiilHOyFMITisDh8Fcb0Oe1MU=; b=NgAqYU/b1wipitue8OQ4dhapvTx+MOr/LiCjr2fARt1SX14l+JFXMUX1ldf9i3GF34 CAMY3CCtgzX1j7T201YjdlFdSGgO8MhfvRDs66cEY6nNC+DCpMMEKc5mOHzAE40EeUV1 ADWg/esFTNK3hMALfwox5316msl/oGjqg26of2FI1JczOIyW/3tczfdDX80m2uiyZ2C7 2WHT5TNiVo0GR037cszR+5wRo7VR/v2t8aTp0AJFhm2JAmApU/Kh0bS38M1Vy3BN6ieN fI1tX/cmZhzW82VWEwH1d9Krvd04gvxRkGaXFuTAaYG1iAq6avy8advjXoQZTpQZ89RB MeOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n16si1438305edb.217.2021.01.12.06.26.30; Tue, 12 Jan 2021 06:26:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731924AbhALOYm (ORCPT + 99 others); Tue, 12 Jan 2021 09:24:42 -0500 Received: from mx2.suse.de ([195.135.220.15]:58082 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730061AbhALOYl (ORCPT ); Tue, 12 Jan 2021 09:24:41 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 0087CAD87; Tue, 12 Jan 2021 14:24:00 +0000 (UTC) From: Nicolas Saenz Julienne To: srinivas.kandagatla@linaro.org, linux-kernel@vger.kernel.org, Rob Herring , Nicolas Saenz Julienne 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 Message-Id: <20210112142342.7290-4-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210112142342.7290-1-nsaenzjulienne@suse.de> References: <20210112142342.7290-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Tested-by: Tim Gover [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