From: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
To: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] arm64: dts: qcom: sc8280xp-x13s: Enable RGB sensor
Date: Mon, 5 Aug 2024 00:36:41 +0300 [thread overview]
Message-ID: <1d63d916-72e3-4a89-9fad-8baef584f9d5@linaro.org> (raw)
In-Reply-To: <20240802-b4-linux-next-24-07-31-camss-sc8280xp-lenovo-rgb-v2-v2-1-a80a301dba16@linaro.org>
Hi Bryan.
On 8/2/24 14:05, Bryan O'Donoghue wrote:
> Enable the main RGB sensor on the Lenovo x13s a five megapixel 2 lane DPHY
> MIPI sensor connected to cisphy0.
>
> With the pm8008 patches recently applied to the x13s dtsi we can now also
> enable the RGB sensor. Once done we have all upstream support necessary for
> the RGB sensor on x13s.
>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
> The Lenovo x13s has a five megapixel ov5675 sensor as well as a one
> megpixel ov9734 B+W NOIR sensor for low-light face detection login.
>
> This patch enables the RGB sensor.
>
> A gpio exists in the upstream dts to indicate camera activity which
> currently we don't tie to CAMSS activity yet.
>
> Running
>
> - A Linux distro which ships libcamera > 0.3.0
> - Firefox nightly
> - Setting Firefox about:config:media.webrtc.capture.allow-pipewire = true
>
> It should then be possible to use the on-board MIPI camera for Zoom,
> Hangouts etc.
>
> Changes in v2:
> - Drops useless assigned-clocks entry
> - Link to v1: https://lore.kernel.org/r/20240801-b4-linux-next-24-07-31-camss-sc8280xp-lenovo-rgb-v2-v1-1-30622c6a0c48@linaro.org
> ---
> .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 72 ++++++++++++++++++++++
> 1 file changed, 72 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index a7c5a3f5926c7..2bdfff2a16cad 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -592,6 +592,62 @@ vreg_l10d: ldo10 {
> };
> };
>
> +&camcc {
> + status = "okay";
> +};
This is not needed, it's not disabled, please remove.
> +
> +&camss {
> + vdda-phy-supply = <&vreg_l6d>;
> + vdda-pll-supply = <&vreg_l4d>;
> +
> + status = "okay";
> +
> + ports {
> + /* The port index denotes CSIPHY id i.e. csiphy0 */
I believe a better place for such a comment would be at sc8280xp.dtsi
> + port@0 {
> + csiphy0_lanes01_ep: endpoint@0 {
> + reg = <0>;
> + clock-lanes = <7>;
> + data-lanes = <0 1>;
> + remote-endpoint = <&ov5675_ep>;
> + };
> + };
> + };
> +};
> +
> +&cci2 {
> + status = "okay";
> +};
> +
> +&cci2_i2c1 {
> + camera@10 {
> + compatible = "ovti,ov5675";
> + reg = <0x10>;
> +
> + reset-gpios = <&tlmm 15 GPIO_ACTIVE_LOW>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&cam_rgb_default>;
> +
> + clocks = <&camcc CAMCC_MCLK3_CLK>;
> +
> + orientation = <0>; /* Front facing */
> +
> + avdd-supply = <&vreg_l6q>;
> + dvdd-supply = <&vreg_l2q>;
> + dovdd-supply = <&vreg_l7q>;
> +
> + port {
> + ov5675_ep: endpoint {
> + clock-lanes = <0>;
> + data-lanes = <1 2>;
> + link-frequencies = /bits/ 64 <450000000>;
> + remote-endpoint = <&csiphy0_lanes01_ep>;
> + };
> + };
> +
> + };
> +};
> +
> &dispcc0 {
> status = "okay";
> };
> @@ -1436,6 +1492,22 @@ cam_indicator_en: cam-indicator-en-state {
> bias-disable;
> };
>
> + cam_rgb_default: cam-rgb-default-state {
> + mclk-pins {
> + pins = "gpio17";
> + function = "cam_mclk";
> + drive-strength = <16>;
> + bias-disable;
> + };
> +
> + sc-rgb-xshut-n-pins {
> + pins = "gpio15";
> + function = "gpio";
> + drive-strength = <2>;
> + bias-disable;
> + };
> + };
> +
> edp_reg_en: edp-reg-en-state {
> pins = "gpio25";
> function = "gpio";
>
> ---
> base-commit: cd19ac2f903276b820f5d0d89de0c896c27036ed
> change-id: 20240731-b4-linux-next-24-07-31-camss-sc8280xp-lenovo-rgb-v2-525b250dfb84
Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
--
Best wishes,
Vladimir
prev parent reply other threads:[~2024-08-04 21:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-02 11:05 [PATCH v2] arm64: dts: qcom: sc8280xp-x13s: Enable RGB sensor Bryan O'Donoghue
2024-08-04 21:36 ` Vladimir Zapolskiy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1d63d916-72e3-4a89-9fad-8baef584f9d5@linaro.org \
--to=vladimir.zapolskiy@linaro.org \
--cc=andersson@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).