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=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,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 8D075C432BE for ; Mon, 16 Aug 2021 12:26:26 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 704F76324C for ; Mon, 16 Aug 2021 12:26:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 704F76324C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3BD0182F2D; Mon, 16 Aug 2021 14:26:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 5D20782ECC; Mon, 16 Aug 2021 14:26:18 +0200 (CEST) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 84FAF82E4A for ; Mon, 16 Aug 2021 14:26:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=clement.leger@bootlin.com Received: (Authenticated sender: clement.leger@bootlin.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 87A441C0007; Mon, 16 Aug 2021 12:26:13 +0000 (UTC) From: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= To: u-boot@lists.denx.de, Eugen Hristev Cc: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= , Wenyou Yang , Nicolas Ferre Subject: [PATCH v2 0/5] Use device tree to get DRAM for sama5d27_som1_ek/sama5d2_xplained Date: Mon, 16 Aug 2021 14:25:38 +0200 Message-Id: <20210816122543.33532-1-clement.leger@bootlin.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Loading U-Boot after OP-TEE requires to move the base address of the DRAM and reduce its size. Indeed, OP-TEE will be loaded at start of DRAM for these platforms and this DRAM will be secured and thus not accessible to U-Boot. Currently, addresses are hardcoded in board configs. This series adds memory property when missing to existing device tree and modify init code to fetch DRAM size from devicetree. This will allow to modify only the device tree to reduce DRAM when needed. Memory addresses have been chosen to have a 32Mb hole at the start of DRAM which allows to put OP-TEE and necessary exchange memory zones. Changes in v2: - Move memory node from sama5d2.dtsi to at91-sama5d2_xplained.dts Clément Léger (5): board: sama5d27_som1_ek: Get dram size and base from device tree board: sama5d27_som1_ek: Modify load addresses ARM: dts: at91: sama5d2_xplained: Add memory node in devicetree board: sama5d2_xplained: Get dram size and base from device tree board: sama5d2_xplained: Modify load addresses arch/arm/dts/at91-sama5d2_xplained.dts | 4 ++++ .../atmel/sama5d27_som1_ek/sama5d27_som1_ek.c | 12 ++++++---- .../atmel/sama5d2_xplained/sama5d2_xplained.c | 11 +++++---- include/configs/sama5d27_som1_ek.h | 12 ++++------ include/configs/sama5d2_xplained.h | 24 ++++++++----------- 5 files changed, 33 insertions(+), 30 deletions(-) -- 2.32.0