From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 96CA0242D91 for ; Fri, 5 Dec 2025 12:00:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764936055; cv=none; b=gVAkVjm/T3eTL0LKmprDIvufrtHH5EUWZjlrHobE6L4g8aVz7q3Sv6UfY8MWK9uFdsN+1AK+fNjsLJgiNala1OJrLVWuRTG8dclsXpdZF/3csRkozxTcFo3PLm1dsNtP3GJN9Bu5//ydy+sr3iBMxNl4tgVdOzprjCOyNCi4m8o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764936055; c=relaxed/simple; bh=5GJYnPeEXYloCmknrlsTIN+1ez280CnAJeaeZAgoVMk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=IkxfAmRm7ml2di4U+h3IAb2P8Ju5S05XLGAYZWyBpK7x8YiktmcrGNiRRzuwekRhLP57Tv/52XFsBHKWIc312KFqdlaDvhQWN01KLSptfIo14gwVnt3uFV6A/F3QB2sDBVHC2k0vPDZGrwCkFiKUegDdfSiUyHPCHkRN1Oo3AwE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=I9VjNx5d; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=g3Qx2Wzn; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="I9VjNx5d"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="g3Qx2Wzn" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5B5AOR1Q067639 for ; Fri, 5 Dec 2025 12:00:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 3+9AN/HxdHG5JU3qIa6IofBm9MTQMtmCFXG7ehrSIBg=; b=I9VjNx5dktPJBIbH SGP4LpsRexqizAUcMPmmDNz10KZg5qRv9xGwWoQXC4N1kXrKcaeT4HaqT9Mu79my fHGi/Mox9vu1t34j1EZcnwN/9ZgutyeDJZlyTmPCsvp8kO69fkmgmerFkCrWd4nP XHsX9TLflro50QaLUtw4kFLKHxWAzmQR1xlFfxlB/45+scf4eoatbhcSZgkBsvxo 42eGE7jn2l9ePivBF3WMUAenGHCG5rAjvLbl+WohVton3y03SXXD8/HOcAESQBBn ULQpvpnAgKlvSwvE0IFdJIfQjci5FybWfMjRqZgMlTwlme9tlasC87T/NLbPzdRF +DTLlA== Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4auwm4g82s-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 05 Dec 2025 12:00:49 +0000 (GMT) Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-88820c4d03aso5462106d6.2 for ; Fri, 05 Dec 2025 04:00:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764936048; x=1765540848; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=3+9AN/HxdHG5JU3qIa6IofBm9MTQMtmCFXG7ehrSIBg=; b=g3Qx2WznfENg+IIMcznVoF3Xspnp4nw8A3ZkDslj9Y75ALE+CbjoWQ7rqACJcNBi+s UtHdviv9hv5mQUUDTEiYuRULj1N7g+HlczaSRw+vMaAQlo346pv+usYxeQ89it2Vk/Ie jzJ3sbEuxdl+5QQntLVe7dPuSD//Ks2XLM5hq/ETXBdDqIPqYxxt+QQKW+Nx/gDcuJLS gcrUI2+m7MeD1dbE6H8iPuQZMKjjIoCicxe5wxbHCYDIbcY4v9hYf3i7lE8PVnA3WGgt KeCCJpUCX3YfFEy3OF5xbbAGDlePnL7XV+Hf4NqthpgVDmsBaKKq2YbTbly9Mxq5USDP vy1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764936048; x=1765540848; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3+9AN/HxdHG5JU3qIa6IofBm9MTQMtmCFXG7ehrSIBg=; b=w7P+QesIos1DmgrngCY6v1qxMBYoaYskTaod6XHszphiN4EihnR+SJNwOhCIcTEJMG uVwNlRDTkSfIp1QvrFmcWJZbPScqmWmb1lZ9SiQO/4sBbGnC2oUeSvSzHrWmogh+N/Yc rG9wUZSGERy+sv4WWuEeYbiGW4ovfi86eFSnB5YKTPAowbm6ly6CIPbF1ynMktfFJk0R An4PEfDe9eQwARZIssEUrL4bWKQT3McKgfbrbrAMTFwXqAuqlHDlPwNWPDapKB/LRwi9 MlMKCuDcQXF8L4UclqrGnaOczDTPpb4BnB4WWqCbVMbiHPFrRLzhpPzSI3Rr4GwrCcHU mDlQ== X-Forwarded-Encrypted: i=1; AJvYcCXamOUpAOdMyChldz8S/UfbTxiFhibY7ts17Z04GlijihsHj61e8e3fP3lsLm7qklAHtAR9hLX9KhiVn6M=@vger.kernel.org X-Gm-Message-State: AOJu0YwlAHQjMHphEzxD+pVvn/Wu6i1vZu0z8oRN1O7xVh/+g9v5ASKU 2SXjdJwYu9aqdH4VmvmkTGvvoIVKHKqlxbAMXR669t2YvXLezV6t+gRtC9QXm7UccxO7mO7OGB3 r9vC22Dg2t5F8j6yKPBtKTFp6SpYdXfKHmUDhDcBQn3KNr0BmgfHnpUYgkJp6o+4m4fQ= X-Gm-Gg: ASbGncuCMeRNOEWL0ECPT1sY0hVP3U6sE/iGfDKyP6WeH9vQglLmgpzeuI7YVqFYjAF DZqgcOCWgLzJuPwebNRqrUJkGTmTU8dBX9HrWd/HoSyCGgPC/UqyNcJKZSg2nzojdvB8k+GVU+m 4ehQNttBLYQajiwKCb8wA44Z7GkvEG0/5Q1qyZLoVLcpdaZsYgLR0peg/BOYbdQSb8VbCOqrOtf dzUIuFt+RlQ+DX+okqlsLCmZZt4Oda3eHeKhfN7Ll6Zk5rVbItq1x6Y77Kbox++A1U4vmmt3pHO WQiWlifi1n83ILPuuPjsRq8NDsr5eKkG5CoWGcjBfYsTd4FM8gA69lmqQsoE03B2nuJOdUkmVYq P4rtc08XhpiyYiUCbobbvy6V69aRIe/R6Uz1ooj974a6pEXPCc3Z1wsLMWKhhVI5pKg== X-Received: by 2002:a05:620a:448e:b0:8a1:a5c5:ef18 with SMTP id af79cd13be357-8b5f94f51d0mr796612785a.7.1764936047322; Fri, 05 Dec 2025 04:00:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IG4YCoMEsE/aEBJ2TvQLIePmhNsDzgggaoMgJ7OsQXvHMsZAMZDO44pmTESXMg5rtykjNpNsA== X-Received: by 2002:a05:620a:448e:b0:8a1:a5c5:ef18 with SMTP id af79cd13be357-8b5f94f51d0mr796600285a.7.1764936045678; Fri, 05 Dec 2025 04:00:45 -0800 (PST) Received: from [192.168.119.72] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-647b2c5575fsm3700985a12.0.2025.12.05.04.00.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Dec 2025 04:00:44 -0800 (PST) Message-ID: Date: Fri, 5 Dec 2025 13:00:43 +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 WIP v2 5/8] media: qcom: camss: csiphy-3ph: Add Gen2 v1.1 MIPI CSI-2 CPHY init To: David Heidelberg , Robert Foss , Todor Tomov , Bryan O'Donoghue , Vladimir Zapolskiy , Mauro Carvalho Chehab , Luca Weiss , Petr Hodina , Casey Connolly , "Dr. Git" Cc: Joel Selvaraj , 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: <20251204-qcom-cphy-v2-0-6b35ef8b071e@ixit.cz> <20251204-qcom-cphy-v2-5-6b35ef8b071e@ixit.cz> <03c137aa-bd31-43d7-aea8-489ec0102ab3@ixit.cz> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <03c137aa-bd31-43d7-aea8-489ec0102ab3@ixit.cz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Authority-Analysis: v=2.4 cv=T92BjvKQ c=1 sm=1 tr=0 ts=6932c971 cx=c_pps a=UgVkIMxJMSkC9lv97toC5g==:117 a=FpWmc02/iXfjRdCD7H54yg==:17 a=IkcTkHD0fZMA:10 a=wP3pNCr1ah4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=KKAkSRfTAAAA:8 a=LQYBDm9UNitWhpxzWCUA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=1HOtulTD9v-eNWfpl4qZ:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: 8hCyb8dEKWo-vkb7tMSme88NKGh9cE9s X-Proofpoint-ORIG-GUID: 8hCyb8dEKWo-vkb7tMSme88NKGh9cE9s X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjA1MDA4NiBTYWx0ZWRfXw4gZ30Kj5li5 bkcjOf6fvq4tnTC1/6bMw4he9dO+8uPGo6TPzvZwafzJkxdnkM3S7fH2Q816Q53Zk4NLC9WXAnu i8DXGKm2QlMQyTBBlEeNTTo5dBzPqY3mzf+9k7hkFHR8fi3UchRiGPLrqoetUO9HqqqjyozL1jN P6hd0Ru4Cgkz/n8b0FpUc0uGCCerjKq3P3beFgQ9zSOtAQk0512uVAhISX9RKiwExWPaWLVG3QH OAY11ZzkkknyUyi3WOaKuZDkwAp0Lz6M8O12NxkaxLT6yJgo+pV3OOTHpskJOeKnXi34ZuIjcBV zx3r4dPQRrZAIWAQRYTMkjIyRgkYfE+kDkdpGp7YPvYVQH1IaP/IvpR5LZbEwmS1h7BRB1fg9Lb v+lAZ2B/CFLJPbSAlFo0PV2yhhRP+Q== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-05_04,2025-12-04_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 priorityscore=1501 spamscore=0 bulkscore=0 impostorscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2512050086 On 12/5/25 12:56 PM, David Heidelberg wrote: > On 05/12/2025 10:54, Konrad Dybcio wrote: >> On 12/4/25 5:32 PM, David Heidelberg via B4 Relay wrote: >>> From: Casey Connolly >>> >>> Add a PHY configuration sequence for the sdm845 which uses a Qualcomm >>> Gen 2 version 1.1 CSI-2 PHY. >>> >>> The PHY can be configured as two phase or three phase in C-PHY or D-PHY >>> mode. This configuration supports three-phase C-PHY mode. >>> >>> Signed-off-by: Casey Connolly >>> Reviewed-by: Vladimir Zapolskiy >>> Reviewed-by: Bryan O'Donoghue >>> Co-developed-by: David Heidelberg >>> Signed-off-by: David Heidelberg >>> --- >>>   .../platform/qcom/camss/camss-csiphy-3ph-1-0.c     | 74 +++++++++++++++++++++- >>>   1 file changed, 72 insertions(+), 2 deletions(-) >>> >>> diff --git a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c >>> index 3d30cdce33f96..7121aa97a19c4 100644 >>> --- a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c >>> +++ b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c >>> @@ -145,6 +145,7 @@ csiphy_lane_regs lane_regs_sa8775p[] = { >>>   }; >>>     /* GEN2 1.0 2PH */ >>> +/* 5 entries: clock + 4 lanes */ >>>   static const struct >>>   csiphy_lane_regs lane_regs_sdm845[] = { >>>       {0x0004, 0x0C, 0x00, CSIPHY_DEFAULT_PARAMS}, >>> @@ -219,6 +220,69 @@ csiphy_lane_regs lane_regs_sdm845[] = { >>>       {0x0664, 0x7F, 0x00, CSIPHY_DEFAULT_PARAMS}, >>>   }; >>>   +/* GEN2 1.0 3PH */ >>> +/* 3 entries: 3 lanes (C-PHY) */ >>> +static const struct >>> +csiphy_lane_regs lane_regs_sdm845_3ph[] = { >> >> Here's a downstream snippet which seems to have more up-to-date settings >> (checked against a doc and it seems to have changes made at the time of >> the last edit of the doc) >> >> You'll notice it's split into 3 arrays of register sets - that's because >> it applies setting for each lane.. something to keep in mind we could >> optimize upstream data storage for (they are identical per lane in this >> instance) one day > > see 87c2c2716523 ("media: qcom: camss: csiphy-3ph: Remove redundant PHY init sequence control loop") > > for the reason to flatten the regs array (thou outside the scope of this patchset). > > Regarding to the different value, I can test them, can you point to docs regarding why these regs has been changed and what the values means? > > I thought it's some default seq, but as you show there is multiple versions, it make sense to properly document what these regs do. I'll make that point to the relevant folks when they get around to refreshing this driver, I'm not sure I can just tell you what all the magic sequences do.. The high-level description for all post-release PHY sequence updates is pretty much always improves robustness as a result of "more better" electrical tuning. It's also the case this time around. Konrad