Jump to content

ab0tj

Members
  • Posts

    4
  • Joined

  • Last visited

  1. Thanks, that explains it!
  2. In case anyone else comes across this, I answered my own question... I solved this by making a custom overlay: /dts-v1/; /plugin/; / { fragment@0 { target = <&i2c0>; __overlay__ { #address-cells = <1>; #size-cells = <0>; adc@68 { compatible = "microchip,mcp3426"; reg = <0x68>; status = "okay"; }; }; }; }; I still see "i2c i2c-0: Failed to register i2c client ds1307 at 0x68 (-16)" in dmesg, so something still seems to be trying to instantiate a ds1307. Maybe that's part of the base image? But at least my overlay claims that address before ds1307 can get to it.
  3. Yes, I2C works otherwise. # i2cdetect -y 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --
  4. Hi all, I am trying to use a MCP3426 I2C ADC chip with my NanoPi Duo2. I have compiled a custom kernel with the mcp3426 driver in it, but I can't get it to load. The problem seems to be that the chip uses address 0x68 which is the same address that the commonly used DS1307 RTC chip uses. I have blacklisted the ds1307 module which has stopped that module from loading, but somehow '/sys/bus/i2c/devices/0-0068/name' still claims to be a ds1307. 'echo mcp3426 0x68 > /sys/class/i2c-dev/i2c-0/device/new_device' results in a "Invalid argument error" with 'i2c i2c-0: Failed to register i2c client mcp3426 at 0x68 (-16)' being logged in dmesg, and apparently the -16 error means that address is already in use. 'echo 0x68 > /sys/bus/i2c/devices/i2c-0/delete_device' results in 'i2c i2c-0: delete_device: Can't find device in list'. I should add that I can read the ADC using i2cget, but I would like to use the Linux iio interface. Any ideas on where to go from here? Thanks, Alex
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines