Commit Graph

20 Commits

Author SHA1 Message Date
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