diff --git a/arch/arm64/boot/dts/rockchip/overlay/Makefile b/arch/arm64/boot/dts/rockchip/overlay/Makefile index c52c5080a065..0a00b4b0f307 100644 --- a/arch/arm64/boot/dts/rockchip/overlay/Makefile +++ b/arch/arm64/boot/dts/rockchip/overlay/Makefile @@ -48,17 +48,52 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \ rock-5a-sata.dtbo \ rock-5b-hdmi1-8k.dtbo \ rock-5b-hdmi2-8k.dtbo \ + rock-5b-okdo-5mp-camera.dtbo \ rock-5b-pd-max-voltage-12v.dtbo \ rock-5b-radxa-display-10hd.dtbo \ rock-5b-radxa-display-8hd.dtbo \ rock-5b-radxa-display-10fhd.dtbo \ + rock-5b-rpi-camera-v1_3.dtbo \ rock-5b-rpi-camera-v2.dtbo \ + rock-5b-radxa-camera-13m-214.dtbo \ rock-5b-radxa-camera-4k.dtbo \ + rock-5b-radxa-camera-8m-219.dtbo \ rock-5b-sata.dtbo \ + rock-5b-plus-cam0-okdo-5mp-camera.dtbo \ + rock-5b-plus-cam0-rpi-camera-v1p3.dtbo \ + rock-5b-plus-cam0-rpi-camera-v2.dtbo \ + rock-5b-plus-cam0-radxa-camera-13m-214.dtbo \ rock-5b-plus-cam0-radxa-camera-4k.dtbo \ + rock-5b-plus-cam0-radxa-camera-8m-219.dtbo \ + rock-5b-plus-cam1-okdo-5mp-camera.dtbo \ + rock-5b-plus-cam1-radxa-camera-13m-214.dtbo \ + rock-5b-plus-cam1-radxa-camera-4k.dtbo \ + rock-5b-plus-cam1-radxa-camera-8m-219.dtbo \ + rock-5b-plus-cam1-rpi-camera-v1p3.dtbo \ + rock-5b-plus-cam1-rpi-camera-v2.dtbo \ rock-5b-plus-radxa-display-8hd.dtbo \ rock-5b-plus-radxa-display-10fhd.dtbo \ + rock-5t-cam0-okdo-5mp-camera.dtbo \ + rock-5t-cam0-rpi-camera-v1p3.dtbo \ + rock-5t-cam0-rpi-camera-v2.dtbo \ + rock-5t-cam0-radxa-camera-13m-214.dtbo \ + rock-5t-cam0-radxa-camera-4k.dtbo \ + rock-5t-cam0-radxa-camera-8m-219.dtbo \ + rock-5t-cam1-okdo-5mp-camera.dtbo \ + rock-5t-cam1-rpi-camera-v1p3.dtbo \ + rock-5t-cam1-rpi-camera-v2.dtbo \ + rock-5t-cam1-radxa-camera-13m-214.dtbo \ + rock-5t-cam1-radxa-camera-4k.dtbo \ + rock-5t-cam1-radxa-camera-8m-219.dtbo \ + rock-5t-radxa-display-8hd.dtbo \ rock-5t-radxa-display-10fhd.dtbo \ + rock-5t-industrial-cam1-okdo-5mp-camera.dtbo \ + rock-5t-industrial-cam1-rpi-camera-v1p3.dtbo \ + rock-5t-industrial-cam1-rpi-camera-v2.dtbo \ + rock-5t-industrial-cam1-radxa-camera-4k.dtbo \ + rock-5t-industrial-cam1-radxa-camera-8m-219.dtbo \ + rock-5t-industrial-radxa-display-10fhd.dtbo \ + rock-5t-industrial-radxa-display-8hd.dtbo \ rock-5-itx-radxa-camera-4k-on-cam0.dtbo \ rock-5-itx-radxa-camera-4k-on-cam1.dtbo \ rock-5-itx-radxa-display-8hd-on-lcd0.dtbo \ diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5b-okdo-5mp-camera.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-okdo-5mp-camera.dts new file mode 100644 index 000000000000..697eaf68bd48 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-okdo-5mp-camera.dts @@ -0,0 +1,176 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + metadata { + title ="Enable OKDO 5MP Camera"; + compatible = "radxa,rock-5b"; + category = "camera"; + exclusive = "csi2_dphy0"; + description = "Enable OKDO 5MP Camera."; + }; +}; + +&{/} { + clk_cam_25m: external-camera-clock-25m { + status = "okay"; + compatible = "fixed-clock"; + clock-frequency = <25000000>; + clock-output-names = "clk_cam_25m"; + #clock-cells = <0>; + }; +}; + +&i2c3 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + ov5647: ov5647@36 { + status = "okay"; + compatible = "ovti,ov5647"; + reg = <0x36>; + clocks = <&clk_cam_25m>; + pwdn-gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>; + clock-names = "ext_cam_clk"; + rockchip,camera-module-index = <0>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "OKDO-5MP"; + 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 = <&isp0_vir0>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp0_mmu { + status = "okay"; +}; + +&rkisp0 { + status = "okay"; +}; + +&rkisp0_vir0 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp0_vir0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds2_sditf>; + }; + }; +}; + +&pinctrl { + camera { + cam_pwdn_gpio: cam-pwdn-gpio { + rockchip,pins = <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam0-okdo-5mp-camera.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam0-okdo-5mp-camera.dts new file mode 100644 index 000000000000..c18f152d9866 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam0-okdo-5mp-camera.dts @@ -0,0 +1,176 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + metadata { + title ="Enable OKDO 5MP Camera on CAM0"; + compatible = "radxa,rock-5b-plus"; + category = "camera"; + exclusive = "csi2_dphy0"; + description = "Enable OKDO 5MP Camera on CAM0."; + }; +}; + +&{/} { + clk_cam_25m: external-camera-clock-25m { + status = "okay"; + compatible = "fixed-clock"; + clock-frequency = <25000000>; + clock-output-names = "clk_cam_25m"; + #clock-cells = <0>; + }; +}; + +&i2c3 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + ov5647: ov5647@36 { + status = "okay"; + compatible = "ovti,ov5647"; + reg = <0x36>; + clocks = <&clk_cam_25m>; + pwdn-gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>; + clock-names = "ext_cam_clk"; + rockchip,camera-module-index = <0>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "OKDO-5MP"; + 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 = <&isp0_vir0>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp0_mmu { + status = "okay"; +}; + +&rkisp0 { + status = "okay"; +}; + +&rkisp0_vir0 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp0_vir0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds2_sditf>; + }; + }; +}; + +&pinctrl { + camera { + cam_pwdn_gpio: cam-pwdn-gpio { + rockchip,pins = <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam0-radxa-camera-13m-214.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam0-radxa-camera-13m-214.dts new file mode 100644 index 000000000000..be5dd699c58f --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam0-radxa-camera-13m-214.dts @@ -0,0 +1,175 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + metadata { + title ="Enable Radxa Camera 13M 214 on CAM0"; + compatible = "radxa,rock-5b-plus"; + category = "camera"; + exclusive = "csi2_dphy0"; + description = "Enable Radxa Camera 13M 214 on CAM0."; + }; +}; + +&i2c3 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + dw9714: dw9714@c { + compatible = "dongwoon,dw9714"; + status = "okay"; + reg = <0x0c>; + rockchip,vcm-start-current = <10>; + rockchip,vcm-rated-current = <85>; + rockchip,vcm-step-mode = <3>; + rockchip,camera-module-index = <0>; + rockchip,camera-module-facing = "front"; + }; + + imx214: imx214@10 { + status = "okay"; + compatible = "sony,imx214"; + reg = <0x10>; + clocks = <&cru CLK_MIPI_CAMARAOUT_M3>; + clock-names = "xvclk"; + pinctrl-names = "default"; + pinctrl-0 = <&mipim0_camera3_clk>; + power-domains = <&power RK3588_PD_VI>; + pwdn-gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>; + rockchip,camera-module-index = <0>; + rockchip,camera-module-facing = "front"; + rockchip,camera-module-name = "RADXA-CAMERA-13M"; + rockchip,camera-module-lens-name = "DEFAULT"; + lens-focus = <&dw9714>; + port { + imx214_out0: endpoint { + remote-endpoint = <&mipidphy0_in_ucam0>; + data-lanes = <1 2 3 4>; + }; + }; + }; +}; + +&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_ucam0: endpoint@1 { + reg = <1>; + remote-endpoint = <&imx214_out0>; + data-lanes = <1 2 3 4>; + }; + }; + + 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 = <&isp0_vir0>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp0_mmu { + status = "okay"; +}; + +&rkisp0 { + status = "okay"; +}; + +&rkisp0_vir0 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp0_vir0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds2_sditf>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam0-radxa-camera-8m-219.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam0-radxa-camera-8m-219.dts new file mode 100644 index 000000000000..3489980a8168 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam0-radxa-camera-8m-219.dts @@ -0,0 +1,187 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + metadata { + title ="Enable Radxa Camera 8M 219 on CAM0"; + compatible = "radxa,rock-5b-plus"; + category = "camera"; + exclusive = "csi2_dphy0"; + description = "Enable Radxa Camera 8M 219 on CAM0."; + }; +}; + +&{/} { + camera_pwdn_gpio: camera-pwdn-gpio { + compatible = "regulator-fixed"; + regulator-name = "camera_pwdn_gpio"; + regulator-always-on; + regulator-boot-on; + enable-active-high; + gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&cam_pwdn_gpio>; + }; + + clk_cam_24m: external-camera-clock-24m { + compatible = "fixed-clock"; + clock-frequency = <24000000>; + clock-output-names = "clk_cam_24m"; + #clock-cells = <0>; + }; +}; + +&i2c3 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + camera_imx219: camera-imx219@10 { + 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 { + imx219_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 = <&imx219_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 = <&isp0_vir0>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp0_mmu { + status = "okay"; +}; + +&rkisp0 { + status = "okay"; +}; + +&rkisp0_vir0 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp0_vir0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds2_sditf>; + }; + }; +}; + +&pinctrl { + camera { + cam_pwdn_gpio: cam-pwdn-gpio { + rockchip,pins = <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; + diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam0-rpi-camera-v1p3.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam0-rpi-camera-v1p3.dts new file mode 100644 index 000000000000..b5866b41f358 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam0-rpi-camera-v1p3.dts @@ -0,0 +1,176 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + metadata { + title ="Enable Raspberry Pi Camera v1.3 on CAM0"; + compatible = "radxa,rock-5b-plus"; + category = "camera"; + exclusive = "csi2_dphy0"; + description = "Enable Raspberry Pi Camera v1.3 on CAM0."; + }; +}; + +&{/} { + clk_cam_25m: external-camera-clock-25m { + status = "okay"; + compatible = "fixed-clock"; + clock-frequency = <25000000>; + clock-output-names = "clk_cam_25m"; + #clock-cells = <0>; + }; +}; + +&i2c3 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + ov5647: ov5647@36 { + status = "okay"; + compatible = "ovti,ov5647"; + reg = <0x36>; + clocks = <&clk_cam_25m>; + pwdn-gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>; + clock-names = "ext_cam_clk"; + rockchip,camera-module-index = <0>; + 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 = <&isp0_vir0>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp0_mmu { + status = "okay"; +}; + +&rkisp0 { + status = "okay"; +}; + +&rkisp0_vir0 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp0_vir0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds2_sditf>; + }; + }; +}; + +&pinctrl { + camera { + cam_pwdn_gpio: cam-pwdn-gpio { + rockchip,pins = <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam0-rpi-camera-v2.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam0-rpi-camera-v2.dts new file mode 100644 index 000000000000..90d97e8a7383 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam0-rpi-camera-v2.dts @@ -0,0 +1,9 @@ +#include "rock-5b-rpi-camera-v2.dts" + +/ { + metadata { + title ="Enable Raspberry Pi Camera V2 on CAM0"; + compatible = "radxa,rock-5b-plus"; + description = "Enable Raspberry Pi Camera V2 on CAM0."; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam1-okdo-5mp-camera.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam1-okdo-5mp-camera.dts new file mode 100644 index 000000000000..ab133fb712a8 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam1-okdo-5mp-camera.dts @@ -0,0 +1,178 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + metadata { + title ="Enable OKDO 5MP Camera on CAM1"; + compatible = "radxa,rock-5b-plus"; + category = "camera"; + exclusive = "csi2_dphy4"; + description = "Enable OKDO 5MP Camera on CAM1."; + }; +}; + +&{/} { + clk_cam_25m_1: external-camera-clock-25m-1 { + status = "okay"; + compatible = "fixed-clock"; + clock-frequency = <25000000>; + clock-output-names = "clk_cam_25m_1"; + #clock-cells = <0>; + }; +}; + +&i2c4 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c4m1_xfer>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + ov5647: ov5647@36 { + status = "okay"; + compatible = "ovti,ov5647"; + reg = <0x36>; + clocks = <&clk_cam_25m_1>; + pwdn-gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; + clock-names = "ext_cam_clk_1"; + rockchip,camera-module-index = <1>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "OKDO-5MP"; + rockchip,camera-module-lens-name = "default"; + + port { + ov5647_out4: endpoint { + remote-endpoint = <&mipidphy4_in_ucam1>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&csi2_dphy1_hw { + status = "okay"; +}; + +&csi2_dphy4 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipidphy4_in_ucam1: endpoint@2 { + reg = <2>; + remote-endpoint = <&ov5647_out4>; + data-lanes = <1 2>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + csidphy4_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi4_csi2_input>; + }; + }; + }; +}; + +&mipi4_csi2 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_input: endpoint@1 { + reg = <1>; + remote-endpoint = <&csidphy4_out>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&cif_mipi4_in0>; + }; + }; + }; +}; + +&rkcif { + status = "okay"; +}; + +&rkcif_mipi_lvds4 { + status = "okay"; + + port { + cif_mipi4_in0: endpoint { + remote-endpoint = <&mipi4_csi2_output>; + }; + }; +}; + +&rkcif_mipi_lvds4_sditf { + status = "okay"; + + port { + mipi_lvds4_sditf: endpoint { + remote-endpoint = <&isp1_vir1>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp1_mmu { + status = "okay"; +}; + +&rkisp1 { + status = "okay"; +}; + +&rkisp1_vir1 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp1_vir1: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds4_sditf>; + }; + }; +}; + +&pinctrl { + camera { + cam_pwdn_gpio: cam-pwdn-gpio { + rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam1-radxa-camera-13m-214.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam1-radxa-camera-13m-214.dts new file mode 100644 index 000000000000..efb3f93d3404 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam1-radxa-camera-13m-214.dts @@ -0,0 +1,177 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + metadata { + title ="Enable Radxa Camera 13M 214 on CAM1"; + compatible = "radxa,rock-5b-plus"; + category = "camera"; + exclusive = "csi2_dphy1"; + description = "Enable Radxa Camera 13M 214 on CAM1."; + }; +}; + +&i2c4 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c4m1_xfer>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + dw9714_1: dw9714@c { + compatible = "dongwoon,dw9714"; + status = "okay"; + reg = <0x0c>; + rockchip,vcm-start-current = <10>; + rockchip,vcm-rated-current = <85>; + rockchip,vcm-step-mode = <3>; + rockchip,camera-module-index = <0>; + rockchip,camera-module-facing = "back"; + }; + + imx214_1: imx214-1@10 { + status = "okay"; + compatible = "sony,imx214"; + reg = <0x10>; + clocks = <&cru CLK_MIPI_CAMARAOUT_M4>; + clock-names = "xvclk"; + pinctrl-names = "default"; + pinctrl-0 = <&mipim0_camera4_clk>; + power-domains = <&power RK3588_PD_VI>; + pwdn-gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio2 RK_PB0 GPIO_ACTIVE_HIGH>; + rockchip,camera-module-index = <1>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "RADXA-CAMERA-4K"; + rockchip,camera-module-lens-name = "DEFAULT"; + lens-focus = <&dw9714_1>; + port { + imx214_1_out4: endpoint { + remote-endpoint = <&mipidphy4_in_ucam0>; + data-lanes = <1 2 3 4>; + }; + }; + }; +}; + +&csi2_dphy1_hw { + status = "okay"; +}; + +&csi2_dphy3 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipidphy4_in_ucam0: endpoint@1 { + reg = <1>; + remote-endpoint = <&imx214_1_out4>; + data-lanes = <1 2 3 4>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + csidphy4_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi4_csi2_input>; + }; + }; + }; +}; + +&mipi4_csi2 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_input: endpoint@1 { + reg = <1>; + remote-endpoint = <&csidphy4_out>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&cif_mipi4_in0>; + }; + }; + }; +}; + +&rkcif { + status = "okay"; +}; + +&rkcif_mipi_lvds4 { + status = "okay"; + + port { + cif_mipi4_in0: endpoint { + remote-endpoint = <&mipi4_csi2_output>; + }; + }; +}; + +&rkcif_mipi_lvds4_sditf { + status = "okay"; + + port { + mipi_lvds4_sditf: endpoint { + remote-endpoint = <&isp1_vir1>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp1_mmu { + status = "okay"; +}; + +&rkisp1 { + status = "okay"; +}; + +&rkisp1_vir1 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp1_vir1: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds4_sditf>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam1-radxa-camera-4k.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam1-radxa-camera-4k.dts new file mode 100644 index 000000000000..47715ca209f6 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam1-radxa-camera-4k.dts @@ -0,0 +1,165 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + metadata { + title ="Enable Radxa Camera 4K on CAM1"; + compatible = "radxa,rock-5b-plus"; + category = "camera"; + exclusive = "csi2_dphy1"; + description = "Enable Radxa Camera 4K on CAM1."; + }; +}; + +&i2c4 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c4m1_xfer>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + imx415: imx415@1a { + status = "okay"; + compatible = "sony,imx415"; + reg = <0x1a>; + clocks = <&cru CLK_MIPI_CAMARAOUT_M4>; + clock-names = "xvclk"; + pinctrl-names = "default"; + pinctrl-0 = <&mipim0_camera4_clk>; + power-domains = <&power RK3588_PD_VI>; + pwdn-gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio2 RK_PB0 GPIO_ACTIVE_LOW>; + rockchip,camera-module-index = <1>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "RADXA-CAMERA-4K"; + rockchip,camera-module-lens-name = "DEFAULT"; + port { + imx415_out4: endpoint { + remote-endpoint = <&mipidphy4_in_ucam0>; + data-lanes = <1 2 3 4>; + }; + }; + }; +}; + +&csi2_dphy1_hw { + status = "okay"; +}; + +&csi2_dphy3 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipidphy4_in_ucam0: endpoint@1 { + reg = <1>; + remote-endpoint = <&imx415_out4>; + data-lanes = <1 2 3 4>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + csidphy4_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi4_csi2_input>; + }; + }; + }; +}; + +&mipi4_csi2 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_input: endpoint@1 { + reg = <1>; + remote-endpoint = <&csidphy4_out>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&cif_mipi4_in0>; + }; + }; + }; +}; + +&rkcif { + status = "okay"; +}; + +&rkcif_mipi_lvds4 { + status = "okay"; + + port { + cif_mipi4_in0: endpoint { + remote-endpoint = <&mipi4_csi2_output>; + }; + }; +}; + +&rkcif_mipi_lvds4_sditf { + status = "okay"; + + port { + mipi_lvds4_sditf: endpoint { + remote-endpoint = <&isp1_vir1>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp1_mmu { + status = "okay"; +}; + +&rkisp1 { + status = "okay"; +}; + +&rkisp1_vir1 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp1_vir1: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds4_sditf>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam1-radxa-camera-8m-219.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam1-radxa-camera-8m-219.dts new file mode 100644 index 000000000000..330d1584b66c --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam1-radxa-camera-8m-219.dts @@ -0,0 +1,188 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + metadata { + title ="Enable Radxa Camera 8M 219 on CAM1"; + compatible = "radxa,rock-5b-plus"; + category = "camera"; + exclusive = "csi2_dphy4"; + description = "Enable Radxa Camera 8M 219 on CAM1."; + }; +}; + +&{/} { + camera_pwdn_gpio: camera-pwdn-gpio { + compatible = "regulator-fixed"; + regulator-name = "camera_pwdn_gpio"; + regulator-always-on; + regulator-boot-on; + enable-active-high; + gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&cam_pwdn_gpio>; + }; + + clk_cam_24m_1: external-camera-clock-24m-1 { + compatible = "fixed-clock"; + clock-frequency = <24000000>; + clock-output-names = "clk_cam_24m_1"; + #clock-cells = <0>; + }; +}; + +&i2c4 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c4m1_xfer>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + camera_imx219: camera-imx219@10 { + compatible = "sony,imx219"; + reg = <0x10>; + + clocks = <&clk_cam_24m_1>; + clock-names = "xvclk"; + + rockchip,camera-module-index = <1>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "RADXA-CAMERA-8M"; + rockchip,camera-module-lens-name = "default"; + + port { + imx219_out4: endpoint { + remote-endpoint = <&mipidphy4_in_ucam1>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&csi2_dphy1_hw { + status = "okay"; +}; + +&csi2_dphy4 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipidphy4_in_ucam1: endpoint@2 { + reg = <2>; + remote-endpoint = <&imx219_out4>; + data-lanes = <1 2>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + csidphy4_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi4_csi2_input>; + }; + }; + }; +}; + +&mipi4_csi2 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_input: endpoint@1 { + reg = <1>; + remote-endpoint = <&csidphy4_out>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&cif_mipi4_in0>; + }; + }; + }; +}; + +&rkcif { + status = "okay"; +}; + +&rkcif_mipi_lvds4 { + status = "okay"; + + port { + cif_mipi4_in0: endpoint { + remote-endpoint = <&mipi4_csi2_output>; + }; + }; +}; + +&rkcif_mipi_lvds4_sditf { + status = "okay"; + + port { + mipi_lvds4_sditf: endpoint { + remote-endpoint = <&isp1_vir1>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp1_mmu { + status = "okay"; +}; + +&rkisp1 { + status = "okay"; +}; + +&rkisp1_vir1 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp1_vir1: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds4_sditf>; + }; + }; +}; + +&pinctrl { + camera { + cam_pwdn_gpio: cam-pwdn-gpio { + rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam1-rpi-camera-v1p3.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam1-rpi-camera-v1p3.dts new file mode 100644 index 000000000000..af8c61cd0920 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam1-rpi-camera-v1p3.dts @@ -0,0 +1,178 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + metadata { + title ="Enable Raspberry Pi Camera v1.3 on CAM1"; + compatible = "radxa,rock-5b-plus"; + category = "camera"; + exclusive = "csi2_dphy4"; + description = "Enable Raspberry Pi Camera v1.3 on CAM1."; + }; +}; + +&{/} { + clk_cam_25m_1: external-camera-clock-25m-1 { + status = "okay"; + compatible = "fixed-clock"; + clock-frequency = <25000000>; + clock-output-names = "clk_cam_25m_1"; + #clock-cells = <0>; + }; +}; + +&i2c4 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c4m1_xfer>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + ov5647: ov5647@36 { + status = "okay"; + compatible = "ovti,ov5647"; + reg = <0x36>; + clocks = <&clk_cam_25m_1>; + pwdn-gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; + clock-names = "ext_cam_clk_1"; + 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_out4: endpoint { + remote-endpoint = <&mipidphy4_in_ucam1>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&csi2_dphy1_hw { + status = "okay"; +}; + +&csi2_dphy4 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipidphy4_in_ucam1: endpoint@2 { + reg = <2>; + remote-endpoint = <&ov5647_out4>; + data-lanes = <1 2>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + csidphy4_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi4_csi2_input>; + }; + }; + }; +}; + +&mipi4_csi2 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_input: endpoint@1 { + reg = <1>; + remote-endpoint = <&csidphy4_out>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&cif_mipi4_in0>; + }; + }; + }; +}; + +&rkcif { + status = "okay"; +}; + +&rkcif_mipi_lvds4 { + status = "okay"; + + port { + cif_mipi4_in0: endpoint { + remote-endpoint = <&mipi4_csi2_output>; + }; + }; +}; + +&rkcif_mipi_lvds4_sditf { + status = "okay"; + + port { + mipi_lvds4_sditf: endpoint { + remote-endpoint = <&isp1_vir1>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp1_mmu { + status = "okay"; +}; + +&rkisp1 { + status = "okay"; +}; + +&rkisp1_vir1 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp1_vir1: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds4_sditf>; + }; + }; +}; + +&pinctrl { + camera { + cam_pwdn_gpio: cam-pwdn-gpio { + rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam1-rpi-camera-v2.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam1-rpi-camera-v2.dts new file mode 100644 index 000000000000..15caf10ffe23 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-plus-cam1-rpi-camera-v2.dts @@ -0,0 +1,188 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + metadata { + title ="Enable Raspberry Pi Camera V2 on CAM1"; + compatible = "radxa,rock-5b-plus"; + category = "camera"; + exclusive = "csi2_dphy4"; + description = "Enable Raspberry Pi Camera V2 on CAM1."; + }; +}; + +&{/} { + camera_pwdn_gpio: camera-pwdn-gpio { + compatible = "regulator-fixed"; + regulator-name = "camera_pwdn_gpio"; + regulator-always-on; + regulator-boot-on; + enable-active-high; + gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&cam_pwdn_gpio>; + }; + + clk_cam_24m_1: external-camera-clock-24m-1 { + compatible = "fixed-clock"; + clock-frequency = <24000000>; + clock-output-names = "clk_cam_24m_1"; + #clock-cells = <0>; + }; +}; + +&i2c4 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c4m1_xfer>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + camera_imx219: camera-imx219@10 { + compatible = "sony,imx219"; + reg = <0x10>; + + clocks = <&clk_cam_24m_1>; + clock-names = "xvclk"; + + rockchip,camera-module-index = <1>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "rpi-camera-v2"; + rockchip,camera-module-lens-name = "default"; + + port { + imx219_out4: endpoint { + remote-endpoint = <&mipidphy4_in_ucam1>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&csi2_dphy1_hw { + status = "okay"; +}; + +&csi2_dphy4 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipidphy4_in_ucam1: endpoint@2 { + reg = <2>; + remote-endpoint = <&imx219_out4>; + data-lanes = <1 2>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + csidphy4_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi4_csi2_input>; + }; + }; + }; +}; + +&mipi4_csi2 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_input: endpoint@1 { + reg = <1>; + remote-endpoint = <&csidphy4_out>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&cif_mipi4_in0>; + }; + }; + }; +}; + +&rkcif { + status = "okay"; +}; + +&rkcif_mipi_lvds4 { + status = "okay"; + + port { + cif_mipi4_in0: endpoint { + remote-endpoint = <&mipi4_csi2_output>; + }; + }; +}; + +&rkcif_mipi_lvds4_sditf { + status = "okay"; + + port { + mipi_lvds4_sditf: endpoint { + remote-endpoint = <&isp1_vir1>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp1_mmu { + status = "okay"; +}; + +&rkisp1 { + status = "okay"; +}; + +&rkisp1_vir1 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp1_vir1: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds4_sditf>; + }; + }; +}; + +&pinctrl { + camera { + cam_pwdn_gpio: cam-pwdn-gpio { + rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5b-radxa-camera-13m-214.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-radxa-camera-13m-214.dts new file mode 100644 index 000000000000..169a5fdf45f2 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-radxa-camera-13m-214.dts @@ -0,0 +1,175 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + metadata { + title ="Enable Radxa Camera 13M 214"; + compatible = "radxa,rock-5b"; + category = "camera"; + exclusive = "GPIO1_B0", "GPIO4_A0", "csi2_dphy0", "i2c3"; + description = "Enable Radxa Camera 13M 214."; + }; +}; + +&i2c3 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + dw9714: dw9714@c { + compatible = "dongwoon,dw9714"; + status = "okay"; + reg = <0x0c>; + rockchip,vcm-start-current = <10>; + rockchip,vcm-rated-current = <85>; + rockchip,vcm-step-mode = <3>; + rockchip,camera-module-index = <0>; + rockchip,camera-module-facing = "back"; + }; + + imx214: imx214@10 { + status = "okay"; + compatible = "sony,imx214"; + reg = <0x10>; + clocks = <&cru CLK_MIPI_CAMARAOUT_M3>; + clock-names = "xvclk"; + pinctrl-names = "default"; + pinctrl-0 = <&mipim0_camera3_clk>; + power-domains = <&power RK3588_PD_VI>; + pwdn-gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>; + rockchip,camera-module-index = <0>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "RADXA-CAMERA-13M"; + rockchip,camera-module-lens-name = "DEFAULT"; + lens-focus = <&dw9714>; + port { + imx214_out0: endpoint { + remote-endpoint = <&mipidphy0_in_ucam0>; + data-lanes = <1 2 3 4>; + }; + }; + }; +}; + +&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_ucam0: endpoint@1 { + reg = <1>; + remote-endpoint = <&imx214_out0>; + data-lanes = <1 2 3 4>; + }; + }; + + 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 = <&isp0_vir0>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp0_mmu { + status = "okay"; +}; + +&rkisp0 { + status = "okay"; +}; + +&rkisp0_vir0 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp0_vir0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds2_sditf>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5b-radxa-camera-8m-219.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-radxa-camera-8m-219.dts new file mode 100644 index 000000000000..65d778b0c029 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-radxa-camera-8m-219.dts @@ -0,0 +1,186 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + metadata { + title ="Enable Radxa Camera 8M 219"; + compatible = "radxa,rock-5b"; + category = "camera"; + exclusive = "csi2_dphy0"; + description = "Enable Radxa Camera 8M 219."; + }; +}; + +&{/} { + camera_pwdn_gpio: camera-pwdn-gpio { + compatible = "regulator-fixed"; + regulator-name = "camera_pwdn_gpio"; + regulator-always-on; + regulator-boot-on; + enable-active-high; + gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&cam_pwdn_gpio>; + }; + + clk_cam_24m: external-camera-clock-24m { + compatible = "fixed-clock"; + clock-frequency = <24000000>; + clock-output-names = "clk_cam_24m"; + #clock-cells = <0>; + }; +}; + +&i2c3 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + camera_imx219: camera-imx219@10 { + 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 { + imx219_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 = <&imx219_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 = <&isp0_vir0>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp0_mmu { + status = "okay"; +}; + +&rkisp0 { + status = "okay"; +}; + +&rkisp0_vir0 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp0_vir0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds2_sditf>; + }; + }; +}; + +&pinctrl { + camera { + cam_pwdn_gpio: cam-pwdn-gpio { + rockchip,pins = <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5b-rpi-camera-v1_3.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-rpi-camera-v1_3.dts new file mode 100644 index 000000000000..362e3d2f1764 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5b-rpi-camera-v1_3.dts @@ -0,0 +1,176 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + metadata { + title ="Enable Raspberry Pi Camera v1.3"; + compatible = "radxa,rock-5b"; + category = "camera"; + exclusive = "csi2_dphy0"; + description = "Enable Raspberry Pi Camera v1.3."; + }; +}; + +&{/} { + clk_cam_25m: external-camera-clock-25m { + status = "okay"; + compatible = "fixed-clock"; + clock-frequency = <25000000>; + clock-output-names = "clk_cam_25m"; + #clock-cells = <0>; + }; +}; + +&i2c3 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + ov5647: ov5647@36 { + status = "okay"; + compatible = "ovti,ov5647"; + reg = <0x36>; + clocks = <&clk_cam_25m>; + pwdn-gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>; + clock-names = "ext_cam_clk"; + rockchip,camera-module-index = <0>; + 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 = <&isp0_vir0>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp0_mmu { + status = "okay"; +}; + +&rkisp0 { + status = "okay"; +}; + +&rkisp0_vir0 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp0_vir0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds2_sditf>; + }; + }; +}; + +&pinctrl { + camera { + cam_pwdn_gpio: cam-pwdn-gpio { + rockchip,pins = <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam0-okdo-5mp-camera.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam0-okdo-5mp-camera.dts new file mode 100644 index 000000000000..8e6f86599228 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam0-okdo-5mp-camera.dts @@ -0,0 +1,178 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + metadata { + title ="Enable OKDO 5MP Camera on CAM0"; + compatible = "radxa,rock-5t", "radxa,rock-5t-industrial"; + category = "camera"; + exclusive = "csi2_dphy0"; + description = "Enable OKDO 5MP Camera on CAM0."; + }; +}; + +&{/} { + clk_cam_25m: external-camera-clock-25m { + status = "okay"; + compatible = "fixed-clock"; + clock-frequency = <25000000>; + clock-output-names = "clk_cam_25m"; + #clock-cells = <0>; + }; +}; + +&i2c3 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + ov5647: ov5647@36 { + status = "okay"; + compatible = "ovti,ov5647"; + reg = <0x36>; + clocks = <&clk_cam_25m>; + pwdn-gpios = <&gpio1 RK_PD3 GPIO_ACTIVE_LOW>; + clock-names = "ext_cam_clk"; + rockchip,camera-module-index = <0>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "OKDO-5MP"; + 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 = <&isp0_vir0>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp0_mmu { + status = "okay"; +}; + +&rkisp0 { + status = "okay"; +}; + +&rkisp0_vir0 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp0_vir0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds2_sditf>; + }; + }; +}; + +&pinctrl { + camera { + cam_pwdn_gpio: cam-pwdn-gpio { + rockchip,pins = <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam0-radxa-camera-13m-214.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam0-radxa-camera-13m-214.dts new file mode 100644 index 000000000000..c22309b87a9b --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam0-radxa-camera-13m-214.dts @@ -0,0 +1,175 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + metadata { + title ="Enable Radxa Camera 13M 214 on CAM0"; + compatible = "radxa,rock-5t"; + category = "camera"; + exclusive = "GPIO1_D3", "GPIO2_C5", "csi2_dphy0", "i2c3"; + description = "Enable Radxa Camera 13M 214 on CAM0."; + }; +}; + +&i2c3 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + dw9714: dw9714@c { + compatible = "dongwoon,dw9714"; + status = "okay"; + reg = <0x0c>; + rockchip,vcm-start-current = <10>; + rockchip,vcm-rated-current = <85>; + rockchip,vcm-step-mode = <3>; + rockchip,camera-module-index = <0>; + rockchip,camera-module-facing = "back"; + }; + + imx214: imx214@10 { + status = "okay"; + compatible = "sony,imx214"; + reg = <0x10>; + clocks = <&cru CLK_MIPI_CAMARAOUT_M3>; + clock-names = "xvclk"; + pinctrl-names = "default"; + pinctrl-0 = <&mipim0_camera3_clk>; + power-domains = <&power RK3588_PD_VI>; + pwdn-gpios = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio2 RK_PC5 GPIO_ACTIVE_HIGH>; + rockchip,camera-module-index = <0>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "RADXA-CAMERA-13M"; + rockchip,camera-module-lens-name = "DEFAULT"; + lens-focus = <&dw9714>; + port { + imx214_out0: endpoint { + remote-endpoint = <&mipidphy0_in_ucam0>; + data-lanes = <1 2 3 4>; + }; + }; + }; +}; + +&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_ucam0: endpoint@1 { + reg = <1>; + remote-endpoint = <&imx214_out0>; + data-lanes = <1 2 3 4>; + }; + }; + + 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 = <&isp0_vir0>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp0_mmu { + status = "okay"; +}; + +&rkisp0 { + status = "okay"; +}; + +&rkisp0_vir0 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp0_vir0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds2_sditf>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam0-radxa-camera-4k.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam0-radxa-camera-4k.dts new file mode 100644 index 000000000000..54ce3d9126c6 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam0-radxa-camera-4k.dts @@ -0,0 +1,163 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + metadata { + title ="Enable Radxa Camera 4K on CAM0"; + compatible = "radxa,rock-5t", "radxa,rock-5t-industrial"; + category = "camera"; + exclusive = "csi2_dphy0"; + description = "Enable Radxa Camera 4K on CAM0."; + }; +}; + +&i2c3 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + imx415: imx415@1a { + status = "okay"; + compatible = "sony,imx415"; + reg = <0x1a>; + clocks = <&cru CLK_MIPI_CAMARAOUT_M3>; + clock-names = "xvclk"; + pinctrl-names = "default"; + pinctrl-0 = <&mipim0_camera3_clk>; + power-domains = <&power RK3588_PD_VI>; + pwdn-gpios = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio2 RK_PC5 GPIO_ACTIVE_LOW>; + rockchip,camera-module-index = <0>; + rockchip,camera-module-facing = "front"; + rockchip,camera-module-name = "RADXA-CAMERA-4K"; + rockchip,camera-module-lens-name = "DEFAULT"; + port { + imx415_out0: endpoint { + remote-endpoint = <&mipidphy0_in_ucam0>; + data-lanes = <1 2 3 4>; + }; + }; + }; +}; + +&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_ucam0: endpoint@1 { + reg = <1>; + remote-endpoint = <&imx415_out0>; + data-lanes = <1 2 3 4>; + }; + }; + + 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 = <&isp0_vir0>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp0_mmu { + status = "okay"; +}; + +&rkisp0 { + status = "okay"; +}; + +&rkisp0_vir0 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp0_vir0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds2_sditf>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam0-radxa-camera-8m-219.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam0-radxa-camera-8m-219.dts new file mode 100644 index 000000000000..2aba04940b74 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam0-radxa-camera-8m-219.dts @@ -0,0 +1,187 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + metadata { + title ="Enable Radxa Camera 8M 219 on CAM0"; + compatible = "radxa,rock-5t", "radxa,rock-5t-industrial"; + category = "camera"; + exclusive = "csi2_dphy0"; + description = "Enable Radxa Camera 8M 219 on CAM0."; + }; +}; + +&{/} { + camera_pwdn_gpio: camera-pwdn-gpio { + compatible = "regulator-fixed"; + regulator-name = "camera_pwdn_gpio"; + regulator-always-on; + regulator-boot-on; + enable-active-high; + gpio = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&cam_pwdn_gpio>; + }; + + clk_cam_24m: external-camera-clock-24m { + compatible = "fixed-clock"; + clock-frequency = <24000000>; + clock-output-names = "clk_cam_24m"; + #clock-cells = <0>; + }; +}; + +&i2c3 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + camera_imx219: camera-imx219@10 { + 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 { + imx219_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 = <&imx219_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 = <&isp0_vir0>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp0_mmu { + status = "okay"; +}; + +&rkisp0 { + status = "okay"; +}; + +&rkisp0_vir0 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp0_vir0: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds2_sditf>; + }; + }; +}; + +&pinctrl { + camera { + cam_pwdn_gpio: cam-pwdn-gpio { + rockchip,pins = <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; + diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam0-rpi-camera-v1p3.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam0-rpi-camera-v1p3.dts new file mode 100644 index 000000000000..6cede081b971 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam0-rpi-camera-v1p3.dts @@ -0,0 +1,15 @@ +/dts-v1/; +/plugin/; + +#include "rock-5t-cam0-okdo-5mp-camera.dts" + +/ { + metadata { + title ="Enable Raspberry Pi Camera v1.3 on CAM0"; + description = "Enable Raspberry Pi Camera v1.3 on CAM0."; + }; +}; + +&ov5647{ + rockchip,camera-module-name = "rpi-camera-v1p3"; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam0-rpi-camera-v2.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam0-rpi-camera-v2.dts new file mode 100644 index 000000000000..7b6e5c66b13a --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam0-rpi-camera-v2.dts @@ -0,0 +1,15 @@ +/dts-v1/; +/plugin/; + +#include "rock-5t-cam0-radxa-camera-8m-219.dts" + +/ { + metadata { + title ="Enable Raspberry Pi Camera V2 on CAM0"; + description = "Enable Raspberry Pi Camera V2 on CAM0."; + }; +}; + +&camera_imx219 { + rockchip,camera-module-name = "rpi-camera-v2"; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam1-okdo-5mp-camera.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam1-okdo-5mp-camera.dts new file mode 100644 index 000000000000..6a2d70663b4b --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam1-okdo-5mp-camera.dts @@ -0,0 +1,178 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + metadata { + title ="Enable OKDO 5MP Camera on CAM1"; + compatible = "radxa,rock-5t"; + category = "camera"; + exclusive = "csi2_dphy1"; + description = "Enable OKDO 5MP Camera on CAM1."; + }; +}; + +&{/} { + clk_cam_25m_1: external-camera-clock-25m-1 { + status = "okay"; + compatible = "fixed-clock"; + clock-frequency = <25000000>; + clock-output-names = "clk_cam_25m_1"; + #clock-cells = <0>; + }; +}; + +&i2c4 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c4m1_xfer>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + ov5647: ov5647@36 { + status = "okay"; + compatible = "ovti,ov5647"; + reg = <0x36>; + clocks = <&clk_cam_25m_1>; + pwdn-gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; + clock-names = "ext_cam_clk_1"; + rockchip,camera-module-index = <1>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "OKDO-5MP"; + rockchip,camera-module-lens-name = "default"; + + port { + ov5647_out4: endpoint { + remote-endpoint = <&mipidphy4_in_ucam1>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&csi2_dphy1_hw { + status = "okay"; +}; + +&csi2_dphy4 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipidphy4_in_ucam1: endpoint@2 { + reg = <2>; + remote-endpoint = <&ov5647_out4>; + data-lanes = <1 2>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + csidphy4_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi4_csi2_input>; + }; + }; + }; +}; + +&mipi4_csi2 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_input: endpoint@1 { + reg = <1>; + remote-endpoint = <&csidphy4_out>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&cif_mipi4_in0>; + }; + }; + }; +}; + +&rkcif { + status = "okay"; +}; + +&rkcif_mipi_lvds4 { + status = "okay"; + + port { + cif_mipi4_in0: endpoint { + remote-endpoint = <&mipi4_csi2_output>; + }; + }; +}; + +&rkcif_mipi_lvds4_sditf { + status = "okay"; + + port { + mipi_lvds4_sditf: endpoint { + remote-endpoint = <&isp1_vir1>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp1_mmu { + status = "okay"; +}; + +&rkisp1 { + status = "okay"; +}; + +&rkisp1_vir1 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp1_vir1: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds4_sditf>; + }; + }; +}; + +&pinctrl { + camera { + cam_pwdn_gpio: cam-pwdn-gpio { + rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam1-radxa-camera-13m-214.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam1-radxa-camera-13m-214.dts new file mode 100644 index 000000000000..db12e70c02d2 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam1-radxa-camera-13m-214.dts @@ -0,0 +1,175 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + metadata { + title ="Enable Radxa Camera 13M 214 on CAM1"; + compatible = "radxa,rock-5t"; + category = "camera"; + exclusive = "GPIO2_A6", "GPIO2_B0", "csi2_dphy1", "i2c4"; + description = "Enable Radxa Camera 13M 214 on CAM1."; + }; +}; + +&i2c4 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + dw9714_1: dw9714-1@c { + compatible = "dongwoon,dw9714"; + status = "okay"; + reg = <0x0c>; + rockchip,vcm-start-current = <10>; + rockchip,vcm-rated-current = <85>; + rockchip,vcm-step-mode = <3>; + rockchip,camera-module-index = <0>; + rockchip,camera-module-facing = "back"; + }; + + imx214_1: imx214-1@10 { + status = "okay"; + compatible = "sony,imx214"; + reg = <0x10>; + clocks = <&cru CLK_MIPI_CAMARAOUT_M4>; + clock-names = "xvclk"; + pinctrl-names = "default"; + pinctrl-0 = <&mipim0_camera4_clk>; + power-domains = <&power RK3588_PD_VI>; + pwdn-gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio2 RK_PB0 GPIO_ACTIVE_HIGH>; + rockchip,camera-module-index = <1>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "RADXA-CAMERA-13M"; + rockchip,camera-module-lens-name = "DEFAULT"; + lens-focus = <&dw9714_1>; + port { + imx214_1_out4: endpoint { + remote-endpoint = <&mipidphy4_in_ucam0>; + data-lanes = <1 2 3 4>; + }; + }; + }; +}; + +&csi2_dphy1_hw { + status = "okay"; +}; + +&csi2_dphy3 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipidphy4_in_ucam0: endpoint@1 { + reg = <1>; + remote-endpoint = <&imx214_1_out4>; + data-lanes = <1 2 3 4>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + csidphy4_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi4_csi2_input>; + }; + }; + }; +}; + +&mipi4_csi2 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_input: endpoint@1 { + reg = <1>; + remote-endpoint = <&csidphy4_out>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&cif_mipi4_in0>; + }; + }; + }; +}; + +&rkcif { + status = "okay"; +}; + +&rkcif_mipi_lvds4 { + status = "okay"; + + port { + cif_mipi4_in0: endpoint { + remote-endpoint = <&mipi4_csi2_output>; + }; + }; +}; + +&rkcif_mipi_lvds4_sditf { + status = "okay"; + + port { + mipi_lvds4_sditf: endpoint { + remote-endpoint = <&isp1_vir1>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp1_mmu { + status = "okay"; +}; + +&rkisp1 { + status = "okay"; +}; + +&rkisp1_vir1 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp1_vir1: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds4_sditf>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam1-radxa-camera-4k.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam1-radxa-camera-4k.dts new file mode 100644 index 000000000000..f1e2ee8904f6 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam1-radxa-camera-4k.dts @@ -0,0 +1,165 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + metadata { + title ="Enable Radxa Camera 4K on CAM1"; + compatible = "radxa,rock-5t"; + category = "camera"; + exclusive = "csi2_dphy1"; + description = "Enable Radxa Camera 4K on CAM1."; + }; +}; + +&i2c4 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c4m1_xfer>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + imx415: imx415@1a { + status = "okay"; + compatible = "sony,imx415"; + reg = <0x1a>; + clocks = <&cru CLK_MIPI_CAMARAOUT_M4>; + clock-names = "xvclk"; + pinctrl-names = "default"; + pinctrl-0 = <&mipim0_camera4_clk>; + power-domains = <&power RK3588_PD_VI>; + pwdn-gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio2 RK_PB0 GPIO_ACTIVE_LOW>; + rockchip,camera-module-index = <1>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "RADXA-CAMERA-4K"; + rockchip,camera-module-lens-name = "DEFAULT"; + port { + imx415_out4: endpoint { + remote-endpoint = <&mipidphy4_in_ucam0>; + data-lanes = <1 2 3 4>; + }; + }; + }; +}; + +&csi2_dphy1_hw { + status = "okay"; +}; + +&csi2_dphy3 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipidphy4_in_ucam0: endpoint@1 { + reg = <1>; + remote-endpoint = <&imx415_out4>; + data-lanes = <1 2 3 4>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + csidphy4_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi4_csi2_input>; + }; + }; + }; +}; + +&mipi4_csi2 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_input: endpoint@1 { + reg = <1>; + remote-endpoint = <&csidphy4_out>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&cif_mipi4_in0>; + }; + }; + }; +}; + +&rkcif { + status = "okay"; +}; + +&rkcif_mipi_lvds4 { + status = "okay"; + + port { + cif_mipi4_in0: endpoint { + remote-endpoint = <&mipi4_csi2_output>; + }; + }; +}; + +&rkcif_mipi_lvds4_sditf { + status = "okay"; + + port { + mipi_lvds4_sditf: endpoint { + remote-endpoint = <&isp1_vir1>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp1_mmu { + status = "okay"; +}; + +&rkisp1 { + status = "okay"; +}; + +&rkisp1_vir1 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp1_vir1: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds4_sditf>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam1-radxa-camera-8m-219.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam1-radxa-camera-8m-219.dts new file mode 100644 index 000000000000..42f835e4b04d --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam1-radxa-camera-8m-219.dts @@ -0,0 +1,188 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + metadata { + title ="Enable Radxa Camera 8M 219 on CAM1"; + compatible = "radxa,rock-5t"; + category = "camera"; + exclusive = "csi2_dphy4"; + description = "Enable Radxa Camera 8M 219 on CAM1."; + }; +}; + +&{/} { + camera_pwdn_gpio_1: camera-pwdn-gpio-1 { + compatible = "regulator-fixed"; + regulator-name = "camera_pwdn_gpio_1"; + regulator-always-on; + regulator-boot-on; + enable-active-high; + gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&cam_pwdn_gpio_1>; + }; + + clk_cam_24m_1: external-camera-clock-24m-1 { + compatible = "fixed-clock"; + clock-frequency = <24000000>; + clock-output-names = "clk_cam_24m_1"; + #clock-cells = <0>; + }; +}; + +&i2c4 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c4m1_xfer>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + camera_imx219_1: camera-imx219-1@10 { + compatible = "sony,imx219"; + reg = <0x10>; + + clocks = <&clk_cam_24m_1>; + clock-names = "xvclk"; + + rockchip,camera-module-index = <1>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "RADXA-CAMERA-8M"; + rockchip,camera-module-lens-name = "default"; + + port { + imx219_out4: endpoint { + remote-endpoint = <&mipidphy4_in_ucam1>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&csi2_dphy1_hw { + status = "okay"; +}; + +&csi2_dphy4 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipidphy4_in_ucam1: endpoint@2 { + reg = <2>; + remote-endpoint = <&imx219_out4>; + data-lanes = <1 2>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + csidphy4_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi4_csi2_input>; + }; + }; + }; +}; + +&mipi4_csi2 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_input: endpoint@1 { + reg = <1>; + remote-endpoint = <&csidphy4_out>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&cif_mipi4_in0>; + }; + }; + }; +}; + +&rkcif { + status = "okay"; +}; + +&rkcif_mipi_lvds4 { + status = "okay"; + + port { + cif_mipi4_in0: endpoint { + remote-endpoint = <&mipi4_csi2_output>; + }; + }; +}; + +&rkcif_mipi_lvds4_sditf { + status = "okay"; + + port { + mipi_lvds4_sditf: endpoint { + remote-endpoint = <&isp1_vir1>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp1_mmu { + status = "okay"; +}; + +&rkisp1 { + status = "okay"; +}; + +&rkisp1_vir1 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp1_vir1: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds4_sditf>; + }; + }; +}; + +&pinctrl { + camera { + cam_pwdn_gpio_1: cam-pwdn-gpio-1 { + rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam1-rpi-camera-v1p3.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam1-rpi-camera-v1p3.dts new file mode 100644 index 000000000000..349a994d0b70 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam1-rpi-camera-v1p3.dts @@ -0,0 +1,15 @@ +/dts-v1/; +/plugin/; + +#include "rock-5t-cam1-okdo-5mp-camera.dts" + +/ { + metadata { + title ="Enable Raspberry Pi Camera v1.3 on CAM1"; + description = "Enable Raspberry Pi Camera v1.3 on CAM1."; + }; +}; + +&ov5647 { + rockchip,camera-module-name = "rpi-camera-v1p3"; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam1-rpi-camera-v2.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam1-rpi-camera-v2.dts new file mode 100644 index 000000000000..7c8d2fd38036 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-cam1-rpi-camera-v2.dts @@ -0,0 +1,15 @@ +/dts-v1/; +/plugin/; + +#include "rock-5t-cam1-radxa-camera-8m-219.dts" + +/ { + metadata { + title ="Enable Raspberry Pi Camera v2 on CAM1"; + description = "Enable Raspberry Pi Camera v2 on CAM1."; + }; +}; + +&camera_imx219_1 { + rockchip,camera-module-name = "rpi-camera-v2"; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-cam1-okdo-5mp-camera.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-cam1-okdo-5mp-camera.dts new file mode 100644 index 000000000000..d80786ca0db8 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-cam1-okdo-5mp-camera.dts @@ -0,0 +1,175 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + metadata { + title ="Enable OKDO 5MP Camera on CAM1"; + compatible = "radxa,rock-5t-industrial"; + category = "camera"; + exclusive = "csi2_dphy1"; + description = "Enable OKDO 5MP Camera on CAM1."; + }; +}; + +&{/} { + clk_cam_25m_1: external-camera-clock-25m-1 { + status = "okay"; + compatible = "fixed-clock"; + clock-frequency = <25000000>; + clock-output-names = "clk_cam_25m_1"; + #clock-cells = <0>; + }; +}; +&i2c6 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + ov5647: ov5647@36 { + status = "okay"; + compatible = "ovti,ov5647"; + reg = <0x36>; + clocks = <&clk_cam_25m_1>; + pwdn-gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>; + clock-names = "ext_cam_clk_1"; + rockchip,camera-module-index = <1>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "OKDO-5MP"; + rockchip,camera-module-lens-name = "default"; + + port { + ov5647_out4: endpoint { + remote-endpoint = <&mipidphy4_in_ucam1>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&csi2_dphy1_hw { + status = "okay"; +}; + +&csi2_dphy4 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipidphy4_in_ucam1: endpoint@2 { + reg = <2>; + remote-endpoint = <&ov5647_out4>; + data-lanes = <1 2>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + csidphy4_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi4_csi2_input>; + }; + }; + }; +}; + +&mipi4_csi2 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_input: endpoint@1 { + reg = <1>; + remote-endpoint = <&csidphy4_out>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&cif_mipi4_in0>; + }; + }; + }; +}; + +&rkcif { + status = "okay"; +}; + +&rkcif_mipi_lvds4 { + status = "okay"; + + port { + cif_mipi4_in0: endpoint { + remote-endpoint = <&mipi4_csi2_output>; + }; + }; +}; + +&rkcif_mipi_lvds4_sditf { + status = "okay"; + + port { + mipi_lvds4_sditf: endpoint { + remote-endpoint = <&isp1_vir1>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp1_mmu { + status = "okay"; +}; + +&rkisp1 { + status = "okay"; +}; + +&rkisp1_vir1 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp1_vir1: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds4_sditf>; + }; + }; +}; + +&pinctrl { + camera { + cam_pwdn_gpio: cam-pwdn-gpio { + rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-cam1-radxa-camera-4k.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-cam1-radxa-camera-4k.dts new file mode 100644 index 000000000000..ad14306b7e2d --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-cam1-radxa-camera-4k.dts @@ -0,0 +1,163 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + metadata { + title ="Enable Radxa Camera 4K on CAM1"; + compatible = "radxa,rock-5t-industrial"; + category = "camera"; + exclusive = "csi2_dphy1"; + description = "Enable Radxa Camera 4K on CAM1."; + }; +}; + +&i2c6 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + imx415: imx415@1a { + status = "okay"; + compatible = "sony,imx415"; + reg = <0x1a>; + clocks = <&cru CLK_MIPI_CAMARAOUT_M4>; + clock-names = "xvclk"; + pinctrl-names = "default"; + pinctrl-0 = <&mipim0_camera4_clk>; + power-domains = <&power RK3588_PD_VI>; + pwdn-gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio2 RK_PB0 GPIO_ACTIVE_LOW>; + rockchip,camera-module-index = <1>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "RADXA-CAMERA-4K"; + rockchip,camera-module-lens-name = "DEFAULT"; + port { + imx415_out4: endpoint { + remote-endpoint = <&mipidphy4_in_ucam0>; + data-lanes = <1 2 3 4>; + }; + }; + }; +}; + +&csi2_dphy1_hw { + status = "okay"; +}; + +&csi2_dphy3 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipidphy4_in_ucam0: endpoint@1 { + reg = <1>; + remote-endpoint = <&imx415_out4>; + data-lanes = <1 2 3 4>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + csidphy4_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi4_csi2_input>; + }; + }; + }; +}; + +&mipi4_csi2 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_input: endpoint@1 { + reg = <1>; + remote-endpoint = <&csidphy4_out>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&cif_mipi4_in0>; + }; + }; + }; +}; + +&rkcif { + status = "okay"; +}; + +&rkcif_mipi_lvds4 { + status = "okay"; + + port { + cif_mipi4_in0: endpoint { + remote-endpoint = <&mipi4_csi2_output>; + }; + }; +}; + +&rkcif_mipi_lvds4_sditf { + status = "okay"; + + port { + mipi_lvds4_sditf: endpoint { + remote-endpoint = <&isp1_vir1>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp1_mmu { + status = "okay"; +}; + +&rkisp1 { + status = "okay"; +}; + +&rkisp1_vir1 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp1_vir1: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds4_sditf>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-cam1-radxa-camera-8m-219.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-cam1-radxa-camera-8m-219.dts new file mode 100644 index 000000000000..ebd669f91bc6 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-cam1-radxa-camera-8m-219.dts @@ -0,0 +1,186 @@ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + metadata { + title ="Enable Radxa Camera 8M 219 on CAM1"; + compatible = "radxa,rock-5t-industrial"; + category = "camera"; + exclusive = "csi2_dphy4"; + description = "Enable Radxa Camera 8M 219 on CAM1."; + }; +}; + +&{/} { + camera_pwdn_gpio_1: camera-pwdn-gpio-1 { + compatible = "regulator-fixed"; + regulator-name = "camera_pwdn_gpio_1"; + regulator-always-on; + regulator-boot-on; + enable-active-high; + gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&cam_pwdn_gpio_1>; + }; + + clk_cam_24m_1: external-camera-clock-24m-1 { + compatible = "fixed-clock"; + clock-frequency = <24000000>; + clock-output-names = "clk_cam_24m_1"; + #clock-cells = <0>; + }; +}; + +&i2c6 { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + camera_imx219_1: camera-imx219-1@10 { + compatible = "sony,imx219"; + reg = <0x10>; + + clocks = <&clk_cam_24m_1>; + clock-names = "xvclk"; + + rockchip,camera-module-index = <1>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "RADXA-CAMERA-8M"; + rockchip,camera-module-lens-name = "default"; + + port { + imx219_out4: endpoint { + remote-endpoint = <&mipidphy4_in_ucam1>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&csi2_dphy1_hw { + status = "okay"; +}; + +&csi2_dphy4 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipidphy4_in_ucam1: endpoint@2 { + reg = <2>; + remote-endpoint = <&imx219_out4>; + data-lanes = <1 2>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + csidphy4_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi4_csi2_input>; + }; + }; + }; +}; + +&mipi4_csi2 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_input: endpoint@1 { + reg = <1>; + remote-endpoint = <&csidphy4_out>; + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + mipi4_csi2_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&cif_mipi4_in0>; + }; + }; + }; +}; + +&rkcif { + status = "okay"; +}; + +&rkcif_mipi_lvds4 { + status = "okay"; + + port { + cif_mipi4_in0: endpoint { + remote-endpoint = <&mipi4_csi2_output>; + }; + }; +}; + +&rkcif_mipi_lvds4_sditf { + status = "okay"; + + port { + mipi_lvds4_sditf: endpoint { + remote-endpoint = <&isp1_vir1>; + }; + }; +}; + +&rkcif_mmu { + status = "okay"; +}; + +&isp1_mmu { + status = "okay"; +}; + +&rkisp1 { + status = "okay"; +}; + +&rkisp1_vir1 { + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + isp1_vir1: endpoint@0 { + reg = <0>; + remote-endpoint = <&mipi_lvds4_sditf>; + }; + }; +}; + +&pinctrl { + camera { + cam_pwdn_gpio_1: cam-pwdn-gpio-1 { + rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-cam1-rpi-camera-v1p3.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-cam1-rpi-camera-v1p3.dts new file mode 100644 index 000000000000..cb44256985b7 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-cam1-rpi-camera-v1p3.dts @@ -0,0 +1,15 @@ +/dts-v1/; +/plugin/; + +#include "rock-5t-industrial-cam1-okdo-5mp-camera.dts" + +/ { + metadata { + title ="Enable Raspberry Pi Camera v1.3 on CAM1"; + description = "Enable Raspberry Pi Camera v1.3 on CAM1."; + }; +}; + +&ov5647 { + rockchip,camera-module-name = "rpi-camera-v1p3"; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-cam1-rpi-camera-v2.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-cam1-rpi-camera-v2.dts new file mode 100644 index 000000000000..15fd38bb01f6 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-cam1-rpi-camera-v2.dts @@ -0,0 +1,15 @@ +/dts-v1/; +/plugin/; + +#include "rock-5t-industrial-cam1-radxa-camera-8m-219.dts" + +/ { + metadata { + title ="Enable Raspberry Pi Camera v2 on CAM1"; + description = "Enable Raspberry Pi Camera v2 on CAM1."; + }; +}; + +&camera_imx219_1 { + rockchip,camera-module-name = "rpi-camera-v2"; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-radxa-display-10fhd.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-radxa-display-10fhd.dts new file mode 100644 index 000000000000..3c5857a52707 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-radxa-display-10fhd.dts @@ -0,0 +1,200 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include +#include + +/ { + metadata { + title ="Enable Radxa Display 10FHD"; + compatible = "radxa,rock-5t-industrial"; + category = "display"; + exclusive = "dsi1", "GPIO1_A2"; + description = "Enable Radxa Display 10FHD."; + }; +}; + +&{/} { + vcc_lcd_mipi1: vcc-lcd-mipi1 { + status = "okay"; + compatible = "regulator-fixed"; + regulator-name = "vcc_lcd_mipi1"; + gpio = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-always-on; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + dsi1_backlight: dsi1-backlight { + status = "okay"; + compatible = "pwm-backlight"; + pwms = <&pwm4 0 25000 PWM_POLARITY_INVERTED>; + brightness-levels = <0 255>; + num-interpolated-steps = <255>; + default-brightness-level = <200>; + enable-gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&dsi1_backlight_en>; + }; +}; + +&pwm4 { + status = "okay"; + pinctrl-names = "active"; + pinctrl-0 = <&pwm4m1_pins>; +}; + +&dsi1{ + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + dsi1_panel: panel@0 { + status = "okay"; + compatible = "simple-panel-dsi"; + reg = <0>; + backlight = <&dsi1_backlight>; + + vdd-supply = <&vcc_lcd_mipi1>; + vccio-supply = <&vcc_1v8_s0>; + reset-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&dsi1_lcd_rst_gpio>; + + prepare-delay-ms = <120>; + reset-delay-ms = <120>; + init-delay-ms = <120>; + enable-delay-ms = <100>; + disable-delay-ms = <120>; + unprepare-delay-ms = <120>; + + width-mm = <62>; + height-mm = <110>; + + dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | + MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET)>; + dsi,format = ; + dsi,lanes = <4>; + + panel-init-sequence = [ + 05 78 01 11 + 05 00 01 29 + ]; + + panel-exit-sequence = [ + 05 00 01 28 + 05 00 01 10 + ]; + + display-timings { + native-mode = <&timing0>; + timing0: timing0 { + clock-frequency = <160000000>; + hactive = <1200>; + vactive = <1920>; + + vback-porch = <25>; + vfront-porch = <35>; + + hback-porch = <60>; + hfront-porch = <80>; + + hsync-len = <4>; + vsync-len = <4>; + + vsync-active = <0>; + hsync-active = <0>; + de-active = <0>; + pixelclk-active = <0>; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + panel_in_dsi1: endpoint { + remote-endpoint = <&dsi1_out_panel>; + }; + }; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + dsi1_out_panel: endpoint { + remote-endpoint = <&panel_in_dsi1>; + }; + }; + }; +}; + +&mipi_dcphy1 { + status = "okay"; +}; + +&route_dsi1 { + status = "okay"; + connect = <&vp3_out_dsi1>; +}; + +&dsi1_in_vp2 { + status = "disabled"; +}; + +&dsi1_in_vp3 { + status = "okay"; +}; + +&i2c6 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c6m0_xfer>; + clock-frequency = <400000>; + #address-cells = <1>; + #size-cells = <0>; + + gt9xx: gt9xx@14 { + compatible = "goodix,gt9xx"; + reg = <0x14>; + pinctrl-names = "default"; + pinctrl-0 = <>9xx_gpio>; + touch-gpio = <&gpio0 RK_PD3 IRQ_TYPE_LEVEL_HIGH>; + reset-gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; + max-x = <1200>; + max-y = <1920>; + tp-size = <9271>; + tp-supply = <&vcc_lcd_mipi1>; + }; +}; + +&pinctrl { + dsi1-lcd { + dsi1_lcd_rst_gpio: dsi1-lcd-rst-gpio { + rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>; + }; + + dsi1_backlight_en: dsi1-backlight-en { + rockchip,pins = <2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + gt9xx { + gt9xx_gpio: gt9xx-gpio { + rockchip,pins = + <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>, + <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-radxa-display-8hd.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-radxa-display-8hd.dts new file mode 100644 index 000000000000..460c1355c1e2 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-industrial-radxa-display-8hd.dts @@ -0,0 +1,152 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + metadata { + title ="Enable Radxa Display 8HD"; + compatible = "radxa,rock-5t-industrial"; + category = "display"; + exclusive = "dsi1", "GPIO1_A2"; + description = "Enable Radxa Display 8HD."; + }; +}; + +&{/} { + vcc_lcd_mipi1: vcc-lcd-mipi1 { + status = "okay"; + compatible = "regulator-fixed"; + regulator-name = "vcc_lcd_mipi1"; + gpio = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-boot-on; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + dsi1_backlight: dsi1-backlight { + status = "okay"; + compatible = "pwm-backlight"; + pwms = <&pwm4 0 25000 PWM_POLARITY_INVERTED>; + brightness-levels = <0 255>; + num-interpolated-steps = <255>; + default-brightness-level = <200>; + enable-gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&dsi1_backlight_en>; + }; +}; + +&pwm4 { + status = "okay"; + pinctrl-names = "active"; + pinctrl-0 = <&pwm4m1_pins>; +}; + +&dsi1 { + status = "okay"; + rockchip,lane-rate = <480>; + #address-cells = <1>; + #size-cells = <0>; + + dsi1_panel: panel@0 { + status = "okay"; + compatible = "radxa,display-8hd"; + reg = <0>; + backlight = <&dsi1_backlight>; + + vdd-supply = <&vcc_lcd_mipi1>; + vccio-supply = <&vcc_1v8_s0>; + reset-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&dsi1_lcd_rst_gpio>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + panel_in_dsi1: endpoint { + remote-endpoint = <&dsi1_out_panel>; + }; + }; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + dsi1_out_panel: endpoint { + remote-endpoint = <&panel_in_dsi1>; + }; + }; + }; +}; + +&mipi_dcphy1 { + status = "okay"; +}; + +&route_dsi1 { + status = "okay"; + connect = <&vp3_out_dsi1>; +}; + +&dsi1_in_vp2 { + status = "disabled"; +}; + +&dsi1_in_vp3 { + status = "okay"; +}; + +&i2c6 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c6m0_xfer>; + clock-frequency = <400000>; + #address-cells = <1>; + #size-cells = <0>; + + gt9xx: gt9xx@14 { + compatible = "goodix,gt9xx"; + reg = <0x14>; + pinctrl-names = "default"; + pinctrl-0 = <>9xx_gpio>; + touch-gpio = <&gpio0 RK_PD3 IRQ_TYPE_LEVEL_HIGH>; + reset-gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; + max-x = <800>; + max-y = <1280>; + tp-size = <9112>; + tp-supply = <&vcc_lcd_mipi1>; + }; +}; + +&pinctrl { + dsi1-lcd { + dsi1_lcd_rst_gpio: dsi1-lcd-rst-gpio { + rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>; + }; + + dsi1_backlight_en: dsi1-backlight-en { + rockchip,pins = <2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + gt9xx { + gt9xx_gpio: gt9xx-gpio { + rockchip,pins = + <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>, + <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/rockchip/overlay/rock-5t-radxa-display-8hd.dts b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-radxa-display-8hd.dts new file mode 100644 index 000000000000..7bb5b81913d4 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlay/rock-5t-radxa-display-8hd.dts @@ -0,0 +1,184 @@ +/dts-v1/; +/plugin/; + +#include +#include +#include +#include + +/ { + metadata { + title ="Enable Radxa Display 8HD"; + compatible = "radxa,rock-5t"; + category = "display"; + exclusive = "dsi1", "GPIO1_A2"; + description = "Enable Radxa Display 8HD."; + }; +}; + +&{/} { + vcc_lcd_mipi1: vcc-lcd-mipi1 { + status = "okay"; + compatible = "regulator-fixed"; + regulator-name = "vcc_lcd_mipi1"; + gpio = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-boot-on; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + dsi1_backlight: dsi1-backlight { + status = "okay"; + compatible = "pwm-backlight"; + pwms = <&pwm2 0 25000 PWM_POLARITY_INVERTED>; + brightness-levels = < + 0 20 20 21 21 22 22 23 + 23 24 24 25 25 26 26 27 + 27 28 28 29 29 30 30 31 + 31 32 32 33 33 34 34 35 + 35 36 36 37 37 38 38 39 + 40 41 42 43 44 45 46 47 + 48 49 50 51 52 53 54 55 + 56 57 58 59 60 61 62 63 + 64 65 66 67 68 69 70 71 + 72 73 74 75 76 77 78 79 + 80 81 82 83 84 85 86 87 + 88 89 90 91 92 93 94 95 + 96 97 98 99 100 101 102 103 + 104 105 106 107 108 109 110 111 + 112 113 114 115 116 117 118 119 + 120 121 122 123 124 125 126 127 + 128 129 130 131 132 133 134 135 + 136 137 138 139 140 141 142 143 + 144 145 146 147 148 149 150 151 + 152 153 154 155 156 157 158 159 + 160 161 162 163 164 165 166 167 + 168 169 170 171 172 173 174 175 + 176 177 178 179 180 181 182 183 + 184 185 186 187 188 189 190 191 + 192 193 194 195 196 197 198 199 + 200 201 202 203 204 205 206 207 + 208 209 210 211 212 213 214 215 + 216 217 218 219 220 221 222 223 + 224 225 226 227 228 229 230 231 + 232 233 234 235 236 237 238 239 + 240 241 242 243 244 245 246 247 + 248 249 250 251 252 253 254 255 + >; + default-brightness-level = <200>; + enable-gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&dsi1_backlight_en>; + }; +}; + +&pwm2 { + status = "okay"; + pinctrl-names = "active"; + pinctrl-0 = <&pwm2m2_pins>; +}; + +&dsi1 { + status = "okay"; + rockchip,lane-rate = <480>; + #address-cells = <1>; + #size-cells = <0>; + + dsi1_panel: panel@0 { + status = "okay"; + compatible = "radxa,display-8hd"; + reg = <0>; + backlight = <&dsi1_backlight>; + + vdd-supply = <&vcc_lcd_mipi1>; + vccio-supply = <&vcc_1v8_s0>; + reset-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&dsi1_lcd_rst_gpio>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + panel_in_dsi1: endpoint { + remote-endpoint = <&dsi1_out_panel>; + }; + }; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + dsi1_out_panel: endpoint { + remote-endpoint = <&panel_in_dsi1>; + }; + }; + }; +}; + +&mipi_dcphy1 { + status = "okay"; +}; + +&route_dsi1 { + status = "okay"; + connect = <&vp3_out_dsi1>; +}; + +&dsi1_in_vp2 { + status = "disabled"; +}; + +&dsi1_in_vp3 { + status = "okay"; +}; + +&i2c6 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c6m0_xfer>; + clock-frequency = <400000>; + #address-cells = <1>; + #size-cells = <0>; + + gt9xx: gt9xx@14 { + compatible = "goodix,gt9xx"; + reg = <0x14>; + pinctrl-names = "default"; + pinctrl-0 = <>9xx_gpio>; + touch-gpio = <&gpio0 RK_PD3 IRQ_TYPE_LEVEL_HIGH>; + reset-gpio = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; + max-x = <800>; + max-y = <1280>; + tp-size = <9112>; + tp-supply = <&vcc_lcd_mipi1>; + }; +}; + +&pinctrl { + dsi1-lcd { + dsi1_lcd_rst_gpio: dsi1-lcd-rst-gpio { + rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>; + }; + + dsi1_backlight_en: dsi1-backlight-en { + rockchip,pins = <2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + gt9xx { + gt9xx_gpio: gt9xx-gpio { + rockchip,pins = + <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>, + <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +};