Overlay device tree ignored in extlinux.conf

Hi, I’m trying to add the following overlay below in BeagleY-AI. I’m not very familiar w/ the device tree dts files but I think the file below is correct to setup pps-gpio:

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include "ti/k3-pinctrl.h"

&{/chosen} {
    overlays {
        pps_gpio_kernel = __TIMESTAMP__;
    };
};

&main_pmx0 {
    pps_gpio_pins: pps-gpio-pins {
        pinctrl-single,pins = <
            J722S_IOPAD(0x0024, PIN_INPUT, 7)
        >;
    };
};

&main_gpio0 {
    pps_gpio_node: pps-gpio {
        compatible = "pps-gpio";
        pinctrl-names = "default";
        pinctrl-0 = <&pps_gpio_pins>;
        gpios = <&main_gpio0 27 GPIO_ACTIVE_HIGH>;
        status = "okay";
    };
};

The idea is to setup pps-gpio on a GPIO pin. I added this file into /opt/source/dtb-6.1-Beagle/src/arm64/overlays and ran the build_n_install.sh to compile and copy the files to the boot partition (no errors in compliation as well).

I then edited the /boot/firmware/extlinux/extlinux.conf and modified the last option to:

label microSD (default)
    kernel /Image
    append console=ttyS2,115200n8 root=/dev/mmcblk1p3 ro rootfstype=ext4 resume=/dev/mmcblk1p2 rootwait net.ifnames=0 quiet
    fdtdir /
    fdt /ti/k3-am67a-beagley-ai.dtb
    fdtoverlays /overlays/my-pps-gpio-overlay.dtbo
    #initrd /initrd.img

To add the new overlay into the fdtoverlays option. Now, what is weird is that after rebooting it seems that this overlay is completely ignored, I cannot see it being used, for example:

$ sudo beagle-version | grep UBOOT

UBOOT: Booted Device-Tree:[k3-am67a-beagley-ai.dts]

and also:

$ ls -lah /sys/firmware/devicetree/base/chosen

total 0
drwxr-xr-x  2 root root   0 Feb 17 08:40 .
drwxr-xr-x 33 root root   0 Feb 17 08:39 ..
-r--r--r--  1 root root  24 Feb 17 08:40 base_dtb
-r--r--r--  1 root root  25 Feb 17 08:43 base_dtb_timestamp
-r--r--r--  1 root root 113 Feb 17 08:43 bootargs
-r--r--r--  1 root root   7 Feb 17 08:43 name
-r--r--r--  1 root root  26 Feb 17 08:43 stdout-path
-r--r--r--  1 root root  18 Feb 17 08:43 u-boot,version

So it seems that the overlay is not really being loaded at all. I tried to change the name of the overflay file (dtbo) to a name that doesn’t exists and it also doesn’t give me any error during boot or anything, is that expected ? Thanks !

See pps-gpio.yaml « pps « bindings « devicetree « Documentation - kernel/git/torvalds/linux.git - Linux kernel source tree pps is in the root node …

Regards,

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include "ti/k3-pinctrl.h"

&{/chosen} {
    overlays {
        pps_gpio_kernel = __TIMESTAMP__;
    };
};

&main_pmx0 {
    pps_gpio_pins: pps-gpio-pins {
        pinctrl-single,pins = <
            J722S_IOPAD(0x0024, PIN_INPUT, 7)
        >;
    };
};

&{/} {
    pps {
        compatible = "pps-gpio";
        pinctrl-names = "default";
        pinctrl-0 = <&pps_gpio_pins>;
        gpios = <&main_gpio0 27 GPIO_ACTIVE_HIGH>;
        status = "okay";
    };
};
1 Like

Thanks @RobertCNelson, will give it a try, these GPIO naming conventions are really tricky.