Enable preamble control notificaion for disable preprogrammed
CDR setting for certain resolution sensor mode.
CRs-Fixed: 2943640
Change-Id: I31705cd14239d5610c4f12c2d9e9417eead3c886
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Lane enable needs to be program with header tag LANE_ENABLE. This
change adds the tag associated with the correct register offset.
CRs-Fixed: 2929063
Change-Id: Ibbb8e4e0fc2d2de8e9c9f193b3d31ba5492b22f4
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Add support to dump the 3ph and 2ph specific
status registers. Following debugfs command can
be used to enable status register dump for csiphy0:
adb shell
"echo 1>/sys/kernel/debug/camera_csiphy/csiphy0_en_status_reg_dump"
CRs-Fixed: 2942364
Change-Id: If8d57a9e54c9e509de35f6a57d7baa1895be7779
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Add Support to program the output_bus_select register
at the end of programming all the lanes.
CRs-Fixed: 2942604
Change-Id: I0279aa6bc824b75e3df1c62c3f69d146ec80b356
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Clean up unused variables from the csiphy code. Also,
update the code for better readability.
CRs-Fixed: 2942364
Change-Id: I601e06fd8a61607a69390c10124a70f2c7e60dd8
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
OIS hw i2c_time_data list head need to be initialize for
proper data operation. This change adds that link list
head initialization.
CRs-Fixed: 2913072
Change-Id: I43041f58055c6eca135dc3c3a0bad50bacb59fe8
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Use mmrm interface to set clock rate on all
camera clks.
CRs-Fixed: 2901925
Change-Id: I2e4c31a11e0e068693ac15356e3b3dafcfa0b078
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Update the csiphy1.2.3 programming sequence for the update
on 01/08/2021.
CRs-Fixed: 2856350
Change-Id: I06b164fbb0a589f22f973476709008d0c7ac32ca
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Move AON camera select control to the csiphy header.
CRs-Fixed: 2915332
Change-Id: I246d5ee93e9f494b36856fad33fc23e81fa37af2
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Sensor IO framework decides based on slave write request to perform
desire opertion at CCI hw. Currently this framework uses wrong
condition to pass on the correct information to CCI hw. This change
fixes this condition to pass on the correct operation to perform
at CCI hw. Also update hard code value to appropriate enums to align
the opertion with slaves.
CRs-Fixed: 2913072
Change-Id: I3067314e6bccb513f343e3bcbc3f1b72355f2291
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Source clocks that are shared with multiple devices need
to be consolidated before setting clock rate on them.
If not, a set call with lower freq from one device
overwrites the frequency that previously set by another
device, causing issues. Clk wrapper helps to consolidate
the frequency among multiple devices and set the max
frequency required by all of them. A shared clock notation
is defined in DT and go through clk wrapper based on that.
CRs-Fixed: 2901925
Change-Id: Ia5b2b5fd3c0619c994e27d96fad6e11d126de182
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
This change gets the flash on wait time from userspace to
control the precise flash.
CRs-Fixed: 2929276
Change-Id: Ieac18f6e049b446c5a7b20dcfdff013aa9838575
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
Set the debugfs root entry pointer to null after
recursive remove at unbinding to prevent null pointer
dereference by kernel followed by kernel panic. Also,
add checks to avoid null pointer dereference.
CRs-Fixed: 2920490
Change-Id: I5a4f44f3d8f533f3a51e108472d5ccf93c261a98
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Based on link_hdl/sensor id, that can separate multi camera event
on reqmgr, apply request, bufdone, isp_active_irq.
Add log of link_hdl/sensor id in above trace event,
that systrace can show independent camera trace event.
CRs-Fixed: 2924042
Change-Id: I7088a8a489a05dae4e62dc131d1c0c45c72038e2
Signed-off-by: Haibin Liu <haibinl@codeaurora.org>
This change modifies regulator_get, regulator_put to devres entry.
Devres is linked list of arbitrarily sized memory areas associated
with a struct device. Each devres entry is associated with a release
function. All devres entries are released on driver detach. This
avoids potential leaking of resources on driver detach or having half
broken failure path implementation in probe call which would leak
resources when failure occurs.
CRs-Fixed: 2890861
Change-Id: Ibd46bc37bd6e31aeb2a5ea90ed75a1f596b57bf9
Signed-off-by: shiwgupt <shiwgupt@codeaurora.org>
Add support to add a delay while programming the IRQ
settings. Also, correct the irq mask bring up sequence
for csiphy2.1.0.
CRs-Fixed: 2923706
Change-Id: I1ef5b078bd91e915b9e53305edc0034d62132831
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Update the bring up sequence for csiphy2.1.0 with the
revision U.
CRs-Fixed: 2895820
Change-Id: I59b52d0bb52b82b23d83fd138e93302792dc6203
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Add Main/Aon camera switch support for image sensor
and it's submodule. This change detects the AON support
from image sensor hw information from it's respective
device tree support. Also sensor needs to call csiphy
to do the cpas top level operation in order to program
the register for Main/AON mux operation, so add API
export from csiphy hw for sensor domain to perform
the operation.
CRs-Fixed: 2899541
Change-Id: Ibde3ce86c15cfd7e7f445f6461565f78a668b812
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Apply the flash at EOF and apply the other devices
at the EPOCH of next frame, then the flash can
cover all the exposure zone of current request.
Add the inject delay for SOF and EOF separate,
then we can use inject delay for more flexible
frame skip control.
CRs-Fixed: 2820683
Change-Id: Ic6a58327a0ae44c54190884ba42ea7926ec7c90e
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
While csiphy is shutdown abnormally, we also need to
program off csiphy hw common register, to avoid the
residual of active csiphy hw cnt during monkey test.
CRs-Fixed: 2861912
Change-Id: I1767c729b205a96e5f298265e65b37150dac03b6
Signed-off-by: chengxue <chengxue@codeaurora.org>
Move sensor enums that are used by user mode
to uapi file for a synchronus operation. Currently,
user mode and kernel maintains two separate
copies of the same structure, so making a
change in these structure is error prone, since
there is no synchronization.
CRs-Fixed: 2894834
Change-Id: I3f413d03d7981ed3c886e684b11421cae7a39fca
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
In current implementation, each driver call wait_for_completion_timeout
and readl_poll_timeout with own timeout values.
In case of slow environments like presil, lot of hacks are needed to
change the timeouts for each driver. It needs multiple code changes
and compilations, thus consuming time.
This commit implements a common interface to call
wait_for_completion_timeout and readl_poll_timeout.
Debug variable is also introduced to
change the timeout value. This will help to change the timeout
without compilations and changes at multiple places.
Change-Id: Iba51e0805a49ed325147a12688c2fe6619bb68e6
CRs-Fixed: 2830502
Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
Fix the return code in sensor power up
function for failure case.
CRs-Fixed: 2887698
Change-Id: Ib4df3230d83d02fcd239d872a5bcfa2994d519a3
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>