All of lore.kernel.org
 help / color / mirror / Atom feed
From: Inki Dae <inki.dae@samsung.com>
To: Hyungwon Hwang <human.hwang@samsung.com>
Cc: devicetree@vger.kernel.org,
	"linux-samsung-soc@vger.kernel.org"
	<linux-samsung-soc@vger.kernel.org>,
	sw0312.kim@samsung.com, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v6 08/15] drm/exynos: dsi: rename pll_clk to sclk_clk
Date: Mon, 22 Jun 2015 21:25:34 +0900	[thread overview]
Message-ID: <5587FEBE.7010400@samsung.com> (raw)
In-Reply-To: <1434113958-15877-9-git-send-email-human.hwang@samsung.com>

+ Samsung SoC mailing list.

On 2015년 06월 12일 21:59, Hyungwon Hwang wrote:
> This patch renames pll_clk to sclk_clk. The clock referenced by pll_clk
> is actually not the pll input clock for dsi. The pll input clock comes
> from the board's oscillator directly. But for the backward
> compatibility, the old clock name "pll_clk" is also OK.
> 
> Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
> ---
> Changes before:
> - Refer https://patchwork.kernel.org/patch/6191721
> Changes for v6:
> - Merged 2 patches
>    drm/exynos: dsi: add the backward compatibility for the renamed clock
>    drm/exynos: dsi: rename pll_clk to sclk_clk
> 
>  .../devicetree/bindings/video/exynos_dsim.txt      |  7 +++--
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c            | 36 ++++++++++------------
>  2 files changed, 20 insertions(+), 23 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/video/exynos_dsim.txt b/Documentation/devicetree/bindings/video/exynos_dsim.txt
> index 802aa7e..44659dd 100644
> --- a/Documentation/devicetree/bindings/video/exynos_dsim.txt
> +++ b/Documentation/devicetree/bindings/video/exynos_dsim.txt
> @@ -10,13 +10,14 @@ Required properties:
>    - interrupts: should contain DSI interrupt
>    - clocks: list of clock specifiers, must contain an entry for each required
>      entry in clock-names
> -  - clock-names: should include "bus_clk"and "pll_clk" entries
> +  - clock-names: should include "bus_clk"and "sclk_mipi" entries
> +		 the use of "pll_clk" is deprecated
>    - phys: list of phy specifiers, must contain an entry for each required
>      entry in phy-names
>    - phy-names: should include "dsim" entry
>    - vddcore-supply: MIPI DSIM Core voltage supply (e.g. 1.1V)
>    - vddio-supply: MIPI DSIM I/O and PLL voltage supply (e.g. 1.8V)
> -  - samsung,pll-clock-frequency: specifies frequency of the "pll_clk" clock
> +  - samsung,pll-clock-frequency: specifies frequency of the oscillator clock
>    - #address-cells, #size-cells: should be set respectively to <1> and <0>
>      according to DSI host bindings (see MIPI DSI bindings [1])
> 
> @@ -48,7 +49,7 @@ Example:
>  		reg = <0x11C80000 0x10000>;
>  		interrupts = <0 79 0>;
>  		clocks = <&clock 286>, <&clock 143>;
> -		clock-names = "bus_clk", "pll_clk";
> +		clock-names = "bus_clk", "sclk_mipi";
>  		phys = <&mipi_phy 1>;
>  		phy-names = "dsim";
>  		vddcore-supply = <&vusb_reg>;
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index c1999ad..a3bfac2 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -235,6 +235,8 @@
>  #define DSI_XFER_TIMEOUT_MS		100
>  #define DSI_RX_FIFO_EMPTY		0x30800002
> 
> +#define OLD_SCLK_MIPI_CLK_NAME "pll_clk"
> +
>  enum exynos_dsi_transfer_type {
>  	EXYNOS_DSI_TX,
>  	EXYNOS_DSI_RX,
> @@ -279,7 +281,7 @@ struct exynos_dsi {
> 
>  	void __iomem *reg_base;
>  	struct phy *phy;
> -	struct clk *pll_clk;
> +	struct clk *sclk_clk;
>  	struct clk *bus_clk;
>  	struct regulator_bulk_data supplies[2];
>  	int irq;
> @@ -433,16 +435,7 @@ static unsigned long exynos_dsi_set_pll(struct exynos_dsi *dsi,
>  	u16 m;
>  	u32 reg;
> 
> -	clk_set_rate(dsi->pll_clk, dsi->pll_clk_rate);
> -
> -	fin = clk_get_rate(dsi->pll_clk);
> -	if (!fin) {
> -		dev_err(dsi->dev, "failed to get PLL clock frequency\n");
> -		return 0;
> -	}
> -
> -	dev_dbg(dsi->dev, "PLL input frequency: %lu\n", fin);
> -
> +	fin = dsi->pll_clk_rate;
>  	fout = exynos_dsi_pll_find_pms(dsi, fin, freq, &p, &m, &s);
>  	if (!fout) {
>  		dev_err(dsi->dev,
> @@ -1313,10 +1306,10 @@ static int exynos_dsi_poweron(struct exynos_dsi *dsi)
>  		goto err_bus_clk;
>  	}
> 
> -	ret = clk_prepare_enable(dsi->pll_clk);
> +	ret = clk_prepare_enable(dsi->sclk_clk);
>  	if (ret < 0) {
>  		dev_err(dsi->dev, "cannot enable pll clock %d\n", ret);
> -		goto err_pll_clk;
> +		goto err_sclk_clk;
>  	}
> 
>  	ret = phy_power_on(dsi->phy);
> @@ -1328,8 +1321,8 @@ static int exynos_dsi_poweron(struct exynos_dsi *dsi)
>  	return 0;
> 
>  err_phy:
> -	clk_disable_unprepare(dsi->pll_clk);
> -err_pll_clk:
> +	clk_disable_unprepare(dsi->sclk_clk);
> +err_sclk_clk:
>  	clk_disable_unprepare(dsi->bus_clk);
>  err_bus_clk:
>  	regulator_bulk_disable(ARRAY_SIZE(dsi->supplies), dsi->supplies);
> @@ -1355,7 +1348,7 @@ static void exynos_dsi_poweroff(struct exynos_dsi *dsi)
> 
>  	phy_power_off(dsi->phy);
> 
> -	clk_disable_unprepare(dsi->pll_clk);
> +	clk_disable_unprepare(dsi->sclk_clk);
>  	clk_disable_unprepare(dsi->bus_clk);
> 
>  	ret = regulator_bulk_disable(ARRAY_SIZE(dsi->supplies), dsi->supplies);
> @@ -1722,10 +1715,13 @@ static int exynos_dsi_probe(struct platform_device *pdev)
>  		return -EPROBE_DEFER;
>  	}
> 
> -	dsi->pll_clk = devm_clk_get(dev, "pll_clk");
> -	if (IS_ERR(dsi->pll_clk)) {
> -		dev_info(dev, "failed to get dsi pll input clock\n");
> -		return PTR_ERR(dsi->pll_clk);
> +	dsi->sclk_clk = devm_clk_get(dev, "sclk_mipi");
> +	if (IS_ERR(dsi->sclk_clk)) {
> +		dsi->sclk_clk = devm_clk_get(dev, OLD_SCLK_MIPI_CLK_NAME);
> +		if (IS_ERR(dsi->sclk_clk)) {
> +			dev_info(dev, "failed to get dsi sclk clock\n");
> +			eturn PTR_ERR(dsi->sclk_clk);
> +		}
>  	}
> 
>  	dsi->bus_clk = devm_clk_get(dev, "bus_clk");
> --
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-06-22 12:25 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12 12:58 [PATCH v6 00/15] Add drivers for Exynos5433 display Hyungwon Hwang
2015-06-12 12:58 ` [PATCH v6 02/15] drm/exynos: Add the dependency for DRM_EXYNOS to DPI/DSI/DP Hyungwon Hwang
2015-06-12 12:58 ` [PATCH v6 03/15] drm/exynos: add drm_iommu_attach_device_if_possible() Hyungwon Hwang
2015-06-12 12:58 ` [PATCH v6 04/15] drm/exynos: fix the input prompt of Exynos7 DECON Hyungwon Hwang
2015-06-12 12:59 ` [PATCH v6 06/15] of: add helper for getting endpoint node of specific identifiers Hyungwon Hwang
2015-06-23  0:19   ` Dave Airlie
2015-06-23  2:29     ` Inki Dae
2015-06-12 12:59 ` [PATCH v6 07/15] drm/exynos: mic: add MIC driver Hyungwon Hwang
2015-06-12 12:59 ` [PATCH v6 12/15] drm/exynos: dsi: add support for Exynos5433 Hyungwon Hwang
2015-06-12 12:59 ` [PATCH v6 14/15] drm/exynos: dsi: do not set TE GPIO direction by input Hyungwon Hwang
     [not found] ` <1434113958-15877-1-git-send-email-human.hwang-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-06-12 12:58   ` [PATCH v6 01/15] drm/exynos: remove the dependency of DP driver for ARCH_EXYNOS Hyungwon Hwang
2015-06-12 12:59   ` [PATCH v6 05/15] drm/exynos: add Exynos5433 decon driver Hyungwon Hwang
2015-06-22 11:16     ` [PATCH v7 " Inki Dae
2015-06-22 11:41       ` Varka Bhadram
2015-06-22 11:57         ` Inki Dae
2015-06-22 11:59           ` Varka Bhadram
2015-06-12 12:59   ` [PATCH v6 08/15] drm/exynos: dsi: rename pll_clk to sclk_clk Hyungwon Hwang
2015-06-22 12:25     ` Inki Dae [this message]
2015-06-12 12:59   ` [PATCH v6 09/15] drm/exynos: dsi: add macros for register access Hyungwon Hwang
2015-06-12 12:59   ` [PATCH v6 10/15] drm/exynos: dsi: make use of driver data for static values Hyungwon Hwang
2015-06-12 12:59   ` [PATCH v6 11/15] drm/exynos: dsi: make use of array for clock access Hyungwon Hwang
2015-06-12 12:59   ` [PATCH v6 13/15] drm/exynos: dsi: add support for MIC driver as a bridge Hyungwon Hwang
2015-06-12 12:59   ` [PATCH v6 15/15] ARM: dts: rename the clock of MIPI DSI 'pll_clk' to 'sclk_mipi' Hyungwon Hwang
2015-06-22  9:10     ` Inki Dae
2015-06-22 11:42       ` Inki Dae
2015-06-22 11:59         ` Krzysztof Kozlowski
2015-06-22 12:10           ` Inki Dae
2015-06-22 12:20             ` Krzysztof Kozlowski
2015-06-22 12:35         ` Krzysztof Kozlowski
2015-06-23  2:10           ` Krzysztof Kozlowski
2015-06-23  2:28             ` Inki Dae
2015-06-23  4:00               ` Krzysztof Kozlowski
2015-06-12 12:59   ` [PATCH 1/2] drm/exynos: ipp: fix wrong index referencing a config element Hyungwon Hwang
2015-06-12 13:02     ` Hyungwon Hwang
2015-06-12 12:59   ` [PATCH 2/3] ARM: dts: Add the reference node for syscon to mipi phy for Exynos3250 Hyungwon Hwang
2015-06-12 13:02     ` Hyungwon Hwang
2015-06-12 12:59   ` [v3,2/3] drm/panel: add s6e63j0x03 LCD panel driver Hyungwon Hwang
2015-06-12 12:59 ` [PATCH 2/2] drm/exynos: ipp: validate a GEM handle with multiple planes Hyungwon Hwang
2015-06-12 13:02   ` Hyungwon Hwang
2015-06-12 12:59 ` [PATCH] ARM: dts: set display clock correctly for exynos4412-trats2 Hyungwon Hwang
2015-06-12 12:59   ` Hyungwon Hwang
2015-06-12 12:59 ` [PATCH 1/3] drm/panel: add s6e63j0x03 LCD panel driver Hyungwon Hwang
2015-06-12 13:02   ` Hyungwon Hwang
2015-06-12 12:59 ` [PATCH 3/3] ARM: dts: fix the clock-frequency of rinato board's panel Hyungwon Hwang
2015-06-12 13:02   ` Hyungwon Hwang
  -- strict thread matches above, loose matches on Subject: below --
2015-01-19  7:52 [PATCH v3 1/3] ARM: dts: add fimd device support for exynos3250-rinato Hyungwon Hwang
2015-01-19  7:52 ` [PATCH v3 2/3] drm/panel: add s6e63j0x03 LCD panel driver Hyungwon Hwang
2015-02-03 14:00   ` Thierry Reding
2015-06-12 13:03   ` [v3,2/3] " Hyungwon Hwang
2015-01-19  7:52 ` [PATCH v3 3/3] ARM: dts: add Panel device support for exynos3250-rinato Hyungwon Hwang

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=5587FEBE.7010400@samsung.com \
    --to=inki.dae@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=human.hwang@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=sw0312.kim@samsung.com \
    /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.