1. 11 Jul, 2020 4 commits
    • Stephen Boyd's avatar
      Merge branch 'clk-qcom' into clk-next · d39fc265
      Stephen Boyd authored
       - Enable CPU clks on Qualcomm MSM8996 SoCs
      
      * clk-qcom:
        clk: qcom: Add CPU clock driver for msm8996
        dt-bindings: clk: qcom: Add bindings for CPU clock for msm8996
        soc: qcom: Separate kryo l2 accessors from PMU driver
        clk: qcom: Fix return value check in apss_ipq6018_probe()
      d39fc265
    • Loic Poulain's avatar
      clk: qcom: Add CPU clock driver for msm8996 · 03e342dc
      Loic Poulain authored
      Each of the CPU clusters (Power and Perf) on msm8996 are
      clocked via 2 PLLs, a primary and alternate. There are also
      2 Mux'es, a primary and secondary all connected together
      as shown below
      
                                   +-------+
                    XO             |       |
                +------------------>0      |
                                   |       |
                         PLL/2     | SMUX  +----+
                           +------->1      |    |
                           |       |       |    |
                           |       +-------+    |    +-------+
                           |                    +---->0      |
                           |                         |       |
      +---------------+    |             +----------->1      | CPU clk
      |Primary PLL    +----+ PLL_EARLY   |           |       +------>
      |               +------+-----------+    +------>2 PMUX |
      +---------------+      |                |      |       |
                             |   +------+     |   +-->3      |
                             +--^+  ACD +-----+   |  +-------+
      +---------------+          +------+         |
      |Alt PLL        |                           |
      |               +---------------------------+
      +---------------+         PLL_EARLY
      
      The primary PLL is what drives the CPU clk, except for times
      when we are reprogramming the PLL itself (for rate changes) when
      we temporarily switch to an alternate PLL. A subsequent patch adds
      support to switch between primary and alternate PLL during rate
      changes.
      
      The primary PLL operates on a single VCO range, between 600MHz
      and 3GHz. However the CPUs do support OPPs with frequencies
      between 300MHz and 600MHz. In order to support running the CPUs
      at those frequencies we end up having to lock the PLL at twice
      the rate and drive the CPU clk via the PLL/2 output and SMUX.
      
      So for frequencies above 600MHz we follow the following path
       Primary PLL --> PLL_EARLY --> PMUX(1) --> CPU clk
      and for frequencies between 300MHz and 600MHz we follow
       Primary PLL --> PLL/2 --> SMUX(1) --> PMUX(0) --> CPU clk
      
      ACD stands for Adaptive Clock Distribution and is used to
      detect voltage droops.
      Signed-off-by: default avatarRajendra Nayak <rnayak@codeaurora.org>
      Rajendra Nayak: Initial RFC - https://lkml.org/lkml/2016/9/29/84Signed-off-by: default avatarIlia Lin <ilialin@codeaurora.org>
      Ilia Lin:  - reworked clock registering
                 - Added clock-tree diagram
                 - non-builtin support
                 - clock notifier on rate change
                 - https://lkml.org/lkml/2018/5/24/123Signed-off-by: default avatarLoic Poulain <loic.poulain@linaro.org>
      Loic Poulain: - fixed driver remove / clk deregistering
                    - Removed useless memory barriers
                    - devm usage when possible
                    - Fixed Kconfig depends
      
      Link: https://lore.kernel.org/r/1593766185-16346-3-git-send-email-loic.poulain@linaro.orgSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      03e342dc
    • Ilia Lin's avatar
      dt-bindings: clk: qcom: Add bindings for CPU clock for msm8996 · 2283f9e0
      Ilia Lin authored
      Each of the CPU clusters (Power and Perf) on msm8996 are
      clocked via 2 PLLs, a primary and alternate. There are also
      2 Mux'es, a primary and secondary all connected together
      as shown below
      
                                   +-------+
                    XO             |       |
                +------------------>0      |
                                   |       |
                         PLL/2     | SMUX  +----+
                           +------->1      |    |
                           |       |       |    |
                           |       +-------+    |    +-------+
                           |                    +---->0      |
                           |                         |       |
      +---------------+    |             +----------->1      | CPU clk
      |Primary PLL    +----+ PLL_EARLY   |           |       +------>
      |               +------+-----------+    +------>2 PMUX |
      +---------------+      |                |      |       |
                             |   +------+     |   +-->3      |
                             +--^+  ACD +-----+   |  +-------+
      +---------------+          +------+         |
      |Alt PLL        |                           |
      |               +---------------------------+
      +---------------+         PLL_EARLY
      
      The primary PLL is what drives the CPU clk, except for times
      when we are reprogramming the PLL itself (for rate changes) when
      we temporarily switch to an alternate PLL. A subsequent patch adds
      support to switch between primary and alternate PLL during rate
      changes.
      
      The primary PLL operates on a single VCO range, between 600MHz
      and 3GHz. However the CPUs do support OPPs with frequencies
      between 300MHz and 600MHz. In order to support running the CPUs
      at those frequencies we end up having to lock the PLL at twice
      the rate and drive the CPU clk via the PLL/2 output and SMUX.
      Signed-off-by: default avatarIlia Lin <ilialin@codeaurora.org>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Link: https://lore.kernel.org/r/1593766185-16346-4-git-send-email-loic.poulain@linaro.orgSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      2283f9e0
    • Ilia Lin's avatar
      soc: qcom: Separate kryo l2 accessors from PMU driver · 6d0efeb1
      Ilia Lin authored
      The driver provides kernel level API for other drivers
      to access the MSM8996 L2 cache registers.
      Separating the L2 access code from the PMU driver and
      making it public to allow other drivers use it.
      The accesses must be separated with a single spinlock,
      maintained in this driver.
      Signed-off-by: default avatarIlia Lin <ilialin@codeaurora.org>
      Signed-off-by: default avatarLoic Poulain <loic.poulain@linaro.org>
      Link: https://lore.kernel.org/r/1593766185-16346-2-git-send-email-loic.poulain@linaro.orgAcked-by: default avatarWill Deacon <will@kernel.org>
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      6d0efeb1
  2. 29 Jun, 2020 1 commit
  3. 26 Jun, 2020 2 commits
    • Stephen Boyd's avatar
      Merge branch 'clk-bcm' into clk-next · 12ef3933
      Stephen Boyd authored
       - Make defines for bcm63xx-gate clks to use in DT
       - Support gate clks on BCM6318 SoCs
       - Add HDMI clks for BCM2711 SoCs
       - Support BCM2711 SoC firmware clks
      
      * clk-bcm: (42 commits)
        clk: bcm: dvp: Add missing module informations
        clk: bcm: rpi: Remove the quirks for the CPU clock
        clk: bcm2835: Don't cache the PLLB rate
        clk: bcm2835: Allow custom CCF flags for the PLLs
        Revert "clk: bcm2835: remove pllb"
        clk: bcm: rpi: Give firmware clocks a name
        clk: bcm: rpi: Discover the firmware clocks
        clk: bcm: rpi: Add an enum for the firmware clocks
        clk: bcm: rpi: Add DT provider for the clocks
        clk: bcm: rpi: Make the PLLB registration function return a clk_hw
        clk: bcm: rpi: Split pllb clock hooks
        clk: bcm: rpi: Rename is_prepared function
        clk: bcm: rpi: Pass the clocks data to the firmware function
        clk: bcm: rpi: Add clock id to data
        clk: bcm: rpi: Create a data structure for the clocks
        clk: bcm: rpi: Use CCF boundaries instead of rolling our own
        clk: bcm: rpi: Make sure the clkdev lookup is removed
        clk: bcm: rpi: Switch to clk_hw_register_clkdev
        clk: bcm: rpi: Remove pllb_arm_lookup global pointer
        clk: bcm: rpi: Make sure pllb_arm is removed
        ...
      12ef3933
    • Maxime Ripard's avatar
      clk: bcm: dvp: Add missing module informations · eb46f547
      Maxime Ripard authored
      The driver for the DVP controller in the BCM2711 was missing the MODULE_*
      macros resulting in a modpost warning at compilation.
      
      Fixes: 1bc95972 ("clk: bcm: Add BCM2711 DVP driver")
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      Link: https://lore.kernel.org/r/20200626112513.90816-1-maxime@cerno.techSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      eb46f547
  4. 23 Jun, 2020 7 commits
  5. 22 Jun, 2020 7 commits
  6. 20 Jun, 2020 19 commits