Skip to contentSkip to conversation

riscv: dts: starfive: jh7110: Add camera subsystem nodes

PATCH Applied Changhuang Liang 3 participants 3 messages Feb 19, 2024 – Oct 12, 2024

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

PATCH v3 1/1 riscv: dts: starfive: jh7110: Add camera subsystem nodes

Add camera subsystem nodes for the StarFive JH7110 SoC. They contain the dphy-rx, csi2rx, camss nodes.

---
 .../jh7110-starfive-visionfive-2.dtsi         | 49 ++++++++++++++
 arch/riscv/boot/dts/starfive/jh7110.dtsi      | 67 +++++++++++++++++++
 2 files changed, 116 insertions(+)
arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +49 -0
index b89e9791efa7..737ee97a3577 100644
@@ -125,6 +125,55 @@ &tdm_ext {
 	clock-frequency = <49152000>;
 };
 
+&camss {
+	assigned-clocks = <&ispcrg JH7110_ISPCLK_DOM4_APB_FUNC>,
+			  <&ispcrg JH7110_ISPCLK_MIPI_RX0_PXL>;
+	assigned-clock-rates = <49500000>, <198000000>;
+	status = "okay";
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+		};
+
+		port@1 {
+			reg = <1>;
+
+			camss_from_csi2rx: endpoint {
+				remote-endpoint = <&csi2rx_to_camss>;
+			};
+		};
+	};
+};
+
+&csi2rx {
+	assigned-clocks = <&ispcrg JH7110_ISPCLK_VIN_SYS>;
+	assigned-clock-rates = <297000000>;
+	status = "okay";
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+
+			/* remote MIPI sensor endpoint */
+		};
+
+		port@1 {
+			reg = <1>;
+
+			csi2rx_to_camss: endpoint {
+				remote-endpoint = <&camss_from_csi2rx>;
+			};
+		};
+	};
+};
+
 &gmac0 {
 	phy-handle = <&phy0>;
 	phy-mode = "rgmii-id";
arch/riscv/boot/dts/starfive/jh7110.dtsi +67 -0

79 lines not on this page · raw message

--
2.25.1

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

#2 lore raw
In reply to Changhuang Liang

Hi,

Quoted 8 lines · Changhuang Liang

Add camera subsystem nodes for the StarFive JH7110 SoC. They contain the dphy-rx, csi2rx, camss nodes.

---
 .../jh7110-starfive-visionfive-2.dtsi         | 49 ++++++++++++++
 arch/riscv/boot/dts/starfive/jh7110.dtsi      | 67 +++++++++++++++++++
 2 files changed, 116 insertions(+)

We have been asked to enable CONFIG_VIDEO_STARFIVE_CAMSS in the Debian kernel, which from my understanding and given the device tree shown below also requires enabling CONFIG_VIDEO_CADENCE_CSI2RX. That said doing so triggers the following error in dmesg:

[   25.143282] cdns-csi2rx 19800000.csi: probe with driver cdns-csi2rx failed with error -22

From a quick look it seems there is something in the port@0 csi2rx entry. Do you happen to know what is wrong?

Thanks
Aurelien

Quoted 60 lines
arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +49 -0
index b89e9791efa7..737ee97a3577 100644
@@ -125,6 +125,55 @@ &tdm_ext {
 	clock-frequency = <49152000>;
 };
 
+&camss {
+	assigned-clocks = <&ispcrg JH7110_ISPCLK_DOM4_APB_FUNC>,
+			  <&ispcrg JH7110_ISPCLK_MIPI_RX0_PXL>;
+	assigned-clock-rates = <49500000>, <198000000>;
+	status = "okay";
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+		};
+
+		port@1 {
+			reg = <1>;
+
+			camss_from_csi2rx: endpoint {
+				remote-endpoint = <&csi2rx_to_camss>;
+			};
+		};
+	};
+};
+
+&csi2rx {
+	assigned-clocks = <&ispcrg JH7110_ISPCLK_VIN_SYS>;
+	assigned-clock-rates = <297000000>;
+	status = "okay";
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+
+			/* remote MIPI sensor endpoint */
+		};
+
+		port@1 {
+			reg = <1>;
+
+			csi2rx_to_camss: endpoint {
+				remote-endpoint = <&camss_from_csi2rx>;
+			};
+		};
+	};
+};
+
 &gmac0 {
 	phy-handle = <&phy0>;
 	phy-mode = "rgmii-id";
Signature · 7 lines
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
[email protected]                     http://aurel32.net

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv