* [PATCH 1/2] arm64: dts: qcom: qcm2290: Add CCI node
@ 2025-04-01 14:36 Loic Poulain
2025-04-01 14:36 ` [PATCH 2/2] dt-bindings: i2c: qcom-cci: Document QCM2290 compatible Loic Poulain
2025-04-01 15:06 ` [PATCH 1/2] arm64: dts: qcom: qcm2290: Add CCI node Konrad Dybcio
0 siblings, 2 replies; 6+ messages in thread
From: Loic Poulain @ 2025-04-01 14:36 UTC (permalink / raw)
To: andersson, konradybcio, robh, krzk+dt
Cc: linux-arm-msm, devicetree, Loic Poulain
Add Camera Control Interface (CCI), supporting two I2C masters.
Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/qcm2290.dtsi | 44 +++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/qcm2290.dtsi b/arch/arm64/boot/dts/qcom/qcm2290.dtsi
index 7fb5de92bc4c..927dbfe61e4a 100644
--- a/arch/arm64/boot/dts/qcom/qcm2290.dtsi
+++ b/arch/arm64/boot/dts/qcom/qcm2290.dtsi
@@ -646,6 +646,20 @@ data-pins {
bias-pull-up;
};
};
+
+ cci0_default: cci0-default-state {
+ pins = "gpio22", "gpio23";
+ function = "cci_i2c";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ cci1_default: cci1-default-state {
+ pins = "gpio29", "gpio30";
+ function = "cci_i2c";
+ drive-strength = <2>;
+ bias-disable;
+ };
};
gcc: clock-controller@1400000 {
@@ -1603,6 +1617,36 @@ adreno_smmu: iommu@59a0000 {
#iommu-cells = <2>;
};
+ cci: cci@5c1b000 {
+ compatible = "qcom,qcm2290-cci", "qcom,msm8996-cci";
+ reg = <0x0 0x5c1b000 0x0 0x1000>;
+ interrupts = <GIC_SPI 206 IRQ_TYPE_EDGE_RISING>;
+ power-domains = <&gcc GCC_CAMSS_TOP_GDSC>;
+ clocks = <&gcc GCC_CAMSS_TOP_AHB_CLK>, <&gcc GCC_CAMSS_CCI_0_CLK>;
+ clock-names = "camss_top_ahb", "cci";
+ assigned-clocks = <&gcc GCC_CAMSS_CCI_0_CLK>;
+ assigned-clock-rates = <37500000>;
+ pinctrl-0 = <&cci0_default &cci1_default>;
+ pinctrl-names = "default";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+
+ cci_i2c0: i2c-bus@0 {
+ reg = <0>;
+ clock-frequency = <400000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ cci_i2c1: i2c-bus@1 {
+ reg = <1>;
+ clock-frequency = <400000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+
mdss: display-subsystem@5e00000 {
compatible = "qcom,qcm2290-mdss";
reg = <0x0 0x05e00000 0x0 0x1000>;
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] dt-bindings: i2c: qcom-cci: Document QCM2290 compatible
2025-04-01 14:36 [PATCH 1/2] arm64: dts: qcom: qcm2290: Add CCI node Loic Poulain
@ 2025-04-01 14:36 ` Loic Poulain
2025-04-01 14:59 ` Krzysztof Kozlowski
2025-04-01 15:10 ` Konrad Dybcio
2025-04-01 15:06 ` [PATCH 1/2] arm64: dts: qcom: qcm2290: Add CCI node Konrad Dybcio
1 sibling, 2 replies; 6+ messages in thread
From: Loic Poulain @ 2025-04-01 14:36 UTC (permalink / raw)
To: andersson, konradybcio, robh, krzk+dt
Cc: linux-arm-msm, devicetree, Loic Poulain
The CCI on QCM2290 is the interface for controlling camera sensor over I2C.
It requires only two clocks.
Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
---
.../devicetree/bindings/i2c/qcom,i2c-cci.yaml | 23 +++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
index 73144473b9b2..1632e3c01ed2 100644
--- a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
+++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
@@ -25,6 +25,7 @@ properties:
- items:
- enum:
+ - qcom,qcm2290-cci
- qcom,sc7280-cci
- qcom,sc8280xp-cci
- qcom,sdm670-cci
@@ -44,11 +45,11 @@ properties:
const: 0
clocks:
- minItems: 3
+ minItems: 2
maxItems: 6
clock-names:
- minItems: 3
+ minItems: 2
maxItems: 6
interrupts:
@@ -119,6 +120,24 @@ allOf:
- const: camss_top_ahb
- const: cci_ahb
- const: cci
+ - if:
+ properties:
+ compatible:
+ oneOf:
+ - contains:
+ enum:
+ - qcom,qcm2290-cci
+
+ - const: qcom,msm8996-cci
+ then:
+ properties:
+ clocks:
+ minItems: 2
+ maxItems: 2
+ clock-names:
+ items:
+ - const: camss_top_ahb
+ - const: cci
- if:
properties:
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] dt-bindings: i2c: qcom-cci: Document QCM2290 compatible
2025-04-01 14:36 ` [PATCH 2/2] dt-bindings: i2c: qcom-cci: Document QCM2290 compatible Loic Poulain
@ 2025-04-01 14:59 ` Krzysztof Kozlowski
2025-04-02 8:12 ` Krzysztof Kozlowski
2025-04-01 15:10 ` Konrad Dybcio
1 sibling, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2025-04-01 14:59 UTC (permalink / raw)
To: Loic Poulain, andersson, konradybcio, robh, krzk+dt
Cc: linux-arm-msm, devicetree
On 01/04/2025 16:36, Loic Poulain wrote:
> The CCI on QCM2290 is the interface for controlling camera sensor over I2C.
> It requires only two clocks.
>
> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> ---
> .../devicetree/bindings/i2c/qcom,i2c-cci.yaml | 23 +++++++++++++++++--
Bindings patch goes before the user, usually.
> 1 file changed, 21 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
> index 73144473b9b2..1632e3c01ed2 100644
> --- a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
> +++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
> @@ -25,6 +25,7 @@ properties:
>
> - items:
> - enum:
> + - qcom,qcm2290-cci
> - qcom,sc7280-cci
> - qcom,sc8280xp-cci
> - qcom,sdm670-cci
> @@ -44,11 +45,11 @@ properties:
> const: 0
>
> clocks:
> - minItems: 3
> + minItems: 2
> maxItems: 6
>
> clock-names:
> - minItems: 3
> + minItems: 2
> maxItems: 6
>
> interrupts:
> @@ -119,6 +120,24 @@ allOf:
> - const: camss_top_ahb
> - const: cci_ahb
> - const: cci
> + - if:
> + properties:
> + compatible:
> + oneOf:
That's odd syntax....
> + - contains:
> + enum:
> + - qcom,qcm2290-cci
> +
> + - const: qcom,msm8996-cci
and not correct, which will be pointed out by tests. Are you sure this
was tested? I guess you wanted only the first part of oneOf (so the
contains and drop the oneOf).
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] arm64: dts: qcom: qcm2290: Add CCI node
2025-04-01 14:36 [PATCH 1/2] arm64: dts: qcom: qcm2290: Add CCI node Loic Poulain
2025-04-01 14:36 ` [PATCH 2/2] dt-bindings: i2c: qcom-cci: Document QCM2290 compatible Loic Poulain
@ 2025-04-01 15:06 ` Konrad Dybcio
1 sibling, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2025-04-01 15:06 UTC (permalink / raw)
To: Loic Poulain, andersson, konradybcio, robh, krzk+dt
Cc: linux-arm-msm, devicetree
On 4/1/25 4:36 PM, Loic Poulain wrote:
> Add Camera Control Interface (CCI), supporting two I2C masters.
>
> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> ---
> arch/arm64/boot/dts/qcom/qcm2290.dtsi | 44 +++++++++++++++++++++++++++
> 1 file changed, 44 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/qcm2290.dtsi b/arch/arm64/boot/dts/qcom/qcm2290.dtsi
> index 7fb5de92bc4c..927dbfe61e4a 100644
> --- a/arch/arm64/boot/dts/qcom/qcm2290.dtsi
> +++ b/arch/arm64/boot/dts/qcom/qcm2290.dtsi
> @@ -646,6 +646,20 @@ data-pins {
> bias-pull-up;
> };
> };
> +
> + cci0_default: cci0-default-state {
> + pins = "gpio22", "gpio23";
> + function = "cci_i2c";
> + drive-strength = <2>;
> + bias-disable;
> + };
> +
> + cci1_default: cci1-default-state {
> + pins = "gpio29", "gpio30";
> + function = "cci_i2c";
> + drive-strength = <2>;
> + bias-disable;
> + };
Please put these above the sdc pins, so that we get a by-pin-index sorting
> };
>
> gcc: clock-controller@1400000 {
> @@ -1603,6 +1617,36 @@ adreno_smmu: iommu@59a0000 {
> #iommu-cells = <2>;
> };
>
> + cci: cci@5c1b000 {
> + compatible = "qcom,qcm2290-cci", "qcom,msm8996-cci";
> + reg = <0x0 0x5c1b000 0x0 0x1000>;
> + interrupts = <GIC_SPI 206 IRQ_TYPE_EDGE_RISING>;
> + power-domains = <&gcc GCC_CAMSS_TOP_GDSC>;
> + clocks = <&gcc GCC_CAMSS_TOP_AHB_CLK>, <&gcc GCC_CAMSS_CCI_0_CLK>;
> + clock-names = "camss_top_ahb", "cci";
> + assigned-clocks = <&gcc GCC_CAMSS_CCI_0_CLK>;
> + assigned-clock-rates = <37500000>;
> + pinctrl-0 = <&cci0_default &cci1_default>;
> + pinctrl-names = "default";
> + #address-cells = <1>;
> + #size-cells = <0>;
The change looks good, please update the property order / styling with
this submission for x1e:
https://lore.kernel.org/linux-arm-msm/20250314-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v6-4-edcb2cfc3122@linaro.org/
Konrad
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] dt-bindings: i2c: qcom-cci: Document QCM2290 compatible
2025-04-01 14:36 ` [PATCH 2/2] dt-bindings: i2c: qcom-cci: Document QCM2290 compatible Loic Poulain
2025-04-01 14:59 ` Krzysztof Kozlowski
@ 2025-04-01 15:10 ` Konrad Dybcio
1 sibling, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2025-04-01 15:10 UTC (permalink / raw)
To: Loic Poulain, andersson, konradybcio, robh, krzk+dt
Cc: linux-arm-msm, devicetree
On 4/1/25 4:36 PM, Loic Poulain wrote:
> The CCI on QCM2290 is the interface for controlling camera sensor over I2C.
> It requires only two clocks.
>
> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> ---
[...]
> + then:
> + properties:
> + clocks:
> + minItems: 2
> + maxItems: 2
> + clock-names:
> + items:
> + - const: camss_top_ahb
> + - const: cci
Hm.. looks like (at least the pre-Titan) CCI only takes 2 clocks, according
to docs.. maybe the other entries could get revisited one day
Konrad
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] dt-bindings: i2c: qcom-cci: Document QCM2290 compatible
2025-04-01 14:59 ` Krzysztof Kozlowski
@ 2025-04-02 8:12 ` Krzysztof Kozlowski
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2025-04-02 8:12 UTC (permalink / raw)
To: Loic Poulain, andersson, konradybcio, robh, krzk+dt
Cc: linux-arm-msm, devicetree
On Tue, Apr 01, 2025 at 04:59:49PM +0200, Krzysztof Kozlowski wrote:
> On 01/04/2025 16:36, Loic Poulain wrote:
> > The CCI on QCM2290 is the interface for controlling camera sensor over I2C.
> > It requires only two clocks.
> >
> > Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> > ---
> > .../devicetree/bindings/i2c/qcom,i2c-cci.yaml | 23 +++++++++++++++++--
>
> Bindings patch goes before the user, usually.
>
> > 1 file changed, 21 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
> > index 73144473b9b2..1632e3c01ed2 100644
> > --- a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
> > +++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
> > @@ -25,6 +25,7 @@ properties:
> >
> > - items:
> > - enum:
> > + - qcom,qcm2290-cci
> > - qcom,sc7280-cci
> > - qcom,sc8280xp-cci
> > - qcom,sdm670-cci
> > @@ -44,11 +45,11 @@ properties:
> > const: 0
> >
> > clocks:
> > - minItems: 3
> > + minItems: 2
> > maxItems: 6
> >
> > clock-names:
> > - minItems: 3
> > + minItems: 2
> > maxItems: 6
> >
> > interrupts:
> > @@ -119,6 +120,24 @@ allOf:
> > - const: camss_top_ahb
> > - const: cci_ahb
> > - const: cci
> > + - if:
> > + properties:
> > + compatible:
> > + oneOf:
>
> That's odd syntax....
>
> > + - contains:
> > + enum:
> > + - qcom,qcm2290-cci
> > +
> > + - const: qcom,msm8996-cci
>
> and not correct, which will be pointed out by tests. Are you sure this
> was tested? I guess you wanted only the first part of oneOf (so the
> contains and drop the oneOf).
As I expected, this wasn't tested and introduces several new warnings.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-04-02 8:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-01 14:36 [PATCH 1/2] arm64: dts: qcom: qcm2290: Add CCI node Loic Poulain
2025-04-01 14:36 ` [PATCH 2/2] dt-bindings: i2c: qcom-cci: Document QCM2290 compatible Loic Poulain
2025-04-01 14:59 ` Krzysztof Kozlowski
2025-04-02 8:12 ` Krzysztof Kozlowski
2025-04-01 15:10 ` Konrad Dybcio
2025-04-01 15:06 ` [PATCH 1/2] arm64: dts: qcom: qcm2290: Add CCI node Konrad Dybcio
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).