29 Dec, 2014

1 commit

  • Commit 0e5bdb3f9fa5 (clk: rockchip: switch to using the new cpuclk type
    for armclk) didn't take into account that the divider used on rk3288
    are of the (n+1) type.

    The rk3066 and rk3188 socs use more complex divider types making it
    necessary for the list-elements to be the real register-values to write.

    Therefore reduce divider values in the table accordingly so that they
    really are the values that should be written to the registers and match
    the dividers actually specified for the rk3288.

    Reported-by: Sonny Rao
    Fixes: 0e5bdb3f9fa5 ("clk: rockchip: switch to using the new cpuclk type for armclk")
    Signed-off-by: Heiko Stuebner
    Reviewed-by: Doug Anderson
    Cc: stable@vger.kernel.org

    Heiko Stuebner
     

28 Nov, 2014

2 commits

  • This patch adds the 2 physical clocks for the mmc (drive and sample). They're
    mostly there for the phase properties, but they also show the true clock
    (by dividing by RK3288_MMC_CLKGEN_DIV).

    The drive and sample phases are generated by dividing an upstream parent clock
    by 2, this allows us to adjust the phase by 90 deg.

    There's also an option to have up to 255 delay elements (40-80 picoseconds long).
    This driver uses those elements (under the assumption that they're 60 ps long)
    to generate approximate 22.5 degrees options. 67.5 (22.5*3) might be as high as
    90 deg if the delay elements are as big as 80 ps, so a finer division (smaller
    than 22.5) was not picked because the phase might not be monotonic anymore.

    Suggested-by: Heiko Stuebner
    Signed-off-by: Alexandru M Stan
    Signed-off-by: Heiko Stuebner

    Alexandru M Stan
     
  • This exposes the clock that comes out of the i2s block which generally
    goes to the audio codec.

    Signed-off-by: Sonny Rao
    [removed CLK_SET_RATE_PARENT from original patch]
    Signed-off-by: Heiko Stuebner

    Sonny Rao
     

27 Nov, 2014

1 commit


25 Nov, 2014

2 commits


16 Nov, 2014

2 commits


13 Nov, 2014

1 commit

  • Currently there is no driver owning these clocks and they have to stay
    up for the system to function properly, so let's mark them as
    CLK_IGNORE_UNUSED.

    Without this patch we have trouble with suspend/resume and we have
    trouble turning the eDP back on if it ever idles off.

    Signed-off-by: Dmitry Torokhov
    Reviewed-by: Doug Anderson
    Tested-by: Doug Anderson
    Reviewed-by: Kever Yang
    Signed-off-by: Heiko Stuebner

    Dmitry Torokhov
     

11 Nov, 2014

1 commit


05 Nov, 2014

1 commit

  • The rockchip clock driver use CLK_IGNORE_UNUSED flag to make sure
    all the clocks are available like default power on state.
    We have implement the clock manage in most of rockchip drivers,
    it is time to remove it for power save.
    Instead we add CLK_IGNORE_UNUSED for some clock nodes which should
    be on during boot or no module driver in kernel will initialize it.

    Signed-off-by: Kever Yang
    Reviewed-by: Doug Anderson
    Tested-by: Doug Anderson
    Signed-off-by: Heiko Stuebner

    Kever Yang
     

30 Oct, 2014

1 commit

  • dclk_vop0/1 is the source of HDMI TMDS clock in rk3288, usually we
    use 594MHz for clock source of dclk_vop0/1.

    HDMI CTS 7-9 require TMDS Clock jitter is lower than 0.25*Tbit:
    TMDS clock(MHz) CTS require jitter (ps)
    297 84.2
    148.5 168
    74.25 336
    27 1247

    PLL BW and VCO frequency effects the jitter of PLL output clock,
    clock jitter is better if BW is lower or VCO frequency is higher.

    If PLL use default setting of RK3066_PLL_RATE( 594000000, 2, 198, 4),
    the TMDS Clock jitter is higher than 250ps, which means we can't
    pass the test when TMDS clock is 297MHz or 148.5MHz.

    If we use RK3066_PLL_RATE_BWADJ(594000000, 1, 198, 8, 1),
    the TMDS Clock jitter is about 60ps and we can pass all test case.

    So we need this patch to make hdmi si test pass.

    Signed-off-by: Kever Yang
    Reviewed-by: Doug Anderson
    Signed-off-by: Heiko Stuebner

    Kever Yang
     

20 Oct, 2014

5 commits


01 Oct, 2014

2 commits

  • Add infrastructure to write the correct value to the restart register and
    register the restart notifier for both rk3188 (including rk3066) and rk3288.

    Signed-off-by: Heiko Stuebner
    Signed-off-by: Guenter Roeck

    Heiko Stübner
     
  • The relation of i2s nodes as follows:
    i2s_src 0 0 594000000 0
    i2s_frac 0 0 11289600 0
    i2s_pre 0 0 11289600 0
    sclk_i2s0 0 0 11289600 0
    i2s0_clkout 0 0 11289600 0
    hclk_i2s0 1 1 99000000 0

    sclk_i2s0 is the master clock, when to set rate of sclk_i2s0, should
    allow to set its parent's rate, by add flag CLK_SET_RATE_PARENT for
    "i2s_frac", "i2s_pre", "i2s0_clkout" and "sclk_i2s0".

    Tested on rk3288 board using max98090, with command "aplay "

    Change-Id: I12faad082566532b65a7de8c0a6845e1c17870e6
    Signed-off-by: Jianqun
    Signed-off-by: Heiko Stuebner

    Jianqun
     

27 Sep, 2014

3 commits

  • This adds the necessary soc-specific divider values and switches the armclk
    to use the newly introduced cpuclk type.

    Signed-off-by: Heiko Stuebner
    Reviewed-by: Doug Anderson
    Tested-by: Doug Anderson

    Heiko Stuebner
     
  • Rockchip SoCs contain clocks tightly bound to the armclk, where the best
    rate / divider is supplied by the vendor after careful measuring.
    Often this ideal rate may be greater than the current rate.

    Therefore prevent the ccf from trying to set these dividers itself by
    setting them to read-only.

    In the case of the rk3066, this also includes the aclk_cpu, which makes it
    necessary to also split its direct child-clocks (pclk_cpu, hclk_cpu, ...)
    into individual definitions for rk3066 and rk3188.

    Signed-off-by: Heiko Stuebner
    Reviewed-by: Doug Anderson
    Tested-by: Doug Anderson

    Heiko Stuebner
     
  • In RK3288, APLL lock status bit is in GRF_SOC_STATUS1,
    but in RK3188, is GRFSOC_STATUS0.

    Signed-off-by: Jianqun

    Also name the constant accordingly as GRF_SOC_STATUS1
    to prevent confusion.
    Signed-off-by: Heiko Stuebner
    Reviewed-by: Doug Anderson
    Tested-by: Doug Anderson

    Jianqun
     

26 Sep, 2014

5 commits


18 Sep, 2014

1 commit


11 Sep, 2014

1 commit


04 Sep, 2014

1 commit

  • The clocks for i2c1 and i2c2 are flipped. The clock tree matched the
    Technical Reference Manual (TRM) but the TRM was wrong. Swap them in
    the clock tree. This was determined experimentally (by Addy) and
    confirmed by the Rockchip IC team.

    Signed-off-by: Doug Anderson
    Reported-by: Addy Ke
    Reviewed-by: Heiko Stuebner
    Signed-off-by: Mike Turquette

    Doug Anderson
     

03 Sep, 2014

1 commit

  • The clock-tree contains clocks that should never get disabled automatically.
    One example are the base ACLKs, the base supplies for all peripherals.

    Therefore add a structure similar to the sunxi clock-tree to protect these
    special clocks from being disabled.

    Signed-off-by: Heiko Stuebner
    Tested-by: Doug Anderson
    Tested-by: Kever Yang
    Signed-off-by: Mike Turquette

    Heiko Stübner
     

14 Jul, 2014

1 commit