Skip to content

Commit

Permalink
dtoverlays: Add Arducam64MP support to camera mux overlays
Browse files Browse the repository at this point in the history
Signed-off-by: Lee Jackson <[email protected]>
  • Loading branch information
Lee Jackson authored and pelwell committed Mar 2, 2023
1 parent 744b8fc commit 0c9bfdb
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 2 deletions.
10 changes: 8 additions & 2 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,8 @@ Info: Configures a 2 port camera multiplexer
Note that currently ALL IMX290 modules share a common clock, therefore
all modules will need to have the same clock frequency.
Load: dtoverlay=camera-mux-2port,<param>=<val>
Params: cam0-imx219 Select IMX219 for camera on port 0
Params: cam0-arducam-64mp Select Arducam64MP for camera on port 0
cam0-imx219 Select IMX219 for camera on port 0
cam0-imx258 Select IMX258 for camera on port 0
cam0-imx290 Select IMX290 for camera on port 0
cam0-imx477 Select IMX477 for camera on port 0
Expand All @@ -725,6 +726,7 @@ Params: cam0-imx219 Select IMX219 for camera on port 0
cam0-ov7251 Select OV7251 for camera on port 0
cam0-ov9281 Select OV9281 for camera on port 0
cam0-imx290-clk-freq Set clock frequency for an IMX290 on port 0
cam1-arducam-64mp Select Arducam64MP for camera on port 1
cam1-imx219 Select IMX219 for camera on port 1
cam1-imx258 Select IMX258 for camera on port 1
cam1-imx290 Select IMX290 for camera on port 1
Expand All @@ -743,7 +745,8 @@ Info: Configures a 4 port camera multiplexer
Note that currently ALL IMX290 modules share a common clock, therefore
all modules will need to have the same clock frequency.
Load: dtoverlay=camera-mux-4port,<param>=<val>
Params: cam0-imx219 Select IMX219 for camera on port 0
Params: cam0-arducam-64mp Select Arducam64MP for camera on port 0
cam0-imx219 Select IMX219 for camera on port 0
cam0-imx258 Select IMX258 for camera on port 0
cam0-imx290 Select IMX290 for camera on port 0
cam0-imx477 Select IMX477 for camera on port 0
Expand All @@ -754,6 +757,7 @@ Params: cam0-imx219 Select IMX219 for camera on port 0
cam0-ov7251 Select OV7251 for camera on port 0
cam0-ov9281 Select OV9281 for camera on port 0
cam0-imx290-clk-freq Set clock frequency for an IMX290 on port 0
cam1-arducam-64mp Select Arducam64MP for camera on port 1
cam1-imx219 Select IMX219 for camera on port 1
cam1-imx258 Select IMX258 for camera on port 1
cam1-imx290 Select IMX290 for camera on port 1
Expand All @@ -765,6 +769,7 @@ Params: cam0-imx219 Select IMX219 for camera on port 0
cam1-ov7251 Select OV7251 for camera on port 1
cam1-ov9281 Select OV9281 for camera on port 1
cam1-imx290-clk-freq Set clock frequency for an IMX290 on port 1
cam2-arducam-64mp Select Arducam64MP for camera on port 2
cam2-imx219 Select IMX219 for camera on port 2
cam2-imx258 Select IMX258 for camera on port 2
cam2-imx290 Select IMX290 for camera on port 2
Expand All @@ -776,6 +781,7 @@ Params: cam0-imx219 Select IMX219 for camera on port 0
cam2-ov7251 Select OV7251 for camera on port 2
cam2-ov9281 Select OV9281 for camera on port 2
cam2-imx290-clk-freq Set clock frequency for an IMX290 on port 2
cam3-arducam-64mp Select Arducam64MP for camera on port 3
cam3-imx219 Select IMX219 for camera on port 3
cam3-imx258 Select IMX258 for camera on port 3
cam3-imx290 Select IMX290 for camera on port 3
Expand Down
32 changes: 32 additions & 0 deletions arch/arm/boot/dts/overlays/camera-mux-2port-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@
#address-cells = <1>;
#size-cells = <0>;

#define cam_node arducam_64mp_0
#define cam_endpoint arducam_64mp_0_ep
#define vcm_node arducam_64mp_0_vcm
#define cam1_clk clk_24mhz
#include "arducam-64mp.dtsi"
#undef cam_node
#undef cam_endpoint
#undef vcm_node
#undef cam1_clk

#define cam_node imx219_0
#define cam_endpoint imx219_0_ep
#define cam1_clk clk_24mhz
Expand Down Expand Up @@ -186,6 +196,16 @@
#address-cells = <1>;
#size-cells = <0>;

#define cam_node arducam_64mp_1
#define cam_endpoint arducam_64mp_1_ep
#define vcm_node arducam_64mp_1_vcm
#define cam1_clk clk_24mhz
#include "arducam-64mp.dtsi"
#undef cam_node
#undef cam_endpoint
#undef vcm_node
#undef cam1_clk

#define cam_node imx219_1
#define cam_endpoint imx219_1_ep
#define cam1_clk clk_24mhz
Expand Down Expand Up @@ -385,6 +405,12 @@
};

__overrides__ {
cam0-arducam-64mp = <&mux_in0>, "remote-endpoint:0=",<&arducam_64mp_0_ep>,
<&arducam_64mp_0_ep>, "remote-endpoint:0=",<&mux_in0>,
<&mux_in0>, "clock-noncontinuous?",
<&arducam_64mp_0>, "status=okay",
<&arducam_64mp_0_vcm>, "status=okay",
<&arducam_64mp_0>,"lens-focus:0=", <&arducam_64mp_0_vcm>;
cam0-imx219 = <&mux_in0>, "remote-endpoint:0=",<&imx219_0_ep>,
<&imx219_0_ep>, "remote-endpoint:0=",<&mux_in0>,
<&mux_in0>, "clock-noncontinuous?",
Expand Down Expand Up @@ -425,6 +451,12 @@
<&ov2311_0_ep>, "remote-endpoint:0=",<&mux_in0>,
<&ov2311_0>, "status=okay";

cam1-arducam-64mp = <&mux_in1>, "remote-endpoint:0=",<&arducam_64mp_1_ep>,
<&arducam_64mp_1_ep>, "remote-endpoint:0=",<&mux_in1>,
<&mux_in1>, "clock-noncontinuous?",
<&arducam_64mp_1>, "status=okay",
<&arducam_64mp_1_vcm>, "status=okay",
<&arducam_64mp_1>,"lens-focus:0=", <&arducam_64mp_1_vcm>;
cam1-imx219 = <&mux_in1>, "remote-endpoint:0=",<&imx219_1_ep>,
<&imx219_1_ep>, "remote-endpoint:0=",<&mux_in1>,
<&mux_in1>, "clock-noncontinuous?",
Expand Down
64 changes: 64 additions & 0 deletions arch/arm/boot/dts/overlays/camera-mux-4port-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,16 @@
#address-cells = <1>;
#size-cells = <0>;

#define cam_node arducam_64mp_0
#define cam_endpoint arducam_64mp_0_ep
#define vcm_node arducam_64mp_0_vcm
#define cam1_clk clk_24mhz
#include "arducam-64mp.dtsi"
#undef cam_node
#undef cam_endpoint
#undef vcm_node
#undef cam1_clk

#define cam_node imx219_0
#define cam_endpoint imx219_0_ep
#define cam1_clk clk_24mhz
Expand Down Expand Up @@ -244,6 +254,16 @@
#address-cells = <1>;
#size-cells = <0>;

#define cam_node arducam_64mp_1
#define cam_endpoint arducam_64mp_1_ep
#define vcm_node arducam_64mp_1_vcm
#define cam1_clk clk_24mhz
#include "arducam-64mp.dtsi"
#undef cam_node
#undef cam_endpoint
#undef vcm_node
#undef cam1_clk

#define cam_node imx219_1
#define cam_endpoint imx219_1_ep
#define cam1_clk clk_24mhz
Expand Down Expand Up @@ -334,6 +354,16 @@
#address-cells = <1>;
#size-cells = <0>;

#define cam_node arducam_64mp_2
#define cam_endpoint arducam_64mp_2_ep
#define vcm_node arducam_64mp_2_vcm
#define cam1_clk clk_24mhz
#include "arducam-64mp.dtsi"
#undef cam_node
#undef cam_endpoint
#undef vcm_node
#undef cam1_clk

#define cam_node imx219_2
#define cam_endpoint imx219_2_ep
#define cam1_clk clk_24mhz
Expand Down Expand Up @@ -424,6 +454,16 @@
#address-cells = <1>;
#size-cells = <0>;

#define cam_node arducam_64mp_3
#define cam_endpoint arducam_64mp_3_ep
#define vcm_node arducam_64mp_3_vcm
#define cam1_clk clk_24mhz
#include "arducam-64mp.dtsi"
#undef cam_node
#undef cam_endpoint
#undef vcm_node
#undef cam1_clk

#define cam_node imx219_3
#define cam_endpoint imx219_3_ep
#define cam1_clk clk_24mhz
Expand Down Expand Up @@ -640,6 +680,12 @@
};

__overrides__ {
cam0-arducam-64mp = <&mux_in0>, "remote-endpoint:0=",<&arducam_64mp_0_ep>,
<&arducam_64mp_0_ep>, "remote-endpoint:0=",<&mux_in0>,
<&mux_in0>, "clock-noncontinuous?",
<&arducam_64mp_0>, "status=okay",
<&arducam_64mp_0_vcm>, "status=okay",
<&arducam_64mp_0>,"lens-focus:0=", <&arducam_64mp_0_vcm>;
cam0-imx219 = <&mux_in0>, "remote-endpoint:0=",<&imx219_0_ep>,
<&imx219_0_ep>, "remote-endpoint:0=",<&mux_in0>,
<&mux_in0>, "clock-noncontinuous?",
Expand Down Expand Up @@ -680,6 +726,12 @@
<&ov2311_0_ep>, "remote-endpoint:0=",<&mux_in0>,
<&ov2311_0>, "status=okay";

cam1-arducam-64mp = <&mux_in1>, "remote-endpoint:0=",<&arducam_64mp_1_ep>,
<&arducam_64mp_1_ep>, "remote-endpoint:0=",<&mux_in1>,
<&mux_in1>, "clock-noncontinuous?",
<&arducam_64mp_1>, "status=okay",
<&arducam_64mp_1_vcm>, "status=okay",
<&arducam_64mp_1>,"lens-focus:0=", <&arducam_64mp_1_vcm>;
cam1-imx219 = <&mux_in1>, "remote-endpoint:0=",<&imx219_1_ep>,
<&imx219_1_ep>, "remote-endpoint:0=",<&mux_in1>,
<&mux_in1>, "clock-noncontinuous?",
Expand Down Expand Up @@ -720,6 +772,12 @@
<&ov2311_1_ep>, "remote-endpoint:0=",<&mux_in1>,
<&ov2311_1>, "status=okay";

cam2-arducam-64mp = <&mux_in2>, "remote-endpoint:0=",<&arducam_64mp_2_ep>,
<&arducam_64mp_2_ep>, "remote-endpoint:0=",<&mux_in2>,
<&mux_in2>, "clock-noncontinuous?",
<&arducam_64mp_2>, "status=okay",
<&arducam_64mp_2_vcm>, "status=okay",
<&arducam_64mp_2>,"lens-focus:0=", <&arducam_64mp_2_vcm>;
cam2-imx219 = <&mux_in2>, "remote-endpoint:0=",<&imx219_2_ep>,
<&imx219_2_ep>, "remote-endpoint:0=",<&mux_in2>,
<&mux_in2>, "clock-noncontinuous?",
Expand Down Expand Up @@ -760,6 +818,12 @@
<&ov2311_2_ep>, "remote-endpoint:0=",<&mux_in2>,
<&ov2311_2>, "status=okay";

cam3-arducam-64mp = <&mux_in3>, "remote-endpoint:0=",<&arducam_64mp_3_ep>,
<&arducam_64mp_3_ep>, "remote-endpoint:0=",<&mux_in3>,
<&mux_in3>, "clock-noncontinuous?",
<&arducam_64mp_3>, "status=okay",
<&arducam_64mp_3_vcm>, "status=okay",
<&arducam_64mp_3>,"lens-focus:0=", <&arducam_64mp_3_vcm>;
cam3-imx219 = <&mux_in3>, "remote-endpoint:0=",<&imx219_3_ep>,
<&imx219_3_ep>, "remote-endpoint:0=",<&mux_in3>,
<&mux_in3>, "clock-noncontinuous?",
Expand Down

0 comments on commit 0c9bfdb

Please sign in to comment.