From: Jagan Teki <jagan@amarulasolutions.com>
To: Andrzej Hajda <andrzej.hajda@intel.com>,
Inki Dae <inki.dae@samsung.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Joonyoung Shim <jy0922.shim@samsung.com>,
Seung-Woo Kim <sw0312.kim@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Frieder Schrempf <frieder.schrempf@kontron.de>,
Fancy Fang <chen.fang@nxp.com>,
Tim Harvey <tharvey@gateworks.com>,
Michael Nazzareno Trimarchi <michael@amarulasolutions.com>,
Adam Ford <aford173@gmail.com>,
Neil Armstrong <narmstrong@linaro.org>,
Robert Foss <robert.foss@linaro.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Tommaso Merciai <tommaso.merciai@amarulasolutions.com>,
Marek Vasut <marex@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>,
dri-devel@lists.freedesktop.org,
linux-samsung-soc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
NXP Linux Team <linux-imx@nxp.com>,
linux-amarula <linux-amarula@amarulasolutions.com>,
Jagan Teki <jagan@amarulasolutions.com>
Subject: [PATCH v10 18/18] drm: bridge: samsung-dsim: Add i.MX8M Plus support
Date: Wed, 14 Dec 2022 18:29:07 +0530 [thread overview]
Message-ID: <20221214125907.376148-19-jagan@amarulasolutions.com> (raw)
In-Reply-To: <20221214125907.376148-1-jagan@amarulasolutions.com>
From: Marek Vasut <marex@denx.de>
Add extras to support i.MX8M Plus. The main change is the removal of
HS/VS/DE signal inversion in the LCDIFv3-DSIM glue logic, otherwise
the implementation of this IP in i.MX8M Plus is very much compatible
with the i.MX8M Mini/Nano one.
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v10:
- none
Changes for v9:
- added im8mp in DSIM_STATE_REINITIALIZED check
- drop previous = NULL check
drivers/gpu/drm/bridge/samsung-dsim.c | 23 +++++++++++++++++++++++
include/drm/bridge/samsung-dsim.h | 1 +
2 files changed, 24 insertions(+)
diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c
index b14efb6fca91..13ce21af3b4c 100644
--- a/drivers/gpu/drm/bridge/samsung-dsim.c
+++ b/drivers/gpu/drm/bridge/samsung-dsim.c
@@ -479,6 +479,7 @@ samsung_dsim_types[DSIM_TYPE_COUNT] = {
[DSIM_TYPE_EXYNOS5422] = &exynos5422_dsi_driver_data,
[DSIM_TYPE_EXYNOS5433] = &exynos5433_dsi_driver_data,
[DSIM_TYPE_IMX8MM] = &imx8mm_dsi_driver_data,
+ [DSIM_TYPE_IMX8MP] = &imx8mm_dsi_driver_data,
};
static inline struct samsung_dsim *host_to_dsi(struct mipi_dsi_host *h)
@@ -1461,10 +1462,17 @@ static int samsung_dsim_atomic_check(struct drm_bridge *bridge,
* 13.6.2.7.2 RGB interface
* both claim "Vsync, Hsync, and VDEN are active high signals.", the
* LCDIF must generate inverted HS/VS/DE signals, i.e. active LOW.
+ *
+ * The i.MX8M Plus glue logic between LCDIFv3 and DSIM does not
+ * implement the same behavior, therefore LCDIFv3 must generate
+ * HS/VS/DE signals active HIGH.
*/
if (dsi->plat_data->hw_type == DSIM_TYPE_IMX8MM) {
adjusted_mode->flags |= (DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC);
adjusted_mode->flags &= ~(DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC);
+ } else if (dsi->plat_data->hw_type == DSIM_TYPE_IMX8MP) {
+ adjusted_mode->flags &= ~(DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC);
+ adjusted_mode->flags |= (DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC);
}
return 0;
@@ -1639,6 +1647,10 @@ static const struct samsung_dsim_host_ops generic_dsim_host_ops = {
.unregister_host = generic_dsim_unregister_host,
};
+static const struct drm_bridge_timings samsung_dsim_bridge_timings_de_high = {
+ .input_bus_flags = DRM_BUS_FLAG_DE_HIGH,
+};
+
static const struct drm_bridge_timings samsung_dsim_bridge_timings_de_low = {
.input_bus_flags = DRM_BUS_FLAG_DE_LOW,
};
@@ -1728,6 +1740,8 @@ int samsung_dsim_probe(struct platform_device *pdev)
/* DE_LOW: i.MX8M Mini/Nano LCDIF-DSIM glue logic inverts HS/VS/DE */
if (dsi->plat_data->hw_type == DSIM_TYPE_IMX8MM)
dsi->bridge.timings = &samsung_dsim_bridge_timings_de_low;
+ else
+ dsi->bridge.timings = &samsung_dsim_bridge_timings_de_high;
if (dsi->plat_data->host_ops && dsi->plat_data->host_ops->register_host)
ret = dsi->plat_data->host_ops->register_host(dsi);
@@ -1833,11 +1847,20 @@ static const struct samsung_dsim_plat_data samsung_dsim_imx8mm_pdata = {
.host_ops = &generic_dsim_host_ops,
};
+static const struct samsung_dsim_plat_data samsung_dsim_imx8mp_pdata = {
+ .hw_type = DSIM_TYPE_IMX8MP,
+ .host_ops = &generic_dsim_host_ops,
+};
+
static const struct of_device_id samsung_dsim_of_match[] = {
{
.compatible = "fsl,imx8mm-mipi-dsim",
.data = &samsung_dsim_imx8mm_pdata,
},
+ {
+ .compatible = "fsl,imx8mp-mipi-dsim",
+ .data = &samsung_dsim_imx8mp_pdata,
+ },
{ /* sentinel. */ }
};
MODULE_DEVICE_TABLE(of, samsung_dsim_of_match);
diff --git a/include/drm/bridge/samsung-dsim.h b/include/drm/bridge/samsung-dsim.h
index e54e62f5f632..5b3dfcaf9fac 100644
--- a/include/drm/bridge/samsung-dsim.h
+++ b/include/drm/bridge/samsung-dsim.h
@@ -27,6 +27,7 @@ enum samsung_dsim_type {
DSIM_TYPE_EXYNOS5422,
DSIM_TYPE_EXYNOS5433,
DSIM_TYPE_IMX8MM,
+ DSIM_TYPE_IMX8MP,
DSIM_TYPE_COUNT,
};
--
2.25.1
next prev parent reply other threads:[~2022-12-14 13:02 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-14 12:58 [PATCH v10 00/18] drm: Add Samsung MIPI DSIM bridge Jagan Teki
2022-12-14 12:58 ` [PATCH v10 01/18] drm: of: Lookup if child node has DSI panel or bridge Jagan Teki
2022-12-14 12:58 ` [PATCH v10 02/18] drm: bridge: panel: Add devm_drm_of_dsi_get_bridge helper Jagan Teki
2022-12-14 12:58 ` [PATCH v10 03/18] drm: exynos: dsi: Drop explicit call to bridge detach Jagan Teki
2022-12-14 12:58 ` [PATCH v10 04/18] drm: exynos: dsi: Switch to devm_drm_of_dsi_get_bridge Jagan Teki
2022-12-14 12:58 ` [PATCH v10 05/18] drm: exynos: dsi: Mark PHY as optional Jagan Teki
2022-12-15 8:33 ` Frieder Schrempf
2022-12-14 12:58 ` [PATCH v10 06/18] drm: exynos: dsi: Add platform PLL_P (PMS_P) offset Jagan Teki
2022-12-14 12:58 ` [PATCH v10 07/18] drm: exynos: dsi: Introduce hw_type platform data Jagan Teki
2022-12-15 8:35 ` Frieder Schrempf
2022-12-14 12:58 ` [PATCH v10 08/18] drm: exynos: dsi: Handle proper host initialization Jagan Teki
2022-12-15 8:37 ` Frieder Schrempf
2022-12-14 12:58 ` [PATCH v10 09/18] drm: exynos: dsi: Add atomic check Jagan Teki
2022-12-15 8:39 ` Frieder Schrempf
2022-12-15 8:40 ` Frieder Schrempf
2022-12-14 12:58 ` [PATCH v10 10/18] drm: exynos: dsi: Add input_bus_flags Jagan Teki
2022-12-15 8:42 ` Frieder Schrempf
2022-12-14 12:59 ` [PATCH v10 11/18] drm: exynos: dsi: Add atomic_get_input_bus_fmts Jagan Teki
2022-12-15 8:57 ` Frieder Schrempf
2022-12-14 12:59 ` [PATCH v10 12/18] drm: exynos: dsi: Consolidate component and bridge Jagan Teki
2022-12-14 12:59 ` [PATCH v10 13/18] drm: exynos: dsi: Add Exynos based host irq hooks Jagan Teki
2022-12-14 12:59 ` [PATCH v10 15/18] dt-bindings: display: exynos: dsim: Add NXP i.MX8M Mini/Nano support Jagan Teki
2022-12-14 12:59 ` [PATCH v10 16/18] drm: bridge: samsung-dsim: Add " Jagan Teki
2022-12-15 9:22 ` Frieder Schrempf
2022-12-15 11:39 ` Robert Foss
2022-12-14 12:59 ` [PATCH v10 17/18] dt-bindings: display: exynos: dsim: Add NXP i.MX8M Plus support Jagan Teki
2022-12-20 17:26 ` Rob Herring
2022-12-14 12:59 ` Jagan Teki [this message]
2022-12-15 9:23 ` [PATCH v10 18/18] drm: bridge: samsung-dsim: Add " Frieder Schrempf
2022-12-15 11:39 ` Robert Foss
2023-01-05 10:24 ` [PATCH v10 00/18] drm: Add Samsung MIPI DSIM bridge Jagan Teki
2023-01-06 14:34 ` Adam Ford
2023-01-06 14:42 ` Fabio Estevam
2023-01-19 17:27 ` Fabio Estevam
2023-01-19 17:58 ` Jagan Teki
2023-01-20 12:06 ` Fabio Estevam
2023-01-20 14:41 ` Jagan Teki
2023-01-20 15:06 ` Marek Vasut
2023-01-20 18:54 ` Jagan Teki
2023-01-20 19:08 ` Marek Vasut
2023-01-20 18:59 ` Dave Stevenson
2023-01-23 12:22 ` Jagan Teki
2023-01-23 15:48 ` Jagan Teki
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=20221214125907.376148-19-jagan@amarulasolutions.com \
--to=jagan@amarulasolutions.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=aford173@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=chen.fang@nxp.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=frieder.schrempf@kontron.de \
--cc=inki.dae@samsung.com \
--cc=jy0922.shim@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-amarula@amarulasolutions.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=marex@denx.de \
--cc=matteo.lisi@engicam.com \
--cc=michael@amarulasolutions.com \
--cc=narmstrong@linaro.org \
--cc=robert.foss@linaro.org \
--cc=sw0312.kim@samsung.com \
--cc=tharvey@gateworks.com \
--cc=tommaso.merciai@amarulasolutions.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