Jump to content

[Armbian build PR] - PWM fan fix for tegra


RSS Bot

Recommended Posts

Description

Fixing PWM Fan support for NVIDIA Jetson Nano builds based on current (5.19.16-media) and edge (6.0.2-media) kernels.

Problem description The problem is that the default parent clock for the PWM on Tegra210 is a 32kHz clock and is unable to support the requested PWM period.

Error from dmesg

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd071]
[    0.000000] Linux version 5.19.16-media (root@ubuntu) (aarch64-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) 8.3.0, GNU ld (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) 2.32.0.20190321) #trunk SMP PREEMPT Sat Oct 15 13:58:05 UTC 2022
[    0.000000] Machine model: NVIDIA Jetson Nano Developer Kit
[    5.819368] pwm-fan pwm-fan: Failed to configure PWM: -22
[    5.828309] pwm-fan: probe of pwm-fan failed with error -22

Patch Kernel Driver Fix PWM support on Tegra20, Tegra30, Tegra114, Tegra124 and Tegra210 by updating the parent clock for the PWM to be the PLL_P.

Applying upstream patch from: https://patchwork.ozlabs.org/project/linux-tegra/patch/20221010100046.6477-1-jonathanh@nvidia.com/

How Has This Been Tested?

  1. Tested on a NVIDIA Jetson Nano

  2. Patch copied to build/userpatches/kernel/media-current build/userpatches/kernel/media-edge

  3. CURRENT: Armbian_22.11.0-trunk_Jetson-nano_bullseye_current_5.19.16 ./compile.sh BOARD=jetson-nano BRANCH=current RELEASE=bullseye BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no COMPRESS_OUTPUTIMAGE=sha,gpg,img

  4. EDGE: Armbian_22.11.0-trunk_Jetson-nano_bullseye_edge_6.0.2 ./compile.sh BOARD=jetson-nano BRANCH=edge RELEASE=bullseye BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=no COMPRESS_OUTPUTIMAGE=sha,gpg,img

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] Any dependent changes have been merged and published in downstream modules

View the full article

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines