Skip to contentSkip to conversation

ARM: dts: exynos: Add front camera support to I9100

PATCH Superseded Timon Baetz 2 participants 2 messages Mar 26, 2021

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: exynos: Add front camera support to I9100

Add node for Samsung S5K5BAF CMOS image sensor and enable the associated MIPI CSI-2 receiver node.

---
 arch/arm/boot/dts/exynos4210-i9100.dts | 52 ++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)
arch/arm/boot/dts/exynos4210-i9100.dts +52 -0
index 228de6d8c9d1..d31146c08b84 100644
@@ -147,6 +147,36 @@ battery@36 {
 		};
 	};
 
+	i2c_s5k5baf: i2c-gpio-1 {
+		compatible = "i2c-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		sda-gpios = <&gpc1 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpc1 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <2>;
+
+		s5k5bafx@2d {
+			compatible = "samsung,s5k5baf";
+			reg = <0x2d>;
+			vdda-supply = <&cam_io_en_reg>;
+			vddreg-supply = <&vt_core_15v_reg>;
+			vddio-supply = <&vtcam_reg>;
+			clocks = <&camera 0>;
+			clock-names = "mclk";
+			stbyn-gpios = <&gpl2 0 1>;
+			rstn-gpios = <&gpl2 1 1>;
+			clock-frequency = <24000000>;
+
+			port {
+				s5k5bafx_ep: endpoint {
+					remote-endpoint = <&csis1_ep>;
+					data-lanes = <1>;
+				};
+			};
+		};
+	};
+
 	spi-3 {
 		compatible = "spi-gpio";
 		#address-cells = <1>;
@@ -220,7 +250,11 @@ pmic_ap_clk: pmic-ap-clk {
 };
 
 &camera {
+	pinctrl-0 = <&cam_port_a_clk_active>;
+	pinctrl-names = "default";
 	status = "okay";
+	assigned-clocks = <&clock CLK_MOUT_CAM0>, <&clock CLK_MOUT_CAM1>;
+	assigned-clock-parents = <&clock CLK_XUSBXTI>, <&clock CLK_XUSBXTI>;
 };
 
 &cpu0 {
@@ -794,3 +828,21 @@ &serial_3 {
 &tmu {
 	status = "okay";
 };
+
+&csis_1 {
+	status = "okay";
+	vddcore-supply = <&vusb_reg>;
+	vddio-supply = <&vmipi_reg>;
+	clock-frequency = <160000000>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	port@4 {
+		reg = <4>;
+		csis1_ep: endpoint {
+			remote-endpoint = <&s5k5bafx_ep>;
+			data-lanes = <1>;
+			samsung,csis-hs-settle = <6>;
+		};
+	};
+};

--
2.25.1

#1 lore raw
Quoted 16 lines · Timon Baetz

Add node for Samsung S5K5BAF CMOS image sensor and enable the associated MIPI CSI-2 receiver node.

---
 arch/arm/boot/dts/exynos4210-i9100.dts | 52 ++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)
arch/arm/boot/dts/exynos4210-i9100.dts +0 -0
index 228de6d8c9d1..d31146c08b84 100644
@@ -147,6 +147,36 @@ battery@36 {
 		};
 	};
 

arch/arm/boot/dts/exynos4210-i9100.dts battery@36 { · line 159

Quoted 10 lines
arch/arm/boot/dts/exynos4210-i9100.dts +10 -0
+	i2c_s5k5baf: i2c-gpio-1 {
+		compatible = "i2c-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		sda-gpios = <&gpc1 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpc1 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <2>;
+
+		s5k5bafx@2d {

The node name should be generic, so "image-sensor".

arch/arm/boot/dts/exynos4210-i9100.dts battery@36 { · line 167

Quoted 8 lines
arch/arm/boot/dts/exynos4210-i9100.dts +8 -0
+			compatible = "samsung,s5k5baf";
+			reg = <0x2d>;
+			vdda-supply = <&cam_io_en_reg>;
+			vddreg-supply = <&vt_core_15v_reg>;
+			vddio-supply = <&vtcam_reg>;
+			clocks = <&camera 0>;
+			clock-names = "mclk";
+			stbyn-gpios = <&gpl2 0 1>;

GPIO_ACTIVE_LOW

arch/arm/boot/dts/exynos4210-i9100.dts battery@36 { · line 170

Quoted 3 lines
arch/arm/boot/dts/exynos4210-i9100.dts +3 -0
+			rstn-gpios = <&gpl2 1 1>;
+			clock-frequency = <24000000>;
+

Best regards,
Krzysztof