From patchwork Thu Nov 2 11:41:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 160841 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp288183vqu; Thu, 2 Nov 2023 04:42:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHJ7du/2jzbq7Q6JH0eCHIKOm97xIKKhp1bUO4aMBfDSPkCMm/o3uL80iVJVxBsbiLYAwHJ X-Received: by 2002:a05:6a00:2e07:b0:6be:43f8:4e0b with SMTP id fc7-20020a056a002e0700b006be43f84e0bmr18166801pfb.24.1698925338345; Thu, 02 Nov 2023 04:42:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698925338; cv=none; d=google.com; s=arc-20160816; b=z1NRVjPK9EcJojAkuyXHucFYO3K/QFk4aPTFAKuWQ1Om2BnkGPNpjsZMWc+kVXkTXs upj7NZZ9I/yyIQVRS4nNTZvgN0gP7wgRX8llo8fIXC28ZXA72ft2/nUy1y9AuAAzhls/ 7KEdQNMFQ4UKN4IV0VDvTYLWcx+YVqJ3Zd7tVlvMh8pFmM19h065Vj3coeim7l3jtDjl ypARTGYZHCHsYy5zAvl4tRSXu3qh37pDc6ul9jHcFO6NejywtJVi9sz12p+cebh5mpQV QKzOc+BHWXl8o+v8YiSpvyhH8rv2fO2OF4jxvI/jXh3aAKm1pRpvzqphAU5SoohdYXLX n10A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=KzXkSGua52mfDZp2DkUv0+KW6F6b7LlJDY38k2KiigI=; fh=0sjFKdZrkazhz0kjfJeKLw3fSpY5nXwT6yGNXMumIng=; b=daGuSbJBmeXL/Kp1CLNy4n20oODhzNhZAfnAfIE6gZaRy1PPFtHdm+dUIdDlJFKPvZ f3zSiAjfn8j21WzQiNXoJxJLYTRQDjIhEEOQuG5Rms/6rkh4Dy0h5Rxyoi0SGosdX98v XzbM6+G2UAmRpfxtedk3PSgEtelC/DEsxGUsIbt/xPqMEZ1zJ3UlVkKeb3Nvy+xT7Eys Og6mwMj8zZ9fgTlff3ie5IkZxZF+i2NHE2GGi2V9ogp5Xvul36gsrgyVIMNH7wK0GEUk SiQsPNLj2acRBPsL6zTSls62+o20b6f5VLT/cN6HglgMKBft88ZGxUq6oVr4sBgg0Z75 ZG5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RLyfZlYr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id fh19-20020a056a00391300b0068fce6a86acsi3441820pfb.121.2023.11.02.04.42.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 04:42:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RLyfZlYr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 19F9081E14C5; Thu, 2 Nov 2023 04:42:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230000AbjKBLmO (ORCPT + 36 others); Thu, 2 Nov 2023 07:42:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230468AbjKBLmL (ORCPT ); Thu, 2 Nov 2023 07:42:11 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A310F195 for ; Thu, 2 Nov 2023 04:42:02 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4079ed65471so6038395e9.1 for ; Thu, 02 Nov 2023 04:42:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698925321; x=1699530121; 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=KzXkSGua52mfDZp2DkUv0+KW6F6b7LlJDY38k2KiigI=; b=RLyfZlYr/2ymZ2DockxST/snwRquyBQnJj93Dw+VYEdHzeBiPqE6VlEnFbLociwYuB 1fpGTz2OVJvtW9BwQgrkOh48zm2z2X6QuFrku90p+V2dr/y403Ztg8zAKKpKYJ6r4p7Z A8YTWXAmg6syWrlgm9ofGjl1D4h8sAaBGXEy9/D87gqgZzGdkoM3ubMonPQJaCD2+nPJ 7d4DOMgnMpwHcKmfxSicNHehHkQH77A9f0QphbPVbIVoVFtsZHFvp/mDA+odGH3O5bM9 C2X0r2VT0/uR4wyd+VFUT+2e4F9pSOvWA6mbOGYCo73k0kJEaFg4qMBDafSLwiytscwv Xp1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698925321; x=1699530121; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KzXkSGua52mfDZp2DkUv0+KW6F6b7LlJDY38k2KiigI=; b=qYiZJjfPq30+wV7vVL/lvHJlfpz6pARhdVSy3//jFwx8PDyy1fyCM1ccAxUnz9v+dF Ei8c+8IX19ElcAk2ef6cOwr8E9wnXN8uvDJHTzsKPF+jzuHIjVpTd9SHThYfh1A/ZPF9 Tr+Hr9MIZFaWZMkxgz5nF0Nv7AFOC9lM2EzvF4vJBAQmWVMlPM1D0/muTp/CP7blbwLJ jpMo89n0azWOo6WI6r6LLx3JBPss+9+tiRTWgp6eYHnIpzGEzxi2SOzzkV67R7FQJJjt BvMqMh9YIsWu2Lgbdi4cmdrpIJaAWjze2FzQqvwTb8Ccte5nRNZ7AKHjg94y2ns46u1h +/pA== X-Gm-Message-State: AOJu0YwyZqCAar71TNCXIF+K1kHpvKWkJkLfyfVsyl7WoJBWjGz6MyvX yq210ocvtll4ZVTqztIH1Td5qw== X-Received: by 2002:a05:600c:3553:b0:405:3e9a:f1e3 with SMTP id i19-20020a05600c355300b004053e9af1e3mr14855043wmq.11.1698925320889; Thu, 02 Nov 2023 04:42:00 -0700 (PDT) Received: from [127.0.0.1] ([37.228.218.3]) by smtp.gmail.com with ESMTPSA id j41-20020a05600c1c2900b004060f0a0fdbsm2717720wms.41.2023.11.02.04.41.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 04:42:00 -0700 (PDT) From: Bryan O'Donoghue Date: Thu, 02 Nov 2023 11:41:54 +0000 Subject: [PATCH 1/6] media: dt-bindings: media: camss: Add qcom,sc8280xp-camss binding MIME-Version: 1.0 Message-Id: <20231102-b4-camss-sc8280xp-v1-1-9996f4bcb8f4@linaro.org> References: <20231102-b4-camss-sc8280xp-v1-0-9996f4bcb8f4@linaro.org> In-Reply-To: <20231102-b4-camss-sc8280xp-v1-0-9996f4bcb8f4@linaro.org> To: hverkuil-cisco@xs4all.nl, laurent.pinchart@ideasonboard.com, Andy Gross , Bjorn Andersson , Konrad Dybcio , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , vincent.knecht@mailoo.org, matti.lehtimaki@gmail.com, grosikop@quicinc.com Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Krzysztof Kozlowski X-Mailer: b4 0.13-dev-83828 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 02 Nov 2023 04:42:17 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781452335510804664 X-GMAIL-MSGID: 1781452335510804664 Add bindings for qcom,sc8280xp-camss in order to support the camera subsystem for sc8280xp as found in the Lenovo x13s Laptop. This patch depends on: https://lore.kernel.org/linux-arm-msm/20231026105345.3376-2-bryan.odonoghue@linaro.org/ https://lore.kernel.org/linux-arm-msm/20231026105345.3376-3-bryan.odonoghue@linaro.org/ Signed-off-by: Bryan O'Donoghue Reviewed-by: Krzysztof Kozlowski --- .../bindings/media/qcom,sc8280xp-camss.yaml | 581 +++++++++++++++++++++ 1 file changed, 581 insertions(+) diff --git a/Documentation/devicetree/bindings/media/qcom,sc8280xp-camss.yaml b/Documentation/devicetree/bindings/media/qcom,sc8280xp-camss.yaml new file mode 100644 index 0000000000000..88216c1a37709 --- /dev/null +++ b/Documentation/devicetree/bindings/media/qcom,sc8280xp-camss.yaml @@ -0,0 +1,581 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/qcom,sc8280xp-camss.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm SC8280XP Camera Subsystem (CAMSS) + +maintainers: + - Bryan O'Donoghue + +description: | + The CAMSS IP is a CSI decoder and ISP present on Qualcomm platforms. + +properties: + compatible: + const: qcom,sc8280xp-camss + + clocks: + maxItems: 63 + + clock-names: + items: + - const: camnoc_axi + - const: camnoc_axi_src + - const: cpas_ahb + - const: cphy_rx_src + - const: csiphy0 + - const: csiphy0_timer_src + - const: csiphy0_timer + - const: csiphy1 + - const: csiphy1_timer_src + - const: csiphy1_timer + - const: csiphy2 + - const: csiphy2_timer_src + - const: csiphy2_timer + - const: csiphy3 + - const: csiphy3_timer_src + - const: csiphy3_timer + - const: vfe0_axi + - const: vfe0_src + - const: vfe0 + - const: vfe0_cphy_rx + - const: vfe0_csid_src + - const: vfe0_csid + - const: vfe1_axi + - const: vfe1_src + - const: vfe1 + - const: vfe1_cphy_rx + - const: vfe1_csid_src + - const: vfe1_csid + - const: vfe2_axi + - const: vfe2_src + - const: vfe2 + - const: vfe2_cphy_rx + - const: vfe2_csid_src + - const: vfe2_csid + - const: vfe3_axi + - const: vfe3_src + - const: vfe3 + - const: vfe3_cphy_rx + - const: vfe3_csid_src + - const: vfe3_csid + - const: vfe_lite0_src + - const: vfe_lite0 + - const: vfe_lite0_cphy_rx + - const: vfe_lite0_csid_src + - const: vfe_lite0_csid + - const: vfe_lite1_src + - const: vfe_lite1 + - const: vfe_lite1_cphy_rx + - const: vfe_lite1_csid_src + - const: vfe_lite1_csid + - const: vfe_lite2_src + - const: vfe_lite2 + - const: vfe_lite2_cphy_rx + - const: vfe_lite2_csid_src + - const: vfe_lite2_csid + - const: vfe_lite3_src + - const: vfe_lite3 + - const: vfe_lite3_cphy_rx + - const: vfe_lite3_csid_src + - const: vfe_lite3_csid + - const: gcc_axi_hf + - const: gcc_axi_sf + - const: slow_ahb_src + + interrupts: + maxItems: 20 + + interrupt-names: + items: + - const: csid1_lite + - const: vfe_lite1 + - const: csiphy3 + - const: csid0 + - const: vfe0 + - const: csid1 + - const: vfe1 + - const: csid0_lite + - const: vfe_lite0 + - const: csiphy0 + - const: csiphy1 + - const: csiphy2 + - const: csid2 + - const: vfe2 + - const: csid3_lite + - const: csid2_lite + - const: vfe_lite3 + - const: vfe_lite2 + - const: csid3 + - const: vfe3 + + iommus: + maxItems: 16 + + interconnects: + maxItems: 4 + + interconnect-names: + items: + - const: cam_ahb + - const: cam_hf_mnoc + - const: cam_sf_mnoc + - const: cam_sf_icp_mnoc + + power-domains: + items: + - description: IFE0 GDSC - Image Front End, Global Distributed Switch Controller. + - description: IFE1 GDSC - Image Front End, Global Distributed Switch Controller. + - description: IFE2 GDSC - Image Front End, Global Distributed Switch Controller. + - description: IFE3 GDSC - Image Front End, Global Distributed Switch Controller. + - description: Titan Top GDSC - Titan ISP Block, Global Distributed Switch Controller. + + power-domain-names: + items: + - const: ife0 + - const: ife1 + - const: ife2 + - const: ife3 + - const: top + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + description: + CSI input ports. + + properties: + port@0: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input port for receiving CSI data from CSIPHY0. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + maxItems: 1 + + data-lanes: + minItems: 1 + maxItems: 4 + + required: + - clock-lanes + - data-lanes + + port@1: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input port for receiving CSI data from CSIPHY1. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + maxItems: 1 + + data-lanes: + minItems: 1 + maxItems: 4 + + required: + - clock-lanes + - data-lanes + + port@2: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input port for receiving CSI data from CSIPHY2. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + maxItems: 1 + + data-lanes: + minItems: 1 + maxItems: 4 + + required: + - clock-lanes + - data-lanes + + port@3: + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false + description: + Input port for receiving CSI data from CSIPHY3. + + properties: + endpoint: + $ref: video-interfaces.yaml# + unevaluatedProperties: false + + properties: + clock-lanes: + maxItems: 1 + + data-lanes: + minItems: 1 + maxItems: 4 + + required: + - clock-lanes + - data-lanes + + reg: + maxItems: 20 + + reg-names: + items: + - const: csiphy2 + - const: csiphy3 + - const: csiphy0 + - const: csiphy1 + - const: vfe0 + - const: csid0 + - const: vfe1 + - const: csid1 + - const: vfe2 + - const: csid2 + - const: vfe_lite0 + - const: csid0_lite + - const: vfe_lite1 + - const: csid1_lite + - const: vfe_lite2 + - const: csid2_lite + - const: vfe_lite3 + - const: csid3_lite + - const: vfe3 + - const: csid3 + + vdda-phy-supply: + description: + Phandle to a regulator supply to PHY core block. + + vdda-pll-supply: + description: + Phandle to 1.8V regulator supply to PHY refclk pll block. + +required: + - clock-names + - clocks + - compatible + - interconnects + - interconnect-names + - interrupts + - interrupt-names + - iommus + - power-domains + - power-domain-names + - reg + - reg-names + - vdda-phy-supply + - vdda-pll-supply + +additionalProperties: false + +examples: + - | + #include + #include + #include + #include + #include + + soc { + #address-cells = <2>; + #size-cells = <2>; + + camss: camss@ac5a000 { + compatible = "qcom,sc8280xp-camss"; + + reg = <0 0x0ac5a000 0 0x2000>, + <0 0x0ac5c000 0 0x2000>, + <0 0x0ac65000 0 0x2000>, + <0 0x0ac67000 0 0x2000>, + <0 0x0acaf000 0 0x4000>, + <0 0x0acb3000 0 0x1000>, + <0 0x0acb6000 0 0x4000>, + <0 0x0acba000 0 0x1000>, + <0 0x0acbd000 0 0x4000>, + <0 0x0acc1000 0 0x1000>, + <0 0x0acc4000 0 0x4000>, + <0 0x0acc8000 0 0x1000>, + <0 0x0accb000 0 0x4000>, + <0 0x0accf000 0 0x1000>, + <0 0x0acd2000 0 0x4000>, + <0 0x0acd6000 0 0x1000>, + <0 0x0acd9000 0 0x4000>, + <0 0x0acdd000 0 0x1000>, + <0 0x0ace0000 0 0x4000>, + <0 0x0ace4000 0 0x1000>; + + reg-names = "csiphy2", + "csiphy3", + "csiphy0", + "csiphy1", + "vfe0", + "csid0", + "vfe1", + "csid1", + "vfe2", + "csid2", + "vfe_lite0", + "csid0_lite", + "vfe_lite1", + "csid1_lite", + "vfe_lite2", + "csid2_lite", + "vfe_lite3", + "csid3_lite", + "vfe3", + "csid3"; + + vdda-phy-supply = <&vreg_l6d>; + vdda-pll-supply = <&vreg_l4d>; + + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + + interrupt-names = "csid1_lite", + "vfe_lite1", + "csiphy3", + "csid0", + "vfe0", + "csid1", + "vfe1", + "csid0_lite", + "vfe_lite0", + "csiphy0", + "csiphy1", + "csiphy2", + "csid2", + "vfe2", + "csid3_lite", + "csid2_lite", + "vfe_lite3", + "vfe_lite2", + "csid3", + "vfe3"; + + power-domains = <&camcc IFE_0_GDSC>, + <&camcc IFE_1_GDSC>, + <&camcc IFE_2_GDSC>, + <&camcc IFE_3_GDSC>, + <&camcc TITAN_TOP_GDSC>; + + power-domain-names = "ife0", + "ife1", + "ife2", + "ife3", + "top"; + + clocks = <&camcc CAMCC_CAMNOC_AXI_CLK>, + <&camcc CAMCC_CAMNOC_AXI_CLK_SRC>, + <&camcc CAMCC_CPAS_AHB_CLK>, + <&camcc CAMCC_CPHY_RX_CLK_SRC>, + <&camcc CAMCC_CSIPHY0_CLK>, + <&camcc CAMCC_CSI0PHYTIMER_CLK_SRC>, + <&camcc CAMCC_CSI0PHYTIMER_CLK>, + <&camcc CAMCC_CSIPHY1_CLK>, + <&camcc CAMCC_CSI1PHYTIMER_CLK_SRC>, + <&camcc CAMCC_CSI1PHYTIMER_CLK>, + <&camcc CAMCC_CSIPHY2_CLK>, + <&camcc CAMCC_CSI2PHYTIMER_CLK_SRC>, + <&camcc CAMCC_CSI2PHYTIMER_CLK>, + <&camcc CAMCC_CSIPHY3_CLK>, + <&camcc CAMCC_CSI3PHYTIMER_CLK_SRC>, + <&camcc CAMCC_CSI3PHYTIMER_CLK>, + <&camcc CAMCC_IFE_0_AXI_CLK>, + <&camcc CAMCC_IFE_0_CLK_SRC>, + <&camcc CAMCC_IFE_0_CLK>, + <&camcc CAMCC_IFE_0_CPHY_RX_CLK>, + <&camcc CAMCC_IFE_0_CSID_CLK_SRC>, + <&camcc CAMCC_IFE_0_CSID_CLK>, + <&camcc CAMCC_IFE_1_AXI_CLK>, + <&camcc CAMCC_IFE_1_CLK_SRC>, + <&camcc CAMCC_IFE_1_CLK>, + <&camcc CAMCC_IFE_1_CPHY_RX_CLK>, + <&camcc CAMCC_IFE_1_CSID_CLK_SRC>, + <&camcc CAMCC_IFE_1_CSID_CLK>, + <&camcc CAMCC_IFE_2_AXI_CLK>, + <&camcc CAMCC_IFE_2_CLK_SRC>, + <&camcc CAMCC_IFE_2_CLK>, + <&camcc CAMCC_IFE_2_CPHY_RX_CLK>, + <&camcc CAMCC_IFE_2_CSID_CLK_SRC>, + <&camcc CAMCC_IFE_2_CSID_CLK>, + <&camcc CAMCC_IFE_3_AXI_CLK>, + <&camcc CAMCC_IFE_3_CLK_SRC>, + <&camcc CAMCC_IFE_3_CLK>, + <&camcc CAMCC_IFE_3_CPHY_RX_CLK>, + <&camcc CAMCC_IFE_3_CSID_CLK_SRC>, + <&camcc CAMCC_IFE_3_CSID_CLK>, + <&camcc CAMCC_IFE_LITE_0_CLK_SRC>, + <&camcc CAMCC_IFE_LITE_0_CLK>, + <&camcc CAMCC_IFE_LITE_0_CPHY_RX_CLK>, + <&camcc CAMCC_IFE_LITE_0_CSID_CLK_SRC>, + <&camcc CAMCC_IFE_LITE_0_CSID_CLK>, + <&camcc CAMCC_IFE_LITE_1_CLK_SRC>, + <&camcc CAMCC_IFE_LITE_1_CLK>, + <&camcc CAMCC_IFE_LITE_1_CPHY_RX_CLK>, + <&camcc CAMCC_IFE_LITE_1_CSID_CLK_SRC>, + <&camcc CAMCC_IFE_LITE_1_CSID_CLK>, + <&camcc CAMCC_IFE_LITE_2_CLK_SRC>, + <&camcc CAMCC_IFE_LITE_2_CLK>, + <&camcc CAMCC_IFE_LITE_2_CPHY_RX_CLK>, + <&camcc CAMCC_IFE_LITE_2_CSID_CLK_SRC>, + <&camcc CAMCC_IFE_LITE_2_CSID_CLK>, + <&camcc CAMCC_IFE_LITE_3_CLK_SRC>, + <&camcc CAMCC_IFE_LITE_3_CLK>, + <&camcc CAMCC_IFE_LITE_3_CPHY_RX_CLK>, + <&camcc CAMCC_IFE_LITE_3_CSID_CLK_SRC>, + <&camcc CAMCC_IFE_LITE_3_CSID_CLK>, + <&gcc GCC_CAMERA_HF_AXI_CLK>, + <&gcc GCC_CAMERA_SF_AXI_CLK>, + <&camcc CAMCC_SLOW_AHB_CLK_SRC>; + + clock-names = "camnoc_axi", + "camnoc_axi_src", + "cpas_ahb", + "cphy_rx_src", + "csiphy0", + "csiphy0_timer_src", + "csiphy0_timer", + "csiphy1", + "csiphy1_timer_src", + "csiphy1_timer", + "csiphy2", + "csiphy2_timer_src", + "csiphy2_timer", + "csiphy3", + "csiphy3_timer_src", + "csiphy3_timer", + "vfe0_axi", + "vfe0_src", + "vfe0", + "vfe0_cphy_rx", + "vfe0_csid_src", + "vfe0_csid", + "vfe1_axi", + "vfe1_src", + "vfe1", + "vfe1_cphy_rx", + "vfe1_csid_src", + "vfe1_csid", + "vfe2_axi", + "vfe2_src", + "vfe2", + "vfe2_cphy_rx", + "vfe2_csid_src", + "vfe2_csid", + "vfe3_axi", + "vfe3_src", + "vfe3", + "vfe3_cphy_rx", + "vfe3_csid_src", + "vfe3_csid", + "vfe_lite0_src", + "vfe_lite0", + "vfe_lite0_cphy_rx", + "vfe_lite0_csid_src", + "vfe_lite0_csid", + "vfe_lite1_src", + "vfe_lite1", + "vfe_lite1_cphy_rx", + "vfe_lite1_csid_src", + "vfe_lite1_csid", + "vfe_lite2_src", + "vfe_lite2", + "vfe_lite2_cphy_rx", + "vfe_lite2_csid_src", + "vfe_lite2_csid", + "vfe_lite3_src", + "vfe_lite3", + "vfe_lite3_cphy_rx", + "vfe_lite3_csid_src", + "vfe_lite3_csid", + "gcc_axi_hf", + "gcc_axi_sf", + "slow_ahb_src"; + + + iommus = <&apps_smmu 0x2000 0x4e0>, + <&apps_smmu 0x2020 0x4e0>, + <&apps_smmu 0x2040 0x4e0>, + <&apps_smmu 0x2060 0x4e0>, + <&apps_smmu 0x2080 0x4e0>, + <&apps_smmu 0x20e0 0x4e0>, + <&apps_smmu 0x20c0 0x4e0>, + <&apps_smmu 0x20a0 0x4e0>, + <&apps_smmu 0x2400 0x4e0>, + <&apps_smmu 0x2420 0x4e0>, + <&apps_smmu 0x2440 0x4e0>, + <&apps_smmu 0x2460 0x4e0>, + <&apps_smmu 0x2480 0x4e0>, + <&apps_smmu 0x24e0 0x4e0>, + <&apps_smmu 0x24c0 0x4e0>, + <&apps_smmu 0x24a0 0x4e0>; + + interconnects = <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_CAMERA_CFG 0>, + <&mmss_noc MASTER_CAMNOC_HF 0 &mc_virt SLAVE_EBI1 0>, + <&mmss_noc MASTER_CAMNOC_SF 0 &mc_virt SLAVE_EBI1 0>, + <&mmss_noc MASTER_CAMNOC_ICP 0 &mc_virt SLAVE_EBI1 0>; + interconnect-names = "cam_ahb", + "cam_hf_mnoc", + "cam_sf_mnoc", + "cam_sf_icp_mnoc"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + csiphy_ep0: endpoint@0 { + reg = <0>; + clock-lanes = <7>; + data-lanes = <0 1>; + remote-endpoint = <&sensor_ep>; + }; + }; + }; + }; + }; From patchwork Thu Nov 2 11:41:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 160845 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp288938vqu; Thu, 2 Nov 2023 04:43:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEMTuCLFV8bIjxeSzMKpLrBvk7T1hx4SviQAox3f5LYv6OXZeVh9pUsSmMtZt04H3uYRzRD X-Received: by 2002:a05:6a20:160b:b0:159:c24f:5fa4 with SMTP id l11-20020a056a20160b00b00159c24f5fa4mr19187228pzj.1.1698925429424; Thu, 02 Nov 2023 04:43:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698925429; cv=none; d=google.com; s=arc-20160816; b=ul6kocyxkAhlJ+B9AU385Ke/6KtD2QG+JcQfzyxMNri8a8Cm4YhBb2ghun9n8fXra9 9NAAyOJNaJi4uIEzfRRXl6ldWikW5kGIpDgKGJHK+rHKVMDiDHgsDggF+3OdlONr+P9d GMwpSHKJuO+HJ8/x4ppTAYDW2qwbzbsQxgA5E6Jz5z5ZpE5qlkyvJQTGKC5w/fSR2HQp 6FqXBsF/Zv5I/Gq4e6ou/9RX0cMhrR6ZpFHXM01WuW6dXbjO7aAMR8tZZAJnDrIMrKpc Txs3LecqYmlbK0KPnx30c7KDIitvRVI5DU3srscMFu/TqfabHmXXPrPEadHaCtmY+f6G WaCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=WCtyQ+lTDBrdwtq+TcgFqVgQ5Den1oj2NhFuV2sggCo=; fh=FmtHVNfIh709uyJI8Krpj3bL6hTZZZt8AbAkITdrt7Y=; b=WXUOOs+e7iz5diySQsQea1SSy9tnd2frJQkLysGgiOxdGL/G03o4aeQe50hDq2S7q1 jHt8wVGl8/+R4vkek5ua5k0Sa5ce6wXl6TL2NcugJt3RdStWW/INKJuWYtdgjMXUdqaD 3o5iUaGOySBcojR8o6i2T22Q4gxIj3uoTqgNeVBUsdgI7m73BsDTBxPB3/Yfxhsh+g9I yi25+MhMUkCEgoYHT2QkxDMv7SIDy6HdGotJ0JpyRbBT6UjqQIEC/Kfej8HDa/OMfRkx Lm/o60QXgyEEl2xYjnYAtbHCc2qu8GsJUMBFaKtmYnYwoZvSo+YF0EjCSUgERGpCGViQ eWEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w77L74RA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id d6-20020a056a0010c600b006c1222daf52si3489602pfu.201.2023.11.02.04.43.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 04:43:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w77L74RA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 0FDC98263EA8; Thu, 2 Nov 2023 04:43:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232168AbjKBLmW (ORCPT + 36 others); Thu, 2 Nov 2023 07:42:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231448AbjKBLmQ (ORCPT ); Thu, 2 Nov 2023 07:42:16 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 651951A7 for ; Thu, 2 Nov 2023 04:42:04 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2c6ef6c1ec2so9558921fa.2 for ; Thu, 02 Nov 2023 04:42:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698925322; x=1699530122; 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=WCtyQ+lTDBrdwtq+TcgFqVgQ5Den1oj2NhFuV2sggCo=; b=w77L74RAWWOS7mK8xD5RkJDL0FUHcKlkjhZL1AogUKy5BhqzchsqHqkMMqEoIQYyE1 P7wAs6ar1WsEOhsAmooYJzC450XdZKwrETPPi4xepcXvdMMYi8t9a4uMxj0QH9JPXlOh jCABinkJux5swY3A8D/9Sr3iQJI2/5T6qTb5cReDaMQtkDnvZ2Z+BSDeNxFw/8dyaqAB ikbGDFHeh2DhrYsGR2iMu68WK9V4QbbtypDasi0J6tzl0Ujz3m2lRwUVrKz/UTQzKxFv OxaS/IrrbEXtlG7MycNhzUOZPnvgiotDPoVgHhj+GmaRR6P5+Lnl6+T/+lWuefK93vi2 4t5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698925322; x=1699530122; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WCtyQ+lTDBrdwtq+TcgFqVgQ5Den1oj2NhFuV2sggCo=; b=bJ7qxrutbtwcIYOpWccN8MmJkh4bCLQGWVXDYs4ZucOK7cFDYW3gYfAGa+4toQ+IvR nY/kukCBpzSeR8kIBP88R0m5t4ma+22DQwShVIEdQzwO4EuJwEdcZABKtBEuUMp4F0/C 1VG1xAcjHMNqDrj/YjYgNnooS63jzozxezn/9fNg63MP8uKdbHyVcfsivhQ4dAJ4MTgW tZgHIJY77OMrhnBI5PeT8/jbCtbXmImYPSyZSgO0f/SZaUBOAsFeqB6mQjehRVyoi1Os qsl8tueNXJK7ENENkuP1JkwJHGxKyz1i2hrbkVLtcM698OmVHV7DGywAMA7ncfiCvLSS uLrg== X-Gm-Message-State: AOJu0YxGVLrFNnBB4W8+wCax2HXuWU2Poe7Al7Hs2UI97ts6cgG55oGU KHlNhurrBFQ4dalirRRKjCYpsA== X-Received: by 2002:a2e:8048:0:b0:2c5:b87:39bc with SMTP id p8-20020a2e8048000000b002c50b8739bcmr14078900ljg.1.1698925322284; Thu, 02 Nov 2023 04:42:02 -0700 (PDT) Received: from [127.0.0.1] ([37.228.218.3]) by smtp.gmail.com with ESMTPSA id j41-20020a05600c1c2900b004060f0a0fdbsm2717720wms.41.2023.11.02.04.42.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 04:42:01 -0700 (PDT) From: Bryan O'Donoghue Date: Thu, 02 Nov 2023 11:41:55 +0000 Subject: [PATCH 2/6] media: qcom: camss: Add CAMSS_SC8280XP enum MIME-Version: 1.0 Message-Id: <20231102-b4-camss-sc8280xp-v1-2-9996f4bcb8f4@linaro.org> References: <20231102-b4-camss-sc8280xp-v1-0-9996f4bcb8f4@linaro.org> In-Reply-To: <20231102-b4-camss-sc8280xp-v1-0-9996f4bcb8f4@linaro.org> To: hverkuil-cisco@xs4all.nl, laurent.pinchart@ideasonboard.com, Andy Gross , Bjorn Andersson , Konrad Dybcio , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , vincent.knecht@mailoo.org, matti.lehtimaki@gmail.com, grosikop@quicinc.com Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue X-Mailer: b4 0.13-dev-83828 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 02 Nov 2023 04:43:26 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781452431141898927 X-GMAIL-MSGID: 1781452431141898927 Adds a CAMSS SoC identifier for the SC8280XP. Signed-off-by: Bryan O'Donoghue --- drivers/media/platform/qcom/camss/camss.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/qcom/camss/camss.h b/drivers/media/platform/qcom/camss/camss.h index cd8186fe1797b..0c0e813d15799 100644 --- a/drivers/media/platform/qcom/camss/camss.h +++ b/drivers/media/platform/qcom/camss/camss.h @@ -76,6 +76,7 @@ enum camss_version { CAMSS_660, CAMSS_845, CAMSS_8250, + CAMSS_8280XP, }; enum icc_count { From patchwork Thu Nov 2 11:41:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 160843 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp288853vqu; Thu, 2 Nov 2023 04:43:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGFa6tWtlPcNDxkKH2STg2q83uJvSGMGZVNsmh7Hz0xhXirvMOPbbdvjgS2Tm4iSLdL1a3r X-Received: by 2002:a05:6a20:8406:b0:160:c1b9:a759 with SMTP id c6-20020a056a20840600b00160c1b9a759mr20484494pzd.20.1698925418584; Thu, 02 Nov 2023 04:43:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698925418; cv=none; d=google.com; s=arc-20160816; b=AueG4s17HmTgUCVfB8oU7oz483cEjy2OQmliNNiSo1Z6SwQj+8iuq5D3pEAoqXme+K UxPW2f25F1fJgBUJYY4F5qrItaO/H4YHiwwwddPatXafJNNZ3Elfj5AeMvJaiOogLJOZ QUPnNtfTz5ck9wlEya/HrxKDDmtK7tPUjJ0ZiROWmk1aBLE5xTWp36I8BD953P/jTWPd 53ZSWma596f1DP55wiWHHTkMeOhaGuiGFFEO+iVHVaTod7lT76tnwV5ZY0tcBXB4QD51 ionohb1e5CnRmdcsYn/uBtvvUe8QKV8AFaAdKsWG0fNcIr/TRjFqcPGVgQHmpntqE4Yj yedQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=vbWYJQhIsB+Tb1jwxwFcUUflIu3DiRZ3/+WTM6wt7Zk=; fh=FmtHVNfIh709uyJI8Krpj3bL6hTZZZt8AbAkITdrt7Y=; b=LzY46CrWws9iYm+dMNNh3UtYsKCVESQLZzhdLXJ00/suLTF9esrRmRdKrIlURSyLF8 yvdYheXPTfNlPhI4Giuhg0/PRPezjlaJidlq7HiQ6OK8/pl+cfDJuVl6Jj9gVyh49lo2 qIicMPi/8n/pBqNOBvM3PwLmJhKe51hNY9q+6nMGDj0TsJQCz09T60Byrf6WvFWkAV/I u9IHHZTH8iLfivt21jrYzNl9IMAtO8+pD3aHFeWUYzACSNRXVbuca2J20YkulSKG56iB Prf3dqrzpUagRP7/P2XnJeM7OEA3/gc6AjX5tvV9VivaMaxz3PTmZC6MaI61j3411eXP 3VKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uuZHZe0u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id g19-20020a056a0023d300b006c145e1210csi3454085pfc.323.2023.11.02.04.43.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 04:43:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uuZHZe0u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id F233E8029230; Thu, 2 Nov 2023 04:43:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231332AbjKBLm0 (ORCPT + 36 others); Thu, 2 Nov 2023 07:42:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231532AbjKBLmQ (ORCPT ); Thu, 2 Nov 2023 07:42:16 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F28A01AD for ; Thu, 2 Nov 2023 04:42:04 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-32f78dcf036so1157248f8f.0 for ; Thu, 02 Nov 2023 04:42:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698925323; x=1699530123; 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=vbWYJQhIsB+Tb1jwxwFcUUflIu3DiRZ3/+WTM6wt7Zk=; b=uuZHZe0usB8WF6agH1eYyxg3L2Sd580xUKCYtbHoBPg9x3Ozytks3u2iAifSE/kmtY 5yMAnHxv/Esz8lgO0Oawxh9lBqznwpjnaRoxiIzNKkXUz92+BjW6TxpHMgf7HEEHVK2h fCIjhyGwpBiBQkCLDiI7olQ4WEMqW1Fk41G9NRJJjknTrLv5wWBBVraA4gtQg56rVTm0 3KIyLnAZ7zRYnNBI6oLiX5099YINEa4AKbEhoXEgmxasDAZRDIPvYvCAVGPgKdMsSQv0 3wEDv+PG3TvhwE9tsU5KUwOs2+tqdKwGs2Pjb2tRZpTUESCP6otVwTBvKuKwr4sbWjxE 9E3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698925323; x=1699530123; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vbWYJQhIsB+Tb1jwxwFcUUflIu3DiRZ3/+WTM6wt7Zk=; b=wkYsyiDOduqqQV3LQ8QLxwKWRxIUGTcrUC+4Lot4rTmsgUyZuFTEphJqaddKjlGrc3 zh+i/swo+alQUe5caSAtS+4dnAycJM24HRpETE8m3E+lN+Zegf3erk4DKsGtRZ+x+zmI 2YHNY/SaBY8F+ollJAtXZLG80BDdOqi0HRQO2/eh+pNWAs2g4pso/43egJT50CWRLvgd igf4/iUelFKzwRlXQfjmwK87bdN8xmIgukp5o8lF8WMB1YLxn12AJ9Z3xxWS+W2d81EU 8/9WJN2NG5AW5HZZE53QDQcd2/HFD+3z16O68k/boWhCFM5dc1QPT2MD5o8xLGAlYsn7 uVag== X-Gm-Message-State: AOJu0YwH9u+KodViCbWo1JENmGUrIETl8yJ7Y0B7skLh1cFDLyfB7cDJ lU/ZHbNGX1nk25KwNON+XdbDoQ== X-Received: by 2002:a5d:6d82:0:b0:32f:7e96:b1a2 with SMTP id l2-20020a5d6d82000000b0032f7e96b1a2mr6665566wrs.33.1698925323451; Thu, 02 Nov 2023 04:42:03 -0700 (PDT) Received: from [127.0.0.1] ([37.228.218.3]) by smtp.gmail.com with ESMTPSA id j41-20020a05600c1c2900b004060f0a0fdbsm2717720wms.41.2023.11.02.04.42.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 04:42:03 -0700 (PDT) From: Bryan O'Donoghue Date: Thu, 02 Nov 2023 11:41:56 +0000 Subject: [PATCH 3/6] media: qcom: camss: csiphy-3ph: Add Gen2 v1.1 two-phase MIPI CSI-2 DPHY init MIME-Version: 1.0 Message-Id: <20231102-b4-camss-sc8280xp-v1-3-9996f4bcb8f4@linaro.org> References: <20231102-b4-camss-sc8280xp-v1-0-9996f4bcb8f4@linaro.org> In-Reply-To: <20231102-b4-camss-sc8280xp-v1-0-9996f4bcb8f4@linaro.org> To: hverkuil-cisco@xs4all.nl, laurent.pinchart@ideasonboard.com, Andy Gross , Bjorn Andersson , Konrad Dybcio , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , vincent.knecht@mailoo.org, matti.lehtimaki@gmail.com, grosikop@quicinc.com Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue X-Mailer: b4 0.13-dev-83828 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 02 Nov 2023 04:43:18 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781452420013141844 X-GMAIL-MSGID: 1781452420013141844 Add a PHY configuration sequence for the sc8280xp which uses a Qualcomm Gen 2 version 1.1 CSI-2 PHY. The PHY can be configured as two phase or three phase in C-PHY or D-PHY mode. This configuration supports two-phase D-PHY mode. Signed-off-by: Bryan O'Donoghue --- .../platform/qcom/camss/camss-csiphy-3ph-1-0.c | 85 ++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c index f50e2235c37fc..2eb3531ffd00b 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c +++ b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c @@ -148,6 +148,91 @@ csiphy_reg_t lane_regs_sdm845[5][14] = { }, }; +/* GEN2 1.1 2PH */ +static const struct +csiphy_reg_t lane_regs_sc8280xp[5][14] = { + { + {0x0004, 0x0C, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x002C, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0034, 0x0F, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x001C, 0x0A, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0014, 0x60, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0028, 0x00, 0x00, CSIPHY_DNP_PARAMS}, + {0x003C, 0xB8, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0000, 0x90, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0008, 0x0E, 0x00, CSIPHY_SETTLE_CNT_LOWER_BYTE}, + {0x000c, 0x00, 0x00, CSIPHY_DNP_PARAMS}, + {0x0010, 0x52, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0038, 0xFE, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0060, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0064, 0x7F, 0x00, CSIPHY_DEFAULT_PARAMS}, + }, + { + {0x0704, 0x0C, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x072C, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0734, 0x0F, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x071C, 0x0A, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0714, 0x60, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0728, 0x04, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x073C, 0xB8, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0700, 0x80, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0708, 0x0E, 0x00, CSIPHY_SETTLE_CNT_LOWER_BYTE}, + {0x070C, 0xA5, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0710, 0x52, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0738, 0x1F, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0760, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0764, 0x7F, 0x00, CSIPHY_DEFAULT_PARAMS}, + }, + { + {0x0204, 0x0C, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x022C, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0234, 0x0F, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x021C, 0x0A, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0214, 0x60, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0228, 0x00, 0x00, CSIPHY_DNP_PARAMS}, + {0x023C, 0xB8, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0200, 0x90, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0208, 0x0E, 0x00, CSIPHY_SETTLE_CNT_LOWER_BYTE}, + {0x020C, 0x00, 0x00, CSIPHY_DNP_PARAMS}, + {0x0210, 0x52, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0238, 0xFE, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0260, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0264, 0x7F, 0x00, CSIPHY_DEFAULT_PARAMS}, + }, + { + {0x0404, 0x0C, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x042C, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0434, 0x0F, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x041C, 0x0A, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0414, 0x60, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0428, 0x00, 0x00, CSIPHY_DNP_PARAMS}, + {0x043C, 0xB8, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0400, 0x90, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0408, 0x0E, 0x00, CSIPHY_SETTLE_CNT_LOWER_BYTE}, + {0x040C, 0x00, 0x00, CSIPHY_DNP_PARAMS}, + {0x0410, 0x52, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0438, 0xFE, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0460, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0464, 0x7F, 0x00, CSIPHY_DEFAULT_PARAMS}, + }, + { + {0x0604, 0x0C, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x062C, 0x01, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0634, 0x0F, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x061C, 0x0A, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0614, 0x60, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0628, 0x00, 0x00, CSIPHY_DNP_PARAMS}, + {0x063C, 0xB8, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0600, 0x90, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0608, 0x0E, 0x00, CSIPHY_SETTLE_CNT_LOWER_BYTE}, + {0x060C, 0x00, 0x00, CSIPHY_DNP_PARAMS}, + {0x0610, 0x52, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0638, 0xFE, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0660, 0x00, 0x00, CSIPHY_DEFAULT_PARAMS}, + {0x0664, 0x7F, 0x00, CSIPHY_DEFAULT_PARAMS}, + }, +}; + /* GEN2 1.2.1 2PH */ static const struct csiphy_reg_t lane_regs_sm8250[5][20] = { From patchwork Thu Nov 2 11:41:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 160846 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp289133vqu; Thu, 2 Nov 2023 04:44:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGJ1UBLF37vXe2bsMGkh5aTV0FPjYRgb8iHbWIuqYBCIabNjBXRLlEO5Odb26Uk7NjdoO6r X-Received: by 2002:a05:6358:704:b0:168:dea8:8896 with SMTP id e4-20020a056358070400b00168dea88896mr20806181rwj.3.1698925452857; Thu, 02 Nov 2023 04:44:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698925452; cv=none; d=google.com; s=arc-20160816; b=Om/OJXxjRcxgTIK+0rRnXHg/ikqGrNbYCIrqtJ1+dRsmZkBcOcaYoZmZwv9YZuV2I8 lf9mLE0H9YD+K7dXchOqex3bhfrtCh+hzZpuZIsMv3o+izPKjKjpMttedru/EKVrp4D8 BnYNsVqhtB2nLnFt2Ic1WqmQ3j/IXG7kYS4m3C6CMP0cQfBLUiywz6GTQ0hmEZ4Fw3Ct pGa8vknRs2OYmfX+EpAiZhhj1/ljBm6FOz+bEntEURaLgO23yTK+BxgquH5GNauiaZbk YMGFuBrRlwCeYzlstpUWoi1HrqniJwGafbOXfbwU3d/XSZVvNi6/WICM3hFqufAgEmK2 Z5iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=x91L6v0kSDqfN/qnO2ofEPMA3FOEMKvoz3hZlW11E/M=; fh=FmtHVNfIh709uyJI8Krpj3bL6hTZZZt8AbAkITdrt7Y=; b=Qszfv9to0HKjEGPMeUjamPDk9WFHrNVhbBCQRMEd9wNQLZXPLKopuzXG4uTh3AXh9/ iO7B4X6jHYvtff5Tej6wWR0jmVvyPqRABV7U8gD3k59rgzZam6xjwf+eFoHfmrzzTMSY 1z+1V0Ko7htLx0ESlj1CaI42itj3jF07Xzy8wj1M/PwN6aUHwIKweV932pjAlURnnflE HunoataG+IGiojS+oBx5qZLUNRcocvwWG2YAV7QceiThivlVKeXBOfA2WEWsI1kp0Fo8 cWQ1N22zH7WPQURzQ3MBAB1eFHLIo+3htLHWjxUk8n/CbHMTA0k8Ya6OCtu146vCi0Gc 6bww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O4ReXCx3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id k62-20020a638441000000b00585a02550e1si1732451pgd.50.2023.11.02.04.44.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 04:44:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O4ReXCx3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 4E2FE80F64B4; Thu, 2 Nov 2023 04:43:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234182AbjKBLm3 (ORCPT + 36 others); Thu, 2 Nov 2023 07:42:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231713AbjKBLmU (ORCPT ); Thu, 2 Nov 2023 07:42:20 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75D261B2 for ; Thu, 2 Nov 2023 04:42:06 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2c594196344so11393111fa.3 for ; Thu, 02 Nov 2023 04:42:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698925324; x=1699530124; 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=x91L6v0kSDqfN/qnO2ofEPMA3FOEMKvoz3hZlW11E/M=; b=O4ReXCx3nSnOeD3FGsFtbjD1AJtR1vpoYqWF482XLg/e69/oAkGOIdkbFzmiJ+fkIQ DbmVdjmno2naLI3XqlhEbClwUtpD8c3P8KFNzor1jbzm1Q7Q6QpHYLlT4COPio6PVUIZ QHHRlayNiRrNkF8eHZCHCk4J2wZAkdGY7mCc36RWxpgXvPYBN+U0N/NYb4cj1pT8Pow1 yLl3jn+F/lGW+4nW9E6Z6/R61mBq231ZmLVsUY7rog46ZzJg/qut5v19WH6DntJt0Gu6 JvImzPXtJ5+EqmXBebmKIc35Ww7dNzZ3ekAcSB5P2AhZvD1C24woyAXfEmLt4gIKs3z+ BvGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698925324; x=1699530124; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x91L6v0kSDqfN/qnO2ofEPMA3FOEMKvoz3hZlW11E/M=; b=Ftazn+TF+o2dztoFgu440VDu9GxbdpEVm+4zHm9WhyknlMvmBKvAK0yclj5bwBYRfb vRPJBWUX3yqoC2+2+cYQeK5P+Kiuze6qoQQvpGBQHMaHfXE9NgLi8Cm96uREfeZkXqn5 +jZoTpvvcXsEQboEyIsu95A62tGR6bXoAYtQhauvjhsegzcOICwSccfQ9NkfFA4w1DO3 qdaZaCcluBh8i1AxellD1yV1asswsptjmCCQ9BJq0Gi9rPyY4nWSV86cwekRdY0+YjVj nfLtdMDLrwytDyE95fkYxheqD6lr67xRPsDDFp4RBCL54+Aa4rmWvz/MIxfZwg+J3XCw CQ5g== X-Gm-Message-State: AOJu0YzHEL44Qve3ZyhDr4dxROJ1vdnUKdXnoM286qHtIENlWQltHUoe KeZHegQmGtpxDHGj9vco/6FshQ== X-Received: by 2002:a2e:3c12:0:b0:2c5:1542:57e9 with SMTP id j18-20020a2e3c12000000b002c5154257e9mr15062900lja.41.1698925324607; Thu, 02 Nov 2023 04:42:04 -0700 (PDT) Received: from [127.0.0.1] ([37.228.218.3]) by smtp.gmail.com with ESMTPSA id j41-20020a05600c1c2900b004060f0a0fdbsm2717720wms.41.2023.11.02.04.42.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 04:42:04 -0700 (PDT) From: Bryan O'Donoghue Date: Thu, 02 Nov 2023 11:41:57 +0000 Subject: [PATCH 4/6] media: qcom: camss: Add sc8280xp resource details MIME-Version: 1.0 Message-Id: <20231102-b4-camss-sc8280xp-v1-4-9996f4bcb8f4@linaro.org> References: <20231102-b4-camss-sc8280xp-v1-0-9996f4bcb8f4@linaro.org> In-Reply-To: <20231102-b4-camss-sc8280xp-v1-0-9996f4bcb8f4@linaro.org> To: hverkuil-cisco@xs4all.nl, laurent.pinchart@ideasonboard.com, Andy Gross , Bjorn Andersson , Konrad Dybcio , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , vincent.knecht@mailoo.org, matti.lehtimaki@gmail.com, grosikop@quicinc.com Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue X-Mailer: b4 0.13-dev-83828 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 02 Nov 2023 04:43:49 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781452455704349611 X-GMAIL-MSGID: 1781452455704349611 This commit describes the hardware layout for the sc8280xp for the following hardware blocks: - 4 x VFE, 4 RDI per VFE - 4 x VFE Lite, 4 RDI per VFE - 4 x CSID - 4 x CSID Lite - 4 x CSI PHY Signed-off-by: Bryan O'Donoghue --- drivers/media/platform/qcom/camss/camss.c | 376 ++++++++++++++++++++++++++++++ 1 file changed, 376 insertions(+) diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c index d9304e060666a..258ff85aad387 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -935,6 +935,366 @@ static const struct resources_icc icc_res_sm8250[] = { }, }; +static const struct camss_subdev_resources csiphy_res_sc8280xp[] = { + /* CSIPHY0 */ + { + .regulators = {}, + .clock = { "csiphy0", "csiphy0_timer" }, + .clock_rate = { { 400000000 }, + { 300000000 } }, + .reg = { "csiphy0" }, + .interrupt = { "csiphy0" }, + .ops = &csiphy_ops_3ph_1_0 + }, + /* CSIPHY1 */ + { + .regulators = {}, + .clock = { "csiphy1", "csiphy1_timer" }, + .clock_rate = { { 400000000 }, + { 300000000 } }, + .reg = { "csiphy1" }, + .interrupt = { "csiphy1" }, + .ops = &csiphy_ops_3ph_1_0 + }, + /* CSIPHY2 */ + { + .regulators = {}, + .clock = { "csiphy2", "csiphy2_timer" }, + .clock_rate = { { 400000000 }, + { 300000000 } }, + .reg = { "csiphy2" }, + .interrupt = { "csiphy2" }, + .ops = &csiphy_ops_3ph_1_0 + }, + /* CSIPHY3 */ + { + .regulators = {}, + .clock = { "csiphy3", "csiphy3_timer" }, + .clock_rate = { { 400000000 }, + { 300000000 } }, + .reg = { "csiphy3" }, + .interrupt = { "csiphy3" }, + .ops = &csiphy_ops_3ph_1_0 + }, +}; + +static const struct camss_subdev_resources csid_res_sc8280xp[] = { + /* CSID0 */ + { + .regulators = { "vdda-phy", "vdda-pll" }, + .clock = { "vfe0_csid_src", "vfe0_csid", "cphy_rx_src", + "vfe0_cphy_rx", "vfe0_src", "vfe0", "vfe0_axi" }, + .clock_rate = { { 400000000, 400000000, 480000000, 600000000, 600000000, 600000000 }, + { 0 }, + { 0 }, + { 0 }, + { 0 }, + { 0 }, + { 0 } }, + .reg = { "csid0" }, + .interrupt = { "csid0" }, + .ops = &csid_ops_gen2 + }, + /* CSID1 */ + { + .regulators = { "vdda-phy", "vdda-pll" }, + .clock = { "vfe1_csid_src", "vfe1_csid", "cphy_rx_src", + "vfe1_cphy_rx", "vfe1_src", "vfe1", "vfe1_axi" }, + .clock_rate = { { 400000000, 400000000, 480000000, 600000000, 600000000, 600000000 }, + { 0 }, + { 0 }, + { 0 }, + { 0 }, + { 0 }, + { 0 } }, + .reg = { "csid1" }, + .interrupt = { "csid1" }, + .ops = &csid_ops_gen2 + }, + /* CSID2 */ + { + .regulators = { "vdda-phy", "vdda-pll" }, + .clock = { "vfe2_csid_src", "vfe2_csid", "cphy_rx_src", + "vfe2_cphy_rx", "vfe2_src", "vfe2", "vfe2_axi" }, + .clock_rate = { { 400000000, 400000000, 480000000, 600000000, 600000000, 600000000 }, + { 0 }, + { 0 }, + { 0 }, + { 0 }, + { 0 }, + { 0 } }, + .reg = { "csid2" }, + .interrupt = { "csid2" }, + .ops = &csid_ops_gen2 + }, + /* CSID3 */ + { + .regulators = { "vdda-phy", "vdda-pll" }, + .clock = { "vfe3_csid_src", "vfe3_csid", "cphy_rx_src", + "vfe3_cphy_rx", "vfe3_src", "vfe3", "vfe3_axi" }, + .clock_rate = { { 400000000, 400000000, 480000000, 600000000, 600000000, 600000000 }, + { 0 }, + { 0 }, + { 0 }, + { 0 }, + { 0 }, + { 0 } }, + .reg = { "csid3" }, + .interrupt = { "csid3" }, + .ops = &csid_ops_gen2 + }, + /* CSID_LITE0 */ + { + .regulators = { "vdda-phy", "vdda-pll" }, + .clock = { "vfe_lite0_csid_src", "vfe_lite0_csid", + "cphy_rx_src", "vfe_lite0_cphy_rx", "vfe_lite0_src", + "vfe_lite0" }, + .clock_rate = { { 400000000, 400000000, 480000000, 600000000, 600000000, 600000000 }, + { 0 }, + { 0 }, + { 0 }, + { 0 }, + { 0 }, }, + .reg = { "csid0_lite" }, + .interrupt = { "csid0_lite" }, + .ops = &csid_ops_gen2 + }, + /* CSID_LITE1 */ + { + .regulators = { "vdda-phy", "vdda-pll" }, + .clock = { "vfe_lite1_csid_src", "vfe_lite1_csid", + "cphy_rx_src", "vfe_lite1_cphy_rx", "vfe_lite1_src", + "vfe_lite1" }, + .clock_rate = { { 400000000, 400000000, 480000000, 600000000, 600000000, 600000000 }, + { 0 }, + { 0 }, + { 0 }, + { 0 }, + { 0 }, }, + .reg = { "csid1_lite" }, + .interrupt = { "csid1_lite" }, + .ops = &csid_ops_gen2 + }, + /* CSID_LITE2 */ + { + .regulators = { "vdda-phy", "vdda-pll" }, + .clock = { "vfe_lite2_csid_src", "vfe_lite2_csid", + "cphy_rx_src", "vfe_lite2_cphy_rx", "vfe_lite2_src", + "vfe_lite2" }, + .clock_rate = { { 400000000, 400000000, 480000000, 600000000, 600000000, 600000000 }, + { 0 }, + { 0 }, + { 0 }, + { 0 }, + { 0 }, }, + .reg = { "csid2_lite" }, + .interrupt = { "csid2_lite" }, + .ops = &csid_ops_gen2 + }, + /* CSID_LITE3 */ + { + .regulators = { "vdda-phy", "vdda-pll" }, + .clock = { "vfe_lite3_csid_src", "vfe_lite3_csid", + "cphy_rx_src", "vfe_lite3_cphy_rx", "vfe_lite3_src", + "vfe_lite3" }, + .clock_rate = { { 400000000, 400000000, 480000000, 600000000, 600000000, 600000000 }, + { 0 }, + { 0 }, + { 0 }, + { 0 }, + { 0 }, }, + .reg = { "csid3_lite" }, + .interrupt = { "csid3_lite" }, + .ops = &csid_ops_gen2 + } +}; + +static const struct camss_subdev_resources vfe_res_sc8280xp[] = { + /* IFE0 */ + { + .regulators = {}, + .clock = { "gcc_axi_hf", "gcc_axi_sf", "slow_ahb_src", + "cpas_ahb", "camnoc_axi", "camnoc_axi_src", + "vfe0_src", "vfe0", "vfe0_axi" }, + .clock_rate = { { 0 }, + { 0 }, + { 19200000, 80000000, 80000000, 80000000, 80000000}, + { 80000000 }, + { 0 }, + { 19200000, 150000000, 266666667, 320000000, 400000000, 480000000 }, + { 0 }, + { 400000000, 558000000, 637000000, 760000000 }, + { 0 }, }, + .reg = { "vfe0" }, + .interrupt = { "vfe0" }, + .pd_name = "ife0", + .line_num = 4, + .ops = &vfe_ops_170 + }, + /* IFE1 */ + { + .regulators = {}, + .clock = { "gcc_axi_hf", "gcc_axi_sf", "slow_ahb_src", + "cpas_ahb", "camnoc_axi", "camnoc_axi_src", + "vfe1_src", "vfe1", "vfe1_axi" }, + .clock_rate = { { 0 }, + { 0 }, + { 19200000, 80000000, 80000000, 80000000, 80000000}, + { 80000000 }, + { 0 }, + { 19200000, 150000000, 266666667, 320000000, 400000000, 480000000 }, + { 0 }, + { 400000000, 558000000, 637000000, 760000000 }, + { 0 }, }, + .reg = { "vfe1" }, + .interrupt = { "vfe1" }, + .pd_name = "ife1", + .line_num = 4, + .ops = &vfe_ops_170 + }, + /* IFE2 */ + { + .regulators = {}, + .clock = { "gcc_axi_hf", "gcc_axi_sf", "slow_ahb_src", + "cpas_ahb", "camnoc_axi", "camnoc_axi_src", + "vfe2_src", "vfe2", "vfe2_axi" }, + .clock_rate = { { 0 }, + { 0 }, + { 19200000, 80000000, 80000000, 80000000, 80000000}, + { 80000000 }, + { 0 }, + { 19200000, 150000000, 266666667, 320000000, 400000000, 480000000 }, + { 0 }, + { 400000000, 558000000, 637000000, 760000000 }, + { 0 }, }, + .reg = { "vfe2" }, + .interrupt = { "vfe2" }, + .pd_name = "ife2", + .line_num = 4, + .ops = &vfe_ops_170 + }, + /* VFE3 */ + { + .regulators = {}, + .clock = { "gcc_axi_hf", "gcc_axi_sf", "slow_ahb_src", + "cpas_ahb", "camnoc_axi", "camnoc_axi_src", + "vfe3_src", "vfe3", "vfe3_axi" }, + .clock_rate = { { 0 }, + { 0 }, + { 19200000, 80000000, 80000000, 80000000, 80000000}, + { 80000000 }, + { 0 }, + { 19200000, 150000000, 266666667, 320000000, 400000000, 480000000 }, + { 0 }, + { 400000000, 558000000, 637000000, 760000000 }, + { 0 }, }, + .reg = { "vfe3" }, + .interrupt = { "vfe3" }, + .pd_name = "ife3", + .line_num = 4, + .ops = &vfe_ops_170 + }, + /* IFE_LITE_0 */ + { + .regulators = {}, + .clock = { "gcc_axi_hf", "gcc_axi_sf", "slow_ahb_src", + "cpas_ahb", "camnoc_axi", "camnoc_axi_src", + "vfe_lite0_src", "vfe_lite0" }, + .clock_rate = { { 0 }, + { 0 }, + { 19200000, 80000000, 80000000, 80000000, 80000000}, + { 80000000 }, + { 0 }, + { 19200000, 150000000, 266666667, 320000000, 400000000, 480000000 }, + { 0 }, + { 320000000, 400000000, 480000000, 600000000 }, }, + .reg = { "vfe_lite0" }, + .interrupt = { "vfe_lite0" }, + .line_num = 4, + .ops = &vfe_ops_170 + }, + /* IFE_LITE_1 */ + { + .regulators = {}, + .clock = { "gcc_axi_hf", "gcc_axi_sf", "slow_ahb_src", + "cpas_ahb", "camnoc_axi", "camnoc_axi_src", + "vfe_lite1_src", "vfe_lite1" }, + .clock_rate = { { 0 }, + { 0 }, + { 19200000, 80000000, 80000000, 80000000, 80000000}, + { 80000000 }, + { 0 }, + { 19200000, 150000000, 266666667, 320000000, 400000000, 480000000 }, + { 0 }, + { 320000000, 400000000, 480000000, 600000000 }, }, + .reg = { "vfe_lite1" }, + .interrupt = { "vfe_lite1" }, + .line_num = 4, + .ops = &vfe_ops_170 + }, + /* IFE_LITE_2 */ + { + .regulators = {}, + .clock = { "gcc_axi_hf", "gcc_axi_sf", "slow_ahb_src", + "cpas_ahb", "camnoc_axi", "camnoc_axi_src", + "vfe_lite2_src", "vfe_lite2" }, + .clock_rate = { { 0 }, + { 0 }, + { 19200000, 80000000, 80000000, 80000000, 80000000}, + { 80000000 }, + { 0 }, + { 19200000, 150000000, 266666667, 320000000, 400000000, 480000000 }, + { 0 }, + { 320000000, 400000000, 480000000, 600000000, }, }, + .reg = { "vfe_lite2" }, + .interrupt = { "vfe_lite2" }, + .line_num = 4, + .ops = &vfe_ops_170 + }, + /* VFE_LITE_3 */ + { + .regulators = {}, + .clock = { "gcc_axi_hf", "gcc_axi_sf", "slow_ahb_src", + "cpas_ahb", "camnoc_axi", "camnoc_axi_src", + "vfe_lite3_src", "vfe_lite3" }, + .clock_rate = { { 0 }, + { 0 }, + { 19200000, 80000000, 80000000, 80000000, 80000000}, + { 80000000 }, + { 0 }, + { 19200000, 150000000, 266666667, 320000000, 400000000, 480000000 }, + { 0 }, + { 320000000, 400000000, 480000000, 600000000 }, }, + .reg = { "vfe_lite3" }, + .interrupt = { "vfe_lite3" }, + .line_num = 4, + .ops = &vfe_ops_170 + }, +}; + +static const struct resources_icc icc_res_sc8280xp[] = { + { + .name = "cam_ahb", + .icc_bw_tbl.avg = 150000, + .icc_bw_tbl.peak = 300000, + }, + { + .name = "cam_hf_mnoc", + .icc_bw_tbl.avg = 2097152, + .icc_bw_tbl.peak = 2097152, + }, + { + .name = "cam_sf_mnoc", + .icc_bw_tbl.avg = 2097152, + .icc_bw_tbl.peak = 2097152, + }, + { + .name = "cam_sf_icp_mnoc", + .icc_bw_tbl.avg = 2097152, + .icc_bw_tbl.peak = 2097152, + }, +}; + /* * camss_add_clock_margin - Add margin to clock frequency rate * @rate: Clock frequency rate @@ -1812,12 +2172,28 @@ static const struct camss_resources sm8250_resources = { .vfe_lite_num = 2, }; +static const struct camss_resources sc8280xp_resources = { + .version = CAMSS_8280XP, + .pd_name = "top", + .csiphy_res = csiphy_res_sc8280xp, + .csid_res = csid_res_sc8280xp, + .ispif_res = NULL, + .vfe_res = vfe_res_sc8280xp, + .icc_res = icc_res_sc8280xp, + .icc_path_num = ARRAY_SIZE(icc_res_sc8280xp), + .csiphy_num = ARRAY_SIZE(csiphy_res_sc8280xp), + .csid_num = ARRAY_SIZE(csid_res_sc8280xp), + .vfe_num = 4, + .vfe_lite_num = 4, +}; + static const struct of_device_id camss_dt_match[] = { { .compatible = "qcom,msm8916-camss", .data = &msm8916_resources }, { .compatible = "qcom,msm8996-camss", .data = &msm8996_resources }, { .compatible = "qcom,sdm660-camss", .data = &sdm660_resources }, { .compatible = "qcom,sdm845-camss", .data = &sdm845_resources }, { .compatible = "qcom,sm8250-camss", .data = &sm8250_resources }, + { .compatible = "qcom,sc8280xp-camss", .data = &sc8280xp_resources }, { } }; From patchwork Thu Nov 2 11:41:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 160842 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp288425vqu; Thu, 2 Nov 2023 04:42:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHq4K4GM41ZrNyU04am1gNa/XAz+zJmn0haojWNlWOgzrwfvwAI7cO7BiVvov/boNyHUy6i X-Received: by 2002:a17:902:c40a:b0:1bc:5924:2da2 with SMTP id k10-20020a170902c40a00b001bc59242da2mr19046293plk.56.1698925372026; Thu, 02 Nov 2023 04:42:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698925372; cv=none; d=google.com; s=arc-20160816; b=zhBRh6YBiZ/ti5h1RY4PDfjVAZMLLqZ/1me7/1k6GiriPTKywi4taukUoinoFGHIgn MOjHTqJ3GFoMSFV0RzPHxKBjF1JrLTqZuRsujrvaT8ZIExzt9Q049SsTcPrugMjpJaIw rfyngb3B51ztf5aQ3P5361aIhDh1Ku/A/NAUi+HUDSxGfF7aP7iAfAeRESe3fln5180n AeeMBFtsbt6wuzUlo+uwr8k/ND1vXafC9HMjBa9u0EJvqIMyw2+c1fQCXX/uUCAE1u7i +bPwM+juS+CJOnxSvcbseEIGZ1Uxk45hh9Tb2unFrsbVgR0VoL5UtusYvljgPA49HS6V cHbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=J2RhplBofc8NqMEamcsv9xMPLZ4A+9VDYOCaYBLUCUw=; fh=FmtHVNfIh709uyJI8Krpj3bL6hTZZZt8AbAkITdrt7Y=; b=RNhBZT8c+MJId3+YKfu8J0TWxv/iHP/1D0RVFOonXI3XYzULUSq+JXmCqw5vRJiNBo 0FGy19rDxEdgsq+oPtxVlyzzQvCOv9cV9kf9tNFC+sR8HztuSggp3G//yRdgh3LTVyYm nYNXNPVSE0P8SRUIBqgkOjkTllzbvd/aJkyI6XsNNpUaOEZ+W8W7Tu+uiDVloS3zLBIi t36wVinJgAyb6x0obWpAVW7fEw8iFaf5G09j4rBQS9peArJrHnYw/Gl1HRx4cpPXJEtC lzNSCDQJ+4iHm8T1Azwlmk1J/Wj0UA91hve6UO3zAJRi/Y6r7/4xeB8tCaLUaezEgVkS wy4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NPNncCoq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id i13-20020a170902eb4d00b001c9f6df8a7csi4787345pli.531.2023.11.02.04.42.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 04:42:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NPNncCoq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 2560682164F0; Thu, 2 Nov 2023 04:42:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343592AbjKBLmf (ORCPT + 36 others); Thu, 2 Nov 2023 07:42:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232578AbjKBLmU (ORCPT ); Thu, 2 Nov 2023 07:42:20 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 199F319D for ; Thu, 2 Nov 2023 04:42:08 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2c50d1b9f22so11160901fa.0 for ; Thu, 02 Nov 2023 04:42:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698925326; x=1699530126; 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=J2RhplBofc8NqMEamcsv9xMPLZ4A+9VDYOCaYBLUCUw=; b=NPNncCoqagWUhMa8nCeSvZhxEO7ioUZZzJ3wxCoz/ZD5V6qflCs2vKdRYKia1CjXiH kFnZitKDaEtKnSkxOY+Jm+f+VCGORlPyIgfHgfXtaP+sJa6hSE+0K/IKx9MiqUdMuqj/ G3rMbTKY7Gf4ox7Tf/tq/KlEIL2xeXKXP2HRSdQeCOT0BWLVwMRi6fGxbb6+YYh6aUq7 iBSJ+/byKGyebnbcmEi8Qj2I4B7ogdm9KwmDjI2o7hr6mndRdt72pDKM2lFr4Ebok94o CUhuGkkg5DIyVXXMVh6uYRSKSPBBrLxrTSg2/nqWMG6gEh4XKJ8EXw8eGzTzA1TsWzSG uuQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698925326; x=1699530126; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J2RhplBofc8NqMEamcsv9xMPLZ4A+9VDYOCaYBLUCUw=; b=bj8cxyEX4jt9y82GhPGZpOsNXo6fWclar9oG7uU/Wqj1CwuR6LP72axkp9Wul4UKHZ oUSI7716KWPR/8jocT5waijqAL912QY6Ib4uFwBAtuNOrU3M7ne/2j/SEXiXxeXLbC/Q SNsPDpdrIR/P2ZwGPr0X1VXSplrr5iyRtwBCnCt8M7HSDWoNczV35es52uCagqTzjDKF IrBAImq3gfOYMtAuGf9V7385Xt208dkXWQH0n60zFTSVP/6U5jw3uA3xZBE3B9k+E/60 LMHSCjr2PMAR3iUHpjSsHx+rESy5Bn7K0IBWx0+ytQjrgt4DWQfoG0x3aqnk1qGUmKjO IGZw== X-Gm-Message-State: AOJu0YyEN6WUg8IFeyIqvuU41k+uSBWhyIsOZEfgBY+YOoQOc98TPywB qzmBoI3smZBQ3rXctbCeWe7WYQ== X-Received: by 2002:a2e:b748:0:b0:2c5:1ca8:d433 with SMTP id k8-20020a2eb748000000b002c51ca8d433mr13334960ljo.36.1698925325906; Thu, 02 Nov 2023 04:42:05 -0700 (PDT) Received: from [127.0.0.1] ([37.228.218.3]) by smtp.gmail.com with ESMTPSA id j41-20020a05600c1c2900b004060f0a0fdbsm2717720wms.41.2023.11.02.04.42.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 04:42:05 -0700 (PDT) From: Bryan O'Donoghue Date: Thu, 02 Nov 2023 11:41:58 +0000 Subject: [PATCH 5/6] media: qcom: camss: Add sc8280xp support MIME-Version: 1.0 Message-Id: <20231102-b4-camss-sc8280xp-v1-5-9996f4bcb8f4@linaro.org> References: <20231102-b4-camss-sc8280xp-v1-0-9996f4bcb8f4@linaro.org> In-Reply-To: <20231102-b4-camss-sc8280xp-v1-0-9996f4bcb8f4@linaro.org> To: hverkuil-cisco@xs4all.nl, laurent.pinchart@ideasonboard.com, Andy Gross , Bjorn Andersson , Konrad Dybcio , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , vincent.knecht@mailoo.org, matti.lehtimaki@gmail.com, grosikop@quicinc.com Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue X-Mailer: b4 0.13-dev-83828 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 02 Nov 2023 04:42:51 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781452331133299152 X-GMAIL-MSGID: 1781452371049419386 Add in functional logic throughout the code to support the sc8280xp. Signed-off-by: Bryan O'Donoghue --- .../platform/qcom/camss/camss-csiphy-3ph-1-0.c | 23 +++++++++++++++++--- drivers/media/platform/qcom/camss/camss-csiphy.c | 1 + drivers/media/platform/qcom/camss/camss-vfe.c | 25 +++++++++++++++++----- drivers/media/platform/qcom/camss/camss-video.c | 1 + 4 files changed, 42 insertions(+), 8 deletions(-) diff --git a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c index 2eb3531ffd00b..2810d0fa06c13 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c +++ b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c @@ -513,6 +513,10 @@ static void csiphy_gen2_config_lanes(struct csiphy_device *csiphy, r = &lane_regs_sm8250[0][0]; array_size = ARRAY_SIZE(lane_regs_sm8250[0]); break; + case CAMSS_8280XP: + r = &lane_regs_sc8280xp[0][0]; + array_size = ARRAY_SIZE(lane_regs_sc8280xp[0]); + break; default: WARN(1, "unknown cspi version\n"); return; @@ -548,13 +552,26 @@ static u8 csiphy_get_lane_mask(struct csiphy_lanes_cfg *lane_cfg) return lane_mask; } +static bool csiphy_is_gen2(u32 version) +{ + bool ret = false; + + switch (version) { + case CAMSS_845: + case CAMSS_8250: + case CAMSS_8280XP: + ret = true; + break; + } + + return ret; +} + static void csiphy_lanes_enable(struct csiphy_device *csiphy, struct csiphy_config *cfg, s64 link_freq, u8 lane_mask) { struct csiphy_lanes_cfg *c = &cfg->csi2->lane_cfg; - bool is_gen2 = (csiphy->camss->res->version == CAMSS_845 || - csiphy->camss->res->version == CAMSS_8250); u8 settle_cnt; u8 val; int i; @@ -576,7 +593,7 @@ static void csiphy_lanes_enable(struct csiphy_device *csiphy, val = 0x00; writel_relaxed(val, csiphy->base + CSIPHY_3PH_CMN_CSI_COMMON_CTRLn(0)); - if (is_gen2) + if (csiphy_is_gen2(csiphy->camss->res->version)) csiphy_gen2_config_lanes(csiphy, settle_cnt); else csiphy_gen1_config_lanes(csiphy, cfg, settle_cnt); diff --git a/drivers/media/platform/qcom/camss/camss-csiphy.c b/drivers/media/platform/qcom/camss/camss-csiphy.c index edd573606a6ae..8241acf789865 100644 --- a/drivers/media/platform/qcom/camss/camss-csiphy.c +++ b/drivers/media/platform/qcom/camss/camss-csiphy.c @@ -579,6 +579,7 @@ int msm_csiphy_subdev_init(struct camss *camss, break; case CAMSS_845: case CAMSS_8250: + case CAMSS_8280XP: csiphy->formats = csiphy_formats_sdm845; csiphy->nformats = ARRAY_SIZE(csiphy_formats_sdm845); break; diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c index 123e5ead7602d..21812d40716f4 100644 --- a/drivers/media/platform/qcom/camss/camss-vfe.c +++ b/drivers/media/platform/qcom/camss/camss-vfe.c @@ -225,6 +225,7 @@ static u32 vfe_src_pad_code(struct vfe_line *line, u32 sink_code, case CAMSS_660: case CAMSS_845: case CAMSS_8250: + case CAMSS_8280XP: switch (sink_code) { case MEDIA_BUS_FMT_YUYV8_1X16: { @@ -1522,6 +1523,7 @@ int msm_vfe_subdev_init(struct camss *camss, struct vfe_device *vfe, break; case CAMSS_845: case CAMSS_8250: + case CAMSS_8280XP: l->formats = formats_rdi_845; l->nformats = ARRAY_SIZE(formats_rdi_845); break; @@ -1600,6 +1602,23 @@ static const struct media_entity_operations vfe_media_ops = { .link_validate = v4l2_subdev_link_validate, }; +static int vfe_bpl_align(struct vfe_device *vfe) +{ + int ret = 8; + + switch (vfe->camss->res->version) { + case CAMSS_845: + case CAMSS_8250: + case CAMSS_8280XP: + ret = 16; + break; + default: + break; + } + + return ret; +} + /* * msm_vfe_register_entities - Register subdev node for VFE module * @vfe: VFE device @@ -1666,11 +1685,7 @@ int msm_vfe_register_entities(struct vfe_device *vfe, } video_out->ops = &vfe->video_ops; - if (vfe->camss->res->version == CAMSS_845 || - vfe->camss->res->version == CAMSS_8250) - video_out->bpl_alignment = 16; - else - video_out->bpl_alignment = 8; + video_out->bpl_alignment = vfe_bpl_align(vfe); video_out->line_based = 0; if (i == VFE_LINE_PIX) { video_out->bpl_alignment = 16; diff --git a/drivers/media/platform/qcom/camss/camss-video.c b/drivers/media/platform/qcom/camss/camss-video.c index a89da5ef47109..54cd82f741154 100644 --- a/drivers/media/platform/qcom/camss/camss-video.c +++ b/drivers/media/platform/qcom/camss/camss-video.c @@ -1028,6 +1028,7 @@ int msm_video_register(struct camss_video *video, struct v4l2_device *v4l2_dev, break; case CAMSS_845: case CAMSS_8250: + case CAMSS_8280XP: video->formats = formats_rdi_845; video->nformats = ARRAY_SIZE(formats_rdi_845); break; From patchwork Thu Nov 2 11:41:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 160847 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp289173vqu; Thu, 2 Nov 2023 04:44:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHKcrHke7JQjH0jdwC1QS0x7c4OhHNs9CLXGn0IPtIgjBwZB3iSVsbKYsKubXxGy1rP6AI4 X-Received: by 2002:a05:6a20:734c:b0:17e:70fa:3f3c with SMTP id v12-20020a056a20734c00b0017e70fa3f3cmr22066656pzc.57.1698925456391; Thu, 02 Nov 2023 04:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698925456; cv=none; d=google.com; s=arc-20160816; b=vnj9uLjtTZcmZaeIn5AC2EKu7upafFhKKhSI9A5t5yo4pVR7G9ugrI4/aHZfOcVXFx vRYnT9ll8WrywWYaLMu0dfVzt+LpMyT71OthRa7qjbpNs+svEM1dLLl1+bDlwDI5uETe JBu1UcMWsOAGinPpGcsRAN8JKtrGXbpa301ictuvthCAuYgc6RGcY84+BE+UKjIhCm7L 3ZYVF4wxseJdV0fk909QFHLjrESV1aM/4YwMLxOoZN8t5WNrqkmwetzyUaj1pYw3OcXj mLe3Pgg445ttGWRL7kQAGhHSwyBQuqgkez0VIZi/4Fq+i207Pu8j0Rks2pjkAvw/z/jO 1Aag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=s8dxEzYVSeFJZ3l8QowPz73oS6HbY0588zpxHkYzDJg=; fh=FmtHVNfIh709uyJI8Krpj3bL6hTZZZt8AbAkITdrt7Y=; b=RTCC0mtCxfQozPCkF5/daH4zrjUx5+VNz+zCdn6roFNXngjlvB9C0lhp9ozvOB7mpu 6YUKDZ3V21fXsyUpGtB5FuNzDF4YgG+qtO4QPBsq3p/rXKUgzLh5r23bVglzoETSwxe1 lV0kIumAORT7d2iDmye6lgGgYM4EWRnd1BJUE8g6mclCQFoBPN7Xhc8grCWlVMLbpbZZ h+sATN0SDdWA0nvFSMdZ109+/UBTm7GFnDoJQiqiYwLssoXNhG+GzRrKplbAeqAGkK2M sCrROgn/hpA/4UFIBX3osRapwYQ5HdDVlgrDjqFaO1BzdznqVQism5KEUQ4v5s0Erxsr US4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lwZ2wSuk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id g2-20020a170902e38200b001ca67f26f5esi4604146ple.283.2023.11.02.04.44.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 04:44:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lwZ2wSuk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 65BDA80290C9; Thu, 2 Nov 2023 04:43:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231192AbjKBLmj (ORCPT + 36 others); Thu, 2 Nov 2023 07:42:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232720AbjKBLmU (ORCPT ); Thu, 2 Nov 2023 07:42:20 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECC3D186 for ; Thu, 2 Nov 2023 04:42:08 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2c518a1d83fso10997311fa.3 for ; Thu, 02 Nov 2023 04:42:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698925327; x=1699530127; 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=s8dxEzYVSeFJZ3l8QowPz73oS6HbY0588zpxHkYzDJg=; b=lwZ2wSukMRBt/CLG/aWjyFNeWERxJerHRKZYwihDEsEfpaygbKp/n22F6n+9U+w3Q1 rhJaTFpw3C3FcD+jBbntZXVVGnDRxfY+4dmY3X//nODWK2+mRGshIS65rQnyszQF99Zu fcfIiW0O5/hs2xCgtk8lokdctNe1tXEVK0fAM/vmKr7p11PIPW4Z4k/TuhGEHCjB2DPu xhtnBlLHdMsl1ajV1GJGn0HUIFdsJ/vrKDop8TZ6483IOxl2URHz2numKP4rCWXXjGAD R7HMtzyxhDyOpOWefwnm1myc+l7tKXzY/QkuTCfIoDNJ1opn2c2+QWQtWgMRCMylwckH WUIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698925327; x=1699530127; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=s8dxEzYVSeFJZ3l8QowPz73oS6HbY0588zpxHkYzDJg=; b=iXb5udoL9+bbxXuK5xajgeS44xQKm3N4hS0AQFGujHJtP0kGVgWCfHyyxwXdDQDGcd pF1ERZboSZ7XH7ZuUYeMoGQXkv2nPraKiXYTLICkm5CcKH64zFFOqrQTi3Qtc+0imNeY xVcJNboaw0LVHa0QMHM1pHoY0+bcl49RziIm0cTZ603wVzxICh1ctAnFT7GmSUIvB6J6 d6ENvRQi6D6HN1aAQYLdUNNYjjq+T++VC/bVZ8HlbCfEJ+J2uPRFcffya2v1iLQjKJLI JvW5m83JzmKkXp+4pcJjZMbj+elkYoQn1u9umPzOXSUxyb0LTsHc7BFHRCKgXolvtagk lueQ== X-Gm-Message-State: AOJu0YwAjvZibxekfZDFI7B7RoIjsaSmuhXA6+xo257iTNPye8mJLuoS smAZLBFVTlw8XeCY9eY/Rfza3g== X-Received: by 2002:a2e:494a:0:b0:2c5:1a89:41c0 with SMTP id b10-20020a2e494a000000b002c51a8941c0mr12903032ljd.23.1698925327124; Thu, 02 Nov 2023 04:42:07 -0700 (PDT) Received: from [127.0.0.1] ([37.228.218.3]) by smtp.gmail.com with ESMTPSA id j41-20020a05600c1c2900b004060f0a0fdbsm2717720wms.41.2023.11.02.04.42.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 04:42:06 -0700 (PDT) From: Bryan O'Donoghue Date: Thu, 02 Nov 2023 11:41:59 +0000 Subject: [PATCH 6/6] media: qcom: camss: vfe-17x: Rename camss-vfe-170 to camss-vfe-17x MIME-Version: 1.0 Message-Id: <20231102-b4-camss-sc8280xp-v1-6-9996f4bcb8f4@linaro.org> References: <20231102-b4-camss-sc8280xp-v1-0-9996f4bcb8f4@linaro.org> In-Reply-To: <20231102-b4-camss-sc8280xp-v1-0-9996f4bcb8f4@linaro.org> To: hverkuil-cisco@xs4all.nl, laurent.pinchart@ideasonboard.com, Andy Gross , Bjorn Andersson , Konrad Dybcio , Robert Foss , Todor Tomov , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , vincent.knecht@mailoo.org, matti.lehtimaki@gmail.com, grosikop@quicinc.com Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue X-Mailer: b4 0.13-dev-83828 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 02 Nov 2023 04:43:51 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781452459320507871 X-GMAIL-MSGID: 1781452459320507871 vfe-170 and vfe-175 can be supported in the same file with some minimal indirection to differentiate between the silicon versions. Signed-off-by: Bryan O'Donoghue --- drivers/media/platform/qcom/camss/Makefile | 2 +- drivers/media/platform/qcom/camss/{camss-vfe-170.c => camss-vfe-17x.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/camss/Makefile b/drivers/media/platform/qcom/camss/Makefile index 4e22223589739..0d4389ab312d1 100644 --- a/drivers/media/platform/qcom/camss/Makefile +++ b/drivers/media/platform/qcom/camss/Makefile @@ -14,7 +14,7 @@ qcom-camss-objs += \ camss-vfe-4-1.o \ camss-vfe-4-7.o \ camss-vfe-4-8.o \ - camss-vfe-170.o \ + camss-vfe-17x.o \ camss-vfe-480.o \ camss-vfe-gen1.o \ camss-vfe.o \ diff --git a/drivers/media/platform/qcom/camss/camss-vfe-170.c b/drivers/media/platform/qcom/camss/camss-vfe-17x.c similarity index 100% rename from drivers/media/platform/qcom/camss/camss-vfe-170.c rename to drivers/media/platform/qcom/camss/camss-vfe-17x.c