Skip to contentSkip to conversation

Qualcomm CCI for MSM8226 and fix CCI documentation for MSM8974

PATCH Applied Matti Lehtimäki 5 participants 15 messages Oct 2, 2022 – Nov 8, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover 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(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 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.

---
 arch/arm/boot/dts/qcom-msm8226.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/qcom-msm8226.dtsi +8 -0
index cf2d56929428..e039128028bc 100644
@@ -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>;
Signature · 1 line
2.34.1
#2 lore raw

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

Quoted 5 lines · Matti Lehtimäki

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,

Signature · 1 line
Bjorn Andersson <[email protected]>
#3 lore raw

PATCH 2/6 dt-bindings: i2c: qcom,i2c-cci: Document MSM8226 compatible

In reply to Matti Lehtimäki

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

---
 .../devicetree/bindings/i2c/qcom,i2c-cci.yaml | 22 +++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml +20 -2
index e51a85848d6e..c0f9537a4bb1 100644
@@ -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:
Signature · 1 line
2.34.1
Reviewed-by on v1 2/6
#4 lore raw

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

Quoted 7 lines · Matti Lehtimäki

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

---
 .../devicetree/bindings/i2c/qcom,i2c-cci.yaml | 22 +++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

Best regards,
Krzysztof

#6 lore raw

PATCH 3/6 dt-bindings: i2c: qcom,i2c-cci: Document clocks for MSM8974

In reply to Matti Lehtimäki

Uses same clocks as MSM8226.

---
 Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/i2c/qcom,i2c-cci.yaml +1 -0
index c0f9537a4bb1..cf9f8fda595f 100644
@@ -91,6 +91,7 @@ allOf:
           contains:
             enum:
               - qcom,msm8226-cci
+              - qcom,msm8974-cci
     then:
       properties:
         clocks:
Signature · 1 line
2.34.1
#9 lore raw

PATCH 4/6 i2c: qcom-cci: Add MSM8226 compatible

In reply to Matti Lehtimäki

From: Rayyan Ansari <[email protected]>

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

---
 drivers/i2c/busses/i2c-qcom-cci.c | 1 +
 1 file changed, 1 insertion(+)
drivers/i2c/busses/i2c-qcom-cci.c +1 -0
index ea48e6a9cfca..87739fb4388b 100644
@@ -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},
Signature · 1 line
2.34.1
Reviewed-by on v1 4/6
#10 lore raw

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

Quoted 8 lines · Matti Lehtimäki

From: Rayyan Ansari <[email protected]>

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

Quoted 19 lines
---
 drivers/i2c/busses/i2c-qcom-cci.c | 1 +
 1 file changed, 1 insertion(+)
drivers/i2c/busses/i2c-qcom-cci.c +1 -1
index ea48e6a9cfca..87739fb4388b 100644
@@ -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

#12 lore raw

PATCH 5/6 ARM: dts: qcom: msm8226: Add CCI bus

In reply to Matti Lehtimäki

From: Rayyan Ansari <[email protected]>

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

---
 arch/arm/boot/dts/qcom-msm8226.dtsi | 44 +++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
arch/arm/boot/dts/qcom-msm8226.dtsi +44 -0
index e039128028bc..f5411e209d7b 100644
@@ -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";
Signature · 1 line
2.34.1
#13 lore raw

PATCH 6/6 ARM: dts: qcom: msm8974: Add CCI bus

In reply to Matti Lehtimäki

From: Luca Weiss <[email protected]>

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

---
 arch/arm/boot/dts/qcom-msm8974.dtsi | 66 +++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)
arch/arm/boot/dts/qcom-msm8974.dtsi +66 -0
index 7a9be0acf3f5..b89d56590448 100644
@@ -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>;
Signature · 1 line
2.34.1
#14 lore raw

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

In reply to Matti Lehtimäki
Quoted 9 lines · Matti Lehtimäki

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,

Signature · 1 line
Bjorn Andersson <[email protected]>