There is very little information how to configure the Beaglebone for PWM on newer versions of the kernel. Past instructions for interfacing with PWM through the slots file are obsolete, as the slots file and bone_capemgr are disabled in v4.14 of the kernel.
How do I configure PWM for BeagleBone Black with the new kernel? I am using a TI AM335x BeagleBone Black Wireless running kernel version 4.14.37-ti-r46.
As mentioned in the question, the slots file and bone_capemgr are disabled in v4.14 of the kernel in favor of U-Boot overlays.
As explained in a response by the BeagleBone kernel developer, U-Boot now handles the overlays and automatically enables the equivalent of
cape_enable=bone_capemgr.enable_partno=univ-all,BB-ADC,BB-PWM0,BB-PWM1,BB-PWM2
:Therefore, the PWM interface is already configured! Now just export and use the PWM. For example to access pwm0:
Note: you might need to disable HDMI with
disable_uboot_overlay_video=1
in/boot/uEnv.txt
if the pins are already in use.To determine the pin mapping for the PWM interfaces, see my follow-up post PWM chip to pin mapping on BeagleBone Black (v4.14).