From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2316E355F5F for ; Wed, 13 May 2026 18:32:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778697148; cv=none; b=VVc/DfmZgugF71M/K9+zyFhBXABJTFOyEvWJtTaQmZDUWLf55fCAConnHgY9hXNOvg3mbC41tTYyqREeOKgl13QDRWp0xJEjswq7bxS94UTIJHfy+wd50R5GP8MthzQq3MO4CftGVPxVMDutG0uJMUVcLPendpbHFQNfUypZb1I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778697148; c=relaxed/simple; bh=u5JRG5XfU6If/WcZoYnS0P1yGT4GqSECcyMb3oWX52A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VudW35mYmzUQTP+UwF+bcYE6eHNR8vdqiIh2Iqu8F8ezKHxBkV51fQEJZYWe7KhD0Jve3dRHeZJhSlqmJmAemoiHydwrr7xeTNh0EQcOCkdofH8Ryc5ooyDz2D0VHkbvgo/bpBheRZ48BGnjkqZu2G4HMphb8jadSwth7M2HgAI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kZJC58cJ; arc=none smtp.client-ip=209.85.219.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kZJC58cJ" Received: by mail-qv1-f50.google.com with SMTP id 6a1803df08f44-8bb09239328so58983356d6.3 for ; Wed, 13 May 2026 11:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778697146; x=1779301946; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=5PQtScpRYLYS64n5yuVSHFswu1XocSJbgMfVsZcyBT4=; b=kZJC58cJQhqR2XHtKrLs7VVfT7/szi2lTakWrtyC8X5wZfYLkW+/4vBcF5MFrWA2sq XMS4dHprXK5izhsov/ZQrUu8sg7IlHKsUT/jPoJaxYU4DM7ySAusSmXyJagbGTaxzTm6 n975RtUbjUnzrCu/04Dsp+72tixIyHV4cPTMBjbsLGxSBOjno1QRDlgaglr2FaRsIYUC 6QXFbLQCVwVL5OBmxf2oOhbOHGJYay82JIUuzM8s4fZOb+7fuYAELtn/PVm7tALZ5hud Toi+r6BcptdPWwSOeJiS2501MBQJKZc3qo7qk55JVuiiuKlVffuaf6uj7K7GdpDO5yUi tHGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778697146; x=1779301946; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5PQtScpRYLYS64n5yuVSHFswu1XocSJbgMfVsZcyBT4=; b=jU/w/mVDAZ6mhlQLuVAdrjXJ4///vGRz0uPbNWRAO+DTY3/jcuqmVIqj1SS/AHf+rl Ic5AY4StAunRP88akUO0fm+KmciCZYphHysol5VP/o8m9DMzjuj5Kcy8YWdq2t+6BaIz j+jH4sGwJNq/+q8ENYb5Z7kA/w7ZcCqx7Iv1tejLTG/XJDTmq1HtlEEmC4cmprClyA2K umXgW4Ov0IYQOPp+MbxP9p5+Y5W/2RpDM/G+eGPjxzi6HRpX0093Ea6WMnUSpr17NFAt AJHg+maS9Rp2RamWwV31dpVMhR9fGnY9E9C65H0zrcAqc4Dd50TQil08ySUHfvb1Aiqg 4QuQ== X-Forwarded-Encrypted: i=1; AFNElJ9IWODIm+46/oRc4G40JRScRVKwbs5voEyFJAe94wC3q1iHifLo9XGYyY/wqsCG7tRHPcdDOKefIOKTdeI=@vger.kernel.org X-Gm-Message-State: AOJu0YwAmoTOtb+k/265Dw2eG6mMIKTJS7bJZwHAHFWxnvdkP2P1FnvE a9SIt0NXZt3LDk+DKbAnpZd4L5XfvUwOkVGagx73Qotmm97mKfkcrao0 X-Gm-Gg: Acq92OFNdRocIeEtcb1xB3PZDJIOfjuLfGeqUwl0e/izsqQiQR4cyfno64mDVWH8X4C 8eMEx8fo2tEoaLCx7hediZaAM6scYkokAOVNSlnhM0wL+yRzCtPe8QZa+XojnASivSSVt8hRleI yPkb0jsO7uVNVafKEhU2Lvr2Ho+nk7wfdNFw+NR/XlbCQFglsZRMMBiLYPwVwQDVu0BAK7fjPtK mUXXqOJG4qahagnMFGhk5zJIojoZ5U45L5v1wwBrOYzwhTzXGMICL16QMdUhdrGJscwultJWwWx wcQFnTc1S2yJmxgI5nBk8yQAfK0hDr1lSnz58jpPKIw9aOKYUjVGdTRqPbT9QpMRV5h2oRdhbY0 Eu1IBrcF1UGg3FcZOyG1xln4AmSnoYRxtcO98ZUJy36tHOnNzbV8nKw95S50CIGiRM5HFPCtTcd is7QElPPOx30YgpCcMh97PgEW0FQ== X-Received: by 2002:a05:6214:4289:b0:8c2:f420:4d60 with SMTP id 6a1803df08f44-8c7bcfed2e8mr74364196d6.38.1778697145955; Wed, 13 May 2026 11:32:25 -0700 (PDT) Received: from localhost ([142.181.178.53]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8c90874e490sm3243946d6.1.2026.05.13.11.32.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2026 11:32:25 -0700 (PDT) Date: Wed, 13 May 2026 14:33:20 -0400 From: Richard Acayan To: Dave Stevenson Cc: Tianshu Qiu , Sakari Ailus , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, David Heidelberg , 20260414-imx355-24mhz-v1-1-9ae77bc6e7ec@ixit.cz Subject: Re: [PATCH 13/13] media: imx355: Support 2 lane readout. Message-ID: References: <20260506-media-imx355-v1-0-660685030455@raspberrypi.com> <20260506-media-imx355-v1-13-660685030455@raspberrypi.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260506-media-imx355-v1-13-660685030455@raspberrypi.com> On Wed, May 06, 2026 at 07:23:51PM +0100, Dave Stevenson wrote: > The sensor supports 2 or 4 lane readout, but the driver only allowed > for 4 lanes. Add 2 lane support. > > The clock tree was set to use single PLL mode to feed both IOP (MIPI) > and IVT (Pixel array). > 2 lane mode supports a MIPI link frequency of up to 445MHz (890Mbit/s) > cf 360MHz (720Mbit/s) for 4lane, but that requires switching to dual > PLL mode as the rates can't be achieved with simple divisors. > The LLP values are extended for each mode to account for the increased > time per line over the MIPI link. > > Signed-off-by: Dave Stevenson > --- > drivers/media/i2c/imx355.c | 135 ++++++++++++++++++++++++++++----------------- > 1 file changed, 84 insertions(+), 51 deletions(-) > > diff --git a/drivers/media/i2c/imx355.c b/drivers/media/i2c/imx355.c > index d0e0e81d1e7c..fa1d1c86d5b0 100644 > --- a/drivers/media/i2c/imx355.c > +++ b/drivers/media/i2c/imx355.c (snip) > @@ -1192,13 +1220,18 @@ static struct imx355_hwcfg *imx355_get_hwcfg(struct device *dev) > if (!cfg) > goto out_err; > > - if (bus_cfg.bus.mipi_csi2.num_data_lanes != IMX355_DATA_LANES) > + if (bus_cfg.bus.mipi_csi2.num_data_lanes != 2 && > + bus_cfg.bus.mipi_csi2.num_data_lanes != 4) > goto out_err; Now we know that the sensor supports a configuration with 2 lanes. Previously, there was a question whether there was a configuration with a different number of data lanes (from https://lore.kernel.org/linux-arm-msm/3c51f9fe-9c5f-47dd-a971-5b2a9e416230@linaro.org/ ): Does IMX355 sensor hardware support any other number of lanes? 1) If no, then it makes no practical sense to check for data lanes number given by firmware, there can be any stored value, but it's known that the number of sensor data lanes is 4. 2) If yes, then please return to the sensor dt bindings, and reflect any other options, right now it is set strictly to 4 lanes only. In case if 'data-lanes' property is omitted, you can use 4 lanes as a default number of data lanes, and this information shall be documented in the dt bindings. We should adjust the dt-bindings to accept a devicetree with 2 lanes.