AnsweredAssumed Answered

RE: How do I configure the AD9122 dts entry to use a fixed clock?

Question asked by EdwardK on Aug 27, 2015
Latest reply on Aug 28, 2015 by EdwardK

1) It is possible to use 3 fixed-clocks sort of like this? I can't control these references in anyway. There are turned on at power-up.

 

Current dts entry:

/{

  fixed_ref_clk: clock@0 { /* Fixed reference clock */

  compatible = "fixed-clock";

  #clock-cells = <0>;

  clock-frequency = <100000000>;

  clock-accuracy = <5>; /* ppb */

  };

 

  dac_data_clk: clock@1 { /* DAC DCO */

  compatible = "fixed-clock";

  #clock-cells = <0>;

  clock-frequency = <245760000>;

  clock-accuracy = <5>; /* ppb */

  };

 

  dac_clk: clock@2 { /* DAC CLK */

  compatible = "fixed-clock";

  #clock-cells = <0>;

  clock-frequency = <245760000>;

  clock-accuracy = <5>; /* ppb */

  };

};

 

&SPI_axi_quad_spi_0 {

  #address-cells = <1>;

  #size-cells = <0>;

 

  dac_ad9122: dac-ad9122@0 {

  #address-cells = <1>;

  #size-cells = <0>;

  compatible = "ad9122";

  reg = <0>;

  spi-max-frequency = <10000000>;

clocks = <&dac_data_clk>, <&dac_clk>, <&fixed_ref_clk>;

  clock-names = "data_clk", "dac_clk", "ref_clk";

  dac-fcenter-shift = <0>;

  dac-interp-factor = <2>;

  /*dac-data-rate = <491520000>;*/

  dac-data-rate = <245760000>;

  temp-sensor-calibration-temperature-mdeg = <25000>;

};

  };

 

2) This entry fails as follows: printk(KERN_ERR "%s:%d, %p, %d, (%s:%s)\n",__FILE__,__LINE__, clk, IS_ERR(clk), clk_names[i]);

 

  [21507.925538] drivers/iio/frequency/ad9122.c:362, fffffdfb, 1, data_clk)
[21507.925551] ad9122 spi1.0: Failed to get clocks


mhennerich

Outcomes