Commit Graph

362 Commits

Author SHA1 Message Date
Rishab Garg
5a75aa8dea msm: camera: sensor: Dynamically vote for tpg src clock
Select the clock corner of tpg source clock based on the input clock
received in the globalconfig command.

CRs-Fixed: 3164948
Change-Id: Ib945e0f82790d3a33ac5028850ef55a806c84784
Signed-off-by: Rishab Garg <quic_rishabg@quicinc.com>
2022-04-05 21:36:47 -07:00
Jigar Agrawal
4767d2ccb1 msm: camera: csiphy: Add support for SM8650
Add bring up sequence header and driver support
for SM8650.

CRs-Fixed: 3149299
Change-Id: I072f3dd57f99c1625f58e90711e6908e6e97efe9
Signed-off-by: Jigar Agrawal <quic_jigar@quicinc.com>
2022-03-31 17:36:26 -07:00
Jigar Agrawal
f8d9ddc7a4 msm: camera: csiphy: Add support for multiple AON Cameras
Add support for more than one AON cameras for SM8650 target.

CRs-Fixed: 3149294
Change-Id: I842317ab59812109785a026fd0f728baf837b27f
Signed-off-by: Jigar Agrawal <quic_jigar@quicinc.com>
2022-03-31 17:36:11 -07:00
Joshua Florez
6d780a38e4 msm: camera: sensor: Fix cci core error log
Fix error log in cci core so arguments match formatter.

CRs-Fixed: 3127448
Change-Id: I0af1121349868fc9b543a48d95429d267ab2cf26
Signed-off-by: Joshua Florez <quic_jflorez@quicinc.com>
2022-03-24 18:36:39 -07:00
Stark Lin
5953bec5c2 msm: camera: sensor: Add support to write sensor registers in probe
Few sensors needs to unlock register bank for reading
sensor ID from sensor register for probe. And this change
adds support to write sensor registers in probe cmd just
after power on and before reading the sensor ID.

CRs-Fixed: 3111822
Change-Id: Iee2e6bd0ba896a0a2d0c4cc23fe272ba4aae3ab2
Signed-off-by: Stark Lin <quic_starlin@quicinc.com>
2022-03-03 14:31:39 -08:00
Depeng Shao
4b560cae54 msm: camera: sensor: Don't print CCI error log during probing
Since the CCI error isn't fatal error during probing sensor,
so we can just print an info log for the CCI error.

CRs-Fixed: 3118450
Change-Id: Ie980c9eb37e410b07c434a7a304ab1c18925319b
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
2022-03-03 14:31:39 -08:00
Jigar Agrawal
cebdc84875 msm: camera: common: Add support to update auxiliary settings
On CSID encountering a fatal rx error, notify phy to update it's
aux settings for the given data rate when it streams on the
next time. The phy device will book keep all the data
rates that need updated aux settings and on all the
occasions they are streamed on the updated aux settings will
be configured. This is supported for all data rates
from 1.2 - 2.35 GSpS. The change also adds a debugfs in phy driver
to disable aux settings update altogether.

CRs-Fixed: 3120043
Change-Id: Ia1ea3b9278c2eb918a527ee3d7b1ecfe53c4f2c2
Signed-off-by: Jigar Agrawal <quic_jigar@quicinc.com>
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2022-03-03 14:26:54 -08:00
Jigar Agrawal
eb511bb3f5 msm: camera: common: Fix the CPAS Calls
Fix the CPAS Start and CPAS stop call sequence
for the Sensor power up. Also, only start and stop
the CPAS when we really want to write to the
AON-Main Camera Mux register.

CRs-Fixed: 3134267
Change-Id: If73ddc838d59a71f0e6cd21d390c7e603c42b2d6
Signed-off-by: Jigar Agrawal <quic_jigar@quicinc.com>
2022-02-24 22:33:13 -08:00
Pavan Kumar Chilamkurthi
83b1ffe863 msm: camera: tpg: call soc disable resources in shutdown
Without this, tpg is keeping refCount on titan top gdsc and
thus causing qchannel handshake side effects.
Sequence:
1. TPG calls cpas_start, increments refCount on gdsc with
   soc_enable_resources
2. run usecase
3. TPG missing disable_soc_resource
4. TPG calling cpas_stop : which shuts down qchannel
5. When next iteration starts, because gdsc is still on from
   previous session, cpas top is not getting reset state
   registers - thus keeping qchannel still in shut down state.
   qchannel goes to good state if gdsc is actually turned off
   and then turned on.

CRs-Fixed: 3131613
Change-Id: Iacb837f7ee3fd7d6b094d0271d0f2d9c15f0b306
Signed-off-by: Pavan Kumar Chilamkurthi <quic_pchilamk@quicinc.com>
2022-02-24 22:33:13 -08:00
Jigar Agrawal
bfbdc29297 msm: camera: sensor: Move main/aon selection in power operation
Currently main/aon control operation is getting trigger explicitly
from probe control with the reason that Probe IOCTL is exclusive to
sensor core. This operation is required for making sure to get the
control to hlos before reading slave id. Further post probe operation
main/aon control selection is managed by csiphy driver at the time of
acquire and release ioctl call. This will block the main camera
operation after probe ioctl successful and before csiphy acquire ioctl
call. There are some usecase where sensor needs to perform several
operation independently. To add this support moving the main/aon
selection call from probe only ioctl operation to power_up/down call
flow. This call is made upon when it is required to operate on sensor.
This change will help to give AON sensor more flexibility to perform
independently. Further CSIPHY also have the same selection process
in it's acquire ioctl operation which can help to make the hlos end
selection in combo mode scenario.

CRs-Fixed: 3084672
Change-Id: Ic1c6ad41e35605a2291e7e50ff0fe94a0ab30624
Signed-off-by: Jigarkumar Zala <quic_jzala@quicinc.com>
Signed-off-by: Jigar Agrawal <quic_jigar@quicinc.com>
2022-02-16 17:06:19 -08:00
Jigar Agrawal
ad04683cb1 msm: camera: csiphy: Update the csiphy bring up sequence
Update the csiphy header 2.1.2 with the new bring up
sequence revision 11.

CRs-Fixed: 3127494
Change-Id: I9a3579ecd2fc2274cf9913af0ef054cc62343b0e
Signed-off-by: Jigar Agrawal <quic_jigar@quicinc.com>
2022-02-14 20:06:44 -08:00
Jigar Agrawal
97380c4614 msm: camera: csiphy: Remove lane specific configuration
Currently lane specific general register programming is structured
with lane index basis. This is not required as general register
needs to program without any condition. This change updates structure
of this programming register. Also, array size calculation is replace
with more intutive way rather to manually enter the size everytime.

CRs-Fixed: 3117726
Change-Id: I5e57f37bf2025b37f23c10b835fd31ddfe986cee
Signed-off-by: Jigarkumar Zala <quic_jzala@quicinc.com>
Signed-off-by: Jigar Agrawal <quic_jigar@quicinc.com>
2022-02-02 22:36:40 -08:00
Jigar Agrawal
17dd74fd32 msm: camera: csiphy: Add lane enable register capability
Add and handle lane enable register offset programming independent
than common control register array.

CRs-Fixed: 3117726
Change-Id: I7a9cfe41cb425143bf2be6c48de47dfb5e117aae
Signed-off-by: Jigarkumar Zala <quic_jzala@quicinc.com>
Signed-off-by: Jigar Agrawal <quic_jigar@quicinc.com>
2022-01-28 19:06:08 -08:00
Jigar Agrawal
e88df2b339 msm: camera: csiphy: Fix the version check for CP mask
To configure CP mask correct version check needs to be
used against CPAS hw version. Currently csiphy driver
is checking platform version to make the decision.
This change update this check with CPAS hw version check.

CRs-Fixed: 3048249
Change-Id: Id023f5cc0252b47c274dfed9d93e7f49a3d0ab49
Signed-off-by: Jigarkumar Zala <quic_jzala@quicinc.com>
Signed-off-by: Jigar Agrawal <quic_jigar@quicinc.com>
2022-01-27 19:36:23 -08:00
Wang Kan
df174ddd8a msm: camera: common: logging improvement
After flushed, KMD reports ERR including isp, actuator, sensor, flash.
However many CRs don't have fatal KMD error log, but participant is KMD.
Remove the non-fatal KMD error log.

CRs-Fixed: 3095401
Change-Id: I0e5e370c0c4d1daceb72d9eed8d0c45baad5179e
Signed-off-by: Wang Kan <quic_wkan@quicinc.com>
2022-01-27 19:36:09 -08:00
Rishab Garg
e79f7727a3 msm: camera: sensor: Add IR/XCFA/SHDR overlapped for TPG0
Kailua tpg has some extra register for ir/xcfa/shdr overlapped.
These register data support is added as part of this change.

CRs-Fixed: 3086082
Change-Id: If044b336a87de931f6d512c52895e65c85d10863
Signed-off-by: Rishab Garg <quic_rishabg@quicinc.com>
2022-01-19 16:06:29 -08:00
Rishab Garg
31a3e23afc msm: camera: sensor: Add 2PD support for TPG0
Add interleaving format to support 2PD for tpg0.

CRs-Fixed: 3100297
Change-Id: Ic59c4cec0990faa3d70f45aa34baebaa33e08b2b
Signed-off-by: Rishab Garg <quic_rishabg@quicinc.com>
2022-01-19 13:31:20 -08:00
Haritha Chintalapati
124c3cf6ed Merge "msm: camera: common: create a common root folder for debugfs" into camera-kernel.lnx.6.0 2022-01-04 19:02:17 -08:00
Camera Software Integration
bf5c84ec66 Merge "msm: camera: common: Add level in priority list for shutdown" into camera-kernel.lnx.6.0 2021-12-23 15:56:46 -08:00
Anand Ravi
cbe499e9eb msm: camera: common: create a common root folder for debugfs
Create common root folder under debugfs root named camera at probe. Add
utility functions to create subdirectories under the common camera root.

CRs-Fixed: 3093049
Change-Id: Ia4cefb5d2263ecabf1b9d70deefa1ee624b04f07
Signed-off-by: Anand Ravi <quic_ananravi@quicinc.com>
2021-12-22 16:43:42 -08:00
Camera Software Integration
d123d73bc2 Merge "msm: camera: sensor: enable the compilation for flash" into camera-kernel.lnx.6.0 2021-12-22 14:42:33 -08:00
Depeng Shao
425e0a8142 msm: camera: sensor: enable the compilation for flash
This change enables the compilation for flash even
though there is no pmic flash support, since the i2c
flash still needs the flash framework.

CRs-Fixed: 3095773
Change-Id: I220a38dce1cbc829e446a65c61b7b7eb6b3a1c5b
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
2021-12-20 04:49:10 -08:00
Jigarkumar Zala
6a520c5dfa msm: camera: csiphy: Add Hardware register support for Kailua
Add new header version 2_1_2 to support CSIPHY hardware register
programming for Kailua align with version 6.0.

CRs-Fixed: 3048249
Change-Id: I59215d07247a2476ebb39f889fb90ecce4e17be0
Signed-off-by: Jigarkumar Zala <quic_jzala@quicinc.com>
2021-12-16 09:56:50 -08:00
Jigarkumar Zala
388718b394 msm: camera: common: Add level in priority list for shutdown
Currently sensor and csiphy has the same priority in shutdown
sequence. This is sometime calls sensor shutdown before csiphy
and with the AON usecase it is failing with CPAS related operation.
This change introducing the new enum entry for the Medium_low, which
make sure the csiphy shutdown gets call before the sensor shutdown
in order to make the operation in align with cross modules.

CRs-Fixed: 3084672
Change-Id: I40f495151392f96ac89caf8df852ed8326b79d9b
Signed-off-by: Jigarkumar Zala <quic_jzala@quicinc.com>
2021-12-15 10:56:58 -08:00
Karthik Anantha Ram
d4b9fa4158 msm: camera: sensor: Change return code when rejecting packet
When rejecting request that is flushed, return invalid error
desc as opposed to invalid argument.

CRs-Fixed: 3079337
Change-Id: I25ba7c3a9ae62958687a3c2fa69f530397596d0b
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
2021-12-08 10:10:27 -08:00
Camera Software Integration
cee27952bd Merge "msm: camera: csiphy: update phy hw reg vers 2.1.3" into camera-kernel.lnx.5.0 2021-12-03 03:28:44 -08:00
Camera Software Integration
903a8b596d Merge "msm: camera: sensor: Add component support for i2c driver" into camera-kernel.lnx.5.0 2021-12-03 03:25:50 -08:00
Camera Software Integration
4109d556c1 Merge "msm: camera: flash: Correct log location" into camera-kernel.lnx.5.0 2021-11-30 21:57:26 -08:00
Camera Software Integration
aaa386c25a Merge "msm: camera: csiphy: Enhance csiphy logs" into camera-kernel.lnx.5.0 2021-11-30 21:57:09 -08:00
Rajat Goel
fe414f6367 msm: camera: csiphy: update phy hw reg vers 2.1.3
update phy hw reg 2.1.3 as per latest HPG rev 3.0.

CRs-Fixed: 3084120
Change-Id: I4dd8216c3136b1caddfdbea836d376869d0274b5
Signed-off-by: Rajat Goel <quic_rajgoe@quicinc.com>
2021-11-30 15:58:31 +05:30
Depeng Shao
d8d3eaa882 msm: camera: sensor: Add component support for i2c driver
Sometimes, i2c driver will be probed earlier than CRM
driver ready, then we can't register the subdev for
this i2c driver. This change adds the component support
for i2c driver.

CRs-Fixed: 3073284
Change-Id: I5ee176497a667729d964758ac0909f6902877094
Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
2021-11-27 07:22:51 -08:00
Camera Software Integration
c385cf2ecc Merge "msm: camera: sensor: Add support for CSIPHY fuse" into camera-kernel.lnx.5.0 2021-11-24 19:56:13 -08:00
Jigarkumar Zala
1a2540f2f4 msm: camera: flash: Correct log location
Flash acquire logs with device handle is getting printed at wrong
place. This change move acquire logging after succesful acquire
of flash hw.

CRs-Fixed: 3048249
Change-Id: Ibe5071c963faad87585e7ead74e4e41de0d2ddd4
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-11-12 15:18:32 -08:00
Savita Patted
b502e34473 Merge "msm: camera: sensor: Add support for CSIPHY 2.1.3" into camera-kernel.lnx.5.0 2021-11-11 18:37:08 -08:00
Shravan Nevatia
d841951985 msm: camera: sensor: Add support for CSIPHY fuse
Add support to disable the 5th CSIPHY based on
the CSIPHY SW fuse register bit.

Change-Id: Iae9dd7df0c0277eb48a258c91502390d042c9c43
CRs-Fixed: 3071805
Signed-off-by: Shravan Nevatia <quic_snevatia@quicinc.com>
2021-11-10 02:50:39 -08:00
Savita Patted
258defb7e2 Merge "msm: camera: flash: Add support for qup i2c flash" into camera-kernel.lnx.5.0 2021-11-09 11:29:28 -08:00
Savita Patted
d8b7b5f0a9 Merge "msm: camera: sensor: Add support for CSIPHY TPG 1.2" into camera-kernel.lnx.5.0 2021-11-05 18:48:25 -07:00
Jigar Agrawal
5227eac24e msm: camera: csiphy: Enhance csiphy logs
Add csiphy_type in csiphy logs for better
debugging.

CRs-fixed: 3065435
Change-Id: I19c8154351e44946c14a4c94dd90d3b507a69cc8
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-11-05 13:03:47 -07:00
Anil Kumar Kanakanti
510d709990 msm: camera: sensor: Add support for CSIPHY 2.1.3
Add support for new CSIPHY HW version 2.1.3.

Change-Id: I22e3658acc9a002e4323c0487e65f5ae0a495d6d
CRs-Fixed: 3068540
Signed-off-by: Anil Kumar Kanakanti <quic_akanakan@quicinc.com>
2021-11-05 17:35:24 +05:30
Vishal Verma
3e99c3fee7 msm: camera: flash: Add support for qup i2c flash
Add Support for qup i2c based flash. Update i2c
driver probe function and added regulator init at
power up and init for gpio pin control table. Since
positive return values are not errors for qup i2c rx
and tx data transfer, fix the return type for the APIs.
Added check for null pointer in get flash dt data for
device node. Correct the logging group in sensor util
for regulator power up function.

CRs-Fixed: 3047031
Change-Id: I70558fbb489b622da25278283015139b6d4fe2a6
Signed-off-by: Vishal Verma <vishverm@codeaurora.org>
2021-11-03 00:17:51 +05:30
Shravan Nevatia
5930b6dffa msm: camera: sensor: Add support for CSIPHY TPG 1.2
Add KMD driver support for CSIPHY TPG version 1.2.

CRs-Fixed: 3065086
Change-Id: I4236a8550ebb2c27f4231f963d283bc0a6f28005
Signed-off-by: Shravan Nevatia <quic_snevatia@quicinc.com>
2021-11-02 14:14:01 +05:30
Shravan Nevatia
8c0dbac21e msm: camera: sensor: Add support for CSIPHY 2.1.1
Add support for new CSIPHY HW version 2.1.1.

Change-Id: I003e16c9022de7591b2a3d64e5f5788e8ff21874
CRs-Fixed: 3065086
Signed-off-by: Shravan Nevatia <quic_snevatia@quicinc.com>
2021-11-01 20:18:52 -07:00
Jigarkumar Zala
218814c4de msm: camera: sensor: Remove NULL set for regulator phandle
Regulator_get is being moved with probe time for opertional
performance improvement. With this change regualtor phandle can
only be derive at power cycle. In case of power_on/down failure case
currently regulator phandle is set with NULL which can cause
failure in power related operation in all future sessions. This change
removes NULL setting to regulator phandle in failure case.

CRs-Fixed: 3052638
Change-Id: I4abec311416e852bbe1922024b05755e2b3a3d25
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-10-22 19:14:09 -07:00
Jigarkumar Zala
51cd1a4e0c msm: camera: csiphy: Add proper check for combo mode
Currently in combo mode csiphy preamable enable is determined with
premalbe flag set previously and current sensor configuration setting.
In case of non combo mode usecase if config packet is coming back to
back current condition check misinterpret it as combo mode and fails
with incorrect operation. This change adds the combo_mode condition
check along with other to correctly detemine combo mode and non combo
mode usecase and behaves accordingly.

CRs-Fixed: 3054225
Change-Id: I59532405230ab23dfd42425f20bd1a108cc8ce14
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-10-19 15:49:43 -07:00
Camera Software Integration
7908b9520e Merge "msm: camera: csiphy: Update the csiphy bringup sequence" into camera-kernel.lnx.5.0 2021-10-18 16:43:25 -07:00
Camera Software Integration
ad7e6fe867 Merge "msm: camera: csiphy: Enable PN9 infinite loop for test" into camera-kernel.lnx.5.0 2021-10-14 16:56:12 -07:00
Camera Software Integration
c469b0db2d Merge "msm: camera: common: Make msg_cb for cam_subdev generic" into camera-kernel.lnx.5.0 2021-10-14 16:55:23 -07:00
Jigar Agrawal
f75337c991 msm: camera: csiphy: Update the csiphy bringup sequence
Update 1.2Gsps datarate specific sequence to improve the
csiphy response and add margin for the boards with larger
insertion loss. New setting adds robustness to the csiphy
operation.

CRs-Fixed: 3042875
Change-Id: I6e93d35a6a026613eb6879f07759acef05e31794
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
2021-10-13 17:03:09 -07:00
Jigarkumar Zala
daead670e6 msm: camera: csiphy: Enable PN9 infinite loop for test
Enable PN9 infinite loop for test. Also move the PN9 status
check from polling to one time read at streamoff.

CRs-Fixed: 3054225
Change-Id: Ia4d8ff17e3c78f37adb68ad9a4afb076fe2bda45
Signed-off-by: Jigarkumar Zala <jzala@codeaurora.org>
2021-10-13 12:13:33 -07:00
Camera Software Integration
be297775bc Merge "msm: camera: csiphy: Extend CSIPHY hw block support" into camera-kernel.lnx.5.0 2021-10-06 17:41:14 -07:00