From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA79CC433E9 for ; Tue, 12 Jan 2021 14:24:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 797AB2312C for ; Tue, 12 Jan 2021 14:24:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732231AbhALOYm (ORCPT ); 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16E4EC433E0 for ; Tue, 12 Jan 2021 14:25:57 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 90D832312C for ; Tue, 12 Jan 2021 14:25:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 90D832312C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HnUlY9KIdezGDFUd3V7VxmzmM1Vqdu3m0+lroT203mA=; b=q9QRM2+Cwh2/rK/cemPe2Z7Uu MWIJh6FoL2tU6VBhGJjYQxNyyC0TlUVfRdt9Dso4iBs5ChWhYYXswZffvX3WaMFre/RH9QCI4cf4F TkSrHdxcOPiUeTM0u/2FsL8CJKYVsPWluRAFBFzZ3f8nQBWStf1P51bpTQHe+RqycUoiBkqCMMavM KFKnSs/4SlgW35Okd8tRH1lEw2CGMfSREhAYNoYUAuHdg9X0NCfxwaARRs0kx7iq5zcq2B7kkceOn ty/cXjOyNlen6VdTMZVOrvds5Jfy7WvTJTKgWNRjETPCMCQE7nO1rp+QWpZmg9k5Ijnq9X6HrinOq 8fmlKrGHQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzKar-0007Pt-WB; Tue, 12 Jan 2021 14:24:22 +0000 Received: from mx2.suse.de ([195.135.220.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzKaX-0007IV-8w; Tue, 12 Jan 2021 14:24:02 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210112_092401_509711_4BF0A3D5 X-CRM114-Status: GOOD ( 16.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel