]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rpi: Copy eth PHY address from fw DT to loaded DT
authorAntoine Mazeas <antoine@karthanis.net>
Fri, 19 Aug 2022 08:56:46 +0000 (10:56 +0200)
committerPeter Robinson <pbrobinson@gmail.com>
Tue, 14 Mar 2023 12:12:13 +0000 (12:12 +0000)
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 <antoine@karthanis.net>
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
board/raspberrypi/rpi/rpi.c

index d4b059c62040f8734c0e1788386ebfbe3d6a0f2d..fc1fffedfb7df52e2195531043e5b6ffed24cef5 100644 (file)
@@ -547,6 +547,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)