Search code examples
raspberry-pi

Adding Device Tree Overlay on RaspberryPi3B+


I have a issue by adding a device tree overlay.
I got this error during boot: "Unable to merge overlay: err:11" (printed in /sys/firmware/device-tree....)
My device-tree gpio_overlay.dts look like this:

/dts-v1/;
/plugin/;

#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>

/* Overlay for configuring the gpio pins */

/{
    compatible = "brcm,bcm2835";

    fragment@0 {
        target = "/";
        __overlay__ {
            input_sensor_line1: input_sensor_line1 {
                compatible = "input_sensor,sensor_line1";
                interrupts = <17 IRQ_TYPE_EDGE_BOTH>;
                interrupt-parent = <&gpio>;
                input_line1-gpios = <&gpio 17 GPIO_PULL_DOWN>;
                status = "okay";
            };
        };
    };
};

I also set the dtoverlay in the /boot/config.txt

  • dtoverlay= gpio_overlay

and copied my compiled overlay gpio_overlay.dtbo into /boot/overlays
My image for the raspberrypi is based on meta-raspberrypi (kirkstone)
Does anyone know what I am doing wrong ?

Thanks..


Solution

  • ok I solved it with target-path = "/" instead of target = "/"