All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Inki Dae <inki.dae@samsung.com>, devicetree@vger.kernel.org
Cc: airlied@linux.ie, dri-devel@lists.freedesktop.org,
	robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
	ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
	linux-samsung-soc@vger.kernel.org, kgene.kim@samsung.com,
	a.hajda@samsung.com
Subject: Re: [PATCH 1/4] drm/exynos: dsim: fix to control mipi phy register
Date: Mon, 09 Feb 2015 11:57:17 +0100	[thread overview]
Message-ID: <54D8928D.9000008@samsung.com> (raw)
In-Reply-To: <1423309988-11793-2-git-send-email-inki.dae@samsung.com>

On 07/02/15 12:53, Inki Dae wrote:
> This patch fixes the issue that the try to get a phy object is failed
> to enable mipi phy.
> 
> System and power management unit registers should be controlled by
> syscon framework. So this patch removes existing phy framework based
> codes and adds syscon support instead. However, we should support
> legacy device tree binding so consider the legacy binding for compatibility.
> 
> In addition, we need to remove below device node and relevant properties,
> 	mipi_phy: video-phy@10020710 {
> 		compatible = "samsung,s5pv210-mipi-video-phy";
> 		reg = <0x10020710 8>;
> 		#phy-cells = <1>;
> 	};
> 
> Now camera device node uses mipi_phy node relevant properties like below,
> 	camera {
> 		...
> 		csis_0: csis@11880000 {
> 			...
> 			phys = <&mipi_phy 0>;
> 			phy-names = "csis";
> 			...
> 		};
> 		csis_1: csis@11890000 {
> 			...
> 			phys = <&mipi_phy 2>;
> 			phy-names = "csis";
> 			...
> 		};
> 		...
> 	};
> 
> With above, we will find below message while booting,
>      can't request region for resource [mem 0x10020710-0x10020717]

I'm afraid this approach won't work because MIPI DSI Master and MIPI CSI
Slave devices share a control bit in the register and it seems impossible
to ensure proper locking with current regmap/syscon API.

I have submitted patches to fix this issue [1] and they should be already
available in linux-next and can be found on linux-samsung-soc ML:

[PATCH 1/2] phy: exynos-video-mipi: Fix regression by adding support for PMU regmap
[PATCH 2/2] ARM: dts: Add syscon phandle to the video-phy node for Exynos4

The other issue with your approach is that we are moving the PMU details
to the MIPI DSIM driver and similar changes would need to be done in
the MIPI CSIS driver.

Instead I just added syscon support to the PHY layer, it's not perfect
but fixes the issue for both DSI and CSI and  doesn't strip the PHY layer
which could potentially be useful.

-- 
Thanks,
Sylwester

[1] https://patchwork.ozlabs.org/patch/429948/
    http://www.spinics.net/lists/linux-samsung-soc/msg41210.html

  reply	other threads:[~2015-02-09 10:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-07 11:53 [PATCH 0/4] drm/exynos: use syscon framework to enable mipi phy Inki Dae
2015-02-07 11:53 ` [PATCH 1/4] drm/exynos: dsim: fix to control mipi phy register Inki Dae
2015-02-09 10:57   ` Sylwester Nawrocki [this message]
2015-02-09 12:17     ` Inki Dae
2015-02-09 13:46       ` Sylwester Nawrocki
2015-02-07 11:53 ` [PATCH 2/4] ARM: dts: exynos4: use pmureg device node to enable mipi phy Inki Dae
2015-02-07 11:53 ` [PATCH 3/4] ARM: dts: exynos3250: " Inki Dae
2015-02-07 11:53 ` [PATCH 4/4] ARM: dts: exynos5420: " Inki Dae

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=54D8928D.9000008@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=inki.dae@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.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.