SPI interface to an IIO synthesizer

Started by kjwiik, September 25, 2021, 12:05:07 PM

Previous topic - Next topic

kjwiik

I am trying to control an Analog Devices ADF4350 synthesizer with SPI on a Olinuxino A20 Micro. I have compiled a new kernel with IIO and synthesizer support. I could also enable SPI buses without a problem with olinuxino-overlay.

When I try to add the synthesizer overlay, I get an error:
failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND
base fdt does did not have a /__symbols__ node
make sure you've compiled with -@
Failed to apply overlay.
Restoring the original FDT blob...


My overlay is
/dts-v1/;
/plugin/;

/ {
        compatible = "olimex,a20-olinuxino-micro\0olimex,a20-olinuxino-micro-emmc";
        description = "ADF4350 synthesizer on SPI1 bus";

        fragment@0 {
                target-path = "/";
                __overlay__ {
                        clocks {
                                adf4350_clkin: clock0 {
                                             #clock-cells = <0>;
                                             compatible = "fixed-clock";
                                             clock-frequency = <25000000>; // 25MHz
                                };
                        };
                };
        };

        fragment@1 {
                target = <&spi1>;
                __overlay__ {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        status = "okay";

                        adf4350: adf4350@0 {
                                compatible = "adi,adf4350";
                                reg = <0>;
                                spi-max-frequency = <1000000>;
                                clocks = <&adf4350_clkin>;
                        };
                };
        };
};
and it is compiled with -@:
dtc -@ -I dts -O dtb -o adf4350.dtbo adf4350.dts

Any clues are appreciated!

Thanks,
Kaj


kjwiik

It seems that Olinuxino is not capable supporting SPI devices, time to move to Armbian or Raspbian?

LubOlimex

OLinuxino is capable of supporting SPI devices, but not every user is capable of fiddling with options and settings. We've added instructions on how to edit dts and how to rebuild kernel at the end of the Olimage guide:

https://github.com/OLIMEX/OLINUXINO/blob/master/DOCUMENTS/OLIMAGE/Olimage-guide.pdf

Technical support and documentation manager at Olimex