Академический Документы
Профессиональный Документы
Культура Документы
Log in to create and rate content, and to follow, bookmark, and share content with other members.
ANSWERED
Like • 0 Comment • 3
Hello,
My apologies if the answer to this is readily available on the web, but I couldn't manage to find anything.
Would you be able to point me at a device tree entry that i could use for using the no-os ad9361 driver code
under linux? I'm specifically looking for the device tree entry that will create the "/dev/spidev32766.0"
device. I have put something together myself based on tidbits i gathered around the web, but i'm getting a
"failed to transfer one message from queue" error with 'my' spidev device. The no-os driver works fine on my
zedboard+fmcomms2 setup when running bare metal, so it appears that i have something messed up in my
linux-based spi driver or its configuration.
For bonus points, is there a uio device tree entry to support the uio device the no-os linux driver is
attempting to open for the adc and dac dma's?
Regards,
Joe
DragosB
13 Jun, 2014 11:45 AM
Correct Answer
Joe,
Add the following entries to the ADV7511 devicetree (linux/arch/arm/boot/dts/zynq-zed-
adv7511.dts at xcomm_zynq · analogdevicesinc/linux · GitHub ):
fmc_spi: spi@e0006000 {
bus-num = <1>;
compatible = "cdns,spi-r1p6", "xlnx,zynq-spi-1.00.a", "xlnx,ps7-spi-1.00.a";
interrupt-parent = <&gic>;
interrupts = < 0 26 4 >;
clock-names = "ref_clk", "aper_clk", "pclk";
clocks = <&clkc 25>, <&clkc 34>, <&clkc 34>;
num-chip-select = <4>;
reg = < 0xe0006000 0x1000 >;
speed-hz = <100000000>;
xlnx,has-ss0 = <0x1>;
xlnx,has-ss1 = <0x1>;
xlnx,has-ss2 = <0x1>;
xlnx,spi-clk-freq-hz = <100000000>;
#address-cells = <1>;
#size-cells = <0>;
spi@0 {
compatible = "spidev";
spi-cpha;
reg = <0>;
spi-max-frequency = <1000000>;
};
};
ad9361: ad9361@79020000 {
compatible = "generic-uio";
reg = <0x79020000 0x6000>;
};
We will also add this information on our wiki soon.
Thanks,
Dragos
3 Replies
DragosB
13 Jun, 2014 11:45 AM
Joe,
Add the following entries to the ADV7511 devicetree (linux/arch/arm/boot/dts/zynq-zed-
adv7511.dts at xcomm_zynq · analogdevicesinc/linux · GitHub ):
fmc_spi: spi@e0006000 {
bus-num = <1>;
compatible = "cdns,spi-r1p6", "xlnx,zynq-spi-1.00.a", "xlnx,ps7-spi-1.00.a";
interrupt-parent = <&gic>;
interrupts = < 0 26 4 >;
clock-names = "ref_clk", "aper_clk", "pclk";
clocks = <&clkc 25>, <&clkc 34>, <&clkc 34>;
num-chip-select = <4>;
reg = < 0xe0006000 0x1000 >;
speed-hz = <100000000>;
xlnx,has-ss0 = <0x1>;
xlnx,has-ss1 = <0x1>;
xlnx,has-ss2 = <0x1>;
xlnx,spi-clk-freq-hz = <100000000>;
#address-cells = <1>;
#size-cells = <0>;
spi@0 {
compatible = "spidev";
spi-cpha;
reg = <0>;
spi-max-frequency = <1000000>;
};
};
ad9361: ad9361@79020000 {
compatible = "generic-uio";
reg = <0x79020000 0x6000>;
};
We will also add this information on our wiki soon.
Thanks,
Dragos
Actions Like • 0
sbjaver
@ DragosB on 13 Jun, 2014 12:51 PM
Dragos,
I've confirmed this works. I did have problems on an older version of the kernel on which i first tried
it, not sure why. But updating to the following and all works as i hoped:
commit df77180ff6c897c6869498097158e9edf16cf838 (HEAD, xcomm_zynq)
Author: Lars-Peter Clausen < lars@metafoo.de>
Date: Wed Jun 11 14:38:20 2014 +0200
iio: ad9361: Remove unnecessary spi_set_drvdata(NULL)
The core takes already care of setting drvdata to NULL, no need to do this
manually.
Signed-off-by: Lars-Peter Clausen < lars@metafoo.de>
Thanks!
Joe
Actions Like • 0
DragosB
@ sbjaver on 13 Jun, 2014 2:58 PM
Hi Joe,
I'm glad that it works.
Regards,
Dragos
Actions Like • 0
Related Content
ad9361
Recommended Content
Incoming Links
Careers | Contact ADI | About ADI | Investor Relation | News Room | Terms of Use | Privacy and Security |