RPI CM4 - I2C BUS and Device Tree
Simon Glass
sjg at chromium.org
Sat Aug 17 17:57:25 CEST 2024
+Peter Robinson
+Matthias Brugger
Hi Romain,
On Sat, 17 Aug 2024 at 07:01, Romain Crausaz <crausaz.romain at gmail.com> wrote:
>
> Hi all,
>
>
>
> I am currently facing an issue with U-Boot and a raspberry pi CM4. Here is
> the setup:
>
>
>
> 1. Yocto Scarthgap
>
> 2. U-Boot 2024.01
>
> 3. rpi_arm64_defconfig
>
>
>
> I am trying to access the i2c bus from U-Boot. I have been trying to modify
> the device tree which is referenced as
> “CONFIG_DEFAULT_DEVICE_TREE="bcm2711-rpi-4-b”” in the defconfig without
> success. I can remove everything, set all nodes to disabled and I see no
> change in U-Boot (I am using dm commands to check the status of the
> peripherals).
>
>
>
> It seems that with the rpi, U-Boot will only configure itself against the
> device tree passed by the bootloader of RPI. Could someone confirm this ?
Yes. It isn't quite obvious, but this is a clue:
Core: 211 devices, 16 uclasses, devicetree: board
'board' means that the board can do whatever it wants.
>
>
>
> Is there a way to configure / modify U-Boot to use its own devicetree and
> simply pass the device tree generated by the rpi bootloader to the kernel ?
>
>
>
> Because the second issue is that the i2c driver defined in the device tree
> passed to u-boot is not available in u-boot.
>
>
>
> Thanks for your help
Since OF_HAS_PRIOR_STAGE is a hidden option, you cannot disable it in
the defconfig. The only way I know of is to comment out the 'imply
OF_HAS_PRIOR_STAGE' in ARCH_BCM283X in arch/arm/Kconfig
For me, that stops the rpi_4 booting, so perhaps the devicetree is
out-of-date or ft_board_setup() is doing something strange, or
something else. The in-tree devicetree may have got out-of-date, so
perhaps use the Linux one.
Regards,
Simon
More information about the U-Boot
mailing list