This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM69: TI AM69 Linux documentation - Power Monitoring

Part Number: AM69
Other Parts Discussed in Thread: INA226, , AM68

Tool/software:

Hi Processor e2e support team, our customers embedded software team is profiling with the SK-AM69  Our customer is interested in profiling the chip regarding load vs temperature and power usage for different use-cases they have. On the board is the INA226 chip that can measure current/power directly on different power rails.

 However, they do not see any information in the docs about using it:

https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-am69/09_02_00_05/exports/docs/linux/Foundational_Components_Kernel_Drivers.html

 Also, doing I2C scanning doesn’t really find any I2C devices using the linux command i2cdetect at all. They wonder if something is wrong or they are using it wrongly. Usually it works on other products they have.

Can you direct our customer to a person that knows what is in the Linux image that runs on the AM69 and how to interact with INA226 chip, located on I2C0 bus? They would appreciate it very much.

Thank you! DM

  • Hi DM,

    None of the AM68/AM69 have the on board power monitoring INA226 components on board. Since this is a lower cost board than EVM.
    The EVMs have them but not the AM69-SK boards. Hence no support.

    - Keerthy

  • Hi. I am the one that asked for this. We do have the SK-AM69 EVM https://www.ti.com/tool/SK-AM69#overview, which according to schematics and documentation have INA226 chip mounted on the board https://www.ti.com/lit/ug/spruj70a/spruj70a.pdf?ts=1723118005021.

    Questions is how do I with the Linux image that is made for it, interact with the INA226 chip to do profiling vs load and temperature?

    Thanks for your help.

  • Hi Martin,

    Apologies I misread:

    So you will need to add the ina226 nodes under main_i2c0 node.

    +&main_i2c0 {
    +    pinctrl-names = "default";
    +    pinctrl-0 = <&main_i2c0_pins_default>;
    +    clock-frequency = <400000>;
    +
    +    ina226@40 {
    +        compatible = "ti,ina226";
    +        reg = <0x40>;
    +        shunt-resistor = <10000>;
    +    };
    +
    +    ina226@41 {
    +        compatible = "ti,ina226";
    +        reg = <0x41>;
    +        shunt-resistor = <10000>;
    +    };
    +
    +    ina226@45 {
    +        compatible = "ti,ina226";
    +        reg = <0x45>;
    +        shunt-resistor = <10000>;
    +    };

    Something like above. I have not tried on the AM69 but something like above should be done.

    - Keerthy

  • That requires a rebuild of the Linux kernel then. OK.

    What is weird is that when I do "i2cdetect" -y 0 or 1, it will not list any I2C devices on the bus. I thought all I2C devices connected would be ready to be used. Do you have an idea why that could be?

    Can you please put the full path to the .dts file for the board?

    Martin

  • Hi Martin,

    What's the output of below command: 

    dmesg | grep i2c

    With that can we figure out the exact bus number for main_i2c0.

    Best regards,

    Keerthy 

  • root@am69-sk:~# dmesg | grep i2c
    [    0.967980] i2c_dev: i2c /dev entries driver
    [    1.127241] omap_i2c 40b00000.i2c: bus 2 rev0.12 at 400 kHz
    [    1.133290] omap_i2c 40b10000.i2c: bus 3 rev0.12 at 100 kHz
    [    1.172620] omap_i2c 2000000.i2c: bus 0 rev0.12 at 400 kHz
    [    1.212562] i2c i2c-1: Added multiplexed i2c bus 4
    [    1.217540] i2c i2c-1: Added multiplexed i2c bus 5
    [    1.230196] omap_i2c 2010000.i2c: bus 1 rev0.12 at 400 kHz
    root@am69-sk:~#

    My colleague who is working with the board can actually talk to the chips using i2cget command. I guess that was the most important part and we can continue our part now.

    Still weird that i2cdetect does not reveal any devices on any busses.

  • My colleague who is working with the board can actually talk to the chips using i2cget command

    Cool. So we can use i2cdump, i2cset to read/write on the I2C slaves. You can use the above code that I have shared to enable the INA226 via DT nodes.
    The driver is already part of the SDK and is enabled.

    - Keerthy