Need help with FDT overlay
Matwey V. Kornilov
matwey.kornilov at gmail.com
Sat Mar 21 18:20:37 CET 2026
I compile dtbo as the following;
cpp -x assembler-with-cpp -I /home/matwey/lab/linux/include
overlay.dtso overlay.i
dtc -@ -O dtb -o overlay.dtbo overlay.i
Decompiled overlay.dtbo looks like this:
/dts-v1/;
/ {
fragment at 0 {
target = <0xffffffff>;
__overlay__ {
status = "okay";
};
};
fragment at 1 {
target = <0xffffffff>;
__overlay__ {
status = "okay";
};
};
fragment at 2 {
target-path = "/";
__overlay__ {
i2c-gpio {
compatible = "i2c-gpio";
sda-gpios = <0xffffffff 0x08 0x00 0x06>;
scl-gpios = <0xffffffff 0x08 0x0f 0x06>;
i2c-gpio,delay-us = <0x02>;
#address-cells = <0x01>;
#size-cells = <0x00>;
status = "okay";
phandle = <0x01>;
};
};
};
__symbols__ {
i2c_gpio = "/fragment at 2/__overlay__/i2c-gpio";
};
__fixups__ {
i2c0 = "/fragment at 0:target:0";
i2c1 = "/fragment at 1:target:0";
pio = "/fragment at 2/__overlay__/i2c-gpio:sda-gpios:0",
"/fragment at 2/__overlay__/i2c-gpio:scl-gpios:0";
};
};
I am not sure about the size. How do I check it correctly? Now, I just do
fdt resize 16384
сб, 21 мар. 2026 г. в 18:02, Simon Glass <sjg at chromium.org>:
>
> Hi Matwey,
>
> On Sat, 21 Mar 2026 at 06:55, Matwey V. Kornilov
> <matwey.kornilov at gmail.com> wrote:
> >
> > Hello,
> >
> > I am running U-boot 2026.01 with orangepi_zero2w config and I am
> > trying to apply my hand-written dtbo via fdt apply.
> > The issue is that the fdi apply command just hangs forever for me. The
> > issue only appears when I try to append a new node to the root. How
> > could I find what is going wrong here?
> >
> > The overlay source is the following:
> >
> > /dts-v1/;
> > /plugin/;
> >
> > #include <dt-bindings/i2c/i2c.h>
> > #include <dt-bindings/gpio/gpio.h>
> >
> >
> > &i2c0 {
> > status = "okay";
> > };
> >
> > &i2c1 {
> > status = "okay";
> > };
> >
> > &{/} {
> > i2c_gpio: i2c-gpio {
> > compatible = "i2c-gpio";
> > sda-gpios = <&pio 8 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; // PI0 (29)
> > scl-gpios = <&pio 8 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; // PI15 (31)
> > i2c-gpio,delay-us = <2>; /* ~100 kHz */
> > #address-cells = <1>;
> > #size-cells = <0>;
> > status = "okay";
> > };
> > };
> >
>
> Can you provide thte dtc command you are using to build this? Is there
> enough spare space in the dtb? I'm not sure what would cause it to
> hang.
>
> Regards,
> Simon
--
With best regards,
Matwey V. Kornilov
More information about the U-Boot
mailing list