IIO driver MCP4725 "invalid platform or devicetree data"

Greetings,

I’m trying to load this MCP4725 IIO driver

modprobe mcp4725

echo “mcp4725 0x60” >/sys/bus/i2c/devices/i2c-2/new_device

no problems up until i run dmesg and it doesnt recognize it as an iio device.

root@beaglebone:/sys/bus/iio/devices# ls -l
total 0

run dmesg

[ 471.215225] mcp4725 2-0060: invalid platform or devicetree data
[ 471.232912] i2c i2c-2: new_device: Instantiated device mcp4725 at 0x60

It works with other chips the mcp3422 for instance. exact same commands except different address

any thoughts? is this driver no good for beaglebone?

root@beaglebone:/home/debian# i2cdetect -r 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- – -- – --
40: – -- – -- – -- – -- – -- – -- – -- – --
50: – -- – -- UU UU UU UU – -- – -- – -- – --
60: 60 – -- – -- – -- – -- – -- – -- – -- –
70: – -- – -- – -- – --

The kernel message gave you a hint of what's wrong.. "invalid platform
or devicetree data"...

The mcp4725 driver has a required property "vdd-supply" that must be
provided either thru the platform (legacy) or device tree data..

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/iio/dac/mcp4725.txt

Start with a basic overlay (assuming P9_19/P9_20 right? )

https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-I2C2-00A0.dts

and update this section for what your driver needs..

https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-I2C2-00A0.dts#L84-L91

assuming it's v3.3 use:

vdd-supply = <&vmmcsd_fixed>;

Regards,

Awesome. I felt it was a bit beyond my grasp, thank!

took me a bit longer but.
I edited the BB-I2C2-00A0.dts. adding

/* add any i2c devices on the bus here */
mcp4725@60 {
compatible = “microchip,mcp4725”;
reg = <0x60>;
vdd-supply = <&vmmcsd_fixed>;
};
adc@68 {
compatible = “microchip,mcp3428”;
reg = <0x68>;
};

mcp23008@20 {
compatible = “microchip,mcp23008”;
reg = <0x20>;
};

going back to the bb.org/overlays. running the ./install.sh

then editing /boot/uEnv.txt to load the cape