I had a system running on beaglebone 4.14, where I created for pwm interfaces via
config-pin p8.34 pwm #PWM1B
config-pin p8.36 pwm #PWM1A
config-pin p8.45 pwm #PWM2A
config-pin p8.46 pwm #PWM2B
I would find the devices under
/sys/class/pwm/pwmchip3/pwm3:0
/sys/class/pwm/pwmchip3/pwm3:1
and
/sys/class/pwm/pwmchip6/pwm6:0.
/sys/class/pwm/pwmchip6/pwm6:1.
Now I do not find these things, while config-pins from bbb-pin-utils shows they are there:
P8.45 / hdmi / sysboot 0 40 fast rx down 3 pwm 2 out A ocp/P8_45_pinmux (pinmux_P8_45_pwm_pin)
P8.46 / hdmi / sysboot 1 41 fast rx down 3 pwm 2 out B ocp/P8_46_pinmux (pinmux_P8_46_pwm_pin)
P8.36 / hdmi / sysboot 10 50 fast rx down 2 pwm 1 out A ocp/P8_36_pinmux (pinmux_P8_36_pwm_pin)
P8.34 / hdmi / sysboot 11 51 fast rx down 2 pwm 1 out B ocp/P8_34_pinmux (pinmux_P8_34_pwm_pin)
How do I work with these pwm settings via the old way like:
I had a look at Pulse Width Modulation (PWM) interface — The Linux Kernel documentation, to see if I could find something there, but looking there creates more confusion: /sys/class/pwm/pwmchip3 used to have 2 channels, if I ask the number of pwm channels via cat /sys/class/pwm/pwmchip3/npwm , I only get one channel.
(I’v been scratching some of my now scarcer getting hairs where to look)
In order to save your hairs, perhaps you’ll have to look at libpruio. PWM since version 0.2, no major changes since Oct 2014 (just further lines added). Currently 20 PWM output pins/lines on BBB, and you can synchonize the PWM_SS if need be.
Perhaps you want to reorder your priorities. libpruio doesn’t use sysfs, except for one single call in the CTOR (in order to respect existing CPU ball claims). And even that single sysfs call causes problems on different kernel versions (covered by libpruio, the user doesn’t see them).