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 A55E0C32771 for ; Fri, 19 Aug 2022 14:08:58 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 374DE84BEA; Fri, 19 Aug 2022 16:06:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=karthanis.net 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=karthanis.net header.i=@karthanis.net header.b="4UQu5kRm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0E0BE84A2C; Fri, 19 Aug 2022 10:57:51 +0200 (CEST) Received: from smtp-42a8.mail.infomaniak.ch (smtp-42a8.mail.infomaniak.ch [84.16.66.168]) (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 B285684A33 for ; Fri, 19 Aug 2022 10:57:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=karthanis.net Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=antoine@karthanis.net Received: from smtp-3-0000.mail.infomaniak.ch (unknown [10.4.36.107]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4M8FyN2wqbzMq0p1; Fri, 19 Aug 2022 10:57:48 +0200 (CEST) Received: from localhost.localdomain (unknown [88.168.170.86]) by smtp-3-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4M8FyN0531zlrKd5; Fri, 19 Aug 2022 10:57:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=karthanis.net; s=20191114; t=1660899468; bh=iF2HiR7XjJkX252Otqz1qJ3jbFLgbInY+oOOBrxVzbw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=4UQu5kRmpFnbQR5rPJc2uz5WOGEe2WEi3OMxGYPPwahGU5EzF3T2Md3RJcwwReyHb qlCmPsqFWl3qHZqnDhqxkRB/IFlurTTaQpNxQUxgll34Ooawl0TqBXFCn58yk+Nb/J LuoHzyFo6lSZxXOm1H026eOBIacv6IMNwcMpQgZ4= From: Antoine Mazeas To: u-boot@lists.denx.de Cc: Matthias Brugger , Antoine Mazeas Subject: [RESEND PATCH 2/2] rpi: Copy eth PHY address from fw DT to loaded DT Date: Fri, 19 Aug 2022 10:56:46 +0200 Message-Id: <20220819085646.341575-3-antoine@karthanis.net> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819085646.341575-1-antoine@karthanis.net> References: <20220819085646.341575-1-antoine@karthanis.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 19 Aug 2022 16:06:11 +0200 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.6 at phobos.denx.de X-Virus-Status: Clean Some Raspberry Pi 400 boards, specifically rev 1.1, have a different address for the ethernet PHY device than what is provided by the kernel DTB. The correct address is provided by the firmware, so we should carry it over into the loaded device tree so that ethernet works on such boards. Signed-off-by: Antoine Mazeas --- board/raspberrypi/rpi/rpi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index 28b6f52506..793fd1aa30 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -548,6 +548,9 @@ void update_fdt_from_fw(void *fdt, void *fw_fdt) /* kernel address randomisation seed as provided by the firmware */ copy_property(fdt, fw_fdt, "/chosen", "kaslr-seed"); + + /* address of the PHY device as provided by the firmware */ + copy_property(fdt, fw_fdt, "ethernet0/mdio@e14/ethernet-phy@1", "reg"); } int ft_board_setup(void *blob, struct bd_info *bd) -- 2.37.2