Message ID | 20220518133004.342775-2-bryan.odonoghue@linaro.org (mailing list archive) |
---|---|
State | Not Applicable |
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1nrJks-00H0up-Qj; Wed, 18 May 2022 13:30:23 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237825AbiERNaS (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Wed, 18 May 2022 09:30:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237927AbiERNaL (ORCPT <rfc822;linux-media@vger.kernel.org>); Wed, 18 May 2022 09:30:11 -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 A15F61666AE for <linux-media@vger.kernel.org>; Wed, 18 May 2022 06:30:09 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id h14so2737858wrc.6 for <linux-media@vger.kernel.org>; Wed, 18 May 2022 06:30:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=foZ6dspy82cYGpwpKNdGArEFQ0gYRwohDRDgkelpCf4=; b=oAp7EYC0w6+jz+ZodAbaRvi/HP3I2UUiqrOLuD5OHRoL6S22CYjwuZmqbLDOHmD7KI j2KsChHSO/Dsn6ODEzkiUG82m2mPfIyYiodAyf8EZbfHOBJVMf12UZthilwLaWppwGT4 Dy8vPndPkR12duDcIpdNlBVidNwZa1gYoevNNIZtPVHU0fbmNfDkjUSgjW6bh9JZZQmT EEWvD+n1kgP/3eSFF08tmcVExtz8aRnmjr+Bs4Y2ItCsSPj/gsxzwb4rDWWvCi1IGYYN C4mho6dErPCP4N4NMzrfo3NRqVV6Fs+1HHdHLsZnolJwt/LDJK20KCwhsp0KiDJdtvpF K4Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=foZ6dspy82cYGpwpKNdGArEFQ0gYRwohDRDgkelpCf4=; b=AmnQLlFM7nkzjfSPYwGFwiTpWoXRSiKgZfkoSKmHdSVv/on4NoceQnxfEi7vd4+D/T raRM6TNvG0Y5y03lzls5/oUvm6ekg3uGjy1ZHZouiNEWA2DBnNpm6zf448cQDDnMevHh I3HsnMP5rhH5KgfrMJllNbZeYxtXnr7/yAyuSm+rARXzOGUlHTemfuAKmuqDHozZ+mfU h9DCVzC4wj0kItrUqy/+SeZ+aqbZJs1zo37vkIwDGsTb31FsZ5aaXmkXtPwtsGNeWXp6 LVYRlIG+of8BCAsVJkcumjB8SxgX1aaBrKTXDiB1bpngm1KWsvHd6I8BLrYL12u7RkWo Nwlw== X-Gm-Message-State: AOAM533yJcZoYGZ+5nR3HfgKX/jBFLNME1wXNnamc6HlHS5En0NBVoGW 2MyeBveEzL+zwvjzZMp7zp9GZg== X-Google-Smtp-Source: ABdhPJwWW357u1OYxJ1UGB7pS1idebUYuqZkILxJPfceVd8mb1bKABtlpxYfWjm6yx9of47cDJMuyA== X-Received: by 2002:adf:efcb:0:b0:20d:24e:a1ce with SMTP id i11-20020adfefcb000000b0020d024ea1cemr16802543wrp.159.1652880608083; Wed, 18 May 2022 06:30:08 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v14-20020a056000144e00b0020cdf6ecafbsm2905580wrx.81.2022.05.18.06.30.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 06:30:07 -0700 (PDT) From: Bryan O'Donoghue <bryan.odonoghue@linaro.org> To: robert.foss@linaro.org, todor.too@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org Cc: vladimir.zapolskiy@linaro.org, mchehab@kernel.org, robh+dt@kernel.org, krzk+dt@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, mmitkov@quicinc.com, jgrahsl@snap.com, hfink@snap.com, Bryan O'Donoghue <bryan.odonoghue@linaro.org> Subject: [PATCH 1/1] arm64: dts: qcom: qrb5165-rb5: Enable the IMX577 on cam1 Date: Wed, 18 May 2022 14:30:04 +0100 Message-Id: <20220518133004.342775-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220518133004.342775-1-bryan.odonoghue@linaro.org> References: <20220518133004.342775-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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=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: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.5 (--) X-LSpam-Report: No, score=-2.5 required=5.0 tests=BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1 autolearn=ham autolearn_force=no |
Series |
Switch on IMX577 on RB5
|
|
Commit Message
Bryan O'Donoghue
May 18, 2022, 1:30 p.m. UTC
The IMX577 is on CCI1/CSI2 providing four lanes of camera data.
An example media-ctl pipeline is:
media-ctl --reset
media-ctl -v -d /dev/media0 -V '"imx412 '20-001a'":0[fmt:SRGGB10/4056x3040 field:none]'
media-ctl -V '"msm_csiphy2":0[fmt:SRGGB10/4056x3040]'
media-ctl -V '"msm_csid0":0[fmt:SRGGB10/4056x3040]'
media-ctl -V '"msm_vfe0_rdi0":0[fmt:SRGGB10/4056x3040]'
media-ctl -l '"msm_csiphy2":1->"msm_csid0":0[1]'
media-ctl -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]'
yavta -B capture-mplane -c -I -n 5 -f SRGGB10P -s 4056x3040 -F /dev/video0
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 98 ++++++++++++++++++++++++
1 file changed, 98 insertions(+)
Comments
Hi! On 18/05/2022 15:30, Bryan O'Donoghue wrote: > The IMX577 is on CCI1/CSI2 providing four lanes of camera data. Commit says IMX577, code says IMX412. > > An example media-ctl pipeline is: > > media-ctl --reset > media-ctl -v -d /dev/media0 -V '"imx412 '20-001a'":0[fmt:SRGGB10/4056x3040 field:none]' > media-ctl -V '"msm_csiphy2":0[fmt:SRGGB10/4056x3040]' > media-ctl -V '"msm_csid0":0[fmt:SRGGB10/4056x3040]' > media-ctl -V '"msm_vfe0_rdi0":0[fmt:SRGGB10/4056x3040]' > media-ctl -l '"msm_csiphy2":1->"msm_csid0":0[1]' > media-ctl -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]' > > yavta -B capture-mplane -c -I -n 5 -f SRGGB10P -s 4056x3040 -F /dev/video0 > > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > --- > arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 98 ++++++++++++++++++++++++ > 1 file changed, 98 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > index 0e63f707b911..48b31790c434 100644 > --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > @@ -1203,6 +1203,43 @@ sdc2_card_det_n: sd-card-det-n { > function = "gpio"; > bias-pull-up; > }; > + > + cam2_default: cam2-default { > + rst { > + pins = "gpio78"; > + function = "gpio"; > + > + drive-strength = <2>; > + bias-disable; Other pins in this DT don't have a newline between function and drive-strength, please remove it for consistency. > + }; > + > + mclk { > + pins = "gpio96"; > + function = "cam_mclk"; > + > + drive-strength = <16>; > + bias-disable; > + }; > + }; > + > + cam2_suspend: cam2-suspend { > + rst { > + pins = "gpio78"; > + function = "gpio"; > + > + drive-strength = <2>; > + bias-pull-down; > + output-low; > + }; > + > + mclk { > + pins = "gpio96"; > + function = "cam_mclk"; > + > + drive-strength = <2>; > + bias-disable; > + }; > + }; > }; > > &uart12 { > @@ -1294,3 +1331,64 @@ &qup_spi0_data_clk { > drive-strength = <6>; > bias-disable; > }; > + > +&camcc { > + status = "okay"; > +}; It's enabled by default. > + > +&camss { > + status = "okay"; > + vdda-phy-supply = <&vreg_l5a_0p88>; > + vdda-pll-supply = <&vreg_l9a_1p2>; > + > + ports { Maybe the port definitions along with #-cells here and on camss could be moved to the SoC DTSI? > + #address-cells = <1>; > + #size-cells = <0>; > + > + /* The port index denotes CSIPHY id i.e. csiphy2 */ > + port@2 { > + reg = <2>; > + csiphy2_ep: endpoint { > + clock-lanes = <7>; > + data-lanes = <0 1 2 3>; > + remote-endpoint = <&imx412_ep>; > + }; > + > + }; > + }; > +}; > + > +&cci1 { > + status = "okay"; > +}; > + > +&cci1_i2c0 { > + camera@1a { > + compatible = "sony,imx412"; > + reg = <0x1a>; > + > + reset-gpios = <&tlmm 78 GPIO_ACTIVE_LOW>; > + pinctrl-names = "default", "suspend"; > + pinctrl-0 = <&cam2_default>; > + pinctrl-1 = <&cam2_suspend>; > + > + clocks = <&camcc CAM_CC_MCLK2_CLK>; > + assigned-clocks = <&camcc CAM_CC_MCLK2_CLK>; > + assigned-clock-rates = <24000000>; > + > + power-domains = <&camcc TITAN_TOP_GDSC>; > + dovdd-supply = <&vreg_l7f_1p8>; > + avdd-supply = <&vdc_5v>; > + dvdd-supply = <&vdc_5v>; > + > + status = "okay"; It's enabled by default. Konrad > + port { > + imx412_ep: endpoint { > + clock-lanes = <1>; > + link-frequencies = /bits/ 64 <600000000>; > + data-lanes = <1 2 3 4>; > + remote-endpoint = <&csiphy2_ep>; > + }; > + }; > + }; > +}; >
Hi Konrad, On 5/18/22 16:55, Konrad Dybcio wrote: > Hi! > > > On 18/05/2022 15:30, Bryan O'Donoghue wrote: >> The IMX577 is on CCI1/CSI2 providing four lanes of camera data. > > Commit says IMX577, code says IMX412. > > >> >> An example media-ctl pipeline is: >> >> media-ctl --reset >> media-ctl -v -d /dev/media0 -V '"imx412 '20-001a'":0[fmt:SRGGB10/4056x3040 field:none]' >> media-ctl -V '"msm_csiphy2":0[fmt:SRGGB10/4056x3040]' >> media-ctl -V '"msm_csid0":0[fmt:SRGGB10/4056x3040]' >> media-ctl -V '"msm_vfe0_rdi0":0[fmt:SRGGB10/4056x3040]' >> media-ctl -l '"msm_csiphy2":1->"msm_csid0":0[1]' >> media-ctl -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]' >> >> yavta -B capture-mplane -c -I -n 5 -f SRGGB10P -s 4056x3040 -F /dev/video0 >> >> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> >> --- >> arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 98 ++++++++++++++++++++++++ >> 1 file changed, 98 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts >> index 0e63f707b911..48b31790c434 100644 >> --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts >> +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts >> @@ -1203,6 +1203,43 @@ sdc2_card_det_n: sd-card-det-n { >> function = "gpio"; >> bias-pull-up; >> }; >> + >> + cam2_default: cam2-default { >> + rst { >> + pins = "gpio78"; >> + function = "gpio"; >> + >> + drive-strength = <2>; >> + bias-disable; > > Other pins in this DT don't have a newline between function and > drive-strength, please remove it for consistency. > > >> + }; >> + >> + mclk { >> + pins = "gpio96"; >> + function = "cam_mclk"; >> + >> + drive-strength = <16>; >> + bias-disable; >> + }; >> + }; >> + >> + cam2_suspend: cam2-suspend { >> + rst { >> + pins = "gpio78"; >> + function = "gpio"; >> + >> + drive-strength = <2>; >> + bias-pull-down; >> + output-low; >> + }; >> + >> + mclk { >> + pins = "gpio96"; >> + function = "cam_mclk"; >> + >> + drive-strength = <2>; >> + bias-disable; >> + }; >> + }; >> }; >> >> &uart12 { >> @@ -1294,3 +1331,64 @@ &qup_spi0_data_clk { >> drive-strength = <6>; >> bias-disable; >> }; >> + >> +&camcc { >> + status = "okay"; >> +}; > > It's enabled by default. > I'd prefer to see the camera clock controller disabled by default. https://lore.kernel.org/linux-devicetree/20220518091943.734478-1-vladimir.zapolskiy@linaro.org/ >> + >> +&camss { >> + status = "okay"; >> + vdda-phy-supply = <&vreg_l5a_0p88>; >> + vdda-pll-supply = <&vreg_l9a_1p2>; >> + >> + ports { > > Maybe the port definitions along with #-cells here and on camss could be > moved to the SoC DTSI? > I agree with it. >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + /* The port index denotes CSIPHY id i.e. csiphy2 */ >> + port@2 { >> + reg = <2>; >> + csiphy2_ep: endpoint { >> + clock-lanes = <7>; >> + data-lanes = <0 1 2 3>; >> + remote-endpoint = <&imx412_ep>; >> + }; >> + >> + }; >> + }; >> +}; >> + >> +&cci1 { >> + status = "okay"; >> +}; >> + >> +&cci1_i2c0 { >> + camera@1a { >> + compatible = "sony,imx412"; >> + reg = <0x1a>; >> + >> + reset-gpios = <&tlmm 78 GPIO_ACTIVE_LOW>; >> + pinctrl-names = "default", "suspend"; >> + pinctrl-0 = <&cam2_default>; >> + pinctrl-1 = <&cam2_suspend>; >> + >> + clocks = <&camcc CAM_CC_MCLK2_CLK>; >> + assigned-clocks = <&camcc CAM_CC_MCLK2_CLK>; >> + assigned-clock-rates = <24000000>; >> + >> + power-domains = <&camcc TITAN_TOP_GDSC>; >> + dovdd-supply = <&vreg_l7f_1p8>; >> + avdd-supply = <&vdc_5v>; >> + dvdd-supply = <&vdc_5v>; >> + >> + status = "okay"; > > It's enabled by default. > -- Best wishes, Vladimir
On 18/05/2022 14:55, Konrad Dybcio wrote: > Hi! > > > On 18/05/2022 15:30, Bryan O'Donoghue wrote: >> The IMX577 is on CCI1/CSI2 providing four lanes of camera data. > > Commit says IMX577, code says IMX412. > > The silicon enabling code for imx412 from Sony is the same as is used on imx577. We have an imx577. I'll explain the difference in the V2 commit though. >> >> An example media-ctl pipeline is: >> >> media-ctl --reset >> media-ctl -v -d /dev/media0 -V '"imx412 >> '20-001a'":0[fmt:SRGGB10/4056x3040 field:none]' >> media-ctl -V '"msm_csiphy2":0[fmt:SRGGB10/4056x3040]' >> media-ctl -V '"msm_csid0":0[fmt:SRGGB10/4056x3040]' >> media-ctl -V '"msm_vfe0_rdi0":0[fmt:SRGGB10/4056x3040]' >> media-ctl -l '"msm_csiphy2":1->"msm_csid0":0[1]' >> media-ctl -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]' >> >> yavta -B capture-mplane -c -I -n 5 -f SRGGB10P -s 4056x3040 -F >> /dev/video0 >> >> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> >> --- >> arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 98 ++++++++++++++++++++++++ >> 1 file changed, 98 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts >> b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts >> index 0e63f707b911..48b31790c434 100644 >> --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts >> +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts >> @@ -1203,6 +1203,43 @@ sdc2_card_det_n: sd-card-det-n { >> function = "gpio"; >> bias-pull-up; >> }; >> + >> + cam2_default: cam2-default { >> + rst { >> + pins = "gpio78"; >> + function = "gpio"; >> + >> + drive-strength = <2>; >> + bias-disable; > > Other pins in this DT don't have a newline between function and > drive-strength, please remove it for consistency. > > >> + }; >> + >> + mclk { >> + pins = "gpio96"; >> + function = "cam_mclk"; >> + >> + drive-strength = <16>; >> + bias-disable; >> + }; >> + }; >> + >> + cam2_suspend: cam2-suspend { >> + rst { >> + pins = "gpio78"; >> + function = "gpio"; >> + >> + drive-strength = <2>; >> + bias-pull-down; >> + output-low; >> + }; >> + >> + mclk { >> + pins = "gpio96"; >> + function = "cam_mclk"; >> + >> + drive-strength = <2>; >> + bias-disable; >> + }; >> + }; >> }; >> &uart12 { >> @@ -1294,3 +1331,64 @@ &qup_spi0_data_clk { >> drive-strength = <6>; >> bias-disable; >> }; >> + >> +&camcc { >> + status = "okay"; >> +}; > > It's enabled by default. I'm assuming Vladimir's patch to disable by default goes in. I'll include his patch as #1 in V2 so its clear on this point. > >> + >> +&camss { >> + status = "okay"; >> + vdda-phy-supply = <&vreg_l5a_0p88>; >> + vdda-pll-supply = <&vreg_l9a_1p2>; >> + >> + ports { > > Maybe the port definitions along with #-cells here and on camss could be > moved to the SoC DTSI? Makes sense. --- bod
Hi Bryan, On 5/18/22 16:30, Bryan O'Donoghue wrote: > The IMX577 is on CCI1/CSI2 providing four lanes of camera data. > > An example media-ctl pipeline is: > > media-ctl --reset > media-ctl -v -d /dev/media0 -V '"imx412 '20-001a'":0[fmt:SRGGB10/4056x3040 field:none]' > media-ctl -V '"msm_csiphy2":0[fmt:SRGGB10/4056x3040]' > media-ctl -V '"msm_csid0":0[fmt:SRGGB10/4056x3040]' > media-ctl -V '"msm_vfe0_rdi0":0[fmt:SRGGB10/4056x3040]' > media-ctl -l '"msm_csiphy2":1->"msm_csid0":0[1]' > media-ctl -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]' > > yavta -B capture-mplane -c -I -n 5 -f SRGGB10P -s 4056x3040 -F /dev/video0 > > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > --- > arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 98 ++++++++++++++++++++++++ > 1 file changed, 98 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > index 0e63f707b911..48b31790c434 100644 > --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts > @@ -1203,6 +1203,43 @@ sdc2_card_det_n: sd-card-det-n { > function = "gpio"; > bias-pull-up; > }; > + > + cam2_default: cam2-default { > + rst { > + pins = "gpio78"; > + function = "gpio"; > + > + drive-strength = <2>; > + bias-disable; > + }; > + > + mclk { > + pins = "gpio96"; > + function = "cam_mclk"; > + > + drive-strength = <16>; > + bias-disable; > + }; > + }; > + > + cam2_suspend: cam2-suspend { > + rst { > + pins = "gpio78"; > + function = "gpio"; > + > + drive-strength = <2>; > + bias-pull-down; > + output-low; > + }; > + > + mclk { > + pins = "gpio96"; > + function = "cam_mclk"; > + > + drive-strength = <2>; > + bias-disable; > + }; > + }; I still stick to my opinion that the description of rst/mclk pins should be uniformly added to the SoC specific .dtsi file. The pins and functions in these device tree nodes are not changeable, a board file should just select proper pairs. Do you have any objections to it? > }; > > &uart12 { > @@ -1294,3 +1331,64 @@ &qup_spi0_data_clk { > drive-strength = <6>; > bias-disable; > }; > + > +&camcc { > + status = "okay"; > +}; > + > +&camss { > + status = "okay"; > + vdda-phy-supply = <&vreg_l5a_0p88>; > + vdda-pll-supply = <&vreg_l9a_1p2>; > + > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + > + /* The port index denotes CSIPHY id i.e. csiphy2 */ > + port@2 { > + reg = <2>; > + csiphy2_ep: endpoint { > + clock-lanes = <7>; > + data-lanes = <0 1 2 3>; > + remote-endpoint = <&imx412_ep>; > + }; > + > + }; > + }; > +}; > + > +&cci1 { > + status = "okay"; > +}; > + > +&cci1_i2c0 { > + camera@1a { > + compatible = "sony,imx412"; > + reg = <0x1a>; > + > + reset-gpios = <&tlmm 78 GPIO_ACTIVE_LOW>; > + pinctrl-names = "default", "suspend"; > + pinctrl-0 = <&cam2_default>; > + pinctrl-1 = <&cam2_suspend>; > + > + clocks = <&camcc CAM_CC_MCLK2_CLK>; > + assigned-clocks = <&camcc CAM_CC_MCLK2_CLK>; > + assigned-clock-rates = <24000000>; > + > + power-domains = <&camcc TITAN_TOP_GDSC>; Above 'power-domains' property is not needed, it shall be implied by CCI. > + dovdd-supply = <&vreg_l7f_1p8>; > + avdd-supply = <&vdc_5v>; > + dvdd-supply = <&vdc_5v>; > + > + status = "okay"; Here 'status' property is not needed. > + port { > + imx412_ep: endpoint { > + clock-lanes = <1>; > + link-frequencies = /bits/ 64 <600000000>; > + data-lanes = <1 2 3 4>; > + remote-endpoint = <&csiphy2_ep>; > + }; > + }; > + }; > +}; I run on you branch on top of linux-next, but switch build options from modules to built-in CONFIG_I2C_QCOM_CCI=y CONFIG_VIDEO_QCOM_CAMSS=y I didn't get the sensor initialized and hence there is no /dev/media0 node: [ 0.620205] i2c-qcom-cci ac50000.cci: Found 19200000 cci clk rate while 37500000 was expected [ 0.620551] i2c 20-001a: Fixing up cyclic dependency with ac6a000.camss [ 0.620754] imx412 20-001a: Looking up dovdd-supply from device tree [ 0.620797] imx412 20-001a: Looking up avdd-supply from device tree [ 0.620860] imx412 20-001a: Looking up dvdd-supply from device tree [ 0.620876] duplicated lane 1 in clock-lanes, using defaults [ 0.622789] imx412 20-001a: failed to find sensor: -5 [ 0.622880] imx412: probe of 20-001a failed with error -5 I believe the problem could be related to CCI, please remind me, are there I2C bus pull-ups? -- Best wishes, Vladimir
Hi Bryan, I love your patch! Yet something to improve: [auto build test ERROR on robh/for-next] [also build test ERROR on v5.18-rc7] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/intel-lab-lkp/linux/commits/Bryan-O-Donoghue/Switch-on-IMX577-on-RB5/20220518-213438 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20220521/202205211233.z5zpxDvl-lkp@intel.com/config) compiler: aarch64-linux-gcc (GCC) 11.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/9d9ad87ded5bf5f2f790a549863ad3d63b7336f3 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Bryan-O-Donoghue/Switch-on-IMX577-on-RB5/20220518-213438 git checkout 9d9ad87ded5bf5f2f790a549863ad3d63b7336f3 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): >> Error: arch/arm64/boot/dts/qcom/qrb5165-rb5.dts:1335.1-7 Label or path camcc not found >> Error: arch/arm64/boot/dts/qcom/qrb5165-rb5.dts:1339.1-7 Label or path camss not found >> Error: arch/arm64/boot/dts/qcom/qrb5165-rb5.dts:1361.1-6 Label or path cci1 not found >> Error: arch/arm64/boot/dts/qcom/qrb5165-rb5.dts:1375.20-21 syntax error FATAL ERROR: Unable to parse input tree
On 18/05/2022 20:09, Vladimir Zapolskiy wrote: > > I run on you branch on top of linux-next, but switch build options from > modules to built-in > > CONFIG_I2C_QCOM_CCI=y > CONFIG_VIDEO_QCOM_CAMSS=y > > I didn't get the sensor initialized and hence there is no /dev/media0 node: > > [ 0.620205] i2c-qcom-cci ac50000.cci: Found 19200000 cci clk rate > while 37500000 was expected > [ 0.620551] i2c 20-001a: Fixing up cyclic dependency with ac6a000.camss > [ 0.620754] imx412 20-001a: Looking up dovdd-supply from device tree > [ 0.620797] imx412 20-001a: Looking up avdd-supply from device tree > [ 0.620860] imx412 20-001a: Looking up dvdd-supply from device tree > [ 0.620876] duplicated lane 1 in clock-lanes, using defaults > [ 0.622789] imx412 20-001a: failed to find sensor: -5 > [ 0.622880] imx412: probe of 20-001a failed with error -5 > > I believe the problem could be related to CCI, please remind me, are > there I2C bus pull-ups? Hmm. Just trying to replicate this on linux-next https://git.linaro.org/people/bryan.odonoghue/kernel.git/log/?h=linux-next-22-05-22%2bimx577-rb5 root@linaro-gnome:~# zcat /proc/config.gz | grep -e CONFIG_I2C_QCOM_CCI -e CONFIG_VIDEO_QCOM_CAMSS CONFIG_I2C_QCOM_CCI=y CONFIG_VIDEO_QCOM_CAMSS=y root@linaro-gnome:~# uname -a Linux linaro-gnome 5.18.0-rc7-next-20220518-00006-g3beef4d1d353-dirty #40 SMP PREEMPT Sun May 22 17:53:29 IST 2022 aarch64 GNU/Linux root@linaro-gnome:~# cam -l Available cameras: 1: 'imx412' (/base/soc@0/cci@ac50000/i2c-bus@0/camera@1a) are you compiling everything in ? --- bod
Hi Bryan, On 5/22/22 20:10, Bryan O'Donoghue wrote: > On 18/05/2022 20:09, Vladimir Zapolskiy wrote: >> >> I run on you branch on top of linux-next, but switch build options from >> modules to built-in >> >> CONFIG_I2C_QCOM_CCI=y >> CONFIG_VIDEO_QCOM_CAMSS=y >> >> I didn't get the sensor initialized and hence there is no /dev/media0 node: >> >> [ 0.620205] i2c-qcom-cci ac50000.cci: Found 19200000 cci clk rate >> while 37500000 was expected >> [ 0.620551] i2c 20-001a: Fixing up cyclic dependency with ac6a000.camss >> [ 0.620754] imx412 20-001a: Looking up dovdd-supply from device tree >> [ 0.620797] imx412 20-001a: Looking up avdd-supply from device tree >> [ 0.620860] imx412 20-001a: Looking up dvdd-supply from device tree >> [ 0.620876] duplicated lane 1 in clock-lanes, using defaults >> [ 0.622789] imx412 20-001a: failed to find sensor: -5 >> [ 0.622880] imx412: probe of 20-001a failed with error -5 >> >> I believe the problem could be related to CCI, please remind me, are >> there I2C bus pull-ups? > > Hmm. > > Just trying to replicate this on linux-next > > https://git.linaro.org/people/bryan.odonoghue/kernel.git/log/?h=linux-next-22-05-22%2bimx577-rb5 > > root@linaro-gnome:~# zcat /proc/config.gz | grep -e CONFIG_I2C_QCOM_CCI > -e CONFIG_VIDEO_QCOM_CAMSS > CONFIG_I2C_QCOM_CCI=y > CONFIG_VIDEO_QCOM_CAMSS=y > > root@linaro-gnome:~# uname -a > Linux linaro-gnome 5.18.0-rc7-next-20220518-00006-g3beef4d1d353-dirty > #40 SMP PREEMPT Sun May 22 17:53:29 IST 2022 aarch64 GNU/Linux > > root@linaro-gnome:~# cam -l > Available cameras: > 1: 'imx412' (/base/soc@0/cci@ac50000/i2c-bus@0/camera@1a) > > are you compiling everything in ? it's some kind of a race related to probes of CAMSS, CCI and IMX412 drivers. Since I'm able to reproduce it, I'll take the analysis on myself, and it does not interfere with your patch series. -- Best wishes, Vladimir
On 23/05/2022 14:50, Vladimir Zapolskiy wrote: > it's some kind of a race related to probes of CAMSS, CCI and IMX412 > drivers. > > Since I'm able to reproduce it, I'll take the analysis on myself, and it > does not > interfere with your patch series. Ah, I think I have it pretty much narrowed down now. Needed to switch off modules entirely. First probe fails, second probe succeeds. Thanks anyway, I think I'm close to fix. --- bod
diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts index 0e63f707b911..48b31790c434 100644 --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts @@ -1203,6 +1203,43 @@ sdc2_card_det_n: sd-card-det-n { function = "gpio"; bias-pull-up; }; + + cam2_default: cam2-default { + rst { + pins = "gpio78"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + + mclk { + pins = "gpio96"; + function = "cam_mclk"; + + drive-strength = <16>; + bias-disable; + }; + }; + + cam2_suspend: cam2-suspend { + rst { + pins = "gpio78"; + function = "gpio"; + + drive-strength = <2>; + bias-pull-down; + output-low; + }; + + mclk { + pins = "gpio96"; + function = "cam_mclk"; + + drive-strength = <2>; + bias-disable; + }; + }; }; &uart12 { @@ -1294,3 +1331,64 @@ &qup_spi0_data_clk { drive-strength = <6>; bias-disable; }; + +&camcc { + status = "okay"; +}; + +&camss { + status = "okay"; + vdda-phy-supply = <&vreg_l5a_0p88>; + vdda-pll-supply = <&vreg_l9a_1p2>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + /* The port index denotes CSIPHY id i.e. csiphy2 */ + port@2 { + reg = <2>; + csiphy2_ep: endpoint { + clock-lanes = <7>; + data-lanes = <0 1 2 3>; + remote-endpoint = <&imx412_ep>; + }; + + }; + }; +}; + +&cci1 { + status = "okay"; +}; + +&cci1_i2c0 { + camera@1a { + compatible = "sony,imx412"; + reg = <0x1a>; + + reset-gpios = <&tlmm 78 GPIO_ACTIVE_LOW>; + pinctrl-names = "default", "suspend"; + pinctrl-0 = <&cam2_default>; + pinctrl-1 = <&cam2_suspend>; + + clocks = <&camcc CAM_CC_MCLK2_CLK>; + assigned-clocks = <&camcc CAM_CC_MCLK2_CLK>; + assigned-clock-rates = <24000000>; + + power-domains = <&camcc TITAN_TOP_GDSC>; + dovdd-supply = <&vreg_l7f_1p8>; + avdd-supply = <&vdc_5v>; + dvdd-supply = <&vdc_5v>; + + status = "okay"; + port { + imx412_ep: endpoint { + clock-lanes = <1>; + link-frequencies = /bits/ 64 <600000000>; + data-lanes = <1 2 3 4>; + remote-endpoint = <&csiphy2_ep>; + }; + }; + }; +};