Skip to contentSkip to conversation

phy: mtk-mipi-csi: add driver for CSI phy

PATCH Applied Julien Stephan 3 participants 3 messages Jan 11, 2024 – Feb 7, 2024

Subsystems (5)
lore
Share & tools
lore

Julien Stephan

author maintainer
#0 lore raw

PATCH v5 2/2 phy: mtk-mipi-csi: add driver for CSI phy

From: Phi-bang Nguyen <[email protected]>

This is a new driver that supports the MIPI CSI CD-PHY version 0.5

The number of PHYs depend on the SoC.
Each PHY can support D-PHY only or CD-PHY configuration. The driver supports only D-PHY mode, so CD-PHY compatible PHY are configured in D-PHY mode.

[Julien Stephan: refactor code]

[Julien Stephan: simplify driver model: one instance per phy vs one instance for all phys]

---
 MAINTAINERS                                   |   1 +
 drivers/phy/mediatek/Kconfig                  |  12 +
 drivers/phy/mediatek/Makefile                 |   2 +
 .../mediatek/phy-mtk-mipi-csi-0-5-rx-reg.h    |  62 ++++
 drivers/phy/mediatek/phy-mtk-mipi-csi-0-5.c   | 294 ++++++++++++++++++
 5 files changed, 371 insertions(+)
 create mode 100644 drivers/phy/mediatek/phy-mtk-mipi-csi-0-5-rx-reg.h
 create mode 100644 drivers/phy/mediatek/phy-mtk-mipi-csi-0-5.c
MAINTAINERS +1 -0
index 37dfa99b0eb0..ca413ff49d78 100644
@@ -13574,6 +13574,7 @@ M:	Julien Stephan <[email protected]>
 M:	Andy Hsieh <[email protected]>
 S:	Supported
 F:	Documentation/devicetree/bindings/phy/mediatek,mt8365-csi-rx.yaml
+F:	drivers/phy/mediatek/phy-mtk-mipi-csi-0-5*
 
 MEDIATEK MMC/SD/SDIO DRIVER
 M:	Chaotian Jing <[email protected]>
drivers/phy/mediatek/Kconfig +12 -0
index 3125ecb5d119..3849b7c87d28 100644
@@ -58,6 +58,18 @@ config PHY_MTK_HDMI
 	help
 	  Support HDMI PHY for Mediatek SoCs.
 
+config PHY_MTK_MIPI_CSI_0_5
+	tristate "MediaTek MIPI CSI CD-PHY v0.5 Driver"
+	depends on ARCH_MEDIATEK || COMPILE_TEST
+	depends on OF
+	select GENERIC_PHY
+	help
+	  Enable this to support the MIPI CSI CD-PHY receiver version 0.5.
+	  The driver supports multiple CSI cdphy ports simultaneously.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called phy-mtk-mipi-csi-0-5.
+
 config PHY_MTK_MIPI_DSI
 	tristate "MediaTek MIPI-DSI Driver"
 	depends on ARCH_MEDIATEK || COMPILE_TEST
drivers/phy/mediatek/Makefile +2 -0
index c9a50395533e..f6e24a47e081 100644
@@ -15,6 +15,8 @@ phy-mtk-hdmi-drv-y			+= phy-mtk-hdmi-mt8173.o
 phy-mtk-hdmi-drv-y			+= phy-mtk-hdmi-mt8195.o
 obj-$(CONFIG_PHY_MTK_HDMI)		+= phy-mtk-hdmi-drv.o
 
+obj-$(CONFIG_PHY_MTK_MIPI_CSI_0_5)	+= phy-mtk-mipi-csi-0-5.o
+
 phy-mtk-mipi-dsi-drv-y			:= phy-mtk-mipi-dsi.o
 phy-mtk-mipi-dsi-drv-y			+= phy-mtk-mipi-dsi-mt8173.o
 phy-mtk-mipi-dsi-drv-y			+= phy-mtk-mipi-dsi-mt8183.o
drivers/phy/mediatek/phy-mtk-mipi-csi-0-5-rx-reg.h new file +62 -0

62 lines not on this page · raw message

drivers/phy/mediatek/phy-mtk-mipi-csi-0-5.c new file +294 -0

294 lines not on this page · raw message

Signature · 1 line
2.43.0
maintainer Reviewed-by on v5 2/2
#1 lore raw

Il 11/01/24 11:17, Julien Stephan ha scritto:

Quoted 9 lines

From: Phi-bang Nguyen <[email protected]>

This is a new driver that supports the MIPI CSI CD-PHY version 0.5

The number of PHYs depend on the SoC.
Each PHY can support D-PHY only or CD-PHY configuration. The driver supports only D-PHY mode, so CD-PHY compatible PHY are configured in D-PHY mode.

Quoted 7 lines
[Julien Stephan: refactor code]

[Julien Stephan: simplify driver model: one instance per phy vs one instance for all phys]

maintainer Applied
#2 lore raw
In reply to Julien Stephan
Quoted 8 lines · Julien Stephan

This is a new driver that supports the MIPI CSI CD-PHY version 0.5

The number of PHYs depend on the SoC.
Each PHY can support D-PHY only or CD-PHY configuration. The driver supports only D-PHY mode, so CD-PHY compatible PHY are configured in D-PHY mode.

[...]

Applied, thanks!

[2/2] phy: mtk-mipi-csi: add driver for CSI phy

      commit: 673d70cb3c652ad6d97594e03225bbdf20226216

Best regards,

Signature · 1 line
~Vinod