1. 15 6月, 2019 1 次提交
    • H
      clk: rockchip: add a type from SGRF-controlled gate clocks · b3b723d8
      Heiko Stuebner 提交于
      Some clk gates on Rockchip SoCs are part of the SGRF (secure general
      register files) and thus only controllable from secure mode, with the
      most prominent example being the watchdog.
      
      In most cases we still want to define this as a real clock though,
      to have complete clock tree and not reference the generic base-clock
      from the devicetree.
      
      So far we've just defined this as factor-1-1 clocks in the clock init,
      so define a special clock-type for it so that this definition can be
      part of the general tree-definition and save some boilerplate code.
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      b3b723d8
  2. 31 5月, 2019 1 次提交
    • T
      treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 · c942fddf
      Thomas Gleixner 提交于
      Based on 3 normalized pattern(s):
      
        this program is free software you can redistribute it and or modify
        it under the terms of the gnu general public license as published by
        the free software foundation either version 2 of the license or at
        your option any later version this program is distributed in the
        hope that it will be useful but without any warranty without even
        the implied warranty of merchantability or fitness for a particular
        purpose see the gnu general public license for more details
      
        this program is free software you can redistribute it and or modify
        it under the terms of the gnu general public license as published by
        the free software foundation either version 2 of the license or at
        your option any later version [author] [kishon] [vijay] [abraham]
        [i] [kishon]@[ti] [com] this program is distributed in the hope that
        it will be useful but without any warranty without even the implied
        warranty of merchantability or fitness for a particular purpose see
        the gnu general public license for more details
      
        this program is free software you can redistribute it and or modify
        it under the terms of the gnu general public license as published by
        the free software foundation either version 2 of the license or at
        your option any later version [author] [graeme] [gregory]
        [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
        [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
        [hk] [hemahk]@[ti] [com] this program is distributed in the hope
        that it will be useful but without any warranty without even the
        implied warranty of merchantability or fitness for a particular
        purpose see the gnu general public license for more details
      
      extracted by the scancode license scanner the SPDX license identifier
      
        GPL-2.0-or-later
      
      has been chosen to replace the boilerplate/reference in 1105 file(s).
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: NAllison Randal <allison@lohutok.net>
      Reviewed-by: NRichard Fontana <rfontana@redhat.com>
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Cc: linux-spdx@vger.kernel.org
      Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.deSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c942fddf
  3. 13 4月, 2019 1 次提交
  4. 07 7月, 2018 2 次提交
  5. 23 3月, 2017 1 次提交
  6. 05 1月, 2017 1 次提交
  7. 02 1月, 2017 2 次提交
  8. 16 11月, 2016 1 次提交
  9. 01 9月, 2016 1 次提交
    • L
      clk: rockchip: add new clock-type for the ddrclk · a4f182bf
      Lin Huang 提交于
      Changing the rate of the DDR clock needs special care, as the DDR
      is of course in use and will react badly if the rate changes under it.
      
      Over time different approaches to handle that were used.
      
      Past SoCs like the rk3288 and before would store some code in SRAM
      while the rk3368 used a SCPI variant and let a coprocessor handle that.
      
      New rockchip platforms like the rk3399 have a dcf controller to do ddr
      frequency scaling, and support for this controller will be implemented
      in the arm-trusted-firmware.
      
      This new clock-type should over time handle all these methods for
      handling DDR rate changes, but right now it will concentrate on the
      SIP interface used to talk to ARM trusted firmware.
      
      The SIP interface counterpart was merged from pull-request #684 [0]
      into the upstream arm-trusted-firmware codebase.
      
      [0] https://github.com/ARM-software/arm-trusted-firmware/pull/684Signed-off-by: NLin Huang <hl@rock-chips.com>
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      a4f182bf
  10. 08 8月, 2016 1 次提交
  11. 09 5月, 2016 1 次提交
    • H
      clk: rockchip: simplify GRF handling in pll clocks · c9c3c6ee
      Heiko Stuebner 提交于
      With the previous commit, the clock drivers now know at init time if the
      GRF regmap is available. That means if it isn't available then, it also
      won't become available later and we can therefore switch PLLs, that need
      the GRF for the lock-status, to read-only mode - similar behaviour as the
      aborting of rate changes we did before.
      
      This saves some conditionals on every rate change and we can also drop
      the rockchip_clk_get_grf function completely.
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      c9c3c6ee
  12. 20 4月, 2016 2 次提交
  13. 28 3月, 2016 1 次提交
  14. 27 3月, 2016 6 次提交
  15. 04 2月, 2016 1 次提交
    • H
      clk: rockchip: add a factor clock type · 29a30c26
      Heiko Stuebner 提交于
      Add a clock type for fixed factor clocks. This allows us to define fixed
      factor clocks where they appear in the clock hierarchy instead of in the
      init function.
      
      The additional factor_gate type, finally allows us to model some last
      parts of the clock tree correctly.
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      29a30c26
  16. 03 1月, 2016 1 次提交
    • H
      clk: rockchip: fix section mismatches with new child-clocks · 5b738403
      Heiko Stübner 提交于
      To model the muxes downstream of fractional dividers we introduced the
      child property, allowing to describe a direct child clock.
      The first implementation seems to cause section warnings, as the core
      clock-tree is marked as initdata while the data pointed to from the
      child element is not.
      
      While there may be some way to also set that missing property in the
      inline notation I didn't find it, so to actually fix the issue for now
      move the sub-definitions into separate declarations that can have
      their own __initdata properties.
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NMichael Turquette <mturquette@baylibre.com>
      5b738403
  17. 24 12月, 2015 1 次提交
  18. 21 12月, 2015 1 次提交
    • H
      clk: rockchip: only enter pll slow-mode directly before reboots on rk3288 · dfff24bd
      Heiko Stuebner 提交于
      As commit 1d33929e ("clk: rockchip: switch PLLs to slow mode before
      reboot for rk3288") states, switching the PLLs to slow-mode is only
      necessary when rebooting using the soft-reset done through the CRU.
      
      The dwc2 controllers used create really big number of interrupts in
      special constellations involving usb-hubs and their number is so high,
      it can even overwhelm the interrupt handler if the cpu-speed os to low.
      
      Right now the PLLs are put into slow-mode in a shutdown syscore_ops
      callback which means it happens on all reboots (not only the soft-reset
      ones) and even on poweroff actions.
      
      This can result in the system not powering off and getting stuck instead,
      so we should move the slow-mode change nearer to the actual reboot action.
      
      For this we introduce the possiblity to also set a callback that gets
      called from the restart-handler directly prior to restarting the system
      and move the shutdown-callback to this new option.
      
      With this the slow-mode switch is done only on the necessary reboots
      and also has a smaller possibility of causing artifacts.
      
      Fixes: 1d33929e ("clk: rockchip: switch PLLs to slow mode before reboot for rk3288")
      Signed-off-by: NHeiko Stuebner <heiko.stuebner@collabora.com>
      Reviewed-by: NDouglas Anderson <dianders@chromium.org>
      dfff24bd
  19. 13 12月, 2015 1 次提交
  20. 24 11月, 2015 2 次提交
  21. 29 7月, 2015 1 次提交
    • D
      clk: rockchip: Fix PLL bandwidth · 2bbfe001
      Douglas Anderson 提交于
      In the TRM we see that BWADJ is "a 12-bit bus that selects the values
      1-4096 for the bandwidth divider (NB)":
       NB = BWADJ[11:0] + 1
      The recommended setting of NB: NB = NF / 2.
      
      So:
        NB = NF / 2
        BWADJ[11:0] + 1 = NF / 2
        BWADJ[11:0] = NF / 2 - 1
      
      Right now, we have:
      
      {                                               \
              .rate   = _rate##U,                     \
              .nr = _nr,                              \
              .nf = _nf,                              \
              .no = _no,                              \
              .bwadj = (_nf >> 1),                    \
      }
      
      That means we set bwadj to NF / 2, not NF / 2 - 1
      
      All of this is a bit confusing because we specify "NR" (the 1-based
      value), "NF" (the 1-based value), "NO" (the 1-based value), but
      "BWADJ" (the 0-based value) instead of "NB" (the 1-based value).
      
      Let's change to working with "NB" and fix the off by one error.  This
      may affect PLL jitter in a small way (hopefully for the better).
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Reviewed-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      2bbfe001
  22. 21 7月, 2015 1 次提交
  23. 07 7月, 2015 4 次提交
  24. 05 6月, 2015 1 次提交
  25. 13 4月, 2015 1 次提交
  26. 28 11月, 2014 1 次提交
    • A
      clk: rockchip: Add support for the mmc clock phases using the framework · 89bf26cb
      Alexandru M Stan 提交于
      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: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NAlexandru M Stan <amstan@chromium.org>
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      89bf26cb
  27. 25 11月, 2014 2 次提交