Commit Graph

35 Commits

Author SHA1 Message Date
iabdalkader
b1f81f7cdd common: Update framebuffer API.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-09-02 16:05:55 +02:00
iabdalkader
7b4c545b47 common/csi: Move resolution table to csi struct.
This allows drivers to override standard resolutions,
or use custom ones, without affecting other CSIs.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-14 11:40:24 +02:00
Kwabena W. Agyeman
8a26e091c7 common/omv_csi: Add support for post_process positive value returns. 2025-08-09 09:52:27 -07:00
Kwabena W. Agyeman
ea0505d52e common/omv_csi: Allow IOCTLs to return positive values. 2025-08-09 09:32:10 -07:00
iabdalkader
efb4ff1ca7 common/csi: Use designated initializer for res table.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-09 18:03:32 +02:00
iabdalkader
1f1e2b59e9 common/csi: Add post-processing op.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-09 12:04:05 +02:00
iabdalkader
9112cf2aae misc: Clean-up CSI flags.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-09 12:00:59 +02:00
iabdalkader
451c1e7664 common/csi: Add support for custom resolutions.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-08 14:45:23 +02:00
iabdalkader
9bb174454b common/csi: Track elapsed time since last hard-reset.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-08-02 13:24:12 +02:00
iabdalkader
9bcef8e17c common/csi: Add power-on time.
Can be used by driver to check for elapsed time since
power-on.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-27 15:01:45 +02:00
iabdalkader
af711cfc90 common: Use the new framebuffer API.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-23 18:24:55 +02:00
iabdalkader
9030b4b8dd common/csi: Refactor snapshot prologue.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-23 18:24:55 +02:00
Kwabena W. Agyeman
be72f87345 common: Add polarity config override. 2025-07-21 23:10:40 -07:00
iabdalkader
5306e93ab4 common/csi: Add function to print sensor name.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-16 22:42:36 +02:00
Kwabena W. Agyeman
f9f6eb0302 drivers/sensors: Remove OV5640 REV_Y special case. 2025-07-05 12:09:18 -07:00
iabdalkader
2040a0a000 common/csi: Decouple the clock from main CSI state.
This patch decouples the clock from the main CSI state,
further separating the CSI instance from the port's CSI
driver. Additionally, it allows CSIs to use different clocks,
in theory, though they must first be detected somehow in
order to switch clocks.

As a side effect of sharing the clock, set_frequency will be
called more frequently (the default call plus once per CSI).
However, the frequency is now checked, and the clock is only
reconfigured if the new frequency exceeds a configurable
tolerance.

Finally, get_clk_frequency now accepts a boolean to return
either the exact clock frequency, for sensors that require
it, or the nominal frequency.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-05 14:17:31 +02:00
iabdalkader
ecbdbdfde1 common/csi: Refactor omv_csi_init.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-02 18:12:34 +02:00
iabdalkader
b3832b86c1 common/csi: Fix CSI detection & init logic.
Simplify the detection logic and handle the case where
all detected sensors (one or more) are auxiliary.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-30 23:43:20 +02:00
iabdalkader
7f4e5e81c7 common/csi: Abort CSIs on soft-reboot.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-29 17:20:49 +02:00
iabdalkader
90a568fde5 common/csi: Add power-on flag.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-29 17:20:49 +02:00
iabdalkader
58d69cd571 common/csi: Add shutdown op.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-29 17:20:49 +02:00
iabdalkader
fed264193d common/csi: Refactor sensor init.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-27 20:17:01 +02:00
iabdalkader
a266ac33f1 ports/all: Fix calls on uninitialized CSIs.
Detection flag should be set after CSIs are detected in
the scanning code, and functions that loop over CSIs
should check it.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-27 10:03:48 +02:00
Kwabena W. Agyeman
30545d47b2 common/omv_csi: Enable conflicting sensors. 2025-06-27 09:29:55 +02:00
Kwabena W. Agyeman
176f32ab90 common/omv_csi: Fix default polarity configs.
The current order that these operate works for all sensors. Changing them
breaks various sensors.
2025-06-27 09:08:46 +02:00
iabdalkader
bc2a3372a6 common/csi: Refactor I2C scanning code.
This should be much faster as it starts with the most common
config: power-down active low, reset active low.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-25 21:27:49 +02:00
iabdalkader
3270272e11 common/csi: Add support for non-blocking flag.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-25 10:37:43 +02:00
iabdalkader
72410dfc8c common/csi: Add support for multiple CSIs.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-25 10:37:41 +02:00
iabdalkader
5933198a14 common/csi: Refactor CSI I2C bus.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-23 14:13:57 +02:00
iabdalkader
fe2e2cd82a common: Rename omv_csi_get_clk_frequency.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-23 12:41:16 +02:00
iabdalkader
6526f9412b sensors: Add support for PixArt PS5520.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-06-10 14:36:33 +02:00
iabdalkader
ab39043bf9 common: Refactor omv_csi_abort to accept a context.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-26 10:40:53 +03:00
iabdalkader
f468c12f74 common: Add the framebuffer instance to csi struct. 2025-04-26 10:40:53 +03:00
iabdalkader
16ef0b177c drivers/softcsi: Add virtual image sensor for testing.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-21 10:22:06 +02:00
iabdalkader
daf2bb30da misc: Restructure repo.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-13 08:28:34 +02:00