[PATCH v2] arm64: dts: imx8mp: Align both CSI2 pixel clock

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon May 6 11:55:34 PDT 2024


On Mon, May 06, 2024 at 08:19:57AM +0200, Alexander Stein wrote:
> Am Freitag, 3. Mai 2024, 15:45:57 CEST schrieb Laurent Pinchart:
> > On Fri, May 03, 2024 at 02:58:19PM +0200, Alexander Stein wrote:
> > > Am Mittwoch, 17. April 2024, 11:12:04 CEST schrieb Alexander Stein:
> > > > Am Dienstag, 16. April 2024, 16:19:10 CEST schrieb Marek Vasut:
> > > > > Configure both CSI2 assigned-clock-rates the same way.
> > > > > There does not seem to be any reason for keeping the
> > > > > two CSI2 pixel clock set to different frequencies.
> > > > > 
> > > > > This also reduces first CSI2 clock from overdrive mode
> > > > > frequency which is 500 MHz down below the regular mode
> > > > > frequency of 400 MHz.
> > > > > 
> > > > > Signed-off-by: Marek Vasut <marex at denx.de>
> > > > 
> > > > Apparently there is no difference when using imx415 (3840x2160) sensor.
> > > 
> > > Just for the records: While this change does not affect imx415 (3840x2160)
> > > processing, reducing clock-frequency as well (v3) imx415 does not work.
> > > So I assume that for this image size a higher than default frequency is
> > > required.
> > 
> > For the time being I expect sensor overlays to override the default
> > clock setup.
> 
> Yep, that's what I did in the end.
> 
> > Ideally the clock frequencies should be configured
> > automatically at runtime by the CSI-2 RX driver.
> 
> Ideally, yes. In this case it depends on whether it is MIPI-CSI 1 in normal
> or overdrive mode, if it is MIPI-CSI 2 or if both cameras a run
> simultaneously. I wonder if it really worth to add that much infrastructure
> for a use case which is essentially fixed setup.

There could be platforms where two cameras are connected, and the user
would want to operate them either concurrently at lower resolutions (and
speed), or separately at higher resolutions.

> > > > Reviewed-by: Alexander Stein <alexander.stein at ew.tq-group.com>
> > > > 
> > > > > ---
> > > > > Cc: Conor Dooley <conor+dt at kernel.org>
> > > > > Cc: Fabio Estevam <festevam at gmail.com>
> > > > > Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt at linaro.org>
> > > > > Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > > > > Cc: Paul Elder <paul.elder at ideasonboard.com>
> > > > > Cc: Pengutronix Kernel Team <kernel at pengutronix.de>
> > > > > Cc: Rob Herring <robh at kernel.org>
> > > > > Cc: Sascha Hauer <s.hauer at pengutronix.de>
> > > > > Cc: Shawn Guo <shawnguo at kernel.org>
> > > > > Cc: devicetree at vger.kernel.org
> > > > > Cc: imx at lists.linux.dev
> > > > > Cc: linux-arm-kernel at lists.infradead.org
> > > > > ---
> > > > > V2: Align both clock to 266 MHz and update commit message
> > > > > ---
> > > > >  arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > 
> > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > > > > index 1bb96e96639f2..7883f5c056f4e 100644
> > > > > --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > > > > +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> > > > > @@ -1667,7 +1667,7 @@ mipi_csi_0: csi at 32e40000 {
> > > > >  						  <&clk IMX8MP_CLK_MEDIA_MIPI_PHY1_REF>;
> > > > >  				assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_1000M>,
> > > > >  							 <&clk IMX8MP_CLK_24M>;
> > > > > -				assigned-clock-rates = <500000000>;
> > > > > +				assigned-clock-rates = <266000000>;
> > > > >  				power-domains = <&media_blk_ctrl IMX8MP_MEDIABLK_PD_MIPI_CSI2_1>;
> > > > >  				status = "disabled";
> > > > >  

-- 
Regards,

Laurent Pinchart



More information about the linux-arm-kernel mailing list