Device tree overlays in 5.14

Kernel, Main, Utilities & Applications, Miscellaneous Devices.
foft
Posts: 334
Joined: Thu Dec 03, 2020 11:05 am
Has thanked: 29 times
Been thanked: 120 times

Device tree overlays in 5.14

Unread post by foft »

Hi,

I was applying a device tree overlay in kernel 4.19 by mounting configfs, upon which I'd see the device-tree. After upgrading to 5.14 I no longer see this, does anyone know how to do the same thing in 5.14?

Is there a new system to provide configuration to custom modules in Linux 5?

Thanks,

Mark
foft
Posts: 334
Joined: Thu Dec 03, 2020 11:05 am
Has thanked: 29 times
Been thanked: 120 times

Re: Device tree overlays in 5.14

Unread post by foft »

Looks like I need the module linked here:
https://stackoverflow.com/questions/508 ... e-overlays
foft
Posts: 334
Joined: Thu Dec 03, 2020 11:05 am
Has thanked: 29 times
Been thanked: 120 times

Re: Device tree overlays in 5.14

Unread post by foft »

Still struggling to make this work.
The .dts override I had before no longer works. I did manage to apply it but seems to be an issue with how the references work. So I need to reference intc, previous I added an intc block. That needs to no longer work and the right was is to using /plugin/;. However that fails to find intc when I apply the overlay.

One possible lead: Was the dts in the kernel compiled using -@ on the command line?

./dtc -O dtb -o /lib/firmware/minimig.dtbo -@ -b 0 ./minimig.dts
cp /lib/firmware/minimig.dtbo /sys/kernel/config/device-tree/overlays/minimig/dtbo
echo 1 > /sys/kernel/config/device-tree/overlays/minimig/status

359.342349] OF: resolver: no symbols in root of device tree.
[ 359.348096] OF: resolver: overlay phandle fixup failed: -22
[ 359.353711] dtbocfg_overlay_item_create: Failed to apply overlay (ret_val=-22)

Code: Select all

/dts-v1/;
/plugin/;
/{
fragment@0 {
  target-path = "/";
  __overlay__ {
        minimig_irq {
          compatible = "minimig_irq";
          interrupt-parent = <&intc>;
          interrupts = <0 42 1>;
        };
  };
};
};
foft
Posts: 334
Joined: Thu Dec 03, 2020 11:05 am
Has thanked: 29 times
Been thanked: 120 times

Re: Device tree overlays in 5.14

Unread post by foft »

Managed to work around by using an explicit interrupt-parent, it complains then works!

Code: Select all

/dts-v1/;
/plugin/;
/{
fragment@0 {
  target-path = "/";
  __overlay__ {
        minimig_irq {
          compatible = "minimig_irq";
          interrupt-parent = <0x02>;
          interrupts = <0 42 1>;
        };
  };
};
};

User avatar
LamerDeluxe
Top Contributor
Posts: 1160
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 798 times
Been thanked: 257 times

Re: Device tree overlays in 5.14

Unread post by LamerDeluxe »

Thanks for documenting your progress here!
Post Reply