lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aGcOj4/0umfWaaTP@lizhi-Precision-Tower-5810>
Date: Thu, 3 Jul 2025 22:04:52 -0400
From: Frank Li <Frank.li@....com>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: Rui Miguel Silva <rmfrfs@...il.com>,
	Martin Kepplinger <martink@...teo.de>,
	Purism Kernel Team <kernel@...i.sm>,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Eugen Hristev <eugen.hristev@...aro.org>,
	Shawn Guo <shawnguo@...nel.org>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	Pengutronix Kernel Team <kernel@...gutronix.de>,
	Fabio Estevam <festevam@...il.com>, Peng Fan <peng.fan@....com>,
	Alice Yuan <alice.yuan@....com>, Vinod Koul <vkoul@...nel.org>,
	Kishon Vijay Abraham I <kishon@...nel.org>,
	Philipp Zabel <p.zabel@...gutronix.de>, linux-media@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
	linux-phy@...ts.infradead.org, "Guoniu.zhou" <guoniu.zhou@....com>
Subject: Re: [PATCH 5/7] media: nxp: add DesignWare MIPI CSI2 controller
 driver

On Wed, Jul 02, 2025 at 11:55:35AM -0400, Frank Li wrote:
> On Wed, Jul 02, 2025 at 12:38:06PM +0300, Laurent Pinchart wrote:
> > Hi Frank,
> >
> > Thank you for the patch.
> >
> > On Tue, Jul 01, 2025 at 06:06:10PM -0400, Frank Li wrote:
> > > From: "Guoniu.zhou" <guoniu.zhou@....com>
> > >
> > > Add V4L2 subdev driver for DesignWare MIPI CSI2 controller.
> >
> > This seems to be at least the third instance of a driver for the CSI-2
> > receiver, the first two being
>
> when I read spec, I known it should be used at other SoC. But I just jump
> to into this area, not easy to find who use it easily.
>
> > drivers/media/platform/raspberrypi/rp1-cfe/dphy.c and the second one
>
> I think this one is not good abstraction. it should be phy driver, which
> use "test" interface to community MIPI phy. I think it'd better create
> a bus driver, like test_if, DPHY should be child devices of this test_if.
>
> like
> 	csi2@000 {
> 		...
> 		phys = <&dphy>;
>
> 		dphy: dphy {
> 			compatible = "...";
> 		}
> 	}
>
> 	The tough problem is that dwc phy have one kind of combo phy, which
> 	under both dsi and csi controller's test_if.
>
> 	CSI need config such combophy by DSI test_if. I still have not idea
> 	how to descript this type hardware yet.
>
> > drivers/media/platform/renesas/rcar-csi2.c (the latter seems to support
> > multiple CSI-2 receivers).
>

Are you sure it is use dwc IP? I check regiser layout only few is the same

#define V4H_N_LANES_REG                                 0x0004
#define V4H_CSI2_RESETN_REG                             0x0008

#define V4H_PHY_MODE_REG                                0x001c
#define V4H_PHY_MODE_DPHY                               0
#define V4H_PHY_MODE_CPHY                               1

#define V4H_PHY_SHUTDOWNZ_REG                           0x0040
#define V4H_DPHY_RSTZ_REG                               0x0044

Anything I missed?

Frank

> This is one mixed PHY and controller to one drivers, which is not problem
> when use one big MMIO space.
>
> We can create dwc mipi csi common library, let each vendor driver to link
> it (dwc pci/usb did this). The issue is that I have not their hardware to
> test it.
>
> > drivers/staging/media/imx/imx6-mipi-csi2.c
> > seem related too, likely for an old version of the IP.
>
> After we create common dw mipi csi library, we can move this to there.
>
> Frank
>
> >
> > Could we please try to avoid code duplication ?
> >
> > > Signed-off-by: Guoniu.zhou <guoniu.zhou@....com>
> > > Signed-off-by: Frank Li <Frank.Li@....com>
> > > ---
> > >  MAINTAINERS                                |    1 +
> > >  drivers/media/platform/nxp/Kconfig         |   11 +
> > >  drivers/media/platform/nxp/Makefile        |    1 +
> > >  drivers/media/platform/nxp/dwc-mipi-csi2.c | 1675 ++++++++++++++++++++++++++++
> >
> > This should go to drivers/media/platform/synopsys/
> >
> > >  4 files changed, 1688 insertions(+)
> >
> > [snip]
> >
> > --
> > Regards,
> >
> > Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ