[Thor] R38.4 pwm9 out not change

Hi all

Jetpack: Jetpack 7.1
SOM: T5000

We use JP7.1 R38.4 on our custom Thor Board ,and then we want to add a sys-fan with pwm9 (K57) and NV_THERM_FAN_TACH1(B54)

Enable pwm9 and NV_THERM_FAN_TACH1 on pinmux table and add DT on tegra264-p4071-0000.dtsi

tegra264-p4071-0000.dtsi: 

add

   pwm@810c610000 {    //pwm9

        status = "okay";

    };

    sys_fan: sys-fan {

          compatible = "pwm-fan";

          pwms = <&pwm9 0 40000>;

         #cooling-cells = <2>;

          cooling-levels = <77 102 140 192 255>;

      };

tegra264-p4071-0000+p3834-0008-nv.dts :

add

	thermal-zones {
		tj-thermal {
			trips {
				tj_trip_active0: active-0 {
					temperature = <80000>;
					hysteresis = <0>;
					type = "active";
				};

				tj_trip_active1: active-1 {
					temperature = <86000>;
					hysteresis = <0>;
					type = "active";
				};

				tj_trip_active2: active-2 {
					temperature = <91000>;
					hysteresis = <0>;
					type = "active";
				};

				tj_trip_active3: active-3 {
					temperature = <100000>;
					hysteresis = <0>;
					type = "active";
				};

				sys_trip_active0: active-sys-0 {
					temperature = <10000>;
					hysteresis = <0>;
					type = "active";
				};

				sys_trip_active1: active-sys-1 {
					temperature = <20000>;
					hysteresis = <0>;
					type = "active";
				};

				sys_trip_active2: active-sys-2 {
					temperature = <40000>;
					hysteresis = <0>;
					type = "active";
				};

				sys_trip_active3: active-sys-3 {
					temperature = <100000>;
					hysteresis = <0>;
					type = "active";
				};
			};

			cooling-maps {
				map-active-0 {
					cooling-device = <&soc_fan 0 1>;
					trip = <&tj_trip_active0>;
				};

				map-active-1 {
					cooling-device = <&soc_fan 1 2>;
					trip = <&tj_trip_active1>;
				};

				map-active-2 {
					cooling-device = <&soc_fan 2 3>;
					trip = <&tj_trip_active2>;
				};

				map-active-3 {
					cooling-device = <&soc_fan 3 4>;
					trip = <&tj_trip_active3>;
				};

				map-active-4 {
					cooling-device = <&sys_fan 0 1>;
					trip = <&sys_trip_active0>;
				};

				map-active-5 {
					cooling-device = <&sys_fan 1 2>;
					trip = <&sys_trip_active1>;
				};

				map-active-6 {
					cooling-device = <&sys_fan 2 3>;
					trip = <&sys_trip_active2>;
				};

				map-active-7 {
					cooling-device = <&sys_fan 3 4>;
					trip = <&sys_trip_active3>;
				};
			};
		};
	};

on /sys/class/hwmon/hwmon2 can check new pwm1 and /sys/class/hwmon/hwmon5/rpm get TACH1 rpm , but sys fan rpm so slow , even echo 255 > pwm1 rpm not change .

we echo 255 to pwm and check /sys/kernel/debug/pwm , sys-fan duty-cycle has change but rpm and fan pwm voltage not any change:

On soc fan these change is work , but new sys-fan not work.

The hardware circuitry for connecting the sys-fan PWM9 to the sys-fan is the same as that used in the soc-fan PWM4 (K62).

Is there anything we might have missed? Or is there anything that needs to be configured?

Before echo 255 > pwm

After echo 255 > pwm

Hi jack_lan,

Do you add the custom FAN into /etc/nvfancontrol.conf?

Please refer to the following thread to check if it could help for your case.
How do I turn off the jetson orin nx Fan Transfer service - #8 by KevinFFF

Hi KevlnFFF

We reference your suggest on below website .

When stop nvfancontrol.service , on pwm4 use echo 255 > pwm that is work , but use on sys-fan pwm9 can’t work .

Check /sys/kernel/degug/pwm , 810c610000.pwm duty cycle has change ,but sys-fan voltage still not any change

Have you tried to configure its(pwm9) duty cycle manually?
e.g. configure it to 7549 as pwm4

Hi KevinFFF

We didn’t see any individual duty nodes that could be manually adjusted in hwmon or elsewhere; we only adjusted pwm.

Typically, after we changed pwm, the duty information in /sys/kernel/debug/pwm would also change accordingly.

Hi KevinFFF

Regarding PWM9, could we check the current settings via the register to confirm that the output PWM duty cycle is correctly configured?

If possible, could you also provide the register address for PWM4 so we can compare the two?

Currently, PWM4 is correctly outputting fan PWM, but PWM9 still has issues.

Best Regards
Jack Lan

Sorry that we don’t provide the register related information in the TRM for Thor.
Please check if the following thread could help for your case.
Unable to set PWM to low frequency - #22 by KevinFFF

Hi KevinFFF

below /sys/class/pwm/pwmchip* can’t find “period” and “duty_cycle” element …

pwmchip:

Check pwm with Oscilloscope check pwm4 (SOC-PWM) and pwm9 (SYS-PWM)

The PWM9 outputs a periodic weak voltage.

Will the Pinmux table settings affect this?

PWM4:

PWM9:

Best Regards
Jack Lan

Please run echo 0 > export to get pwm node exported.

Have you configured its pinmux before use?

Hi KevinFFF

Sorry for the late reply.

The reason is that I encountered a different situation during a development process.

Our system currently has pwm4 (the native PWM fan in SOM) and pwm9 (an additional PWM fan we added by modifying the device-tree).

Previously, only pwm4 could be controlled normally; its speed could be changed by modifying the PWM. The speed of pwm9 remained unchanged even after modifying the PWM.

Until a recent test, I accidentally disconnected the PWM4 fan and only connected the PWM9 fan. Unexpectedly, I found that the speed of the PWM9 fan became controllable under these conditions. We could change the speed of PWM9 by modifying the PWM variables.

I didn’t make any modifications; I simply disconnected the PWM4 fan, yet the behavior changed. I suspect that when adding the additional fan, some settings outside of the device-tree need to be configured?

However, the Develop Guide doesn’t mention how to add new fans.

Best Regards
Jack Lan

Do you mean that PWM9 can be controlled once you just remove the connection for PWM4?
Have you confirmed the dmesg and device tree in these 2 cases?

If you removed the PWM4, I think there should still be the PWM4 signal output?
Could you help to clarify if there’s the PWM4 output after you disconnect the native FAN?