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>
In case if the CPAS registration is failed before freeing the
memory of the subdev, subdev need to be unregistered so that
subdev list entry will not become NULL and other subdev can
be added.
CRs-Fixed: 2708016
Change-Id: I464c73411596fc562fc7a190ddfa130f23ee487a
Signed-off-by: Tejas Prajapati <tpraja@codeaurora.org>
CRM may give an invalid request id to sensor when the
first req isn't ready, since we don't have chance to
update prev_apply_data in CRM. This change adds a
protection in sensor side to only handle the valid
request for per frame update.
CRs-Fixed: 2738404
Change-Id: Ic43d68a69c10b7b063b40a0cef17e55e748b8b2a
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
Implement PHY settings as per HPG version File name
CRs-Fixed: 2736884
Change-Id: I01949090448d9f8ff691e40ca38a800dbc15f9d5
Signed-off-by: Tony Lijo Jose <tjose@codeaurora.org>
Currently proper error handling is not present in case of failure
in adding request to request manager. This change adding proper
result send out to UMD.
CRs-Fixed: 2738448
Change-Id: I7fb54c085ac670c197523e4d7cb416eeb414a2ed
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
As a part of interrupt status dump, it needs details for number
of register to be read. This change fill the interrupt size
variable to do the correct operation.
CRs-Fixed: 2729624
Change-Id: I9ee97e5a6c495062753fbd0ed44a178908c5109b
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
Reinit completion rd_done completion variable before each read so that
the rd_done completion variable state will be clean .
CRs-Fixed: 2736884
Change-Id: I2cd7350da8e8270c1cd9238dec0eec9f84360899
Signed-off-by: Tony Lijo Jose <tjose@codeaurora.org>
The queue size of cci hw version 1.2.9 is 64 and 16. Due to wrong
conditional check the cci queue size is assigned wrongly for cci version
1.2.9. This change corrects the cci queue size for cci version 1.2.9.
CRs-Fixed: 2736884
Change-Id: I60508fadec89831f3b877d64631b7da6304c030d
Signed-off-by: Tony Lijo Jose <tjose@codeaurora.org>
Add logic to dynamically lane configuration for the CPHY combo
mode, where individual sensor can configure with different datarate
by configuring the respective lanes at the time of configuration.
CRs-Fixed: 2729624
Change-Id: Ie3714f9fd5d24c6cea8824f3a9dd9dc7f6f6d976
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
This change adds support to notify frame skip when CRM
not ready to apply a normal setting. Sensor and custom
device also want to update the HW settings in some
conditions even if a frame is skipped.
CRs-Fixed: 2691642
Change-Id: Ibd2b22655d0f6b6c90663df75a0f5fad8565e918
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
Add support for new CSIPHY version 2.1.0. Add hw
register file for CSIPHY 2.1.0.
CRs-Fixed: 2724449
Change-Id: Id3f21b4f60e807ca6fef762f0c6da193ae78e099
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
Currently lane enablement is happening as a part of lanemask
field, which is send by UMD. Lane enablement should be purely
depends on laneCnt and laneAssign attributes. Also, combo mode
sensors needs to come with combo mode flag set from the UMD.
This change updates the logic for lane enablement with respect
to laneAssign and laneCnt, and also covers all combomode selection
as per the request. This change also enables the sensors to acquire
and streamon/streamoff at anytime in session.
CRs-Fixed: 2677450
Change-Id: I4f0d3ffd7245a931c273611c9c4b7e503c038664
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>