diff --git a/arch/arm64/boot/dts/rockchip/overlays/Makefile b/arch/arm64/boot/dts/rockchip/overlays/Makefile index 4beab11b..4b67cc6c 100644 --- a/arch/arm64/boot/dts/rockchip/overlays/Makefile +++ b/arch/arm64/boot/dts/rockchip/overlays/Makefile @@ -458,6 +458,7 @@ dtb-$(CONFIG_CPU_RK3588) += \ radxa-cm5-io-radxa-display-10hd.dtbo \ radxa-cm5-io-radxa-display-8hd.dtbo \ radxa-cm5-io-raspi-7inch-touchscreen.dtbo \ + radxa-cm5-io-rpi-camera-v1_3.dtbo \ radxa-cm5-io-rpi-camera-v2.dtbo \ radxa-cm5-rpi-cm4-io-rpi-camera-v1_3-cam0.dtbo \ radxa-cm5-rpi-cm4-io-rpi-camera-v1_3-cam1.dtbo \ diff --git a/arch/arm64/boot/dts/rockchip/overlays/radxa-cm5-io-okdo-5mp.dts b/arch/arm64/boot/dts/rockchip/overlays/radxa-cm5-io-okdo-5mp.dts index 273fee77..373ccd27 100644 --- a/arch/arm64/boot/dts/rockchip/overlays/radxa-cm5-io-okdo-5mp.dts +++ b/arch/arm64/boot/dts/rockchip/overlays/radxa-cm5-io-okdo-5mp.dts @@ -37,7 +37,7 @@ clocks = <&clk_cam_25m>; pwdn-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_LOW>; clock-names = "ext_cam_clk"; - rockchip,camera-module-index = <0>; + rockchip,camera-module-index = <1>; rockchip,camera-module-facing = "back"; rockchip,camera-module-name = "OKDO-5MP"; rockchip,camera-module-lens-name = "default"; diff --git a/arch/arm64/boot/dts/rockchip/overlays/radxa-cm5-io-rpi-camera-v1_3.dts b/arch/arm64/boot/dts/rockchip/overlays/radxa-cm5-io-rpi-camera-v1_3.dts new file mode 100644 index 00000000..75b0cc66 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlays/radxa-cm5-io-rpi-camera-v1_3.dts @@ -0,0 +1,169 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + metadata { + title ="Enable Raspberry Pi Camera v1.3 on CSI0"; + compatible = "radxa,cm5-io"; + category = "camera"; + exclusive = "csi2_dphy0"; + description = "Enable Raspberry Pi Camera v1.3 on CSI0."; + }; +}; + +&{/} { + clk_cam_25m: external-camera-clock-25m { + status = "okay"; + compatible = "fixed-clock"; + clock-frequency = <25000000>; + clock-output-names = "clk_cam_25m"; + #clock-cells = <0>; + }; +}; + +&i2c7 { + status = "okay"; + pinctrl-0 = <&i2c7m2_xfer>; + #address-cells = <1>; + #size-cells = <0>; + + ov5647: ov5647@36 { + status = "okay"; + compatible = "ovti,ov5647"; + reg = <0x36>; + clocks = <&clk_cam_25m>; + pwdn-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_LOW>; + clock-names = "ext_cam_clk"; + rockchip,camera-module-index = <1>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "rpi-camera-v1p3"; + rockchip,camera-module-lens-name = "default"; + + port { + ov5647_out0: endpoint { + remote-endpoint = <&mipidphy0_in_ucam1>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&csi2_dphy0_hw { + status = "okay"; +}; + +&csi2_dphy0 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipidphy0_in_ucam1: endpoint@2 { + reg = <2>; + remote-endpoint = <&ov5647_out0>; + data-lanes = <1 2>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + csidphy0_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi2_csi2_input>; + }; + }; + }; +}; + +&mipi2_csi2 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi2_csi2_input: endpoint@1 { + reg = <1>; + remote-endpoint = <&csidphy0_out>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + mipi2_csi2_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&cif_mipi2_in0>; + }; + }; + }; +}; + +&rkcif { + status = "okay"; +}; + +&rkcif_mipi_lvds2 { + status = "okay"; + + port { + cif_mipi2_in0: endpoint { + remote-endpoint = <&mipi2_csi2_output>; + }; + }; +}; + +&rkcif_mipi_lvds2_sditf { + status = "okay"; + + port { + mipi_lvds2_sditf: endpoint { + remote-endpoint = <&isp1_vir0>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp1_mmu { + status = "okay"; +}; + +&rkisp1 { + status = "okay"; +}; + +&rkisp1_vir0 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp1_vir0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds2_sditf>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlays/radxa-cm5-io-rpi-camera-v2.dts b/arch/arm64/boot/dts/rockchip/overlays/radxa-cm5-io-rpi-camera-v2.dts index d8a4cc95..03a6d7a2 100644 --- a/arch/arm64/boot/dts/rockchip/overlays/radxa-cm5-io-rpi-camera-v2.dts +++ b/arch/arm64/boot/dts/rockchip/overlays/radxa-cm5-io-rpi-camera-v2.dts @@ -47,7 +47,7 @@ clocks = <&clk_cam_24m>; clock-names = "xvclk"; - rockchip,camera-module-index = <0>; + rockchip,camera-module-index = <1>; rockchip,camera-module-facing = "back"; rockchip,camera-module-name = "rpi-camera-v2"; rockchip,camera-module-lens-name = "default";