* imx53 cspi clock problem
@ 2013-05-22 6:52 Jonas Andersson
2013-05-22 16:47 ` Sascha Hauer
0 siblings, 1 reply; 5+ messages in thread
From: Jonas Andersson @ 2013-05-22 6:52 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
i have found a problem when using the cspi port in a imx53 soc. I am
using kernel 3.10-rc2. This is the dts defenition:
cspi: cspi at 63fc0000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,imx53-cspi", "fsl,imx35-cspi";
reg = <0x63fc0000 0x4000>;
interrupts = <38>;
clocks = <&clks 55>, <&clks 0>;
clock-names = "ipg", "per";
status = "disabled";
};
then in the driver spi-imx.c:
spi_imx->spi_clk = clk_get_rate(spi_imx->clk_per);
clk_get_rate() will return the rate 0. In function mx31_config, this line:
reg |= spi_imx_clkdiv_2(spi_imx->spi_clk, config->speed_hz) <<
MX31_CSPICTRL_DR_SHIFT;
will always configure the port for full speed (16.7 MHz in my system).
This "per" clock rate should be around 67MHz.
Jonas
^ permalink raw reply [flat|nested] 5+ messages in thread
* imx53 cspi clock problem
2013-05-22 6:52 imx53 cspi clock problem Jonas Andersson
@ 2013-05-22 16:47 ` Sascha Hauer
2013-05-23 8:08 ` Jonas Andersson
0 siblings, 1 reply; 5+ messages in thread
From: Sascha Hauer @ 2013-05-22 16:47 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, May 22, 2013 at 08:52:45AM +0200, Jonas Andersson wrote:
> Hi,
>
> i have found a problem when using the cspi port in a imx53 soc. I am
> using kernel 3.10-rc2. This is the dts defenition:
>
> cspi: cspi at 63fc0000 {
> #address-cells = <1>;
> #size-cells = <0>;
> compatible = "fsl,imx53-cspi", "fsl,imx35-cspi";
> reg = <0x63fc0000 0x4000>;
> interrupts = <38>;
> clocks = <&clks 55>, <&clks 0>;
Unlike the eCSPI controller the CSPI controller seems to have only one
clock. This should probably be
clocks = <&clks 55>, <&clks 55>;
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 5+ messages in thread
* imx53 cspi clock problem
2013-05-22 16:47 ` Sascha Hauer
@ 2013-05-23 8:08 ` Jonas Andersson
2013-05-23 8:33 ` Sascha Hauer
0 siblings, 1 reply; 5+ messages in thread
From: Jonas Andersson @ 2013-05-23 8:08 UTC (permalink / raw)
To: linux-arm-kernel
On 2013-05-22 18:47, Sascha Hauer wrote:
> On Wed, May 22, 2013 at 08:52:45AM +0200, Jonas Andersson wrote:
>> compatible = "fsl,imx53-cspi", "fsl,imx35-cspi";
>> reg = <0x63fc0000 0x4000>;
>> interrupts = <38>;
>> clocks = <&clks 55>, <&clks 0>;
> Unlike the eCSPI controller the CSPI controller seems to have only one
> clock. This should probably be
>
> clocks = <&clks 55>, <&clks 55>;
>
This works fine.
Is it the right solution to define both clocks to the same in all the
imx*.dtsi files? imx25.dtsi defines only one clock "ipg" so
spi_imx_probe() will probably fail.
Jonas
^ permalink raw reply [flat|nested] 5+ messages in thread
* imx53 cspi clock problem
2013-05-23 8:08 ` Jonas Andersson
@ 2013-05-23 8:33 ` Sascha Hauer
2013-05-23 8:44 ` Jonas Andersson
0 siblings, 1 reply; 5+ messages in thread
From: Sascha Hauer @ 2013-05-23 8:33 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, May 23, 2013 at 10:08:59AM +0200, Jonas Andersson wrote:
> On 2013-05-22 18:47, Sascha Hauer wrote:
> >On Wed, May 22, 2013 at 08:52:45AM +0200, Jonas Andersson wrote:
> >> compatible = "fsl,imx53-cspi", "fsl,imx35-cspi";
> >> reg = <0x63fc0000 0x4000>;
> >> interrupts = <38>;
> >> clocks = <&clks 55>, <&clks 0>;
> >Unlike the eCSPI controller the CSPI controller seems to have only one
> >clock. This should probably be
> >
> > clocks = <&clks 55>, <&clks 55>;
> >
> This works fine.
>
> Is it the right solution to define both clocks to the same in all
> the imx*.dtsi files? imx25.dtsi defines only one clock "ipg" so
> spi_imx_probe() will probably fail.
Yes, they should all be fixed that way. Care to send a patch?
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 5+ messages in thread
* imx53 cspi clock problem
2013-05-23 8:33 ` Sascha Hauer
@ 2013-05-23 8:44 ` Jonas Andersson
0 siblings, 0 replies; 5+ messages in thread
From: Jonas Andersson @ 2013-05-23 8:44 UTC (permalink / raw)
To: linux-arm-kernel
On 2013-05-23 10:33, Sascha Hauer wrote:
> Yes, they should all be fixed that way. Care to send a patch?
>
Yes i can send a patch.
Jonas
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-05-23 8:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-22 6:52 imx53 cspi clock problem Jonas Andersson
2013-05-22 16:47 ` Sascha Hauer
2013-05-23 8:08 ` Jonas Andersson
2013-05-23 8:33 ` Sascha Hauer
2013-05-23 8:44 ` Jonas Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).