From: Marek Vasut <marex@denx.de>
To: linux-arm-kernel@lists.infradead.org
Cc: "Marek Vasut" <marex@denx.de>, "Abel Vesa" <abel.vesa@nxp.com>,
"Dong Aisheng" <aisheng.dong@nxp.com>,
"Fabio Estevam" <festevam@gmail.com>,
"Guido Günther" <agx@sigxcpu.org>,
"Jaehoon Chung" <jh80.chung@samsung.com>,
"Lucas Stach" <l.stach@pengutronix.de>,
"Marek Szyprowski" <m.szyprowski@samsung.com>,
"NXP Linux Team" <linux-imx@nxp.com>,
"Rob Herring" <robh+dt@kernel.org>,
"Shawn Guo" <shawnguo@kernel.org>,
linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org
Subject: [PATCH] phy: exynos-mipi-video: Add support for NXP i.MX8MM
Date: Sun, 4 Oct 2020 00:50:19 +0200 [thread overview]
Message-ID: <20201003225020.164358-1-marex@denx.de> (raw)
This patch adds support for MIPI DPHY found in NXP i.MX8MM.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Abel Vesa <abel.vesa@nxp.com>
Cc: Dong Aisheng <aisheng.dong@nxp.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Guido Günther <agx@sigxcpu.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: linux-samsung-soc@vger.kernel.org
Cc: devicetree@vger.kernel.org
---
.../devicetree/bindings/phy/samsung-phy.txt | 7 ++++---
drivers/phy/samsung/Kconfig | 6 +++---
drivers/phy/samsung/phy-exynos-mipi-video.c | 21 +++++++++++++++++++
3 files changed, 28 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/phy/samsung-phy.txt b/Documentation/devicetree/bindings/phy/samsung-phy.txt
index 7510830a79bd..7b9dc361ab0c 100644
--- a/Documentation/devicetree/bindings/phy/samsung-phy.txt
+++ b/Documentation/devicetree/bindings/phy/samsung-phy.txt
@@ -1,14 +1,15 @@
-Samsung S5P/Exynos SoC series MIPI CSIS/DSIM DPHY
--------------------------------------------------
+Samsung S5P/Exynos and NXP i.MX8MM SoC series MIPI CSIS/DSIM DPHY
+-----------------------------------------------------------------
Required properties:
- compatible : should be one of the listed compatibles:
- "samsung,s5pv210-mipi-video-phy"
- "samsung,exynos5420-mipi-video-phy"
- "samsung,exynos5433-mipi-video-phy"
+ - "fsl,imx8mm-mipi-video-phy"
- #phy-cells : from the generic phy bindings, must be 1;
-In case of s5pv210 and exynos5420 compatible PHYs:
+In case of s5pv210, exynos5420, imx8mm compatible PHYs:
- syscon - phandle to the PMU system controller
In case of exynos5433 compatible PHY:
diff --git a/drivers/phy/samsung/Kconfig b/drivers/phy/samsung/Kconfig
index e20d2fcc9fe7..342b75f6e4f6 100644
--- a/drivers/phy/samsung/Kconfig
+++ b/drivers/phy/samsung/Kconfig
@@ -12,14 +12,14 @@ config PHY_EXYNOS_DP_VIDEO
Support for Display Port PHY found on Samsung Exynos SoCs.
config PHY_EXYNOS_MIPI_VIDEO
- tristate "S5P/Exynos SoC series MIPI CSI-2/DSI PHY driver"
+ tristate "S5P/Exynos/i.MX8MM SoC series MIPI CSI-2/DSI PHY driver"
depends on HAS_IOMEM
- depends on ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
+ depends on ARCH_S5PV210 || ARCH_EXYNOS || ARCH_MXC || COMPILE_TEST
select GENERIC_PHY
default y if ARCH_S5PV210 || ARCH_EXYNOS
help
Support for MIPI CSI-2 and MIPI DSI DPHY found on Samsung S5P
- and Exynos SoCs.
+ and Exynos SoCs, and on NXP i.MX8MM SoCs.
config PHY_EXYNOS_PCIE
bool "Exynos PCIe PHY driver"
diff --git a/drivers/phy/samsung/phy-exynos-mipi-video.c b/drivers/phy/samsung/phy-exynos-mipi-video.c
index c1df1ef3ee3c..b735b8089cd7 100644
--- a/drivers/phy/samsung/phy-exynos-mipi-video.c
+++ b/drivers/phy/samsung/phy-exynos-mipi-video.c
@@ -214,6 +214,24 @@ static const struct mipi_phy_device_desc exynos5433_mipi_phy = {
},
};
+static const struct mipi_phy_device_desc imx8mm_mipi_phy = {
+ .num_regmaps = 1,
+ .regmap_names = {"syscon"},
+ .num_phys = 1,
+ .phys = {
+ {
+ /* EXYNOS_MIPI_PHY_ID_DSIM0 */
+ .coupled_phy_id = EXYNOS_MIPI_PHY_ID_NONE,
+ .enable_val = BIT(17),
+ .enable_reg = 8,
+ .enable_map = EXYNOS_MIPI_REGMAP_PMU,
+ .resetn_val = BIT(5),
+ .resetn_reg = 0,
+ .resetn_map = EXYNOS_MIPI_REGMAP_PMU,
+ },
+ },
+};
+
struct exynos_mipi_video_phy {
struct regmap *regmaps[EXYNOS_MIPI_REGMAPS_NUM];
int num_phys;
@@ -349,6 +367,9 @@ static const struct of_device_id exynos_mipi_video_phy_of_match[] = {
}, {
.compatible = "samsung,exynos5433-mipi-video-phy",
.data = &exynos5433_mipi_phy,
+ }, {
+ .compatible = "fsl,imx8mm-mipi-video-phy",
+ .data = &imx8mm_mipi_phy,
},
{ /* sentinel */ },
};
--
2.28.0
next reply other threads:[~2020-10-03 22:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20201003225029eucas1p1485d7e1d64350c688b03b598067d7959@eucas1p1.samsung.com>
2020-10-03 22:50 ` Marek Vasut [this message]
2020-10-05 4:46 ` [PATCH] phy: exynos-mipi-video: Add support for NXP i.MX8MM Marek Szyprowski
2020-10-06 21:16 ` Rob Herring
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=20201003225020.164358-1-marex@denx.de \
--to=marex@denx.de \
--cc=abel.vesa@nxp.com \
--cc=agx@sigxcpu.org \
--cc=aisheng.dong@nxp.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=jh80.chung@samsung.com \
--cc=l.stach@pengutronix.de \
--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=robh+dt@kernel.org \
--cc=shawnguo@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 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).