All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>,
	Michael Turquette <mturquette@baylibre.com>
Cc: linux-clk@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Ulf Hansson <ulf.hansson@linaro.org>
Subject: Re: [PATCH 5/5 v3] clk: ux500: Implement the missing CLKOUT clocks
Date: Mon, 25 Apr 2022 16:46:36 -0700	[thread overview]
Message-ID: <20220425234638.6D9CEC385A7@smtp.kernel.org> (raw)
In-Reply-To: <20220414221751.323525-6-linus.walleij@linaro.org>

Quoting Linus Walleij (2022-04-14 15:17:51)
> This implements the two missing CLKOUT clocks for the ux500
> (well really U8500/DB8500) SoC.
> 
> The clocks are initialized using a specific parent and
> divider and these are specified in the device tree, see
> the separate binding patch.
> 
> The implementation is a bit different in that it will only
> create the clock in the clock framework if a user appears
> in the device tree, rather than it being registered upfront
> like most of the other clocks. This is because the clock
> needs parameters for source and divider from the consumer
> phandle for the clock to be set up properly when the clock
> is registered.
> 
> There could be more than one user of a CLKOUT clock, but
> we have not seen this in practice. If this happens the
> framework prints and info and returns the previously
> registered clock.
> 
> Using the clocks requires also muxing the CLKOUT1 or
> CLKOUT2 to the appropriate pad. In practice this is
> achived in a pinctrl handle in the DTS node for the device
> using the CLKOUT clock, so this muxing is done separately
> from the clock itself. Example:
> 
>   haptic@49 {
>     compatible = "immersion,isa1200";
>     reg = <0x49>;
>     (...)
>     /* clkout1 from ACLK divided by 8 */
>     clocks = <&clkout_clk DB8500_CLKOUT_1 DB8500_CLKOUT_SRC_ACLK 8>;
>     pinctrl-names = "default";
>     pinctrl-0 = <&isa1200_janice_default>;
>   };
> 
>   isa1200_janice_default: isa1200_janice {
>     /* Bring out clkout1 on pin GPIO227 pin AH7 */
>     janice_mux {
>       function = "clkout";
>       groups = "clkout1_a_1";
>     };
>     janice_cfg1 {
>       pins = "GPIO227_AH7";
>       ste,config = <&out_lo>;
>     };
>   (...)
> 
> This was tested successfully with the Immersion ISA1200
> haptic feedback unit on the Samsung Galaxy S Advance GT-I9070
> (Janice) mobile phone.
> 
> As the CLKOUT clocks need some undefined fixed rate parent
> clocks that are currently missing from the PRCMU clock
> implementation, the three simplest are added in this patch:
> clk38m_to_clkgen, aclk and sysclk. The only parent not yet
> available in the implementation is clk009, which is a kind
> of special muxed and divided clock which isn't even
> implemented in the vendor clock driver.
> 
> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---

Applied to clk-next

      reply	other threads:[~2022-04-25 23:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-14 22:17 [PATCH 0/5 v3] U8500 clkout clocks v3 Linus Walleij
2022-04-14 22:17 ` [PATCH 1/5 v3] dt-bindings: clock: u8500: Add clkout clock bindings Linus Walleij
2022-04-19 16:34   ` Rob Herring
2022-04-25 23:45   ` Stephen Boyd
2022-04-14 22:17 ` [PATCH 2/5 v3] clk: ux500: Drop .is_enabled state from PRCMU clocks Linus Walleij
2022-04-25 23:46   ` Stephen Boyd
2022-04-14 22:17 ` [PATCH 3/5 v3] clk: ux500: Drop .is_prepared " Linus Walleij
2022-04-25 23:46   ` Stephen Boyd
2022-04-14 22:17 ` [PATCH 4/5 v3] clk: ux500: Rewrite PRCMU clocks to use clk_hw_* Linus Walleij
2022-04-25 23:46   ` Stephen Boyd
2022-04-14 22:17 ` [PATCH 5/5 v3] clk: ux500: Implement the missing CLKOUT clocks Linus Walleij
2022-04-25 23:46   ` Stephen Boyd [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220425234638.6D9CEC385A7@smtp.kernel.org \
    --to=sboyd@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.