Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions boards/shields/st_b_cams_imx_mb1854/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ config VIDEO_STM32_DCMIPP_SENSOR_WIDTH
config VIDEO_STM32_DCMIPP_SENSOR_HEIGHT
default 1944

config GPIO_HOGS
default y

endif # VIDEO_STM32_DCMIPP
11 changes: 4 additions & 7 deletions boards/shields/st_b_cams_imx_mb1854/st_b_cams_imx_mb1854.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,8 @@
};
};

&csi_connector {
/* Power the camera module */
en-module-gpios {
gpio-hog;
gpios = <CSI_IO1 GPIO_ACTIVE_HIGH>;
output-high;
};
/* Power the camera module */
&csi_gpio1_hog {
status = "okay";
output-high;
};
54 changes: 54 additions & 0 deletions boards/st/nucleo_n657x0_q/nucleo_n657x0_q_common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <st/n6/stm32n657X0.dtsi>
#include <st/n6/stm32n657x0hxq-pinctrl.dtsi>
#include <zephyr/dt-bindings/flash_controller/xspi.h>
#include <zephyr/dt-bindings/gpio/raspberrypi-csi-connector.h>
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include "arduino_r3_connector.dtsi"

Expand Down Expand Up @@ -54,6 +55,31 @@
led2 = &red_led;
sw0 = &user_button;
};

csi_connector: connector_csi {
compatible = "raspberrypi,csi-connector";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map = <CSI_IO0 0 &gpioo 5 0>,
<CSI_IO1 0 &gpioa 0 0>;
};
};

&gpioo {
csi_gpio0_hog: csi-gpio0-hog {
gpio-hog;
gpios = <5 GPIO_ACTIVE_HIGH>;
status = "disabled";
};
};

&gpioa {
csi_gpio1_hog: csi-gpio1-hog {
gpio-hog;
gpios = <0 GPIO_ACTIVE_HIGH>;
status = "disabled";
};
};

&clk_hse {
Expand Down Expand Up @@ -115,6 +141,12 @@
status = "okay";
};

&ic17 {
pll-src = <1>;
ic-div = <4>;
status = "okay";
};

&perck {
clocks = <&rcc STM32_SRC_HSI PER_SEL(0)>;
status = "okay";
Expand Down Expand Up @@ -160,6 +192,16 @@
status = "okay";
};

csi_i2c: &i2c2 {
clocks = <&rcc STM32_CLOCK(APB1, 22)>,
<&rcc STM32_SRC_CKPER I2C2_SEL(1)>;
pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>;
pinctrl-names = "default";
clock-frequency = <I2C_BITRATE_STANDARD>;
status = "okay";

};

&i2c4 {
clocks = <&rcc STM32_CLOCK(APB4, 7)>,
<&rcc STM32_SRC_CKPER I2C4_SEL(1)>;
Expand Down Expand Up @@ -257,3 +299,15 @@ zephyr_udc0: &usbotg_hs1 {
};
};
};

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

port@1 {
csi_capture_port: endpoint@1 { };
};
};
};
16 changes: 16 additions & 0 deletions boards/st/stm32n6570_dk/stm32n6570_dk_common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,22 @@
};
};

&gpioc {
csi_gpio0_hog: csi-gpio0-hog {
gpio-hog;
gpios = <8 GPIO_ACTIVE_HIGH>;
status = "disabled";
};
};

&gpiod {
csi_gpio1_hog: csi-gpio1-hog {
gpio-hog;
gpios = <2 GPIO_ACTIVE_HIGH>;
status = "disabled";
};
};

&i2c2 {
status = "okay";
clocks = <&rcc STM32_CLOCK(APB1, 22)>,
Expand Down
1 change: 1 addition & 0 deletions drivers/video/imx335.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ static int imx335_init(const struct device *dev)
gpio_pin_set_dt(&cfg->reset_gpio, 0);

k_sleep(K_USEC(600)); /* T4 */
k_sleep(K_USEC(400)); /* Extra delay needed after T4 */
}
#endif

Expand Down