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.

devmem2 is not working in ti sdk 8

Dear TI E2E Community,

I am trying to write to i2c0_scl register to 0x07 using devmem2, but am unable to write it correctly, after writing 0x07 to the register address 0x44e1098c using the below command & tried to readback using devmem2 0x44e1098c, the value it is displaying is 0x30

root@lifeline:/# devmem2 0x44e1098c w 0x07
/dev/mem opened.
Memory mapped at address 0xb6fa1000.
Read at address 0x44E1098C (0xb6fa198c): 0x00000030
Write at address 0x44E1098C (0xb6fa198c): 0x00000007, readback 0x00000007
root@lifeline:/# devmem2 0x44e1098c
/dev/mem opened.
Memory mapped at address 0xb6f3b000.
Read at address 0x44E1098C (0xb6f3b98c): 0x00000030

Could you please let me know why the devmem2 for write is not working (after reading it back ie., devmem2 0x44e1098c  it seems to be still 0x30)

Kindly do the needful as early as possible

Many Thanks in advance

  • Hi Srini,

    Some AM335x IPs (one of which is I2C0, used to control the PMIC on your board) require a privilege access, in order to modify their settings.

    These IPs are locked for user space access.  You can modify its registers within the kernel driver.

    In your case you are trying to disable the clock for the I2C communication between the pmic & am335x device. This is not advised. 

    Best Regards,

    Yordan

  • Many thanks a lot for your quick responses Yordan,

    Basically, I need to disable the Temperature sensor TCN75A in the userspace (after bootup in the shell prompt) (preventing it from reporting the temperature values in the userspace) which is interfaced to i2c0 bus, but when I see the i2cdump as shown below, the register address 0x01 contents seems to be zero but when am still able to read the temperature readings, ie., current temp of the board using sysfs

    e2e.ti.com/.../457119

    Could you please let me know whether this is possible to disable temp. sensor in userspace thereby preventing it reporting the temperature values in the userspace

    Kindly do the needful as early as possible

    Many Many Thanks in advance
  • Hi,

    You could try and create user space application that disables the temp sensor. See example for I2C communication with ADC.

    The easiest way to disable the temp sensor, if it is not needed (your board can function properly without it), is to remove the temp sensor entries from dts.

    Best Regards,
    Yordan
  • Here is a link to the example, I referenced in my previous post:
    elinux.org/Interfacing_with_I2C_Devices

    Best Regards,
    Yordan