From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (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 076DD3D47AD for ; Thu, 19 Mar 2026 13:09:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773925748; cv=none; b=bQvRCtfLNiiTdd4BPyuxPnoeRUZ4Q4b9lpNfenzOfZJvcgmRCecNUcTK6rIYJTwusQhkYCuBXok+6T0+3b8ghf6uDSfsrJBSzhCdM7Dn5zuHGvZc1MOYP+rgPaLwf3sUpD95uKJ56U+YUdYLoxar7+MX/BOqdbrX9LfqlI62bOI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773925748; c=relaxed/simple; bh=4E0ID7APL8YcpCqvbHlYRlwfw2W4WtPyVECj5Xxm2x4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=c6wRJzLJA6kvpSwx/9j4AMgitXL7MogtcQYnILSvMtaeIDYeto9IITOD3wcYRo7b8tgCEUBQFzq2l+NJ6pHzGwCV/HekZHXuv52ARo5ggdJvfQZMnYNXFXrvIDfcAnzbb3vJqWl0QGUBOcMFQzIfIifRE0F2R07rTg9ggttyJWk= 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=mGJ1CkoC; arc=none smtp.client-ip=209.85.167.49 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="mGJ1CkoC" Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-5a277403370so64683e87.3 for ; Thu, 19 Mar 2026 06:09:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1773925743; x=1774530543; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=eK3EVuDFkrZ7hmAmWn6xkd27Z8e5d83PJyq1D4T9NcA=; b=mGJ1CkoCxdSLZtzgMFHhLgi+wX9pb66mYGGg5lShsFCMidWTeJJzV5AaG3Rwv/26eF 2MQA0c+4zqIO1l4mY5LmJWTB60zBpxns747JG909/q5j+LUz8tIHbVGYFIsMg85UW2Ph M45ikSOHtX+vFHliA7T41AdsP/gHjVFH+g42ieM/kmBDDLoN1h7je/SzDNmMSi5TWSo+ 2LYnZMDoD00g47TRNBpUewsaP2qNKwVKyeLxESk28rADq3cl3X+4cb5MIK55J3EIOhAT ChUByRAiIpT/tkErMdXn1D0MZpEv6JwmyEh19CgLSWDhDQomHk2Y++qjJY0byLC+fm7w EmpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773925743; x=1774530543; h=content-transfer-encoding:in-reply-to:from: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=eK3EVuDFkrZ7hmAmWn6xkd27Z8e5d83PJyq1D4T9NcA=; b=NnoscgUiNO2gwyFRupqjREkoL8SqKwHroovhDHMbL8u19ppMyA1a9yX2I4gBJ9r3p7 1pgYZWgNYKo15fN4FTI8WVJ1wsucQRdXyYHfaTOoGm33eh9LtRz07mNm/3ykLMR+u/zO lOcjqOv9luZtwLh+Excg+KI/xDZUV5TcaOeizvYhKmk3La/6CU+pNuuuWbmEy9SXBBQt d0jzOVkVoiinUuOcu+TEFWQqDqExWzOWPEYbjjHg8hoHOL6oj7a6kCxlM55bUtYA+XW8 vkOTSw0hfbyJuUi2CNZfUJVSIDXMhRS4xV+LAjP7N67Mi703kHQ+SWnDNaiSVu/3vrcP S+0g== X-Forwarded-Encrypted: i=1; AJvYcCVEPYC1tmadsHvvqz72rmXuPC162r8UIlSJXxS6EJUq5VO3jdmZoBnKDSx/J/2ptZsfAzfhnKdLaFP45+w=@vger.kernel.org X-Gm-Message-State: AOJu0YwzFMR61+ZWCy814i36JCdzu/DyXQIJvN+ljyDKV/SlT109WZJK 2Wv62Mvw7LWM2hyssHC+qmE6UXzTe7DMuCKyeOY6Dlr152wH2Azm8BtBNOBSN6Os4rI= X-Gm-Gg: ATEYQzzQvg/Lan5VzSifPCf803ULM9nCV+wEJjIIwtpDNbTFu+FKo2p3jp26Ff4S8lE PxONs1QTTygvIEsmWqwxGg9F5vWHiYfnD4ACOg6PXWs8DOKSrQQDauJisDDIVbw8w+dR/5Q3NEi Cvjh3HguGrljyBecoAktHjYoxobp0g14mtktJaTHQwF6QD4F1or7vAxCpPblj6SykGAZgF/Ehwa 0UkErnLpY5tKsSOULaSbABP0OAeHuYaOeebjm03JxbWN8y5csPS500jiL0hftOPApDPc8W4pMp1 HIniptcb6B1Ub0o0n6+ShzlY+wjnjCFfBd/IT+n29VP2PbzTLK746Ima38uULFQmWc4E0gtiXyz MYAdtpCUXvLfV7KdHVTruGCk8b3DOhNeW5fHHbY5OiBO/EoxNEkbtDfNjveY/FzuC2kIrmD1UoH nX8K4FZp2dmwcCducdhQSokatedzZXd2GgDRzUb4p8vAmH9sB4zu5+qJfAE+pfEAdZIzVRbe48o TVEuA== X-Received: by 2002:a05:6512:114f:b0:5a2:7b70:6b9f with SMTP id 2adb3069b0e04-5a27b706d4fmr1208493e87.2.1773925742648; Thu, 19 Mar 2026 06:09:02 -0700 (PDT) Received: from [192.168.1.100] (91-159-24-186.elisa-laajakaista.fi. [91.159.24.186]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5a279c27490sm1148020e87.13.2026.03.19.06.09.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Mar 2026 06:09:02 -0700 (PDT) Message-ID: <65e06b2e-eeb9-45af-97ac-4ae60f652361@linaro.org> Date: Thu, 19 Mar 2026 15:08:55 +0200 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 v4 2/2] phy: qcom-mipi-csi2: Add a CSI2 MIPI DPHY driver To: Dmitry Baryshkov , Neil Armstrong Cc: Bryan O'Donoghue , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bryan O'Donoghue , 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: <20260315-x1e-csi2-phy-v4-0-90c09203888d@linaro.org> <20260315-x1e-csi2-phy-v4-2-90c09203888d@linaro.org> <3f11de22-b729-4d06-b6c8-18e649e1979c@linaro.org> <80ddc2b4-d6f8-4e8d-a45e-69c05d100aa2@linaro.org> <16b10f17-ecd3-4cdd-ac3f-f64127d60ace@linaro.org> From: Vladimir Zapolskiy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 3/18/26 17:27, Dmitry Baryshkov wrote: > On Wed, Mar 18, 2026 at 04:07:39PM +0100, Neil Armstrong wrote: >> On 3/18/26 14:17, Bryan O'Donoghue wrote: >>> On 18/03/2026 10:15, Neil Armstrong wrote: >>>>> +    /* >>>>> +     * phy_configure_opts_mipi_dphy.lanes starts from zero to >>>>> +     * the maximum number of enabled lanes. >>>>> +     * >>>>> +     * TODO: add support for bitmask of enabled lanes and polarities >>>>> +     * of those lanes to the phy_configure_opts_mipi_dphy struct. >>>>> +     * For now take the polarities as zero and the position as fixed >>>>> +     * this is fine as no current upstream implementation maps otherwise. >>>>> +     */ >>>> >>>> This is wrong since you loose the lanes mapping defined in DT, which is still in CAMSS >>>> but is a PHY property. The lanes layout is not a property of the CSI controller, >>>> CSI controller only need to know the lanes count, and not the layout. >>> >>> Lane layout is a PHY concern but, the PHY API gives us phy_configure_opts_mipi_dphy which should be extended to provide layout and polarity. This would then be of benefit to more than just qcom/camss. >> >> Why ? the only concern between a controller and a PHY is the lane count to calculate the bandwidth, the actual pin layout is certainly not a controller concern. > > I think that the DT should be providing the information about the > connection of the lanes and their number on the board. Then the CSI host > might want to limit this further for whatever reasons. But I don't think > that the properties of the lanes should be configurable between the > controller and the PHY. > >> >>> >>> Right now none of the CAMSS users for this driver depend on any other mapping and I propose a separate series to fix phy_configure_opts_mipi_dphy rather than introduce data-lanes to DPHY. >> >> None of the upstream users of camss. >> >> The problem is even larger, as you replied in [1], the csiphy is still exposed as a media element from the CAMSS driver, this means this driver is not complete, >> it should be a media driver entirely with eventually an internal PHY aux driver, but this would be entirely implementation specific. >> >> Either the PHY is standalone and the PHY consumer only calls phy_open/init/configure/power_on/power_off/exit, otherwise it's not a fully standaline PHY but a composite device like here. >> >> I propose that you write a proper media driver for the qcom csiphy, which eventually spins a PHY driver as an aux device. > > Why do you want a media driver? Isn't PHY driver enough? > As for today CAMSS CSIPHY are already media devices, and a user applies media specific properties to them, for instance media bus format, resolution etc. Technically this might be removed from CAMSS, but if so, then it should be done before this new PHY driver model is applied. -- Best wishes, Vladimir