I also tried to build a BB-P9_12-GPIO-00A0.dtso overlay using this dtso as source:
// SPDX-License-Identifier: GPL-2.0-only
/*
* Overlay to configure P9_12 as GPIO output on BeagleBone Black
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/am33xx.h>
/* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/ */
&{/chosen} {
overlays {
BB-P9_12-GPIO-00A0.kernel = __TIMESTAMP__;
};
};
&am33xx_pinmux {
p9_12_gpio_pin: pinmux_p9_12_gpio_pin {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_GPMC_BEN1, PIN_OUTPUT_PULLUP, MUX_MODE7) /* P9_12 as GPIO */
>;
};
};
&ocp {
p9_12_gpio_helper: helper {
compatible = "bone-pinmux-helper";
pinctrl-names = "default";
pinctrl-0 = <&p9_12_gpio_pin>;
status = "okay";
};
};
I can confirm the overlay is loaded at u-boot:
Retrieving file: /extlinux/extlinux.conf
1: Poky (Yocto Project Reference Distro)
Retrieving file: /extlinux/../zImage
append: root=/dev/mmcblk0p2 rootwait rw earlycon console=ttyO0,115200n8,115200 audit=0
Retrieving file: /extlinux/../am335x-boneblack.dtb
Retrieving file: /extlinux/../BB-P9_12-GPIO-00A0.dtbo
Kernel image @ 0x82000000 [ 0x000000 - 0xc04200 ]
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Working FDT set to 88000000
Loading Device Tree to 8ffe2000, end 8fffffff ... OK
Working FDT set to 8ffe2000
Starting kernel ...
But still I cannot toggle the P9_12 (GPIO 28) value:
root@beaglebone:~# gpioget gpiochip0 28
1
root@beaglebone:~# gpioset gpiochip0 28=0
root@beaglebone:~# gpioget gpiochip0 28
1
root@beaglebone:~#