Device tree overlay on BBAI-64

Hello,
I am trying to write a devicetree-overlay for BBAI-64. The Hardware is self designed and the issue burns down to getting a led to blink. As an Example I tried to write a overlay just for one of the abot 20 pins I need as a gpio (mode 7);

/dts-v1/;
/plugin/;

/ {
    compatible = "ti,am62x";

    fragment@0 {
        target = <&main_pinctrl>;
        __overlay__ {
            bbai64_gpio_pins: pinmux_bbai64_gpio_pins {
                pinctrl-single,pins = <
                    0x54 0x07  /* P8.03 GPIO0_20*/
                >;
            };
        };
    };

    fragment@1 {
        target = <&main_gpio0>;
        __overlay__ {
            pinctrl-names = "default";
            pinctrl-0 = <&bbai64_gpio_pins>;
            status = "okay";
        };
    };
};

then with dtc to .dtbo an the dtbo-file I moved to
/boot/firmware/overlays

After editing extlinux.conf with the “fdtoverlays”-line reboot and nothing happens.

when I try to modify the pin-state with gpioset 0 20 = 1, bb tells me there is a wrong mapping.

Is there a better way to make pins gpio again?
Thanks

If you check, most of the GPIO have an LED class in the devicetree. You just need an overlay to enable it. It will then appear in /sys/class/led

Check k3-j721e-beagleboneai64-bone-buses.dtsi

You need an overlay to do somting like this (change the label to something you would like) -

&bone_led_P8_40 {
	label = "P8_40";
	status = "okay";
};

what kernel version? uname -r ? what pin number? we’ve patched our device-tree so every ‘header’ pin is automatically a gpio input… so you can use libgpiod to change anything to be an led without ‘any’ overlays.

Regards,

1 Like

Kernel is 5.10.168-Ti-arm64-r118

Now I removed the „overlay-stuff“
With gpioset i can write, but without effect on board. (Voltage stays the same) and on some Pins there is even in sw no effect but no error. I tried various pin numbers, e.g. P8-03, as gpio1 20

The whole thing is for Smart Home, so on the hw there is some Logic to decode the pin State to some ssd relays for different thgings. To get it done, i Need to be able to toggle the gpio-Pins as for leds from cli/python. In the gpioinfo all of my used Pins are „unused - Input - active high“

What do i miss?

Thanks, regards

What commands are you using. Post a snippet of your pin toggle.

this is work i did with the BeagleY-AI with 6.1.x-ti, these change were not backported to the 5.10.x branch… i really recommend 6.6.x-ti for the bbai64 at this point.

Regards,

Thanks for advice.
After updating the Kernel to 6.6. everything works Fine, i am now able to use libgpiod with effect in the hw from cli.

Thank you