Post Go back to editing


we are trying to use the ad5064 driver with latest patch for LTC2631 (one
channel DAC). 
When we try to output some voltage we get: " -sh: echo: write error: No such device or address"
One possibility is that the driver does not seem to read the I2C address from the device tree. I have inserted a few printk statements into " ad5064_i2c_write" function to print out the return value and address value: 
This is the full output: 
root@qcom:/sys/bus/iio/devices/iio:device1# cat uevent
root@qcom:/sys/bus/iio/devices/iio:device1# echo 200 > out_voltage0_raw
[ 4004.255429]
[ 4004.255429] Attempting to write to LTC2631
[ 4004.255711]
[ 4004.255711] Number of bytes sent over I2C: -6 to I2C address: 0
-sh: echo: write error: No such device or address
are the required device tree entries  for ad5064 driver (for the case of I2C interace) documented somewhere?
This is our device tree entry:
&blsp_i2c4 {
status = "okay";
   ltc2631-l10@20 {
   compatible = "adi,ltc2631-l10";
   eg = <0x20>;
Printing diagnostic information from ad5064_i2c_write function indicates
that adrr value is zero while I assume it should be 0x20. Any advice? I tried to force it to be 0x20 in the driver but that did not make any difference, it still reports " write error: No such device or address"
Thank you.
  • Hi,

    What is your host system?

    The address that is passed to the ad5064_i2c_write() function is the register address and not the device address, so for channel 0 a value of 0 is OK. The I2C slave address is handled by the I2C framework internally and not directly referenced in the driver.

    What is the configuration of the CA0 and CA1 pins on your device, the address of the device is only 0x20 if both those pins are floating. Also check that the power is properly applied to the device and that SDA and SCL are connected properly. If you have a logic analyzer please check if you can observe signals on the SDA and SCL lines.

    - Lars

  • Just to let you know that the problem was with  the hardware. The AD5064 works as is with ltc2631-l10 on Variscite

    DART-SD410 SOM (CPU: Qualcomm Snapdragon 410).

    The only remaining question I have is regarding the warning message during bootup: 3-0020 supply vref not found, using dummy regulator. I use ltc2631-l10 in internal reference mode. Any advice on what that entry should be? I use this  device tree:

    &blsp_i2c4 {
    status = "okay";
       ltc2631-l10@20 {
       compatible = "adi,ltc2631-l10";
       reg = <0x20>;
    Thank you