From nobody Fri Apr 3 00:00:06 2026 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 70C4D357A20 for ; Thu, 26 Mar 2026 01:28:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774488487; cv=none; b=cvTcK4PaHVyE4I9OWReYkPuJL/NzafBnnbpDiUPlgng7OsjAFhapy17kzqVnO+iqf0hKbA52Bs8bwn5sMqOLlZwuP+JSD6EGd2BZKpP7MTXOXJMGoQdGAkNMz7RZDiUmlnft9jNN32RPw1rDWbU9TJAamsZrTCHdGw3YhDYkLsM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774488487; c=relaxed/simple; bh=/dbNXyt6doYGJOLfnqyVmZ3WMw1uSylWcEyQ9zySLt4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=eudspHNms3AgToiOKdeuaGTEHTSIe0Yu486cvDNM3PGXOzNRB54+rKH18NUvfqKrGTMAF0WLaeKE4BcKjLWC3jAqHirN/OTn72nLBD1bxGyPAL3wGvhbpwqMUgitSUNLC3+UNKfqe0itf2MzBC5AK+Uflniki9c8zsvBqXsHeX4= 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=HmtQwonD; arc=none smtp.client-ip=209.85.221.45 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="HmtQwonD" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-43b88b7ca76so286648f8f.3 for ; Wed, 25 Mar 2026 18:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1774488484; x=1775093284; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=G3LoPG/gWfFkYY5+0Z7Xp53uSm1t2TgaG5wGY3fLPnI=; b=HmtQwonDcRT5IkVXOn98RpHTgmUXDrFGKxk4LP95N6QwvEiWbRrhfr/xMT9Vbcad7n 1JaWC5S+bc2b8she83L/C6tITjuxi/gOfiT5ztboajKtJ8WKAy9TnB8r89vK8HsAPAo/ sQRJEq57W8DWQQ0IBAD+3JuxdyazM1PP+FK6XAJS4XQb3KTH0K0RBTp13KVtBnt4jdds 3nETor7pB+aVvqUiXSxyM9zTjccQ7L1/uG3NshOFSprdjouQWYdHGkIWvXXpZ/B9U+S7 BZ0dFunC8WNDFiA+bowPjs/QnLPGZkmUEO5a2I5gxwJ0N8gON0fGLOeEP+ZDVLVRe1mT fkww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774488484; x=1775093284; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=G3LoPG/gWfFkYY5+0Z7Xp53uSm1t2TgaG5wGY3fLPnI=; b=AVxgQrnVgEYcVVnp8xpJjjwGipD5ABHIQS4ZaoBiJ1FAITYUjg65xY8cSsPGPXf20p 4V0cT7EhoYXAIYC8/ALDguRKcRik3z14t+L38EoYTm3Ixb/wwN1mhpz013tSCOQnN61E fzYplmxLLIGxjUlS82M/EgOntmRXkCFWW5H/K4nLVZ5L3w73vC3hnJ1gHZvfSVnSGUS0 gFErvzT1rY7AvGWVMsdleTlj1vIPquleyy3/PnhxFl9twlmENvliTlsiNLeNesXvjHPY j3x67vPyyXkeqr6mCz3VYxBcXnfEraUx1G0FUz55NPx5rN/wKyj00vst1oR+9K+EXB82 1SuQ== X-Forwarded-Encrypted: i=1; AJvYcCUT1JAzJbu1J6G2gjg9N1R9ISR7/7pL5gl9+wV5OzuAGRBAhNs6+jc5dOSgY/SIngjdsK17HoUkQbTjutQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyRW4VUIH/YfzrJdpN65QgiNFz2gCePMGWvIcdY8MU7joklnDzY Uml6E3uouguWAau7HHK8MWOWFVeZRP8nsy7NxQZZgkFAJKI9+naY/g349Dh0R2OC7ow= X-Gm-Gg: ATEYQzzgwedModfFHU843wnYWozLm0dtaIgIfbmAjn3a/ZqebXJv9Kc/fcuVo5AEEct j99aT3Hu4OEauqZO1kzurrsPvzKtBniOHrehDaIi/+2fGYgThdlZsxPZ3yS7V2wbVx2Pa6cBtfu Eb3vkNgMOiJ5+JCKQZ84IdMoyG99h9XM6g+HOkLtXXdaeeqLWvIH5fdEzK5a6GzS9yQPIZMreQL yEG2ozBLGAK9TW1e/8t6ew5q8LtMJzWY1RqmjwZEPoSneTUTfyWWDubk17A7PEHDyEthm7E3aho vO+lK+ww+H+1ctPmXxgSAh0kQUxnK7JbDvc2osIq6NDdFpfivxi7d3BwAotUWPFpn4+u5mybyH3 Tw1xiWk7x7oNMzx9ge2V/+s1aZV5mRVVEz2xpVaRYuHn1kaa1Im7hBDPTIOnJJU1sIFcQuuK/wC gFgH1cDEd+2EJJ6z4pAQXjDK1UnAVd22n0e88= X-Received: by 2002:a05:6000:2882:b0:43a:3cc:83da with SMTP id ffacd0b85a97d-43b889861fcmr8032628f8f.18.1774488483793; Wed, 25 Mar 2026 18:28:03 -0700 (PDT) Received: from [192.168.0.35] ([109.76.163.154]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b919cf1c4sm3918051f8f.23.2026.03.25.18.28.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2026 18:28:03 -0700 (PDT) From: Bryan O'Donoghue Date: Thu, 26 Mar 2026 01:28:29 +0000 Subject: [PATCH v11 1/7] dt-bindings: media: qcom,x1e80100-camss: Add optional PHY handle definitions 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-1-5b93415be6dd@linaro.org> References: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-0-5b93415be6dd@linaro.org> In-Reply-To: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-0-5b93415be6dd@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Konrad Dybcio , Vladimir Zapolskiy , Bryan O'Donoghue Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Bryan O'Donoghue , Krzysztof Kozlowski X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2635; i=bryan.odonoghue@linaro.org; h=from:subject:message-id; bh=/dbNXyt6doYGJOLfnqyVmZ3WMw1uSylWcEyQ9zySLt4=; b=owEBbQKS/ZANAwAKASJxO7Ohjcg6AcsmYgBpxIu/E36D4vvcqA2r0xt7mHFNp2+uAaUCJvARw S6WEVpJLsqJAjMEAAEKAB0WIQTmk/sqq6Nt4Rerb7QicTuzoY3IOgUCacSLvwAKCRAicTuzoY3I OqaqD/9f/Uqry3eIKvFBSjWgbIeaiP/Z1VN9oQEbcwq0w1Fl4FCM6wJVX2NLLqVvGvJbGA/OE9l EbqOyqrmSt/7cT/t3V3QDXyd0uzErGE/0gdQ6CVVUl4PFbyUoGKz4CEvbFkIOx+HtK8JvQ9OMEY waMWldOi0VnLRElAVOlZXZCNlSsbacIQdLixY21ELR7Cd5W9ZIjD+1wLqK+1UNqltcx3HzG/OCM YwzQHgFtpL+0993o/MISoHXjbSWIJi/wKEMZC+/yKHIjtUr7aXXLDAxoxnV59oHkxk/fZfBJ0nP uV3yQvRDmVTJYcIh5gon5pho6ATQC+M+zP8+yyBrEFY8JpUlyEBaoMRIvwf5d+LeWJogeB3hBm+ He31GKV5rpRJa9CHDhSkgZm/C0sin9U9wRgilwlt2SPcd3sctpSzxeIwgFVqcu/K4ckAn9axwza 2E9lkgcKwG2akop26RR3bFja/m4Jy05iGzpBn7kK51W57TD1eXXtdeTykA0ZKdfLDDOT1anZscY hMC5eqzzw7st9MBgpPjat+0xUt/cRKLLdr6ctFXPpjsr5D5czBd7/S9cKi4+nnmYS8CAvh3wj/8 IlNDcpN8oVdWDYFgrp3yIU1HRi9wC0B4tjK1Jt2hS2uL6D1EVTKIRJaoixm26lWGEYWMcq1YJJ7 Ddr0cvSF/fZtu+A== X-Developer-Key: i=bryan.odonoghue@linaro.org; a=openpgp; fpr=E693FB2AABA36DE117AB6FB422713BB3A18DC83A Add optional PHY handle definitions. This will allow for supporting both legacy PHY definitions as well as supporting the optional new handle based approach. Drop the legacy high-level 0p8 and 1p2 supplies as required, each PHY has its own individual rails. The old binding is still valid but with individual nodes we define the rails in the CSIPHY sub-nodes. Signed-off-by: Bryan O'Donoghue --- .../bindings/media/qcom,x1e80100-camss.yaml | 33 ++++++++++++++++++= ++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.ya= ml b/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml index 2d1662ef522b7..c17b9757b2c86 100644 --- a/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml +++ b/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml @@ -39,6 +39,14 @@ properties: - const: vfe_lite0 - const: vfe_lite1 =20 + '#address-cells': + const: 2 + + '#size-cells': + const: 2 + + ranges: true + clocks: maxItems: 29 =20 @@ -126,6 +134,16 @@ properties: description: 1.2V supply to a PHY. =20 + phys: + maxItems: 4 + + phy-names: + items: + - const: csiphy0 + - const: csiphy1 + - const: csiphy2 + - const: csiphy4 + ports: $ref: /schemas/graph.yaml#/properties/ports =20 @@ -158,6 +176,14 @@ properties: required: - data-lanes =20 +patternProperties: + "^phy@[0-9a-f]+$": + $ref: /schemas/phy/qcom,x1e80100-csi2-phy.yaml + unevaluatedProperties: false + + "^opp-table(-.*)?$": + type: object + required: - compatible - reg @@ -171,8 +197,6 @@ required: - iommus - power-domains - power-domain-names - - vdd-csiphy-0p8-supply - - vdd-csiphy-1p2-supply - ports =20 additionalProperties: false @@ -184,6 +208,7 @@ examples: #include #include #include + #include #include =20 soc { @@ -229,6 +254,10 @@ examples: "vfe_lite0", "vfe_lite1"; =20 + #address-cells =3D <2>; + #size-cells =3D <2>; + ranges; + clocks =3D <&camcc CAM_CC_CAMNOC_AXI_NRT_CLK>, <&camcc CAM_CC_CAMNOC_AXI_RT_CLK>, <&camcc CAM_CC_CORE_AHB_CLK>, --=20 2.52.0 From nobody Fri Apr 3 00:00:06 2026 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 DAB6237BE8A for ; Thu, 26 Mar 2026 01:28:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774488491; cv=none; b=AFHcgbMRzegV01PSZGlKuPAJMSbzlo+8330fKNRvwpun6EzPXo0a+x2c9jVe6Csie7td1X1sikYZwwxbjQxi/AVqN1PU4gCyyJA1/yjTOqclHgcN1SGlcW3RjbvmbAjcQ8Ixg2FCxQ0ySeeUwcGaBD+peywNVxLYX69qVPxJjEM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774488491; c=relaxed/simple; bh=l1UaPhQtNnVW0oI4sGtjmy7qPwb9OiSnQbovYkRWPLE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=i3yDIqjKdw9oaUEd2FCBvrgmwmF8FdN+5aMFN1Mya93QvJv9Klb+V3heMP6BL5Gr5ZCBoVyYQaQ3E9N/a+ZAopewNGyQZa2i9nSldzl1PNygff9Yxdps/hLMHAaErAwsZyDSp7lS1j3fBrj6p8WKIsxlyS/qiIBlOc0kCLTQKiI= 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=JQjBb4Im; arc=none smtp.client-ip=209.85.128.44 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="JQjBb4Im" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-48700b1ba53so4450145e9.1 for ; Wed, 25 Mar 2026 18:28:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1774488486; x=1775093286; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=NLZqF8LZ1KHbfBh7mEmD2cRBLJTgXB6Xg9LkOaYc0Oo=; b=JQjBb4ImY7LO0kRLIu6J3l4ZqfB52VjgTuEQv79xJTcM8rhvJt+2U1M8sWeJX9pIXQ /ES7k1zZ0jYXDIsCaCe9ckVlVQFLrVxvwq0n8ZrbgsDhqaDxS1FiELF9bFBPlDiStZoI Q1Gg6xAQDEW1fACZZk7R+rJLlFpSq7QvTiPl6DJLw5u2ztn83+fdEiCZN1U7OMP+mghu jRlOtREzwuCQecnWhd1sNzQMPdm7SB9zfOQtHayNiFWTpNHjI/0KniOjel1axrfjazgv NDjrRJt2c6PC3he4i/k+O8QXnIYgLAgb3Zh/Fo/0bj36ttEX9FgjDxO9dpcwjMOG8Zcg Tlzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774488486; x=1775093286; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=NLZqF8LZ1KHbfBh7mEmD2cRBLJTgXB6Xg9LkOaYc0Oo=; b=neIWbV03l9voLQpnVvgIY5FHOa3C4CQQouXDb+3uL1hUKYo6O1O4xRb/gyHstR5JR5 fAQoHLmyxOcLOZE+DvdtU8dnWK7WG7MiSY/qWULsieq45GrgQZWSAj19momerMhSzmIn K4eKjER6LciDUnVkqvikAK+Dm6kzJp5CVegoNV6HU1mLhvQbO2JmTEJau9OSGpQ3f/zS h/93/mPFNLPINPO1PD989t8KectyduKWaxl1wgiUuIbKfpd67jTlbtsiXueow/JTiY88 tB9kbFmgRGjiZtdfsxW2I7TZ60zdaUq1nuzlDSFoEkB97B0+BvxMOdeOU69c908eKwGt NNzg== X-Forwarded-Encrypted: i=1; AJvYcCWSz3E4nNQPbZMXzEnEMNaTmoHDxcPKmqscdBu7USC3rhhgLuttQPEO2Qw/w4Skua4su0MtWFq9sXStuKA=@vger.kernel.org X-Gm-Message-State: AOJu0YwQ3c57QcPEpkI985km3oQZwExsL06bheUnMO5qigDGcP/EHu55 dMBxv9xxfMv/5JNw0chr+BgK8ckhRHq8v430cWTKeWWZVYdFJCCJUIiou/zaxzBNlJA= X-Gm-Gg: ATEYQzwfCMTGbyOGgbANcge5Ke5uONyPgBe8YZUgr/UMZcsXffxmZxa6jxE5icNwFhv gJWJZAFwNy8suWXstbsqQFEY1Ra4co6PjroOVFI/7NApWyj6C/us7YjwGPRO/e/zXNjE4/Q2axf +E0V9Ijdt5cuhzqpWmRg9TRFceeLQEEgTwGwzoT/Ia42vWuZCDWraSMzjuTGaEQrxpbqrnCkwqs 4m7o5OCbcZ1yEBqn3/uDXa6Ocd+xDBWuFsIXw8gNePDcIBNVgILPDqwpr8mUvFyrBfHVpRGGkGl f4rg0laVtgx1QYNBWcxxCT5VWqscVlAftcRmO/dYBpVz9pROQqlVuxoxyTnnrzgo3bJMeTOAk4I X0AWEXkFV2ZOcTgaUfbEHoiG6pCFB/z03qrlt5qX/+JwH2MDWsL6Lu0OBXqu1EmAavsPWZbuUGF ySdmdBAGAKaVGa7ygfdEofQZX7FQVO5gAkiKc= X-Received: by 2002:a05:600c:5296:b0:486:ffa3:593 with SMTP id 5b1f17b1804b1-4871606730amr78932125e9.28.1774488485676; Wed, 25 Mar 2026 18:28:05 -0700 (PDT) Received: from [192.168.0.35] ([109.76.163.154]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b919cf1c4sm3918051f8f.23.2026.03.25.18.28.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2026 18:28:05 -0700 (PDT) From: Bryan O'Donoghue Date: Thu, 26 Mar 2026 01:28:30 +0000 Subject: [PATCH v11 2/7] dt-bindings: media: qcom,x1e80100-camss: Add support for combo-mode endpoints 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-2-5b93415be6dd@linaro.org> References: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-0-5b93415be6dd@linaro.org> In-Reply-To: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-0-5b93415be6dd@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Konrad Dybcio , Vladimir Zapolskiy , Bryan O'Donoghue Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Bryan O'Donoghue , Krzysztof Kozlowski , Christopher Obbard X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=4006; i=bryan.odonoghue@linaro.org; h=from:subject:message-id; bh=l1UaPhQtNnVW0oI4sGtjmy7qPwb9OiSnQbovYkRWPLE=; b=owEBbQKS/ZANAwAKASJxO7Ohjcg6AcsmYgBpxIu/LMEY3nBRsYsGcJ1xHE9A5BEzF5ZrJAGqc /Vg/hRHPZ+JAjMEAAEKAB0WIQTmk/sqq6Nt4Rerb7QicTuzoY3IOgUCacSLvwAKCRAicTuzoY3I OocKD/9uTRkVMRllKh1KcgleItk0W5BpzA4M9o5UKUpBzVFMr/wAkPAFnvhiDfOu0/EJIu1kwl2 fO6c/2oXWXkPNLFf+Cgg7uI3NJ9xJ8IjGXLB8QniGb3fUP8GtwcXh1xSISUCbEeev0gbUAJHgrz kUE4+ax3YzTT4vqYVoWoptsHrV88STaFL3wxdd6HFvfjJ6UFf5yeGKCHQT9rR/zZ3XB4VdHCbIh D4Gnst13HqqEEzIWo9MGvAkuKQN0cHQDta3a9LnLakm6FFTa7ITjSCGss7nP3S1HIZ3p/M7MfUE Sh48dYWqrqlHdvN8bxwdfba0hkHvKib+meWHJVJVy+0W159xi2R4pIZMbiV7xxq4w1LhxqwYTGi S0/QtWfnObRiNQNi3nYQ5xfYpfp5KOWjUmy69M/G/g9PTX+QeQSE5E+60cb9sbFeg9ABqYVtt8t BrBGJMeUXrtOCMMf42jBXD4fcer6o19eQfMkinLMXrSstnN/c/knUZJDxF7LfqQ/LU+X3+9zsGs POFYankGBWPz7MgyU53x1LNQE1qjZhcQfolIANejO8fFmDEdV7StSJuIc7U8LALfRmAYNvXJYzf PaZljMJ624wAiPn52y6stHmhDJ+XX1E2Vf9yK9ce0wAAbtk/3Pa7weENsMJCBxrPxVqQ/e7lhCd HViu1joGz/g+f+Q== X-Developer-Key: i=bryan.odonoghue@linaro.org; a=openpgp; fpr=E693FB2AABA36DE117AB6FB422713BB3A18DC83A Qualcomm CSI2 PHYs support a mode where two sensors may be attached to the one CSIPHY. When we have one endpoint we may have - DPHY 1, 2 or 4 data lanes + 1 clock lane - CPHY 3 wire data lane When we have two endpoints this indicates the special fixed combo-mode. - DPHY endpoint0 =3D> 2+1 and endpoint1 =3D> 1+1 data-lane/clock-lane combi= nation. Reviewed-by: Christopher Obbard Signed-off-by: Bryan O'Donoghue --- .../bindings/media/qcom,x1e80100-camss.yaml | 69 ++++++++++++++++++= ++-- 1 file changed, 65 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.ya= ml b/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml index c17b9757b2c86..f44138f522bba 100644 --- a/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml +++ b/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml @@ -148,7 +148,8 @@ properties: $ref: /schemas/graph.yaml#/properties/ports =20 description: - CSI input ports. + CSI input ports. Supports either standard single sensor mode or + Qualcomm's combo mode with one sensor in 2x1 + 1x1 data-lane, clock-= lane mode. =20 patternProperties: "^port@[0-3]$": @@ -156,26 +157,86 @@ properties: unevaluatedProperties: false =20 description: - Input port for receiving CSI data from a CSIPHY. + Input port for receiving CSI data. =20 properties: - endpoint: + endpoint@0: $ref: video-interfaces.yaml# unevaluatedProperties: false =20 + description: + Endpoint for receiving a single sensor input (or first leg o= f combo). + properties: data-lanes: minItems: 1 - maxItems: 4 + maxItems: 4 # Base max allows 4 (for D-PHY) + + clock-lanes: + maxItems: 1 =20 bus-type: enum: - 1 # MEDIA_BUS_TYPE_CSI2_CPHY - 4 # MEDIA_BUS_TYPE_CSI2_DPHY =20 + endpoint@1: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + description: + Endpoint for receiving the second leg of a combo sensor inpu= t. + + properties: + data-lanes: + maxItems: 1 + + clock-lanes: + maxItems: 1 + + bus-type: + const: 4 # Combo is D-PHY specific + required: - data-lanes =20 + allOf: + # Case 1: Combo Mode (endpoint@1 is present) + # If endpoint@1 exists, we restrict endpoint@0 to 2 lanes (D-PHY= split) + - if: + required: + - endpoint@1 + then: + properties: + endpoint@0: + properties: + data-lanes: + minItems: 2 + maxItems: 2 + bus-type: + const: 4 + endpoint@1: + properties: + data-lanes: + minItems: 1 + maxItems: 1 + bus-type: + const: 4 + + # Case 2: Single Mode (endpoint@1 is missing) + # We explicitly allow up to 4 lanes here to cover the D-PHY use = case. + - if: + not: + required: + - endpoint@1 + then: + properties: + endpoint@0: + properties: + data-lanes: + minItems: 1 + maxItems: 4 + patternProperties: "^phy@[0-9a-f]+$": $ref: /schemas/phy/qcom,x1e80100-csi2-phy.yaml --=20 2.52.0 From nobody Fri Apr 3 00:00:06 2026 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 B980637C0F2 for ; Thu, 26 Mar 2026 01:28:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774488490; cv=none; b=PT7eioSZK0N74E5/HOTJacb1aT8sth7BAKEPb6oty/AdSdHLNKMsuZSUIodE8CAUV84Qn1eett+Ke3LNqUhCIuHJGgUndcE0IeOxUAF2MKo++nNzloIWVwcX1MlRVmVmEUDtE2AWtWkNq459TBGfpyq4biXw4lLm9elUdAlWJAY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774488490; c=relaxed/simple; bh=YKW1V7XuMJ4AeReIm3Qwtpj6WjYoSkYt9XgvGuaFoSY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=c5WmuYlqOIfNEbaDV/1LgQaBeiQxqR1nRMHPalC4ZSk50UKAY1cfA/E+Hb3qddpwU3PY7G8W2W5RkA7TQvEc2rB7GniJm8YmB7fIYdSy3jO9JZEfE9QOEeBtmaJDc/Tvb2aH0R5tRQULhhD65n/fBNtTQvTE9nIG07TmgczRgNI= 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=c0FS7gpb; arc=none smtp.client-ip=209.85.128.51 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="c0FS7gpb" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-486fe655187so4964355e9.2 for ; Wed, 25 Mar 2026 18:28:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1774488487; x=1775093287; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=P21FDgbBj2GIbBZ7VBtv5L9RLy5tJ4WiwvtA0ou3a9I=; b=c0FS7gpbKxS2+Xj8brsaRetc01HMQlP32vMUmD6UIpvhCifFbTq667FgcIIkjPuaLx 4owO6xI946gRIKuDKObsunpfEUssxPunoZpIr+fnnM4Tq2Yl5+4ClPvS4o9hvu894LA0 FEtj35O7R2V+Gj138aNbltNjAaXXhvrtiVvrID/WUiQ7qyguczAVzew0pYd3xqzlNq3D HAz/Pdc+6DjkpoxgoBPI3sGe2agMHggxE0bGGh/WPD/HHvCmcnS+W+09OaliTItO8tJ+ XFR8d0VqrB+EaMMCvKljDexCwpVC1uSgRYqQ0uSdSmDCVEQgC+zOTTy0NBS5HuwkEDGv ZE2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774488487; x=1775093287; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=P21FDgbBj2GIbBZ7VBtv5L9RLy5tJ4WiwvtA0ou3a9I=; b=dyYOacSdCUhY/uw4M1Xiu9mLWxND83axA8dZKKdF7NHH7cTHqYm334BhCug23wYcAl W/JBLLQfMGsHR4A/cVkHT+82LVkWjgrZNqH2brHoogXh2WYCK5dBDP0ixlk68z3u77p4 TY9SjevfjG1BTiym50CHZ+Ptn0Ru3ICftiK1xXlHJcrMZf0JzE+EQik2FA0+hxq4Zvy9 7SmCLXrKa54wE1Q9fdoiLekFlt7y2B+NQUWZk8eXDDdRz1FxYgdk9BkqvRvfRnSk+5lM 3Se7ipWvpy8ZgXRBz80CNlcS9fyz6vsAvzJu14JaTnQnNTcg+m065f9VlMdmZ3+AuoYj tc5w== X-Forwarded-Encrypted: i=1; AJvYcCVf6DZ0SeqySoRkEwKQLfySDvzMLXSIo+7EL7skQmDrwMx7DabVicNk8CrC7UhJbw85IGOsH75KB/S+hxA=@vger.kernel.org X-Gm-Message-State: AOJu0YywIgLdL1+Uv6i+nxnx1NrFRP4KHCALQHlbfcZVe4vKIBMAv/aL RkA3UOhJ+UTtvVe3xdfvELFaN0d3rG9CApPGDup3vvvczXGTSB4pH5vvnxG98JTO/bw= X-Gm-Gg: ATEYQzwFF4Dvw1glMILGFNOUuc1v23zF5pbSTJOyrRIXG/CMhi/IuUVGzZ/73ipL72b jNM2/2EFlJjfAUgwp3HVNMg534ZSJu6ffsemMc6qCoix9pYOjbu/wjYk01HrHiNYHGXfSBGeHHf vohZThxshM55ZiHlyU1GD/W0W7XJR5q3juqi7L5y22mjF49aoYVT6ZGbH2KCvjNzaTrA5BT027H vBh+N1Qi4zIvnvt3zLcoBQSDtk/wniS3F+3a2eXMH4AlimFIfztntlPweBH2aCK0zJVmg/IV4TZ X6OIYARY8GbQyVBKEcnjOrtO20aWiGDX0Ehyh3ZkcACauuHNrWCmKlJPxCdVPeX5symKAeuWQXP mMnAiPDLnOr4bRARRkoIIKK5BcxjqDd11TPKsWynHBHFLRjNcu8gSkUN4/KQCQr3kAqQboAASWo aoa406y5CPawbFnIXEOBhloo3v8HMgritd+qk= X-Received: by 2002:a05:600c:350f:b0:485:40c6:f528 with SMTP id 5b1f17b1804b1-487160a213bmr80479925e9.30.1774488487128; Wed, 25 Mar 2026 18:28:07 -0700 (PDT) Received: from [192.168.0.35] ([109.76.163.154]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b919cf1c4sm3918051f8f.23.2026.03.25.18.28.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2026 18:28:06 -0700 (PDT) From: Bryan O'Donoghue Date: Thu, 26 Mar 2026 01:28:31 +0000 Subject: [PATCH v11 3/7] dt-bindings: media: qcom,x1e80100-camss: Describe iommu entries 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-3-5b93415be6dd@linaro.org> References: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-0-5b93415be6dd@linaro.org> In-Reply-To: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-0-5b93415be6dd@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Konrad Dybcio , Vladimir Zapolskiy , Bryan O'Donoghue Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Bryan O'Donoghue , Krzysztof Kozlowski , Krzysztof Kozlowski X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2666; i=bryan.odonoghue@linaro.org; h=from:subject:message-id; bh=YKW1V7XuMJ4AeReIm3Qwtpj6WjYoSkYt9XgvGuaFoSY=; b=owEBbQKS/ZANAwAKASJxO7Ohjcg6AcsmYgBpxIu/t9wn0hjOdBeGp1+ZXyrdnpvlJZRgwHIFn gVTWXwfNdGJAjMEAAEKAB0WIQTmk/sqq6Nt4Rerb7QicTuzoY3IOgUCacSLvwAKCRAicTuzoY3I OoLtEACy/NhZw3B+kOA16FZWbXQzqgmtyi90H8KVps1zpqy5P/5Wnx7Yyhack7yH/S/WazGWavk nu1rmIM5HpFqDEFTOiL6dtQ/4UZ4mr+NmyQMxMDRkVNmwDRlUC1wOI93eYIWl5AmF63jfhytaMl buqSyEga2A5R4VeocXLwPL6YrLsdYBjo85PJt4NZpL+8sMq3iIQY4c214oQ0tE7wRlYzARDSnNs wWs8/7XDsgC8kiXOC2X42nVFbEXyv8GROVnSllMUNXtyt8BHNtryTpmM1ecdiRa3fR+L+fpxs+/ sxTSkko+IahfRebJPkqGcAqxlbtOz9dTUuTmfV4/Qo1ZwVAr5H6v55byB1ocViBNKde8fyq40tY CB6qHjT9hhz83YYLMAR9F7M6mWNc7T1L8fdstLDnHVb1VdL/r9I9MUHDopr0O0pu4ozgS36Uj9A Bkw/dG9zJ8DYDRRtFoWeBETVto7aIeA6sney65DtIAwgjpSA5koaVbS6JNRd9AKoeqGy0vTbunX MfdzrV6tsl44jMEfVq+Xk/Yag4aeLwpWLSdAhv5J/FInbVV30WgysEMIK4T2zLqYfgFHAm7Riph r7FZAwrJ+xJNNZSfDljO3clL/iRFQj7K96i7NbD17n5qPEW/IIzQcUL2SDj9bBBaymXEhSUp7FT 8GRl/ih9TlzVCdw== X-Developer-Key: i=bryan.odonoghue@linaro.org; a=openpgp; fpr=E693FB2AABA36DE117AB6FB422713BB3A18DC83A The original iommus list included entries for ICP and BPS/IPE S1 contexts. Only the five S1 HLOS stream IDs are required by the CAMSS ISP hardware: IFE/IFE_LITE read and write, SFE read and write, and CDM IFE. The remaining entries serve other hardware blocks which will be described in their own nodes as support is added. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bryan O'Donoghue --- .../bindings/media/qcom,x1e80100-camss.yaml | 26 ++++++++++++++++--= ---- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.ya= ml b/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml index f44138f522bba..d2763977a494d 100644 --- a/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml +++ b/Documentation/devicetree/bindings/media/qcom,x1e80100-camss.yaml @@ -112,7 +112,22 @@ properties: - const: sf_icp_mnoc =20 iommus: - maxItems: 8 + oneOf: + - items: + - description: S1 HLOS IFE and IFE_LITE non-protected read + - description: S1 HLOS IFE and IFE_LITE non-protected write + - description: S1 HLOS SFE non-protected read + - description: S1 HLOS SFE non-protected write + - description: S1 HLOS CDM IFE non-protected + - description: Legacy slot 0 - do not use + - description: Legacy slot 1 - do not use + - description: Legacy slot 2 - do not use + - items: + - description: S1 HLOS IFE and IFE_LITE non-protected read + - description: S1 HLOS IFE and IFE_LITE non-protected write + - description: S1 HLOS SFE non-protected read + - description: S1 HLOS SFE non-protected write + - description: S1 HLOS CDM IFE non-protected =20 power-domains: items: @@ -422,13 +437,10 @@ examples: "sf_icp_mnoc"; =20 iommus =3D <&apps_smmu 0x800 0x60>, + <&apps_smmu 0x820 0x60>, + <&apps_smmu 0x840 0x60>, <&apps_smmu 0x860 0x60>, - <&apps_smmu 0x1800 0x60>, - <&apps_smmu 0x1860 0x60>, - <&apps_smmu 0x18e0 0x00>, - <&apps_smmu 0x1980 0x20>, - <&apps_smmu 0x1900 0x00>, - <&apps_smmu 0x19a0 0x20>; + <&apps_smmu 0x18a0 0x0>; =20 power-domains =3D <&camcc CAM_CC_IFE_0_GDSC>, <&camcc CAM_CC_IFE_1_GDSC>, --=20 2.52.0 From nobody Fri Apr 3 00:00:06 2026 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.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 1A6E537C901 for ; Thu, 26 Mar 2026 01:28:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774488491; cv=none; b=Zhu3yKs0MPrH1ZM7fREJYuhgSAtvRUU8gZPX1yKUmgIStXrzLHlQHfrvMLsbmGFRw1ze2Gq5rWVpBCm8cIlojh/RcYw3cOBLWMTKgr9Jo7ugfjVCsg9PB8MfZrm1L8z4++amPa2/IzxKXFEGSwHGDQoA+UQ+VaccXr1f6c5f4fM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774488491; c=relaxed/simple; bh=RysHVq0N4+YzTb4e9cFYCnf19hquCbv9aui7fBhcLT4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mYTWmUUVL2lkDVNa/76YwvZwQ6yujRObD5MuaMYiZUTXKpMnISs1uE1ltzjIunDkPAdOj3z72qK5BVMGYXbzGZzKCh/eI2u/tF4351by+8dzrXT0fBiTtOQXwvNp+sJvzR3VRhGzulvzugyx4AhObh3P63ZN4PyDS+xFKlVe9VY= 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=WmVPmPML; arc=none smtp.client-ip=209.85.221.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="WmVPmPML" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-43b87970468so364307f8f.3 for ; Wed, 25 Mar 2026 18:28:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1774488488; x=1775093288; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=AqJm1xZwLehDeiB9ZhDe2YZdoSqbYfjYIEA7QeOvbXQ=; b=WmVPmPMLg5cHLA8iedgfnYlvZlnh/EKxSoE/DD0UeeIjOpsf7893oZTwou3ltuyVdq TRhHyZDASKyCL6Dk8bHs5tNHImjs0tNstchbNlcnHlPBkri+mpsB7yTYhftiI3Hy0lb7 YOHzBqZsH0DoiGw2xQAoBhGUGLNlxRPNmIGIG+TUI3Rpog4xNwqIWJQmCEOPIQJ0x02s G6F4zUlTnwd/PenIRi120yhYAvmQrA06l0XKPH3s36fR0m0zztEX8TuixjL0MerjGCv8 PiGcvnJcH+aFzkxMHim9gPhYeHgYhUkMT4Eo513QRs2IuJaJKA4rL6vkqtmyZngv6h/p zYdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774488488; x=1775093288; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=AqJm1xZwLehDeiB9ZhDe2YZdoSqbYfjYIEA7QeOvbXQ=; b=bAWwvVh4jV7Up1ql9FUA//YQqiKeZCwH5CR7EbOulcCUJpGQ6Ts8aeMu2/lsdaT2WY 7ebKXnpRVZcdCpfmeqg2ecnOSmHo1SGcQR3vdD6N52GeV1B1sKApj2ikE5ggA0RmaNoM HCNkJAaiamqKDQO0pDNUb/q/F6nU1P3DeMHjx1krn0aEG+NnFOGoHaPGKgohopwzP1No zIAehk5oS9tfSQrKbVZrM0fifdHFiQfLvk0L6w75hM0ixxfwNViRSOSMR7TE75xH0OnJ 2gefgjiRfTmL0UAOdQX0J9BPxHTUCB8qLdLMT1r3hmAMEMECDig0p5OlLMogfc0jnEtU VRJQ== X-Forwarded-Encrypted: i=1; AJvYcCU/zv46MLqV0PJ98yvLLl8+hZRGDYm3bKoxVudo1l+3o/IYySUKWV+5fbmCkGFEVhOZw5miJzyKa2GPboM=@vger.kernel.org X-Gm-Message-State: AOJu0YyfuucKkTHdFJiQmiB1xfovha/1KG74d5EZfAZEyCByeBvrH4Hl 5LD6IBAxQ5eYqfaHFyFA5dEnRQYMZk+0sHUgZxrWxqixTza+UXosvxMmJFZs+pHTRa4= X-Gm-Gg: ATEYQzz7Epc5vdL3JUL5zkzdm/AjBCAyITDadRqip+rZ0GOK2iqlhSyZX6VxhEZMtE6 H40FAgbpSrVLo68VEQBlvY/28VM7j3sZIjQPKMDHi7Hg7+tKPFiUovhjMo71cDy0x2pDhXgNCN2 wHsM+dW/99UVwu0eV+0e1HvEXX+EsHE+unSSsmLk2DBYrdwEHOjVxXagk+Nb9+9J1CuxOPXWLOH LP5M+8yZcUbcYMmD9VlzjpTJA/XCQZhy/RJ5T/6OuImON+QNtdtazi4qsJgr9bTwthhSZOevNwA /0P/eN526eSDDLwqwxgve42WM0UKkpAjJ4e5r6KeGt1DAzx/A1XxeyQHLmucKo/ooPgZ0AY+3Pe y9AmAB9NXeIE9atxNL/2xTgMj6KmC61nLod0Edk6Qf9jFwsHEBrVqbEKINcIZ/wH9GY/Yq36Jn3 UMLTfAt1pK03FCPPVzMUzGpvQF0dkSV7dUK6I= X-Received: by 2002:a05:6000:2890:b0:43b:4625:5933 with SMTP id ffacd0b85a97d-43b88a88baamr8337146f8f.30.1774488488352; Wed, 25 Mar 2026 18:28:08 -0700 (PDT) Received: from [192.168.0.35] ([109.76.163.154]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b919cf1c4sm3918051f8f.23.2026.03.25.18.28.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2026 18:28:07 -0700 (PDT) From: Bryan O'Donoghue Date: Thu, 26 Mar 2026 01:28:32 +0000 Subject: [PATCH v11 4/7] media: qcom: camss: Add support to populate sub-devices 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-4-5b93415be6dd@linaro.org> References: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-0-5b93415be6dd@linaro.org> In-Reply-To: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-0-5b93415be6dd@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Konrad Dybcio , Vladimir Zapolskiy , Bryan O'Donoghue Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Bryan O'Donoghue , Krzysztof Kozlowski X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=941; i=bryan.odonoghue@linaro.org; h=from:subject:message-id; bh=RysHVq0N4+YzTb4e9cFYCnf19hquCbv9aui7fBhcLT4=; b=owEBbQKS/ZANAwAKASJxO7Ohjcg6AcsmYgBpxIu/++z8oXlchbJP/1M16TqvlqfGF301jKf2r tvWAN5KfSmJAjMEAAEKAB0WIQTmk/sqq6Nt4Rerb7QicTuzoY3IOgUCacSLvwAKCRAicTuzoY3I OvDmD/9IeYsBBB79Uzcq2AiGxUn5frbN2yao4rM5EyI5w/zdWIwI8vVhpwVrKUTRnPJ1DrvcovQ fb6EwO+HedpbY8CYcPjKLFWRNxM8B9CymD0RJh/GyNimakpmkqsK/ZzjRW0qJyHLMwxzVcKBQgZ 6STIheHOVMYoCqmuMWC5Q0yDrkia1uCszfyaARyX1V/ZNDwBQ8qX/bcl/g5hxuG+k8VQVzlVNhV NOH0xS6kyAALaVifjCjL8z/A8491mvPf4ml//sVj10+4pHu5QrkcQwIRXOvbJHmIjkyz+dGDkX/ cyjqEiqPQK45U+k7Qwnn2ZwKVfkxiEvvmojLvfQECfFh49JvyPXTo6JvyYlKZ8o/6COYLD2IXAq /1uOuMxz/5YTuuZcL/G2jvgkAJl+dVSe+t61zL6HrtGp9dRxdA1/bjwuZ4YKjcI5pVBT8dINs86 tPjzP5qu8CQWrvgpuuTOf9PGwr0KTMeBILGjMGsYhgI4Rf0+N5OZhoh70uXgU8V+ykJl6eDcTIO WH37pYR2LCzoLFH4pKeJmXT7umNMkx9tK009I5PkmZNwM+EhJuaOJQdoISyrEqSBfXhzFdYwdHC k7snsqE0XnDaEXLa0ZmLyJeJBkmf8NsFfsTzfwNZi+0N/5N+eoLzp8NVTv/fK9kAhf7NtD1cAHX dzKtZJFOLXIw6Jg== X-Developer-Key: i=bryan.odonoghue@linaro.org; a=openpgp; fpr=E693FB2AABA36DE117AB6FB422713BB3A18DC83A Use devm_of_platform_populate() to populate subs in the tree. Signed-off-by: Bryan O'Donoghue Reviewed-by: Loic Poulain --- drivers/media/platform/qcom/camss/camss.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/plat= form/qcom/camss/camss.c index 00b87fd9afbd8..66ea057291f6d 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -4964,6 +4965,8 @@ static int camss_probe(struct platform_device *pdev) if (!camss) return -ENOMEM; =20 + devm_of_platform_populate(dev); + camss->res =3D of_device_get_match_data(dev); =20 atomic_set(&camss->ref_count, 0); --=20 2.52.0 From nobody Fri Apr 3 00:00:06 2026 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.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 02ACE37D120 for ; Thu, 26 Mar 2026 01:28:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774488495; cv=none; b=j1TJmHPldN0Cgl7XJmjbY560Krmn8Cl2oaZffjs/K52rL1YGKCCQA3VfBmZfV/0pvUifzGDFSuGwcRIRaibPxGgPXObuaMS00JCwJVNnK0dg7CITsul64AT92mlas66M8upicU6nHkhakbXO81Ujhgook+JibP5ZxeQNe+dV4P8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774488495; c=relaxed/simple; bh=we5ywP7iRPMRTAg6yOKxUrxdHq7+NpGw0G97RgZw0gY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dZCuvapaTycYRjCQZFDOOH9rhZFtb+EDSpD23BNOXUqKr+Ah0B8O30st2E6nEu2Y9bOlTUcxoGOk6aTmUD9FHjxI1R+HVmbBiWnqy+vriS67VK/DqYYy+1gXtEa9y/fA6UpczwTBFUCbHtxQdOo5HxPTadp8Jj8VDClsKN2ND2A= 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=S2hibFnS; arc=none smtp.client-ip=209.85.221.50 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="S2hibFnS" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-439bcec8613so263125f8f.3 for ; Wed, 25 Mar 2026 18:28:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1774488490; x=1775093290; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ekM3vLkgNR/9kVDhmI/IiqMjFO2m+5M/TZ2EQg913rs=; b=S2hibFnS7z7UqamuRYPGNdC1kP+ia8WoFCBnZaIoQ1Kpg5ZHwgZ7QYy5D0r7WXKbb+ e+a81wpJUmiLL/7hysVokUDxOWpDzic6qZWzQn8WUc4Rlrt1x61LcBUHJA4HK+mtl3uL r7ivIRJRfy621WKEQWVzjZieu+5463wCyzROYlqyqQwVjF0UbitDWfYxRapHFtFPL6D5 ABtu9rZsUKElcqRa5+Ulp+Vhr+b4j0gXOnIrMPgp2Cmry27L8bpwp5Iay/rl3JAPCQVJ xs/m4+0hZW6BXWpgaP5UsHv0rhtlId04kMYedUna8ozYL//DTFBrDuRX0UuJTd7dWVV1 E1+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774488490; x=1775093290; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=ekM3vLkgNR/9kVDhmI/IiqMjFO2m+5M/TZ2EQg913rs=; b=lk88oAE3ef0Ytd9BGAqMaphinD8PCEyK7KAMXdPJNLtnqcUwzhlCC8VvAPT/3fGMDd 3AIsaC0LVmJ4JvtkRlyM8Pkkr1UMSCd8AJitjDHaev8qOhJ+XU2x4h9s++jMQMYnEnIi y+BUrrR81Jlx7B/c6VaNNsFEcUvQIGlFX8o4I8txFXbQfsZQ1pDbg+7wVPUV5peMgq7Z qKma+mlkeXyzay4DzEJqD5xloTBSAeTYNcUrPta/E1lfyHZ/SjVNz7Wu7cgrBa945pVA 95GTtw6CykKhzfw8CdqQ9Isfb2Aj2JoC9ADr3WKoMsE3Q3u5Tq9nls+iXXGNp2y/ZcF5 zGeg== X-Forwarded-Encrypted: i=1; AJvYcCWAQ/T53XY2qb/LVV+hHce3t7u1NbUV255M80Rbaz/fAt3Ym2wpNpWv3Tve1FgIZvbG82p6njRMu4V2eXc=@vger.kernel.org X-Gm-Message-State: AOJu0YyvBUkz86qcPzlFLp7a319+8xJCfFZBat5h+OfAGx1AzGQQB2fc Rn7peK876AhiqzFR2S8vDM3oAW0lx4bSEx135aR/92e6uTM2aX353yAhV86F4WDyKoc= X-Gm-Gg: ATEYQzwAm3SpEcCtzrD2MTFXz2FJhZSDChk3cC0u2bLFuaGNVoPOnhHx3KR408FSr3Q Q+4iAH0oN44LoZ3iLXvUPDASVNI+ZSeQwhZMXIzF59odpVhpJtDfExDobgrkCZNjbuLONX2wt7Q 4AG7hvKJ3YtqqOQdFyMUog9uTrLY57/s77cxD+tfwyZBXHNFH0AKpOXfxIQ8Blx/hGe+TxGuQNO bR6O4GDyQ1oQl6AZP/BGixxG44hCTOeH0hbsEJIsOomuqKjAIAYdp7ZXTpksKnnYkgPvme+LkHG +aPOWDe2a0VOyxopnQu1Elm2zWGK083Vbt7YFtyulWrvD5KvLo1BOjXOW0XHAlXqq5laikvFczI kJZPMAl8UC6Ft/wKFQ5wzuDd+0kaWut7WDsmM/qvY5ZLEH9Ld6Bzn2JGcNnXwF1G9z3LNNKzfGd vKM4JyY6xuL0901eDsHDEDgRS0Oy+SCRjGcLg= X-Received: by 2002:a05:6000:26c3:b0:43b:42af:75b with SMTP id ffacd0b85a97d-43b88a3a379mr8156018f8f.55.1774488490319; Wed, 25 Mar 2026 18:28:10 -0700 (PDT) Received: from [192.168.0.35] ([109.76.163.154]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b919cf1c4sm3918051f8f.23.2026.03.25.18.28.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2026 18:28:09 -0700 (PDT) From: Bryan O'Donoghue Date: Thu, 26 Mar 2026 01:28:33 +0000 Subject: [PATCH v11 5/7] media: qcom: camss: Add legacy_phy flag to SoC definition structures 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-5-5b93415be6dd@linaro.org> References: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-0-5b93415be6dd@linaro.org> In-Reply-To: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-0-5b93415be6dd@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Konrad Dybcio , Vladimir Zapolskiy , Bryan O'Donoghue Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Bryan O'Donoghue , Krzysztof Kozlowski , Christopher Obbard X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=6433; i=bryan.odonoghue@linaro.org; h=from:subject:message-id; bh=we5ywP7iRPMRTAg6yOKxUrxdHq7+NpGw0G97RgZw0gY=; b=owEBbQKS/ZANAwAKASJxO7Ohjcg6AcsmYgBpxIvARhAaqvf4pYzE1y4EDxMLp+F/9kmDukiyq 4maGPZhhvuJAjMEAAEKAB0WIQTmk/sqq6Nt4Rerb7QicTuzoY3IOgUCacSLwAAKCRAicTuzoY3I Oh2DEACsXDzvF7YwEWShB3maiqgvopBIILEb0v6l1Q0PD6l5clhv1ks5cyRsWTbbPeIU+sz+gFB YOy16TjM329e1NAT21DCjZlumVO6ACXpjLnsf6vP5BFpkdjGFg2sDqcGmWDQO4xTe+a3ISMPhux ywmvKfwThxCfKX3+IWZWVdzqvz45Y+KqrAeo9HMvuik05VD1VD6okbzN8i/a5JXv3u4otjCS4MZ wIrUoEY/BSMSh0K9PH3fw+2Sd8R8Q6jFqYpQ36zupJcjA9nbwwgbCRF4wcHG7fAuk8IUGo3NJoc Q9ng2PWuqd5l/akKr6uoVcod47xmOmG/xVL6K2klmhnVgvXxnD0hfLmcDrcOcyLIpicfp7nNlEV RKeMdAWUpEQylJ6gq484VXmpw0LuG2JBhLejnLIQ7Ic4ICwapWuIicqRS2W22IlqmsajJkybJJ4 GvJk+kquheyKh26OhgB5ZcPJ3xEelzIHM52F2vFCOnKBXh7TB+QzA5eiwIOeQWH1pRUM8TQfhhT 3kiZfQ2ta7NzuuNsWeXelRDzPw4IaGq2+R0k+63uZ6jT6QuctGJPBpj6epzDLXg7ZzzZoH8rDv1 OuKwScm9evoI9y0Lizq+wgo+O0bu7CwlR3Wk0vRRdRS+rh2hsifWC4sx0i/iP2kYUyeJmrvG3iO OgqDd24FsqINPBQ== X-Developer-Key: i=bryan.odonoghue@linaro.org; a=openpgp; fpr=E693FB2AABA36DE117AB6FB422713BB3A18DC83A Flag which SoCs have legacy - builtin PHY code. This will be useful in subsequent patches to inform PHY bringup logic if legacy bindings are available. Reviewed-by: Christopher Obbard Tested-by: Christopher Obbard Signed-off-by: Bryan O'Donoghue Reviewed-by: Loic Poulain --- drivers/media/platform/qcom/camss/camss.c | 17 +++++++++++++++++ drivers/media/platform/qcom/camss/camss.h | 1 + 2 files changed, 18 insertions(+) diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/plat= form/qcom/camss/camss.c index 66ea057291f6d..2749895152e32 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -5107,6 +5107,7 @@ static void camss_remove(struct platform_device *pdev) =20 static const struct camss_resources msm8916_resources =3D { .version =3D CAMSS_8x16, + .legacy_phy =3D true, .csiphy_res =3D csiphy_res_8x16, .csid_res =3D csid_res_8x16, .ispif_res =3D &ispif_res_8x16, @@ -5118,6 +5119,7 @@ static const struct camss_resources msm8916_resources= =3D { =20 static const struct camss_resources msm8939_resources =3D { .version =3D CAMSS_8x39, + .legacy_phy =3D true, .csiphy_res =3D csiphy_res_8x39, .csid_res =3D csid_res_8x39, .ispif_res =3D &ispif_res_8x39, @@ -5129,6 +5131,7 @@ static const struct camss_resources msm8939_resources= =3D { =20 static const struct camss_resources msm8953_resources =3D { .version =3D CAMSS_8x53, + .legacy_phy =3D true, .icc_res =3D icc_res_8x53, .icc_path_num =3D ARRAY_SIZE(icc_res_8x53), .csiphy_res =3D csiphy_res_8x96, @@ -5142,6 +5145,7 @@ static const struct camss_resources msm8953_resources= =3D { =20 static const struct camss_resources msm8996_resources =3D { .version =3D CAMSS_8x96, + .legacy_phy =3D true, .csiphy_res =3D csiphy_res_8x96, .csid_res =3D csid_res_8x96, .ispif_res =3D &ispif_res_8x96, @@ -5153,6 +5157,7 @@ static const struct camss_resources msm8996_resources= =3D { =20 static const struct camss_resources qcm2290_resources =3D { .version =3D CAMSS_2290, + .legacy_phy =3D true, .csiphy_res =3D csiphy_res_2290, .csid_res =3D csid_res_2290, .vfe_res =3D vfe_res_2290, @@ -5166,6 +5171,7 @@ static const struct camss_resources qcm2290_resources= =3D { static const struct camss_resources qcs8300_resources =3D { .version =3D CAMSS_8300, .pd_name =3D "top", + .legacy_phy =3D true, .csiphy_res =3D csiphy_res_8300, .csid_res =3D csid_res_8775p, .csid_wrapper_res =3D &csid_wrapper_res_sm8550, @@ -5180,6 +5186,7 @@ static const struct camss_resources qcs8300_resources= =3D { static const struct camss_resources sa8775p_resources =3D { .version =3D CAMSS_8775P, .pd_name =3D "top", + .legacy_phy =3D true, .csiphy_res =3D csiphy_res_8775p, .csid_res =3D csid_res_8775p, .csid_wrapper_res =3D &csid_wrapper_res_sm8550, @@ -5193,6 +5200,7 @@ static const struct camss_resources sa8775p_resources= =3D { =20 static const struct camss_resources sdm660_resources =3D { .version =3D CAMSS_660, + .legacy_phy =3D true, .csiphy_res =3D csiphy_res_660, .csid_res =3D csid_res_660, .ispif_res =3D &ispif_res_660, @@ -5204,6 +5212,7 @@ static const struct camss_resources sdm660_resources = =3D { =20 static const struct camss_resources sdm670_resources =3D { .version =3D CAMSS_845, + .legacy_phy =3D true, .csiphy_res =3D csiphy_res_670, .csid_res =3D csid_res_670, .vfe_res =3D vfe_res_670, @@ -5215,6 +5224,7 @@ static const struct camss_resources sdm670_resources = =3D { static const struct camss_resources sdm845_resources =3D { .version =3D CAMSS_845, .pd_name =3D "top", + .legacy_phy =3D true, .csiphy_res =3D csiphy_res_845, .csid_res =3D csid_res_845, .vfe_res =3D vfe_res_845, @@ -5226,6 +5236,7 @@ static const struct camss_resources sdm845_resources = =3D { static const struct camss_resources sm6150_resources =3D { .version =3D CAMSS_6150, .pd_name =3D "top", + .legacy_phy =3D true, .csiphy_res =3D csiphy_res_sm6150, .csid_res =3D csid_res_sm6150, .vfe_res =3D vfe_res_sm6150, @@ -5239,6 +5250,7 @@ static const struct camss_resources sm6150_resources = =3D { static const struct camss_resources sm8250_resources =3D { .version =3D CAMSS_8250, .pd_name =3D "top", + .legacy_phy =3D true, .csiphy_res =3D csiphy_res_8250, .csid_res =3D csid_res_8250, .vfe_res =3D vfe_res_8250, @@ -5252,6 +5264,7 @@ static const struct camss_resources sm8250_resources = =3D { static const struct camss_resources sc8280xp_resources =3D { .version =3D CAMSS_8280XP, .pd_name =3D "top", + .legacy_phy =3D true, .csiphy_res =3D csiphy_res_sc8280xp, .csid_res =3D csid_res_sc8280xp, .ispif_res =3D NULL, @@ -5266,6 +5279,7 @@ static const struct camss_resources sc8280xp_resource= s =3D { static const struct camss_resources sc7280_resources =3D { .version =3D CAMSS_7280, .pd_name =3D "top", + .legacy_phy =3D true, .csiphy_res =3D csiphy_res_7280, .csid_res =3D csid_res_7280, .vfe_res =3D vfe_res_7280, @@ -5279,6 +5293,7 @@ static const struct camss_resources sc7280_resources = =3D { static const struct camss_resources sm8550_resources =3D { .version =3D CAMSS_8550, .pd_name =3D "top", + .legacy_phy =3D true, .csiphy_res =3D csiphy_res_8550, .csid_res =3D csid_res_8550, .vfe_res =3D vfe_res_8550, @@ -5293,6 +5308,7 @@ static const struct camss_resources sm8550_resources = =3D { static const struct camss_resources sm8650_resources =3D { .version =3D CAMSS_8650, .pd_name =3D "top", + .legacy_phy =3D true, .csiphy_res =3D csiphy_res_sm8650, .csid_res =3D csid_res_sm8650, .csid_wrapper_res =3D &csid_wrapper_res_sm8550, @@ -5307,6 +5323,7 @@ static const struct camss_resources sm8650_resources = =3D { static const struct camss_resources x1e80100_resources =3D { .version =3D CAMSS_X1E80100, .pd_name =3D "top", + .legacy_phy =3D true, .csiphy_res =3D csiphy_res_x1e80100, .csid_res =3D csid_res_x1e80100, .vfe_res =3D vfe_res_x1e80100, diff --git a/drivers/media/platform/qcom/camss/camss.h b/drivers/media/plat= form/qcom/camss/camss.h index 6d048414c919e..24ec3ad7990e7 100644 --- a/drivers/media/platform/qcom/camss/camss.h +++ b/drivers/media/platform/qcom/camss/camss.h @@ -104,6 +104,7 @@ enum icc_count { struct camss_resources { enum camss_version version; const char *pd_name; + const bool legacy_phy; const struct camss_subdev_resources *csiphy_res; const struct camss_subdev_resources *csid_res; const struct camss_subdev_resources *ispif_res; --=20 2.52.0 From nobody Fri Apr 3 00:00:06 2026 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 3F2B437C111 for ; Thu, 26 Mar 2026 01:28:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774488495; cv=none; b=YFg9PYWNpeMeJKaFEU3SMOTWfnir49ao8t642P/y+Ugj3w7GdL6rRnYPMVMNhE80Okg/0XlulP0SEsVqaK32mjRgLfTlKyRaFpipij0nfNebC0c4Wd+zbDiEfsFp95EdSBm245XxUQN0zPZ4XlhxqLL7nzpHFg/Z7LGB0pcGvbg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774488495; c=relaxed/simple; bh=3ZwZ8owyJBAvwIcF7OJWNhRUWTDZsRviDUVbB4wcBEU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QMhQVQiSyQ6IzAAt5xcbM/qjBWHlixC8u5uS80FSMBP8iysMghhJFg/LOBCqd61AXUaGbTTQwGz+amgl6A+RkHOgHc0b2KI4n5RmmrNBBfha69bwek6KOgfqXLuDtnfLkaVFct5dFDDYxG2ebPkgzqJ/YTLah9UQpK0Sklt1sJw= 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=rjdhdUUi; arc=none smtp.client-ip=209.85.128.53 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="rjdhdUUi" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4853c1ca73aso4560685e9.2 for ; Wed, 25 Mar 2026 18:28:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1774488492; x=1775093292; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Nr+ISZvMGGEZnhMH4jyQUAnGihbj3f54nBos+mgFCmY=; b=rjdhdUUinEKIlVdNprNfsSBLE4DHoQG8cCEmtE4YM6iuP7dajdCQLbYd1AwqQLUHDl YWnRQDeUuC8pAWeQXjSUZ4zVylabehwzm3r6yi9ZZIY7CMmwpa5W6EZKE5HqeWtMnX0E ZvXx0M6jEL2sUPt/v+SAXnzaFTjDKXVOe2OgpLk0B/Ou0aPdYS/Pbq5XgLeB+6VAlWgs XLSr/YwPL/VcVA2BtFoX0zPRnADIVZKAwDwakuwHjm7uFF7itYTJC+PNaNR0D+AWP7KU pzuwY08d7fpnLX/OFzi7XwTVT8yTfXu1f2s1mOYsXvGDKRKz1paSyZttuBwuFquPe1F8 jD1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774488492; x=1775093292; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Nr+ISZvMGGEZnhMH4jyQUAnGihbj3f54nBos+mgFCmY=; b=aAq1GQ0lxE27L0/y5J8Sp2wLGMz1PGX4c+S9HBKHLl0bCameH9coveicSU5QOWk8wR 36B9ZKoOm2zsfvnjWdxrnd7nyAHkhTg6hwqPxOovdL7i34meAd45eI5SuTUUX+pwnlDj sW+rg1RCWZXLXeQyv5jm/fI/7+kEz1D5kM9V7nOjnyxNJtItlFxTH0FmxdU0RlFD7QDy 3jTNeCZaRoto9hTkVIuF0I6pUTeoxPHJ6n/Zz9KVcXPbZP9ilvgWFVwqlU+DwbfmBXTo dPZRB2ZsOW5MmQx85cCXrJ/FWyuXhuH/wpm91LLkSEFymYuGQeiM13dANcCuYtsycIp+ FpJg== X-Forwarded-Encrypted: i=1; AJvYcCXoLdO57TGQIe+iXhRthgnurEeccQHgOT8wOIsqnkO2z/jwFWAw0PgiSytzUsfFTO4fdhtKZ6ox2MNbDPQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yzlf60qmnljfemUfsMgsHYHO9cI9Ut73Tso9rPUWhqAXd+fgk9D Y+kiF64UgqJ7p0IvgUx9d6eodSUtVLh/G0bMUz538vkpeukv4nQSj9N4LYu+R/JeVFk= X-Gm-Gg: ATEYQzwf++CYUeKCX71/PIqplXcLqAZrb9dt1+e2Qa74qDvKNOS5dIyPGTDI5NYZbUb uNhLwSguF2aEGIQLUxWlcbnWM7cG1tFzML6zejR7zJJovX68GSkddTF7zmrAcP60bvizrXC1OVX HnPhiZRQKDAnoLOv+T7TMMUSsAKLKOmOYZR1ROvK/+rZ1wUHKoxt2u+areWETptlfnk3+N/DQG2 iX9WaUrN2HhVTd5IQFd1zqE65GPrrc0C4Guz90sm00luRHPjEOVlszGl3ZQnm0/Yy2D3Bhh7AdV AnhoQBnnPYhsWkKiERRmqvND3vyf8EtuyXjj40Dk1vz2pt5ZWhF+GTENgIF5F2v4liBLcnsKcOi P6Jp0cyjy+RMOhWWY7hb3og6hiw9nBG/pgHdw8pslHsjTdRyt3JUQOoQc2YRtjD6zGAKZZ7jHqX X9MAAtUkJ+US2Gv1crLUAS5WsrPnV+arTAtaA= X-Received: by 2002:a05:600c:3d90:b0:485:2a4b:7bc3 with SMTP id 5b1f17b1804b1-48715fc38f3mr81488775e9.4.1774488491584; Wed, 25 Mar 2026 18:28:11 -0700 (PDT) Received: from [192.168.0.35] ([109.76.163.154]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b919cf1c4sm3918051f8f.23.2026.03.25.18.28.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2026 18:28:11 -0700 (PDT) From: Bryan O'Donoghue Date: Thu, 26 Mar 2026 01:28:34 +0000 Subject: [PATCH v11 6/7] media: qcom: camss: Add support for PHY API devices 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-6-5b93415be6dd@linaro.org> References: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-0-5b93415be6dd@linaro.org> In-Reply-To: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-0-5b93415be6dd@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Konrad Dybcio , Vladimir Zapolskiy , Bryan O'Donoghue Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Bryan O'Donoghue , Krzysztof Kozlowski , Christopher Obbard X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=16035; i=bryan.odonoghue@linaro.org; h=from:subject:message-id; bh=3ZwZ8owyJBAvwIcF7OJWNhRUWTDZsRviDUVbB4wcBEU=; b=owEBbQKS/ZANAwAKASJxO7Ohjcg6AcsmYgBpxIvAu1f7e50hbJGwm3n9yjgqdiPE4d9Ja6XMD lyKps8tXGyJAjMEAAEKAB0WIQTmk/sqq6Nt4Rerb7QicTuzoY3IOgUCacSLwAAKCRAicTuzoY3I OvsgD/wK0q9j3CkWI5Y4dsuMFB2Cgb8NcVs9Yn1/R4J8uVStA1HuYr52S4p4ndxO6P58Ob2nYKf 4ezIqzZn8l0jajW/9TQWrrTGlDgsalJPUBKZW/sYBHczkJI2hqBM4inkzDqLzm6fC4rGspdOmks 4qvg7QFM3FPOqYmceAi2KeKpAERvmblpKOsGz1z/g4dcDIveGa/tLEJYxmPuLovmTfCYWZmhVJB LAX544a37aK3mMjO6XyaGnLNO7Ji3dQEVHSZjgGUbO5T96QBraSuX3vATlflYD7GjoyfnWxOPqr K5aoNaAkreP7JGRnI0S5/O6LGv4Is9vVfc6Ul8hfDsenhL6r9/5JQKMvaeLSMxe1+kdxU5DIr0H vTuslUxmARrTpIqHgqS/Wpc7LjsnCMKgOGwtD5eIZ4zI6Pwv0VajFCxW5g1xbS/fotzhUZK14CR iFZxxR8nMSgRKmsn2Qpg1HH8q+YnI+FyJjNPEF25TclpnQHJiyhaCePEsIqM4qGaYlsRIYY13Tz rh8rBHMEBRUcOO2bcUg6gM4+pTEnFqwMwKLNq+4EBsRBSuicay5RX8Ry3TT2Fghs3xEqA3GucG1 QfXXOcJQC+tTzJbFWgMUt6WeVmhM1+3jaqXBdyzY8iXmvLqdXuZ8xo9gmescqYJ1cyxtfymYC8b RWmtuA0GlfhH15w== X-Developer-Key: i=bryan.odonoghue@linaro.org; a=openpgp; fpr=E693FB2AABA36DE117AB6FB422713BB3A18DC83A Add the ability to use a PHY pointer which interacts with the standard PHY API. In the first instance the code will try to use the new PHY interface. If no PHYs are present in the DT then the legacy method will be attempted. Reviewed-by: Christopher Obbard Tested-by: Christopher Obbard Signed-off-by: Bryan O'Donoghue --- drivers/media/platform/qcom/camss/Kconfig | 1 + drivers/media/platform/qcom/camss/camss-csiphy.c | 189 +++++++++++++++++++= ++-- drivers/media/platform/qcom/camss/camss-csiphy.h | 7 + drivers/media/platform/qcom/camss/camss.c | 72 +++++++-- 4 files changed, 239 insertions(+), 30 deletions(-) diff --git a/drivers/media/platform/qcom/camss/Kconfig b/drivers/media/plat= form/qcom/camss/Kconfig index 4eda48cb1adf0..1edc5e5a1829e 100644 --- a/drivers/media/platform/qcom/camss/Kconfig +++ b/drivers/media/platform/qcom/camss/Kconfig @@ -7,3 +7,4 @@ config VIDEO_QCOM_CAMSS select VIDEO_V4L2_SUBDEV_API select VIDEOBUF2_DMA_SG select V4L2_FWNODE + select PHY_QCOM_MIPI_CSI2 diff --git a/drivers/media/platform/qcom/camss/camss-csiphy.c b/drivers/med= ia/platform/qcom/camss/camss-csiphy.c index 62623393f4144..478938165dd7b 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy.c +++ b/drivers/media/platform/qcom/camss/camss-csiphy.c @@ -7,12 +7,14 @@ * Copyright (c) 2011-2015, The Linux Foundation. All rights reserved. * Copyright (C) 2016-2018 Linaro Ltd. */ +#include #include #include #include #include #include #include +#include #include #include #include @@ -131,10 +133,10 @@ static u8 csiphy_get_bpp(const struct csiphy_format_i= nfo *formats, } =20 /* - * csiphy_set_clock_rates - Calculate and set clock rates on CSIPHY module + * csiphy_set_clock_rates_legacy - Calculate and set clock rates on CSIPHY= module * @csiphy: CSIPHY device */ -static int csiphy_set_clock_rates(struct csiphy_device *csiphy) +static int csiphy_set_clock_rates_legacy(struct csiphy_device *csiphy) { struct device *dev =3D csiphy->camss->dev; s64 link_freq; @@ -200,7 +202,7 @@ static int csiphy_set_clock_rates(struct csiphy_device = *csiphy) * * Return 0 on success or a negative error code otherwise */ -static int csiphy_set_power(struct v4l2_subdev *sd, int on) +static int csiphy_set_power_legacy(struct v4l2_subdev *sd, int on) { struct csiphy_device *csiphy =3D v4l2_get_subdevdata(sd); struct device *dev =3D csiphy->camss->dev; @@ -219,7 +221,7 @@ static int csiphy_set_power(struct v4l2_subdev *sd, int= on) return ret; } =20 - ret =3D csiphy_set_clock_rates(csiphy); + ret =3D csiphy_set_clock_rates_legacy(csiphy); if (ret < 0) { regulator_bulk_disable(csiphy->num_supplies, csiphy->supplies); @@ -254,7 +256,7 @@ static int csiphy_set_power(struct v4l2_subdev *sd, int= on) } =20 /* - * csiphy_stream_on - Enable streaming on CSIPHY module + * csiphy_stream_on_legacy - Enable streaming on CSIPHY module * @csiphy: CSIPHY device * * Helper function to enable streaming on CSIPHY module. @@ -262,7 +264,7 @@ static int csiphy_set_power(struct v4l2_subdev *sd, int= on) * * Return 0 on success or a negative error code otherwise */ -static int csiphy_stream_on(struct csiphy_device *csiphy) +static int csiphy_stream_on_legacy(struct csiphy_device *csiphy) { struct csiphy_config *cfg =3D &csiphy->cfg; s64 link_freq; @@ -306,11 +308,99 @@ static int csiphy_stream_on(struct csiphy_device *csi= phy) * * Helper function to disable streaming on CSIPHY module */ -static void csiphy_stream_off(struct csiphy_device *csiphy) +static void csiphy_stream_off_legacy(struct csiphy_device *csiphy) { csiphy->res->hw_ops->lanes_disable(csiphy, &csiphy->cfg); } =20 +/* + * csiphy_stream_on - Enable streaming on CSIPHY module + * @csiphy: CSIPHY device + * + * Helper function to enable streaming on CSIPHY module. + * Main configuration of CSIPHY module is also done here. + * + * Return 0 on success or a negative error code otherwise + */ +static int csiphy_stream_on(struct csiphy_device *csiphy) +{ + u8 bpp =3D csiphy_get_bpp(csiphy->res->formats->formats, csiphy->res->for= mats->nformats, + csiphy->fmt[MSM_CSIPHY_PAD_SINK].code); + struct csiphy_lanes_cfg *lncfg =3D &csiphy->cfg.csi2->lane_cfg; + struct phy_configure_opts_mipi_dphy *dphy_cfg; + union phy_configure_opts dphy_opts =3D { 0 }; + struct device *dev =3D csiphy->camss->dev; + u8 num_lanes =3D lncfg->num_data; + s64 link_freq; + int i; + int ret; + + dphy_cfg =3D &dphy_opts.mipi_dphy; + + link_freq =3D camss_get_link_freq(&csiphy->subdev.entity, bpp, num_lanes); + + if (link_freq < 0) { + dev_err(dev, + "Cannot get CSI2 transmitter's link frequency\n"); + return -EINVAL; + } + + phy_mipi_dphy_get_default_config_for_hsclk(link_freq, num_lanes, dphy_cfg= ); + + /* Set clock lane id and polarity */ + dphy_cfg->clock_lane_position =3D lncfg->clk.pos; + dphy_cfg->clock_lane_polarity =3D lncfg->clk.pol; + + /* Set data lane_mask and lane_polarities */ + for (i =3D 0; i < num_lanes; i++) { + dphy_cfg->lane_positions[i] =3D lncfg->data[i].pos; + dphy_cfg->lane_polarities[i] =3D lncfg->data[i].pol; + } + + phy_set_mode(csiphy->phy, PHY_MODE_MIPI_DPHY); + + ret =3D phy_configure(csiphy->phy, &dphy_opts); + if (ret) { + dev_err(dev, "failed to configure MIPI D-PHY\n"); + goto error; + } + + return phy_power_on(csiphy->phy); + +error: + return ret; +} + +/* + * csiphy_stream_off - Disable streaming on CSIPHY module + * @csiphy: CSIPHY device + * + * Helper function to disable streaming on CSIPHY module + */ +static void csiphy_stream_off(struct csiphy_device *csiphy) +{ + phy_power_off(csiphy->phy); +} + +/* + * csiphy_set_stream - Enable/disable streaming on CSIPHY module + * @sd: CSIPHY V4L2 subdevice + * @enable: Requested streaming state + * + * Return 0 on success or a negative error code otherwise + */ +static int csiphy_set_stream_legacy(struct v4l2_subdev *sd, int enable) +{ + struct csiphy_device *csiphy =3D v4l2_get_subdevdata(sd); + int ret =3D 0; + + if (enable) + ret =3D csiphy_stream_on_legacy(csiphy); + else + csiphy_stream_off_legacy(csiphy); + + return ret; +} =20 /* * csiphy_set_stream - Enable/disable streaming on CSIPHY module @@ -568,16 +658,16 @@ static bool csiphy_match_clock_name(const char *clock= _name, const char *format, } =20 /* - * msm_csiphy_subdev_init - Initialize CSIPHY device structure and resourc= es + * msm_csiphy_subdev_init_legacy - Initialize CSIPHY device structure and = resources * @csiphy: CSIPHY device * @res: CSIPHY module resources table * @id: CSIPHY module id * * Return 0 on success or a negative error code otherwise */ -int msm_csiphy_subdev_init(struct camss *camss, - struct csiphy_device *csiphy, - const struct camss_subdev_resources *res, u8 id) +int msm_csiphy_subdev_init_legacy(struct camss *camss, + struct csiphy_device *csiphy, + const struct camss_subdev_resources *res, u8 id) { struct device *dev =3D camss->dev; struct platform_device *pdev =3D to_platform_device(dev); @@ -705,6 +795,60 @@ int msm_csiphy_subdev_init(struct camss *camss, return ret; } =20 +/* + * msm_csiphy_subdev_init - Initialize CSIPHY device structure and resourc= es + * @csiphy: CSIPHY device + * @res: CSIPHY module resources table + * @id: CSIPHY module id + * + * Return 0 on success or a negative error code otherwise + */ +int msm_csiphy_subdev_init(struct camss *camss, + struct csiphy_device *csiphy, + const struct camss_subdev_resources *res, u8 id) +{ + struct device *dev =3D camss->dev; + struct of_phandle_args args; + int idx; + int ret; + + snprintf(csiphy->name, ARRAY_SIZE(csiphy->name), "csiphy%d", id); + + idx =3D of_property_match_string(dev->of_node, "phy-names", csiphy->name); + if (idx < 0) { + dev_err(dev, "%s not found\n", csiphy->name); + return idx; + } + + ret =3D of_parse_phandle_with_args(dev->of_node, "phys", "#phy-cells", id= x, &args); + if (ret < 0) { + dev_err(dev, "unable to parse phys args %s\n", csiphy->name); + return ret; + } + + if (!of_device_is_available(args.np)) + goto put_np; + + csiphy->phy =3D devm_phy_get(dev, csiphy->name); + if (IS_ERR(csiphy->phy)) { + ret =3D PTR_ERR(csiphy->phy); + goto put_np; + } + + csiphy->camss =3D camss; + csiphy->id =3D id; + csiphy->res =3D &res->csiphy; + + ret =3D phy_init(csiphy->phy); + if (ret) + dev_err(dev, "phy %s init fail %d\n", csiphy->name, ret); + +put_np: + of_node_put(args.np); + + return ret; +} + /* * csiphy_link_setup - Setup CSIPHY connections * @entity: Pointer to media entity structure @@ -739,8 +883,12 @@ static int csiphy_link_setup(struct media_entity *enti= ty, return 0; } =20 -static const struct v4l2_subdev_core_ops csiphy_core_ops =3D { - .s_power =3D csiphy_set_power, +static const struct v4l2_subdev_core_ops csiphy_core_ops_legacy =3D { + .s_power =3D csiphy_set_power_legacy, +}; + +static const struct v4l2_subdev_video_ops csiphy_video_ops_legacy =3D { + .s_stream =3D csiphy_set_stream_legacy, }; =20 static const struct v4l2_subdev_video_ops csiphy_video_ops =3D { @@ -754,8 +902,13 @@ static const struct v4l2_subdev_pad_ops csiphy_pad_ops= =3D { .set_fmt =3D csiphy_set_format, }; =20 +static const struct v4l2_subdev_ops csiphy_v4l2_ops_legacy =3D { + .core =3D &csiphy_core_ops_legacy, + .video =3D &csiphy_video_ops_legacy, + .pad =3D &csiphy_pad_ops, +}; + static const struct v4l2_subdev_ops csiphy_v4l2_ops =3D { - .core =3D &csiphy_core_ops, .video =3D &csiphy_video_ops, .pad =3D &csiphy_pad_ops, }; @@ -784,7 +937,11 @@ int msm_csiphy_register_entity(struct csiphy_device *c= siphy, struct device *dev =3D csiphy->camss->dev; int ret; =20 - v4l2_subdev_init(sd, &csiphy_v4l2_ops); + if (IS_ERR(csiphy->phy)) + v4l2_subdev_init(sd, &csiphy_v4l2_ops_legacy); + else + v4l2_subdev_init(sd, &csiphy_v4l2_ops); + sd->internal_ops =3D &csiphy_v4l2_internal_ops; sd->flags |=3D V4L2_SUBDEV_FL_HAS_DEVNODE; snprintf(sd->name, ARRAY_SIZE(sd->name), "%s%d", @@ -823,6 +980,8 @@ int msm_csiphy_register_entity(struct csiphy_device *cs= iphy, */ void msm_csiphy_unregister_entity(struct csiphy_device *csiphy) { + if (!IS_ERR(csiphy->phy)) + phy_exit(csiphy->phy); v4l2_device_unregister_subdev(&csiphy->subdev); media_entity_cleanup(&csiphy->subdev.entity); } diff --git a/drivers/media/platform/qcom/camss/camss-csiphy.h b/drivers/med= ia/platform/qcom/camss/camss-csiphy.h index 2d5054819df7f..25b803c06e8bf 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy.h +++ b/drivers/media/platform/qcom/camss/camss-csiphy.h @@ -12,6 +12,7 @@ =20 #include #include +#include #include #include #include @@ -95,6 +96,7 @@ struct csiphy_device_regs { =20 struct csiphy_device { struct camss *camss; + struct phy *phy; u8 id; struct v4l2_subdev subdev; struct media_pad pads[MSM_CSIPHY_PADS_NUM]; @@ -102,6 +104,7 @@ struct csiphy_device { void __iomem *base_clk_mux; u32 irq; char irq_name[30]; + char name[16]; struct camss_clock *clock; bool *rate_set; int nclocks; @@ -116,6 +119,10 @@ struct csiphy_device { =20 struct camss_subdev_resources; =20 +int msm_csiphy_subdev_init_legacy(struct camss *camss, + struct csiphy_device *csiphy, + const struct camss_subdev_resources *res, u8 id); + int msm_csiphy_subdev_init(struct camss *camss, struct csiphy_device *csiphy, const struct camss_subdev_resources *res, u8 id); diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/plat= form/qcom/camss/camss.c index 2749895152e32..224b5472d7771 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -4451,14 +4451,35 @@ static int camss_parse_endpoint_node(struct device = *dev, static int camss_parse_ports(struct camss *camss) { struct device *dev =3D camss->dev; + const struct camss_resources *res =3D camss->res; struct fwnode_handle *fwnode =3D dev_fwnode(dev), *ep; int ret; =20 fwnode_graph_for_each_endpoint(fwnode, ep) { struct camss_async_subdev *csd; + struct fwnode_handle *remote; + + if (!fwnode_device_is_available(ep)) + continue; + + if (res->legacy_phy) { + csd =3D v4l2_async_nf_add_fwnode_remote(&camss->notifier, ep, + typeof(*csd)); + } else { + /* + * For non-legacy PHY, the CSIPHY is a separate device. + * Register the remote endpoint (CSIPHY's endpoint) as + * the async subdev, not the remote port parent. + */ + remote =3D fwnode_graph_get_remote_endpoint(ep); + if (!remote) + continue; + + csd =3D v4l2_async_nf_add_fwnode(&camss->notifier, remote, + struct camss_async_subdev); + fwnode_handle_put(remote); + } =20 - csd =3D v4l2_async_nf_add_fwnode_remote(&camss->notifier, ep, - typeof(*csd)); if (IS_ERR(csd)) { ret =3D PTR_ERR(csd); goto err_cleanup; @@ -4490,15 +4511,26 @@ static int camss_init_subdevices(struct camss *cams= s) unsigned int i; int ret; =20 - for (i =3D 0; i < camss->res->csiphy_num; i++) { - ret =3D msm_csiphy_subdev_init(camss, &camss->csiphy[i], - &res->csiphy_res[i], - res->csiphy_res[i].csiphy.id); - if (ret < 0) { - dev_err(camss->dev, - "Failed to init csiphy%d sub-device: %d\n", - i, ret); - return ret; + if (!res->legacy_phy) { + for (i =3D 0; i < camss->res->csiphy_num; i++) { + ret =3D msm_csiphy_subdev_init(camss, &camss->csiphy[i], + &res->csiphy_res[i], + res->csiphy_res[i].csiphy.id); + if (ret < 0) + return ret; + } + } else { + for (i =3D 0; i < camss->res->csiphy_num; i++) { + ret =3D msm_csiphy_subdev_init_legacy(camss, &camss->csiphy[i], + &res->csiphy_res[i], + res->csiphy_res[i].csiphy.id); + if (ret < 0) { + dev_err(camss->dev, + "Failed to init csiphy%d sub-device: %d\n", + i, ret); + return ret; + } + camss->csiphy[i].phy =3D ERR_PTR(-ENODEV); } } =20 @@ -4575,6 +4607,9 @@ static int camss_link_entities(struct camss *camss) =20 for (i =3D 0; i < camss->res->csiphy_num; i++) { for (j =3D 0; j < camss->res->csid_num; j++) { + if (!camss->csiphy[i].phy) + continue; + ret =3D media_create_pad_link(&camss->csiphy[i].subdev.entity, MSM_CSIPHY_PAD_SRC, &camss->csid[j].subdev.entity, @@ -4684,6 +4719,9 @@ static int camss_register_entities(struct camss *cams= s) int ret; =20 for (i =3D 0; i < camss->res->csiphy_num; i++) { + if (!camss->csiphy[i].phy) + continue; + ret =3D msm_csiphy_register_entity(&camss->csiphy[i], &camss->v4l2_dev); if (ret < 0) { @@ -4739,8 +4777,10 @@ static int camss_register_entities(struct camss *cam= ss) =20 i =3D camss->res->csiphy_num; err_reg_csiphy: - for (i--; i >=3D 0; i--) - msm_csiphy_unregister_entity(&camss->csiphy[i]); + for (i--; i >=3D 0; i--) { + if (camss->csiphy[i].phy) + msm_csiphy_unregister_entity(&camss->csiphy[i]); + } =20 return ret; } @@ -4755,8 +4795,10 @@ static void camss_unregister_entities(struct camss *= camss) { unsigned int i; =20 - for (i =3D 0; i < camss->res->csiphy_num; i++) - msm_csiphy_unregister_entity(&camss->csiphy[i]); + for (i =3D 0; i < camss->res->csiphy_num; i++) { + if (camss->csiphy[i].phy) + msm_csiphy_unregister_entity(&camss->csiphy[i]); + } =20 for (i =3D 0; i < camss->res->csid_num; i++) msm_csid_unregister_entity(&camss->csid[i]); --=20 2.52.0 From nobody Fri Apr 3 00:00:06 2026 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.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 4956037C92A for ; Thu, 26 Mar 2026 01:28:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774488500; cv=none; b=Pj/lR8egU+IMb9pAatoDNioXfwYzdeoBroqeYs+GTNzdWcn+BEYPDzcsuorvRKBOIuGG/BdjboJijX/qkWdrCvvJgWEC4SBLSatoeNW6vaOTr4Ued5ElcGvSaYUFl7QE6AtUn/FuGvZ19DquO8c0s5zZNvWKBo79WBMVdBdeLZ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774488500; c=relaxed/simple; bh=N6f8XbQrqLkocc2xm2zf/znOnvl2dvw/ToKTgJkKLbQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=D9VWrO7ijZ8+6el1CFfs/+cBSyWK+fJ2AsdGcfU6/J3+B88KczxfEP4J4WdlmhXDG3iNo1SIpuNB04k3Ty3hKQABYUCte/ncSLk+cYSJIExdF+RAxds15aZ4AgT0aTaMBss/IioEx1BIeRogFypY+E+vmv0frqpI+wxZ7jUc8H8= 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=E1W6UC6x; arc=none smtp.client-ip=209.85.221.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="E1W6UC6x" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-43b4915161fso339032f8f.2 for ; Wed, 25 Mar 2026 18:28:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1774488493; x=1775093293; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=OgXkjUFi8RNX9zADMCF4Q/I66OJ8AZWY+meNn13gnkc=; b=E1W6UC6xKnL6b3zxASMNW9DWMIB+SBTPk3A2L9HKxHiGZM9wuM6XdHpZhhmnzVDL33 ZvvdEdd3A3UxMiYLpNjPSsVZAYW/QcGo0FaCSbngx3urLzYDXdAyPYGGdSBfNUJq5gEj vTmk1MRR1tJLv/87qiF3h80rRIrsKYLthOpLsVxMq6yLmeqyciQgd33UYOdWPuP5PeP6 gJfEl2ryO3ki9TdZQmMA3JCE+mnMLssxaR7NQ7Tp+45T+Aj4JFdnGdzu3O+aZIj22a8e FZmtcJTfsyPyn3QC/tDFMkHg28eqoni7duwBqaC45oHSMliU4+XWoDQFIkRJGszpybrM ZpFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774488493; x=1775093293; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=OgXkjUFi8RNX9zADMCF4Q/I66OJ8AZWY+meNn13gnkc=; b=EDt35fpnEbhy1J9F+ZyB64T8ugd3lojs0Qiwce6ntR2gwXQ30vFVuN3GHGK/VoUUNq Pa9M0JHITqBON6ysgYlGJYeQmLG92ak5tsXQ6WtMJooJqpI/uaeXh2ov+n1NHleGpZE/ Q+/30vatsj8VuIm9Y9QJm1A8BwlqNLSQosCm6iliuWhQC/HrAKKoWSsK/J4HqK3X10Ez jaEuDpMct8Tg35aSmdGjECWvejURWmmJZokTPfO3M4T/SNqk2w5R/gm2ElVZ91WIzsRR K+q4EBwQxgl+cF9flXhZ88rynL6jZ1URaghuV09GOgQDL2jtH0Mz+LJw4cGSpxF4Gvv3 RTSQ== X-Forwarded-Encrypted: i=1; AJvYcCVqJhYfQNsDegJr0FNti46VEqVmF2vR/4QxvzFvg7AjHx9Q4Xakq3A7ir2ail+BPeCj+AxeiTH56HldPKg=@vger.kernel.org X-Gm-Message-State: AOJu0Yz7RM3QjOc5cw5yCP6cuqMR/nB7UfjJnPaoXXnevuLKx7THjW4u GidNaV0tY8/Gul/ST2pJXUF6mQfFdHbU7arpAtg73X3vmf7lG3zdeyBnoNpEgw2Ir9Y= X-Gm-Gg: ATEYQzxm+BEOYnGXav+jAdyIR/Q+9Q7J1283jBPScquTFdCPCwWN7CPKM2dXlKVv+9c GWqsGVuQjp+XEBvTxAxsGYmCc0uZVurzm4+kZPUaAeXEqxp+ZvZQrG679gRhzVbQEsupRVeMRuJ rc8Ac3dKUUBOYvMHG9/lTSPJr5glBF6763i0kripqgOXy9rCU/vcDpTPl6HwDkV+6cFqvuw4j3s Ny1jqNAEG3aEKkiYjEC0E5n1yxArpqbv05sxQPhfDssULXousWJaBw2W/0R60+TBGudB0B5SYny f+fIZRSbSI0XKBmdeGu9YpAyFD9QhgNCpYz4pHSXJ3XswKU8Kswt/paXwfG5PNedwbBNSgkYd9F f4LfMcoPOnjOA4gBWXdkr7soTwHW43VPLKm84zKeqIrYcWqiFlXhfPnmMoYbECJPdU6tb45YMtZ 0cy8rTYaLBECdgxRcrPh/2pbtj+Oo3FJE0uag= X-Received: by 2002:a5d:64e7:0:b0:43b:3c05:d7fb with SMTP id ffacd0b85a97d-43b88a39b7amr8254132f8f.54.1774488493490; Wed, 25 Mar 2026 18:28:13 -0700 (PDT) Received: from [192.168.0.35] ([109.76.163.154]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43b919cf1c4sm3918051f8f.23.2026.03.25.18.28.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2026 18:28:13 -0700 (PDT) From: Bryan O'Donoghue Date: Thu, 26 Mar 2026 01:28:35 +0000 Subject: [PATCH v11 7/7] media: qcom: camss: Drop legacy PHY descriptions from x1e 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-7-5b93415be6dd@linaro.org> References: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-0-5b93415be6dd@linaro.org> In-Reply-To: <20260326-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v11-0-5b93415be6dd@linaro.org> To: Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Konrad Dybcio , Vladimir Zapolskiy , Bryan O'Donoghue Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Bryan O'Donoghue , Krzysztof Kozlowski , Christopher Obbard X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=3159; i=bryan.odonoghue@linaro.org; h=from:subject:message-id; bh=N6f8XbQrqLkocc2xm2zf/znOnvl2dvw/ToKTgJkKLbQ=; b=owEBbQKS/ZANAwAKASJxO7Ohjcg6AcsmYgBpxIvAW/02o1imMUf4CeWHGfYnnSEV/h55Bnm95 89E+DnlACmJAjMEAAEKAB0WIQTmk/sqq6Nt4Rerb7QicTuzoY3IOgUCacSLwAAKCRAicTuzoY3I OmeHEACz2r5rOYRYzaR2gfd8IFZe4AGMT/qP/a1S1ZqysbMJWb+lApAt50A/4VelvLBR76cDeo1 9rYvr6oRXNFZWJZpk+JHQ3jx2Sm9IZove9pAV4pWYxVJsym9r+koD5zQwywQOeFvyvizvsGRsEq fnRYzHymI2Lo9QnJR+mUlK5Gr/FXJ7ElGVI11WlWQZLSbO125JtS0e3Ve1AcSU05RTiZ++J/LrV m91WApzYPYJUFGwdDxd4dWUZC51LL8LTSLDFAWYU6DuIP1AwS5k4+DdXgxeLu+canP8K53jC8QV Er90YGREEx43r3S2eXwS743Z5zYXiU2QNc1W0WPvsQ4+D+kOskrMDDakHugusK0IJCoYdx/t6Ti jTBssLHgS9fiyypxCwV4LKuJOO81S6g5YqxSm13BbcWN3OUn/U5l/yNprtsnS5pAHAyb55kC/RF 9iinNXo8ZCN7rUuddhGsZtZgPWiqrI0WTlYJHFCH1uenDrdYnm893IsSTBcSeRiFYU3cUuQ4jfA bBxQupEW/n2Ut19upmltARvES2wfzAv0P5q8cdI2S8vtvZcf0MYPrXWIdGpwaF2i71JNMdYQVkI So6btYsJc6d5lhvoDAUJVkqDYu6K2T7WQumaHSquDzrmYNv6DMxk4ZNuyJ47Y/KYazIA0nu8vPX QfPKTV/SBF53dDA== X-Developer-Key: i=bryan.odonoghue@linaro.org; a=openpgp; fpr=E693FB2AABA36DE117AB6FB422713BB3A18DC83A x1e is the first CAMSS SoC to use the new PHY interface. Drop the redundant legacy CSIPHY descriptions. Reviewed-by: Christopher Obbard Tested-by: Christopher Obbard Signed-off-by: Bryan O'Donoghue --- drivers/media/platform/qcom/camss/camss.c | 37 ---------------------------= ---- 1 file changed, 37 deletions(-) diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/plat= form/qcom/camss/camss.c index 224b5472d7771..3b092560b5df5 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -3896,15 +3896,6 @@ static const struct resources_icc icc_res_sa8775p[] = =3D { static const struct camss_subdev_resources csiphy_res_x1e80100[] =3D { /* CSIPHY0 */ { - .regulators =3D { - { .supply =3D "vdd-csiphy-0p8", .init_load_uA =3D 105000 }, - { .supply =3D "vdd-csiphy-1p2", .init_load_uA =3D 58900 } - }, - .clock =3D { "csiphy0", "csiphy0_timer" }, - .clock_rate =3D { { 300000000, 400000000, 480000000 }, - { 266666667, 400000000 } }, - .reg =3D { "csiphy0" }, - .interrupt =3D { "csiphy0" }, .csiphy =3D { .id =3D 0, .hw_ops =3D &csiphy_ops_3ph_1_0, @@ -3913,15 +3904,6 @@ static const struct camss_subdev_resources csiphy_re= s_x1e80100[] =3D { }, /* CSIPHY1 */ { - .regulators =3D { - { .supply =3D "vdd-csiphy-0p8", .init_load_uA =3D 105000 }, - { .supply =3D "vdd-csiphy-1p2", .init_load_uA =3D 58900 } - }, - .clock =3D { "csiphy1", "csiphy1_timer" }, - .clock_rate =3D { { 300000000, 400000000, 480000000 }, - { 266666667, 400000000 } }, - .reg =3D { "csiphy1" }, - .interrupt =3D { "csiphy1" }, .csiphy =3D { .id =3D 1, .hw_ops =3D &csiphy_ops_3ph_1_0, @@ -3930,15 +3912,6 @@ static const struct camss_subdev_resources csiphy_re= s_x1e80100[] =3D { }, /* CSIPHY2 */ { - .regulators =3D { - { .supply =3D "vdd-csiphy-0p8", .init_load_uA =3D 105000 }, - { .supply =3D "vdd-csiphy-1p2", .init_load_uA =3D 58900 } - }, - .clock =3D { "csiphy2", "csiphy2_timer" }, - .clock_rate =3D { { 300000000, 400000000, 480000000 }, - { 266666667, 400000000 } }, - .reg =3D { "csiphy2" }, - .interrupt =3D { "csiphy2" }, .csiphy =3D { .id =3D 2, .hw_ops =3D &csiphy_ops_3ph_1_0, @@ -3947,15 +3920,6 @@ static const struct camss_subdev_resources csiphy_re= s_x1e80100[] =3D { }, /* CSIPHY4 */ { - .regulators =3D { - { .supply =3D "vdd-csiphy-0p8", .init_load_uA =3D 105000 }, - { .supply =3D "vdd-csiphy-1p2", .init_load_uA =3D 58900 } - }, - .clock =3D { "csiphy4", "csiphy4_timer" }, - .clock_rate =3D { { 300000000, 400000000, 480000000 }, - { 266666667, 400000000 } }, - .reg =3D { "csiphy4" }, - .interrupt =3D { "csiphy4" }, .csiphy =3D { .id =3D 4, .hw_ops =3D &csiphy_ops_3ph_1_0, @@ -5365,7 +5329,6 @@ static const struct camss_resources sm8650_resources = =3D { static const struct camss_resources x1e80100_resources =3D { .version =3D CAMSS_X1E80100, .pd_name =3D "top", - .legacy_phy =3D true, .csiphy_res =3D csiphy_res_x1e80100, .csid_res =3D csid_res_x1e80100, .vfe_res =3D vfe_res_x1e80100, --=20 2.52.0