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

###
###Overide capes with eeprom
uboot_overlay_addr0=/lib/firmware/BB-I2C2-00A0.dtbo
#uboot_overlay_addr1=/lib/firmware/<file1>.dtbo
#uboot_overlay_addr2=/lib/firmware/<file2>.dtbo
#uboot_overlay_addr3=/lib/firmware/<file3>.dtbo
###

and voila it registers on boot as a device and works 

root@beaglebone:/boot# i2cdetect -r 2
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-2 using read byte commands.
I will probe address range 0x03-0x77.
Continue? [Y/n] Y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- --
60: UU -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Thanks!

On Thursday, 27 February 2020 19:02:02 UTC-8, RobertCNelson wrote:
>
> On Thu, Feb 27, 2020 at 6:59 PM john whittle <[email protected] 
> <javascript:>> wrote: 
> > 
> > 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? 
>
> 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, 
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/0a4b019b-7a87-4497-a7db-5f95acaeedc7%40googlegroups.com.

Reply via email to