arm64: dts: rockchip: enable camera on tiger-haikou video-demo adapter
Subsystems (2)
Heiko Stuebner
maintainerPATCH 1/1 arm64: dts: rockchip: enable camera on tiger-haikou video-demo adapter
From: Heiko Stuebner <[email protected]>
The video-demo adapter also contains a camera, hooked to the CSI input of the RK3588. Add the necessary infrastructure and devices to enable it.
--- .../rk3588-tiger-haikou-video-demo.dtso | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+)
arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou-video-demo.dtso +95 -0
@@ -12,9 +12,11 @@ /dts-v1/; /plugin/; +#include <dt-bindings/clock/rockchip,rk3588-cru.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/leds/common.h> +#include <dt-bindings/media/video-interfaces.h> #include <dt-bindings/pinctrl/rockchip.h> #include <dt-bindings/soc/rockchip,vop2.h>
@@ -25,6 +27,43 @@ backlight: backlight { pwms = <&pwm0 0 25000 0>; }; + cam_afvdd_2v8: regulator-cam-afvdd-2v8 { + compatible = "regulator-fixed"; + gpio = <&pca9670 2 GPIO_ACTIVE_LOW>; + regulator-max-microvolt = <2800000>; + regulator-min-microvolt = <2800000>; + regulator-name = "cam-afvdd-2v8"; + vin-supply = <&vcc2v8_video>; + }; + + cam_avdd_2v8: regulator-cam-avdd-2v8 { + compatible = "regulator-fixed"; + gpio = <&pca9670 4 GPIO_ACTIVE_LOW>; + regulator-max-microvolt = <2800000>; + regulator-min-microvolt = <2800000>; + regulator-name = "cam-avdd-2v8"; + vin-supply = <&vcc2v8_video>; + }; + + cam_dovdd_1v8: regulator-cam-dovdd-1v8 { + compatible = "regulator-fixed"; + gpio = <&pca9670 3 GPIO_ACTIVE_LOW>; + regulator-max-microvolt = <1800000>; + regulator-min-microvolt = <1800000>; + regulator-name = "cam-dovdd-1v8"; + vin-supply = <&vcc1v8_video>; + }; + + cam_dvdd_1v2: regulator-cam-dvdd-1v2 { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&pca9670 5 GPIO_ACTIVE_HIGH>; + regulator-max-microvolt = <1200000>; + regulator-min-microvolt = <1200000>; + regulator-name = "cam-dvdd-1v2"; + vin-supply = <&vcc3v3_baseboard>; + }; + vcc1v8_video: regulator-vcc1v8-video { compatible = "regulator-fixed"; regulator-name = "vcc1v8-video";
@@ -57,6 +96,23 @@ video-adapter-led { }; }; +&csi4 { + status = "okay"; +}; + +&csi4_in { + csi4_input: endpoint { + bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>; + data-lanes = <1 2>; + link-frequencies = /bits/ 64 <450000000>; + remote-endpoint = <&cam_output>; + }; +}; + +&csi_dphy1 { + status = "okay"; +}; + &dsi0 { #address-cells = <1>; #size-cells = <0>;
@@ -96,6 +152,12 @@ &i2c6 { #address-cells = <1>; #size-cells = <0>; + focus: focus@c { + compatible = "dongwoon,dw9714"; + reg = <0xc>; + vcc-supply = <&cam_afvdd_2v8>; + }; + touchscreen@14 { compatible = "goodix,gt911"; reg = <0x14>;
@@ -118,6 +180,31 @@ pca9670: gpio@27 { pinctrl-0 = <&pca9670_resetn>; reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>; }; + + camera@36 { + compatible = "ovti,ov5675"; + reg = <0x36>; + assigned-clocks = <&cru CLK_MIPI_CAMARAOUT_M3>; + assigned-clock-rates = <24000000>; + clocks = <&cru CLK_MIPI_CAMARAOUT_M3>; + avdd-supply = <&cam_avdd_2v8>; + dvdd-supply = <&cam_dvdd_1v2>; + dovdd-supply = <&cam_dovdd_1v8>; + lens-focus = <&focus>; + orientation = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&mipim1_camera3_clk>; + reset-gpios = <&pca9670 6 GPIO_ACTIVE_LOW>; + rotation = <180>; + + port { + cam_output: endpoint { + data-lanes = <1 2>; + link-frequencies = /bits/ 64 <450000000>; + remote-endpoint = <&csi4_input>; + }; + }; + }; }; &mipidcphy0 {
@@ -142,6 +229,14 @@ &pwm0 { status = "okay"; }; +&vicap { + status = "okay"; +}; + +&vicap_mmu { + status = "okay"; +}; + &vp3 { #address-cells = <1>; #size-cells = <0>;
Signature · 7 lines
2.47.3 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
Hi Heiko,
On 10/26/26 11:20 AM, Heiko Stuebner wrote:
[...]
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou-video-demo.dtso +0
-0@@ -57,6 +96,23 @@ video-adapter-led { }; };
arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou-video-demo.dtso video-adapter-led { · line 108
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou-video-demo.dtso +10
-0+&csi4 { + status = "okay"; +}; + +&csi4_in { + csi4_input: endpoint { + bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>; + data-lanes = <1 2>; + link-frequencies = /bits/ 64 <450000000>; + remote-endpoint = <&cam_output>;
thought: seems like we are missing link-frequencies and bus-type for px30-ringneck-haikou-video-demo.dtso?
Quoted 29 lines
arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou-video-demo.dtso +15
-0+ }; +}; + +&csi_dphy1 { + status = "okay"; +}; + &dsi0 { #address-cells = <1>; #size-cells = <0>;@@ -96,6 +152,12 @@ &i2c6 { #address-cells = <1>; #size-cells = <0>; + focus: focus@c { + compatible = "dongwoon,dw9714"; + reg = <0xc>; + vcc-supply = <&cam_afvdd_2v8>; + }; + touchscreen@14 { compatible = "goodix,gt911"; reg = <0x14>;@@ -118,6 +180,31 @@ pca9670: gpio@27 { pinctrl-0 = <&pca9670_resetn>; reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>; }; + + camera@36 {
arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou-video-demo.dtso pca9670: gpio@27 { · line 194
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou-video-demo.dtso +10
-0+ compatible = "ovti,ov5675"; + reg = <0x36>; + assigned-clocks = <&cru CLK_MIPI_CAMARAOUT_M3>; + assigned-clock-rates = <24000000>; + clocks = <&cru CLK_MIPI_CAMARAOUT_M3>; + avdd-supply = <&cam_avdd_2v8>; + dvdd-supply = <&cam_dvdd_1v2>; + dovdd-supply = <&cam_dovdd_1v8>; + lens-focus = <&focus>; + orientation = <0>;
issue: please use MEDIA_ORIENTATION_FRONT so it's easier to read.
arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou-video-demo.dtso pca9670: gpio@27 { · line 201
Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou-video-demo.dtso +7
-0+ pinctrl-names = "default"; + pinctrl-0 = <&mipim1_camera3_clk>; + reset-gpios = <&pca9670 6 GPIO_ACTIVE_LOW>; + rotation = <180>; + + port { + cam_output: endpoint {
issue: missing bus-type?
I have an additional request to Heiko with the maintainer hat, please only merge this once the necessary parts in the OV5675 driver are merged. I find it very beneficial that only things that were tested with merged commits get enabled/configured in the Device Tree, because I only have to check the Device Tree to know if it should be supported on our devices, and if it's not then I have some more work to do, and if it is, but it doesn't work, I know that it is a regression and I can figure out when it got introduced without having to patch the kernel for each bisect step.
With the two issues fixed:
Thanks!
Quentin
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Quoted 3 lines · Quentin Schulz
Hi Heiko,
On 10/26/26 11:20 AM, Heiko Stuebner wrote:
[...]
Quoted 10 lines
Quoted 7 lines
+ pinctrl-names = "default";
+ pinctrl-0 = <&mipim1_camera3_clk>; + reset-gpios = <&pca9670 6GPIO_ACTIVE_LOW>; + rotation = <180>;
+
+ port {
+cam_output: endpoint {issue: missing bus-type?
Nevermind, it seems that it only matters from the CSI controller perspective seeing the two other Rockchip Device Trees with this property set.
Cheers,
Quentin
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip