All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: qcom: msm8916: Additional clock rates for spi
@ 2018-11-20 11:14 Loic Poulain
  2018-11-21 16:39 ` Stephen Boyd
  0 siblings, 1 reply; 3+ messages in thread
From: Loic Poulain @ 2018-11-20 11:14 UTC (permalink / raw)
  To: andy.gross, david.brown; +Cc: linux-arm-msm, linux-clk, Loic Poulain

Add SPI friendly clock rates to the spi freq table.
Today it's not possible to use SPI at lower than 960Khz.
This patch adds 100/250/500/1000 khz configs to the table.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
---
 drivers/clk/qcom/gcc-msm8916.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/clk/qcom/gcc-msm8916.c b/drivers/clk/qcom/gcc-msm8916.c
index ac2b0aa..7d9647c 100644
--- a/drivers/clk/qcom/gcc-msm8916.c
+++ b/drivers/clk/qcom/gcc-msm8916.c
@@ -544,7 +544,11 @@ static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src = {
 };
 
 static const struct freq_tbl ftbl_gcc_blsp1_qup1_6_spi_apps_clk[] = {
+	F(100000, P_XO, 16, 2, 24),
+	F(250000, P_XO, 16, 5, 24),
+	F(500000, P_XO, 8, 5, 24),
 	F(960000, P_XO, 10, 1, 2),
+	F(1000000, P_XO, 4, 5, 24),
 	F(4800000, P_XO, 4, 0, 0),
 	F(9600000, P_XO, 2, 0, 0),
 	F(16000000, P_GPLL0, 10, 1, 5),
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: qcom: msm8916: Additional clock rates for spi
  2018-11-20 11:14 [PATCH] clk: qcom: msm8916: Additional clock rates for spi Loic Poulain
@ 2018-11-21 16:39 ` Stephen Boyd
       [not found]   ` <CAMZdPi-NkqRiUqvszbbK+BRc1Zd1PBFDp3bo5PLSNVscQVebDw@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Boyd @ 2018-11-21 16:39 UTC (permalink / raw)
  To: Loic Poulain, andy.gross, david.brown
  Cc: linux-arm-msm, linux-clk, Loic Poulain

Quoting Loic Poulain (2018-11-20 03:14:56)
> Add SPI friendly clock rates to the spi freq table.
> Today it's not possible to use SPI at lower than 960Khz.
> This patch adds 100/250/500/1000 khz configs to the table.

s/khz/kHz/

> 
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
> ---
>  drivers/clk/qcom/gcc-msm8916.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/clk/qcom/gcc-msm8916.c b/drivers/clk/qcom/gcc-msm8916.c
> index ac2b0aa..7d9647c 100644
> --- a/drivers/clk/qcom/gcc-msm8916.c
> +++ b/drivers/clk/qcom/gcc-msm8916.c
> @@ -544,7 +544,11 @@ static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src = {
>  };
>  
>  static const struct freq_tbl ftbl_gcc_blsp1_qup1_6_spi_apps_clk[] = {
> +       F(100000, P_XO, 16, 2, 24),
> +       F(250000, P_XO, 16, 5, 24),
> +       F(500000, P_XO, 8, 5, 24),
>         F(960000, P_XO, 10, 1, 2),
> +       F(1000000, P_XO, 4, 5, 24),

Does Qualcomm have information on these rates? Have they been tested?
And did you measure these frequencies? The math checks out, but I wonder
if the hardware can actually do it.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: qcom: msm8916: Additional clock rates for spi
       [not found]   ` <CAMZdPi-NkqRiUqvszbbK+BRc1Zd1PBFDp3bo5PLSNVscQVebDw@mail.gmail.com>
@ 2018-11-21 18:44     ` Stephen Boyd
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2018-11-21 18:44 UTC (permalink / raw)
  To: Loic Poulain, Taniya Das
  Cc: Andy Gross, David Brown, linux-arm-msm, linux-clk

Quoting Loic Poulain (2018-11-21 09:36:05)
> Hi Stephen,
> 
> On Wed, 21 Nov 2018 at 17:39, Stephen Boyd <sboyd@kernel.org> wrote:
> 
>     Quoting Loic Poulain (2018-11-20 03:14:56)
>     > Add SPI friendly clock rates to the spi freq table.
>     > Today it's not possible to use SPI at lower than 960Khz.
>     > This patch adds 100/250/500/1000 khz configs to the table.
> 
>     s/khz/kHz/
> 
>     >
>     > Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
>     > ---
>     >  drivers/clk/qcom/gcc-msm8916.c | 4 ++++
>     >  1 file changed, 4 insertions(+)
>     >
>     > diff --git a/drivers/clk/qcom/gcc-msm8916.c b/drivers/clk/qcom/
>     gcc-msm8916.c
>     > index ac2b0aa..7d9647c 100644
>     > --- a/drivers/clk/qcom/gcc-msm8916.c
>     > +++ b/drivers/clk/qcom/gcc-msm8916.c
>     > @@ -544,7 +544,11 @@ static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src =
>     {
>     >  };
>     > 
>     >  static const struct freq_tbl ftbl_gcc_blsp1_qup1_6_spi_apps_clk[] = {
>     > +       F(100000, P_XO, 16, 2, 24),
>     > +       F(250000, P_XO, 16, 5, 24),
>     > +       F(500000, P_XO, 8, 5, 24),
>     >         F(960000, P_XO, 10, 1, 2),
>     > +       F(1000000, P_XO, 4, 5, 24),
> 
>     Does Qualcomm have information on these rates? Have they been tested?
>     And did you measure these frequencies? The math checks out, but I wonder
>     if the hardware can actually do it.
> 
> 
> No info from QCOM, I just tested this on a Dragonboard-410C/APQ8016 and
> measured SPI clk with a Logic Analyzer.
> Frequencies match expected values.
> 

Ok. Taniya, can you help here and add a Reviewed-by?


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-21 18:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-20 11:14 [PATCH] clk: qcom: msm8916: Additional clock rates for spi Loic Poulain
2018-11-21 16:39 ` Stephen Boyd
     [not found]   ` <CAMZdPi-NkqRiUqvszbbK+BRc1Zd1PBFDp3bo5PLSNVscQVebDw@mail.gmail.com>
2018-11-21 18:44     ` Stephen Boyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.