Skip to content

Commit 7fd20b9

Browse files
committed
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: Phi Bang Nguyen <[email protected]>
1 parent b7d4a18 commit 7fd20b9

File tree

8 files changed

+44
-72
lines changed

8 files changed

+44
-72
lines changed

boards/shields/st_b_cams_imx_mb1854/st_b_cams_imx_mb1854.overlay

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
/ {
1212
chosen {
13-
zephyr,camera = &csi_capture_port;
13+
zephyr,camera = &pipe_main;
1414
};
1515

1616
imx335_input_clock: imx335-input-clock {

boards/shields/st_mb1897_cam/st_mb1897_cam.overlay

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
/ {
1111
chosen {
12-
zephyr,camera = &csi_capture_port;
12+
zephyr,camera = &pipe_dump;
1313
};
1414
};
1515

boards/st/stm32mp135f_dk/stm32mp135f_dk.dts

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -188,20 +188,14 @@ csi_interface: &dcmipp {
188188
&dcmipp_pixclk_pb7 &dcmipp_vsync_pg9 &dcmipp_hsync_ph8>;
189189
pinctrl-names = "default";
190190

191-
ports {
192-
port@0 {
193-
dcmipp_ep_in: endpoint {
194-
bus-width = <8>;
195-
hsync-active = <0>;
196-
vsync-active = <0>;
197-
pclk-sample = <0>;
198-
bus-type = <VIDEO_BUS_TYPE_PARALLEL>;
199-
remote-endpoint-label = "mipid02_2";
200-
};
201-
};
202-
203-
port@1 {
204-
csi_capture_port: endpoint { };
191+
port {
192+
dcmipp_ep_in: endpoint {
193+
bus-width = <8>;
194+
hsync-active = <0>;
195+
vsync-active = <0>;
196+
pclk-sample = <0>;
197+
bus-type = <VIDEO_BUS_TYPE_PARALLEL>;
198+
remote-endpoint-label = "mipid02_2";
205199
};
206200
};
207201
};

boards/st/stm32n6570_dk/stm32n6570_dk_common.dtsi

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -459,13 +459,7 @@ zephyr_udc0: &usbotg_hs1 {
459459
};
460460

461461
csi_interface: &dcmipp {
462-
ports {
463-
port@0 {
464-
csi_ep_in: endpoint { };
465-
};
466-
467-
port@1 {
468-
csi_capture_port: endpoint@1 { };
469-
};
462+
port {
463+
csi_ep_in: endpoint { };
470464
};
471465
};

drivers/video/video_stm32_dcmipp.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1620,6 +1620,14 @@ static void stm32_dcmipp_isr(const struct device *dev)
16201620
#define STM32_DCMIPP_CSI_DT_PARAMS(inst)
16211621
#endif
16221622

1623+
#if defined(STM32_DCMIPP_HAS_PIXEL_PIPES)
1624+
#define STM32_DCMIPP_PIPES(inst) \
1625+
DT_FOREACH_CHILD_VARGS(DT_INST_CHILD(inst, pipes), DCMIPP_PIPE_INIT_DEFINE, inst);
1626+
#else
1627+
#define STM32_DCMIPP_PIPE_INIT(node_id, inst) DCMIPP_PIPE_INIT_DEFINE(node_id, inst)
1628+
#define STM32_DCMIPP_PIPES(inst) STM32_DCMIPP_PIPE_INIT(DT_INST_CHILD(inst, pipe), inst)
1629+
#endif
1630+
16231631
#define STM32_DCMIPP_INIT(inst) \
16241632
static void stm32_dcmipp_irq_config_##inst(const struct device *dev) \
16251633
{ \
@@ -1677,7 +1685,7 @@ static void stm32_dcmipp_isr(const struct device *dev)
16771685
POST_KERNEL, CONFIG_VIDEO_INIT_PRIORITY, \
16781686
NULL); \
16791687
\
1680-
DT_FOREACH_CHILD_VARGS(DT_INST_PORT_BY_ID(inst, 1), DCMIPP_PIPE_INIT_DEFINE, inst); \
1688+
STM32_DCMIPP_PIPES(inst) \
16811689
\
16821690
VIDEO_DEVICE_DEFINE(dcmipp_##inst, DEVICE_DT_INST_GET(inst), SOURCE_DEV(inst));
16831691

dts/arm/st/mp13/stm32mp135.dtsi

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,13 @@
2121
resets = <&rctl STM32_RESET(APB4, 1)>;
2222
status = "disabled";
2323

24-
ports {
25-
#address-cells = <1>;
26-
#size-cells = <0>;
27-
28-
port@0 {
29-
reg = <0>;
30-
31-
endpoint {
32-
remote-endpoint-label = "";
33-
bus-type = <VIDEO_BUS_TYPE_PARALLEL>;
34-
};
35-
};
36-
37-
port@1 {
38-
reg = <1>;
24+
pipe_dump: pipe {
25+
};
3926

40-
dcmipp_pipe_dump: endpoint {
41-
compatible = "st,stm32-dcmipp-pipe";
42-
};
27+
port {
28+
endpoint {
29+
remote-endpoint-label = "";
30+
bus-type = <VIDEO_BUS_TYPE_PARALLEL>;
4331
};
4432
};
4533
};

dts/arm/st/n6/stm32n6.dtsi

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -717,39 +717,28 @@
717717
<&rctl STM32_RESET(APB5, 6)>;
718718
status = "disabled";
719719

720-
ports {
720+
pipes {
721+
compatible = "st,stm32-dcmipp-pipes";
721722
#address-cells = <1>;
722723
#size-cells = <0>;
723724

724-
port@0 {
725+
pipe_dump: pipe@0 {
725726
reg = <0>;
726-
727-
endpoint {
728-
remote-endpoint-label = "";
729-
bus-type = <VIDEO_BUS_TYPE_CSI2_DPHY>;
730-
};
731727
};
732728

733-
port@1 {
734-
#address-cells = <1>;
735-
#size-cells = <0>;
736-
729+
pipe_main: pipe@1 {
737730
reg = <1>;
731+
};
738732

739-
dcmipp_pipe_dump: endpoint@0 {
740-
compatible = "st,stm32-dcmipp-pipe";
741-
reg = <0>;
742-
};
743-
744-
dcmipp_pipe_main: endpoint@1 {
745-
compatible = "st,stm32-dcmipp-pipe";
746-
reg = <1>;
747-
};
733+
pipe_aux: pipe@2 {
734+
reg = <2>;
735+
};
736+
};
748737

749-
dcmipp_pipe_aux: endpoint@2 {
750-
compatible = "st,stm32-dcmipp-pipe";
751-
reg = <2>;
752-
};
738+
port {
739+
endpoint {
740+
remote-endpoint-label = "";
741+
bus-type = <VIDEO_BUS_TYPE_CSI2_DPHY>;
753742
};
754743
};
755744
};

dts/bindings/video/st,stm32-dcmipp.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ properties:
4848

4949
child-binding:
5050
child-binding:
51-
child-binding:
52-
include: video-interfaces.yaml
51+
include: video-interfaces.yaml
5352

54-
properties:
55-
bus-type:
56-
required: true
53+
properties:
54+
bus-type:
55+
required: true

0 commit comments

Comments
 (0)