Imx233 spi speed - Mainline Kernel

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Imx233 spi speed - Mainline Kernel

600 Views
pierreparent
Contributor III

Hi,

I don't succeed in configuring SPI Hz-Speed with mailine kernel (4.0.3).

Here is my dts:

        ssp1: ssp@80034000 {
   #address-cells = <1>;
   #size-cells = <0>;
   compatible = "fsl,imx23-spi";
   pinctrl-names = "default";
   pinctrl-0 = <&spi2_pins_a>;
   status = "okay";
   clock-frequency = <5000000>;

   spidev: spidev@0 {
   compatible = "spidev";
  spi-max-frequency = <5000000>;
   reg = <0>;
  };

   };

But whatever I tried the spi_clock remains at 1mhz!

Does anyone know how to solve this problem?

Thanks in advance,

Pierre.

Labels (2)
0 Kudos
2 Replies

405 Views
b36401
NXP Employee
NXP Employee

You can change fuses for SSP clock according to table 7-53 "HW_OCOTP_ROM0" of i.MX23 Reference Manual.

11:8  - SSP_SCK_INDEX Index to SSP clock speed.

0000 = 240kHz

0010 = 1MHz           0011 = 2MHz

0100 = 4 MHz          0101 = 6MHz

0110 = 8MHz           0111 = 10MHz

1000 = 12MHz        1001 = 16MHz

1010 = 20MHz        1011 = 24MHz

1100 = 40MHz        1101 = 48MHz

1110 = 240kHz

Have a great day,

Victor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

405 Views
pierreparent
Contributor III

I think it comes form the function void mxs_ssp_set_clk_rate(struct mxs_ssp *ssp, unsigned int rate) in file  clk-ssp.c which should change clock speed but does not work, I don't know why yet.

0 Kudos