Skip to content
  1. Apr 03, 2022
  2. Mar 30, 2022
    • Stephen Boyd's avatar
      Merge branches 'clk-sifive' and 'clk-visconti' into clk-next · cf683abd
      Stephen Boyd authored
      * clk-sifive:
        clk: sifive: Move all stuff into SoCs header files from C files
        clk: sifive: Add SoCs prefix in each SoCs-dependent data
        riscv: dts: Change the macro name of prci in each device node
        dt-bindings: change the macro name of prci in header files and example
        clk: sifive: duplicate the macro definitions for the time being
      
      * clk-visconti:
        clk: visconti: prevent array overflow in visconti_clk_register_gates()
      cf683abd
    • Stephen Boyd's avatar
      Merge branches 'clk-range', 'clk-uniphier', 'clk-apple' and 'clk-qcom' into clk-next · c64dd8ea
      Stephen Boyd authored
       - Make clk_set_rate_range() re-evaluate the limits each time
       - Introduce various clk_set_rate_range() tests
       - Add clk_drop_range() to drop a previously set range
       - Support for NCO blocks on Apple SoCs
      
      * clk-range:
        clk: Drop the rate range on clk_put()
        clk: test: Test clk_set_rate_range on orphan mux
        clk: Initialize orphan req_rate
        clk: bcm: rpi: Run some clocks at the minimum rate allowed
        clk: bcm: rpi: Set a default minimum rate
        clk: bcm: rpi: Add variant structure
        clk: Add clk_drop_range
        clk: Always set the rate on clk_set_range_rate
        clk: Use clamp instead of open-coding our own
        clk: Always clamp the rounded rate
        clk: Enforce that disjoints limits are invalid
        clk: Introduce Kunit Tests for the framework
        clk: Fix clk_hw_get_clk() when dev is NULL
      
      * clk-uniphier:
        clk: uniphier: Fix fixed-rate initialization
      
      * clk-apple:
        clk: clk-apple-nco: Allow and fix module building
        MAINTAINERS: Add clk-apple-nco under ARM/APPLE MACHINE
        clk: clk-apple-nco: Add driver for Apple NCO
        dt-bindings: clock: Add Apple NCO
      
      * clk-qcom: (61 commits)
        clk: qcom: gcc-msm8994: Fix gpll4 width
        dt-bindings: clock: fix dt_binding_check error for qcom,gcc-other.yaml
        clk: qcom: Add display clock controller driver for SM6125
        dt-bindings: clock: add QCOM SM6125 display clock bindings
        clk: qcom: Fix sorting of SDX_GCC_65 in Makefile and Kconfig
        clk: qcom: gcc: Add emac GDSC support for SM8150
        clk: qcom: gcc: sm8150: Fix some identation issues
        clk: qcom: gcc: Add UFS_CARD and UFS_PHY GDSCs for SM8150
        clk: qcom: gcc: Add PCIe0 and PCIe1 GDSC for SM8150
        clk: qcom: clk-rcg2: Update the frac table for pixel clock
        clk: qcom: clk-rcg2: Update logic to calculate D value for RCG
        clk: qcom: smd: Add missing MSM8998 RPM clocks
        clk: qcom: smd: Add missing RPM clocks for msm8992/4
        dt-bindings: clock: qcom: rpmcc: Add RPM Modem SubSystem (MSS) clocks
        clk: qcom: gcc-ipq806x: add CryptoEngine resets
        dt-bindings: reset: add ipq8064 ce5 resets
        clk: qcom: gcc-ipq806x: add CryptoEngine clocks
        dt-bindings: clock: add ipq8064 ce5 clk define
        clk: qcom: gcc-ipq806x: add additional freq for sdc table
        clk: qcom: clk-rcg: add clk_rcg_floor_ops ops
        ...
      c64dd8ea
    • Stephen Boyd's avatar
      Merge branches 'clk-starfive', 'clk-ti', 'clk-terminate' and 'clk-cleanup' into clk-next · 4222744d
      Stephen Boyd authored
       - Audio clks on StarFive JH7100 RISC-V SoC
       - Terminate arrays with sentinels and make that clearer
       - Cleanup SPDX tags
       - Fix typos in comments
      
      * clk-starfive:
        clk: starfive: Add JH7100 audio clock driver
        clk: starfive: jh7100: Support more clock types
        clk: starfive: jh7100: Make hw clock implementation reusable
        dt-bindings: clock: Add starfive,jh7100-audclk bindings
        dt-bindings: clock: Add JH7100 audio clock definitions
        clk: starfive: jh7100: Handle audio_div clock properly
        clk: starfive: jh7100: Don't round divisor up twice
      
      * clk-ti:
        clk: ti: Drop legacy compatibility clocks for dra7
        clk: ti: Drop legacy compatibility clocks for am4
        clk: ti: Drop legacy compatibility clocks for am3
        clk: ti: Update component clocks to use ti_dt_clk_name()
        clk: ti: Update pll and clockdomain clocks to use ti_dt_clk_name()
        clk: ti: Add ti_dt_clk_name() helper to use clock-output-names
        clk: ti: Use clock-output-names for clkctrl
        clk: ti: Add ti_find_clock_provider() to use clock-output-names
        clk: ti: Optionally parse IO address from parent clock node
        clk: ti: Preserve node in ti_dt_clocks_register()
        clk: ti: Constify clkctrl_name
      
      * clk-terminate:
        clk: actions: Make sentinel elements more obvious
        clk: clps711x: Terminate clk_div_table with sentinel element
        clk: hisilicon: Terminate clk_div_table with sentinel element
        clk: loongson1: Terminate clk_div_table with sentinel element
        clk: actions: Terminate clk_div_table with sentinel element
      
      * clk-cleanup:
        clk: zynq: Update the parameters to zynq_clk_register_periph_clk
        clk: zynq: trivial warning fix
        clk: qcom: sm6125-gcc: fix typos in comments
        clk: ti: clkctrl: fix typos in comments
        clk: COMMON_CLK_LAN966X should depend on SOC_LAN966
        clk: Use of_device_get_match_data()
        clk: bcm2835: Remove unused variable
        clk: tegra: tegra124-emc: Fix missing put_device() call in emc_ensure_emc_driver
        clk: cleanup comments
        clk: socfpga: cleanup spdx tags
      4222744d
    • Stephen Boyd's avatar
      Merge branches 'clk-mvebu', 'clk-const', 'clk-imx' and 'clk-rockchip' into clk-next · 9babf952
      Stephen Boyd authored
       - Mark mux table as const in clk-mux
       - Make the all_lists array const
      
      * clk-mvebu:
        clk: mvebu: use time_is_before_eq_jiffies() instead of open coding it
      
      * clk-const:
        clk: Mark clk_core_evict_parent_cache_subtree() 'target' const
        clk: Mark 'all_lists' as const
        clk: pistachio: Declare mux table as const u32[]
        clk: qcom: Declare mux table as const u32[]
        clk: mmp: Declare mux tables as const u32[]
        clk: hisilicon: Remove unnecessary cast of mux table to u32 *
        clk: mux: Declare u32 *table parameter as const
        clk: nxp: Declare mux table parameter as const u32 *
        clk: nxp: Remove unused variable
      
      * clk-imx: (28 commits)
        dt-bindings: clock: drop useless consumer example
        clk: imx: Select MXC_CLK for i.MX93 clock driver
        clk: imx: remove redundant re-assignment of pll->base
        MAINTAINERS: clk: imx: add git tree and dt-bindings files
        clk: imx: pll14xx: Support dynamic rates
        clk: imx: pll14xx: Add pr_fmt
        clk: imx: pll14xx: explicitly return lowest rate
        clk: imx: pll14xx: name variables after usage
        clk: imx: pll14xx: consolidate rate calculation
        clk: imx: pll14xx: Use FIELD_GET/FIELD_PREP
        clk: imx: pll14xx: Drop wrong shifting
        clk: imx: pll14xx: Use register defines consistently
        clk: imx8mp: remove SYS PLL 1/2 clock gates
        clk: imx8mn: remove SYS PLL 1/2 clock gates
        clk: imx8mm: remove SYS PLL 1/2 clock gates
        clk: imx: add i.MX93 clk
        clk: imx: support fracn gppll
        clk: imx: add i.MX93 composite clk
        dt-bindings: clock: add i.MX93 clock definition
        dt-bindings: clock: Add imx93 clock support
        ...
      
      * clk-rockchip:
        clk: rockchip: re-add rational best approximation algorithm to the fractional divider
        clk/rockchip: Use of_device_get_match_data()
        clk: rockchip: Add CLK_SET_RATE_PARENT to the HDMI reference clock on rk3568
        clk: rockchip: drop CLK_SET_RATE_PARENT from dclk_vop* on rk3568
        clk: rockchip: Add more PLL rates for rk3568
      9babf952
    • Stephen Boyd's avatar
      Merge branches 'clk-xilinx', 'clk-kunit', 'clk-cs2000' and 'clk-renesas' into clk-next · f9fca892
      Stephen Boyd authored
       - Kunit tests for clk-gate implementation
       - Convert Cirrus Logic CS2000P driver to regmap, yamlify DT binding and add
         support for dynamic mode
      
      * clk-xilinx:
        clk: zynqmp: replace warn_once with pr_debug for failed clock ops
      
      * clk-kunit:
        clk: gate: Add some kunit test suites
      
      * clk-cs2000:
        clk: cs2000-cp: convert driver to regmap
        clk: cs2000-cp: freeze config during register fiddling
        clk: cs2000-cp: make clock skip setting configurable
        clk: cs2000-cp: add support for dynamic mode
        clk: cs2000-cp: Make aux output function controllable
        dt-bindings: clock: cs2000-cp: document cirrus,dynamic-mode
        dt-bindings: clock: cs2000-cp: document cirrus,clock-skip flag
        dt-bindings: clock: cs2000-cp: document aux-output-source
        dt-bindings: clock: convert cs2000-cp bindings to yaml
      
      * clk-renesas:
        dt-bindings: clock: renesas: Make example 'clocks' parsable
        clk: rs9: Add Renesas 9-series PCIe clock generator driver
        clk: fixed-factor: Introduce devm_clk_hw_register_fixed_factor_index()
        dt-bindings: clk: rs9: Add Renesas 9-series I2C PCIe clock generator
        clk: renesas: r8a779f0: Add PFC clock
        clk: renesas: r8a779f0: Add I2C clocks
        clk: renesas: r8a779f0: Add WDT clock
        clk: renesas: r8a779f0: Fix RSW2 clock divider
        clk: renesas: rzg2l-cpg: Add support for RZ/V2L SoC
        dt-bindings: clock: renesas: Document RZ/V2L SoC
        dt-bindings: clock: Add R9A07G054 CPG Clock and Reset Definitions
        clk: renesas: r8a779a0: Add CANFD module clock
        clk: renesas: r9a07g044: Update multiplier and divider values for PLL2/3
        clk: renesas: r8a7799[05]: Add MLP clocks
        clk: renesas: r8a779f0: Add SYS-DMAC clocks
      f9fca892
    • Stephen Boyd's avatar
      Merge branches 'clk-microchip', 'clk-si', 'clk-mtk', 'clk-at91' and 'clk-st' into clk-next · 407c04d6
      Stephen Boyd authored
       - Clock configuration on Microchip PolarFire SoCs
       - Free allocations on probe error in Mediatek clk driver
       - Modernize Mediatek clk driver by consolidating code
      
      * clk-microchip:
        clk: microchip: Add driver for Microchip PolarFire SoC
        dt-bindings: clk: microchip: Add Microchip PolarFire host binding
      
      * clk-si:
        clk-si5341: replace snprintf in show functions with sysfs_emit
        clk: si5341: fix reported clk_rate when output divider is 2
      
      * clk-mtk: (32 commits)
        clk: mediatek: Warn if clk IDs are duplicated
        clk: mediatek: mt8195: Implement remove functions
        clk: mediatek: mt8195: Implement error handling in probe functions
        clk: mediatek: mt8195: Hook up mtk_clk_simple_remove()
        clk: mediatek: Unregister clks in mtk_clk_simple_probe() error path
        clk: mediatek: mtk: Implement error handling in register APIs
        clk: mediatek: pll: Implement error handling in register API
        clk: mediatek: mux: Implement error handling in register API
        clk: mediatek: mux: Reverse check for existing clk to reduce nesting level
        clk: mediatek: gate: Implement error handling in register API
        clk: mediatek: cpumux: Implement error handling in register API
        clk: mediatek: mtk: Clean up included headers
        clk: mediatek: Add mtk_clk_simple_remove()
        clk: mediatek: Implement mtk_clk_unregister_composites() API
        clk: mediatek: Implement mtk_clk_unregister_divider_clks() API
        clk: mediatek: Implement mtk_clk_unregister_factors() API
        clk: mediatek: Implement mtk_clk_unregister_fixed_clks() API
        clk: mediatek: pll: Clean up included headers
        clk: mediatek: pll: Implement unregister API
        clk: mediatek: pll: Split definitions into separate header file
        ...
      
      * clk-at91:
        clk: at91: clk-master: remove dead code
        clk: at91: sama7g5: fix parents of PDMCs' GCLK
        clk: at91: sama7g5: Allow MCK1 to be exported and referenced in DT
        clk: at91: allow setting PMC_AUDIOPINCK clock parents via DT
      
      * clk-st:
        clk: stm32mp1: Add parent_data to ETHRX clock
        clk: stm32mp1: Split ETHCK_K into separate MUX and GATE clock
      407c04d6
    • Shubhrajyoti Datta's avatar
      clk: zynq: Update the parameters to zynq_clk_register_periph_clk · a6aa462c
      Shubhrajyoti Datta authored
      
      
      In case there are only one gate or the two_gate is 0 the clk1 clock
      passed is not used. We are passing 0 which is arm_pll.
      Pass a invalid clock instead.
      
      Signed-off-by: default avatarShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
      Link: https://lore.kernel.org/r/20220222130903.17235-3-shubhrajyoti.datta@xilinx.com
      
      
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      a6aa462c
    • Shubhrajyoti Datta's avatar
      clk: zynq: trivial warning fix · d583804c
      Shubhrajyoti Datta authored
      
      
      Fix the below warning
      
      WARNING: Missing a blank line after declarations
      +               int enable = !!(fclk_enable & BIT(i - fclk0));
      +               zynq_clk_register_fclk(i, clk_output_name[i],
      
      Signed-off-by: default avatarShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
      Link: https://lore.kernel.org/r/20220222130903.17235-2-shubhrajyoti.datta@xilinx.com
      
      
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      d583804c
  3. Mar 26, 2022
    • Maxime Ripard's avatar
      clk: Drop the rate range on clk_put() · 7dabfa2b
      Maxime Ripard authored
      When clk_put() is called we don't make another clk_set_rate() call to
      re-evaluate the rate boundaries. This is unlike clk_set_rate_range()
      that evaluates the rate again each time it is called.
      
      However, clk_put() is essentially equivalent to clk_set_rate_range()
      since after clk_put() completes the consumer's boundaries shouldn't be
      enforced anymore.
      
      Let's add a call to clk_set_rate_range() in clk_put() to make sure those
      rate boundaries are dropped and the clock provider drivers can react.
      
      Also add a few tests to make sure this case is covered.
      
      Fixes: c80ac50c
      
       ("clk: Always set the rate on clk_set_range_rate")
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      Link: https://lore.kernel.org/r/20220325161144.1901695-4-maxime@cerno.tech
      
      
      [sboyd@kernel.org: Reword commit text]
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      7dabfa2b
    • Maxime Ripard's avatar
      clk: test: Test clk_set_rate_range on orphan mux · 481f541c
      Maxime Ripard authored
      
      
      A bug recently affected the Tegra30 where calling clk_set_rate_range()
      on a clock would make it change its rate to the minimum.
      
      This was due to the clock in question being a mux that was orphan at
      registration, which lead to the clk_core req_rate being 0, and the
      clk_set_rate_range() function then calling clk_set_rate() with req_rate,
      effectively making that clock running at the minimum rate allowed, even
      though the initial rate was within that range.
      
      Make a test suite to create a mux initially orphan, and then make sure
      that if our clock rate was initially within a given range, then
      enforcing that range won't affect it.
      
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      Link: https://lore.kernel.org/r/20220325161144.1901695-3-maxime@cerno.tech
      
      
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      481f541c
    • Maxime Ripard's avatar
      clk: Initialize orphan req_rate · 5f7e2af0
      Maxime Ripard authored
      When registering a clock that doesn't have a recalc_rate implementation,
      and doesn't have its parent registered yet, we initialize the clk_core
      rate and 'req_rate' fields to 0.
      
      The rate field is later updated when the parent is registered in
      clk_core_reparent_orphans_nolock() using __clk_recalc_rates(), but the
      'req_rate' field is never updated.
      
      This leads to an issue in clk_set_rate_range() and clk_put(), since
      those functions will call clk_set_rate() with the content of 'req_rate'
      to provide drivers with the opportunity to change the rate based on the
      new boundaries. In this case, we would call clk_set_rate() with a rate
      of 0, effectively enforcing the minimum allowed for this clock whenever
      we would call one of those two functions, even though the actual rate
      might be within range.
      
      Let's fix this by setting 'req_rate' in
      clk_core_reparent_orphans_nolock() with the rate field content just
      updated by the call to __clk_recalc_rates().
      
      Fixes: 1c8e6004
      
       ("clk: Add rate constraints to clocks")
      Reported-by: default avatarDmitry Osipenko <dmitry.osipenko@collabora.com>
      Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> # T30 Nexus7
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      Link: https://lore.kernel.org/r/20220325161144.1901695-2-maxime@cerno.tech
      
      
      [sboyd@kernel.org: Reword comment]
      Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
      5f7e2af0
  4. Mar 25, 2022
  5. Mar 19, 2022
  6. Mar 18, 2022
  7. Mar 16, 2022
  8. Mar 12, 2022