Update the csiphy2.1.0 programming sequence for the update
on 11/19/2020.
CRs-Fixed: 2833124
Change-Id: Ie5c00423bc9dea42996108eeb6722ec975ca065f
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
When multiple frequency slaves running on a same I2C bus,
then there is a chance of overriding I2C bus frequency
even if another I2C operation is running. This could lead
to CCI timeout at driver level. Updated synchronization logic,
to properly update I2C clock frequency, only when no other
I2C operation running.
CRs-Fixed: 2815310
Change-Id: Ia341d7cda118497bf1acea8ea59f7f03124f31c3
Signed-off-by: Anil Kumar Kanakanti <akanakan@codeaurora.org>
When camera module shut down happens reset the
last flush request ID for the new session to
continue as fresh start.
CRs-Fixed: 2822543
Change-Id: Ic5b43d7acaeb7e7b6999c02cbb4654598469638b
Signed-off-by: Sureshnaidu Laveti <lsuresh@codeaurora.org>
- Disable skew calibration by default for CSIPHY.
- When last bits of data are 0, Sensor flips data to static 1 in HS-Trail.
This creates a false calibration header in HS-Trail period depending on
last bits of data.
CRs-Fixed: 2777521
Change-Id: I285f74652cc3c8b74e280e7edfb92eb4661d2692
Signed-off-by: shiwgupt <shiwgupt@codeaurora.org>
there should be a race condition on rd_done
read/write between cam_cci_irq and
cam_cci_read_bytes, add mutex to avoid.
CRs-Fixed: 2786609
Change-Id: Ic55976133bfdc7958b4b3c8b0efdf896f82e7ccf
Signed-off-by: chengxue <chengxue@codeaurora.org>
Clients like cpas scale some clocks like slow_ahb, fast_ahb
through vote level based on other hw's src clk freq while
the actual src clock (camnoc) is calculated and set directly
through set_src_clk API. This will overwrite freq of camnoc_axi
with the same level as AHB when ahb clocks are set. Do not
set src clk rate while setting rate for other clocks using level.
CRs-Fixed: 2793673
Change-Id: I5538a5cebf4e47c407a2bf9778136500b1162b4a
Signed-off-by: Pavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
Flash operation is currently being done at EPOCH timeframe. In order
to support flash operation at EPOCH extra frame needs to skip to avoid
partial lit on previous request. Moving flash operation to EOF saves
one frame and also give more stability to perform the operation with
higher stablility with removing partial lit. This change gives flash
hardware extra time to perform the operation for turn on/off the flash
hardware.
CRs-Fixed: 2795719
Change-Id: I08b82527006d8a9c81c5a5be0768705051cbd3f1
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
shared-pinctrl-gpios and shared-gpios needs to rename with gpios-shared
and gpios-shared-pinctrl to avoid the predefined format of base kernel
dtsi parsing string. Due to this there is a probe sequence delay happening
and as it is hitting the boottime KPI badly.
CRs-Fixed: 2804449
Change-Id: I26a0149ba1abb89b52750fb069e064642ca446f5
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Currently power down is not happening in case of cci_init failure.
This can lead to corruption for the next power up, as power down
did not happen for the previous session. This change does power down
in case of cci failure and as a part of that it can power up resources
correctly in next session.
CRs-Fixed: 2797857
Change-Id: I9089222cb45834ae895903a4a3e21dd799beb3ed
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
msm: camera: cdm: Fix dangling pointer issue
msm: camera: cdm: change work record to atomic variable
msm: camera: utils: Adding device type to track device handles
msm: camera: tfe: Reduce stack footprint during bw vote
msm: camera: req_mgr: Thread switch delay detection mechanisms
msm: camera: cdm: Avoid submitting BL if FIFO is full
msm: camera: tfe: check cdm hang in the tfe config timeout
msm: camera: req_mgr: Delay detection mechanism
msm: camera: cdm: Debug info in case of cdm page fault
msm: camera: isp: Max context reduction for TFE in isp driver
msm: camera: ope: Maintain current clock value during acquire
msm: camera: req_mgr: Limit CAM_ERR log in case of no empty task
msm: camera: cdm: Decrement write-count only after Bl commit
msm: camera: isp: Added CSID recovery mechanism.
CRs-Fixed: 2792394
Change-Id: I1c7a903ae15b572acf3f6318cda7394cb6549c8d
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
- Make CSIPHY 1.2.4 clock selection logic dynamic in order
to utilize the LOWSVS corner.
- Fix is_divisor_32_comp values for all PHY versions.
CRs-Fixed: 2792275
Change-Id: I66a12fe6f0e01d1a649559b9ebffff5a7c9308d5
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
If MP limit fuse feature is enabled in DTSI then
read the fuse register to get information about maximum
allowed resolution. According to that restrict CSID acquire.
Also if only DTSI based max_width is enabled then restrict acquire
with maximum allowed width.
CRs-Fixed: 2785460
Depends-on: 3349044
Change-Id: If861289aebe2921183276780a086dfa1b1d5f372
Signed-off-by: Wyes Karny <wkarny@codeaurora.org>
During first CCI HW initialization, CCI HW global reset has to be called.
CRs-Fixed: 2782553
Change-Id: Ifc02f512859932636c79b0bfed1f60e7c0626cee
Signed-off-by: Anil Kumar Kanakanti <akanakan@codeaurora.org>
Currently pinctrl is handled together regardless of pinctrl
is requested for the active/suspend state. This change adds
the per pinctrl handling when pinctrl gpio is shared among
multiple slaves. Also remove mclk specific logic as this
change will handle it at gpio/pinctrl level.
CRs-Fixed: 2758167
Change-Id: I4fa028d3eee80e056a74324a420c08967cbf6c5f
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
During first CCI HW initialization, CCI HW global reset has to be called.
Removed is_initialized removed, as it can be controlled through
master_active_slave ref count to verify there is any active slave or not.
CRs-Fixed: 2782553
Change-Id: Id845bfc936b976e160231ed3a0acbc951c32ad7f
Signed-off-by: Anil Kumar Kanakanti <akanakan@codeaurora.org>
Remove following unused CCI and CPHY flags.
CRs-Fixed: 2709537
Change-Id: I7a936733da75c71877ae52cfae9ddd358775c305
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
CCI register dump is only enable when dump flag is defined. Remove
this flag and add control via debugfs entry. This change helps
debugfs entry to control cci device individually on the fly for
debugging rather than to rebuild.
CRs-Fixed: 2692379
Change-Id: Ic13dc903e861e7c49bf3b375a66b96bfbe5d9c70
Signed-off-by: shiwgupt <shiwgupt@codeaurora.org>
Currently config counter is being maintained at improper places
as it is increment at configuration parser and decrease at release
dev IOCTL. There are usecase where configuration can come multiple
times without release dev IOCTL being called, in this case config
counter will be out of sync with operation. Also, config counter
is not being use anywhere in any decision making. This change removes
config counter attributes to reduce the future maintenance and better
code readabiltiy. Also, acquire count is correct check to make decision
whether all device are release or not and with that reason update
correct check in release dev IOCTL.
CRs-Fixed: 2759031
Change-Id: Id0f36bc661ef1ae8070cc8d4fc148409c13e30bc
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Request id is having uint64 type from request manager, but sensor
driver is handling it with int64. This may cause the out of bound
access while accessing the data. This change corrects the data
type to handle data correctly.
CRs-Fixed: 2759031
Change-Id: I607ea3c123a7b050403e18f7f1bac2a23e1e585f
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Currently per frame array is not getting filled up with NOP packet
settings and as a part of that delete request is picking up wrong
request to get delete. This change fill the request id to the
correct per frame array index for NOP and Update packet.
CRs-Fixed: 2759031
Change-Id: I5ff96851adccc81a8a527d2a5f5b3f8763ebd80f
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Currently settle count is programmed from hardware register data value
metioned in bring up sequence. It is more reliable and suitable to
program the value coming from userspace as that value is more accurate
with respect to sensor specific datarate. This change add logic to
accomplish that operation.
CRs-Fixed: 2759031
Change-Id: I87215b206632d15e2d51d6383345d2ffa16b6b9f
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Currently any slave can call pinctrl api for res_mgr which may
lead in corruption of pinctrl state. This change identify whether
slave is resposible for the shared pinctrl access by searching/matching
the gpio defined under res_mgr dtsi. Also remove post_init pinctrl as
this functionality is not used anymore. This can help to avoid the
unnecessary calls to the res_mgr which can avoid mutex operations to
imporve the performance.
CRs-Fixed: 2758167
Change-Id: Id0e863ae00eeef6c3877f02d34878c131695a604
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Holi target uses 8 bit per phy register format for secure camera
usecases. This change takes care of the secure phy bit mask formation
specific to holi target.
CRs-Fixed: 2757195
Change-Id: Ibe33b7619b484fd6e64d958ce01cba8fb0e72d3b
Signed-off-by: Tony Lijo Jose <tjose@codeaurora.org>
Update register pragramming sequence to account for signal skew calibration
for DPHY single and combo mode for per lane data rates higher than 1.5 Gbps
for CSIPHY1.2.3 and CSIPHY 2.1.0. Also, move settle time register update in
data specific table, as settle time is pre calculated based on datarate and
need to configure accordingly.
CRs-fixed: 2697576
Change-Id: I428d8d14887aa54ff22d727f80ee4a395be76baf
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
-Add mipi flags mask to phy cmd buffer.
-Enable skew calibration settings only if the
corresponding flag is set.
CRs-fixed: 2697576
Change-Id: I0353e57daf49ce15d7573b57dbaa9363dbc59635
Signed-off-by: Shravan Nevatia <snevatia@codeaurora.org>
Add support to read OIS lens position data and
current Qtimer value.
Add support to write qtimer time stamp to OIS FW.
CRs-Fixed: 2721489
Change-Id: I7a4f4d342ff41c72db892ea706d0cfd6d667d96d
Signed-off-by: Sureshnaidu Laveti <lsuresh@codeaurora.org>