2022-10-02 12:30:55

by Matti Lehtimäki

[permalink] [raw]
Subject: [PATCH v1 0/6] Qualcomm CCI for MSM8226 and fix CCI documentation for MSM8974

This series adds support for Camera Control Interface found on MSM8226
and adds missing clock documentation for CCI found on MSM8974. In
addition the series adds CCI device tree nodes for both MSM8226 and
MSM8974.

Luca Weiss (1):
ARM: dts: qcom: msm8974: Add CCI bus

Matti Lehtimäki (2):
dt-bindings: i2c: qcom,i2c-cci: Document MSM8226 compatible
dt-bindings: i2c: qcom,i2c-cci: Document clocks for MSM8974

Rayyan Ansari (3):
ARM: dts: qcom: msm8226: Add MMCC node
i2c: qcom-cci: Add MSM8226 compatible
ARM: dts: qcom: msm8226: Add CCI bus

.../devicetree/bindings/i2c/qcom,i2c-cci.yaml | 23 ++++++-
arch/arm/boot/dts/qcom-msm8226.dtsi | 52 +++++++++++++++
arch/arm/boot/dts/qcom-msm8974.dtsi | 66 +++++++++++++++++++
drivers/i2c/busses/i2c-qcom-cci.c | 1 +
4 files changed, 140 insertions(+), 2 deletions(-)

--
2.34.1


2022-10-02 12:31:18

by Matti Lehtimäki

[permalink] [raw]
Subject: [PATCH v1 4/6] i2c: qcom-cci: Add MSM8226 compatible

From: Rayyan Ansari <[email protected]>

Add a compatible for MSM8226's Camera Control Interface, which is
similar to the one used on MSM8916.

Signed-off-by: Rayyan Ansari <[email protected]>
Signed-off-by: Matti Lehtimäki <[email protected]>
---
drivers/i2c/busses/i2c-qcom-cci.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/busses/i2c-qcom-cci.c b/drivers/i2c/busses/i2c-qcom-cci.c
index ea48e6a9cfca..87739fb4388b 100644
--- a/drivers/i2c/busses/i2c-qcom-cci.c
+++ b/drivers/i2c/busses/i2c-qcom-cci.c
@@ -807,6 +807,7 @@ static const struct cci_data cci_v2_data = {
};

static const struct of_device_id cci_dt_match[] = {
+ { .compatible = "qcom,msm8226-cci", .data = &cci_v1_data},
{ .compatible = "qcom,msm8916-cci", .data = &cci_v1_data},
{ .compatible = "qcom,msm8974-cci", .data = &cci_v1_5_data},
{ .compatible = "qcom,msm8996-cci", .data = &cci_v2_data},
--
2.34.1

2022-10-02 12:31:24

by Matti Lehtimäki

[permalink] [raw]
Subject: [PATCH v1 2/6] dt-bindings: i2c: qcom,i2c-cci: Document MSM8226 compatible

MSM8226's Camera Control Interface has one master and 3 clocks.

Signed-off-by: Matti Lehtimäki <[email protected]>
---
.../devicetree/bindings/i2c/qcom,i2c-cci.yaml | 22 +++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
index e51a85848d6e..c0f9537a4bb1 100644
--- a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
+++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
@@ -13,6 +13,7 @@ maintainers:
properties:
compatible:
enum:
+ - qcom,msm8226-cci
- qcom,msm8916-cci
- qcom,msm8974-cci
- qcom,msm8996-cci
@@ -27,11 +28,11 @@ properties:
const: 0

clocks:
- minItems: 4
+ minItems: 3
maxItems: 6

clock-names:
- minItems: 4
+ minItems: 3
maxItems: 6

interrupts:
@@ -78,11 +79,28 @@ allOf:
compatible:
contains:
enum:
+ - qcom,msm8226-cci
- qcom,msm8916-cci
then:
properties:
i2c-bus@1: false

+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,msm8226-cci
+ then:
+ properties:
+ clocks:
+ maxItems: 3
+ clock-names:
+ items:
+ - const: camss_top_ahb
+ - const: cci_ahb
+ - const: cci
+
- if:
properties:
compatible:
--
2.34.1

2022-10-02 12:31:33

by Matti Lehtimäki

[permalink] [raw]
Subject: [PATCH v1 6/6] ARM: dts: qcom: msm8974: Add CCI bus

From: Luca Weiss <[email protected]>

Add a node for the Camera Control Interface I2C bus found on MSM8974.

Signed-off-by: Luca Weiss <[email protected]>
Signed-off-by: Matti Lehtimäki <[email protected]>
---
arch/arm/boot/dts/qcom-msm8974.dtsi | 66 +++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index 7a9be0acf3f5..b89d56590448 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -1463,6 +1463,38 @@ blsp2_i2c6_sleep: blsp2-i2c6-sleep {
bias-pull-up;
};

+ cci_default: cci-default-state {
+ cci_i2c0_default: cci-i2c0-default-pins {
+ pins = "gpio19", "gpio20";
+ function = "cci_i2c0";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ cci_i2c1_default: cci-i2c1-default-pins {
+ pins = "gpio21", "gpio22";
+ function = "cci_i2c1";
+ drive-strength = <2>;
+ bias-disable;
+ };
+ };
+
+ cci_sleep: cci-sleep-state {
+ cci_i2c0_sleep: cci-i2c0-sleep-pins {
+ pins = "gpio19", "gpio20";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ cci_i2c1_sleep: cci-i2c1-sleep-pins {
+ pins = "gpio21", "gpio22";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+ };
+
spi8_default: spi8_default {
mosi {
pins = "gpio45";
@@ -1616,6 +1648,40 @@ dsi0_phy: dsi-phy@fd922a00 {
};
};

+ cci: cci@fda0c000 {
+ compatible = "qcom,msm8974-cci";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0xfda0c000 0x1000>;
+ interrupts = <GIC_SPI 50 IRQ_TYPE_EDGE_RISING>;
+ clocks = <&mmcc CAMSS_TOP_AHB_CLK>,
+ <&mmcc CAMSS_CCI_CCI_AHB_CLK>,
+ <&mmcc CAMSS_CCI_CCI_CLK>;
+ clock-names = "camss_top_ahb",
+ "cci_ahb",
+ "cci";
+
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&cci_default>;
+ pinctrl-1 = <&cci_sleep>;
+
+ status = "disabled";
+
+ cci_i2c0: i2c-bus@0 {
+ reg = <0>;
+ clock-frequency = <100000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ cci_i2c1: i2c-bus@1 {
+ reg = <1>;
+ clock-frequency = <100000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+
gpu: adreno@fdb00000 {
compatible = "qcom,adreno-330.1", "qcom,adreno";
reg = <0xfdb00000 0x10000>;
--
2.34.1

2022-10-02 12:31:42

by Matti Lehtimäki

[permalink] [raw]
Subject: [PATCH v1 5/6] ARM: dts: qcom: msm8226: Add CCI bus

From: Rayyan Ansari <[email protected]>

Add a node for the Camera Control Interface I2C bus found on MSM8226.

Signed-off-by: Rayyan Ansari <[email protected]>
Signed-off-by: Matti Lehtimäki <[email protected]>
---
arch/arm/boot/dts/qcom-msm8226.dtsi | 44 +++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom-msm8226.dtsi
index e039128028bc..f5411e209d7b 100644
--- a/arch/arm/boot/dts/qcom-msm8226.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8226.dtsi
@@ -7,6 +7,7 @@

#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/qcom,gcc-msm8974.h>
+#include <dt-bindings/clock/qcom,mmcc-msm8974.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/power/qcom-rpmpd.h>
#include <dt-bindings/reset/qcom,gcc-msm8974.h>
@@ -298,6 +299,33 @@ blsp1_i2c5: i2c@f9927000 {
#size-cells = <0>;
};

+ cci: cci@fda0c000 {
+ compatible = "qcom,msm8226-cci";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0xfda0c000 0x1000>;
+ interrupts = <GIC_SPI 50 IRQ_TYPE_EDGE_RISING>;
+ clocks = <&mmcc CAMSS_TOP_AHB_CLK>,
+ <&mmcc CAMSS_CCI_CCI_AHB_CLK>,
+ <&mmcc CAMSS_CCI_CCI_CLK>;
+ clock-names = "camss_top_ahb",
+ "cci_ahb",
+ "cci";
+
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&cci_default>;
+ pinctrl-1 = <&cci_sleep>;
+
+ status = "disabled";
+
+ cci_i2c0: i2c-bus@0 {
+ reg = <0>;
+ clock-frequency = <400000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+
usb: usb@f9a55000 {
compatible = "qcom,ci-hdrc";
reg = <0xf9a55000 0x200>,
@@ -397,6 +425,22 @@ blsp1_i2c5_pins: blsp1-i2c5 {
bias-disable;
};

+ cci_default: cci-default-state {
+ pins = "gpio29", "gpio30";
+ function = "cci_i2c0";
+
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ cci_sleep: cci-sleep-state {
+ pins = "gpio29", "gpio30";
+ function = "gpio";
+
+ drive-strength = <2>;
+ bias-disable;
+ };
+
sdhc1_default_state: sdhc1-default-state {
clk {
pins = "sdc1_clk";
--
2.34.1

2022-10-02 12:50:37

by Matti Lehtimäki

[permalink] [raw]
Subject: [PATCH v1 3/6] dt-bindings: i2c: qcom,i2c-cci: Document clocks for MSM8974

Uses same clocks as MSM8226.

Signed-off-by: Matti Lehtimäki <[email protected]>
---
Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
index c0f9537a4bb1..cf9f8fda595f 100644
--- a/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
+++ b/Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml
@@ -91,6 +91,7 @@ allOf:
contains:
enum:
- qcom,msm8226-cci
+ - qcom,msm8974-cci
then:
properties:
clocks:
--
2.34.1

2022-10-02 12:54:57

by Matti Lehtimäki

[permalink] [raw]
Subject: [PATCH v1 1/6] ARM: dts: qcom: msm8226: Add MMCC node

From: Rayyan Ansari <[email protected]>

Add a node for the Multimedia Clock Controller found on MSM8226.

Signed-off-by: Rayyan Ansari <[email protected]>
Signed-off-by: Matti Lehtimäki <[email protected]>
---
arch/arm/boot/dts/qcom-msm8226.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom-msm8226.dtsi
index cf2d56929428..e039128028bc 100644
--- a/arch/arm/boot/dts/qcom-msm8226.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8226.dtsi
@@ -344,6 +344,14 @@ gcc: clock-controller@fc400000 {
#power-domain-cells = <1>;
};

+ mmcc: clock-controller@fd8c0000 {
+ compatible = "qcom,mmcc-msm8226";
+ reg = <0xfd8c0000 0x6000>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ };
+
tlmm: pinctrl@fd510000 {
compatible = "qcom,msm8226-pinctrl";
reg = <0xfd510000 0x4000>;
--
2.34.1

2022-10-02 14:16:58

by Loic Poulain

[permalink] [raw]
Subject: Re: [PATCH v1 4/6] i2c: qcom-cci: Add MSM8226 compatible

On Sun, 2 Oct 2022 at 14:29, Matti Lehtimäki <[email protected]> wrote:
>
> From: Rayyan Ansari <[email protected]>
>
> Add a compatible for MSM8226's Camera Control Interface, which is
> similar to the one used on MSM8916.
>
> Signed-off-by: Rayyan Ansari <[email protected]>
> Signed-off-by: Matti Lehtimäki <[email protected]>

Reviewed-by: Loic Poulain <[email protected]>

> ---
> drivers/i2c/busses/i2c-qcom-cci.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/i2c/busses/i2c-qcom-cci.c b/drivers/i2c/busses/i2c-qcom-cci.c
> index ea48e6a9cfca..87739fb4388b 100644
> --- a/drivers/i2c/busses/i2c-qcom-cci.c
> +++ b/drivers/i2c/busses/i2c-qcom-cci.c
> @@ -807,6 +807,7 @@ static const struct cci_data cci_v2_data = {
> };
>
> static const struct of_device_id cci_dt_match[] = {
> + { .compatible = "qcom,msm8226-cci", .data = &cci_v1_data},
> { .compatible = "qcom,msm8916-cci", .data = &cci_v1_data},
> { .compatible = "qcom,msm8974-cci", .data = &cci_v1_5_data},
> { .compatible = "qcom,msm8996-cci", .data = &cci_v2_data},
> --
> 2.34.1
>

2022-10-03 09:04:24

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v1 2/6] dt-bindings: i2c: qcom,i2c-cci: Document MSM8226 compatible

On 02/10/2022 14:28, Matti Lehtimäki wrote:
> MSM8226's Camera Control Interface has one master and 3 clocks.
>
> Signed-off-by: Matti Lehtimäki <[email protected]>
> ---
> .../devicetree/bindings/i2c/qcom,i2c-cci.yaml | 22 +++++++++++++++++--
> 1 file changed, 20 insertions(+), 2 deletions(-)
>

Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2022-10-03 09:30:17

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v1 3/6] dt-bindings: i2c: qcom,i2c-cci: Document clocks for MSM8974

On 02/10/2022 14:28, Matti Lehtimäki wrote:
> Uses same clocks as MSM8226.
>
> Signed-off-by: Matti Lehtimäki <[email protected]>


Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2022-10-05 19:05:27

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH v1 3/6] dt-bindings: i2c: qcom,i2c-cci: Document clocks for MSM8974

On Sun, Oct 02, 2022 at 03:28:55PM +0300, Matti Lehtimäki wrote:
> Uses same clocks as MSM8226.
>
> Signed-off-by: Matti Lehtimäki <[email protected]>

Applied to for-current, thanks!


Attachments:
(No filename) (203.00 B)
signature.asc (849.00 B)
Download all attachments

2022-10-05 19:05:41

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH v1 2/6] dt-bindings: i2c: qcom,i2c-cci: Document MSM8226 compatible

On Sun, Oct 02, 2022 at 03:28:54PM +0300, Matti Lehtimäki wrote:
> MSM8226's Camera Control Interface has one master and 3 clocks.
>
> Signed-off-by: Matti Lehtimäki <[email protected]>

Applied to for-current, thanks!


Attachments:
(No filename) (238.00 B)
signature.asc (849.00 B)
Download all attachments

2022-10-05 19:05:53

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH v1 4/6] i2c: qcom-cci: Add MSM8226 compatible

On Sun, Oct 02, 2022 at 03:28:56PM +0300, Matti Lehtimäki wrote:
> From: Rayyan Ansari <[email protected]>
>
> Add a compatible for MSM8226's Camera Control Interface, which is
> similar to the one used on MSM8916.
>
> Signed-off-by: Rayyan Ansari <[email protected]>
> Signed-off-by: Matti Lehtimäki <[email protected]>

Applied to for-current, thanks!


Attachments:
(No filename) (376.00 B)
signature.asc (849.00 B)
Download all attachments

2022-11-07 03:35:12

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH v1 0/6] Qualcomm CCI for MSM8226 and fix CCI documentation for MSM8974

On Sun, 2 Oct 2022 15:28:52 +0300, Matti Lehtimäki wrote:
> This series adds support for Camera Control Interface found on MSM8226
> and adds missing clock documentation for CCI found on MSM8974. In
> addition the series adds CCI device tree nodes for both MSM8226 and
> MSM8974.
>
> Luca Weiss (1):
> ARM: dts: qcom: msm8974: Add CCI bus
>
> [...]

Applied, thanks!

[5/6] ARM: dts: qcom: msm8226: Add CCI bus
commit: 4ab2f41b0850768716c446461653178372bcd35c
[6/6] ARM: dts: qcom: msm8974: Add CCI bus
commit: 4dd3949d17b66144fe7c39cf68ff4bedb4154f61

Best regards,
--
Bjorn Andersson <[email protected]>

2022-11-08 02:47:07

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH v1 1/6] ARM: dts: qcom: msm8226: Add MMCC node

On Sun, 2 Oct 2022 15:28:53 +0300, Matti Lehtimäki wrote:
> From: Rayyan Ansari <[email protected]>
>
> Add a node for the Multimedia Clock Controller found on MSM8226.
>
>

Applied, thanks!

[1/6] ARM: dts: qcom: msm8226: Add MMCC node
commit: ad789f571d93419882aad66515640f649e63bf95

Best regards,
--
Bjorn Andersson <[email protected]>