1. 23 Jun, 2017 1 commit
  2. 22 Jun, 2017 1 commit
    • Krzysztof Kozlowski's avatar
      clk: samsung: audss: Fix silent hang on Exynos4412 due to disabled EPLL · 5bb4053b
      Krzysztof Kozlowski authored
      Similarly to commit f1e9203e ("clk: samsung: Fix Exynos 5420 pinctrl
      setup and clock disable failure due to domain being gated") for
      Exynos5420, the Exynos4412 also requires that EPLL is not disabled.
      Otherwise any access to MAUDIO block will silently halt.
      
      This was not visible before because EPLL on Exynos4 could not be
      disabled before commit 6edfa11c ("clk: samsung:
      Add enable/disable operation for PLL36XX clocks").  After this commit,
      on Odroid U3 board one can see silent hang, usually with last (but
      unrelated) messages:
      
      	[    2.382741] input: gpio_keys as /devices/platform/gpio_keys/input/input0
      	[    2.405686] usb 1-3: new high-speed USB device number 3 using exynos-ehci
      	[    2.419843] max77686-rtc max77686-rtc: setting system clock to 2017-06-21 17:04:13 UTC (1498064653)
      
      Mark Exynos4 variant as also needed EPLL to be enabled all the time.
      Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
      Reviewed-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      5bb4053b
  3. 21 Jun, 2017 4 commits
  4. 20 Jun, 2017 20 commits
  5. 19 Jun, 2017 4 commits
    • Leo Yan's avatar
      clk: Hi3660: register fixed_rate_clks with CLK_OF_DECLARE_DRIVER · a925810f
      Leo Yan authored
      The timer will register into system at very early phase at kernel boot;
      if timer needs to use clock, the clock should be get ready in function
      of_clk_init() so later the timer driver probe can retrieve clock
      successfully. This is finished in below flow on arm64:
      
        start_kernel()
          `-> time_init()
                `-> of_clk_init(NULL)    => register timer's clock
                `-> clocksource_probe()  => register timer
      
      On Hi3660 the sp804 timer uses clock "osc32k", this clock is registered
      as platform driver rather than CLK_OF_DECLARE_DRIVER method. As result,
      sp804 timer probe returns failure due if cannot bind clock properly.
      
      To fix the failure, this patch is to split crgctrl clocks into two
      subsets. One part is for fixed_rate_clks which includes pre-defined
      fixed rate clocks, and "osc32k" clock is in this category; So we change
      their registration to CLK_OF_DECLARE_DRIVER method, as result the clocks
      can be registered ahead with function of_clk_init() and timer driver can
      bind timer clock successfully; the rest of the crgctrl clocks are still
      registered by the probe of the platform driver.
      
      This patch also adds checking for all crgctrl clocks registration and
      print out log if any clock has failure.
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      a925810f
    • Konstantin Porotchkin's avatar
      clk: mvebu: cp110: add sdio clock to cp-110 system controller · a45af6d3
      Konstantin Porotchkin authored
      This commit updates the CP110 system controller driver to add the
      definition for a missing clock.
      
      The SDIO clock is dedicated driving the SDHCI interface and its frequency
      is 400MHz (2/5 of PLL source clock).
      
      The SDIO interface should be bound to this clock and not the core clock
      as in the older code.
      Using the wrong clock lead to a maximum SDHCI frequency of 250 Mhz, while
      the HW really supports up to 400 Mhz.
      
      This patch also fixes the NAND clock relationship documentation.
      Signed-off-by: default avatarKonstantin Porotchkin <kostap@marvell.com>
      [gregory.clement@free-electrons.com:
      - use sdio instead of emmc to name the clock]
      Reviewed-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarGregory CLEMENT <gregory.clement@free-electrons.com>
      a45af6d3
    • Gregory CLEMENT's avatar
      clk: mvebu: cp110: introduce a new binding · 5ffeb5f5
      Gregory CLEMENT authored
      The initial intent when the binding of the cp110 system controller was to
      have one flat node. The idea being that what is currently a clock-only
      driver in drivers would become a MFD driver, exposing the clock, GPIO and
      pinctrl functionality. However, after taking a step back, this would lead
      to a messy binding. Indeed, a single node would be a GPIO controller,
      clock controller, pinmux controller, and more.
      
      This patch adopts a more classical solution of a top-level syscon node
      with sub-nodes for the individual devices. The main benefit will be to
      have each functional block associated to its own sub-node where we can
      put its own properties.
      
      The introduction of the Armada 7K/8K is still in the early stage so the
      plan is to remove the old binding. However, we don't want to break the
      device tree compatibility for the few devices already in the field. For
      this we still keep the support of the legacy compatible string with a big
      warning in the kernel about updating the device tree.
      Reviewed-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarGregory CLEMENT <gregory.clement@free-electrons.com>
      5ffeb5f5
    • Gregory CLEMENT's avatar
      clk: mvebu: cp110: do not depend anymore of the *-clock-output-names · f5667274
      Gregory CLEMENT authored
      Using the *-clock-output-names property was a convenient way to have a
      unique name for each clock even when there are multiple cp110 blocks
      as we can find on Armada 8K.
      
      However it has some drawbacks: the main one being a stronger link than
      necessary between the driver and the device tree. For example the clock
      name can't be changed, removed or moved. It is still the early stage of
      introduction of the Armada 7K/8K and the hardware is still not totally
      documented, especially for the clock part. By removing the use of
      *-clock-output-names it will be easier to add new clocks without breaking
      the compatibility.
      
      The name of each clock is now created by using its physical address as a
      prefix (as it was done for the platform device names). Thanks to this we
      have an automatic way to compute a unique name.
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarGregory CLEMENT <gregory.clement@free-electrons.com>
      f5667274
  6. 16 Jun, 2017 6 commits
  7. 15 Jun, 2017 4 commits
    • Tero Kristo's avatar
      clk: ti: omap4: add clkctrl clock data · 1c881b5a
      Tero Kristo authored
      Add data for omap4 clkctrl clocks, and register it within the clkctrl
      driver.
      Signed-off-by: default avatarTero Kristo <t-kristo@ti.com>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      1c881b5a
    • Tero Kristo's avatar
      dt-bindings: clk: add omap4 clkctrl definitions · 70ab980f
      Tero Kristo authored
      Contains offsets for all omap4 clkctrl main and optional clocks.
      Signed-off-by: default avatarTero Kristo <t-kristo@ti.com>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      70ab980f
    • Tero Kristo's avatar
      clk: ti: add support for clkctrl clocks · 88a17252
      Tero Kristo authored
      Previously, hwmod core has been used for controlling the hwmod level
      clocks directly. This has certain drawbacks, like being unable to share
      the clocks for multiple users, missing usecounting and generally being
      totally incompatible with the common clock framework.
      
      This patch adds support for clkctrl clocks for addressing the above
      issues. These support the modulemode handling, which will replace the
      direct hwmod clkctrl linkage. Any optional clocks are also supported,
      gate, mux and divider.
      Signed-off-by: default avatarTero Kristo <t-kristo@ti.com>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      88a17252
    • Tony Lindgren's avatar
      Documentation: dt-bindings: Add binding documentation for TI clkctrl clocks · 35395a9c
      Tony Lindgren authored
      Texas Instruments omap variant SoCs starting with omap4 have a clkctrl
      clock controller instance for each interconnect target module. The clkctrl
      controls functional and interface clocks for the module.
      
      The clkctrl clocks are currently handled by arch/arm/mach-omap2 hwmod code.
      With this binding and a related clock device driver we can start moving the
      clkctrl clock handling to live in drivers/clk/ti.
      
      Note that this binding allows keeping the clockdomain related parts out of
      drivers/clock. The CLKCTCTRL and DYNAMICDEP registers can be handled by
      a separate driver in drivers/soc/ti and genpd. If the clockdomain driver
      needs to know it's clocks, we can just set the the clkctrl device
      instances to be children of the related clockdomain device.
      
      Each clkctrl clock can have multiple optional gate clocks, and multiple
      optional mux clocks. To represent this in device tree, it seems that
      it is best done using four clock cells #clock-cells = <2> property.
      
      The reasons for using #clock-cells = <2> are:
      
      1. We need to specify the clkctrl offset from the instance base. Otherwise
         we end up with a large number of device tree nodes that need to be
         patched when new clocks are discovered in a clkctrl clock with minor
         hardware revision changes for example
      
      2. On omap5 CM_L3INIT_USB_HOST_HS_CLKCTRL has ten OPTFCLKEN bits. So we
         need to use a separate cell for optional gate clocks to avoid address
         space conflicts
      
      There is probably no need to list input clocks for each clkctrl clock
      instance in the binding. If we want to add them, the standard clocks
      binding can be used for that.
      
      For hardware reference, see omap4430 TRM "Table 3-1312. L4PER_CM2 Registers
      Mapping Summary" for example. It shows one instance of a clkctrl clock
      controller with multiple clkctrl registers.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarTero Kristo <t-kristo@ti.com>
      35395a9c