From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DC0F6606A31A for ; Wed, 2 Dec 2026 08:09:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=QA+DDv8A; dkim=fail reason="signature verification failed" (2048-bit key, unprotected) header.d=freeshell.de header.i=@freeshell.de header.a=rsa-sha256 header.s=s2025 header.b=Pn+J90rz DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=0b6nQkgYXf71fjwdvM5k2m8jnRrutyyr27dAJcJq2Ns=; b=QA+DDv8AxlXl1twaC334M+69Eu T3a1d+9p69rmZ6ISFMxGc1p7fwpxKgCcyHiDLm5sOT3pfYB3xArpIiOim/9KzD5Idb6CyBMP2Tbm3 AJ5bR0oryAk8P3Iw4wVzqxFmsbb+8wa740KY0wFNwxG70FS2UUWhAeztBrjNRnr+uu9MLGgcbBY2u m47rQL4KY+Mw1vjIUTHVIvJ29uIniC6GEQxY9GiumizQQNVzF7YKG/lFqdShf8Kd6894+YvhsCWmM fhxsObhWb4MiKF8V0J0b2yGA2VYkkuAIHg9/a1nNugSVmXRX/4s4zAhycsShj+HHh+Wx2JfKAwPbB 7ewofS7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYfPQ-0000000AcTy-3Gpg; Wed, 02 Dec 2026 08:09:48 +0000 Received: from freeshell.de ([116.202.128.144]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYfPM-0000000AcTG-40UO for linux-riscv@lists.infradead.org; Wed, 02 Dec 2026 08:09:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freeshell.de; s=s2025; t=1796198956; bh=/CAT/u4oO98UBAgsQRmS/dLEcEJN8dG7XPO3VS7iBhI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Pn+J90rzCM86Ww4uUQrq4JOLpp5tQ7HS9rBPeugII57lLNZE7r2gsEWxjjbxNgdx/ jSI7VTOiSm7Q2K8p/cBACHW971QECZvB0fKLDuPP+yAZfEYsJpbsStrm2nGimPRY2K imAee6/+B9GJGYAmOW0vMTYArjphgOSCg4aQFSCAdbHups3GJQredHheRipqHHzfy9 n95S0Bv9H8ZBwQMEcsQD5lCvpfHHF3F+h1VbFDMaQwIABB1J2eFtLsqGjBBWfvBxrC mhVSLdhdJ1BZomiWmmcfKOrYOZuZPxdGcgaQd1cPoUgJyBdYIw/3jkqyeHmdaHj6q9 JAegKMiJQwKiQ== Received: from [IPV6:2605:59ca:364f:d400:1b91:6b30:22c2:fffc] (unknown [IPv6:2605:59ca:364f:d400:1b91:6b30:22c2:fffc]) (Authenticated sender: e) by freeshell.de (Postfix) with ESMTPSA id E1702B220FC3; Wed, 2 Dec 2026 09:09:13 +0100 (CET) Message-ID: <485f9dc4-e958-4b7d-ba45-3ae0294c6f01@freeshell.de> Date: Wed, 2 Dec 2026 00:09:05 -0800 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 0/2] riscv: dts: spacemit: mark K1 boot nodes bootph-pre-ram To: Yixun Lan Cc: Hung-Chun Tseng , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, linux-kernel@vger.kernel.org References: <20261024092558.143621-1-alan.tseng.cs@gmail.com> <20261124231909-GKB245721@kernel.org> <311a1481-0849-4865-88f4-636f13c2c6dc@freeshell.de> <20261202023146-GKA26959@kernel.org> Content-Language: en-US From: E Shattow In-Reply-To: <20261202023146-GKA26959@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261202_000945_464904_2988F3E9 X-CRM114-Status: GOOD ( 30.03 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" X-Spam-Status: No, score=-10.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 Hi Yixun, On 12/1/26 18:31, Yixun Lan wrote: > Hi E Shattow, > > On 16:49 Tue 24 Nov , E Shattow wrote: >> Hi Yixun, >> >> On 11/24/26 15:19, Yixun Lan wrote: >>> Hi Hung-Chun, >>> >>> On 17:25 Sat 24 Oct , Hung-Chun Tseng wrote: >>>> On the SpacemiT K1 the BootROM loads the next boot stage into SRAM, and >>>> that stage sets up DRAM. This series marks the nodes it needs for that >>>> bootph-pre-ram: the SoC clocks, UART, boot media and the two I2C buses >>>> in k1.dtsi, and the board EEPROM (which holds the DRAM configuration), >>>> the PMIC rails and the SPI NOR in the board files. >>>> >>>> The vendor confirmed that the BootROM itself does not access the >>>> EEPROM [1]. It is tagged because bootph-pre-ram covers the phase that >>>> sets up SDRAM, and DRAM cannot be trained without it. >>>> >>>> Testing: all K1 DTBs build, and dtbs_check is clean for them with and >>>> without this series. >>>> >>>> I used Claude to help read the U-Boot SPL and the device trees. I >>>> checked the changes and ran dtbs_check myself. >>>> >>>> Changes in v3: >>>> - Reword both commit messages to describe the hardware instead of what >>>> an SPL does, and drop the U-Boot paragraph from patch 1 (E) >>>> - Tag i2c2 in k1.dtsi too, as every K1 board has the EEPROM there >>>> - Tag eeprom@50 on the OrangePi RV2 and R2S, missed in v2 (Sashiko) >>>> - Drop the Assisted-by tags, see commit 1e035297ffda >>>> - Keep E's Reviewed-by on both patches, as the changes are the ones >>>> discussed on v2 >>>> - Link to v2: https://lore.kernel.org/all/20261017180141.3477743-1-alan.tseng.cs@gmail.com/ >>>> >>>> Changes in v2: >>>> - Tag i2c8 in k1.dtsi instead of in every board file (Yixun) >>>> - Rebase onto the spacemit dt-for-next branch >>>> - Link to v1: https://lore.kernel.org/all/20261012235624.77993-1-alan.tseng.cs@gmail.com/ >>>> >>>> [1] https://lore.kernel.org/all/20261021083425-GKA125937@kernel.org/ >>>> >>>> Hung-Chun Tseng (2): >>>> riscv: dts: spacemit: k1: mark boot-critical SoC nodes bootph-pre-ram >>>> riscv: dts: spacemit: mark K1 board boot devices bootph-pre-ram >>>> >>> I'd not put this series on hold, we generally could address other >>> remains of issue/improvement later. so with >>> >>> Reviewed-by: Yixun Lan >> >> With regard to mainline U-Boot use of devicetree-rebasing there is a >> robust method in U-Boot build system for overrides such that we may >> adopt these proposed changes there before they are accepted in Linux. >> > Yes, I'm aware of this, and that's fine by me > >> With changes-requested all addressed for v4 I expect the shape of this >> will be good and it is not holding back anything in Linux kernel. The >> hold is only due having to ask for what the closed-source BootROM is >> doing and waiting for this confirmation now instead of having access to >> see its code directly. There are intellectual property warnings >> published by SpacemiT prohibiting reverse-engineering the BootROM so it >> cannot be expected to proceed any more quickly than asking and waiting >> for a reply. >> > I don't fully understand your concern here, neither bootph-pre-ram nor > the Device Tree will be used by BootROM, there is no dependency between them.. > There should be a confirmed description in device tree of everything that BootROM code is capable of interacting with. Much of it is already there and there is no "bootrom" hint as such to commit to the source tree. BootROM hardware is proprietary so we should prioritize this and get it done while we have access to SpacemiT vendor to answer these questions. Additionally, and not in-place-of, we tag all of these BootROM-adjacent nodes as pre-ram because that is an accurate description for peripherals configured by a SpacemiT K3 SoC BootROM which does not set up DRAM. Logically everything this BootROM touches at runtime is pre-ram hardware. I have made the mistake of describing this in the confusing view of what the SPL could expect: 1. It matters not at all if BootROM *uses* device tree, because *BootROM is hardware*. 2. It also does not matter *what* the initial SPL does actually, be it U-Boot or something else, or if it ever does things that BootROM does not (DRAM setup). 3. The application of bootph-pre-ram is *not limited to* the BootROM-affected configuration. However it is the starting point and we have access to a vendor willing to answer questions, let's do that now and get on with the rest of it. In the theoretical situation of unlimited SRAM and no need for DRAM then I would still want that all the peripherals that BootROM touches described with pre-DRAM hints, and a record of conversation on to the mailing lists or commit log and/or vendor documentation for a clear identification of what is possible to be touched by BootROM just prior to the initial SPL code execution. My concern (summarized) is we should identify clearly all of the potential peripherals, clocks, everything that BootROM might touch, and also as a matter of how this affects Linux source tree to then give this all the pre-DRAM hint for device tree description. >> If you would like to abandon the approach I suggest of considering the >> effects of BootROM peripheral configuration as a hardware environment >> needing device tree description and bootph-pre-ram hints for >> constrained-memory SPL, then that topic can also be discussed. Please be >> clear what your expectations are, thanks! >> > As my knowledge, the bootph-pre-ram property is used by the filtering mechanism > (via fdtgrep) of U-Boot's Device Tree to retain necessary nodes in the SPL phase. > You can check final result spl/u-boot-spl.dtb. > -E _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv