linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Zhong <zyw@rock-chips.com>
To: dianders@chromium.org, tfiga@chromium.org, heiko@sntech.de,
	yzq@rock-chips.com, groeck@chromium.org,
	myungjoo.ham@samsung.com, cw00.choi@samsung.com,
	wulf@rock-chips.com
Cc: linux-rockchip@lists.infradead.org,
	Chris Zhong <zyw@rock-chips.com>,
	linux-kernel@vger.kernel.org
Subject: [v4 PATCH 1/5] extcon: Add Type-C and DP support
Date: Tue, 28 Jun 2016 20:24:37 +0800	[thread overview]
Message-ID: <1467116681-9330-2-git-send-email-zyw@rock-chips.com> (raw)
In-Reply-To: <1467116681-9330-1-git-send-email-zyw@rock-chips.com>

Add EXTCON_DISP_DP for the Display external connector. For Type-C
connector the DisplayPort can work as an Alternate Mode(VESA
DisplayPort Alt Mode on USB Type-C Standard). At this mode, there
is some information need to be supplied by PowerDelivery or other
mode detecter: port orientation and pin assignments, so add these
2 virtual cable: EXTCON_TYPEC_POLARITY and EXTCON_TYPEC_PIN_ASSIGN.
If EXTCON_TYPEC_POLARITY is attached, the Type-C get flip orientation.
IF EXTCON_TYPEC_PIN_ASSIGN is attached, Type-C get Pin_Assignment_C(for
DP only mode) or Pin_Assignment_D(for DP + USB3 mode), the default
Assignment is A(for DP only mode) or B(for DP + USB3 mode).

Signed-off-by: Chris Zhong <zyw@rock-chips.com>

---

Changes in v4:
- remove DP alt mode

Changes in v3: None
Changes in v2: None
Changes in v1: None

 drivers/extcon/extcon.c | 5 +++++
 include/linux/extcon.h  | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
index 21a123c..44a575c 100644
--- a/drivers/extcon/extcon.c
+++ b/drivers/extcon/extcon.c
@@ -53,6 +53,10 @@ static const char *extcon_name[] =  {
 	[EXTCON_CHG_USB_FAST]		= "FAST-CHARGER",
 	[EXTCON_CHG_USB_SLOW]		= "SLOW-CHARGER",
 
+	/* Type-c connector */
+	[EXTCON_TYPEC_POLARITY]		= "TYPE-C-POLARITY",
+	[EXTCON_TYPEC_PIN_ASSIGN]	= "TYPE-C-PIN-ASSIGN",
+
 	/* Jack external connector */
 	[EXTCON_JACK_MICROPHONE]	= "MICROPHONE",
 	[EXTCON_JACK_HEADPHONE]		= "HEADPHONE",
@@ -68,6 +72,7 @@ static const char *extcon_name[] =  {
 	[EXTCON_DISP_MHL]		= "MHL",
 	[EXTCON_DISP_DVI]		= "DVI",
 	[EXTCON_DISP_VGA]		= "VGA",
+	[EXTCON_DISP_DP]		= "DP",
 
 	/* Miscellaneous external connector */
 	[EXTCON_DOCK]			= "DOCK",
diff --git a/include/linux/extcon.h b/include/linux/extcon.h
index 7abf674..38a5640 100644
--- a/include/linux/extcon.h
+++ b/include/linux/extcon.h
@@ -45,6 +45,10 @@
 #define EXTCON_CHG_USB_FAST	9
 #define EXTCON_CHG_USB_SLOW	10
 
+/* Type-c connector */
+#define EXTCON_TYPEC_POLARITY	11	/* Typec-C plug orientation */
+#define EXTCON_TYPEC_PIN_ASSIGN	12	/* Typec-C pin Assignment */
+
 /* Jack external connector */
 #define EXTCON_JACK_MICROPHONE	20
 #define EXTCON_JACK_HEADPHONE	21
@@ -60,6 +64,7 @@
 #define EXTCON_DISP_MHL		41	/* Mobile High-Definition Link */
 #define EXTCON_DISP_DVI		42	/* Digital Visual Interface */
 #define EXTCON_DISP_VGA		43	/* Video Graphics Array */
+#define EXTCON_DISP_DP		44	/* Display Port */
 
 /* Miscellaneous external connector */
 #define EXTCON_DOCK		60
-- 
2.6.3

  reply	other threads:[~2016-06-28 12:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-28 12:24 [v4 PATCH 0/5] Rockchip Type-C and DispplayPort driver Chris Zhong
2016-06-28 12:24 ` Chris Zhong [this message]
2016-06-28 12:24 ` [v4 PATCH 2/5] Documentation: bindings: add dt doc for Rockchip USB Type-C PHY Chris Zhong
2016-06-28 12:24 ` [v4 PATCH 3/5] phy: Add USB Type-C PHY driver for rk3399 Chris Zhong
2016-06-28 12:24 ` [v4 PATCH 4/5] Documentation: bindings: add dt documentation for cdn DP controller Chris Zhong
2016-06-28 12:24 ` [v4 PATCH 5/5] drm/rockchip: cdn-dp: add cdn DP support for rk3399 Chris Zhong
2016-06-28 13:49 ` [v4 PATCH 0/5] Rockchip Type-C and DispplayPort driver Guenter Roeck

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=1467116681-9330-2-git-send-email-zyw@rock-chips.com \
    --to=zyw@rock-chips.com \
    --cc=cw00.choi@samsung.com \
    --cc=dianders@chromium.org \
    --cc=groeck@chromium.org \
    --cc=heiko@sntech.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=tfiga@chromium.org \
    --cc=wulf@rock-chips.com \
    --cc=yzq@rock-chips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).