Re: [PATCH] ARC: [plat-axs10x]: DTS: fix sdio ciu frequency

From: Eugeniy Paltsev
Date: Wed Sep 13 2017 - 11:15:03 EST


On Tue, 2017-09-12 at 11:38 -0700, Vineet Gupta wrote:
> On 09/12/2017 11:20 AM, Eugeniy Paltsev wrote:
> > DW sdio controller has external ciu clock divider controlled
> > via register in SDIO IP. It divides sdio_ref_clk
> > (which comes from CGU) by 16 for default. So default mmcclk
> > clock (which comes to sdk_in) is 25000000 Hz.
> >
> > So fix wrong current value (50000000 Hz) to actual 25000000 Hz.
>
> Is this a preventive fix or there are known issues with what we have today.

Yes, it's kinda a preventive fix.
We check axs10xÂciu frequency when we found what hsdkÂciu frequency was wrong
and found that it is wring too.

I tried to run SD stress test with wrong ciuÂfrequency (50000000 Hz) and it passed
successfully, but we must take into account the fact that it depends on SD
card itself. For example: this SD card mostly works fine on HSDK with ciuÂ
frequency 8x timesÂhigher than expected!

Alexey says that he faced with unstable SD card work on axs103 earlier but
he didn't save any artifacts about it.

> Is this triggered after addition of AXS clk driver ?
No.

> >
> > Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@xxxxxxxxxxxx>
> > ---
> > Â arch/arc/boot/dts/axs10x_mb.dtsi | 9 ++++++++-
> > Â 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/arc/boot/dts/axs10x_mb.dtsi b/arch/arc/boot/dts/axs10x_mb.dtsi
> > index 0ff7e07..7bdf581 100644
> > --- a/arch/arc/boot/dts/axs10x_mb.dtsi
> > +++ b/arch/arc/boot/dts/axs10x_mb.dtsi
> > @@ -44,7 +44,14 @@
> > ÂÂ
> > ÂÂ mmcclk: mmcclk {
> > ÂÂ compatible = "fixed-clock";
> > - clock-frequency = <50000000>;
> > + /*
> > + Â* DW sdio controller has external ciu clock divider
> > + Â* controlled via register in SDIO IP. It divides
> > + Â* sdio_ref_clk (which comes from CGU) by 16 for
> > + Â* default. So default mmcclk clock (which comes
> > + Â* to sdk_in) is 25000000 Hz.
> > + Â*/
> > + clock-frequency = <25000000>;
> > ÂÂ #clock-cells = <0>;
> > ÂÂ };
> > ÂÂ
>
>
--
ÂEugeniy Paltsev