From patchwork Fri Nov 3 16:25:04 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: 161367 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1160941vqu; Fri, 3 Nov 2023 09:27:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH9Boyx3qclT6eR2jSKBWZocjwiCA+EL/BLjwWw7cXXPvvzuklsoGpFijXEn/S3zRrTtAtX X-Received: by 2002:a17:903:1104:b0:1c9:dfb8:a5a0 with SMTP id n4-20020a170903110400b001c9dfb8a5a0mr26158280plh.10.1699028852652; Fri, 03 Nov 2023 09:27:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699028852; cv=none; d=google.com; s=arc-20160816; b=EEa46UX+ITEFxlPY/afQTyZb6AoZNC3mGCNq64J3vyWErQB7S2cvMLcDJVdSlmcZ8L wVKjodk+achNef+rUk9GVHY//S8HxiJa1x58gGwafFg2En5q8wRtQyp12ZcH7OPqQ2Bg 4Y7vAAPDUajY/G9K4vs7GIQLZfPf0iaJIdvnM9D23od40DxCR/Vb05NL8CsN1TjesWMz 0x1AzvQd8k92rXG/16HmD2T5QGiiPO3ivlYNlt7BVuRdKbLCK2fvT6LZ2eSrqsX6NCCy FGnv5caN3ZfBSYxZY9/MlpdxvyVS44r30uGC+rnecRs2l+15N3hwWl/mbpFua9UmlzxQ 7r2w== 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=JbbXkiP9+kqcX1llmfrYBP+pFau1HrlhgqJxX3xqd34=; b=LzGXWcVxUX256EBIR90l5HIMlXdeKnyEeNUl3DATZipQzgKLOTWvaoKhVniCQiBQZX CpkPhVdW4QGxlm07uV702xUOwpcMvz87I/DLNrwyfpJM4k3rb933c+FLWXYZFJb1Z9k2 L02d8UHebWc3Qs0wzttIhgrHExepk1T2gjqFnk7vWqwae5RNY0gLSE8tDDonH35doh6N SXy2XaH1OmGj+ebLvBFOUtDh6SnBCEHzKokVcoxiDd6zZDA30NtkbUojp+L0v6dCUGzP MnTYufBIffouXexWmwSS8gzxtzso2Ls25nNZJdV3mcio8hDR2dw42YFH39c+xiWdTwvZ KsCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H6461LuP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id n4-20020a170902e54400b001b045d65aedsi1806387plf.228.2023.11.03.09.27.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 09:27:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H6461LuP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id D204F832F651; Fri, 3 Nov 2023 09:26:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344868AbjKCQZU (ORCPT + 35 others); Fri, 3 Nov 2023 12:25:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbjKCQZR (ORCPT ); Fri, 3 Nov 2023 12:25:17 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B24C7D42 for ; Fri, 3 Nov 2023 09:25:08 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-32fb190bf9bso1047374f8f.1 for ; Fri, 03 Nov 2023 09:25:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699028707; x=1699633507; 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=H6461LuPQaPdJJymvEd8cLeb3V9fghIeRd05NL/Si2cKKLKafCLx0MFeFToOHMm92c AUyc+5XwoIkzL09UCk/lCCBqpIlHLxZyKUQbITjWKkHRPAbb0orrWHAo0L0t71NMDpAM skok1huEO0GIgaZSJwWIpS4bsMT8kAOWllXpHsabp3E1HFrCDJfMfBC+3APfODtP3Owa rG5FKPS473TjtiF3UIBR6z0G2eP6urajh5BXRnRkIiih23AU9yxC+F/CfqvvG2FOjklL NZD9Byr1xbAjnZaFy5gQjgqFsnl9qvcnfEt8I5yt723wn8Y64pLeXaIJcsI9W1N9vbLJ W0Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699028707; x=1699633507; 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=Il+972mqulzqP5BnvmDa22ONanp9eJulEveBvqLeB3q30f+FI7zhyT0keyh07uSl3v ndsFMVUuJE9nJUsHh9PsdFWLUXIS/6P+xoTTs5LoGFu+u/XEy3h/n2XashoDCY63V3oQ oEysSbqtQWrTXWpvNEQxh4/TOFdw/m0gZPioccuukPnnR4uI1HeFdykEgTD3C7SUy7nQ aonLtM6xMXB4UtKyycMSeBYv9VCHaAlwr7ndZd1mgAzjOu/UFy8ovFNJwBPxjGEWeIxZ TAO2rqgtkjX3v15X7wUpNRg98T1n6c0QXDgz0WeSfZu2FCv9ofXXyUD0LwMpEeWIKoDc Jv9g== X-Gm-Message-State: AOJu0YxK1EHoFzaCF22V/uWn+wxWFQV5DHX1jOdrqQDJ5s2oZCEq5N9P SIiLlqWVghtQsGD0lYFaNotF7g== X-Received: by 2002:a5d:648b:0:b0:32f:8bbb:fc00 with SMTP id o11-20020a5d648b000000b0032f8bbbfc00mr3496585wri.12.1699028707025; Fri, 03 Nov 2023 09:25:07 -0700 (PDT) Received: from [127.0.0.1] ([37.228.218.3]) by smtp.gmail.com with ESMTPSA id x13-20020a5d650d000000b003142e438e8csm2219972wru.26.2023.11.03.09.25.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 09:25:06 -0700 (PDT) From: Bryan O'Donoghue Date: Fri, 03 Nov 2023 16:25:04 +0000 Subject: [PATCH v2 1/6] media: dt-bindings: media: camss: Add qcom,sc8280xp-camss binding MIME-Version: 1.0 Message-Id: <20231103-b4-camss-sc8280xp-v2-1-b7af4d253a20@linaro.org> References: <20231103-b4-camss-sc8280xp-v2-0-b7af4d253a20@linaro.org> In-Reply-To: <20231103-b4-camss-sc8280xp-v2-0-b7af4d253a20@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, quic_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-26615 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Fri, 03 Nov 2023 09:26:50 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781560877767869403 X-GMAIL-MSGID: 1781560877767869403 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 Fri Nov 3 16:25:05 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: 161364 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1160344vqu; Fri, 3 Nov 2023 09:26:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEiJVpE8VuZ8/YyPdCz4DC7BmoM4xvDtMVkDhq3xfHnwMLmTC4jvnMLLp1FVBxLiep6ormx X-Received: by 2002:a05:6358:71b:b0:168:ff1b:8f59 with SMTP id e27-20020a056358071b00b00168ff1b8f59mr30080018rwj.4.1699028802310; Fri, 03 Nov 2023 09:26:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699028802; cv=none; d=google.com; s=arc-20160816; b=0khjKr0Mbk/7y0s1fTomGAPdt/Hid5bvRc6qi8kMejAYt/tfF3bQc3rSxz7b+FHZmr kq0LdHgMQHmI5NVsHl9OHkyXbMDbU2mXRpH/AONOxJIfVAWPMKdJhdUyIsZeKSx4SLTd 0UPmTpNGR6c9A6qcq1IwoXHi9ggVeV1hAL3z5eYyMa0yMc1yqZ1qJqfhCn+cRIUg9Qw1 mTsghN3f14LZw8PXscxJjf+VXhhE7jIIqapST36l3n9U+n8qg1NWGdTCjtJqWcQXrk9s 8qi1gVZtwXQb+TgnL/kYyCVunIEPYLr2ZoZyS6S7u0OeW5IzWN6xuKGT6VaaYd2uP223 cH9w== 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=LBeLT8khJaQLixVgfl4LSRyi0x5wnZw3atoglLJt33I=; fh=Nml5T81A4cSLLFhWwVRvWs81DM0dyuypBRnQAv5c6bE=; b=FoPbZ8rDDBesgsA0o5sPxkAQ5F7UIaJFQIMjwaLZRR6ZwF87XGlKnfB90nR45TGrJJ U+xMq+D+jmxTfsKJRRHABhQ74Oghr6tl0K+2Dh66eP2LLR/dh40hqMfavqLDlpp621RM 74Pjm+6TxEqVf4sivOO5WG3HIFvSZX+R/EQTkNYCPcxAcDDV9BmzL30Z6g+2g8VqWAOJ iXuF/jexOTdGu9isqJOtzh3/hkDkA7Jn6eYpAWZlZD1pfTl4RqtJNEKyPoYyOQXyvDmM NY0WPbGSYbI3Wr9t2aP5IwxCCk0q2+2QeuWMIv3bu2jvVgb55ej90ard1V5aGgAlZ8w9 iIgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Vr734cyq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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. [23.128.96.37]) by mx.google.com with ESMTPS id bk13-20020a056a02028d00b005bce484bff8si1859080pgb.647.2023.11.03.09.26.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 09:26:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Vr734cyq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 4210E805F9E7; Fri, 3 Nov 2023 09:25:42 -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 S1344743AbjKCQZ2 (ORCPT + 35 others); Fri, 3 Nov 2023 12:25:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344472AbjKCQZT (ORCPT ); Fri, 3 Nov 2023 12:25:19 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 084C3D4F for ; Fri, 3 Nov 2023 09:25:10 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4083dbc43cfso14509875e9.3 for ; Fri, 03 Nov 2023 09:25:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699028708; x=1699633508; 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=LBeLT8khJaQLixVgfl4LSRyi0x5wnZw3atoglLJt33I=; b=Vr734cyqkkMNlOstR84dmRXwAdxOZf/IwG5PVXy5aT1dh/II68WKBTMh+qXt5W9H2D howgdEt+TQ2464ZiwVQ1C8yjRs9dtRy6LKRuel/EenJ1VvZaH0ywTHiMAi2CMPo8wgC7 ltbGklQwSpRBQ6vdu1IWC/GrejEzOGf2VueW5cL2kL9KqzsGqa1Ko+biG8VOZh4QZc35 MMWUOyvIkjIfjufyrsAc4XDxAuLvk7+jtTFnahuQqoSFVjnJDdbYv6LGYT2DdXFi622z 5d5xCxKYqdC5dZCAVjh40CR9qsXB45OpqZX8elGoTiuDrU6dvppp9T4WUyVtVuG622Oo mt6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699028708; x=1699633508; 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=LBeLT8khJaQLixVgfl4LSRyi0x5wnZw3atoglLJt33I=; b=xTPVg5Nc5K1inLeaQ4fN6m3N9gIGWracIvpfeIcMqFfnjRLmQ34fiTJlPHjCrz+jFb uL4UilrltAKvyz4mjqu6MgSjf07PDjGpUU3Y4oOtIyoMc936C59+ZJvPFf/pvxbVyz2h FGHuD8sur7NrloZv92WyRkOlRlB+whme9g5mDLW8XnhAGF+xN3AqdAkuFIG9nWcawCk4 8L/8ztRIZLqK702yippivePc197eSQNFRlyOWlseZNlFsJCRLQEMYuLuqRhNyGmJ2Vq4 71LrMLDjES2cW0bH2UJW5IQKZcKBVDZZTQkONGETsMCLiNdW4Mq0CvAKbcrVSvh4Q4AP h80g== X-Gm-Message-State: AOJu0YzVVj0tY8jtxUnv1h4aRrYQZa5I6Vk3Ywfvp1pyEVhtdAE/uEn9 dMLJfBlRv0vnFIYzw0N7MD2K6g== X-Received: by 2002:a05:6000:144e:b0:32f:7fb1:66d9 with SMTP id v14-20020a056000144e00b0032f7fb166d9mr13999015wrx.21.1699028708527; Fri, 03 Nov 2023 09:25:08 -0700 (PDT) Received: from [127.0.0.1] ([37.228.218.3]) by smtp.gmail.com with ESMTPSA id x13-20020a5d650d000000b003142e438e8csm2219972wru.26.2023.11.03.09.25.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 09:25:08 -0700 (PDT) From: Bryan O'Donoghue Date: Fri, 03 Nov 2023 16:25:05 +0000 Subject: [PATCH v2 2/6] media: qcom: camss: Add CAMSS_SC8280XP enum MIME-Version: 1.0 Message-Id: <20231103-b4-camss-sc8280xp-v2-2-b7af4d253a20@linaro.org> References: <20231103-b4-camss-sc8280xp-v2-0-b7af4d253a20@linaro.org> In-Reply-To: <20231103-b4-camss-sc8280xp-v2-0-b7af4d253a20@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, quic_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-26615 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_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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]); Fri, 03 Nov 2023 09:25:42 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781560825378933997 X-GMAIL-MSGID: 1781560825378933997 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 a0c2dcc779f05..ac15fe23a702e 100644 --- a/drivers/media/platform/qcom/camss/camss.h +++ b/drivers/media/platform/qcom/camss/camss.h @@ -77,6 +77,7 @@ enum camss_version { CAMSS_660, CAMSS_845, CAMSS_8250, + CAMSS_8280XP, }; enum icc_count { From patchwork Fri Nov 3 16:25:06 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: 161365 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1160386vqu; Fri, 3 Nov 2023 09:26:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGBNMd42ePiNBQqEQaEpD7oo2jquPItvbUfYruVY0MZWGLcB8uasjTLjE2t/eoN/QrLYTkE X-Received: by 2002:a05:6300:8085:b0:180:54d2:fcfe with SMTP id ap5-20020a056300808500b0018054d2fcfemr14800585pzc.54.1699028807684; Fri, 03 Nov 2023 09:26:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699028807; cv=none; d=google.com; s=arc-20160816; b=AUWhvXRZR4U1oj7JAJLrW3byYTkPoQlNPzzAyZn+FuFs9DyupUW8CvPpnZVJdAywu8 1vRsUPpqawWP4wvy3QJPQha9mrvSe3zQxEBAnWYVc8rcFVQ7SFF8pg13zz0o56vjjejc RC/VS4D8KGdB0pQ4WO7aeOKpuawkk9xR0Z43MGqp5lMyJglNvpipfaGyu3KGjsJ5tXvZ 8yZ8MzUkqGgE5RxaryhQKhPj1o7qu4iEJkT60hL/9ut2jqWsHfrNXgntgfqjcOOZGpVk KOPCgIuyTt/x8E4miNHfOuG3ixmI+m6PReaS8rH5VKV2vFAge3Cj45MD5l+thO3/YDhN KSNg== 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=Nml5T81A4cSLLFhWwVRvWs81DM0dyuypBRnQAv5c6bE=; b=WrNvr5LSyKga2+QNTNzU0gn9gwnNjnEgrkrtq9oypaX/fEPsAvI6Kt1Gh3WuK9ShOU O9C+VM2dYyl4RTH44qGIQlmlSzB/pVpk76MQz21epxNey0R+wCteRxJVN3GQ00B0i/eY S2z81K60m40wTH9U5KcytFTFnJFBaiNJW5OgW5l62X4HzKNH2aFb4vyzn8cz25Ew8jzh VzMCuDPGP0fhaSEKMzk0mTQK0/ITCgAQjEymProzdtmI8MGSLsmsTdJKvl+zcTJ0XUIO LhH9pVnzDRHtA7phekfTAFo84FN6ayPfiRZtcDRPTOki8Qv4b/tig4m3WuC/IxayjbUF rHyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eTYPT0rV; 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 fw18-20020a17090b129200b002684bc84493si1808052pjb.131.2023.11.03.09.26.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 09:26:47 -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=eTYPT0rV; 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 C5F2C83896E4; Fri, 3 Nov 2023 09:25:58 -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 S1345599AbjKCQZc (ORCPT + 35 others); Fri, 3 Nov 2023 12:25:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345245AbjKCQZW (ORCPT ); Fri, 3 Nov 2023 12:25:22 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B50CD54 for ; Fri, 3 Nov 2023 09:25:11 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-32da4ffd7e5so1420444f8f.0 for ; Fri, 03 Nov 2023 09:25:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699028710; x=1699633510; 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=eTYPT0rVRkdPg5jdUU8WtO+irykmstrT9IJKuMIwwE5ntUli7bk/npvYE2G9U03g8e 0aTJR035Hst4SJZsqq1djnBzCjJBf+8dJgIjoSu1b3cgFT37kOPKeiafiTlNG0dKG2fN GCBox8ls90ZO2jS615bXINKf/njwAAmZG7FxwsxsNl9zU8R5etE85xzwCzu3WmwRoW5r RirtI2qVS7hPLWOfpS2UQQd8fm6OyvYUH7z7NeuASQcJQ5HyStGcYqM16pYiGr2bi5JM 0wGcm98TCAAAC0nlMwqPhpQUe1/+iqkcNMVQQhRTHY1am5zurh9QAfe2vDGVuv9vBGv9 jDLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699028710; x=1699633510; 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=dMM5tA/+0t3dR8R7yldEnbcRAd2g5Me6DQEVSrGHFTzyw4ItKaI1w3cU0vy31e640s 5UO8lJxaxXuPqTLOojO63aqfuWdckluQwXPFZyGq+XuVrecTKOlorTn/3QIMSwCuaJI0 +p7rw673BmFEwZDmJL/qHd6XclTHkNmbuaYLyMFckTAS6Lg04UohZVVdmcgMGVDtyiXE uWiiQAxj8pz+ApDUHJExMirYJOstqBZj5feMhCs41VAA/s6/4LW8lRpq1P8RsHgHUZG2 zWcXXcWSiuCjZHeNAxV+s60BSyxtLHdP5JIn2Rx7emaBq0V3w60lNQ+pDLqySReDeiIr SzDw== X-Gm-Message-State: AOJu0YztsDIwEf2xyr938BHHnGyAm0eUT9495QWM1GQ5Hv6bFXeziouo wzhTd+iF0IthXCVoSKK0Mij/fQ== X-Received: by 2002:a5d:6da7:0:b0:32f:952f:c51c with SMTP id u7-20020a5d6da7000000b0032f952fc51cmr3690212wrs.18.1699028709763; Fri, 03 Nov 2023 09:25:09 -0700 (PDT) Received: from [127.0.0.1] ([37.228.218.3]) by smtp.gmail.com with ESMTPSA id x13-20020a5d650d000000b003142e438e8csm2219972wru.26.2023.11.03.09.25.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 09:25:09 -0700 (PDT) From: Bryan O'Donoghue Date: Fri, 03 Nov 2023 16:25:06 +0000 Subject: [PATCH v2 3/6] media: qcom: camss: csiphy-3ph: Add Gen2 v1.1 two-phase MIPI CSI-2 DPHY init MIME-Version: 1.0 Message-Id: <20231103-b4-camss-sc8280xp-v2-3-b7af4d253a20@linaro.org> References: <20231103-b4-camss-sc8280xp-v2-0-b7af4d253a20@linaro.org> In-Reply-To: <20231103-b4-camss-sc8280xp-v2-0-b7af4d253a20@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, quic_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-26615 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_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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]); Fri, 03 Nov 2023 09:25:58 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781560830870243228 X-GMAIL-MSGID: 1781560830870243228 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 Fri Nov 3 16:25:07 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: 161369 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1162587vqu; Fri, 3 Nov 2023 09:29:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEo07CWNpyND9/6DpcL5QHQooXQv74xUZ6bGkhLWZw64cYOsL4IwukSJ4BmgZUseVvitEGV X-Received: by 2002:a05:6a00:140d:b0:6bd:3157:2dfe with SMTP id l13-20020a056a00140d00b006bd31572dfemr21636522pfu.7.1699028998346; Fri, 03 Nov 2023 09:29:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699028998; cv=none; d=google.com; s=arc-20160816; b=v+DZgOR3aDvnR4bkPi/uwOhCok5yOLpULdfVHb8G5Sf392/fFql9NYJRELy5Dzg9ah o7Ay14AE09H47HYY6+MVdjsEhtaici4qvrIMYCr6teJ0A/v9JLuWzB5xJ2IRNI83WWm8 R21blOm5hwZfSKgREb9EX/t9uKuV+o9oPnkMp/pzgb6XLMtzn7gGtxvhIDNsXUw9iNoU 8FDJDmj98rnU58KYoyawKZXLPls7LyIdIHCOcSBm9tLnKGG7Op6+VH7ZjFVOWvJ3LNVC wpn31Ch9zq9fS4c5g5I+wgqFtYB/JE7sNSL31F7inIEgrLoLfoy7wdrWm4Pz987KIITo yylw== 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=xVhfvAV1sseHeHoQosCAQU0IdhydZ3F9lmBGCI45fqM=; fh=Nml5T81A4cSLLFhWwVRvWs81DM0dyuypBRnQAv5c6bE=; b=DZH87F7vjYruJeM5oZMgUbJ5G/NPeFaQ2je8LCaeLP6Q4F74qgIg6RKblkZyidgPuw Cow2pawCZ/PXuLRAw0GjhqG1cysQd6N8uSEIXHrpT53mvxs+tsUXNIPlnIOA+62jyvlJ rFb0tIGV31PTGezu6thpkgDJJBFB89DzqV5g7+Zo7WY1gXvImj04SA7TzyPaBgyk+YXV hilt+k9fD5qhNJeLgCrWQebog24OsUiFN/QHPJ/LzD8hqkxlK8Jn/5gNBvUbK82V2JPm vAfhNMaBxJ9XT1QFQrI9XXMNVaPNwnNsCocRTo4r4kvudMC1kM2DKDnHWUUjFx2ISWfT IvPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NEzEOWh0; 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 d10-20020a056a0024ca00b006bf537ce976si1859833pfv.260.2023.11.03.09.29.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 09:29:58 -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=NEzEOWh0; 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 CC6E6806C34E; Fri, 3 Nov 2023 09:29: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 S1345704AbjKCQZg (ORCPT + 35 others); Fri, 3 Nov 2023 12:25:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345287AbjKCQZW (ORCPT ); Fri, 3 Nov 2023 12:25:22 -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 BEB4F111 for ; Fri, 3 Nov 2023 09:25:12 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-32ded3eb835so1521017f8f.0 for ; Fri, 03 Nov 2023 09:25:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699028711; x=1699633511; 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=xVhfvAV1sseHeHoQosCAQU0IdhydZ3F9lmBGCI45fqM=; b=NEzEOWh0XUHNPM+lt067qjQrWh2d0djpfXjWhrBad0O1zJG88ZTmvUy/R+TqbR/FPP XZjN8oAN30Pncqqak+Rh12e5ZRxRNRAn5/F6HssJ3JmCKT8SLVpDtV9aovFfbtNcmLop bNTkOEQXNvRR1Ntm65j6WTiH0qeHtAcLAAHlK9b0qiWSkgyvX7bpKwHRCTevRtkNnhVi X7h2bif00S28gK16xYI4T6w77FWucdQRjzk9O0pUSjjmy0cA3ALr1V0NMreNGncuRVul +l7w2l08tqrS62Ut6xeEx1o9eOK1xrg3W02outdqXnXQ0hfZU0KrgtxkzH+g34xb3waG F+QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699028711; x=1699633511; 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=xVhfvAV1sseHeHoQosCAQU0IdhydZ3F9lmBGCI45fqM=; b=tye5qqhTkYTnHvLuTO2fuORdtYgJHLy5241rKODYwXhb+fMDO9GkeO28EUhSgPAwI9 URr2/PCVa6oK8hro8hboCtOVhka/ccaPhbWSq98GgSUrx/ZTCufc357iPLmHa54RHeOo RzvrTflkRiqScQ0p/qCKm2AR5hasc4GsgZS655qLvCmt0oqt/o31elZiI09z7fu4Tw4U eod482XndEDzz8Lzb5/EU9MsCuHbAIyKGZxyVV4jzEj+MEwov+MctJFC5tD6ucM30qX8 6/wPFFxHMUxhzY7hMbnaTFKtRnV7kOfsxc7wq+0mh2qJAplERTLicDSj2w80dmyZQIma PrDQ== X-Gm-Message-State: AOJu0YwTxuNio2lq1VCmUjFT0R5xHaQ260G1iLVZ/rwoTIIBUjWwHKvl Ok/pn63vbXBVsX8N8jv5Sq4i3w== X-Received: by 2002:a05:6000:154d:b0:32f:7ff9:b753 with SMTP id 13-20020a056000154d00b0032f7ff9b753mr16010965wry.62.1699028711070; Fri, 03 Nov 2023 09:25:11 -0700 (PDT) Received: from [127.0.0.1] ([37.228.218.3]) by smtp.gmail.com with ESMTPSA id x13-20020a5d650d000000b003142e438e8csm2219972wru.26.2023.11.03.09.25.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 09:25:10 -0700 (PDT) From: Bryan O'Donoghue Date: Fri, 03 Nov 2023 16:25:07 +0000 Subject: [PATCH v2 4/6] media: qcom: camss: Add sc8280xp resource details MIME-Version: 1.0 Message-Id: <20231103-b4-camss-sc8280xp-v2-4-b7af4d253a20@linaro.org> References: <20231103-b4-camss-sc8280xp-v2-0-b7af4d253a20@linaro.org> In-Reply-To: <20231103-b4-camss-sc8280xp-v2-0-b7af4d253a20@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, quic_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-26615 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 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]); Fri, 03 Nov 2023 09:29:51 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781561030945578352 X-GMAIL-MSGID: 1781561030945578352 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 | 383 ++++++++++++++++++++++++++++++ 1 file changed, 383 insertions(+) diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c index 8778fdc1ee342..51619842f3925 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -941,6 +941,374 @@ 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" }, + .is_lite = true, + .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" }, + .is_lite = true, + .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" }, + .is_lite = true, + .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" }, + .is_lite = true, + .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" }, + .is_lite = true, + .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" }, + .is_lite = true, + .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" }, + .is_lite = true, + .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" }, + .is_lite = true, + .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 @@ -1824,12 +2192,27 @@ static const struct camss_resources sm8250_resources = { .vfe_num = ARRAY_SIZE(vfe_res_8250), }; +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 = ARRAY_SIZE(vfe_res_sc8280xp), +}; + 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 Fri Nov 3 16:25:08 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: 161366 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1160484vqu; Fri, 3 Nov 2023 09:26:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGAB5KO5oMCBcDS785aR9HbpdgGGgWyO22w48Zif3QCLX4/YXwbI+Raoyk/XjtxLhR8+cyx X-Received: by 2002:a05:6a20:7daa:b0:161:ffbf:d949 with SMTP id v42-20020a056a207daa00b00161ffbfd949mr22540348pzj.3.1699028815177; Fri, 03 Nov 2023 09:26:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699028815; cv=none; d=google.com; s=arc-20160816; b=uoYimeb0p8ntwUkbiF1XGkcpIMxaBbAGLriU/UkRG8ezaqP6XewlDxi830QOF3xPmR ZkrwVFke94fYOIpQgy7w+IXB0A+sl9qAwHgyMyk3razovMM6ZzxJBRYR2HCHwwwo+38Q fHpQsibPlCfu8do6rtbAhR20tFems2MDuzpYfCSzklXAPTVJe+CYqbqOx82eJ6ahLWgS Oap1JPEh6OHSRjHcTfdX8+jintpq+8izPZPZ+b+0yYZp5RlYNiKDZfuDLC8bPkd0/x7O p8bC0ysb2geHR1GHrRC7NPHokF3cMrwbHG/VNDgKG/PP2rqW/fhKyJyk/v+/0e19k29Q PT8A== 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=tOdiUJmEPnovv7huGull2/1/i6yjUoXYCLLeBsJfSRM=; fh=Nml5T81A4cSLLFhWwVRvWs81DM0dyuypBRnQAv5c6bE=; b=Ywp0CSc+2+9zxH/5AOCKpdtfqGeVOZvoMe9B9sLo68JOGHgbi8Azj4CU74feAxWi+a Scd4oMPu6RiOZ1qt9oC6qYzFrpkVS5u2I0fLC2mGd9A+a3CY8fibJmGFnw8anPZIhLpa Pg8EVpPM3zwY1KG7QZMFusPqCEfGFAsFnrLpWhIlOjagWVSNJUS67jCApSVN8zRleFQu 2e8jbBdblMXZXByGIGkwcuPRK/BYRO1tQxRtH5oo8KwdSNKVGNVg6Fv7OjD6aJFzLpt5 l9w7hsYSirkHrjpSVCo6hKFhw2eGmLl24euOxWA0I6da86K5X4pG3duXq9Kbj14XKLo2 csDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cFfx+7SW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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. [23.128.96.37]) by mx.google.com with ESMTPS id u22-20020a631416000000b005b92e5e9df9si1758263pgl.257.2023.11.03.09.26.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 09:26:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cFfx+7SW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 B4CC283DB949; Fri, 3 Nov 2023 09:26:13 -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 S1345068AbjKCQZk (ORCPT + 35 others); Fri, 3 Nov 2023 12:25:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344957AbjKCQZY (ORCPT ); Fri, 3 Nov 2023 12:25:24 -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 7E11FD5F for ; Fri, 3 Nov 2023 09:25:14 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-32f78dcf036so2055398f8f.0 for ; Fri, 03 Nov 2023 09:25:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699028712; x=1699633512; 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=tOdiUJmEPnovv7huGull2/1/i6yjUoXYCLLeBsJfSRM=; b=cFfx+7SWLyIO1QqkN1FApx+y2a1sik54ZBp6cGASEpb/neIJygAv3h3YZI03ZaZQqb GJmwTXKfFon/8Uw7MEkjPtCAy0jac+SdDhaBQh57/pZklFzrYXwWcSK1AvOudmH3LgrL wg/z8/Zsg+GAY1E9x8mkJkpxj0J9VzgMZ+TGsstNEu+L0HwuTUf+/1SvnkiDOf7++Du4 dr+d4gODu72d9fNTWK4pNictr4N3ONk80tb6ZBI120BVAgmE6rJ05fowaqJZsDW/Of7G oTt4QKAcS+ScVm5oyDwIpBS4M+oNmqFMdvnfRJeTG+niBenWwrIdvjVrmW4jW1VDnHHW lfWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699028712; x=1699633512; 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=tOdiUJmEPnovv7huGull2/1/i6yjUoXYCLLeBsJfSRM=; b=fzp4ny9B7ZDQfVowOWDR9EfvJN5b1w0vwKgyErTVJw4trwCvd9+2jcsXEePgmct22S PLHDFI8wQS3D3PWDzr8UXurortPqBSX2aOi80ZGoQuj9sqFrXWQVmY8Sk13UY660/uf/ +8ZmyRFC3EQmcm0zKKXKQxtoO9AE8wmw75IlTtBMqg0n3ALboLdqfQQATk7V5zot4gIM //KMXocx9Vmb4CpLxpN6JgPrZMJQ6NtAsKVpFTXEJX6iSEq1+wn2m7XDPM0yqlYVyarK kAyDLoELY4O8bVzbZ2ummoBYaNBQ/yrLTRhwTv6z/4Fav57w1z+xCABO0eMZGg7JPup+ +e7A== X-Gm-Message-State: AOJu0Yz9ha2nN8rOS7hTosll2UY3gme42jKkzGsM2FwkM7dysTHY+MCw C1MZCl6WHS/pHSQ9BVf5L4NMdA== X-Received: by 2002:a5d:6547:0:b0:32f:8391:b294 with SMTP id z7-20020a5d6547000000b0032f8391b294mr3081297wrv.31.1699028712435; Fri, 03 Nov 2023 09:25:12 -0700 (PDT) Received: from [127.0.0.1] ([37.228.218.3]) by smtp.gmail.com with ESMTPSA id x13-20020a5d650d000000b003142e438e8csm2219972wru.26.2023.11.03.09.25.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 09:25:11 -0700 (PDT) From: Bryan O'Donoghue Date: Fri, 03 Nov 2023 16:25:08 +0000 Subject: [PATCH v2 5/6] media: qcom: camss: Add sc8280xp support MIME-Version: 1.0 Message-Id: <20231103-b4-camss-sc8280xp-v2-5-b7af4d253a20@linaro.org> References: <20231103-b4-camss-sc8280xp-v2-0-b7af4d253a20@linaro.org> In-Reply-To: <20231103-b4-camss-sc8280xp-v2-0-b7af4d253a20@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, quic_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-26615 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 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]); Fri, 03 Nov 2023 09:26:13 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781560838703219012 X-GMAIL-MSGID: 1781560838703219012 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 50929c3cbb831..28cf63af1ec08 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 Fri Nov 3 16:25:09 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: 161368 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1161881vqu; Fri, 3 Nov 2023 09:28:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFWIF4NQE0T1/dDIj/TyZiRHTWrtVZS0l7C+ywwdoDvreaCfSwPNZl9IZaB9brxk+bHDg+8 X-Received: by 2002:a05:6870:1588:b0:1e9:8ab9:11cd with SMTP id j8-20020a056870158800b001e98ab911cdmr30431412oab.45.1699028936561; Fri, 03 Nov 2023 09:28:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699028936; cv=none; d=google.com; s=arc-20160816; b=hqNdoxIpKoW9zRCnEE0v+Xcw0JNGvDFDzKjZ4PpVJz+x0SVkWn8oWPpvnBWHa5vOvY XqvUIPwV47Jbg8/ZElT72Zfdk5zPk8oAmqx6TZ/w8ppa7GUbjJyCHmBvx500g9gvQ2ws o3i21uGYVfmXH3prP428WNIIEpa5i4xQJqPc0dfv8kyA6jrwec9RmSkpz5NRthTwstwH /+NLtKA8mBfztPYPAxUl7mAOa1nCeyzOoDStPX4UK4laId0ea6DLsQ3/eB4iw9W3MJ8+ Ip3uB7bBmaygJOKfDD1O1hU3FcWQr3attsamvCLfCLtdMi1ELdLJ1lSx6ZiNcRSz/yEz 8/nQ== 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=6nsxT65QcBic5QpwyMNIvqdwRkRC1mARnt5d+1mQIn0=; fh=Nml5T81A4cSLLFhWwVRvWs81DM0dyuypBRnQAv5c6bE=; b=xST4bYA09Lssgr79EaWq4AnW9FEif8uAz/JvZ4Uv5cKhUJi2CFpkq9J77G/IY0h/ec vmNqQO3Ch3p544qWOgk6yJptK2teefd7BAueHShRdS2gUAoquVsEXPnDXk7MtJjyJQQ5 add1+tTrLQIecmWewEBHDF/Y/u/CnWslM9Mm2izslNXOd9ZHh6eNkTpaxtbQZBPd3UGh EqfAnfTaQVFG4sFXmFBw/ez1Kw/vOltjYygvzEcC+cRxCaDaRsMEqQZH3z/VMhIzj1Vy N/ERzJIQRgGzQnbxEu27tfXBTTCjGX6CsC4ZO9KFSHy7nAwYQk+kUheJxnV6i83ccck+ xXwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=koVvCQPr; 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 bw26-20020a056a02049a00b005b96fdd43d4si1957919pgb.330.2023.11.03.09.28.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 09:28:56 -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=koVvCQPr; 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 28E2182E74F7; Fri, 3 Nov 2023 09:28:20 -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 S1376371AbjKCQZn (ORCPT + 35 others); Fri, 3 Nov 2023 12:25:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345395AbjKCQZ0 (ORCPT ); Fri, 3 Nov 2023 12:25:26 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D582D61 for ; Fri, 3 Nov 2023 09:25:15 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-32ded3eb835so1521049f8f.0 for ; Fri, 03 Nov 2023 09:25:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699028714; x=1699633514; 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=6nsxT65QcBic5QpwyMNIvqdwRkRC1mARnt5d+1mQIn0=; b=koVvCQPrLrSGuPV2Ef2SpA7bmvgvl9CfCUItewz0iPUS1oYk7dhEGRJWgr/CAI2U6A 73UjMJe1UihIkDtxBLftzgyjouoln5+llsVYOKnI0TozcvzA0HKUmV28SpNPW7ZrTmYw gBuzG0DW72L5F2nXPoRkF2qGrYwVx1nWncr2gSFenc/N1pxwASbLdStNkhT3N2/8m9Q2 Pj+mY/OUzU1H5npSj7yG1rVipjIiy5joGykJj60grpnH06g9FC2rQed+PhrArDXyKaHC xtw9y3o8AsU+hbCEriX7nzqb5djmlq1bEPHtt3aIrj6hCPSqlq+PH5lOVx+lYlSRl9OF J3pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699028714; x=1699633514; 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=6nsxT65QcBic5QpwyMNIvqdwRkRC1mARnt5d+1mQIn0=; b=akunh8BNp0ObTop4QqVoiuEBEU6eAe4BVT8EUghYoRKhoklTpi5WAvV7+f2GCcwhHW Z8PvbPzOZ+jaKoWmSYDlDC8FN77dZWW7xhukQCAGBpJRF6JMrxT2nTL4PJ/mAOmJf0a9 9t2GHBt1ytC8Xp5rToik+z+Q5I1Dpu68Lpg4RHnuG60psGIJF1bJ6gwQbA/SsKHo2t+q YdFw3/naj6XSEvJPd/sy6eIoD6r3LUc1khd5dUMUWJSXm1D96eatpYpn2sZbgnMJHFMt 71TdE5qf1s957OusK+knqLc+Nz4xpfZc6awq1XgXpauunQK4Z2pkM2gL4LDoiTrx7BjQ wN/Q== X-Gm-Message-State: AOJu0YwHCY+oXYYbgDqb4KhMOSA6YlNEINynDhei+YYUJy85Vw8uuFM1 zbjIjpHs3/8KkNeav9PrBrPPiw== X-Received: by 2002:a05:6000:18a5:b0:32f:86e7:9beb with SMTP id b5-20020a05600018a500b0032f86e79bebmr16538359wri.14.1699028713819; Fri, 03 Nov 2023 09:25:13 -0700 (PDT) Received: from [127.0.0.1] ([37.228.218.3]) by smtp.gmail.com with ESMTPSA id x13-20020a5d650d000000b003142e438e8csm2219972wru.26.2023.11.03.09.25.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 09:25:13 -0700 (PDT) From: Bryan O'Donoghue Date: Fri, 03 Nov 2023 16:25:09 +0000 Subject: [PATCH v2 6/6] media: qcom: camss: vfe-17x: Rename camss-vfe-170 to camss-vfe-17x MIME-Version: 1.0 Message-Id: <20231103-b4-camss-sc8280xp-v2-6-b7af4d253a20@linaro.org> References: <20231103-b4-camss-sc8280xp-v2-0-b7af4d253a20@linaro.org> In-Reply-To: <20231103-b4-camss-sc8280xp-v2-0-b7af4d253a20@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, quic_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-26615 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 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]); Fri, 03 Nov 2023 09:28:20 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781560965966688088 X-GMAIL-MSGID: 1781560965966688088 vfe-170 and vfe-175 can be supported in the same file with some minimal indirection to differentiate between the silicon versions. sdm845 uses vfe-170, sc8280xp uses vfe-175-200. Lets rename the file to capture its wider scope than vfe-170 only. 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