I've been searching the web on how to use pwm (pulse-width modulation) on the beaglebone black. All I found was people thinking of archlinux as not build for it, and returned to the linux that ship with the bbb. They thought that dtc (device-tree compiler) needed to be patch and installed and a patched kernel should be build. And not just on this forum but by googling too.
Since arch is my favorite distro I search and try a few things (because I didnt know anything about device-tree) and I finally made it! And its easy.
If you try this :
http://elinux.org/EBC_Exercise_13_Pulse_Width_Modulation
it works, but for one exception: the pin muxing. The base of everything is the userspace driver, pwm_test. No need to rebuild the kernel, just download the source file, and build it as a module. Here is the source file and a makefile to build it :
https://github.com/medivhok/beaglebone_black_pwm.git
It's in the pwm_test directory.
After building and installing the driver, sysfs way of doing it will works (first link above) and the pin muxing too. If you want to write device-tree overlay, all you need to do after installing the driver is installing dtc-git-patched
https://aur.archlinux.org/packages/dtc-git-patched/
and build it with
$this->bbcode_second_pass_code('', 'makepkg --asroot -Acs')
So finally, build a driver, (and build an aur package to compile device-tree overlay), all done in a few minutes. This is all it takes to use pwm on the beaglebone with Archlinux.
Just wanted to share this with you all

Medivhok