Jetson TK1 PWM output

At it is said that one can play with PWM output via sysfs.

It says PWM_SYSFS option has to be enabled in kernel configuration.
However I can’t find such option in L4T 19.3.

Any clues about this?

I do not see CONFIG_PWM_SYSFS in my R19.3. There are a number of PWM options, just grep your kernel config file for PWM. I see these enabled already:


I’m thinking one of two things about CONFIG_PWM_SYSFS: (a) Something in a SYSFS config needs to be enabled for it to show up, or (b) it’s and older, deprecated feature my R19.3 does not have. Recursive grep of the entire source tree did not mention this config…but when that article was written, Jetson arrived on R19.2.

Looks like PWM_SYSFS was not in 3.10:

But is in 3.11:

It’s not mentioned in 19r3 kernel either (3.10.24) so it doesn’t seem to be backported there and I guess the wiki page is wrong then.

Not sure how big effort it would be to backport the patch.

Hum, that’s right. I guess that page is referring to upstream/mainline linux kernel then. Thanks.

I’m trying to output a clock signal to a GPIO pin (actually CAM1_MCLK).
Can anyone tell me the easiest or/and the more correct way to do it?

i have question? which pin is configured as PWM output?

Maybe, none yet… Maybe one has configure something in device tree or pinmux…

But I guess it is possible since Tegra K1 has 4 PWM…

Ok thanks!

You guys can try using Santyago’s “Grinch” kernel, it already has CONFIG_PWM_SYSFS and a bunch of other useful things added to the kernel, that we will probably add to the official L4T kernel eventually:

NVIDIA has verified earlier that PWM works on Jetson TK1, but CONFIG_PWM_SYSFS is disabled by default. The PWM pins don’t get assigned to other functions by default, so enabling CONFIG_PWM_SYSFS is a perfectly safe thing to do, and thus we will enable it in future versions of L4T now that we realize it should have been enabled.

(I’m sure you guys have noticed that many features are disabled in L4T by default when they could have been enabled, such as PWM, Wifi, Bluetooth, etc. Basically, the L4T team had to get the kernel ready for Jetson TK1 as soon as possible and thus disabled anything not required for aerly release. Now that the early releases are done, they are ready to start considering which Linux features to start adding back to L4T. Santyago’s Grinch kernel actually looks like a good list of features we will add to L4T after we have done tests to ensure they don’t cause instabilities, etc)

PS: If you guys weren’t already aware, there is some PWM documentation in the kernel file “Documentation/ABI/testing/sysfs-class-pwm”


I am new to Tegra board bring up; by all trial and error, I am able to bring up the board with Kernel L4T 21.4

We have enabled the SPI by going through–Part-3-Configuring-SPI-in-the-device-tree.aspx

I tried to to enable the pwm modules by looking at the examples and removing the GPIO pins as well us adding the pinmux pwm0, pwm2 and pwm3 as told in

I also tried to run “cat /sys/kernel/debug/pwm”

platfor/tegra-pwm, 4 PWM devices
pwm-0 (sysfs ): requested enabled
pwm-1 (pwm-backlight ): requested
pwm-2 ((null) ):
pwm-3 ((null) ):

however when I connect scope on pin 49 in J3A2; I do not see any wave form

Please help me to figure this out.

Thanks in Advance