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 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 551FAC7EE29 for ; Sat, 10 Jun 2023 11:58:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6BC90847D6; Sat, 10 Jun 2023 13:58:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.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; secure) header.d=mailbox.org header.i=@mailbox.org header.b="SOz0j/Kt"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="RGvP8pTQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D3001855BA; Sat, 10 Jun 2023 13:58:40 +0200 (CEST) Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [IPv6:2001:67c:2050:0:465::102]) (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 69E9F847C3 for ; Sat, 10 Jun 2023 13:58:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.vasut@mailbox.org Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4Qdc0t21q0z9sdP; Sat, 10 Jun 2023 13:58:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1686398318; 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=4s4BdsSrGeuPtgpNQvybThUF251412Yw9SPwZFJKb7Q=; b=SOz0j/KtUETl9M8D0+R6c7PDi/td8eUMUek5jugwQfrG0Sbbm4I5X5tqHrlncCWwRWLWR1 Sf5v6TheZ04YwPqLMfQZBE88Kz9DRb/eMAPKCzu+QZLXd3AVlENJvqteFinXZn6xmBCiug f4HPQpY5isbeUxREEqdppkNrZwPWiBqSXpfB7YqurweCqw/i9M2ezeRWdHZDN4j1r3Ns+M iuSqJrY9cdjHzScSubs1Yo+z1MB5DgLAuIYhBvs6HRVSyXPtkGJ0nND/SYbaEuj+k8eCzA JqykhXLFiDGimZ1aCNvAf8Dc/+MproJ6KFQlgZxrcIxAYlKMRmZU/fCSqoNy4A== Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1686398316; 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=4s4BdsSrGeuPtgpNQvybThUF251412Yw9SPwZFJKb7Q=; b=RGvP8pTQLo40f9LSXCcB3ZwKHnBGLW1Y3I9To6we55cOFdCIhHrgPrhf3gPfaJk2nxTh7s 1aazIraoMBQ0o+fYTFaUXWTsexjquizgjvt+PheepJUYAzbk1tUgh9fmNpcSUCKCBlz62w qDxkAjdinhrLztu8OjdGB7x1p+9/ZQbzMtVSUWQBw29fNzGSkYq/fpe4f2QBOJ2UHgUePn zIblBRCYiy5Makjk9x+XTb1I65L9aqtWAGypE/GGQJHtzsrTKnkcnBE4OULUz4l6JC1Cll USyi0kZYMvye3F2SrEUtlef7Gxj9VKEvF7WJLs/HWXYwHfxZ08QBSASFoPwwSw== Date: Sat, 10 Jun 2023 13:58:35 +0200 MIME-Version: 1.0 Subject: Re: [PATCH 2/2] renesas: rcar3: Load the correct device tree Content-Language: en-US To: Detlev Casanova , u-boot@lists.denx.de Cc: Marek Vasut , Hai Pham , Tam Nguyen References: <20230609160016.128417-1-detlev.casanova@collabora.com> <20230609160016.128417-3-detlev.casanova@collabora.com> From: Marek Vasut In-Reply-To: <20230609160016.128417-3-detlev.casanova@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-MBO-RS-META: fjkwuifw889e4mdps7eetkq96ki59umg X-MBO-RS-ID: 7ca496cbae2f2787466 X-Rspamd-Queue-Id: 4Qdc0t21q0z9sdP 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 6/9/23 18:00, Detlev Casanova wrote: > The Renesas R-Car Gen3 H3e (Starter Kit Premier) uses a different > device tree than the default one. > > This uses the sysinfo's board id to determine if the board needs a > specific device tree. > > Signed-off-by: Detlev Casanova > --- > board/renesas/ulcb/ulcb.c | 34 ++++++++++++++++++++++++++++++++++ > configs/rcar3_ulcb_defconfig | 1 + > 2 files changed, 35 insertions(+) > > diff --git a/board/renesas/ulcb/ulcb.c b/board/renesas/ulcb/ulcb.c > index 1477750f921..3e2fe3a3ca9 100644 > --- a/board/renesas/ulcb/ulcb.c > +++ b/board/renesas/ulcb/ulcb.c > @@ -28,6 +28,8 @@ > #include > #include > > +#include "../../../drivers/sysinfo/rcar3.h" > + > DECLARE_GLOBAL_DATA_PTR; > > #define DVFS_MSTP926 BIT(26) > @@ -65,6 +67,38 @@ int board_init(void) > return 0; > } > > +int misc_init_r(void) > +{ > + struct udevice *dev; > + int board_id; > + int ret = sysinfo_get(&dev); > + if (ret) { > + debug("Cannot get sysinfo: %d\n", ret); > + return 0; > + } > + > + ret = sysinfo_detect(dev); > + if (ret) { > + debug("Cannot detect sysinfo: %d\n", ret); > + return 0; > + } > + > + ret = sysinfo_get_int(dev, > + SYSINFO_ID_BOARD_MODEL, > + &board_id); > + > + if (ret) { > + debug("Cannot get sysinfo int: %d\n", ret); > + return 0; > + } > + > + if (board_id == BOARD_STARTER_KIT_PRE) { > + env_set("fdtfile", "renesas/r8a779m1-ulcb.dtb"); About this, BOARD_STARTER_KIT_PRE is just H3 ULCB . I suspect the ID is the same on H3e ULCB ? I think we need some other method to discern the two board variants. Here is the sysinfo EEPROM from H3 ULCB: CPU: Renesas Electronics R8A7795 rev 2.0 Model: Renesas Starter Kit Premier board rev 2.0 DRAM: 896 MiB (effective 3.9 GiB) ... => i2c dev 7 ; i2c md 0x50 0 0x80 Setting bus to 7 0000: 8e 17 52 5d e6 e6 b1 35 e4 e4 e4 e4 35 20 20 0a ..R]...5....5 . 0010: f4 f4 44 44 f4 f4 44 44 44 44 f4 f4 f4 4f 01 52 ..DD..DDDD...O.R 0020: 52 52 52 53 51 4f 4d 01 52 53 60 00 00 00 00 00 RRRSQOM.RS`..... 0030: 00 00 11 00 01 2d ff ff ff ff ff ff ff ff ff ff .....-.......... 0040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 0050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 0060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 0070: 5a ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff Z............... Can you dump and share the H3e ULCB EEPROM content ?