How to use the PWM on debian?


Hi, ALL.

Written about the PWM in section “5 Low Speed expansion connector” of “Hardware Manual Bubblegum 96”.

Will can use from Debian?
If can be used, I want to know how to use.

Current situation is as follows:

root@linaro-alip:~# uname -a
Linux linaro-alip 3.10.52-linaro-bubblegum #22 SMP PREEMPT Fri Apr 15 11:21:43 CST 2016 aarch64 GNU/Linux

“pwm” is not in /sys/class directory.

root@linaro-alip:~# ls /sys/class/
adf dvb input owl_panel scsi_disk udc
backlight firmware lcd power_supply scsi_host vc
bdi gpio leds ppp sound video4linux
block graphics mdio_bus rc spi_master vtconsole
bluetooth hidraw mem regulator switch xt_idletimer
bsg hwmon misc rfkill thermal
dma i2c-adapter mmc_host rtc timed_output
drm ieee80211 net scsi_device tty

But, /sys/devices directory is a “e01b0000.pwm”.

root@linaro-alip:~# ls /sys/devices/
breakpoint e0278000.imx
cpu e0280000.vde
e00f1000.interrupt-controller e0288000.vce
e0100000.owl-audio-i2s e02b0000.usb
e0124000.uart e02c0000.usb
e012a000.uart e0300000.nand
e012e000.power-domain e0308000.nand
e0130000.thermal e0330000.mmc
e0130010.thermal e0334000.mmc
e0160000.clock-controller e0338000.mmc
e01600a8.reset-controller e040cd00.owl_dwc3
e0170000.i2c e040cd0c.usb2phy
e0172000.i2c e040cf00.usb3phy
e0174000.i2c e0600000.gpu
e0176000.i2c flashlight.5
e0178000.i2c framebuffer.7
e01b0000.gpioa gpio-regulator.11
e01b0000.gpiob ion_config.4
e01b0000.gpioc isp-sensor.6
e01b0000.gpiod monitor.9
e01b0000.gpioe owl_usb_config.10
e01b0000.gpiof platform
e01b0000.interrupt-controller pmu.2
e01b0000.pinctrl psci.0
e01b0000.pwm software
e0228000.timer system
e0230000.hde timer.1
e0250000.hdmi tracepoint
e0260000.dma-controller virtual
e0270000.isp wifi_bt_power_ctl.8

I feel PWM is can use.



There is a PWM driver for the bubblegum-96 (originally intended to control the backlight) which might work on the LS connector (I’ve not got any idea what pins it is connected to on the SoC).

However the kernel used on this board (derived from v3.10) does not provide access to the PWM from userspace. To gain access to it you will would need to backport the kernel patches that provide the PWM sysfs interface. See .


Hi, danielt.

Thanks for reply.
I will try the method taught.