* [PATCH 06/10] phy: exynos-mipi-video: Add support for NXP i.MX8MM
[not found] <20211212150656.375538-1-michael@amarulasolutions.com>
@ 2021-12-12 15:06 ` Michael Trimarchi
2021-12-12 15:15 ` Michael Nazzareno Trimarchi
0 siblings, 1 reply; 2+ messages in thread
From: Michael Trimarchi @ 2021-12-12 15:06 UTC (permalink / raw)
To: Jagan Teki
Cc: tharvey, Marek Vasut, Abel Vesa, Dong Aisheng, Fabio Estevam,
Guido Günther, Jaehoon Chung, Lucas Stach, Marek Szyprowski,
NXP Linux Team, Rob Herring, Shawn Guo, linux-samsung-soc,
devicetree, Rob Herring
From: Marek Vasut <marex@denx.de>
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
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Rob Herring <robh@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 8f51aee91101..6071ce6f036c 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 3ccaabf2850a..8d4f84879180 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.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 06/10] phy: exynos-mipi-video: Add support for NXP i.MX8MM
2021-12-12 15:06 ` [PATCH 06/10] phy: exynos-mipi-video: Add support for NXP i.MX8MM Michael Trimarchi
@ 2021-12-12 15:15 ` Michael Nazzareno Trimarchi
0 siblings, 0 replies; 2+ messages in thread
From: Michael Nazzareno Trimarchi @ 2021-12-12 15:15 UTC (permalink / raw)
To: Jagan Teki
Cc: tharvey, Marek Vasut, Abel Vesa, Dong Aisheng, Fabio Estevam,
Guido Günther, Jaehoon Chung, Lucas Stach, Marek Szyprowski,
NXP Linux Team, Rob Herring, Shawn Guo, linux-samsung-soc,
devicetree, Rob Herring
Hi
Went out by mistake. Sorry for the noise
Michael
On Sun, Dec 12, 2021 at 4:07 PM Michael Trimarchi
<michael@amarulasolutions.com> wrote:
>
> From: Marek Vasut <marex@denx.de>
>
> 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
> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Acked-by: Rob Herring <robh@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 8f51aee91101..6071ce6f036c 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 3ccaabf2850a..8d4f84879180 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.25.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-12 15:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20211212150656.375538-1-michael@amarulasolutions.com>
2021-12-12 15:06 ` [PATCH 06/10] phy: exynos-mipi-video: Add support for NXP i.MX8MM Michael Trimarchi
2021-12-12 15:15 ` Michael Nazzareno Trimarchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox