All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Maciej Purski <m.purski@samsung.com>,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-samsung-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, airlied@linux.ie,
	robh+dt@kernel.org, mark.rutland@arm.com, architt@codeaurora.org,
	will.deacon@arm.com, catalin.marinas@arm.com,
	a.hajda@samsung.com, b.zolnierkie@samsung.com, krzk@kernel.org
Subject: Re: [PATCH 1/2] drm/bridge/sii8620: add external connector handle
Date: Fri, 11 Aug 2017 12:40:39 +0300	[thread overview]
Message-ID: <2097016.rlxulirhWA@avalon> (raw)
In-Reply-To: <5ce6bd99-c50e-84c2-f21f-eb611cac94c2@samsung.com>

Hi Marek,

On Friday 11 Aug 2017 08:39:31 Marek Szyprowski wrote:
> On 2017-08-10 15:39, Laurent Pinchart wrote:
> > On Thursday 10 Aug 2017 15:25:29 Maciej Purski wrote:
> >> The driver should be switched on if an external connector is plugged and
> >> switched off if it is unplugged. Extcon is optional. If it is not found,
> >> the driver stays in "always-on" mode.
> >> 
> >> Signed-off-by: Maciej Purski <m.purski@samsung.com>
> >> ---
> >> 
> >>   .../bindings/display/bridge/sil-sii8620.txt        |  4 ++
> >>   drivers/gpu/drm/bridge/sil-sii8620.c               | 83 ++++++++++++++-
> >>   2 files changed, 85 insertions(+), 2 deletions(-)
> >> 
> >> diff --git
> >> a/Documentation/devicetree/bindings/display/bridge/sil-sii8620.txt
> >> b/Documentation/devicetree/bindings/display/bridge/sil-sii8620.txt index
> >> 9409d9c..1f230bf 100644
> >> --- a/Documentation/devicetree/bindings/display/bridge/sil-sii8620.txt
> >> +++ b/Documentation/devicetree/bindings/display/bridge/sil-sii8620.txt
> >> @@ -10,6 +10,9 @@ Required properties:
> >>   	- clocks, clock-names: specification and name of "xtal" clock
> >>   	- video interfaces: Device node can contain video interface port
> >>   			    node for HDMI encoder according to [1].
> >> 
> >> +Optional properties:
> >> +	- extcon: phandle to external connector for MHL cable changes
> >> +		  detection
> > 
> > The sii8620 DT node should model its connection to the MHL connector using
> > OF graph, connecting a port to the MHL connector DT node through
> > endpoints. I believe the extcon property should then be added to the MHL
> > connector DT node, not the bridge.
> 
> I don't get this. Generic extcon bindings doesn't define connector DT
> node, so I don't see how could we use endpoint DT approach here. Could you
> give the example?

Sure, here you are.

&hsi2c_7 {
	...

        sii8620@39 {
                reg = <0x39>;
                compatible = "sil,sii8620";
                cvcc10-supply = <&ldo36_reg>;
                iovcc18-supply = <&ldo34_reg>;
                interrupt-parent = <&gpf0>;
                interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
                reset-gpios = <&gpv7 0 GPIO_ACTIVE_LOW>;
                clocks = <&pmu_system_controller 0>;
                clock-names = "xtal";

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

	                port@0 {
				reg = <0>;
        	                mhl_to_hdmi: endpoint {
                	                remote-endpoint = <&hdmi_to_mhl>;
	                        };
        	        };
	                port@1 {
				reg = <1>;
        	                mhl_bridge_out: endpoint {
                	                remote-endpoint = <&mhl_connector_in>;
	                        };
        	        };
		};
        };
};

/ {
	mhl-connector {
		compatible = "mhl-connector";
		extcon = <&muic>;

	        port {
        	        mhl_connector_in: endpoint {
                	        remote-endpoint = <&mhl_bridge_out>;
	                };
        	};
	};
};

Note that there's currently no DT binding for MHL connectors. One needs to be 
developed, the HDMI connector DT binding can be used as a source of 
inspiration.

> >>   [1]: Documentation/devicetree/bindings/media/video-interfaces.txt

-- 
Regards,

Laurent Pinchart

WARNING: multiple messages have this Message-ID (diff)
From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] drm/bridge/sii8620: add external connector handle
Date: Fri, 11 Aug 2017 12:40:39 +0300	[thread overview]
Message-ID: <2097016.rlxulirhWA@avalon> (raw)
In-Reply-To: <5ce6bd99-c50e-84c2-f21f-eb611cac94c2@samsung.com>

Hi Marek,

On Friday 11 Aug 2017 08:39:31 Marek Szyprowski wrote:
> On 2017-08-10 15:39, Laurent Pinchart wrote:
> > On Thursday 10 Aug 2017 15:25:29 Maciej Purski wrote:
> >> The driver should be switched on if an external connector is plugged and
> >> switched off if it is unplugged. Extcon is optional. If it is not found,
> >> the driver stays in "always-on" mode.
> >> 
> >> Signed-off-by: Maciej Purski <m.purski@samsung.com>
> >> ---
> >> 
> >>   .../bindings/display/bridge/sil-sii8620.txt        |  4 ++
> >>   drivers/gpu/drm/bridge/sil-sii8620.c               | 83 ++++++++++++++-
> >>   2 files changed, 85 insertions(+), 2 deletions(-)
> >> 
> >> diff --git
> >> a/Documentation/devicetree/bindings/display/bridge/sil-sii8620.txt
> >> b/Documentation/devicetree/bindings/display/bridge/sil-sii8620.txt index
> >> 9409d9c..1f230bf 100644
> >> --- a/Documentation/devicetree/bindings/display/bridge/sil-sii8620.txt
> >> +++ b/Documentation/devicetree/bindings/display/bridge/sil-sii8620.txt
> >> @@ -10,6 +10,9 @@ Required properties:
> >>   	- clocks, clock-names: specification and name of "xtal" clock
> >>   	- video interfaces: Device node can contain video interface port
> >>   			    node for HDMI encoder according to [1].
> >> 
> >> +Optional properties:
> >> +	- extcon: phandle to external connector for MHL cable changes
> >> +		  detection
> > 
> > The sii8620 DT node should model its connection to the MHL connector using
> > OF graph, connecting a port to the MHL connector DT node through
> > endpoints. I believe the extcon property should then be added to the MHL
> > connector DT node, not the bridge.
> 
> I don't get this. Generic extcon bindings doesn't define connector DT
> node, so I don't see how could we use endpoint DT approach here. Could you
> give the example?

Sure, here you are.

&hsi2c_7 {
	...

        sii8620 at 39 {
                reg = <0x39>;
                compatible = "sil,sii8620";
                cvcc10-supply = <&ldo36_reg>;
                iovcc18-supply = <&ldo34_reg>;
                interrupt-parent = <&gpf0>;
                interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
                reset-gpios = <&gpv7 0 GPIO_ACTIVE_LOW>;
                clocks = <&pmu_system_controller 0>;
                clock-names = "xtal";

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

	                port at 0 {
				reg = <0>;
        	                mhl_to_hdmi: endpoint {
                	                remote-endpoint = <&hdmi_to_mhl>;
	                        };
        	        };
	                port at 1 {
				reg = <1>;
        	                mhl_bridge_out: endpoint {
                	                remote-endpoint = <&mhl_connector_in>;
	                        };
        	        };
		};
        };
};

/ {
	mhl-connector {
		compatible = "mhl-connector";
		extcon = <&muic>;

	        port {
        	        mhl_connector_in: endpoint {
                	        remote-endpoint = <&mhl_bridge_out>;
	                };
        	};
	};
};

Note that there's currently no DT binding for MHL connectors. One needs to be 
developed, the HDMI connector DT binding can be used as a source of 
inspiration.

> >>   [1]: Documentation/devicetree/bindings/media/video-interfaces.txt

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2017-08-11  9:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170810132549eucas1p29ada94088da5d7d395e95aded77b906f@eucas1p2.samsung.com>
2017-08-10 13:25 ` [PATCH 0/2] drm/bridge/sii8620: add external connector handle Maciej Purski
2017-08-10 13:25   ` Maciej Purski
     [not found]   ` <CGME20170810132556eucas1p2413e372ac3494e73dd07cb941a1baa3f@eucas1p2.samsung.com>
     [not found]     ` <1502371530-32260-1-git-send-email-m.purski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2017-08-10 13:25       ` [PATCH 1/2] " Maciej Purski
2017-08-10 13:25         ` Maciej Purski
2017-08-10 13:39         ` Laurent Pinchart
2017-08-10 13:39           ` Laurent Pinchart
2017-08-11  6:39           ` Marek Szyprowski
2017-08-11  6:39             ` Marek Szyprowski
2017-08-11  9:40             ` Laurent Pinchart [this message]
2017-08-11  9:40               ` Laurent Pinchart
2017-08-11 12:49               ` Marek Szyprowski
2017-08-11 12:49                 ` Marek Szyprowski
2017-08-17 15:11                 ` Rob Herring
2017-08-17 15:11                   ` Rob Herring
2017-08-17 23:37                   ` Laurent Pinchart
2017-08-17 23:37                     ` Laurent Pinchart
2017-08-10 13:25       ` [PATCH 2/2] arm64: dts: exynos: add extcon phandle Maciej Purski
2017-08-10 13:25         ` Maciej Purski

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=2097016.rlxulirhWA@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=architt@codeaurora.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.purski@samsung.com \
    --cc=m.szyprowski@samsung.com \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=will.deacon@arm.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.