From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (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 EC0DC3A5436 for ; Thu, 16 Jul 2026 09:42:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784194947; cv=none; b=nuRkB+Rna0H13Ivy58M4iL4NDPsN8MZJiI+BOBfFPn1Mcawd97+CxCvYsPshzBYE3aeXOs4QHpC+1/S0Ox3LNQOVDsz7bAMT+Kg57M/TZQKmgNKA6U33a0yb8SF6qhpI3mdWtW1Yy1Y5HtiP1VU4796LyyWWjDINLmM0XBJOdCU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784194947; c=relaxed/simple; bh=39XAndTQmo1NBabNFph+WMyYTOzWodq39/QO5d975ec=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Kp0BXtMEZscxkvWY5iUXncm4VRv+dDncm8qS0FysEa1lodSTBgSUMcT7GTl6q7Y7Dyxe2TQH+s2TFWYH6BW7bEezUwlhfpYT3uN7YHo+ad/iG5qHqJzW1Mk5cwJgmLvwWW+hCU93wtOYgHJM7GlNdNvIGXshoNxCV/+1ZPVkGRA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=wVnzoGim; arc=none smtp.client-ip=209.85.208.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="wVnzoGim" Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-69e08ad526cso2566759a12.1 for ; Thu, 16 Jul 2026 02:42:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1784194943; x=1784799743; darn=vger.kernel.org; h=content-transfer-encoding:content-type: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 :content-type; bh=rWQ9oJo6FYvzxfcIJtWdNxYH0ur72y3xrCIEL4tMOu8=; b=wVnzoGimyIuFYJpQ+bs41iY0dB9gOxUSZbBh97G0xWGZpgKyYvQy3vWv2r+gnFwudb VM1UPrkQYTKCGp5f/2lLd/gHL8ZVziQ3lDhMwpxTsIHV4B32B5Sr8IBzFx5epym+4GcL 7oStHBLNWPcILe1NpsOOkwjY/MWIg0oHi+iqbRijHn5eB8RRzJVSRUbXBkkBKcuujNv6 uMhyBwnb6/thgYFaZVYvWq/6tf5lAZihrZEBxtHevBst2+CuwUpqdi6oChAfVCbmHC9c COb741tB3SW2JEhuQSc3jTT08b7MXIIl1lC9QRVZZGd9jRXZLsPa2YRMpmJaZIZBPGd0 gzrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784194943; x=1784799743; h=content-transfer-encoding:content-type: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:content-type; bh=rWQ9oJo6FYvzxfcIJtWdNxYH0ur72y3xrCIEL4tMOu8=; b=JEsCB/xSGrjRh/cpmgW1AXc0mpyMq20k8ENufPRUU2rkq1/ATq3MQwziHWhQdPN+HI de7JNtb6QUxqpD2i+pYB9ISrREuMlA4Qo0S2s9Tuzb4anBb2RI97AIqIXtz2dmkp0+cG dq0euQFePlOPL13g6QYPK4/749pOTHCsSn0x6ghRO15bdJtRfzXnEEo8jQ8XFI/c/G39 OeLECyBvb6wsaVcKqTMi7bG3V2cA7vea7QA4Mqxty2GEatHmgNbYR5mcixDN20npg6OP vLrqnIS5+yfUEjtHeA6DAqWhUNgVon2Xh/GzeUrfMEkI7mHGejnGDv1oGEEyyHYrmxqF Mpig== X-Forwarded-Encrypted: i=1; AHgh+RrERDr/8OwOLHhozk7LlqE7dn3aJA/xaoQLgTWaR4+jShuIA0SqT4tJlY/3Unhn9d7QQp6gd/76E/kND4A=@vger.kernel.org X-Gm-Message-State: AOJu0Yw6RwwBaP4OzTXIBTiECtHZXMiO811qhr1p3kpP/beh0S5vlnNu 72QMVnwZp8TuaxcLwCZt1vhFGLhM9IQUdF8JGRAAEmbkgxigZz7Wgu76pmuny/wpu4c= X-Gm-Gg: AfdE7cns1XUGNfwEAL+V2mEIhtY+AKhBbzm1TCbpHi/mKRGkuXiGcXxvr0sw9BWHat/ fH8/jR6WvBEr2OKL8/j5eTtIyA6vCbNp6XkuPMDruUB6j79JwvybL1y89ZW2N+f4Zra+rFA1QON 7JAsz0TEwAdlEDlssM4xqeAFB7SEwa5Lci2OhnuQaI9jNQygXVOmXZ3mvGKBcQsVEX5VgfXnxA5 BjDNRA4K02jN+oRlk2/0WHCC6sU+yIpgBpx0LM0mew8F73XG7njjIGu5Zshw3e4INjl4kUu8XnM uCHXQ/ehZTsNg6vIVtRARvoUgK3NMOs/u/kgzkCssb+UuXAbNtudpgcMtG58YStMOQcByTmLCEn qOaWTtB45mTCwonuT6yRvA9AcbdbSTUahcgXTnHifJdhFJLufxAfyupjRLp/O8xQaVgu1t9dYsV SHnjZE85FfvWwXOXBzibnJCao= X-Received: by 2002:a05:6402:51cb:b0:699:39c5:204b with SMTP id 4fb4d7f45d1cf-69c5f0be27dmr11018264a12.18.1784194942921; Thu, 16 Jul 2026 02:42:22 -0700 (PDT) Received: from [192.168.0.35] ([109.77.36.131]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-69cd294fb1asm4400218a12.26.2026.07.16.02.42.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Jul 2026 02:42:22 -0700 (PDT) Message-ID: Date: Thu, 16 Jul 2026 10:42:20 +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 v9 1/2] dt-bindings: phy: qcom: Add CSI2 C-PHY/DPHY schema To: Loic Poulain , Bryan O'Donoghue Cc: Vladimir Zapolskiy , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260708-x1e-csi2-phy-v9-0-0210b90c04cf@linaro.org> <20260708-x1e-csi2-phy-v9-1-0210b90c04cf@linaro.org> <3ab676ac-919b-4a80-8dd6-71dd7f6fe06c@kernel.org> <-iN0mG5nS2joxEn49UrxFlORE3R6Ji3HRebfOMNMGnupMIobTBdRDvnwjRHAXHeLmGf6O4JJENVauduwZXwhiA==@protonmail.internalid> <4d7a0e59-7c34-4557-a475-8cd7fd2ad2d9@kernel.org> Content-Language: en-US From: Bryan O'Donoghue In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 16/07/2026 09:56, Loic Poulain wrote: > On Mon, Jul 13, 2026 at 1:18 AM Bryan O'Donoghue wrote: >> >> On 09/07/2026 08:40, Vladimir Zapolskiy wrote: >>>> As explained in the cover letter: I'm following guidance from Rob on that. >>> Pehaps you've misread a given review comment, because Rob's guidance is >>> to remove 'phy-type' property, >> >> I'll just quote verbatim "Perhaps putting this in phy cells would be >> better because the consumer decides on the mode." >> >> That is not "remove phy-type" - it's "move the mode into the cell". I'm >> shifting this back to the DT schema maintainers since, I take their >> feedback literally, seriously and canonically. >> >> Any of the triumvirate will do, Rob, Krzysztof or Conor. >> >> Absent a different answer from the DT schema guys, v10 ships with the >> consumer deciding the mode as per Rob's original guidance. > > On the #phy-cells question, IMO we should drop #phy-cells to 0 and > derive the C-PHY/D-PHY mode from the endpoint bus-type. The operating > mode is really a configuration of the link rather than a hardware > description/limitation of the PHY block itself,and the sensor endpoint > is conventionally where the bus type originates. I guess this costs us > nothing on the driver side today, we only support D-PHY, so the > mode-check just moves into the endpoint parsing we already do in > phy_qcom_mipi_csi2_parse_routing(). It can be a minimal > fwnode_property_read_u32(ep, "bus-type", ...) sanity check and adding > C-PHY later is then a one-line case MEDIA_BUS_TYPE_CSI2_CPHY > with no DT ABI change. So I take your point on link-type - in theory you can select the mode from the sensor @ config time. The established practice is that the consumer decides the PHY mode, so if we wanted to make this a _runtime_ configuration - then that should be information that is passed to the PHY via configure() not via DT because we've said its a link-mode abstracted from the DT entirely. In the extreme case I have a user-space utility selecting sensor mode, which the CSI controller parses and then signals the PHY to switch modes. If its a run-time config, then its a run-time config and DT should be excluded from the mode selection tree. I'm in fact willing to entertain this idea - but it will require passing the PHY mode to configure() not consuming - DT data from the endpoint. My core point here is both acknowleding Rob's point the consumer decides the mode - and _if_ we go the runtime configuration route, then actually making the selection @ configure not at probe/dt parse time. I just wonder if there's any real upside to all that additional work and delay/churn. > On data-lanes numbering, I don't have a strong opinion here. Keeping > the current 0-based values is defensible, in this driver the value is > used as a physical lane index and it selects the per-lane register > bank (0x200 * n), so 0 maps to physical LN0. In that sense 0-based is > a faithful representation of the physical lane position on the SoC. > > Regards, > Loic