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

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions boards/nxp/imx95_evk/imx95_evk-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,17 @@
};
};

lpi2c3_default: lpi2c3_default {
group0 {
pinmux = <&iomuxc_gpio_io01_lpi2c_scl_lpi2c3_scl>,
<&iomuxc_gpio_io00_lpi2c_sda_lpi2c3_sda>;
drive-open-drain;
slew-rate = "slightly_fast";
drive-strength = "x4";
input-enable;
};
};

lpi2c5_default: lpi2c5_default {
group0 {
pinmux = <&iomuxc_gpio_io23_lpi2c_scl_lpi2c5_scl>,
Expand Down Expand Up @@ -159,4 +170,13 @@
input-enable;
};
};

cmmclk1_default: cmmclk_default {
group0 {
pinmux = <&iomuxc_ccm_clko1_ccmsrcgpcmix_clko_ccmsrcgpcmix_clko1>;
bias-pull-up;
slew-rate = "slightly_fast";
drive-strength = "x4";
};
};
};
84 changes: 83 additions & 1 deletion boards/nxp/imx95_evk/imx95_evk_mimx9596_m7.dts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024-2025 NXP
* Copyright 2024-2026 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand All @@ -21,6 +21,37 @@
zephyr,flash-controller = &mt35xu01gbba;
zephyr,console = &lpuart3;
zephyr,shell-uart = &lpuart3;
zephyr,camera = &ap1302;
};

/* ADP5585_PWREN2 */
/* Camera power regulators */
reg_cam_dvdd: regulator-cam-dvdd {
compatible = "regulator-fixed";
regulator-name = "CAM_DVDD_1V2";
enable-gpios = <&adp5585_gpio 9 GPIO_ACTIVE_HIGH>;
status = "okay";
};

reg_cam_vddio: regulator-cam-vddio {
compatible = "regulator-fixed";
regulator-name = "CAM_VDDIO_1V8";
enable-gpios = <&adp5585_gpio 8 GPIO_ACTIVE_HIGH>;
status = "okay";
};

reg_cam_avdd: regulator-cam-avdd {
compatible = "regulator-fixed";
regulator-name = "CAM_AVDD_2V8";
enable-gpios = <&adp5585_gpio 10 GPIO_ACTIVE_HIGH>;
status = "okay";
};

reg_cam_vddio_hmisc: regulator-cam-vddio-hmisc {
compatible = "regulator-fixed";
regulator-name = "CAM_VDDIO_HMISC_1V8";
enable-gpios = <&adp5585_gpio 12 GPIO_ACTIVE_HIGH>;
status = "okay";
};
};

Expand Down Expand Up @@ -99,6 +130,57 @@
};
};

/* LPI2C3 for camera sensor and ADP5585 IO expander */
&lpi2c3 {
status = "okay";
pinctrl-0 = <&lpi2c3_default>;
pinctrl-names = "default";

/* ADP5585 MFD device for camera power control */
mfd_adp5585: adp5585@34 {
compatible = "adi,adp5585";
reg = <0x34>;
status = "okay";

/* GPIO child node */
adp5585_gpio: adp5585_gpio {
compatible = "adi,adp5585-gpio";
gpio-controller;
#gpio-cells = <2>;
ngpios = <13>;
gpio-reserved-ranges = <5 3>;
status = "okay";
};
};

pcal6408: gpio@20 {
compatible = "nxp,pcal6408a";
reg = <0x20>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <8>;
status = "okay";
};

ap1302: camera@3c {
compatible = "onnn,ap1302";
reg = <0x3c>;
reset-gpios = <&pcal6408 2 GPIO_ACTIVE_HIGH>;
isp-en-gpios = <&adp5585_gpio 2 GPIO_ACTIVE_HIGH>;
power-supplies = <&reg_cam_dvdd>,
<&reg_cam_vddio>,
<&reg_cam_avdd>,
<&reg_cam_vddio_hmisc>;
clock-names = "mclk";
clocks = <&scmi_clk IMX95_CLK_CCMCKO1>;
pinctrl-0 = <&cmmclk1_default>;
pinctrl-names = "default";
firmware-address = <0x87000000>;
mipi-data-lanes = <2>;
status = "okay";
};
};

&lpi2c5 {
pinctrl-0 = <&lpi2c5_default>;
pinctrl-names = "default";
Expand Down
1 change: 1 addition & 0 deletions drivers/video/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ zephyr_library_sources(video_ctrls.c)
zephyr_library_sources(video_device.c)

# zephyr-keep-sorted-start
zephyr_library_sources_ifdef(CONFIG_VIDEO_AP1302 ap1302.c)
zephyr_library_sources_ifdef(CONFIG_VIDEO_EMUL_IMAGER video_emul_imager.c)
zephyr_library_sources_ifdef(CONFIG_VIDEO_EMUL_RX video_emul_rx.c)
zephyr_library_sources_ifdef(CONFIG_VIDEO_ESP32 video_esp32_dvp.c)
Expand Down
1 change: 1 addition & 0 deletions drivers/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ config VIDEO_ENCODER_JPEG
bool "JPEG video encoder support"

# zephyr-keep-sorted-start
source "drivers/video/Kconfig.ap1302"
source "drivers/video/Kconfig.emul_imager"
source "drivers/video/Kconfig.emul_rx"
source "drivers/video/Kconfig.esp32_dvp"
Expand Down
20 changes: 20 additions & 0 deletions drivers/video/Kconfig.ap1302
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2026 NXP
# SPDX-License-Identifier: Apache-2.0

config VIDEO_AP1302
bool "ONNN AP1302 Camera ISP driver"
select I2C
depends on DT_HAS_ONNN_AP1302_ENABLED
default y
help
Enable driver for AP1302 Camera ISP.

if VIDEO_AP1302

config VIDEO_AP1302_INIT_PRIORITY
int "AP1302 driver initialization priority"
default 76
help
Initialization priority for AP1302 driver.

endif # VIDEO_AP1302
Loading
Loading