[PATCH v2 1/3] arm64: dts: qcom: lemans: add CSI2 D-PHY common-phy providers

sashiko-bot at kernel.org sashiko-bot at kernel.org
Tue Nov 3 14:24:18 PST 2026


Thank you for your contribution! Sashiko AI review found 5 potential issue(s) to consider:
- [Medium] arm64: dts: qcom: lemans: undocumented qcom,sa8775p-csi2-phy compatible
- [Medium] arm64: dts: qcom: lemans: single power-domain on csiphy0..3 causes -EEXIST
- [Medium] arm64: dts: qcom: lemans: csiphy_opp_table placed inside soc at 0 simple-bus
- [Medium] arm64: dts: qcom: lemans: unsupported 300 MHz OPP in csiphy_opp_table
- [Low] arm64: dts: qcom: lemans: csiphy0..3 placed out of address order before camss
--

commit c410d584d10da78b4d7e3c88848890055466fbee
Author: Anusha Arun Nandi <anusha.nandi at oss.qualcomm.com>

arm64: dts: qcom: lemans: add CSI2 D-PHY common-phy providers

This commit adds four disabled standalone qcom,sa8775p-csi2-phy PHY provider
nodes (csiphy0..csiphy3) and an associated operating-points-v2 table in
arch/arm64/boot/dts/qcom/lemans.dtsi so boards can wire camera sensors
through the non-legacy CAMSS PHY path.

> diff --git a/arch/arm64/boot/dts/qcom/lemans.dtsi b/arch/arm64/boot/dts/qcom/lemans.dtsi
> index 1fdb72fa55184..2a30bf1c82af1 100644
> --- a/arch/arm64/boot/dts/qcom/lemans.dtsi
> +++ b/arch/arm64/boot/dts/qcom/lemans.dtsi
> @@ -5164,6 +5164,146 @@ cci3_i2c1: i2c-bus at 1 {
>  			};
>  		};
>  
> +		csiphy0: phy at ac9c000 {
> +			compatible = "qcom,sa8775p-csi2-phy";

[Severity: Medium]
As reported by Sashiko on v1 [1], is there a Devicetree binding schema or PHY
driver support for qcom,sa8775p-csi2-phy?

In Documentation/devicetree/bindings/phy/qcom,x1e80100-csi2-phy.yaml, only
qcom,x1e80100-csi2-phy and qcom,glymur-csi2-phy are documented, so
dtbs_check will fail on csiphy0..csiphy3.

Similarly, phy_qcom_mipi_csi2_of_match_table in
drivers/phy/qualcomm/phy-qcom-mipi-csi2-core.c only matches
qcom,x1e80100-csi2-phy:

    static const struct of_device_id phy_qcom_mipi_csi2_of_match_table[] = {
        { .compatible = "qcom,x1e80100-csi2-phy", .data = &mipi_csi2_dphy_4nm_x1e },
        { }
    };

When a board or overlay enables any of csiphy0..csiphy3 and wires a sensor
endpoint through it to camss, camss_probe() -> camss_init_subdevices() ->
camss_detect_legacy_phy() sets camss->legacy_phy = false, and
msm_csiphy_subdev_init() in drivers/media/platform/qcom/camss/camss-csiphy.c
calls:

    csiphy->phy = devm_phy_get_by_of_node(dev, remote);

Without a driver matching qcom,sa8775p-csi2-phy (which uses the 5nm 2PH
v1.3.0 register layout rather than X1E80100's 4nm 2PH v2.1.2 layout), won't
devm_phy_get_by_of_node() return -EPROBE_DEFER indefinitely?

> +			reg = <0x0 0x0ac9c000 0x0 0x2000>;
> +
> +			clocks = <&camcc CAM_CC_CSIPHY0_CLK>,
> +				 <&camcc CAM_CC_CSI0PHYTIMER_CLK>;
> +			clock-names = "core",
> +				      "timer";
> +
> +			interrupts = <GIC_SPI 477 IRQ_TYPE_EDGE_RISING>;
> +
> +			operating-points-v2 = <&csiphy_opp_table>;
> +
> +			power-domains = <&camcc CAM_CC_TITAN_TOP_GDSC>;
> +			power-domain-names = "top";

[Severity: Medium]
Will phy_qcom_mipi_csi2_probe() fail with -EEXIST when power-domains only
contains a single entry on csiphy0..csiphy3?

When a platform device has a single power-domains phandle in DT,
platform_probe() -> dev_pm_domain_attach() -> genpd_dev_pm_attach() in
drivers/pmdomain/core.c attaches that domain to dev->pm_domain before calling
the driver's probe function:

    if (of_count_phandle_with_args(dev->of_node, "power-domains",
                                   "#power-domain-cells") != 1)
        return 0;

    return __genpd_dev_pm_attach(dev, dev, 0, 1, true);

When phy_qcom_mipi_csi2_probe() in
drivers/phy/qualcomm/phy-qcom-mipi-csi2-core.c subsequently calls
phy_qcom_mipi_csi2_attach_pm_domains() -> devm_pm_domain_attach_list() ->
dev_pm_domain_attach_list() in drivers/base/power/common.c, it rejects the
device because dev->pm_domain is already populated:

    if (dev->pm_domain)
        return -EEXIST;

In addition, shouldn't csiphy0..csiphy3 also provide the ahb clock in clocks
and clock-names, the scaled rail power domains (mmcx, mx), and the vdda
regulator supplies expected by
Documentation/devicetree/bindings/phy/qcom,x1e80100-csi2-phy.yaml and
drivers/phy/qualcomm/phy-qcom-mipi-csi2-3ph-dphy.c?

[ ... ]

> +		csiphy_opp_table: opp-table-csiphy {
> +			compatible = "operating-points-v2";

[Severity: Medium]
As reported by Sashiko on v1 [2], should csiphy_opp_table: opp-table-csiphy
be placed under the root node outside soc: soc at 0?

Because soc: soc at 0 has compatible = "simple-bus", placing opp-table-csiphy as
a direct child of soc at 0 without a unit address, reg, or ranges property
triggers a dtc simple_bus_reg failure in check_simple_bus_reg() in
scripts/dtc/checks.c:

    if (!cells) {
        if (node->parent->parent && !(node->bus == &simple_bus))
            FAIL(c, dti, node, "missing or empty reg/ranges property");
        return;
    }

Shared OPP tables in arch/arm64/boot/dts/qcom/lemans.dtsi (such as
qup_opp_table_100mhz: opp-table-qup100mhz) are placed under the root node
rather than inside soc at 0.

> +
> +			opp-300000000 {
> +				opp-hz = /bits/ 64 <300000000>;
> +			};

[Severity: Medium]
As reported by Sashiko on v1 [3], does the SA8775P CAMCC clock driver support
the 300 MHz operating point in csiphy_opp_table?

In drivers/phy/qualcomm/phy-qcom-mipi-csi2-core.c, phy_qcom_mipi_csi2_probe()
associates the OPP table with the "core" clock (CAM_CC_CSIPHY0_CLK ..
CAM_CC_CSIPHY3_CLK). In drivers/clk/qcom/camcc-sa8775p.c, both
cam_cc_cphy_rx_clk_src and cam_cc_csi0phytimer_clk_src ..
cam_cc_csi3phytimer_clk_src use ftbl_cam_cc_cphy_rx_clk_src, which only
defines 400 MHz:

    static const struct freq_tbl ftbl_cam_cc_cphy_rx_clk_src[] = {
        F(400000000, P_CAM_CC_PLL0_OUT_ODD, 1, 0, 0),
        { }
    };

This also matches csiphy_res_8775p in
drivers/media/platform/qcom/camss/camss.c, which only lists 400000000 Hz.
Should opp-300000000 be dropped from csiphy_opp_table?

> +
> +			opp-400000000 {
> +				opp-hz = /bits/ 64 <400000000>;
> +			};
> +		};
> +
>  		camss: isp at ac78000 {
>  			compatible = "qcom,sa8775p-camss";

[Severity: Low]
As reported by Sashiko on v1 [4], should csiphy0..csiphy3
(phy at ac9c000..phy@aca2000) be placed after camss: isp at ac78000 and before
camcc: clock-controller at ade0000 so that child nodes under soc: soc at 0 remain
sorted by ascending unit address?

[1] https://lore.kernel.org/r/20261017001116.2318647-2-anusha.nandi@oss.qualcomm.com
[2] https://lore.kernel.org/r/20261017001116.2318647-2-anusha.nandi@oss.qualcomm.com
[3] https://lore.kernel.org/r/20261017001116.2318647-2-anusha.nandi@oss.qualcomm.com
[4] https://lore.kernel.org/r/20261017001116.2318647-2-anusha.nandi@oss.qualcomm.com

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261103221026.3662383-1-anusha.nandi@oss.qualcomm.com?part=1



More information about the linux-phy mailing list