Skip to content

Commit 48b633c

Browse files
Alain Volmatkartben
authored andcommitted
boards: st: stm32mp135f_dk: add camera pipeline nodes
The STM32MP135F-DK board embeds a ST-MIPID02 CSI to DVP bridge allowing to connect a CSI 15pins FFC cable enabled sensor to the DCMIPP in parallel interface. Add the ST-MIPID02 node and its dependency MCO clock as well as partially filled DCMIPP node. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
1 parent 921b569 commit 48b633c

File tree

1 file changed

+90
-1
lines changed

1 file changed

+90
-1
lines changed

boards/st/stm32mp135f_dk/stm32mp135f_dk.dts

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
#include <st/mp13/stm32mp135.dtsi>
1010
#include <st/mp13/stm32mp135faex-pinctrl.dtsi>
1111
#include "zephyr/dt-bindings/display/panel.h"
12+
#include <zephyr/dt-bindings/gpio/raspberrypi-csi-connector.h>
1213
#include <zephyr/dt-bindings/input/input-event-codes.h>
14+
#include <zephyr/dt-bindings/video/video-interfaces.h>
1315

1416
/ {
1517
model = "STMicroelectronics STM32MP135-DK board";
@@ -62,6 +64,15 @@
6264
led1 = &red_led_2;
6365
sw0 = &user_button;
6466
};
67+
68+
csi_connector: connector_csi {
69+
compatible = "raspberrypi,csi-connector";
70+
#gpio-cells = <2>;
71+
gpio-map-mask = <0xffffffff 0xffffffc0>;
72+
gpio-map-pass-thru = <0 0x3f>;
73+
gpio-map = <CSI_IO0 0 &mcp23017 4 0>,
74+
<CSI_IO1 0 &mcp23017 3 0>;
75+
};
6576
};
6677

6778
&clk_hsi {
@@ -89,6 +100,17 @@
89100
status = "okay";
90101
};
91102

103+
&pll2 {
104+
clocks = <&clk_hse>;
105+
div-m = <3>;
106+
mul-n = <66>;
107+
div-p = <2>;
108+
div-q = <2>;
109+
div-r = <1>;
110+
fracn = <5120>;
111+
status = "okay";
112+
};
113+
92114
&rcc {
93115
clock-frequency = <DT_FREQ_M(1000)>;
94116
clocks = <&pll>;
@@ -124,10 +146,64 @@
124146
status = "okay";
125147
};
126148

127-
&i2c5 {
149+
csi_i2c: &i2c5 {
128150
pinctrl-names = "default";
129151
pinctrl-0 = <&i2c5_scl_pd1 &i2c5_sda_ph6>;
130152
status = "okay";
153+
154+
mipid02: bridge@14 {
155+
compatible = "st,mipid02";
156+
reg = <0x14>;
157+
reset-gpios = <&mcp23017 2 GPIO_ACTIVE_LOW>;
158+
159+
ports {
160+
#address-cells = <1>;
161+
#size-cells = <0>;
162+
port@0 {
163+
reg = <0>;
164+
165+
csi_ep_in: endpoint {
166+
remote-endpoint-label = "";
167+
};
168+
};
169+
170+
port@2 {
171+
reg = <2>;
172+
173+
mipid02_2: endpoint {
174+
bus-width = <8>;
175+
hsync-active = <0>;
176+
vsync-active = <0>;
177+
pclk-sample = <0>;
178+
remote-endpoint-label = "dcmipp_ep_in";
179+
};
180+
};
181+
};
182+
};
183+
};
184+
185+
csi_interface: &dcmipp {
186+
pinctrl-0 = <&dcmipp_d0_pa9 &dcmipp_d1_pd0 &dcmipp_d2_pg10 &dcmipp_d3_pe4
187+
&dcmipp_d4_pd11 &dcmipp_d5_pd3 &dcmipp_d6_pb8 &dcmipp_d7_pe14
188+
&dcmipp_pixclk_pb7 &dcmipp_vsync_pg9 &dcmipp_hsync_ph8>;
189+
pinctrl-names = "default";
190+
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 { };
205+
};
206+
};
131207
};
132208

133209
&ltdc {
@@ -166,3 +242,16 @@
166242
def-back-color-green = <0xFF>;
167243
def-back-color-blue = <0xFF>;
168244
};
245+
246+
/*
247+
* MCO1 is used to clock ST-MIPID02, keep disabled here, will be
248+
* enabled by a shield when camera pipeline is enabled
249+
*/
250+
&mco1 {
251+
clocks = <&rcc STM32_SRC_HSE MCO1_SEL(MCO1_SEL_HSE)>;
252+
prescaler = <MCO1_PRE(MCO_PRE_DIV_1)>;
253+
pinctrl-0 = <&rcc_mco_1_pd7>;
254+
pinctrl-names = "default";
255+
256+
status = "disabled";
257+
};

0 commit comments

Comments
 (0)