External Thermal Sensor#

NVIDIA DRIVE AGX Orin™ and NVIDIA DRIVE AGX Thor™ includes support for an external thermal sensor device(s) that measure the SoC and ambient temperatures. Depending upon the platform there can be multiple sensors present. Sensors are present on the baseboard connected via an I2C bus.

Ferrix platforms have 2 external sensors.

The processor core and ambient temperatures are measured as follows:

  • Remote temperature is the temperature on the hotspot of an Orin/Thor chip or the board.

  • Local temperature is the temperature on the external tmon near to the sensor itself.

This sensor provides the following modes of operation:

  • Normal mode: Values or limits written to/read from the temperature registers or temperature limit registers are encoded/decoded as is. The temperature range in which the sensor works in Normal mode is 0 degrees Celsius to 127 degrees Celsius.

  • Extended mode: Values are encoded/decoded with an offset of 64 degrees Celsius. The temperature range in which the sensor works in Extended mode is -64 degrees Celsius to 191 degrees Celsius.

The temperature and limit registers are 8-bits wide, which normally covers the values from 0 to 255. However, using an offset of 64 enables them to cover the values from -64 to 191, which is the temperature range for Extended mode. Therefore, NVIDIA DRIVE™ software adds an offset of 64 to the values to be written when writing limits in extended mode. Similarly, an offset of 64 is subtracted from the values read, when reading temperatures or limits in extended mode by NVIDIA DRIVE™ software.

The operation mode of the sensor in the software is set to Extended.

Remote Temperature Offset#

The remote temperature offset is the offset value applied as a correction to the remote temperature reading from the sensor, to get the real temperature value of Tegra hotspot. This value is obtained after appropriate qualification of the hardware platform.

This offset is configured in MB1 BCT.

For MB1, the offset is provided via the MB1 BCT configuration file:

/drive-foundation/hardware/nvidia/platform/t23x/automotive/bct/<board_name>/pmic/tegra234-mb1-bct-<board_name_string>-pmic.dts
/drive-foundation/hardware/nvidia/platform/t264/automotive/bct/<board_name>/pmic/tegra264-mb1-bct-pmic-<board_name_string>.dts

Where:

<board_name>

<board_name_string>

p3710

p3710-0010-a01

p3663

p3663-a01

p3960-10

p3960-0010

p3960-10

p3960-0010-sw02

p3960-10

p3960-0010-sw03

Search for “thermal” and then for comment “TMP451 start” below that, in the file above to find external thermal sensor configuration settings.

For example, the command block as follows is required to set the remote offset at the appropriate register.

block@<block_num> {
        i2c-controller;
        controller-id = <4>; //PWR I2C
        slave-addr = <0x98>; //7bit 4C
        reg-data-size = <8>;
        reg-addr-size = <8>;
        block-delay = <10>;
        i2c-update-verify = <1>;
        commands {
                command@<command_num> {
                        reg-addr = <0x11>; //Remote Offset High byte
                        mask = <0xff>;
                        value = <0xfc>; // -4 degC
                };
        };
};

Shutdown Limits#

The external thermal sensor is wired to shut down the target after reaching a particular remote temperature limit. This thermal sensor is armed with a shutdown limit.

In DriveOs, when a hotspot’s temperature reaches or exceeds thermal shutdown limit, it generates a signal to notify Hardware Safety Manage(HSM). To know more about it please refer to the section titled “Thermal Shutdown”.

External Thermal Sensor shutdown is pre-enabled on power on reset. But in MB1 BCT, the shutdown limit is updated as per the qualified values.

MB1 configuration configures shutdown limit of the external thermal sensor(s) connected.

For MB1, the shutdown setting is provided using the MB1 BCT configuration file at:

/drive-foundation/hardware/nvidia/platform/t23x/automotive/bct/<board_name>/pmic/tegra234-mb1-bct-<board_name_string>-pmic.dts
/drive-foundation/hardware/nvidia/platform/t264/automotive/bct/<board_name>/pmic/tegra264-mb1-bct-pmic-<board_name_string>.dts

Where:

<board_name>

<board_name_string>

p3710

p3710-0010-a01

p3663

p3663-a01

p3960-10

p3960-0010

p3960-10

p3960-0010-sw02

p3960-10

p3960-0010-sw03

Search for THERMAL in the file above to find “external thermal sensor shutdown configuration”.

To locate the configured shutdown limit value, consult the following command in the MB1 BCT configuration file of your platform:

commands {
        command@0 {
                reg-addr = <0x19>; //Remote shutdown limit for Thor
                mask = <0xff>;
                value = <0xb8>; //120 + 64
        };
};

Since the thermal sensor is configured in extended mode, the value programmed is the shutdown limit (in milli degC) + 64.

sysfs interfaces to read temperature#

Execute the following commands.

root@nvidia:~# cat /sys/bus/i2c/devices//hwmon/<hwmon_id>/temp1_input 50075

The output displays local temperature (in milliDegC).

Execute the following commands to read remote temperature (in DegC):

root@nvidia:~# cat /sys/bus/i2c/devices//hwmon/<hwmon_id>/temp2_input 510075

The output displays remote temperature in milliDegC.

Note

The remote temperature reading is after applying the remote offset value correction.

Removing External Thermal Sensor Software Support#

To remove the External Thermal Sensor software support user needs to follow steps provided below.

Note

User must ensure safety of hardware if External Thermal Sensor software support is removed.

MB1 PMIC configuration file#

In MB1, external thermal shutdown limit/remote offset is programmed. This must be removed.

The file is located at:

Orin platforms - /drive-foundation/platform-config/hardware/nvidia/platform/t23x/automotive/bct/<board_name>/pmic
Thor Platforms - /drive-foundation/hardware/nvidia/platform/t264/automotive/bct/<board_name>/pmic

Where board_name are:

  • p3710, p3663 (for Orin)

  • p3960-10 (for Thor)

Find the PMIC configuration file corresponding to your platform. For example,

tegra264-mb1-bct-pmic-p3960-0010.dts

In this file, if you see commands that perform thermal programming to the external thermal sensor’s I2C address, remove them.

The sets of commands below must be removed and the block numbering must be corrected for following blocks:

block@4 {
        i2c-controller;
        controller-id = <4>; //PWR I2C
        slave-addr = <0x98>; //7bit 4C
        reg-data-size = <8>;
        reg-addr-size = <8>;
        block-delay = <10>;
        i2c-update-verify = <1>;
        commands {
                command@0 {
                        reg-addr = <0x19>; //Remote shutdown limit for Thor
                        mask = <0xff>;
                        value = <0xb8>; //120°C + 64°C
                };
                command@1 {
                        reg-addr = <0x20>; //Local shutdown limit for Thor
                        mask = <0xff>;
                        value = <0xb8>; //120°C + 64°C
                }; command@2 {
                        reg-addr = <0x11>; //Remote Offset High byte
                        mask = <0xff>;
                        value = <0xfc>; // -4°C
                        };
                };
};

Kernel Device tree#

In the kernel’s device tree file for your board, set the “status” property of below nodes to “disabled” to disable external thermal sensor driver. If only single external sensor is supported by platform, “EXT1*” and “TMP451_brd” nodes need not be disabled separately.

bpmp {
        i2c{
                TMP451_soc: temp-sensor@4c { // Sensor present on SOC
                        status = "disabled";
                };
                TMP451_brd: temp-sensor@49 { // Sensor present on board
                        status = "disabled";
                };
        };
};

External Thermal Sensor Configuration Parameters#

This section describes configuration parameters specific to external thermal sensors.

The tmp451 DT node is kept under the I2C DT node that it is connected to power I2C. The thermal driver gets the secondary address from the parent I2C DT node. Following are the files to refer for Automotive thermal setting done via kernel DTs:

Orin platforms - /drive-foundation/platform-config/hardware/nvidia/platform/t23x/automotive/kernel-dts/common/generic-common-cvm/tegra234-thermal.dtsi
                /drive-foundation/platform-config/hardware/nvidia/platform/t23x/automotive/kernel-dts/common/board/tegra234-auto-thermal.dtsi
Thor Platforms -${NV_WORKSPACE}/drive-foundation/hardware/nvidia/platform/t264/automotive/kernel-dts/common/tegra264-auto-thermal.dtsi

Setting

Description

loc::shutdown-limit

The shutdown-limit of local temperature sensor node near the tmp451 sensor.

Default: 190 dC (Set to max for not having local shutdown).

Valid Range: -64 to 191

ext::shutdown-limit

The shutdown-limit of remote temperature sensor which is present at the SOC hotspot or Board hotspot of tmp451.

Default: 127 dC

Valid Range: -64 to 127

offset

The Remote temperature offset. This offset value will be subtracted from the remote temperature and returned by tmp451.

Default: -4 dC (In this case offset will be -4dC)

Range: -128 to 127

interrupts

The IRQ number and IRQ type of the GPIO connected to tmp451.

IRQ Number: TEGRA234_MAIN_GPIO(G, 1) (For Orin)

IRQ Number: TEGRA234_MAIN_GPIO(U, 1) (For Thor sku TS1 and TS2)

IRQ Number: TEGRA234_MAIN_GPIO(P, 1) (For Thor sku TS3 and above)

IRQ Type: IRQ_TYPE_LEVEL_LOW

Note

‘loc::shutdown-limit’, ‘ext::shutdown-limit’, ‘offset’ DT nodes are applicable to Orin only.