Commit ca030fbf authored by Phi Bang Nguyen's avatar Phi Bang Nguyen Committed by Fabio Baltieri
Browse files

drivers: video: stm32_dcmipp: Use normal child nodes for pipes



The pipe nodes are not video interfaces. Describe them as normal child
nodes instead of using port/endpoint.

Signed-off-by: default avatarPhi Bang Nguyen <phibang.nguyen@nxp.com>
parent caa9c8c8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@

/ {
	chosen {
		zephyr,camera = &csi_capture_port;
		zephyr,camera = &pipe_main;
	};

	imx335_input_clock: imx335-input-clock {
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@

/ {
	chosen {
		zephyr,camera = &csi_capture_port;
		zephyr,camera = &pipe_dump;
	};
};

+8 −14
Original line number Diff line number Diff line
@@ -188,8 +188,7 @@ csi_interface: &dcmipp {
		     &dcmipp_pixclk_pb7 &dcmipp_vsync_pg9 &dcmipp_hsync_ph8>;
	pinctrl-names = "default";

	ports {
		port@0 {
	port {
		dcmipp_ep_in: endpoint {
			bus-width = <8>;
			hsync-active = <0>;
@@ -199,11 +198,6 @@ csi_interface: &dcmipp {
			remote-endpoint-label = "mipid02_2";
		};
	};

		port@1 {
			csi_capture_port: endpoint { };
		};
	};
};

&ltdc {
+2 −8
Original line number Diff line number Diff line
@@ -475,13 +475,7 @@ zephyr_udc0: &usbotg_hs1 {
};

csi_interface: &dcmipp {
	ports {
		port@0 {
	port {
		csi_ep_in: endpoint { };
	};

		port@1 {
			csi_capture_port: endpoint@1 { };
		};
	};
};
+9 −1
Original line number Diff line number Diff line
@@ -1620,6 +1620,14 @@ static void stm32_dcmipp_isr(const struct device *dev)
#define STM32_DCMIPP_CSI_DT_PARAMS(inst)
#endif

#if defined(STM32_DCMIPP_HAS_PIXEL_PIPES)
#define STM32_DCMIPP_PIPES(inst) \
	DT_FOREACH_CHILD_VARGS(DT_INST_CHILD(inst, pipes), DCMIPP_PIPE_INIT_DEFINE, inst)
#else
#define STM32_DCMIPP_PIPE_INIT(node_id, inst) DCMIPP_PIPE_INIT_DEFINE(node_id, inst)
#define STM32_DCMIPP_PIPES(inst) STM32_DCMIPP_PIPE_INIT(DT_INST_CHILD(inst, pipe), inst)
#endif

#define STM32_DCMIPP_INIT(inst)									\
	static void stm32_dcmipp_irq_config_##inst(const struct device *dev)			\
	{											\
@@ -1677,7 +1685,7 @@ static void stm32_dcmipp_isr(const struct device *dev)
		    POST_KERNEL, CONFIG_VIDEO_INIT_PRIORITY,					\
		    NULL);									\
												\
	DT_FOREACH_CHILD_VARGS(DT_INST_PORT_BY_ID(inst, 1), DCMIPP_PIPE_INIT_DEFINE, inst);	\
	STM32_DCMIPP_PIPES(inst)								\
												\
	VIDEO_DEVICE_DEFINE(dcmipp_##inst, DEVICE_DT_INST_GET(inst), SOURCE_DEV(inst));

Loading