From d41d3e1b0427e3e9b469782fea9bb5bdbb179843 Mon Sep 17 00:00:00 2001 From: Alvin Xie Date: Thu, 25 Apr 2024 16:06:56 +0800 Subject: [PATCH] zero3: add radxa camera 8m --- .../arm64/boot/dts/rockchip/overlays/Makefile | 1 + .../overlays/radxa-zero3-radxa-camera-8m.dts | 129 ++++++++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/overlays/radxa-zero3-radxa-camera-8m.dts diff --git a/arch/arm64/boot/dts/rockchip/overlays/Makefile b/arch/arm64/boot/dts/rockchip/overlays/Makefile index f98724d9..4ecd48ea 100644 --- a/arch/arm64/boot/dts/rockchip/overlays/Makefile +++ b/arch/arm64/boot/dts/rockchip/overlays/Makefile @@ -293,6 +293,7 @@ dtb-$(CONFIG_CPU_RK3568) += \ radxa-cm3i-io-radxa-camera-8m-cam2.dtbo \ radxa-cm3i-io-sata.dtbo \ radxa-zero3-external-antenna.dtbo \ + radxa-zero3-radxa-camera-8m.dtbo \ radxa-zero3-rpi-camera-v1.3.dtbo \ radxa-zero3-rpi-camera-v2.dtbo \ radxa-zero3-disabled-ethernet.dtbo \ diff --git a/arch/arm64/boot/dts/rockchip/overlays/radxa-zero3-radxa-camera-8m.dts b/arch/arm64/boot/dts/rockchip/overlays/radxa-zero3-radxa-camera-8m.dts new file mode 100644 index 00000000..628ed992 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlays/radxa-zero3-radxa-camera-8m.dts @@ -0,0 +1,129 @@ +/dts-v1/; +/plugin/; + +#include +#include + + +/ { + metadata { + title = "Enable Radxa Camera 8M 219"; + compatible = "radxa,zero3"; + category = "camera"; + exclusive = "csi2_dphy0"; + description = "Enable Radxa Camera 8M 219."; + }; +}; + +&{/} { + clk_cam_24m: external-camera-clock-24m { + status = "okay"; + compatible = "fixed-clock"; + clock-frequency = <24000000>; + clock-output-names = "clk_cam_24m"; + #clock-cells = <0>; + }; + + camera_pwdn_gpio: camera-pwdn-gpio { + status = "okay"; + compatible = "regulator-fixed"; + regulator-name = "camera_pwdn_gpio"; + regulator-always-on; + regulator-boot-on; + enable-active-high; + gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; + }; +}; + +&i2c2 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c2m1_xfer>; + #address-cells = <1>; + #size-cells = <0>; + + camera_imx219: camera-imx219@10 { + status = "okay"; + compatible = "sony,imx219"; + reg = <0x10>; + clocks = <&clk_cam_24m>; + clock-names = "xvclk"; + rockchip,camera-module-index = <0>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "RADXA-CAMERA-8M"; + rockchip,camera-module-lens-name = "default"; + + port { + ucam_out0: endpoint { + remote-endpoint = <&mipi_in_ucam0>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&csi2_dphy_hw { + status = "okay"; +}; + +&csi2_dphy0 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi_in_ucam0: endpoint@1 { + reg = <1>; + remote-endpoint = <&ucam_out0>; + data-lanes = <1 2>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + dphy0_out: endpoint@1 { + reg = <1>; + remote-endpoint = <&isp0_in>; + }; + }; + }; +}; + +&rkisp_vir0 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp0_in: endpoint@0 { + reg = <0>; + remote-endpoint = <&dphy0_out>; + }; + }; +}; + +&rkisp { + status = "okay"; +}; + +&rkisp_mmu { + status = "okay"; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&rkcif { + status = "okay"; +};