From patchwork Tue Dec 15 15:56:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11975079 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=-11.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 DF50DC4361B for ; Tue, 15 Dec 2020 15:58:09 +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 8BADC224F4 for ; Tue, 15 Dec 2020 15:58:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8BADC224F4 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: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:In-Reply-To:References:List-Owner; bh=QXalEdL+Vdf0SPBXQNlVK2TuQ2vnFkv/42Vz8O1jd9Y=; b=B9vjj37kCabnbAONpV7KN0BpuV BBUaiq7/vbbzBltDYYXY6o6QwXRmkdCljeWsoiimlK1PwAlkTRfB8Ht3c89ozKIuityNFYcXWoWRj uK2SoKsMhAqtIoXucND+EWMUnMXSTahoV28yGQeskwCzr+Gf2trzk0AITmOQ4kTVgTCFnP+NP+vxA LduTV0z9M5taUb+8Kc3U7/3yhOx2uRJRCL6fBibhrrmxbZCp4lL1m6K3hCdMXwFCsJjQf6rnnhzxL vVEqrnoFw+lksRSCq+rHM1OfzyvynfyokzC0b4ZhpHbFx3b0RurjI+1dUY7/t6SI1OTS6TbzEMt6t MLU4mJHw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kpCh1-0004aJ-Mg; Tue, 15 Dec 2020 15:56:51 +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 1kpCgs-0004VQ-TE; Tue, 15 Dec 2020 15:56:43 +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 4CD2EAC7F; Tue, 15 Dec 2020 15:56:40 +0000 (UTC) From: Nicolas Saenz Julienne To: srinivas.kandagatla@linaro.org, Saenz Julienne , devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/6] Expose RPi4'd bootloader configuration Date: Tue, 15 Dec 2020 16:56:20 +0100 Message-Id: <20201215155627.2513-1-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201215_105643_052599_7A653E22 X-CRM114-Status: GOOD ( 14.69 ) 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: tim.gover@raspberrypi.com, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, linux@armlinux.org.uk, robh+dt@kernel.org, will@kernel.org, phil@raspberrypi.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Soon to be released versions of RPi4's firmware will take of care passing their bootloader's configuration to the OS by copying it into memory and creating a reserved memory node in the board's DT. In order to make use of this information, this series introduces a new generic nvmem driver that maps reserved-memory nodes into nvmem devices. An alternative approach, less nice IMO, would be to create a platform-specific 'soc' driver. Regards, Nicolas --- Nicolas Saenz Julienne (6): dt-bindings: nvmem: Add bindings for rmem driver nvmem: Add driver to expose reserved memory as nvmem ARM: dts: bcm2711: Add reserved memory template to hold firmware configuration ARM: dts: bcm2711: Expose boot-loader configuration arm64: defconfig: Enable nvmem's rmem driver ARM: multi_v7_defconfig: Enable nvmem's rmem driver .../devicetree/bindings/nvmem/rmem.yaml | 35 +++++++ arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 25 +++++ arch/arm/configs/multi_v7_defconfig | 1 + arch/arm64/configs/defconfig | 1 + drivers/nvmem/Kconfig | 8 ++ drivers/nvmem/Makefile | 2 + drivers/nvmem/rmem.c | 92 +++++++++++++++++++ 7 files changed, 164 insertions(+) create mode 100644 Documentation/devicetree/bindings/nvmem/rmem.yaml create mode 100644 drivers/nvmem/rmem.c