From patchwork Mon Apr 10 08:49:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Jain X-Patchwork-Id: 1767114 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=gQsjxkVc; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pw2j213S6z1yXv for ; Mon, 10 Apr 2023 18:49:42 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A6247850CF; Mon, 10 Apr 2023 10:49:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="gQsjxkVc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2409D850CF; Mon, 10 Apr 2023 10:49:26 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 D584F850CF for ; Mon, 10 Apr 2023 10:49:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-jain1@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 33A8nKxC067458; Mon, 10 Apr 2023 03:49:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1681116560; bh=Iz448XJQpWq+vijtyA6QP3khu90abLZ7oDLIHAJk4+E=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=gQsjxkVcwwcyKY4ZihlLEkWjZozRTRbWQ6PN2vw0V1wao7tX7D5EQq1I4b/MTCHte zVwHMfKbfeAPDlx/07FqTuoaih0/esELOFISoWn50JZCHmWpca09XkYPFbg8sc+N2Q mn3Dozs5s9R8QOVo7Uwoy6IqretKhbNYqdTkbUZg= Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 33A8nK7F060813 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 10 Apr 2023 03:49:20 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Mon, 10 Apr 2023 03:49:19 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Mon, 10 Apr 2023 03:49:19 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 33A8nJJ0036739; Mon, 10 Apr 2023 03:49:19 -0500 From: Nikhil M Jain To: , CC: , , , Subject: [PATCH V2 1/4] configs: am62x_evm_a53_defconfig: Changes in memory to support SPL splash screen Date: Mon, 10 Apr 2023 14:19:10 +0530 Message-ID: <20230410084913.35116-2-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230410084913.35116-1-n-jain1@ti.com> References: <20230410084913.35116-1-n-jain1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean To enable splash at A53 SPL, need to do memory map changes which involves locate stack above malloc and have enough space to load bmp image above stack. To load a 1920X1200 image a minimum of 8.8MB space is needed, to support it move malloc down to 0x80b80000 from 0x80480000 and bss to 0x80c80000 to have 1MB buffer between malloc and BSS. Observed SPL size 195KB, CONFIG_SPL_SIZE_LIMIT set to 256KB. Observed stack size 1904Bytes, CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK set to 2KB. CONFIG_SPL_SYS_REPORT_STACK_F_USAGE config sets stack above the malloc and reports for stack overflow. Memory map at A53 SPL before splash screen 0x80000000+---------------------+ | Empty 512 KB | | | 0x80080000+---------------------+ | Text Base | | 352 KB | | | 0x800D8000+---------------------+ | | | | | Empty 3.6MB | | | | | 0x80477660+---------------------+ | Stack 2 KB | 0x80477e60+---------------------+ | GD 416 Bytes | 0x80478000+---------------------+ | Malloc 352 KB | | | 0x80480000+---------------------+ | | | | | | | | | Empty 5.5 MB | | | | | | | | | 0x80a00000+---------------------+ | | | BSS 512 KB | | | 0x80a80000+---------------------+ | | | | | | | | | Empty 5.5 MB | | | | | | | | | 0x81000000+---------------------+FIT Image load address New memory map with splash screen at SPL 0x80000000+---------------------+ | Empty 512 KB | | | 0x80080000+---------------------+ | Text Base | | 352 KB | | | 0x800D8000+---------------------+ | Empty 1.1MB | | | 0x80200000+---------------------+ | | | | | | | BMP Image Load | | | | 9.4 MB | | | | | | | | | | | | | 0x80b77660+---------------------+ | Stack 2KB | 0x80b77e60+---------------------+ | GD 416 Bytes | 0x80b78000+---------------------+ | | | Malloc 352KB | 0x80b80000+---------------------+ | | | Empty 1 MB | | | 0x80c80000+---------------------+ | BSS 512 KB | | | 0x80d00000+---------------------+ | | | | | Empty 3.0 MB | | | | | | | 0x81000000+---------------------+FIT Image load addressi Signed-off-by: Nikhil M Jain --- V2: - Correct CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK value set it to 2KB. configs/am62x_evm_a53_defconfig | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/configs/am62x_evm_a53_defconfig b/configs/am62x_evm_a53_defconfig index cc9c8eab3e..b9bad6ca6a 100644 --- a/configs/am62x_evm_a53_defconfig +++ b/configs/am62x_evm_a53_defconfig @@ -8,14 +8,18 @@ CONFIG_SOC_K3_AM625=y CONFIG_K3_ATF_LOAD_ADDR=0x9e780000 CONFIG_TARGET_AM625_A53_EVM=y CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y -CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80480000 +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80b80000 +CONFIG_SF_DEFAULT_SPEED=25000000 CONFIG_SPL_DM_SPI=y CONFIG_DEFAULT_DEVICE_TREE="k3-am625-sk" CONFIG_SPL_TEXT_BASE=0x80080000 +CONFIG_OF_LIBFDT_OVERLAY=y CONFIG_DM_RESET=y CONFIG_SPL_MMC=y CONFIG_SPL_SERIAL=y CONFIG_SPL_STACK_R_ADDR=0x82000000 +CONFIG_SPL_SIZE_LIMIT=0x40000 +CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x800 CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -27,8 +31,9 @@ CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; setenv fdtfile ti/${name_fdt}; run distro_bootcmd" CONFIG_SPL_MAX_SIZE=0x58000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y -CONFIG_SPL_BSS_START_ADDR=0x80a00000 +CONFIG_SPL_BSS_START_ADDR=0x80c80000 CONFIG_SPL_BSS_MAX_SIZE=0x80000 +CONFIG_SPL_SYS_REPORT_STACK_F_USAGE=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_STACK_R=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y @@ -68,7 +73,6 @@ CONFIG_MMC_SDHCI_ADMA=y CONFIG_SPL_MMC_SDHCI_ADMA=y CONFIG_MMC_SDHCI_AM654=y CONFIG_DM_SPI_FLASH=y -CONFIG_SF_DEFAULT_SPEED=25000000 CONFIG_SPI_FLASH_SFDP_SUPPORT=y CONFIG_SPI_FLASH_SOFT_RESET=y CONFIG_SPI_FLASH_SOFT_RESET_ON_BOOT=y @@ -97,4 +101,3 @@ CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_TI_SCI=y CONFIG_FS_FAT_MAX_CLUSTSIZE=16384 -CONFIG_OF_LIBFDT_OVERLAY=y From patchwork Mon Apr 10 08:49:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Jain X-Patchwork-Id: 1767115 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=nJuGbefn; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pw2jG33P3z1yXv for ; Mon, 10 Apr 2023 18:49:54 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D256185798; Mon, 10 Apr 2023 10:49:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="nJuGbefn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8A68C84E3A; Mon, 10 Apr 2023 10:49:27 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (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 7A78C850DB for ; Mon, 10 Apr 2023 10:49:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-jain1@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 33A8nLLN111331; Mon, 10 Apr 2023 03:49:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1681116561; bh=AmW/wu93W5vffZ6ZxatzYxgthPo2VVVW/tv69BVpRqw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=nJuGbefnc9WjmePpzVYTYNfcuRuN0crzLzjQrf3SpgGoH/+N31TueRRgnsP2NGdId f9gbOhoEi1f33drDGXsA9wsDe++BcP70nbddK9fFmCNtxKT3zLmeJeq9w49fRRuU4M wIVae6IEN7MfScwO/wPQAzCR9xSf3ZosKJ5o3Au4= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 33A8nLKp060825 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 10 Apr 2023 03:49:21 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Mon, 10 Apr 2023 03:49:21 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Mon, 10 Apr 2023 03:49:21 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 33A8nK0j032314; Mon, 10 Apr 2023 03:49:20 -0500 From: Nikhil M Jain To: , CC: , , , Subject: [PATCH V2 2/4] board: ti: am62x: am62x: Change splashimage and splashsource Date: Mon, 10 Apr 2023 14:19:11 +0530 Message-ID: <20230410084913.35116-3-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230410084913.35116-1-n-jain1@ti.com> References: <20230410084913.35116-1-n-jain1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean Change splashimage which is bmp image loadaddr to 0x80200000 since stack is situated at 0x80477660 as splash framework requires bmp image to be present above stack. Change splashsource to sf to support loading bmp image from ospi flash memory. Signed-off-by: Nikhil M Jain --- V2: - No change. board/ti/am62x/am62x.env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/ti/am62x/am62x.env b/board/ti/am62x/am62x.env index e4e64fa637..5ac15fd240 100644 --- a/board/ti/am62x/am62x.env +++ b/board/ti/am62x/am62x.env @@ -33,6 +33,6 @@ get_fit_mmc=load mmc ${bootpart} ${addr_fit} partitions=name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs} splashfile=ti.gz -splashimage=0x82000000 +splashimage=0x80200000 splashpos=m,m -splashsource=mmc +splashsource=sf From patchwork Mon Apr 10 08:49:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Jain X-Patchwork-Id: 1767117 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=GrY5vrUD; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pw2jV326xz1yb3 for ; Mon, 10 Apr 2023 18:50:06 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1D816857D2; Mon, 10 Apr 2023 10:49:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="GrY5vrUD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9AA3E854CF; Mon, 10 Apr 2023 10:49:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (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 D1A7385627 for ; Mon, 10 Apr 2023 10:49:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-jain1@ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 33A8nMPP040652; Mon, 10 Apr 2023 03:49:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1681116562; bh=n4yLPy5r0fTgV7pxe6qDOOnZrQs/dtRY9pkny0TVbvg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=GrY5vrUD2XYrTAI8RdfzrqHNKx6sVJqf3YEfGh1WvDQkEpnlUeGzN9BbWhNwLSoBg n5mWmmqWRbSbMOMZHMOTLO1OodKhrqxexseLXWQTkC2PU/RY8j8aj6TAfA51YWxVuY BA3XAutKklaxgpSiPtGs7RfOUDWFpLEXfwQEDIo0= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 33A8nMaP015185 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 10 Apr 2023 03:49:22 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Mon, 10 Apr 2023 03:49:22 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Mon, 10 Apr 2023 03:49:22 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 33A8nLYJ036765; Mon, 10 Apr 2023 03:49:22 -0500 From: Nikhil M Jain To: , CC: , , , Subject: [PATCH V2 3/4] board: ti: am62x: evm: Add necessary functions to call splash screen Date: Mon, 10 Apr 2023 14:19:12 +0530 Message-ID: <20230410084913.35116-4-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230410084913.35116-1-n-jain1@ti.com> References: <20230410084913.35116-1-n-jain1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean To enable splash screen on AM62x at a53 SPL setup DRAM, set page table, enable cache to allow copying of bmp image to frame buffer and display it using splash_display. Signed-off-by: Nikhil M Jain --- V2: - No change. board/ti/am62x/evm.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c index 20b2a70122..e3c80c5c67 100644 --- a/board/ti/am62x/evm.c +++ b/board/ti/am62x/evm.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -53,6 +54,44 @@ int dram_init_banksize(void) } #if defined(CONFIG_SPL_BUILD) +#ifdef CONFIG_SPL_VIDEO_TIDSS +static int setup_dram(void) +{ + dram_init(); + dram_init_banksize(); + gd->ram_base = CFG_SYS_SDRAM_BASE; + gd->ram_top = gd->ram_base + gd->ram_size; + gd->relocaddr = gd->ram_top; + return 0; +} + +static int video_setup(void) +{ + ulong addr; + int ret; + addr = gd->relocaddr; + + ret = video_reserve(&addr); + if (ret) + return ret; + debug("Reserving %luk for video at: %08lx\n", + ((unsigned long)gd->relocaddr - addr) >> 10, addr); + gd->relocaddr = addr; + return 0; +} + +#endif +void spl_board_init(void) +{ +#if defined(CONFIG_SPL_VIDEO_TIDSS) + setup_dram(); + arch_reserve_mmu(); + video_setup(); + enable_caches(); + splash_display(); +#endif +} + #if defined(CONFIG_K3_AM64_DDRSS) static void fixup_ddr_driver_for_ecc(struct spl_image_info *spl_image) { From patchwork Mon Apr 10 08:49:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Jain X-Patchwork-Id: 1767118 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=Vbd7KILc; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pw2jk3FLpz1yZC for ; Mon, 10 Apr 2023 18:50:18 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B2B6B85859; Mon, 10 Apr 2023 10:49:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="Vbd7KILc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0034D85644; Mon, 10 Apr 2023 10:49:32 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (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 175F58565A for ; Mon, 10 Apr 2023 10:49:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-jain1@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 33A8nOii040657; Mon, 10 Apr 2023 03:49:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1681116564; bh=klzRUF134KeGN0y19Xzo0nm11HQyNgYCN7x4rLfR5q0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Vbd7KILcL+YUxsbYBR3CpgrdqZyUxvSIL+ApEX6oopD+FCbI5Xkgov2uVii4sajSQ uF2C+FpuHAH+pPsT8vxmXlgzOSRcTN2x9t7sExHKkvFEO4anFTmBbN0hK1gc89zH9/ 7hRqlEFaOVhyqQvBlKBGazXKgsJE7l8B6nQA4IwI= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 33A8nOBE060843 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 10 Apr 2023 03:49:24 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Mon, 10 Apr 2023 03:49:24 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Mon, 10 Apr 2023 03:49:24 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 33A8nNuR036785; Mon, 10 Apr 2023 03:49:23 -0500 From: Nikhil M Jain To: , CC: , , , Subject: [PATCH V2 4/4] common: spl: spl: Remove video driver before u-boot proper Date: Mon, 10 Apr 2023 14:19:13 +0530 Message-ID: <20230410084913.35116-5-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230410084913.35116-1-n-jain1@ti.com> References: <20230410084913.35116-1-n-jain1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean Add method to remove video driver before loading u-boot proper. When bootstage changes from SPL to u-boot proper, noo method is called to remove video driver, and at u-boot proper if video driver is not enabled, the video driver starts displaying garbage on the screen, because there is no reserved space for video and the frame buffer gets u-boot proper data written. Signed-off-by: Nikhil M Jain --- V2: - No change. common/spl/spl.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/common/spl/spl.c b/common/spl/spl.c index a630e79866..72078a8ebc 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -35,6 +35,8 @@ #include #include #include +#include +#include #include #include #include @@ -889,6 +891,19 @@ void board_init_r(gd_t *dummy1, ulong dummy2) debug("Failed to stash bootstage: err=%d\n", ret); #endif +#if defined(CONFIG_SPL_VIDEO) + struct udevice *dev; + int rc; + + rc = uclass_find_device(UCLASS_VIDEO, 0, &dev); + if (!rc && dev) { + rc = device_remove(dev, DM_REMOVE_NORMAL); + if (rc) + printf("Cannot remove video device '%s' (err=%d)\n", + dev->name, rc); + } +#endif + spl_board_prepare_for_boot(); jump_to_image_no_args(&spl_image); }