Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C1B1606A33C for ; Wed, 2 Dec 2026 10:28:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.u-boot-project.org header.i=@lists.u-boot-project.org header.a=rsa-sha256 header.s=default header.b=0CN0iaT9; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=lceLAd8d Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 4950560837; Wed, 2 Dec 2026 10:28:20 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id nXC00vLP1G44; Wed, 2 Dec 2026 10:28:19 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp3.osuosl.org 7686A606F5 Authentication-Results: smtp3.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1796207299; b=ijWIQR0il+UXk39mtu0o+jB6V3VX0iBE1ReR4gphWvH1Gixer/g6C4nhbj14p7lDpoHJ 3J7MbmY7SzhWcYvaC6ooDXSUr39GmyTx8fZ3+nxWHBE50Rkp7EF8ygDqQTRLPRjMpGiRl 7fFIn6qxGrx23xx2G2wmmeakbNZ/x8yINtqNsNREJcOWmu6DsJ6F62hf9yxSLhXoBIoYI CX9m2E9eMzbSwI9lJNTuVDFUZyN6xeOCvjls/PAEFehDK4okfqKYjyAWNqbyx35Zswv3q QXjPmnpqCYRwT2P2LVSQ12uJ4Nwp1KQaeFaeWvHyQdhsyYwxMeTA7zxw89XwlFWugUw== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796207299; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg: X-Received:Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding: X-BeenThere:X-Mailman-Version:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:Errors-To; bh=gQvHJG//p2n/R6jCoEOTdx7IVV8MCPiepPvYPEPDPEo=; b=ViiOtfzl0kn5TSop9EhYPWUxFjNFZLqUYp8GZZFyHIRAYauOEIdlNQziaFXbVHGxZXoz KYHb+9LpTTTb+EeoVO05QkyyXGp85gBcftadpzIPtKSsPoCwJ5Iqi42ldTwAsgozFN5oE 8xPNY3MieFfVgo2aV9SBRagGxYTynnkMtW/yX7wY2xcxA2viwytH1pugxkpQK/htHM6eo cgjlYWzlMMpkt4D46M+7NN93vhysi9yBRqJSu4NJP1U4xYVFWdICgjH21Fv4FJecrOPut Bu9S8ICvJwfaxmG0PRjAvmKIdcMb8R9RHBHb2+ni2AZxZW+kAwEjmljoN+9hcohr8hw== ARC-Authentication-Results: i=1; smtp3.osuosl.org; dmarc=pass header.from=amarulasolutions.com; dkim=pass header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=lceLAd8d; arc=none smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.u-boot-project.org; s=default; t=1796207299; bh=gQvHJG//p2n/R6jCoEOTdx7IVV8MCPiepPvYPEPDPEo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=0CN0iaT9R5OlVnTKTTB/oC6pBV+no4+0jWa//TPdSTPg0MMmJWlkBQZtMM5+UCkbV KFBKvfLcW2KREs9lOtDyOBJZu+NOC+byzpjTzE+zVeCLO/QOW2wC0ymL1a48Jd8pzy ILYZ7hprEDk7rY9Nrl+txQWvj1sAG9vKW94WzrgeADYL8+XundQaL3r0+IS4W0c5Yp FwtwKatY1U69E7gbBsVUjc2POB1vI3mGCX8l5uam3GJoRQ6ojWj0npqivIlCDC3PWB 9J4F6/mb/vPVkN8A8Y4GtYfIk6214NKOUgSTDEftb7UQyqb2MQh4uYfttlyYSozTrH 1NT6jgDwT5vFA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 7686A606F5; Wed, 2 Dec 2026 10:28:19 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists1.osuosl.org (Postfix) with ESMTP id 48526765 for ; Wed, 2 Dec 2026 10:28:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 2DBBE60842 for ; Wed, 2 Dec 2026 10:28:07 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id pqK8EfuqGLEk for ; Wed, 2 Dec 2026 10:28:06 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp3.osuosl.org 9B2276081F Authentication-Results: smtp3.osuosl.org; arc=none smtp.remote-ip="2a00:1450:4864:20::332" Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::332; helo=mail-wm1-x332.google.com; envelope-from=dario.binacchi@amarulasolutions.com; receiver= Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=lceLAd8d Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by smtp3.osuosl.org (Postfix) with ESMTPS id 9B2276081F for ; Wed, 2 Dec 2026 10:28:05 +0000 (UTC) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4bb55cda775so77876175e9.0 for ; Wed, 02 Dec 2026 02:28:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1796207283; x=1796812083; darn=lists.u-boot-project.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=gQvHJG//p2n/R6jCoEOTdx7IVV8MCPiepPvYPEPDPEo=; b=lceLAd8dUxcINnPQ2Dj4IBHvSdfV1yHMJplC4JXS/SK1MjpgxPgLZY3kdVN3ueXhFU iWsHBXkjAMtiprsulVcVHaetAccb64BNGnkCX5igOEM56jxOZbKsksEoUZH+4qVVxOMH uKcdzSBvQY/YVwQYgHw/TkStVtttvH/JW4WEY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796207283; x=1796812083; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=gQvHJG//p2n/R6jCoEOTdx7IVV8MCPiepPvYPEPDPEo=; b=jNVTYmHTVbWfd7G9+k2de5lCuLQ7TLQ9a3h2bH9XKVG8QbdGd09pvlHC6CEOMrzc1E wpjhV/OcW803q8fVsReKCzsw+Ox6V5kqIF5WtX3V6HxAT3JkuG9CVORwCVKFf5dSoP7e KDbgsql5aNI9SH285VjMpgY0excscDs7uvIIwAI2+sijqvku39Q6ZJVRE2lOecaoqIr3 tCOtF+iRZQjI6BCdsXFA/Ywc/R/57Z5opAx+TAS/c5s7z8lE4+tnlBcxWupjrPytGUWz hPIk2W+Mj2ORYG+2uz45REOWd1c0XJHeyVAoJVFN3szNqMVRu10/U+SoPvuuE5tDa605 tNlA== X-Gm-Message-State: APuU4Z+g7788Dyo76KY61cwvmoQM995OGXBXNapcO5EgEbhBhnNauA2E lViv9lxwlZZuPJkftSESVswDp0AxCqN1thM2Or35Ypp0xegfkl8fvDVmKF2rfzOPGfFHINivF29 kbsUR X-Gm-Gg: AZFdTZcErg6R6dkml/fEegk0vOWfId8tggFMR2jepU5JJCfJleOt1foTbLsG/Ricbla WvKnJeuqPOY1U7A/3+BfdxqH2HbyKC2wHwO2R4DMGi/61g5zCs2qDV3xGSTa+2eJq0TG+Th7AG3 kYnWb3nPOVM37LmuSAexXvcB1Z0aSyJrFatrIN2J3xylDpxIAA3EewvFaNWAFbfQTS14wJIaXYN VNuyiJ1c1mQUbOndCLu8MXpfD3Tkt9NyJvEYQR8+80YWqP9aeKTvBiZpDTwUcPmMcWel3pwaJun 67AgSpdRy66ITbqAmgv0E+OUVNNPB7ZIPxMdx9UcCZb8BTUr58AKPj0+1VWF/KkMhh23QdgDapT qgCn62LeUaFu2NRG/Av0XDpqgfgf10wQwP5zkomP046TWPgg1sGK8xBiaV9Tgy3Lge12w5rR2/y aQfVM833ZHVDxQQsgVYrFxjHBytHmceBIT9vJAKFGs457eanBjnuEyyUTKtQ0rES0yI1sR94kJ7 O1ASVRHil9b71R4ARWHvegMgf7C800mb3m05yQAETq6o7/a3vt2LpYhEQB78nISC2Wc28Ez0eCC pLQSpZlI2EdN9+ivPvNTcW3eXpZwZRJJRzVUS6LU7d3LdrPWUM+BEAK93+oI/3vwib0jwyH09Ge y2brdfWz8Bu7PbJZa8w8tzr8b34R2KrWnF3ZutgSnvA== X-Received: by 2002:a05:600c:3547:b0:4a1:c27d:e1a8 with SMTP id 5b1f17b1804b1-4bb8880b88fmr782556285e9.10.1796207283490; Wed, 02 Dec 2026 02:28:03 -0800 (PST) Received: from localhost.localdomain ([2001:b07:6474:ebbf:6962:3ebc:7df:e6bf]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbbaeb1e4csm366823865e9.13.2026.12.02.02.28.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 02:28:03 -0800 (PST) From: Dario Binacchi To: u-boot@lists.u-boot-project.org Cc: Heiko Schocher , linux-amarula@amarulasolutions.com, Peng Fan , simon.holesch@bshg.com, Marek Vasut , Valeriy.Yatsenko@bshg.com, Leonhard Hesse , michael@amarulasolutions.com, Miquel Raynal , Dario Binacchi , Fabio Estevam , "NXP i.MX U-Boot Team" , Stefano Babic , Tom Rini Subject: [PATCH v3 24/26] imx8mn_bsh_smm_s2/pro: support simple frame-buffer Date: Wed, 2 Dec 2026 11:26:35 +0100 Message-ID: <20261202102716.572884-25-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261202102716.572884-1-dario.binacchi@amarulasolutions.com> References: <20261202102716.572884-1-dario.binacchi@amarulasolutions.com> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.u-boot-project.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: U-Boot discussion List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-18.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 If you want to pass the frame-buffer to the kernel, the video output is initialized by U-Boot, and kept by the kernel. The commit modifies the device tree to be passed to the kernel just before launching it, to prevent the kernel from reinitializing hardware that has already been configured by the bootloader. Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- (no changes since v2) Changes in v2: - Drop the custom boot-on properties added to the Linux device tree - Drop the #if guard around smm_s2_setup_simplefb() - Fix the style of a comment board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c | 72 +++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c b/board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c index c4a85c4aa440..902d5304249a 100644 --- a/board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c +++ b/board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c @@ -5,6 +5,8 @@ #include #include +#include +#include int board_late_init(void) { @@ -15,3 +17,73 @@ int board_late_init(void) return 0; } + +static void smm_s2_setup_simplefb(void *blob) +{ +#define DT_BLK_CTRL_NODE_PATH "/soc@0/bus@32c00000/blk-ctrl@32e28000" +#define DT_GPC_NODE_PATH "/soc@0/bus@30000000/gpc@303a0000" +#define DT_LCDIF_NODE_PATH "/soc@0/bus@32c00000/lcdif@32e00000" + + struct dt_addprop { + const char *node; + const char *prop; + const u32 *val; + int len; + } dt_addprops[] = { + {"/regulator-3v3-O2", "regulator-boot-on", NULL, 0}, + {"/regulator-3v3-O3", "regulator-boot-on", NULL, 0}, + }; + const char *dt_delprops[][2] = { + {DT_BLK_CTRL_NODE_PATH, "assigned-clock-rates"}, + /* pgc_dispmix */ + {DT_GPC_NODE_PATH "/pgc/power-domain@3", "assigned-clock-rates"}, + {DT_LCDIF_NODE_PATH, "assigned-clock-rates"}, + }; + int i, ret, offset; + + ret = fdt_simplefb_enable_and_mem_rsv(blob); + if (ret) { + printf("Failed to enable framebuffer DTS node\n"); + return; + } + + for (i = 0; i < ARRAY_SIZE(dt_addprops); i++) { + const char *node = dt_addprops[i].node; + const char *prop = dt_addprops[i].prop; + const void *val = dt_addprops[i].val; + const int len = dt_addprops[i].len; + + ret = fdt_find_and_setprop(blob, node, prop, val, len, 1); + if (ret < 0) + printf("Failed to add property %s:%s, err=%s\n", node, prop, + fdt_strerror(ret)); + else + debug("Add property %s:%s\n", node, prop); + } + + for (i = 0; i < ARRAY_SIZE(dt_delprops); i++) { + const char *node = dt_delprops[i][0]; + const char *prop = dt_delprops[i][1]; + + offset = fdt_path_offset(blob, node); + if (offset < 0) { + printf("Missing node %s\n", node); + continue; + } + + ret = fdt_delprop(blob, offset, prop); + if (ret < 0) + printf("Failed to delete property %s:%s\n", node, prop); + else + debug("Delete property %s:%s\n", node, prop); + } +} + +int ft_board_setup(void *blob, struct bd_info *bd) +{ + if (IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_FDT_SIMPLEFB) && + IS_ENABLED(CONFIG_VIDEO)) + smm_s2_setup_simplefb(blob); + + return 0; +} -- 2.43.0