Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 43D3CC6FD1F for ; Sun, 24 Mar 2024 20:58:08 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5250C87D1E; Sun, 24 Mar 2024 21:58:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=manjaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=manjaro.org header.i=@manjaro.org header.b="pfqtixzA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BD9B587D42; Sun, 24 Mar 2024 21:58:05 +0100 (CET) Received: from mail.manjaro.org (mail.manjaro.org [116.203.91.91]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9575987CB1 for ; Sun, 24 Mar 2024 21:58:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=manjaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=dsimic@manjaro.org MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=manjaro.org; s=2021; t=1711313880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xbFs/i8CcAz6/SLQNScTnHK8zBYWEfgPQkJK5WcDHiw=; b=pfqtixzACi3VtxGE13OH22xd4RfEY1HQ6nSmviFJsH0ES/si6sttmTfdC0UVEGk5plDx2w tIgW2riKiiS7TK+NIQ26cbCbAUjQimxlSyOZSIkFCkOIj4XnPQqPyZhMK81EHy7o1+d60Z lWpLoP1aCrZZ/bXmJkHxm8iD6bUt6DtL9RhVID4h6QctYw7guRBPceR+/uJjUuZvmc+qby qSAPjHJPtJYo4xC1fJ0u8SUtCkWZKwaG+xyIjuxpJqVDP6/BYU6AI2+my+Bvfkr1iRK5Wx Hbvc/VT0DvtCT21+17pXddqiYF3VMDH6SCaUBBy+zHASSOyJuo3Sy7zf5HiU9w== Date: Sun, 24 Mar 2024 21:58:00 +0100 From: Dragan Simic To: Jonas Karlman Cc: Kever Yang , Simon Glass , Philipp Tomsich , Tom Rini , Christopher Obbard , Quentin Schulz , u-boot@lists.denx.de Subject: Re: [PATCH v2 3/3] rockchip: spl: Add SPI NOR flash to boot_devices array In-Reply-To: <955522b3-344d-4f11-8ea3-d24cbc9f7f7a@kwiboo.se> References: <20240322205027.3860170-1-jonas@kwiboo.se> <20240322205027.3860170-4-jonas@kwiboo.se> <69ac8183dcf1cc54f51d21b823c1abfa@manjaro.org> <955522b3-344d-4f11-8ea3-d24cbc9f7f7a@kwiboo.se> Message-ID: <9ae8cf4a7aefef78dd1f546fb3290825@manjaro.org> X-Sender: dsimic@manjaro.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Authentication-Results: ORIGINATING; auth=pass smtp.auth=dsimic@manjaro.org smtp.mailfrom=dsimic@manjaro.org 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 On 2024-03-24 18:28, Jonas Karlman wrote: > On 2024-03-24 17:52, Dragan Simic wrote: >> Please see my comments below. >> >> On 2024-03-22 21:50, Jonas Karlman wrote: >>> Add missing boot source id <-> device tree node path mapping for SPI >>> NOR >>> flash on PX30, RK3288, RK3308, RK3368 and RV1126. >>> >>> Signed-off-by: Jonas Karlman >>> --- >>> v2: >>> - New patch >>> --- >>> arch/arm/mach-rockchip/px30/px30.c | 1 + >>> arch/arm/mach-rockchip/rk3288/rk3288.c | 1 + >>> arch/arm/mach-rockchip/rk3308/rk3308.c | 1 + >>> arch/arm/mach-rockchip/rk3368/rk3368.c | 1 + >>> arch/arm/mach-rockchip/rv1126/rv1126.c | 1 + >>> 5 files changed, 5 insertions(+) >>> >>> diff --git a/arch/arm/mach-rockchip/px30/px30.c >>> b/arch/arm/mach-rockchip/px30/px30.c >>> index b4f655fa4b3e..2ec3289d75b7 100644 >>> --- a/arch/arm/mach-rockchip/px30/px30.c >>> +++ b/arch/arm/mach-rockchip/px30/px30.c >>> @@ -19,6 +19,7 @@ >>> >>> const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = { >>> [BROM_BOOTSOURCE_EMMC] = "/mmc@ff390000", >>> + [BROM_BOOTSOURCE_SPINOR] = "/spi@ff3a0000/flash@0", >> >> AFAICT, no PX30-based board contains an SPI chip, but making this >> future-proof perhaps shouldn't hurt. > > The rk3326-odroid-go2 variant of PX30 has a jedec,spi-nor node. Ah, I see, I missed that. Thanks for the clarification. >>> [BROM_BOOTSOURCE_SD] = "/mmc@ff370000", >>> }; >>> >>> diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c >>> b/arch/arm/mach-rockchip/rk3288/rk3288.c >>> index c77c56c1dab5..70cf50029121 100644 >>> --- a/arch/arm/mach-rockchip/rk3288/rk3288.c >>> +++ b/arch/arm/mach-rockchip/rk3288/rk3288.c >>> @@ -28,6 +28,7 @@ DECLARE_GLOBAL_DATA_PTR; >>> >>> const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = { >>> [BROM_BOOTSOURCE_EMMC] = "/mmc@ff0f0000", >>> + [BROM_BOOTSOURCE_SPINOR] = "/spi@ff130000/flash@0", >> >> Using spi2 for a flash chip applies to some RK3288-based boards, but >> AFAICT not to all of them. For example, arch/arm/dts/rk3288-evb.dtsi >> uses spi0 for a flash chip, which in turn translates to >> /spi@ff110000/flash@0. The same also applies to >> arch/arm/dts/rk3288-firefly.dtsi, for example. > > The RK3288 TRM explicitly mention that it can boot from SPI2 CS0. > > Also I can only find jedec,spi-nor reference in rk3288-phycore-som.dtsi > and rk3288-veyron.dtsi, nothing in rk3288-evb.dtsi or > rk3288-firefly.dtsi. Oh, I see now, you're right. I've checked the Firefly-RK3288 schematic and it just exposes the spi0 interface on one of its expansion headers. >>> [BROM_BOOTSOURCE_SD] = "/mmc@ff0c0000", >>> }; >>> >>> diff --git a/arch/arm/mach-rockchip/rk3308/rk3308.c >>> b/arch/arm/mach-rockchip/rk3308/rk3308.c >>> index 27a748327e31..b3ffabc5449a 100644 >>> --- a/arch/arm/mach-rockchip/rk3308/rk3308.c >>> +++ b/arch/arm/mach-rockchip/rk3308/rk3308.c >>> @@ -141,6 +141,7 @@ enum { >>> >>> const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = { >>> [BROM_BOOTSOURCE_EMMC] = "/mmc@ff490000", >>> + [BROM_BOOTSOURCE_SPINOR] = "/spi@ff4c0000/flash@0", >> >> AFAICT, no RK3308-based board contains an SPI chip, and I'm not really >> sure where does /spi@ff4c0000/flash@0 come from. > > RK3308 TRM mention that it can boot from the SFC. And yes there is no > upstream board that currently have a jedec,spi-nor node, it however > have the sfc (spi@ff4c0000) node so this adds correct node path. Hmm, I see no sfc node in any of the arch/arm/dts/rk3308* files? Maybe I'm missing something, but there's also no "ff4c0000" string in the entire arch/arm/dts directory.