How enable pwm '/sys/class/pwm' on BeagleBone Black?

This is custom kernel 5.13

when we call “ls /sys/class/pwm”, there is nothing in this folder

In defconfig, we already enabled:

CONFIG_EMBEDDED=y
CONFIG_EXPERT=y
CONFIG_PWM=y
CONFIG_SYSFS=y
CONFIG_PWM_SYSFS=y
CONFIG_PWM_OMAP_DMTIMER=y
CONFIG_PWM_PCA9685=y
CONFIG_PWM_TIECAP=y
CONFIG_PWM_TIEHRPWM=y

One problem here is, when we “make savedefconfig”, the generated .config file has no

CONFIG_SYSFS
CONFIG_PWM_SYSFS

Is this reason why I don’t have PWM? if so how I added this? The depend flags are still on output config
CONFIG_EMBEDDED=y
CONFIG_EXPERT=y
CONFIG_PWM=y

So I am not sure why CONFIG_SYSFS and CONFIG_PWM_SYSFS are gone.

I use config-pin to set P9_14 to pwm already.

many thank

Did you export the pin (0 or 1) under /sys/class/pwm/*

Regards,

Hi Robert,
The problem was “/sys/class/pwm” folder is empty,

I just got pwm working.

In device tree I enable eqep, epwmss, ehrpwm status=“okay”. I didn’t know they are disable as default.

Many thanks,