Skip to content

Commit

Permalink
arm64: dts: rock 5b: move camera configuration to overlay
Browse files Browse the repository at this point in the history
Signed-off-by: Alvin Xie <[email protected]>
  • Loading branch information
Radxa-Alvin authored and RadxaStephen committed Jul 3, 2023
1 parent 139efc3 commit 1cc4482
Show file tree
Hide file tree
Showing 5 changed files with 338 additions and 118 deletions.
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/rockchip/overlay/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
rock-4c-plus-radxa-display-8hd.dtbo \
rock-4c-plus-radxa-display-10hd.dtbo \
rock-4c-plus-radxa-display-10fhd.dtbo \
rock-5ab-camera-imx415.dtbo \
rock-5a-hdmi-8k.dtbo \
rock-5a-i2c5-rtc-hym8563.dtbo \
rock-5a-radxa-camera-4k.dtbo \
Expand All @@ -64,6 +63,7 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
rock-5b-radxa-display-8hd.dtbo \
rock-5b-radxa-display-10hd.dtbo \
rock-5b-rpi-camera-v2.dtbo \
rock-5b-radxa-camera-4k.dtbo \
rock-5b-sata.dtbo \

dtbotxt-$(CONFIG_ARCH_ROCKCHIP) += \
Expand Down
101 changes: 0 additions & 101 deletions arch/arm64/boot/dts/rockchip/overlay/rock-5ab-camera-imx415.dts

This file was deleted.

208 changes: 208 additions & 0 deletions arch/arm64/boot/dts/rockchip/overlay/rock-5b-radxa-camera-4k.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
/dts-v1/;
/plugin/;

#include <dt-bindings/clock/rk3588-cru.h>
#include <dt-bindings/power/rk3588-power.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>

/ {
metadata {
title ="Enable Radxa Camera 4K";
compatible = "radxa,rock-5b";
category = "camera";
exclusive = "csi2_dphy0";
description = "Enable Radxa Camera 4K.";
};

fragment@0 {
target = <&i2c3>;

__overlay__ {
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_PB0 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_LOW>;
rockchip,camera-module-index = <0>;
rockchip,camera-module-facing = "back";
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>;
};
};
};
};
};

fragment@1 {
target = <&csi2_dphy0_hw>;

__overlay__ {
status = "okay";
};
};

fragment@2 {
target = <&csi2_dphy0>;

__overlay__ {
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>;
};
};
};
};
};

fragment@3 {
target = <&mipi2_csi2>;

__overlay__ {
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>;
};
};
};
};
};

fragment@4 {
target = <&rkcif>;

__overlay__ {
status = "okay";
};
};

fragment@5 {
target = <&rkcif_mipi_lvds2>;

__overlay__ {
status = "okay";

port {
cif_mipi2_in0: endpoint {
remote-endpoint = <&mipi2_csi2_output>;
};
};
};
};

fragment@6 {
target = <&rkcif_mipi_lvds2_sditf>;

__overlay__ {
status = "okay";

port {
mipi_lvds2_sditf: endpoint {
remote-endpoint = <&isp0_vir0>;
};
};
};
};

fragment@7 {
target = <&rkcif_mmu>;

__overlay__ {
status = "okay";
};
};

fragment@8 {
target = <&isp0_mmu>;

__overlay__ {
status = "okay";
};
};

fragment@9 {
target = <&rkisp0>;

__overlay__ {
status = "okay";
};
};

fragment@10 {
target = <&rkisp0_vir0>;

__overlay__ {
status = "okay";

port {
#address-cells = <1>;
#size-cells = <0>;

isp0_vir0: endpoint@0 {
reg = <0>;
remote-endpoint = <&mipi_lvds2_sditf>;
};
};
};
};
};

Loading

0 comments on commit 1cc4482

Please sign in to comment.