How to get working PWM on Jetson TX1

I am trying to get a working PWM on the TX1 from using the available pwm-0 and pwm-2 as shown:
cat /sys/kernel/debug/pwm
pwm-0 ((null) ):
pwm-1 (pwm-regulator ): requested enabled
pwm-2 ((null) ):
pwm-3 (pwm-fan.34 ): requested enabled

However the pins are configured for DISPLAYA and RSVD respectively instead of PWM0 and PWM1 as shown on the Tegra TX1 TRM Document, see RESET value. On the jetson TK1 the RESET values were the PWM so they didn’t need configuring.

9.15.125 PINMUX_AUX_LCD_BL_PWM_0
Offset: 0x31fc | Read/Write: R/W | Reset: 0x00000074 (0bxxxxxxxxxxxxxxxxxxx00xx001110100)

BIT RESET Description
1:0 DISPLAYA PM: 0=DISPLAYA, 1=PWM0, 2=SOR0, 3=RSVD3

9.15.144 PINMUX_AUX_GPIO_PE6_0
Offset: 0x3248 | Read/Write: R/W | Reset: 0x00000074 (0bxxxxxxxxxxxxxxxxxxx00xx001110100)

BIT RESET Description
1:0 RSVD0 PM: 0=RSVD0, 1=I2S5A, 2=PWM2, 3=RSVD3

How does one configure the PINMUX registers to use the PWM?
I don’t see any files related to the pinmux on arch/arm/mach-tegra.

Any ideas how to get PWM working?

Thanks and Happy Thanksgiving!

Hello,
Pinmux can be configured in DTS. You can check kernel/arch/arm64/boot/dts/tegra210-platforms/tegra210-jetson-cv-pinmux-p2597-2180-a00.dtsi.

br
ChenJian

i cant find kernel/arch/arm64/boot/dts/tegra210-platforms/tegra210-jetson-cv-pinmux-p2597-2180-a00.dtsi.
directory

I see that file in the kernel for R23.2 and R24.2 (I didn’t check others). Which kernel source are you using?

3.10.67-g458d45v

This looks like you are using the R23.2 kernel (one typo, it is actually 3.10.67-g458d45c). That kernel does have “arch/arm64/boot/dts/tegra210-platforms/tegra210-jetson-cv-pinmux-p2597-2180-a00.dtsi”.

only makefile exist
in /usr/src/linux-headers-3.10.67…/arch/arm64/boot/dts

Where did you download the kernel from?

Assuming R23.2, see:
[url]https://developer.nvidia.com/embedded/linux-tegra-r232[/url]
Within that page, find “Kernel sources”: [url]https://developer.nvidia.com/embedded/dlc/l4t-23-2-kernel-sources[/url]

This should have the files you are missing.