Skip to content

Commit 31b3bad

Browse files
author
Alain Volmat
committed
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 df322f1 commit 31b3bad

File tree

2 files changed

+92
-1
lines changed

2 files changed

+92
-1
lines changed

boards/st/stm32mp135f_dk/stm32mp135f_dk.dts

Lines changed: 89 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
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-15pins-connector.h>
1213
#include <zephyr/dt-bindings/input/input-event-codes.h>
1314

1415
/ {
@@ -62,6 +63,15 @@
6263
led1 = &red_led_2;
6364
sw0 = &user_button;
6465
};
66+
67+
csi_15pins_connector: connector_csi_15pins {
68+
compatible = "raspberrypi,csi-15pins-connector";
69+
#gpio-cells = <2>;
70+
gpio-map-mask = <0xffffffff 0xffffffc0>;
71+
gpio-map-pass-thru = <0 0x3f>;
72+
gpio-map = <CSI_15PINS_IO0 0 &mcp23017 4 0>,
73+
<CSI_15PINS_IO1 0 &mcp23017 3 0>;
74+
};
6575
};
6676

6777
&clk_hsi {
@@ -89,6 +99,17 @@
8999
status = "okay";
90100
};
91101

102+
&pll2 {
103+
clocks = <&clk_hse>;
104+
div-m = <3>;
105+
mul-n = <66>;
106+
div-p = <2>;
107+
div-q = <2>;
108+
div-r = <1>;
109+
fracn = <5120>;
110+
status = "okay";
111+
};
112+
92113
&rcc {
93114
clock-frequency = <DT_FREQ_M(1000)>;
94115
clocks = <&pll>;
@@ -124,10 +145,64 @@
124145
status = "okay";
125146
};
126147

127-
&i2c5 {
148+
csi_15pins_i2c: &i2c5 {
128149
pinctrl-names = "default";
129150
pinctrl-0 = <&i2c5_scl_pd1 &i2c5_sda_ph6>;
130151
status = "okay";
152+
153+
mipid02: bridge@14 {
154+
compatible = "st,mipid02";
155+
reg = <0x14>;
156+
reset-gpios = <&mcp23017 2 GPIO_ACTIVE_LOW>;
157+
158+
ports {
159+
#address-cells = <1>;
160+
#size-cells = <0>;
161+
port@0 {
162+
reg = <0>;
163+
164+
csi_15pins_ep_in: endpoint {
165+
remote-endpoint-label = "";
166+
};
167+
};
168+
169+
port@2 {
170+
reg = <2>;
171+
172+
mipid02_2: endpoint {
173+
bus-width = <8>;
174+
hsync-active = <0>;
175+
vsync-active = <0>;
176+
pclk-sample = <0>;
177+
remote-endpoint-label = "dcmipp_ep_in";
178+
};
179+
};
180+
};
181+
};
182+
};
183+
184+
csi_15pins_interface: &dcmipp {
185+
pinctrl-0 = <&dcmipp_d0_pa9 &dcmipp_d1_pd0 &dcmipp_d2_pg10 &dcmipp_d3_pe4
186+
&dcmipp_d4_pd11 &dcmipp_d5_pd3 &dcmipp_d6_pb8 &dcmipp_d7_pe14
187+
&dcmipp_pixclk_pb7 &dcmipp_vsync_pg9 &dcmipp_hsync_ph8>;
188+
pinctrl-names = "default";
189+
190+
ports {
191+
port@0 {
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";
199+
};
200+
};
201+
202+
port@1 {
203+
csi_15pins_capture_port: endpoint { };
204+
};
205+
};
131206
};
132207

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

boards/st/stm32mp135f_dk/stm32mp135f_dk_defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ CONFIG_CONSOLE=y
1414

1515
# UART console (overrides remote proc console)
1616
CONFIG_UART_CONSOLE=y
17+
18+
# Ensure VIDEO is initialized after pinctrl due to IO-Expander
19+
CONFIG_VIDEO_INIT_PRIORITY=75

0 commit comments

Comments
 (0)