Skip to content

Commit b45f9f9

Browse files
oli-benmmind
authored andcommitted
arm64: dts: rockchip: describe the OV8858 user camera on PinePhone Pro
Add the description of the front/user camera (OV8858) on the PinePhone Pro to the device dts file. It receives commands over SCCB, an I2C-compatible protocol, at I2C address 0x36 and transmits data over CSI-MIPI. I confirmed this address experimentally. The pin control mapping was again extracted from the PinePhone Pro schematic v1.0 as well as the RK3399 datasheet revision 1.8. Table 2-3 in section 2.8 of the RK3399 datasheet contains the mapping of IO functions for the SoC pins. Page 52 shows GPIO1_A4, page 54 shows GPIO2_B4. For the reset (RESET) signal: page 11 quadrant D2 | p.18 q.B3-4 | p.18 q.C2 RK3399_E.R28 -> GPIO1_A4 -> Camera2_RST -> MIPI_RST1 -> OV8858.12 For the powerdown (PWDN) signal: page 9 quadrants D4-5 | p.18 q.B2 RK3399_L.F31 -> GPIO2_B4 -> DVP_PDN0_H -> OV8858.14 Helped-by: Dragan Simic <[email protected]> Co-developed-by: Ondrej Jirman <[email protected]> Signed-off-by: Ondrej Jirman <[email protected]> Signed-off-by: Olivier Benjamin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiko Stuebner <[email protected]>
1 parent 9336eb8 commit b45f9f9

File tree

1 file changed

+46
-1
lines changed

1 file changed

+46
-1
lines changed

arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,27 @@
480480
/* Same I2c bus as both cameras, depends on vcca1v8_codec for power. */
481481
vcc-supply = <&vcc1v8_dvp>;
482482
};
483+
484+
ucam: camera@36 {
485+
compatible = "ovti,ov8858";
486+
reg = <0x36>;
487+
clocks = <&cru SCLK_CIF_OUT>; /* MIPI_MCLK1, derived from CIF_CLK0 */
488+
clock-names = "xvclk";
489+
dovdd-supply = <&vcc1v8_dvp>;
490+
orientation = <0>; /* V4L2_CAMERA_ORIENTATION_FRONT */
491+
pinctrl-names = "default";
492+
pinctrl-0 = <&camera2_rst_l &dvp_pdn0_h>;
493+
powerdown-gpios = <&gpio2 RK_PB4 GPIO_ACTIVE_LOW>;
494+
reset-gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_LOW>;
495+
rotation = <90>;
496+
497+
port {
498+
ucam_out: endpoint {
499+
data-lanes = <1 2 3 4>;
500+
remote-endpoint = <&mipi_in_ucam>;
501+
};
502+
};
503+
};
483504
};
484505

485506
&i2c3 {
@@ -524,6 +545,24 @@
524545
status = "okay";
525546
};
526547

548+
&isp0 {
549+
status = "okay";
550+
551+
ports {
552+
port@0 {
553+
mipi_in_ucam: endpoint@0 {
554+
reg = <0>;
555+
data-lanes = <1 2 3 4>;
556+
remote-endpoint = <&ucam_out>;
557+
};
558+
};
559+
};
560+
};
561+
562+
&isp0_mmu {
563+
status = "okay";
564+
};
565+
527566
&isp1 {
528567
status = "okay";
529568

@@ -596,10 +635,16 @@
596635
};
597636
};
598637

599-
camera {
638+
cameras {
600639
camera_rst_l: camera-rst-l {
601640
rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
602641
};
642+
camera2_rst_l: camera2-rst-l {
643+
rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
644+
};
645+
dvp_pdn0_h: dvp-pdn0-h {
646+
rockchip,pins = <2 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
647+
};
603648
};
604649

605650
leds {

0 commit comments

Comments
 (0)