From: Yuti Amonkar <yamonkar@cadence.com>
To: <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
<kishon@ti.com>, <robh+dt@kernel.org>, <mark.rutland@arm.com>
Cc: <jsarha@ti.com>, <tomi.valkeinen@ti.com>, <praneeth@ti.com>,
<mparab@cadence.com>, <sjakhade@cadence.com>,
<yamonkar@cadence.com>
Subject: [RESEND PATCH v1 01/15] phy: Add DisplayPort configuration options
Date: Wed, 11 Dec 2019 14:09:06 +0100 [thread overview]
Message-ID: <1576069760-11473-2-git-send-email-yamonkar@cadence.com> (raw)
In-Reply-To: <1576069760-11473-1-git-send-email-yamonkar@cadence.com>
Add generic DP API for configuring DisplayPort PHYs. The parameters
that will be configured are link rate, number of lanes, voltage swing
and pre-emphasis.
Signed-off-by: Yuti Amonkar <yamonkar@cadence.com>
---
include/linux/phy/phy-dp.h | 95 ++++++++++++++++++++++++++++++++++++++++++++++
include/linux/phy/phy.h | 4 ++
2 files changed, 99 insertions(+)
create mode 100644 include/linux/phy/phy-dp.h
diff --git a/include/linux/phy/phy-dp.h b/include/linux/phy/phy-dp.h
new file mode 100644
index 0000000..18cad23
--- /dev/null
+++ b/include/linux/phy/phy-dp.h
@@ -0,0 +1,95 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2019 Cadence Design Systems Inc.
+ */
+
+#ifndef __PHY_DP_H_
+#define __PHY_DP_H_
+
+#include <linux/types.h>
+
+/**
+ * struct phy_configure_opts_dp - DisplayPort PHY configuration set
+ *
+ * This structure is used to represent the configuration state of a
+ * DisplayPort phy.
+ */
+struct phy_configure_opts_dp {
+ /**
+ * @link_rate:
+ *
+ * Link Rate, in Mb/s, of the main link.
+ *
+ * Allowed values: 1620, 2160, 2430, 2700, 3240, 4320, 5400, 8100 Mb/s
+ */
+ unsigned int link_rate;
+
+ /**
+ * @lanes:
+ *
+ * Number of active, consecutive, data lanes, starting from
+ * lane 0, used for the transmissions on main link.
+ *
+ * Allowed values: 1, 2, 4
+ */
+ unsigned int lanes;
+
+ /**
+ * @voltage:
+ *
+ * Voltage swing levels, as specified by DisplayPort specification,
+ * to be used by particular lanes. One value per lane.
+ * voltage[0] is for lane 0, voltage[1] is for lane 1, etc.
+ *
+ * Maximum value: 3
+ */
+ unsigned int voltage[4];
+
+ /**
+ * @pre:
+ *
+ * Pre-emphasis levels, as specified by DisplayPort specification, to be
+ * used by particular lanes. One value per lane.
+ *
+ * Maximum value: 3
+ */
+ unsigned int pre[4];
+
+ /**
+ * @ssc:
+ *
+ * Flag indicating, whether or not to enable spread-spectrum clocking.
+ *
+ */
+ u8 ssc : 1;
+
+ /**
+ * @set_rate:
+ *
+ * Flag indicating, whether or not reconfigure link rate and SSC to
+ * requested values.
+ *
+ */
+ u8 set_rate : 1;
+
+ /**
+ * @set_lanes:
+ *
+ * Flag indicating, whether or not reconfigure lane count to
+ * requested value.
+ *
+ */
+ u8 set_lanes : 1;
+
+ /**
+ * @set_voltages:
+ *
+ * Flag indicating, whether or not reconfigure voltage swing
+ * and pre-emphasis to requested values. Only lanes specified
+ * by "lanes" parameter will be affected.
+ *
+ */
+ u8 set_voltages : 1;
+};
+
+#endif /* __PHY_DP_H_ */
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index 15032f14..ba0aab5 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -16,6 +16,7 @@
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
+#include <linux/phy/phy-dp.h>
#include <linux/phy/phy-mipi-dphy.h>
struct phy;
@@ -46,9 +47,12 @@ enum phy_mode {
*
* @mipi_dphy: Configuration set applicable for phys supporting
* the MIPI_DPHY phy mode.
+ * @dp: Configuration set applicable for phys supporting
+ * the DisplayPort protocol.
*/
union phy_configure_opts {
struct phy_configure_opts_mipi_dphy mipi_dphy;
+ struct phy_configure_opts_dp dp;
};
/**
--
2.7.4
next prev parent reply other threads:[~2019-12-11 13:10 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-11 13:09 [RESEND PATCH v1 00/15] PHY: Update Cadence Torrent PHY driver with reconfiguration Yuti Amonkar
2019-12-11 13:09 ` Yuti Amonkar [this message]
2019-12-11 13:09 ` [RESEND PATCH v1 02/15] dt-bindings:phy: Convert Cadence MHDP PHY bindings to YAML Yuti Amonkar
2019-12-19 21:10 ` Rob Herring
2019-12-20 8:04 ` Yuti Suresh Amonkar
2019-12-11 13:09 ` [RESEND PATCH v1 03/15] phy: cadence-dp: Rename to phy-cadence-torrent Yuti Amonkar
2019-12-11 13:09 ` [RESEND PATCH v1 04/15] phy: cadence-torrent: Adopt Torrent nomenclature Yuti Amonkar
2019-12-11 13:09 ` [RESEND PATCH v1 05/15] phy: cadence-torrent: Add wrapper for PHY register access Yuti Amonkar
2019-12-11 13:09 ` [RESEND PATCH v1 06/15] phy: cadence-torrent: Add wrapper for DPTX " Yuti Amonkar
2019-12-11 13:09 ` [RESEND PATCH v1 07/15] phy: cadence-torrent: Refactor code for reusability Yuti Amonkar
2019-12-11 13:09 ` [RESEND PATCH v1 08/15] dt-bindings: phy: phy-cadence-torrent: Add clock bindings Yuti Amonkar
2019-12-19 21:14 ` Rob Herring
2019-12-11 13:09 ` [RESEND PATCH v1 09/15] phy: cadence-torrent: Add 19.2 MHz reference clock support Yuti Amonkar
2019-12-11 13:09 ` [RESEND PATCH v1 10/15] phy: cadence-torrent: Add PHY lane reset support Yuti Amonkar
2019-12-11 13:09 ` [RESEND PATCH v1 11/15] phy: cadence-torrent: Implement PHY configure APIs Yuti Amonkar
2019-12-11 13:09 ` [RESEND PATCH v1 12/15] phy: cadence-torrent: Use regmap to read and write Torrent PHY registers Yuti Amonkar
2019-12-11 13:09 ` [RESEND PATCH v1 13/15] phy: cadence-torrent: Use regmap to read and write DPTX " Yuti Amonkar
2019-12-11 13:09 ` [RESEND PATCH v1 14/15] dt-bindings: phy: phy-cadence-torrent: Add platform dependent compatible string Yuti Amonkar
2019-12-19 21:25 ` Rob Herring
2019-12-20 9:43 ` Yuti Suresh Amonkar
2019-12-20 22:12 ` Rob Herring
2019-12-11 13:09 ` [RESEND PATCH v1 15/15] phy: cadence-torrent: Add platform dependent initialization structure Yuti Amonkar
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=1576069760-11473-2-git-send-email-yamonkar@cadence.com \
--to=yamonkar@cadence.com \
--cc=devicetree@vger.kernel.org \
--cc=jsarha@ti.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mparab@cadence.com \
--cc=praneeth@ti.com \
--cc=robh+dt@kernel.org \
--cc=sjakhade@cadence.com \
--cc=tomi.valkeinen@ti.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).