AnsweredAssumed Answered

ad5628 Device tree issue

Question asked by akshay vijapur on Nov 28, 2016
Latest reply on Nov 29, 2016 by xiangjun.rong

I am using ad5628 DAC with RaspberryPi 3 Board on SPI interface , I have found drivers for ad5604 (Linux/drivers/iio/dac/ad5064.c - Linux Cross Reference - Free Electrons ) , I believe that it will work for ad5628 also . 

 

So when i enabled the drivers in the Yocto kernel . i didnt get any handle for the device at the location

sys/bus/iio/devices/

(NO DEVICE)

 

so i came to know that i need to write device tree for the driver (AD5446 IIO DAC Linux Driver [Analog Devices Wiki] ) so i have wrote a DTS file

 

/dts-v1/;
/plugin/;

 

/ {

 

 

 

    fragment@0 {
                target = <&spi0>;
                __overlay__ {
                        cs-gpios = <0>, <0>;
                        status = "okay";
                };
        };

 

        fragment@1 {
                target = <&spi0_cs_pins>;
                __overlay__ {
                        brcm,pins = <8 7>;
                        brcm,function = <4>; /* alt0 */
                };
        };

 

    
        ad5628:dac@0 {

 

    compatible = "brcm,bcm2708";
    dac_vcc: fixedregulator@1 {
              compatible = "regulator-fixed";
              regulator-name = "fixed-supply";
              regulator-min-microvolt = <2500000>;
              regulator-max-microvolt = <2500000>;
              regulator-boot-on;
       };};

 

       ad5064: spi@42040000 {
              #address-cells = <1>;
              #size-cells = <0>;
              compatible = "xlnx,axi-spi-1.02.a", "xlnx,xps-spi-2.00.a","&spi0";
              
              ad5064@0 {
                     compatible = "adi,ad5064";
                     reg = <1>;
                     spi-max-frequency = <1000000>;
                     spi-cpha=<1>;
                     spi-cpol=<1>;
                     vcc-supply = <&dac_vcc>;
              };
        };

 


};

 

But now still there is no device at the location at path  sys/bus/iio/.

 

So please help me to solve this issue by specifying weather my written DTS is correct for raspberrypi board .

 

Thanks

Outcomes