Changing the i2c address of the power monitors

Is it possible to change the i2c address of the power monitors, which occupy 0x40 and 0x41 by default? And if so, how can that be done? The data-sheet for the power monitors (INA3221) mentions that they are programmable.

hello user53544,

please refer to kernel documentation,
$L4T_Sources/r32.6.1/Linux_for_Tegra/source/public/kernel/kernel-4.9/Documentation/hwmon/ina3221

Supported chips:
  * Texas Instruments INA3221
    Prefix: 'ina3221'
    Addresses: I2C 0x40 - 0x43
    Datasheet: Publicly available at the Texas Instruments website

please also refer to below device tree sources,
$L4T_Sources/r32.6.1/Linux_for_Tegra/source/public/hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-platforms/tegra186-quill-p3310-1000-a00-powermon.dtsi

you may have a try to modify that as other i2c address for verification,
thanks

I attempted changing the register values for on of the power monitors in tegra186-quill-p3310-1000-a00-powermon.dtsi to address 0x42 and refreshed the tx2. Unfortunaltley I’m still seeing UU in the output of i2cdetect for addresses 0x40 and 0x41, which I believe indicate some kernel drivers are using it (ie power monitors).

Is this the only location where the register values need to be changed? Also, does modifying the register value in this file to 0x42 or 0x43 somehow reroute the address pin on the INA3221? How does the TX2 actually configure the power monitors address from a hardware perspective?

hello user53544,

device tree settings reflect the hardware configurations, you should refer to datasheets to have more details.

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