Skip to content

Commit 40c7c93

Browse files
josuahjhedberg
authored andcommitted
boards: nucleo_n657x0_q: add DCMIPP and CSI connector support
Add an instance for DCMIPP as well as devicetree definitions to allow plugging Raspberry Pi 22 pins or 15 pins shields via the csi_* devicetree labels. Signed-off-by: Josuah Demangeon <[email protected]> Signed-off-by: Alain Volmat <[email protected]>
1 parent cc3c0d0 commit 40c7c93

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

boards/st/nucleo_n657x0_q/nucleo_n657x0_q_common.dtsi

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <st/n6/stm32n657X0.dtsi>
88
#include <st/n6/stm32n657x0hxq-pinctrl.dtsi>
99
#include <zephyr/dt-bindings/flash_controller/xspi.h>
10+
#include <zephyr/dt-bindings/gpio/raspberrypi-csi-connector.h>
1011
#include <zephyr/dt-bindings/input/input-event-codes.h>
1112
#include "arduino_r3_connector.dtsi"
1213

@@ -54,6 +55,15 @@
5455
led2 = &red_led;
5556
sw0 = &user_button;
5657
};
58+
59+
csi_connector: connector_csi {
60+
compatible = "raspberrypi,csi-connector";
61+
#gpio-cells = <2>;
62+
gpio-map-mask = <0xffffffff 0xffffffc0>;
63+
gpio-map-pass-thru = <0 0x3f>;
64+
gpio-map = <CSI_IO0 0 &gpioo 5 0>,
65+
<CSI_IO1 0 &gpioa 0 0>;
66+
};
5767
};
5868

5969
&clk_hse {
@@ -109,6 +119,19 @@
109119
status = "okay";
110120
};
111121

122+
&ic17 {
123+
pll-src = <1>;
124+
ic-div = <4>;
125+
status = "okay";
126+
};
127+
128+
/* IC18 must be enabled for the 27MHz CSIPHY */
129+
&ic18 {
130+
pll-src = <1>;
131+
ic-div = <60>;
132+
status = "okay";
133+
};
134+
112135
&perck {
113136
clocks = <&rcc STM32_SRC_HSI PER_SEL(0)>;
114137
status = "okay";
@@ -154,6 +177,15 @@
154177
status = "okay";
155178
};
156179

180+
csi_i2c: &i2c2 {
181+
clocks = <&rcc STM32_CLOCK(APB1, 22)>,
182+
<&rcc STM32_SRC_CKPER I2C2_SEL(1)>;
183+
pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>;
184+
pinctrl-names = "default";
185+
clock-frequency = <I2C_BITRATE_STANDARD>;
186+
status = "okay";
187+
};
188+
157189
&i2c4 {
158190
clocks = <&rcc STM32_CLOCK(APB4, 7)>,
159191
<&rcc STM32_SRC_CKPER I2C4_SEL(1)>;
@@ -257,3 +289,9 @@ zephyr_udc0: &usbotg_hs1 {
257289
};
258290
};
259291
};
292+
293+
csi_interface: &dcmipp {
294+
port {
295+
csi_ep_in: endpoint {};
296+
};
297+
};

0 commit comments

Comments
 (0)