Skip to contentSkip to conversation

phy: exynos-mipi-video: Add support for NXP i.MX8MM

PATCH In review Marek Vasut 3 participants 3 messages Oct 3, 2020 – Oct 6, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phy: exynos-mipi-video: Add support for NXP i.MX8MM

This patch adds support for MIPI DPHY found in NXP i.MX8MM.

Cc Abel Vesa <[email protected]>
Cc Dong Aisheng <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Guido Günther <[email protected]>
Cc Jaehoon Chung <[email protected]>
Cc Lucas Stach <[email protected]>
Cc Marek Szyprowski <[email protected]>
Cc NXP Linux Team <[email protected]>
Cc Rob Herring <[email protected]>
Cc Shawn Guo <[email protected]>
---
 .../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(-)
Documentation/devicetree/bindings/phy/samsung-phy.txt +4 -3
index 7510830a79bd..7b9dc361ab0c 100644
@@ -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:
drivers/phy/samsung/Kconfig +3 -3
index e20d2fcc9fe7..342b75f6e4f6 100644
@@ -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"
drivers/phy/samsung/phy-exynos-mipi-video.c +21 -0
index c1df1ef3ee3c..b735b8089cd7 100644
@@ -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 */ },
 };
Signature · 1 line
2.28.0
Acked-by on v1 1/1
#1 lore raw
Quoted 15 lines · Marek Vasut

This patch adds support for MIPI DPHY found in NXP i.MX8MM.

Cc Abel Vesa <[email protected]>
Cc Dong Aisheng <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Guido Günther <[email protected]>
Cc Jaehoon Chung <[email protected]>
Cc Lucas Stach <[email protected]>
Cc Marek Szyprowski <[email protected]>
Cc NXP Linux Team <[email protected]>
Cc Rob Herring <[email protected]>
Cc Shawn Guo <[email protected]>
Quoted 81 lines
---
  .../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(-)
Documentation/devicetree/bindings/phy/samsung-phy.txt +4 -3
index 7510830a79bd..7b9dc361ab0c 100644
@@ -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:
drivers/phy/samsung/Kconfig +3 -3
index e20d2fcc9fe7..342b75f6e4f6 100644
@@ -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"
drivers/phy/samsung/phy-exynos-mipi-video.c +18 -0
index c1df1ef3ee3c..b735b8089cd7 100644
@@ -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;

drivers/phy/samsung/phy-exynos-mipi-video.c static const struct of_device_id exynos_mipi_video_phy_of_match[] = { · line 375

Quoted 9 lines
drivers/phy/samsung/phy-exynos-mipi-video.c +3 -0
@@ -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 */ },
  };

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Marek Vasut
Quoted 15 lines · Marek Vasut

This patch adds support for MIPI DPHY found in NXP i.MX8MM.

Cc Abel Vesa <[email protected]>
Cc Dong Aisheng <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Guido Günther <[email protected]>
Cc Jaehoon Chung <[email protected]>
Cc Lucas Stach <[email protected]>
Cc Marek Szyprowski <[email protected]>
Cc NXP Linux Team <[email protected]>
Cc Rob Herring <[email protected]>
Cc Shawn Guo <[email protected]>
Quoted 6 lines
---
 .../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(-)