AnsweredAssumed Answered

AD9371: Error:- Unable to get dev clk

Question asked by Abhisheknaik on Feb 7, 2018
Latest reply on Feb 8, 2018 by mhennerich

Hello Team,

                We are working our AD9371 custom board. Our custom board has AD9371 and couple of low power RF devices, but it does not have AD9528. But we want to test our AD9371 custom board. So we have purchased AD9528 Evk board().

We have also designed interface card to interface between zc706 and custom ad94371 board

We are using Channel output 0 and 1 has devclk for AD9371 and FPGA(Zync zc706 evk) respectively. We are using Channel output 11 and 12 has ref clk for FPGA(Zync zc706) and AD9371 respectively. We are programming AD9528 via SPI lines(P5) in evk board.

                We are using Git driver code(2016_R2). Since we have changed AD9528 output channel we have following changes in dts file.

Changes done in DTS file
                         ad9528-1@0 {
                                #address-cells = <0x1>;
                                #size-cells = <0x0>;
                                #clock-cells = <0x1>;
                                compatible = "ad9528";
                                spi-cpol;
                                spi-cpha;
                                spi-max-frequency = <0x989680>;
                                reg = <0x0>;
                                clock-output-names = "ad9528-1_out0", "ad9528-1_out1", "ad9528-1_out2", "ad9528-1_out3", "ad9528-1_out4", "ad9528-1_out5", "ad9528-1_out6", "ad9528-1_out7", "ad9528-1_out8", "ad9528-1_out9", "ad9528-1_out10", "ad9528-1_out11", "ad9528-1_out12", "ad9528-1_out13";
                                adi,vcxo-freq = <0x7530000>;
                                adi,refa-enable;
                                adi,refa-diff-rcv-enable;
                                adi,refa-r-div = <0x4>;
                                adi,osc-in-cmos-neg-inp-enable;
                                adi,pll1-feedback-div = <0x4>;
                                adi,pll1-charge-pump-current-nA = <0x1388>;
                                adi,pll2-ndiv-a-cnt = <0x2>;
                                adi,pll2-ndiv-b-cnt = <0x7>;
                                adi,pll2-vco-diff-m1 = <0x3>;
                                adi,pll2-n2-div = <0xa>;
                                adi,pll2-r1-div = <0x1>;
                                adi,pll2-charge-pump-current-nA = <0xc4888>;
                                adi,sysref-src = <0x2>;
                                adi,sysref-pattern-mode = <0x1>;
                                adi,sysref-k-div = <0x200>;
                                adi,sysref-request-enable;
                                adi,sysref-nshot-mode = <0x3>;
                                adi,sysref-request-trigger-mode = <0x0>;
                                adi,rpole2 = <0x0>;
                                adi,rzero = <0x7>;
                                adi,cpole1 = <0x2>;
                                adi,status-mon-pin0-function-select = <0x1>;
                                adi,status-mon-pin1-function-select = <0x7>;
                                reset-gpios = <0x4 0x71 0x0>;
                                linux,phandle = <0x8>;
                                phandle = <0x8>;

 

                              channel@0 {
                                        reg = <0x0>;
                                        adi,extended-name = "DEV_CLK";
                                        adi,driver-mode = <0x0>;
                                        adi,divider-phase = <0x0>;
                                        adi,channel-divider = <0xa>;
                                        adi,signal-source = <0x0>;
                                };

 

                                channel@1 {
                                        reg = <0x1>;
                                        adi,extended-name = "FMC_CLK";
                                        adi,driver-mode = <0x0>;
                                        adi,divider-phase = <0x0>;
                                        adi,channel-divider = <0xa>;
                                        adi,signal-source = <0x0>;
                                };

 

                                channel@12 {
                                        reg = <0xc>;
                                        adi,extended-name = "DEV_SYSREF";
                                        adi,driver-mode = <0x0>;
                                        adi,divider-phase = <0x0>;
                                        adi,channel-divider = <0xa>;
                                        adi,signal-source = <0x2>;
                                };

 

                                channel@11 {
                                        reg = <0xb>;
                                        adi,extended-name = "FMC_SYSREF";
                                        adi,driver-mode = <0x0>;
                                        adi,divider-phase = <0x0>;
                                        adi,channel-divider = <0xa>;
                                        adi,signal-source = <0x2>;
                                };
};

                 We have check using CRO, we are getting Dev clk and sysref clk. But ad9371 driver fails giving following error.

Boot up logs
[ 1.333901] ad9371 spi32766.1: ad9371_probe : enter
[ 1.338708] ***************Asmaitha==> get clk by name ==> jesd_rx_clk
[ 1.345257] ***************Asmaitha==> allocate mykonos device
[ 1.351966] ***************Asmaitha==> parse dt
[ 1.356435] ***************Asmaitha==> reset device
[ 1.361308] ***************Asmaitha==> get clk by name ==> jesd_tx_clk
[ 1.367798] ***************Asmaitha==> get clk by name ==> jesd_os_clk
[ 1.374325] ***************Asmaitha==> get clk by name ==> dev_clk
[ 1.380494] ***************Asmaitha==> get clk by name ==> fmc_clk
[ 1.386613] ***************Asmaitha==> get clk_prepare_enable ==> fmc_clk
[ 1.393396] ***************Asmaitha==> clk_prepare_enable ==> dev_clk
[ 1.399829] ad9371 spi32766.1: Requesting device clock 122880000 failed got 0
[ 1.406930] ad9371 spi32766.1: Requesting device clock 122880000 failed got 0
[ 1.414080] ad9371: probe of spi32766.1 failed with error -22

                  Please Let us know if we are missing output something. Is there any else to be done in dts or linux kernel?

 

Thanks and Regards,

Abhishek

Outcomes