Update R35.5 and pwm-fan disappear

Hi, when I update our custom board using Xavier NX R35.3.1 to R35.5. it seems the pwm-fun node can not regist and jtop can not use as well. But in our old version, jtop can work successfully.
it shows these information in dmesg


[    2.354835] FAN dev name: pwm-fan
[    2.357440] ------------[ cut here ]------------
[    2.361701] invalid GPIO -517
[    2.364718] WARNING: CPU: 0 PID: 1 at drivers/gpio/gpiolib.c:122 gpio_to_desc+0xb4/0x100
[    2.372612] Modules linked in:
[    2.376024] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.10.192-tegra #4
[    2.382586] Hardware name: NVIDIA Jetson Xavier NX Developer Kit (DT)
[    2.389411] pstate: 60800009 (nZCv daif -PAN +UAO -TCO BTYPE=--)
[    2.395199] pc : gpio_to_desc+0xb4/0x100
[    2.399126] lr : gpio_to_desc+0xb4/0x100
[    2.403324] sp : ffff80001003ba40
[    2.406735] x29: ffff80001003ba40 x28: 00000000fffffdfb
[    2.412248] x27: ffff7595eac63080 x26: ffffb071a5f8df68
[    2.417581] x25: 00000000fffffdfb x24: ffffb071a609a678
[    2.422920] x23: ffff759480151d80 x22: ffff759480e0f010
[    2.428000] x21: ffffb071a6849f78 x20: 00000000fffffdfb
[    2.433337] x19: 0000000000000000 x18: 0000000000000010
[    2.438850] x17: 0000000065581f8e x16: 0000000000000068
[    2.444533] x15: ffff7594801522e8 x14: 0720072007200720
[    2.449868] x13: 0720072007200720 x12: 0720072007200720
[    2.455294] x11: 0720072007200720 x10: 0720072007200720
[    2.460549] x9 : 0720072007200720 x8 : 0720072007200720
[    2.466062] x7 : 0720072007200720 x6 : c0000000ffffefff
[    2.471831] x5 : 0000000000057fa8 x4 : ffffb071a6552f68
[    2.476999] x3 : 00000000ffffffff x2 : ffffb071a6552ee0
[    2.482336] x1 : 0000000000000000 x0 : 0000000000000000
[    2.487952] Call trace:
[    2.490387]  gpio_to_desc+0xb4/0x100
[    2.493885]  gpio_request+0x28/0x50
[    2.497304]  pwm_fan_probe+0x124/0xec0
[    2.501066]  platform_drv_probe+0x5c/0xb0
[    2.505345]  really_probe+0xf8/0x3f0
[    2.508763]  driver_probe_device+0x60/0x100
[    2.513063]  device_driver_attach+0x78/0x80
[    2.517070]  __driver_attach+0x74/0x100
[    2.520835]  bus_for_each_dev+0x84/0xe0
[    2.524515]  driver_attach+0x34/0x40
[    2.528289]  bus_add_driver+0x154/0x200
[    2.531775]  driver_register+0x68/0x120
[    2.535715]  __platform_driver_register+0x64/0x70
[    2.540266]  pwm_fan_driver_init+0x24/0x2c
[    2.544549]  do_one_initcall+0x50/0x300
[    2.548312]  kernel_init_freeable+0x264/0x2cc
[    2.552600]  kernel_init+0x1c/0x118
[    2.555840]  ret_from_fork+0x10/0x18
[    2.559427] ---[ end trace bd2a981e7edf825d ]---
[    2.564331] FAN:gpio request success.
[    2.567489] ------------[ cut here ]------------
[    2.572319] invalid GPIO -517
[    2.575139] WARNING: CPU: 0 PID: 1 at drivers/gpio/gpiolib.c:122 gpio_to_desc+0xb4/0x100
[    2.583483] Modules linked in:
[    2.586290] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W         5.10.192-tegra #4
[    2.594248] Hardware name: NVIDIA Jetson Xavier NX Developer Kit (DT)
[    2.600745] pstate: 60800009 (nZCv daif -PAN +UAO -TCO BTYPE=--)
[    2.606676] pc : gpio_to_desc+0xb4/0x100
[    2.610526] lr : gpio_to_desc+0xb4/0x100
[    2.614375] sp : ffff80001003ba40
[    2.617788] x29: ffff80001003ba40 x28: 00000000fffffdfb
[    2.623294] x27: ffff7595eac63080 x26: ffffb071a5f8df68
[    2.628719] x25: 00000000fffffdfb x24: ffffb071a609a678
[    2.634145] x23: ffff759480151d80 x22: ffff759480e0f010
[    2.639311] x21: ffffb071a6849f78 x20: 00000000fffffdfb
[    2.644649] x19: 0000000000000000 x18: 0000000000000010
[    2.650419] x17: 0000000065581f8e x16: 0000000000000068
[    2.655844] x15: ffff7594801522e8 x14: 0720072007200720
[    2.661012] x13: 0720072007200720 x12: 0720072007200720
[    2.666695] x11: 0720072007200720 x10: 0720072007200720
[    2.671953] x9 : 0720072007200720 x8 : 0720072007200720
[    2.677462] x7 : 0720072007200720 x6 : c0000000ffffefff
[    2.683232] x5 : 0000000000057fa8 x4 : ffffb071a6552f68
[    2.688656] x3 : 00000000ffffffff x2 : ffffb071a6552ee0
[    2.693736] x1 : 0000000000000000 x0 : 0000000000000000
[    2.699331] Call trace:
[    2.701785]  gpio_to_desc+0xb4/0x100
[    2.705283]  gpio_free+0x24/0x40
[    2.708697]  pwm_fan_probe+0x3e4/0xec0
[    2.712476]  platform_drv_probe+0x5c/0xb0
[    2.716226]  really_probe+0xf8/0x3f0
[    2.719915]  driver_probe_device+0x60/0x100
[    2.723926]  device_driver_attach+0x78/0x80
[    2.728208]  __driver_attach+0x74/0x100
[    2.731889]  bus_for_each_dev+0x84/0xe0
[    2.735652]  driver_attach+0x34/0x40
[    2.739152]  bus_add_driver+0x154/0x200
[    2.742913]  driver_register+0x68/0x120
[    2.747108]  __platform_driver_register+0x64/0x70
[    2.751660]  pwm_fan_driver_init+0x24/0x2c
[    2.755425]  do_one_initcall+0x50/0x300
[    2.759448]  kernel_init_freeable+0x264/0x2cc
[    2.763652]  kernel_init+0x1c/0x118
[    2.766978]  ret_from_fork+0x10/0x18
[    2.770563] ---[ end trace bd2a981e7edf825e ]---
[    2.775159] FAN: of_property_read failed

dmesg.txt (61.9 KB)

nvidia@nvidia:~/jtop$ sudo jtop
Traceback (most recent call last):
  File "/usr/local/bin/jtop", line 11, in <module>
    load_entry_point('jetson-stats==4.1.4', 'console_scripts', 'jtop')()
  File "/usr/local/lib/python3.8/dist-packages/jtop/__main__.py", line 150, in main
    curses.wrapper(JTOPGUI, jetson, pages, init_page=args.page,
  File "/usr/lib/python3.8/curses/__init__.py", line 105, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/local/lib/python3.8/dist-packages/jtop/gui/jtopgui.py", line 114, in __init__
    self.run(loop, seconds)
  File "/usr/local/lib/python3.8/dist-packages/jtop/gui/jtopgui.py", line 143, in run
    self.draw()
  File "/usr/local/lib/python3.8/dist-packages/jtop/gui/lib/common.py", line 80, in wrapped
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/jtop/gui/jtopgui.py", line 158, in draw
    page.draw(self.key, self.mouse)
  File "/usr/local/lib/python3.8/dist-packages/jtop/gui/pall.py", line 118, in draw
    line_counter = plot_GPUs(self.stdscr, line_counter, self.jetson.gpu, width)
  File "/usr/local/lib/python3.8/dist-packages/jtop/gui/lib/common.py", line 120, in wrapped
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/jtop/gui/jtopguimenu.py", line 72, in plot_GPUs
    label=label_freq(gpu['frq'], start='k'))
KeyError: 'frq'

Hi 854053437,

How do you update the custom board to R35.5?

[    2.575139] WARNING: CPU: 0 PID: 1 at drivers/gpio/gpiolib.c:122 gpio_to_desc+0xb4/0x100
...
[    2.775159] FAN: of_property_read failed

It seems something wrong in your device tree.
Please share the full device tree for further check.

I download R35.5‘s source file, and rebuild our kernel and dtb in it. Then replace the file in the R35.5 L4T file and flash into our board. The kernel and dtb configuration are as same as R35.3.1.
Here is the full device tree
dtbfile.txt (392.7 KB)

[    2.572319] invalid GPIO -517
[    2.575139] WARNING: CPU: 0 PID: 1 at drivers/gpio/gpiolib.c:122 gpio_to_desc+0xb4/0x100

I want to check the device tree from your source rather than the one decompiled from dtb.

Do you sync the kernel source from R35.5.0 and apply your custom change?

Do you have the custom design for the fan different from the devkit?

here is the device tree file in our source
uih-ccpb.txt (4.1 KB)

yes, I recompiled kernel and dtb through R35.5.0 source.

I think the fan design is as same as devkit. The only custom device tree I configured is pfsd to confirm fan’s two gpio as same as our design. It works fine in R35.3.1 and jtop works fine as well. If something wrong in it I’ll ask my hardware colleagues.

Okay, I compared the config file bettwen R35.3.1 and R35.5.0. I just find that in fan function, CONFIG_SENSORS_PWM_FAN is set m in 35.5.0 unlike of y in 35.3.1, this might be the reason. I’ll try and tell you the result, thanks for help

Please also check pwm_gpio attribute in pfsd { node since your error showing gpio request failed.

I set CONFIG_SENSORS_PWM_FAN to y and update the kernel image. The pwm-fan no err and jtop can work fine, thanks for help

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.