From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F6DC1FC8; Wed, 3 Jun 2026 10:03:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780480986; cv=none; b=NUfgUdFOXCYamB4oDpAoILCMq2s1CNIohG+0xjLRWJeo5Ylt/mhP8CCHlk+oKNqxotef2QHmD8wod9omIfZ/nbvfW8v05yR04Vi71p6IVRAAHdCGtmGkrP+pufByog24r7B046s1h0ibxs7dtonNbAw5xAcV7rSUomtSHzvexHU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780480986; c=relaxed/simple; bh=rd/XJCLeGutAP6vdv4HQbc/zX0TFcCi8MS1cMvpS+qA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=g+pgU16T+4YvC1rWFbrGCOXU6Yb3Pc2xrBNv5uFtZjaNfqWhNGoT9+miIxgB4liUEeAH8xpDEor9sz7sY01+8xikwQNzjImB5igFQLuiu9qGkdT0wEiUS0EN8JgjZnR/iIM/bBD10B3UNAeVR1aWeIx85AdqWzJoE35P8O996zs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JKQ2P70O; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JKQ2P70O" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C7C6D1F00893; Wed, 3 Jun 2026 10:03:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780480985; bh=ACwX1eA04+1ASs8+AUZM9OwlIkHtK3XNcCJgkbAhMwo=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=JKQ2P70OeXVvmbAmsD2p6whOHUqY0yERjAJ3N8YonPJgMlZa+CdTzFUHYzsSRIcBx g5XhoSr3gk7j7AN3FiF5qdRCr10scOxrzPi7FY88G0aUmAuGND23oRLOffMIv1kaIx ipdw7Nttnh2qCBynEjisTnqfyJXDanHflIh21kL8gzX/DacW6tB0n9DMI7jl0X0OLm hp9DNRDd16dTZPdu9AnREHoq264xlRMN90ILUCiVgHwhJswS5rAIvGes8Y9x3562ti uVolNK8BR0tzakwkKB809xNNeIHwxGyzoJXJXTlKb38CWWFOjYFOjpVZuKUYC+s8GP Yy1dQ6s5nGXhg== Message-ID: <22807003-2b9a-4a28-982e-8c432cb9b9a1@kernel.org> Date: Wed, 3 Jun 2026 11:03:00 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 0/8] media: camss: Add support for C-PHY configuration on Qualcomm platforms To: david@ixit.cz, Robert Foss , Todor Tomov , Bryan O'Donoghue , Vladimir Zapolskiy , Mauro Carvalho Chehab , Luca Weiss , Petr Hodina , "Dr. Git" , Cory Keitz , Loic Poulain Cc: Konrad Dybcio , Kieran Bingham , Sakari Ailus , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org References: <20260603-qcom-cphy-v6-0-e50de0b557a8@ixit.cz> From: Bryan O'Donoghue Content-Language: en-US Autocrypt: addr=bod@kernel.org; keydata= xsFNBGRJNSgBEADD7Vm2ZFa+v+JGJ2QYTJqQAkqis/uOHkhdFNXqpBarVBd47QU/DMNU5Rxg jedMQEmHoeDbJ6UOpjbrUQ63c5sgG1JbroHJJct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AQoAIBYhBOaT+yqro23hF6tvtCJxO7Ohjcg6BQJkSTUoAhsM AAoJECJxO7Ohjcg6LuIQALnXt36OUuK43wqw6UYt0cnN6EbUqJHApAF5eNFn0jCCB2XELjSz JKJwuNAweowBdabiBniJ+501WIW+ewEsz1uby5fUQjZuCEsIkuaIluyfUFPb73qrQyAGuusd 7teA4WT+/jUku9g7lX5sVoRCrKQPkd16f6Bzfztyqyjcn43/X5yQI+wlboQ6HuKe/3I3yiOx OgmCHzOawpC9PvhEcKj79RLM3Zz5Ts5AuHpRX70Jz8Be76LwVFLp5Msx3S24ZTU1lBo2uiJ3 xSkay2lTpyVWRPx9vgcwzxGguOPJQJwsQeLb7wpoJMPpD3ERoaRii7Q7hvmxklpZjhKYWB3d t6nQ497Ek9loCrp3MIjRCSDN5xEGffiHks9yTeGMUQwO4tX8RE04uOJPkUY7uCFzFqN6/qey X3oFfPgkULMdiHofPAL1OskZSTzGPSfTYRE46NCJw8yoZBQ/oOyWeqaUQbK0wmW/g81wm8p7 LKSGEglMpiX07M1AotgvylN5C8fjbouoK+/RAMsXkk8jba6rPfuuXPaDjCyyKn6zSVHETnHW 3AJbgVY50T8STpnxayBQvWbCvu+6NOEjXCbyaOJig+5l0zlGN9XHjdANXC5HnwmyaGRL9YDq Jh2nVXVJDincOdQRdKcJjYLqaOAoWrYWSDi1iZGspHBTDrnOvfMQzzHY In-Reply-To: <20260603-qcom-cphy-v6-0-e50de0b557a8@ixit.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 03/06/2026 00:30, David Heidelberg via B4 Relay wrote: > Note: WIP tag added, as not everything from the previous review round has > been addressed. > > # Short summary > > This patch series extends the Qualcomm CAMSS (Camera Subsystem), > including CSID and CSIPHY components, to support C-PHY mode configuration. > > # Background and motivation > > Modern smartphone cameras increasingly rely on MIPI C-PHY rather than > D-PHY, thanks to its higher data throughput and signal efficiency. > As a result, many OEMs adopt C-PHY interfaces for main (rear) cameras on > Qualcomm-based devices. > > Until now, mainline Linux lacked C-PHY configuration support for Qualcomm > chipsets, preventing bring-up of primary camera sensors on several > Snapdragon platforms. This series closes that gap. > > - Introduces C-PHY configuration support for the CAMSS driver stack, > covering both CSID and CSIPHY blocks. > - Successfully enables C-PHY operation on the Snapdragon 845 platform. > - Tested on OnePlus 6 and 6T phones running mainline Linux, > using the Sony IMX519 main camera sensor. > - The new configuration allows other chipsets versionsto enable C-PHY by > simply adding corresponding sensor driver support and csiphy > initialization data, following the example set for sdm845. > > With this patch series, mainline Linux gains working C-PHY support for > Snapdragon 845, paving the way for improved main camera functionality > across many Qualcomm-based devices. The groundwork also simplifies > future enablement efforts for additional SoCs and sensors. > > Until merged, the series will be also available at: > https://codeberg.org/sdm845/linux/commits/branch/b4/qcom-cphy > > Signed-off-by: David Heidelberg > --- > Changes in v6: > - lanes_enable now uses WARN_ONCE instead of return values. (Sakari) > - Dropped Kodiak patch until it gets better documented. > - Document the 3ph C-PHY sdm845 registers a bit. > - Link to v5: https://lore.kernel.org/r/20260531-qcom-cphy-v5-0-6be0f62b4d65@ixit.cz > > Changes in v5: > - Split first patch enabling C-PHY part into last patch. (Bryan) > - Fix the camss_get_link_freq crash. (Cory) > - Dropped patch whitelisting C-PHY, instead use nullptr check. (Bryan) > - Dropped A-b/R-b from > "media: qcom: camss: Initialize lanes after lane configuration is available" > and changed Petr to Co-developed by and owned the patch. > - Link to v4: https://lore.kernel.org/r/20260301-qcom-cphy-v4-0-e53316d2cc65@ixit.cz > > Changes in v4: > - Documented cphy parametr to camss_get_link_freq. > - Use BIT() macro for lane_mask. (Bryan) > - Correct lane_mask calculation. (Kieran + me) > - Removed comment for the D/C-PHY sequences init. (Bryan) > - Pass &csid->phy for calculate freq. (Bryan) > - Added missing cphy description to camss_get_link_freq. (kernel test robot) > - Gen2 v1.1 MIPI CSI-2 CPHY init hex to lowercase. > - Added back missed commit with improved electrical for sdm845 3ph. > - NOT addressed yet: > - Proliferating special cases in switch statements on a per-SoC basis is verboten. > - is it possible to set clock_lane to say 0xff in DT ? > - Link to v3: https://lore.kernel.org/r/20260117-qcom-cphy-v3-0-8ce76a06f7db@ixit.cz > > Changes in v3: > - Make lanes_enable return sucess or error, since I couldn't move the > configuration to the _init. > - Dropped R-b tags on > "media: qcom: camss: Initialize lanes after lane configuration is available" > as I changed formatting. > - Link to v2: https://lore.kernel.org/r/20251204-qcom-cphy-v2-0-6b35ef8b071e@ixit.cz > > Changes in v2: > - This is still WIP patch series, thus I wanted to publish already > changed parts to get feedback regarding to the direction of patchset. > - When switch to using odd bits, zeroed val which was left unitialized in v1. > - Accidentally missed archs added back in the commit moving lane regs to > new location. > - Remove commit with reverting check for only D-PHY is supported and > adjusted the check to also account for C-PHY. > - Documented link frequency calculation with defines. (Casey) > - Changed the cphy boolean to phy_cfg enum in the camss/camss-csiphy. > (Brian) > - Added patch for csiphy-3ph enablement for sm7280 from Luca as I'm > meanwhile trying to bring up the C-PHY sensor on FairPhone 5. > - Merged these two commits together > csiphy-3ph: Enable sdm845 C-PHY sequence > csiphy-3ph: Add Gen2 v1.1 MIPI CSI-2 CPHY init > merged R-b. > - Link to v1: https://lore.kernel.org/r/20251109-qcom-cphy-v1-0-165f7e79b0e1@ixit.cz > > --- > David Heidelberg (8): > media: qcom: camss: csiphy: Introduce PHY configuration > media: qcom: camss: csiphy-3ph: Use odd bits for configuring C-PHY lanes > media: qcom: camss: Prepare CSID for C-PHY support > media: qcom: camss: Initialize lanes after lane configuration is available > media: qcom: camss: csiphy-3ph: Add Gen2 v1.1 MIPI CSI-2 C-PHY init > media: qcom: camss: csiphy-3ph: Update Gen2 v1.1 MIPI CSI-2 C-PHY init > media: qcom: camss: Account for C-PHY when calculating link frequency > media: qcom: camss: Enable C-PHY where available > > .../media/platform/qcom/camss/camss-csid-gen2.c | 1 + > drivers/media/platform/qcom/camss/camss-csid.c | 8 +- > drivers/media/platform/qcom/camss/camss-csid.h | 1 + > .../platform/qcom/camss/camss-csiphy-3ph-1-0.c | 243 +++++++++++++++++---- > drivers/media/platform/qcom/camss/camss-csiphy.c | 6 +- > drivers/media/platform/qcom/camss/camss-csiphy.h | 2 + > drivers/media/platform/qcom/camss/camss.c | 36 ++- > drivers/media/platform/qcom/camss/camss.h | 2 +- > 8 files changed, 236 insertions(+), 63 deletions(-) > --- > base-commit: b7bee4ca5688e30ca50fbc87b1b8f7eed7006c17 > change-id: 20251109-qcom-cphy-bb8cbda1c644 > > Best regards, I'd like to see a dts to go with this ideally for upstream ... --- bod