All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/7] CAMSS fixes for rb3, switch on IMX577 for RB5
@ 2022-11-16 16:27 Bryan O'Donoghue
  2022-11-16 16:27 ` [PATCH v6 1/7] arm64: dts: qcom: sdm845: Define the number of available ports Bryan O'Donoghue
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Bryan O'Donoghue @ 2022-11-16 16:27 UTC (permalink / raw)
  To: robert.foss, todor.too, agross, andersson, konrad.dybcio,
	mchehab, robh+dt, krzysztof.kozlowski+dt, dmitry.baryshkov,
	vladimir.zapolskiy
  Cc: sakari.ailus, hverkuil, laurent.pinchart, quic_mmitkov,
	linux-media, linux-arm-msm, devicetree, Bryan O'Donoghue

V6:
- Squashes down ok/okay disable/disabled
- Adds Rb as indicated by Laurent, Konrad
- Alphabetizes existing rb3 dts and new rb5 dts for camera
- Adds in ports@ definition per Laurent's suggestion for sm8250
- Adds in ports@ in dtsi for sdm845
- Drops reg = <x> in port definition of sdm845-db845c
- ov9282 for rb5 is omitted as more work needs to be done to
  get this sensor delivering CSI data.
- ov7251 left as-is upstream, disabled on rb3
- Plan to look at overlaying both of these in the future
  but there may be bootloader blockages for that so left alone
  for the moment.
- Tested on linux-next as at today

Previous
https://lore.kernel.org/all/20221112172650.127280-1-bryan.odonoghue@linaro.org/

Bootable
https://git.linaro.org/people/bryan.odonoghue/kernel.git/log/?h=linux-next-22-11-15-sm8250-camss-vc

V5:
- Rolls three identified dts non-confirmances into three separate patches - Konrad
- Fixes the "both" left in the git log - Konrad

Previous
https://lore.kernel.org/all/20221112124126.86815-1-bryan.odonoghue@linaro.org/

V4:
- Rebases on top of Konrad's comment fixes to migrate into rb3 mezz.dts -Bjorn
- Adds -state suffix - Bjorn
- Adds -pins suffix - Bjorn
- Removes redundant newline - Krzysztof

Previous
https://lore.kernel.org/all/20221108021816.213084-1-bryan.odonoghue@linaro.org/

Dependency for the imx577 should be merged in 6.2
https://git.linuxtv.org/sailus/media_tree.git/log/?h=for-6.2-2-signed&ofs=50

V3:
- Ordering patch was applied separately, now dropped from this series.
- camcc disable patch similarly is already applied, dropped here.
- RB5 and RB3 now have separate camera specific DTSI files
  per perferences expressed on the mailing list by Konrad, Vladimir and
  Bjorn.
- Agreeing a imx412 change spiralled a bit into a wider discussion however
  after a good bit of debate and testing on different hardware there is a
  series to add imx577 as a compat string to the imx412.c driver.
  So this series depends on that series being merged.
  https://www.spinics.net/lists/linux-media/msg219989.html

  Given the addition of mezzanine specific dtsi I thought it was worthwhile
  to kick off a review now since the sensor name change is agreed but not
  yet applied and all other outstanding comments have been addressed.
 
V2:

- Adds fix for bug identified by Vladimir
  The CCI i2c_adapter_add() and pm_runtime_enable() are racy.
  This is a generic problem not related to the rb5/imx577 but, for the sake
  of our conversation/review's context I'll add it into this series.
- Include Vladimir's camcc patch
  I've also opted to include Vladimir's disable of camcc to make the enable
  of it in my patchset logical.
- Move address/size cells Konrad
- Remove newline in pin definitions - Konrad
- Remove sensor 'status = "okay"' - Konrad
- Add comment to qrb5165-rb5.dts re: imx412 and imx577 difference - Konrad
- Move pin definitions to 8250 dtsi - Vladimir
- Drop power domain from sensor definition - Vladimir
- Correct to "add to cam2" not "cam1" in commit log - bod

To make verification of the CCI race eaiser I've provided a defconfig both
with and without modules enabled.

Link: https://git.linaro.org/people/bryan.odonoghue/kernel.git/log/?h=linux-next-24-05-22%2bimx577-rb5
Link: https://git.linaro.org/people/bryan.odonoghue/kernel.git/log/?h=linux-next-24-05-22%2bimx577-rb5-compiled-in

git diff linaro/linux-next-22-05-22+imx577-rb5 linaro/linux-next-24-05-22+imx577-rb5

V1:
Linux-next now has everything we need to switch on this sensor both in the
qcom DTS and in the imx412 driver.

After this, no further dts or driver work is required to capture images on
the RB5.

Here's a bootable linux-next with a kernel config. I added Vladimir's
power-domain changes on-top to verify nothing breaks for me.

https://git.linaro.org/people/bryan.odonoghue/kernel.git/log/?h=linux-next-18-05-22%2bimx577-rb5

Bryan O'Donoghue (7):
  arm64: dts: qcom: sdm845: Define the number of available ports
  arm64: dts: qcom: sdm845-db845c: Drop redundant address-cells,
    size-cells declaration
  arm64: dts: qcom: sdm845-db845c: Drop redundant reg = in port
  arm64: dts: qcom: sdm845-db845c: Use okay not ok, disabled not disable
    for status
  arm64: dts: qcom: sdm845-db845c-navigation-mezzanine: Add navigation
    mezzanine dts
  arm64: dts: qcom: sm8250: camss: Define ports and ports address/size
    cells
  arm64: dts: qcom: qrb5165-rb5-vision-mezzanine: Add vision mezzanine

 arch/arm64/boot/dts/qcom/Makefile             |   2 +
 .../dts/qcom/qrb5165-rb5-vision-mezzanine.dts |  62 +++++++++++
 .../sdm845-db845c-navigation-mezzanine.dts    | 104 ++++++++++++++++++
 arch/arm64/boot/dts/qcom/sdm845-db845c.dts    | 101 -----------------
 arch/arm64/boot/dts/qcom/sdm845.dtsi          |  16 +++
 arch/arm64/boot/dts/qcom/sm8250.dtsi          |  62 +++++++++++
 6 files changed, 246 insertions(+), 101 deletions(-)
 create mode 100644 arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dts
 create mode 100644 arch/arm64/boot/dts/qcom/sdm845-db845c-navigation-mezzanine.dts

-- 
2.34.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v6 1/7] arm64: dts: qcom: sdm845: Define the number of available ports
  2022-11-16 16:27 [PATCH v6 0/7] CAMSS fixes for rb3, switch on IMX577 for RB5 Bryan O'Donoghue
@ 2022-11-16 16:27 ` Bryan O'Donoghue
  2022-11-16 16:38   ` Konrad Dybcio
  2022-11-16 16:27 ` [PATCH v6 2/7] arm64: dts: qcom: sdm845-db845c: Drop redundant address-cells, size-cells declaration Bryan O'Donoghue
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 18+ messages in thread
From: Bryan O'Donoghue @ 2022-11-16 16:27 UTC (permalink / raw)
  To: robert.foss, todor.too, agross, andersson, konrad.dybcio,
	mchehab, robh+dt, krzysztof.kozlowski+dt, dmitry.baryshkov,
	vladimir.zapolskiy
  Cc: sakari.ailus, hverkuil, laurent.pinchart, quic_mmitkov,
	linux-media, linux-arm-msm, devicetree, Bryan O'Donoghue

The number of available ports is SoC specific so we should define it in the
SoC dtsi. For the case of the sdm845 that is 4 CSI PHYs => four ports.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 1a257f6728874..29e6d64e74c97 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -4368,6 +4368,22 @@ camss: camss@a00000 {
 			ports {
 				#address-cells = <1>;
 				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+				};
+
+				port@1 {
+					reg = <1>;
+				};
+
+				port@2 {
+					reg = <2>;
+				};
+
+				port@3 {
+					reg = <3>;
+				};
 			};
 		};
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v6 2/7] arm64: dts: qcom: sdm845-db845c: Drop redundant address-cells, size-cells declaration
  2022-11-16 16:27 [PATCH v6 0/7] CAMSS fixes for rb3, switch on IMX577 for RB5 Bryan O'Donoghue
  2022-11-16 16:27 ` [PATCH v6 1/7] arm64: dts: qcom: sdm845: Define the number of available ports Bryan O'Donoghue
@ 2022-11-16 16:27 ` Bryan O'Donoghue
  2022-11-16 16:27 ` [PATCH v6 3/7] arm64: dts: qcom: sdm845-db845c: Drop redundant reg = in port Bryan O'Donoghue
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 18+ messages in thread
From: Bryan O'Donoghue @ 2022-11-16 16:27 UTC (permalink / raw)
  To: robert.foss, todor.too, agross, andersson, konrad.dybcio,
	mchehab, robh+dt, krzysztof.kozlowski+dt, dmitry.baryshkov,
	vladimir.zapolskiy
  Cc: sakari.ailus, hverkuil, laurent.pinchart, quic_mmitkov,
	linux-media, linux-arm-msm, devicetree, Bryan O'Donoghue,
	Konrad Dybcio

sdm845.dtsi camss already defines the address-cells and size-cells for
camss, no need to replicate in sdm845-db845c.dts.

Reported-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
index 3e7ceb0861eb0..7c88312333c22 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
@@ -1185,8 +1185,6 @@ &camss {
 	status = "ok";
 
 	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
 		port@0 {
 			reg = <0>;
 			csiphy0_ep: endpoint {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v6 3/7] arm64: dts: qcom: sdm845-db845c: Drop redundant reg = in port
  2022-11-16 16:27 [PATCH v6 0/7] CAMSS fixes for rb3, switch on IMX577 for RB5 Bryan O'Donoghue
  2022-11-16 16:27 ` [PATCH v6 1/7] arm64: dts: qcom: sdm845: Define the number of available ports Bryan O'Donoghue
  2022-11-16 16:27 ` [PATCH v6 2/7] arm64: dts: qcom: sdm845-db845c: Drop redundant address-cells, size-cells declaration Bryan O'Donoghue
@ 2022-11-16 16:27 ` Bryan O'Donoghue
  2022-11-16 16:38   ` Konrad Dybcio
  2022-11-16 16:27 ` [PATCH v6 4/7] arm64: dts: qcom: sdm845-db845c: Use okay not ok, disabled not disable for status Bryan O'Donoghue
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 18+ messages in thread
From: Bryan O'Donoghue @ 2022-11-16 16:27 UTC (permalink / raw)
  To: robert.foss, todor.too, agross, andersson, konrad.dybcio,
	mchehab, robh+dt, krzysztof.kozlowski+dt, dmitry.baryshkov,
	vladimir.zapolskiy
  Cc: sakari.ailus, hverkuil, laurent.pinchart, quic_mmitkov,
	linux-media, linux-arm-msm, devicetree, Bryan O'Donoghue

The reg for the port is specified in the dtsi. Remove from the db845c dts.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
index 7c88312333c22..8a98f3e86b41d 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
@@ -1186,7 +1186,6 @@ &camss {
 
 	ports {
 		port@0 {
-			reg = <0>;
 			csiphy0_ep: endpoint {
 				data-lanes = <0 1 2 3>;
 				remote-endpoint = <&ov8856_ep>;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v6 4/7] arm64: dts: qcom: sdm845-db845c: Use okay not ok, disabled not disable for status
  2022-11-16 16:27 [PATCH v6 0/7] CAMSS fixes for rb3, switch on IMX577 for RB5 Bryan O'Donoghue
                   ` (2 preceding siblings ...)
  2022-11-16 16:27 ` [PATCH v6 3/7] arm64: dts: qcom: sdm845-db845c: Drop redundant reg = in port Bryan O'Donoghue
@ 2022-11-16 16:27 ` Bryan O'Donoghue
  2022-11-16 16:27 ` [PATCH v6 5/7] arm64: dts: qcom: sdm845-db845c-navigation-mezzanine: Add navigation mezzanine dts Bryan O'Donoghue
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 18+ messages in thread
From: Bryan O'Donoghue @ 2022-11-16 16:27 UTC (permalink / raw)
  To: robert.foss, todor.too, agross, andersson, konrad.dybcio,
	mchehab, robh+dt, krzysztof.kozlowski+dt, dmitry.baryshkov,
	vladimir.zapolskiy
  Cc: sakari.ailus, hverkuil, laurent.pinchart, quic_mmitkov,
	linux-media, linux-arm-msm, devicetree, Bryan O'Donoghue,
	Konrad Dybcio

Use preferred "ok" not "okay".
Use preferred status "disabled" instead of "disable".

There's no functional change here so no Fixes has been applied.

Reported-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
index 8a98f3e86b41d..be946f71666bc 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
@@ -1182,7 +1182,7 @@ &camss {
 	vdda-phy-supply = <&vreg_l1a_0p875>;
 	vdda-pll-supply = <&vreg_l26a_1p2>;
 
-	status = "ok";
+	status = "okay";
 
 	ports {
 		port@0 {
@@ -1220,8 +1220,6 @@ camera@10 {
 		avdd-supply = <&cam0_avdd_2v8>;
 		dvdd-supply = <&cam0_dvdd_1v2>;
 
-		status = "ok";
-
 		port {
 			ov8856_ep: endpoint {
 				link-frequencies = /bits/ 64
@@ -1261,7 +1259,7 @@ camera@60 {
 		vdddo-supply = <&vreg_lvs1a_1p8>;
 		vdda-supply = <&cam3_avdd_2v8>;
 
-		status = "disable";
+		status = "disabled";
 
 		port {
 			ov7251_ep: endpoint {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v6 5/7] arm64: dts: qcom: sdm845-db845c-navigation-mezzanine: Add navigation mezzanine dts
  2022-11-16 16:27 [PATCH v6 0/7] CAMSS fixes for rb3, switch on IMX577 for RB5 Bryan O'Donoghue
                   ` (3 preceding siblings ...)
  2022-11-16 16:27 ` [PATCH v6 4/7] arm64: dts: qcom: sdm845-db845c: Use okay not ok, disabled not disable for status Bryan O'Donoghue
@ 2022-11-16 16:27 ` Bryan O'Donoghue
  2022-11-16 16:39   ` Konrad Dybcio
  2022-11-16 16:28 ` [PATCH v6 6/7] arm64: dts: qcom: sm8250: camss: Define ports and ports address/size cells Bryan O'Donoghue
  2022-11-16 16:28 ` [PATCH v6 7/7] arm64: dts: qcom: qrb5165-rb5-vision-mezzanine: Add vision mezzanine Bryan O'Donoghue
  6 siblings, 1 reply; 18+ messages in thread
From: Bryan O'Donoghue @ 2022-11-16 16:27 UTC (permalink / raw)
  To: robert.foss, todor.too, agross, andersson, konrad.dybcio,
	mchehab, robh+dt, krzysztof.kozlowski+dt, dmitry.baryshkov,
	vladimir.zapolskiy
  Cc: sakari.ailus, hverkuil, laurent.pinchart, quic_mmitkov,
	linux-media, linux-arm-msm, devicetree, Bryan O'Donoghue

Move the dts data for the rb3 navigation mezzanine into its own dts file.

Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../sdm845-db845c-navigation-mezzanine.dts    | 104 ++++++++++++++++++
 arch/arm64/boot/dts/qcom/sdm845-db845c.dts    |  96 ----------------
 3 files changed, 105 insertions(+), 96 deletions(-)
 create mode 100644 arch/arm64/boot/dts/qcom/sdm845-db845c-navigation-mezzanine.dts

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index afe496a93f945..4c81c1ee7f7c7 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -132,6 +132,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r1.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r2.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r3.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-db845c.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-db845c-navigation-mezzanine.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-lg-judyln.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-lg-judyp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-mtp.dtb
diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c-navigation-mezzanine.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c-navigation-mezzanine.dts
new file mode 100644
index 0000000000000..a21caa6f3fa25
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sdm845-db845c-navigation-mezzanine.dts
@@ -0,0 +1,104 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2022, Linaro Ltd.
+ */
+
+/dts-v1/;
+
+#include "sdm845-db845c.dts"
+
+&camss {
+	vdda-phy-supply = <&vreg_l1a_0p875>;
+	vdda-pll-supply = <&vreg_l26a_1p2>;
+
+	status = "okay";
+
+	ports {
+		port@0 {
+			csiphy0_ep: endpoint {
+				data-lanes = <0 1 2 3>;
+				remote-endpoint = <&ov8856_ep>;
+			};
+		};
+	};
+};
+
+&cci {
+	status = "okay";
+};
+
+&cci_i2c0 {
+	camera@10 {
+		compatible = "ovti,ov8856";
+		reg = <0x10>;
+
+		/* CAM0_RST_N */
+		reset-gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&cam0_default>;
+
+		clocks = <&clock_camcc CAM_CC_MCLK0_CLK>;
+		clock-names = "xvclk";
+		clock-frequency = <19200000>;
+
+		/*
+		 * The &vreg_s4a_1p8 trace is powered on as a,
+		 * so it is represented by a fixed regulator.
+		 *
+		 * The 2.8V vdda-supply and 1.2V vddd-supply regulators
+		 * both have to be enabled through the power management
+		 * gpios.
+		 */
+		dovdd-supply = <&vreg_lvs1a_1p8>;
+		avdd-supply = <&cam0_avdd_2v8>;
+		dvdd-supply = <&cam0_dvdd_1v2>;
+
+		port {
+			ov8856_ep: endpoint {
+				link-frequencies = /bits/ 64
+					<360000000 180000000>;
+				data-lanes = <1 2 3 4>;
+				remote-endpoint = <&csiphy0_ep>;
+			};
+		};
+	};
+};
+
+&cci_i2c1 {
+	camera@60 {
+		compatible = "ovti,ov7251";
+
+		/* I2C address as per ov7251.txt linux documentation */
+		reg = <0x60>;
+
+		/* CAM3_RST_N */
+		enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&cam3_default>;
+
+		clocks = <&clock_camcc CAM_CC_MCLK3_CLK>;
+		clock-names = "xclk";
+		clock-frequency = <24000000>;
+
+		/*
+		 * The &vreg_s4a_1p8 trace always powered on.
+		 *
+		 * The 2.8V vdda-supply regulator is enabled when the
+		 * vreg_s4a_1p8 trace is pulled high.
+		 * It too is represented by a fixed regulator.
+		 *
+		 * No 1.2V vddd-supply regulator is used.
+		 */
+		vdddo-supply = <&vreg_lvs1a_1p8>;
+		vdda-supply = <&cam3_avdd_2v8>;
+
+		status = "disabled";
+
+		port {
+			ov7251_ep: endpoint {
+				data-lanes = <0 1>;
+/*				remote-endpoint = <&csiphy3_ep>; */
+			};
+		};
+	};
+};
diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
index be946f71666bc..f41c6d600ea8c 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
@@ -1174,102 +1174,6 @@ &pm8998_gpio {
 
 };
 
-&cci {
-	status = "okay";
-};
-
-&camss {
-	vdda-phy-supply = <&vreg_l1a_0p875>;
-	vdda-pll-supply = <&vreg_l26a_1p2>;
-
-	status = "okay";
-
-	ports {
-		port@0 {
-			csiphy0_ep: endpoint {
-				data-lanes = <0 1 2 3>;
-				remote-endpoint = <&ov8856_ep>;
-			};
-		};
-	};
-};
-
-&cci_i2c0 {
-	camera@10 {
-		compatible = "ovti,ov8856";
-		reg = <0x10>;
-
-		/* CAM0_RST_N */
-		reset-gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&cam0_default>;
-
-		clocks = <&clock_camcc CAM_CC_MCLK0_CLK>;
-		clock-names = "xvclk";
-		clock-frequency = <19200000>;
-
-		/*
-		 * The &vreg_s4a_1p8 trace is powered on as a,
-		 * so it is represented by a fixed regulator.
-		 *
-		 * The 2.8V vdda-supply and 1.2V vddd-supply regulators
-		 * both have to be enabled through the power management
-		 * gpios.
-		 */
-		dovdd-supply = <&vreg_lvs1a_1p8>;
-		avdd-supply = <&cam0_avdd_2v8>;
-		dvdd-supply = <&cam0_dvdd_1v2>;
-
-		port {
-			ov8856_ep: endpoint {
-				link-frequencies = /bits/ 64
-					<360000000 180000000>;
-				data-lanes = <1 2 3 4>;
-				remote-endpoint = <&csiphy0_ep>;
-			};
-		};
-	};
-};
-
-&cci_i2c1 {
-	camera@60 {
-		compatible = "ovti,ov7251";
-
-		/* I2C address as per ov7251.txt linux documentation */
-		reg = <0x60>;
-
-		/* CAM3_RST_N */
-		enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&cam3_default>;
-
-		clocks = <&clock_camcc CAM_CC_MCLK3_CLK>;
-		clock-names = "xclk";
-		clock-frequency = <24000000>;
-
-		/*
-		 * The &vreg_s4a_1p8 trace always powered on.
-		 *
-		 * The 2.8V vdda-supply regulator is enabled when the
-		 * vreg_s4a_1p8 trace is pulled high.
-		 * It too is represented by a fixed regulator.
-		 *
-		 * No 1.2V vddd-supply regulator is used.
-		 */
-		vdddo-supply = <&vreg_lvs1a_1p8>;
-		vdda-supply = <&cam3_avdd_2v8>;
-
-		status = "disabled";
-
-		port {
-			ov7251_ep: endpoint {
-				data-lanes = <0 1>;
-/*				remote-endpoint = <&csiphy3_ep>; */
-			};
-		};
-	};
-};
-
 /* PINCTRL - additions to nodes defined in sdm845.dtsi */
 &qup_spi0_default {
 	config {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v6 6/7] arm64: dts: qcom: sm8250: camss: Define ports and ports address/size cells
  2022-11-16 16:27 [PATCH v6 0/7] CAMSS fixes for rb3, switch on IMX577 for RB5 Bryan O'Donoghue
                   ` (4 preceding siblings ...)
  2022-11-16 16:27 ` [PATCH v6 5/7] arm64: dts: qcom: sdm845-db845c-navigation-mezzanine: Add navigation mezzanine dts Bryan O'Donoghue
@ 2022-11-16 16:28 ` Bryan O'Donoghue
  2022-11-16 16:41   ` Konrad Dybcio
  2022-11-16 16:28 ` [PATCH v6 7/7] arm64: dts: qcom: qrb5165-rb5-vision-mezzanine: Add vision mezzanine Bryan O'Donoghue
  6 siblings, 1 reply; 18+ messages in thread
From: Bryan O'Donoghue @ 2022-11-16 16:28 UTC (permalink / raw)
  To: robert.foss, todor.too, agross, andersson, konrad.dybcio,
	mchehab, robh+dt, krzysztof.kozlowski+dt, dmitry.baryshkov,
	vladimir.zapolskiy
  Cc: sakari.ailus, hverkuil, laurent.pinchart, quic_mmitkov,
	linux-media, linux-arm-msm, devicetree, Bryan O'Donoghue

Define the set of possible ports, one for each CSI PHY along with the port
address and size cells @ the SoC dtsi level.

Suggested-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 29 ++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index d517d6a80bdcb..806aa19ad93ce 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -3412,6 +3412,35 @@ camss: camss@ac6a000 {
 					     "cam_hf_0_mnoc",
 					     "cam_sf_0_mnoc",
 					     "cam_sf_icp_mnoc";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+				};
+
+				port@1 {
+					reg = <1>;
+				};
+
+				port@2 {
+					reg = <2>;
+				};
+
+				port@3 {
+					reg = <3>;
+				};
+
+				port@4 {
+					reg = <4>;
+				};
+
+				port@5 {
+					reg = <5>;
+				};
+			};
 		};
 
 		camcc: clock-controller@ad00000 {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v6 7/7] arm64: dts: qcom: qrb5165-rb5-vision-mezzanine: Add vision mezzanine
  2022-11-16 16:27 [PATCH v6 0/7] CAMSS fixes for rb3, switch on IMX577 for RB5 Bryan O'Donoghue
                   ` (5 preceding siblings ...)
  2022-11-16 16:28 ` [PATCH v6 6/7] arm64: dts: qcom: sm8250: camss: Define ports and ports address/size cells Bryan O'Donoghue
@ 2022-11-16 16:28 ` Bryan O'Donoghue
  2022-11-16 16:40   ` Konrad Dybcio
  6 siblings, 1 reply; 18+ messages in thread
From: Bryan O'Donoghue @ 2022-11-16 16:28 UTC (permalink / raw)
  To: robert.foss, todor.too, agross, andersson, konrad.dybcio,
	mchehab, robh+dt, krzysztof.kozlowski+dt, dmitry.baryshkov,
	vladimir.zapolskiy
  Cc: sakari.ailus, hverkuil, laurent.pinchart, quic_mmitkov,
	linux-media, linux-arm-msm, devicetree, Bryan O'Donoghue

The Vision Mezzanine for the RB5 ships with an imx577 and ov9282 populated.
Other sensors and components may be added or stacked with additional
mezzanines.

Enable the IMX577 on the vision mezzanine.

An example media-ctl pipeline for the imx577 is:

media-ctl --reset
media-ctl -v -d /dev/media0 -V '"imx577 '22-001a'":0[fmt:SRGGB10/4056x3040 field:none]'
media-ctl -V '"msm_csiphy2":0[fmt:SRGGB10/4056x3040]'
media-ctl -V '"msm_csid0":0[fmt:SRGGB10/4056x3040]'
media-ctl -V '"msm_vfe0_rdi0":0[fmt:SRGGB10/4056x3040]'
media-ctl -l '"msm_csiphy2":1->"msm_csid0":0[1]'
media-ctl -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]'

yavta -B capture-mplane -c -I -n 5 -f SRGGB10P -s 4056x3040 -F /dev/video0

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 arch/arm64/boot/dts/qcom/Makefile             |  1 +
 .../dts/qcom/qrb5165-rb5-vision-mezzanine.dts | 62 +++++++++++++++++++
 arch/arm64/boot/dts/qcom/sm8250.dtsi          | 33 ++++++++++
 3 files changed, 96 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dts

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 4c81c1ee7f7c7..f5a76ec8a85e0 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -54,6 +54,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-poplar.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-4000.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qrb5165-rb5.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= qrb5165-rb5-vision-mezzanine.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sa8155p-adp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sa8295p-adp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-idp.dtb
diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dts
new file mode 100644
index 0000000000000..ac3ccab2da35e
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dts
@@ -0,0 +1,62 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2022, Linaro Ltd.
+ */
+
+/dts-v1/;
+
+#include "qrb5165-rb5.dts"
+
+&camcc {
+	status = "okay";
+};
+
+&camss {
+	status = "okay";
+	vdda-phy-supply = <&vreg_l5a_0p88>;
+	vdda-pll-supply = <&vreg_l9a_1p2>;
+
+	ports {
+		/* The port index denotes CSIPHY id i.e. csiphy2 */
+		port@2 {
+			csiphy2_ep: endpoint {
+				clock-lanes = <7>;
+				data-lanes = <0 1 2 3>;
+				remote-endpoint = <&imx577_ep>;
+			};
+		};
+	};
+};
+
+&cci1 {
+	status = "okay";
+};
+
+&cci1_i2c0 {
+	camera@1a {
+		compatible = "sony,imx577";
+		reg = <0x1a>;
+
+		reset-gpios = <&tlmm 78 GPIO_ACTIVE_LOW>;
+		pinctrl-names = "default", "suspend";
+		pinctrl-0 = <&cam2_default>;
+		pinctrl-1 = <&cam2_suspend>;
+
+		clocks = <&camcc CAM_CC_MCLK2_CLK>;
+		assigned-clocks = <&camcc CAM_CC_MCLK2_CLK>;
+		assigned-clock-rates = <24000000>;
+
+		dovdd-supply  = <&vreg_l7f_1p8>;
+		avdd-supply = <&vdc_5v>;
+		dvdd-supply = <&vdc_5v>;
+
+		port {
+			imx577_ep: endpoint {
+				clock-lanes = <1>;
+				link-frequencies = /bits/ 64 <600000000>;
+				data-lanes = <1 2 3 4>;
+				remote-endpoint = <&csiphy2_ep>;
+			};
+		};
+	};
+};
diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index 806aa19ad93ce..d37694342b53f 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -3822,6 +3822,39 @@ tlmm: pinctrl@f100000 {
 			gpio-ranges = <&tlmm 0 0 181>;
 			wakeup-parent = <&pdc>;
 
+			cam2_default: cam2-default-state {
+				rst-pins {
+					pins = "gpio78";
+					function = "gpio";
+					drive-strength = <2>;
+					bias-disable;
+				};
+
+				mclk-pins {
+					pins = "gpio96";
+					function = "cam_mclk";
+					drive-strength = <16>;
+					bias-disable;
+				};
+			};
+
+			cam2_suspend: cam2-suspend-state {
+				rst-pins {
+					pins = "gpio78";
+					function = "gpio";
+					drive-strength = <2>;
+					bias-pull-down;
+					output-low;
+				};
+
+				mclk-pins {
+					pins = "gpio96";
+					function = "cam_mclk";
+					drive-strength = <2>;
+					bias-disable;
+				};
+			};
+
 			cci0_default: cci0-default-state {
 				cci0_i2c0_default: cci0-i2c0-default-pins {
 					/* SDA, SCL */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH v6 1/7] arm64: dts: qcom: sdm845: Define the number of available ports
  2022-11-16 16:27 ` [PATCH v6 1/7] arm64: dts: qcom: sdm845: Define the number of available ports Bryan O'Donoghue
@ 2022-11-16 16:38   ` Konrad Dybcio
  0 siblings, 0 replies; 18+ messages in thread
From: Konrad Dybcio @ 2022-11-16 16:38 UTC (permalink / raw)
  To: Bryan O'Donoghue, robert.foss, todor.too, agross, andersson,
	mchehab, robh+dt, krzysztof.kozlowski+dt, dmitry.baryshkov,
	vladimir.zapolskiy
  Cc: sakari.ailus, hverkuil, laurent.pinchart, quic_mmitkov,
	linux-media, linux-arm-msm, devicetree



On 16/11/2022 17:27, Bryan O'Donoghue wrote:
> The number of available ports is SoC specific so we should define it in the
> SoC dtsi. For the case of the sdm845 that is 4 CSI PHYs => four ports.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>   arch/arm64/boot/dts/qcom/sdm845.dtsi | 16 ++++++++++++++++
>   1 file changed, 16 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> index 1a257f6728874..29e6d64e74c97 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
> @@ -4368,6 +4368,22 @@ camss: camss@a00000 {
>   			ports {
>   				#address-cells = <1>;
>   				#size-cells = <0>;
> +
> +				port@0 {
> +					reg = <0>;
> +				};
> +
> +				port@1 {
> +					reg = <1>;
> +				};
> +
> +				port@2 {
> +					reg = <2>;
> +				};
> +
> +				port@3 {
> +					reg = <3>;
> +				};
>   			};
>   		};
>   

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v6 3/7] arm64: dts: qcom: sdm845-db845c: Drop redundant reg = in port
  2022-11-16 16:27 ` [PATCH v6 3/7] arm64: dts: qcom: sdm845-db845c: Drop redundant reg = in port Bryan O'Donoghue
@ 2022-11-16 16:38   ` Konrad Dybcio
  0 siblings, 0 replies; 18+ messages in thread
From: Konrad Dybcio @ 2022-11-16 16:38 UTC (permalink / raw)
  To: Bryan O'Donoghue, robert.foss, todor.too, agross, andersson,
	mchehab, robh+dt, krzysztof.kozlowski+dt, dmitry.baryshkov,
	vladimir.zapolskiy
  Cc: sakari.ailus, hverkuil, laurent.pinchart, quic_mmitkov,
	linux-media, linux-arm-msm, devicetree



On 16/11/2022 17:27, Bryan O'Donoghue wrote:
> The reg for the port is specified in the dtsi. Remove from the db845c dts.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>   arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> index 7c88312333c22..8a98f3e86b41d 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> @@ -1186,7 +1186,6 @@ &camss {
>   
>   	ports {
>   		port@0 {
> -			reg = <0>;
>   			csiphy0_ep: endpoint {
>   				data-lanes = <0 1 2 3>;
>   				remote-endpoint = <&ov8856_ep>;

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v6 5/7] arm64: dts: qcom: sdm845-db845c-navigation-mezzanine: Add navigation mezzanine dts
  2022-11-16 16:27 ` [PATCH v6 5/7] arm64: dts: qcom: sdm845-db845c-navigation-mezzanine: Add navigation mezzanine dts Bryan O'Donoghue
@ 2022-11-16 16:39   ` Konrad Dybcio
  2022-11-16 16:43     ` Bryan O'Donoghue
  0 siblings, 1 reply; 18+ messages in thread
From: Konrad Dybcio @ 2022-11-16 16:39 UTC (permalink / raw)
  To: Bryan O'Donoghue, robert.foss, todor.too, agross, andersson,
	mchehab, robh+dt, krzysztof.kozlowski+dt, dmitry.baryshkov,
	vladimir.zapolskiy
  Cc: sakari.ailus, hverkuil, laurent.pinchart, quic_mmitkov,
	linux-media, linux-arm-msm, devicetree



On 16/11/2022 17:27, Bryan O'Donoghue wrote:
> Move the dts data for the rb3 navigation mezzanine into its own dts file.
> 
> Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
>   arch/arm64/boot/dts/qcom/Makefile             |   1 +
>   .../sdm845-db845c-navigation-mezzanine.dts    | 104 ++++++++++++++++++
>   arch/arm64/boot/dts/qcom/sdm845-db845c.dts    |  96 ----------------
>   3 files changed, 105 insertions(+), 96 deletions(-)
>   create mode 100644 arch/arm64/boot/dts/qcom/sdm845-db845c-navigation-mezzanine.dts
> 
> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index afe496a93f945..4c81c1ee7f7c7 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -132,6 +132,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r1.dtb
>   dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r2.dtb
>   dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r3.dtb
>   dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-db845c.dtb
> +dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-db845c-navigation-mezzanine.dtb
>   dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-lg-judyln.dtb
>   dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-lg-judyp.dtb
>   dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-mtp.dtb
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c-navigation-mezzanine.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c-navigation-mezzanine.dts
> new file mode 100644
> index 0000000000000..a21caa6f3fa25
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c-navigation-mezzanine.dts
> @@ -0,0 +1,104 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) 2022, Linaro Ltd.
> + */
> +
> +/dts-v1/;
> +
> +#include "sdm845-db845c.dts"
> +
> +&camss {
> +	vdda-phy-supply = <&vreg_l1a_0p875>;
> +	vdda-pll-supply = <&vreg_l26a_1p2>;
> +
> +	status = "okay";
> +
> +	ports {
> +		port@0 {
> +			csiphy0_ep: endpoint {
> +				data-lanes = <0 1 2 3>;
> +				remote-endpoint = <&ov8856_ep>;
> +			};
> +		};
> +	};
> +};
> +
> +&cci {
> +	status = "okay";
> +};
> +
> +&cci_i2c0 {
> +	camera@10 {
> +		compatible = "ovti,ov8856";
> +		reg = <0x10>;
> +
> +		/* CAM0_RST_N */
> +		reset-gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&cam0_default>;
> +
> +		clocks = <&clock_camcc CAM_CC_MCLK0_CLK>;
> +		clock-names = "xvclk";
> +		clock-frequency = <19200000>;
> +
> +		/*
> +		 * The &vreg_s4a_1p8 trace is powered on as a,
> +		 * so it is represented by a fixed regulator.
> +		 *
> +		 * The 2.8V vdda-supply and 1.2V vddd-supply regulators
> +		 * both have to be enabled through the power management
> +		 * gpios.
> +		 */
> +		dovdd-supply = <&vreg_lvs1a_1p8>;
> +		avdd-supply = <&cam0_avdd_2v8>;
> +		dvdd-supply = <&cam0_dvdd_1v2>;
> +
> +		port {
> +			ov8856_ep: endpoint {
> +				link-frequencies = /bits/ 64
> +					<360000000 180000000>;
> +				data-lanes = <1 2 3 4>;
> +				remote-endpoint = <&csiphy0_ep>;
> +			};
> +		};
> +	};
> +};
> +
> +&cci_i2c1 {
> +	camera@60 {
> +		compatible = "ovti,ov7251";
> +
> +		/* I2C address as per ov7251.txt linux documentation */
> +		reg = <0x60>;
> +
> +		/* CAM3_RST_N */
> +		enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&cam3_default>;
> +
> +		clocks = <&clock_camcc CAM_CC_MCLK3_CLK>;
> +		clock-names = "xclk";
> +		clock-frequency = <24000000>;
> +
> +		/*
> +		 * The &vreg_s4a_1p8 trace always powered on.
> +		 *
> +		 * The 2.8V vdda-supply regulator is enabled when the
> +		 * vreg_s4a_1p8 trace is pulled high.
> +		 * It too is represented by a fixed regulator.
> +		 *
> +		 * No 1.2V vddd-supply regulator is used.
> +		 */
> +		vdddo-supply = <&vreg_lvs1a_1p8>;
> +		vdda-supply = <&cam3_avdd_2v8>;
> +
> +		status = "disabled";
I know you're just moving things around, but.. any reason this thing is 
still disabled?

Konrad
> +
> +		port {
> +			ov7251_ep: endpoint {
> +				data-lanes = <0 1>;
> +/*				remote-endpoint = <&csiphy3_ep>; */
> +			};
> +		};
> +	};
> +};
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> index be946f71666bc..f41c6d600ea8c 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> @@ -1174,102 +1174,6 @@ &pm8998_gpio {
>   
>   };
>   
> -&cci {
> -	status = "okay";
> -};
> -
> -&camss {
> -	vdda-phy-supply = <&vreg_l1a_0p875>;
> -	vdda-pll-supply = <&vreg_l26a_1p2>;
> -
> -	status = "okay";
> -
> -	ports {
> -		port@0 {
> -			csiphy0_ep: endpoint {
> -				data-lanes = <0 1 2 3>;
> -				remote-endpoint = <&ov8856_ep>;
> -			};
> -		};
> -	};
> -};
> -
> -&cci_i2c0 {
> -	camera@10 {
> -		compatible = "ovti,ov8856";
> -		reg = <0x10>;
> -
> -		/* CAM0_RST_N */
> -		reset-gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
> -		pinctrl-names = "default";
> -		pinctrl-0 = <&cam0_default>;
> -
> -		clocks = <&clock_camcc CAM_CC_MCLK0_CLK>;
> -		clock-names = "xvclk";
> -		clock-frequency = <19200000>;
> -
> -		/*
> -		 * The &vreg_s4a_1p8 trace is powered on as a,
> -		 * so it is represented by a fixed regulator.
> -		 *
> -		 * The 2.8V vdda-supply and 1.2V vddd-supply regulators
> -		 * both have to be enabled through the power management
> -		 * gpios.
> -		 */
> -		dovdd-supply = <&vreg_lvs1a_1p8>;
> -		avdd-supply = <&cam0_avdd_2v8>;
> -		dvdd-supply = <&cam0_dvdd_1v2>;
> -
> -		port {
> -			ov8856_ep: endpoint {
> -				link-frequencies = /bits/ 64
> -					<360000000 180000000>;
> -				data-lanes = <1 2 3 4>;
> -				remote-endpoint = <&csiphy0_ep>;
> -			};
> -		};
> -	};
> -};
> -
> -&cci_i2c1 {
> -	camera@60 {
> -		compatible = "ovti,ov7251";
> -
> -		/* I2C address as per ov7251.txt linux documentation */
> -		reg = <0x60>;
> -
> -		/* CAM3_RST_N */
> -		enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>;
> -		pinctrl-names = "default";
> -		pinctrl-0 = <&cam3_default>;
> -
> -		clocks = <&clock_camcc CAM_CC_MCLK3_CLK>;
> -		clock-names = "xclk";
> -		clock-frequency = <24000000>;
> -
> -		/*
> -		 * The &vreg_s4a_1p8 trace always powered on.
> -		 *
> -		 * The 2.8V vdda-supply regulator is enabled when the
> -		 * vreg_s4a_1p8 trace is pulled high.
> -		 * It too is represented by a fixed regulator.
> -		 *
> -		 * No 1.2V vddd-supply regulator is used.
> -		 */
> -		vdddo-supply = <&vreg_lvs1a_1p8>;
> -		vdda-supply = <&cam3_avdd_2v8>;
> -
> -		status = "disabled";
> -
> -		port {
> -			ov7251_ep: endpoint {
> -				data-lanes = <0 1>;
> -/*				remote-endpoint = <&csiphy3_ep>; */
> -			};
> -		};
> -	};
> -};
> -
>   /* PINCTRL - additions to nodes defined in sdm845.dtsi */
>   &qup_spi0_default {
>   	config {

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v6 7/7] arm64: dts: qcom: qrb5165-rb5-vision-mezzanine: Add vision mezzanine
  2022-11-16 16:28 ` [PATCH v6 7/7] arm64: dts: qcom: qrb5165-rb5-vision-mezzanine: Add vision mezzanine Bryan O'Donoghue
@ 2022-11-16 16:40   ` Konrad Dybcio
  2022-11-16 17:12     ` Bryan O'Donoghue
  0 siblings, 1 reply; 18+ messages in thread
From: Konrad Dybcio @ 2022-11-16 16:40 UTC (permalink / raw)
  To: Bryan O'Donoghue, robert.foss, todor.too, agross, andersson,
	mchehab, robh+dt, krzysztof.kozlowski+dt, dmitry.baryshkov,
	vladimir.zapolskiy
  Cc: sakari.ailus, hverkuil, laurent.pinchart, quic_mmitkov,
	linux-media, linux-arm-msm, devicetree



On 16/11/2022 17:28, Bryan O'Donoghue wrote:
> The Vision Mezzanine for the RB5 ships with an imx577 and ov9282 populated.
> Other sensors and components may be added or stacked with additional
> mezzanines.
> 
> Enable the IMX577 on the vision mezzanine.
> 
> An example media-ctl pipeline for the imx577 is:
> 
> media-ctl --reset
> media-ctl -v -d /dev/media0 -V '"imx577 '22-001a'":0[fmt:SRGGB10/4056x3040 field:none]'
> media-ctl -V '"msm_csiphy2":0[fmt:SRGGB10/4056x3040]'
> media-ctl -V '"msm_csid0":0[fmt:SRGGB10/4056x3040]'
> media-ctl -V '"msm_vfe0_rdi0":0[fmt:SRGGB10/4056x3040]'
> media-ctl -l '"msm_csiphy2":1->"msm_csid0":0[1]'
> media-ctl -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]'
> 
> yavta -B capture-mplane -c -I -n 5 -f SRGGB10P -s 4056x3040 -F /dev/video0
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
>   arch/arm64/boot/dts/qcom/Makefile             |  1 +
>   .../dts/qcom/qrb5165-rb5-vision-mezzanine.dts | 62 +++++++++++++++++++
>   arch/arm64/boot/dts/qcom/sm8250.dtsi          | 33 ++++++++++
>   3 files changed, 96 insertions(+)
>   create mode 100644 arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dts
> 
> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index 4c81c1ee7f7c7..f5a76ec8a85e0 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -54,6 +54,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-sony-xperia-yoshino-poplar.dtb
>   dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
>   dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-4000.dtb
>   dtb-$(CONFIG_ARCH_QCOM)	+= qrb5165-rb5.dtb
> +dtb-$(CONFIG_ARCH_QCOM)	+= qrb5165-rb5-vision-mezzanine.dtb
>   dtb-$(CONFIG_ARCH_QCOM)	+= sa8155p-adp.dtb
>   dtb-$(CONFIG_ARCH_QCOM)	+= sa8295p-adp.dtb
>   dtb-$(CONFIG_ARCH_QCOM)	+= sc7180-idp.dtb
> diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dts
> new file mode 100644
> index 0000000000000..ac3ccab2da35e
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5-vision-mezzanine.dts
> @@ -0,0 +1,62 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2022, Linaro Ltd.
> + */
> +
> +/dts-v1/;
> +
> +#include "qrb5165-rb5.dts"
> +
> +&camcc {
> +	status = "okay";
> +};
> +
> +&camss {
> +	status = "okay";
> +	vdda-phy-supply = <&vreg_l5a_0p88>;
> +	vdda-pll-supply = <&vreg_l9a_1p2>;
Status goes last.

With this:
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
> +
> +	ports {
> +		/* The port index denotes CSIPHY id i.e. csiphy2 */
> +		port@2 {
> +			csiphy2_ep: endpoint {
> +				clock-lanes = <7>;
> +				data-lanes = <0 1 2 3>;
> +				remote-endpoint = <&imx577_ep>;
> +			};
> +		};
> +	};
> +};
> +
> +&cci1 {
> +	status = "okay";
> +};
> +
> +&cci1_i2c0 {
> +	camera@1a {
> +		compatible = "sony,imx577";
> +		reg = <0x1a>;
> +
> +		reset-gpios = <&tlmm 78 GPIO_ACTIVE_LOW>;
> +		pinctrl-names = "default", "suspend";
> +		pinctrl-0 = <&cam2_default>;
> +		pinctrl-1 = <&cam2_suspend>;
> +
> +		clocks = <&camcc CAM_CC_MCLK2_CLK>;
> +		assigned-clocks = <&camcc CAM_CC_MCLK2_CLK>;
> +		assigned-clock-rates = <24000000>;
> +
> +		dovdd-supply  = <&vreg_l7f_1p8>;
> +		avdd-supply = <&vdc_5v>;
> +		dvdd-supply = <&vdc_5v>;
> +
> +		port {
> +			imx577_ep: endpoint {
> +				clock-lanes = <1>;
> +				link-frequencies = /bits/ 64 <600000000>;
> +				data-lanes = <1 2 3 4>;
> +				remote-endpoint = <&csiphy2_ep>;
> +			};
> +		};
> +	};
> +};
> diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> index 806aa19ad93ce..d37694342b53f 100644
> --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> @@ -3822,6 +3822,39 @@ tlmm: pinctrl@f100000 {
>   			gpio-ranges = <&tlmm 0 0 181>;
>   			wakeup-parent = <&pdc>;
>   
> +			cam2_default: cam2-default-state {
> +				rst-pins {
> +					pins = "gpio78";
> +					function = "gpio";
> +					drive-strength = <2>;
> +					bias-disable;
> +				};
> +
> +				mclk-pins {
> +					pins = "gpio96";
> +					function = "cam_mclk";
> +					drive-strength = <16>;
> +					bias-disable;
> +				};
> +			};
> +
> +			cam2_suspend: cam2-suspend-state {
> +				rst-pins {
> +					pins = "gpio78";
> +					function = "gpio";
> +					drive-strength = <2>;
> +					bias-pull-down;
> +					output-low;
> +				};
> +
> +				mclk-pins {
> +					pins = "gpio96";
> +					function = "cam_mclk";
> +					drive-strength = <2>;
> +					bias-disable;
> +				};
> +			};
> +
>   			cci0_default: cci0-default-state {
>   				cci0_i2c0_default: cci0-i2c0-default-pins {
>   					/* SDA, SCL */

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v6 6/7] arm64: dts: qcom: sm8250: camss: Define ports and ports address/size cells
  2022-11-16 16:28 ` [PATCH v6 6/7] arm64: dts: qcom: sm8250: camss: Define ports and ports address/size cells Bryan O'Donoghue
@ 2022-11-16 16:41   ` Konrad Dybcio
  0 siblings, 0 replies; 18+ messages in thread
From: Konrad Dybcio @ 2022-11-16 16:41 UTC (permalink / raw)
  To: Bryan O'Donoghue, robert.foss, todor.too, agross, andersson,
	mchehab, robh+dt, krzysztof.kozlowski+dt, dmitry.baryshkov,
	vladimir.zapolskiy
  Cc: sakari.ailus, hverkuil, laurent.pinchart, quic_mmitkov,
	linux-media, linux-arm-msm, devicetree



On 16/11/2022 17:28, Bryan O'Donoghue wrote:
> Define the set of possible ports, one for each CSI PHY along with the port
> address and size cells @ the SoC dtsi level.
> 
> Suggested-by: Konrad Dybcio <konrad.dybcio@somainline.org>
> Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>   arch/arm64/boot/dts/qcom/sm8250.dtsi | 29 ++++++++++++++++++++++++++++
>   1 file changed, 29 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> index d517d6a80bdcb..806aa19ad93ce 100644
> --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
> @@ -3412,6 +3412,35 @@ camss: camss@ac6a000 {
>   					     "cam_hf_0_mnoc",
>   					     "cam_sf_0_mnoc",
>   					     "cam_sf_icp_mnoc";
> +
> +			ports {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +
> +				port@0 {
> +					reg = <0>;
> +				};
> +
> +				port@1 {
> +					reg = <1>;
> +				};
> +
> +				port@2 {
> +					reg = <2>;
> +				};
> +
> +				port@3 {
> +					reg = <3>;
> +				};
> +
> +				port@4 {
> +					reg = <4>;
> +				};
> +
> +				port@5 {
> +					reg = <5>;
> +				};
> +			};
>   		};
>   
>   		camcc: clock-controller@ad00000 {

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v6 5/7] arm64: dts: qcom: sdm845-db845c-navigation-mezzanine: Add navigation mezzanine dts
  2022-11-16 16:39   ` Konrad Dybcio
@ 2022-11-16 16:43     ` Bryan O'Donoghue
  2022-11-16 16:45       ` Konrad Dybcio
  0 siblings, 1 reply; 18+ messages in thread
From: Bryan O'Donoghue @ 2022-11-16 16:43 UTC (permalink / raw)
  To: Konrad Dybcio, robert.foss, todor.too, agross, andersson,
	mchehab, robh+dt, krzysztof.kozlowski+dt, dmitry.baryshkov,
	vladimir.zapolskiy
  Cc: sakari.ailus, hverkuil, laurent.pinchart, quic_mmitkov,
	linux-media, linux-arm-msm, devicetree

On 16/11/2022 16:39, Konrad Dybcio wrote:
> I know you're just moving things around, but.. any reason this thing is 
> still disabled?
> 
> Konrad
>> +
>> +        port {
>> +            ov7251_ep: endpoint {
>> +                data-lanes = <0 1>;
>> +/*                remote-endpoint = <&csiphy3_ep>; */ 

Because so is the remote-endpoint here.

---
bod

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v6 5/7] arm64: dts: qcom: sdm845-db845c-navigation-mezzanine: Add navigation mezzanine dts
  2022-11-16 16:43     ` Bryan O'Donoghue
@ 2022-11-16 16:45       ` Konrad Dybcio
  2022-11-16 16:48         ` Bryan O'Donoghue
  0 siblings, 1 reply; 18+ messages in thread
From: Konrad Dybcio @ 2022-11-16 16:45 UTC (permalink / raw)
  To: Bryan O'Donoghue, robert.foss, todor.too, agross, andersson,
	mchehab, robh+dt, krzysztof.kozlowski+dt, dmitry.baryshkov,
	vladimir.zapolskiy
  Cc: sakari.ailus, hverkuil, laurent.pinchart, quic_mmitkov,
	linux-media, linux-arm-msm, devicetree



On 16/11/2022 17:43, Bryan O'Donoghue wrote:
> On 16/11/2022 16:39, Konrad Dybcio wrote:
>> I know you're just moving things around, but.. any reason this thing 
>> is still disabled?
>>
>> Konrad
>>> +
>>> +        port {
>>> +            ov7251_ep: endpoint {
>>> +                data-lanes = <0 1>;
>>> +/*                remote-endpoint = <&csiphy3_ep>; */ 
> 
> Because so is the remote-endpoint here.
Ok, but is there anything special preventing you from adding

csiphy3_ep: endpoing {
};

under port@3 in 845 and have it working? Does it need more driver changes?

Konrad
> 
> ---
> bod

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v6 5/7] arm64: dts: qcom: sdm845-db845c-navigation-mezzanine: Add navigation mezzanine dts
  2022-11-16 16:45       ` Konrad Dybcio
@ 2022-11-16 16:48         ` Bryan O'Donoghue
  2022-11-16 16:53           ` Konrad Dybcio
  0 siblings, 1 reply; 18+ messages in thread
From: Bryan O'Donoghue @ 2022-11-16 16:48 UTC (permalink / raw)
  To: Konrad Dybcio, robert.foss, todor.too, agross, andersson,
	mchehab, robh+dt, krzysztof.kozlowski+dt, dmitry.baryshkov,
	vladimir.zapolskiy
  Cc: sakari.ailus, hverkuil, laurent.pinchart, quic_mmitkov,
	linux-media, linux-arm-msm, devicetree

On 16/11/2022 16:45, Konrad Dybcio wrote:
> Ok, but is there anything special preventing you from adding
> 
> csiphy3_ep: endpoing {
> };
> 
> under port@3 in 845 and have it working? Does it need more driver changes?
> 
> Konrad

I've tried switching it on and it doesn't "just work".

Removing it seems like overkill to me and to be honest feels like a 
retrograde step.

---
bod

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v6 5/7] arm64: dts: qcom: sdm845-db845c-navigation-mezzanine: Add navigation mezzanine dts
  2022-11-16 16:48         ` Bryan O'Donoghue
@ 2022-11-16 16:53           ` Konrad Dybcio
  0 siblings, 0 replies; 18+ messages in thread
From: Konrad Dybcio @ 2022-11-16 16:53 UTC (permalink / raw)
  To: Bryan O'Donoghue, robert.foss, todor.too, agross, andersson,
	mchehab, robh+dt, krzysztof.kozlowski+dt, dmitry.baryshkov,
	vladimir.zapolskiy
  Cc: sakari.ailus, hverkuil, laurent.pinchart, quic_mmitkov,
	linux-media, linux-arm-msm, devicetree



On 16/11/2022 17:48, Bryan O'Donoghue wrote:
> On 16/11/2022 16:45, Konrad Dybcio wrote:
>> Ok, but is there anything special preventing you from adding
>>
>> csiphy3_ep: endpoing {
>> };
>>
>> under port@3 in 845 and have it working? Does it need more driver 
>> changes?
>>
>> Konrad
> 
> I've tried switching it on and it doesn't "just work".
> 
> Removing it seems like overkill to me and to be honest feels like a 
> retrograde step.
Yeah I wouldn't remove it now.

Konrad
> 
> ---
> bod

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v6 7/7] arm64: dts: qcom: qrb5165-rb5-vision-mezzanine: Add vision mezzanine
  2022-11-16 16:40   ` Konrad Dybcio
@ 2022-11-16 17:12     ` Bryan O'Donoghue
  0 siblings, 0 replies; 18+ messages in thread
From: Bryan O'Donoghue @ 2022-11-16 17:12 UTC (permalink / raw)
  To: Konrad Dybcio, robert.foss, todor.too, agross, andersson,
	mchehab, robh+dt, krzysztof.kozlowski+dt, dmitry.baryshkov,
	vladimir.zapolskiy
  Cc: sakari.ailus, hverkuil, laurent.pinchart, quic_mmitkov,
	linux-media, linux-arm-msm, devicetree

On 16/11/2022 16:40, Konrad Dybcio wrote:
> Status goes last.

Hmm, that's a new one on me but sure

> With this:
> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Thanks

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-11-16 17:12 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-16 16:27 [PATCH v6 0/7] CAMSS fixes for rb3, switch on IMX577 for RB5 Bryan O'Donoghue
2022-11-16 16:27 ` [PATCH v6 1/7] arm64: dts: qcom: sdm845: Define the number of available ports Bryan O'Donoghue
2022-11-16 16:38   ` Konrad Dybcio
2022-11-16 16:27 ` [PATCH v6 2/7] arm64: dts: qcom: sdm845-db845c: Drop redundant address-cells, size-cells declaration Bryan O'Donoghue
2022-11-16 16:27 ` [PATCH v6 3/7] arm64: dts: qcom: sdm845-db845c: Drop redundant reg = in port Bryan O'Donoghue
2022-11-16 16:38   ` Konrad Dybcio
2022-11-16 16:27 ` [PATCH v6 4/7] arm64: dts: qcom: sdm845-db845c: Use okay not ok, disabled not disable for status Bryan O'Donoghue
2022-11-16 16:27 ` [PATCH v6 5/7] arm64: dts: qcom: sdm845-db845c-navigation-mezzanine: Add navigation mezzanine dts Bryan O'Donoghue
2022-11-16 16:39   ` Konrad Dybcio
2022-11-16 16:43     ` Bryan O'Donoghue
2022-11-16 16:45       ` Konrad Dybcio
2022-11-16 16:48         ` Bryan O'Donoghue
2022-11-16 16:53           ` Konrad Dybcio
2022-11-16 16:28 ` [PATCH v6 6/7] arm64: dts: qcom: sm8250: camss: Define ports and ports address/size cells Bryan O'Donoghue
2022-11-16 16:41   ` Konrad Dybcio
2022-11-16 16:28 ` [PATCH v6 7/7] arm64: dts: qcom: qrb5165-rb5-vision-mezzanine: Add vision mezzanine Bryan O'Donoghue
2022-11-16 16:40   ` Konrad Dybcio
2022-11-16 17:12     ` Bryan O'Donoghue

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.