Commit Graph

1093987 Commits

Author SHA1 Message Date
Subbaraman Narayanamurthy
7ad32f5546 iio: adc: qcom-spmi-adc5-gen3: Remove adc5_prescaling_from_dt()
adc5_prescaling_from_dt() is not needed as that is replaced with
qcom_adc5_prescaling_from_dt() in qcom-vadc-common.c. Since
adc5_prescale_ratios[] is also used from qcom-vadc-common.c and
not needed in qcom-spmi-adc5-gen3.c, remove it.

With the above change, adc5_chans_pmic[] needs to be updated with
the right indices. Update it.

Change-Id: Ibeb8ef6d9436ae448aadc9a99e5d0ef69767ac47
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
[quic_collinsd@quicinc.com: fixed minor merge conflict]
Signed-off-by: David Collins <quic_collinsd@quicinc.com>
2022-06-01 17:34:30 -07:00
Subbaraman Narayanamurthy
48efaf8e96 iio: adc: qcom-spmi-adc5-gen3: Fix some indentation
Fix the indentation to keep it uniform and readable.

Change-Id: I73da8941c72857a9f63dca3e8085873413b3a1f2
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
2022-06-01 17:33:43 -07:00
Anjelique Melendez
0801e19f08 dt-bindings: iio: Correct PM8550B ADC channel names
Typo found in two of PM8550B ADC channel names. Fix them.

Change-Id: I3e69402f3837cb6e29d84ea1ddb789801c72ec2f
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
2022-06-01 17:33:43 -07:00
Anjelique Melendez
1d56dd15cb iio: adc: qcom-spmi-adc5-gen3: Fix interrupt handler returns
Currently, the adc5 gen3 interrupt handler always returns IRQ_HANDLED.
Fix the handler so that on errors IRQ_NONE is returned.

Change-Id: I2ccebb985c81ad9de57b829b469ec8e58437f9e9
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
2022-06-01 17:33:42 -07:00
Anjelique Melendez
f394355bf8 dt-bindings: iio: Add ADC5 GEN3 Channel info for Kalama PMICs
Add the ADC5 GEN3 channels used by PMK8550, PM8550 and PM8550B.

Change-Id: I0a52446634dfa2108e1b3f2c0e990610138340b9
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
2022-06-01 17:33:42 -07:00
Anjelique Melendez
94067cd605 iio: adc: qcom-spmi-adc5-gen3: Add support for multiple SDAMs
Currently, ADC5 GEN3 driver allows up to 8 channels. In Kalama up to 16
channels can be configured over 2 SDAMS. Update member variables,
interrupt handling and read and write functions so that driver can handle
2 or more SDAMS.

Change-Id: I2d65d9a420092db98cdbf27bba5188700c46fd0a
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
2022-06-01 17:33:42 -07:00
Anjelique Melendez
ef18fb11e3 iio: adc: qcom-spmi-adc5-gen3: Update max channels
Currently, ADC5 GEN3 driver allows up to 8 channels. In Kalama up to 16
channels can be configured over 2 SDAMs. Dynamically set max_channels
based on number of registers(SDAMs) specified.

Change-Id: I789b142306dfb0099d955f9e166c17b331a47517
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
2022-06-01 17:33:42 -07:00
Anjelique Melendez
0d427cfc41 iio: adc: qcom-spmi-adc5-gen3: Add support for qcom,debug-base
Currently, the debug base address is defined under the reg property. This
would be confusing if multiple addresses are specified under reg property
to support more ADC channels. Separate debug base into its own property.

Change-Id: Id96621bafd85bde0e601a89849aef7f094f53bf9
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
2022-06-01 17:33:42 -07:00
Anjelique Melendez
4a630f55ec iio: adc: qcom-spmi-adc5-gen3: Fix calls to qcom_adc5_hw_scale()
Currently, calls to qcom_adc5_hw_scale() are passing in a prescale pointer.
The qcom_adc5_hw_scale() function signature asks for the prescale int and
interanally will get the prescale pointer. Fix this.

Change-Id: I4cf630cf47f0b69678b69aecd5058e510bde6b3c
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
2022-06-01 17:33:42 -07:00
Subbaraman Narayanamurthy
22fcbb9e51 iio: adc: qcom-spmi-adc5-gen3: Fix driver name
Fix the typo for driver name.

Change-Id: Ie65784e7c2920b7bdb61213524bbddb462d271be
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
2022-06-01 17:33:39 -07:00
Jishnu Prakash
3a2a5ea5ee iio: qcom-spmi-adc5-gen3 : add support to clear conversion fault
When an ADC conversion results in a conversion fault, the
conversion fault bit in the status register is set, but never
cleared, by PBS, causing an error print for conversion fault
to appear for all future conversions. Update interrupt handler
to clear conversion fault bit if it is found set.

Change-Id: I83b36ce585ab5d20639dbf5050f91e8850cc2b75
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2022-06-01 17:30:42 -07:00
Jishnu Prakash
7722611a92 iio: qcom-spmi-adc5: Add support for SW calibrated ADC
Add support for reading ADC channels on a PMIC7 ADC directly from
the ADC_PBS peripheral on that PMIC instead of through PMK8350
ADC peripheral using PBS, for targets where PMK8350 does not run in
master mode.

The conversion request sequence for using ADC_PBS is similar to
the existing one for ADC7, with some differences in register
writes. In addition, SW now performs calibration in place of PBS,
for every conversion, by reading the three calibration channels,
calculating the reference values and entering them in the
calibration registers.

Change-Id: I9e47ed69e75ee2580a37195ea9063f24ffb8aac5
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
[quic_subbaram@quicinc.com: Fixed merge conflicts and modified
 to compile with upstream driver version.]
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
2022-06-01 17:30:42 -07:00
Rama Krishna Phani A
bb4024cac6 drivers: iio: adc: Add support for suspend to disk
Add support to adc driver for suspend to disk feature.
Free interrupts during hibernation and re-register them during
resume.

Change-Id: I71d2aed51f0697e712db59dcc1ef4af0fa98aae4
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
Signed-off-by: Veera Vegivada <vvegivad@codeaurora.org>
[quic_subbaram@quicinc.com: Fixed merge conflict]
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
2022-06-01 17:30:42 -07:00
Jishnu Prakash
ee48149cfa iio: qcom-spmi-adc5-gen3 : update register dump API
Correct base offset and register read API used in register
dump API called for conversion faults.

Change-Id: I274d40fe29f9f32238b9baa5e42b23d4df64cbf2
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2022-06-01 17:30:42 -07:00
Jishnu Prakash
558f4d2b64 iio: qcom-spmi-adc5-gen3 : Update conversion and IRQ handling logic
Fix timer value for immediate conversion to the right constant
to avoid TM conversions for immediate conversion requests.
Correct TM channel offsets checked from status and data registers
in TM interrupt handler.

Change-Id: I43a9a5cf33d31029fe306e61c4bf2e80966b9b7e
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2022-06-01 17:30:42 -07:00
Jishnu Prakash
50f3f5d30d iio: qcom-spmi-adc5: Update ADC5 Gen3 conversion request logic
1.Remove mutexes used in TM configure API to avoid deadlock.

2.Update register writes in immediate and TM configure APIs.

3.Correct register and bit to check for end of conversion for immediate
conversion in IRQ handler.

Change-Id: I68d0bc4d6aeef089939d0d9ae9161b6122bf110e
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2022-06-01 17:30:41 -07:00
Jishnu Prakash
f8f8647cb8 iio: qcom-spmi-adc5: Update ADC5 Gen3 support for PM5100
Add scaling functions for batt_therm, batt_id and usb_in_i ADC channels
for PM5100. Also add usb_sns_v_div_16 and vin_div_16 channels to list of
supported channels and correct default prescaling value for vbat_sns
channel and full scale ADC current.

Change-Id: I86b86c319bff6df583efab8cc4c877218a79fe56
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
[quic_subbaram@quicinc.com: Fixed merge conflicts in
 qcom-vadc-common.h due to location change and in qcom-vadc-common.c]
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
[quic_collinsd@quicinc.com: changed struct vadc_prescale_ratio to
 struct u32_fract and changed prescale "num" and "den" to
 "numerator" and "denominator" respectively]
Signed-off-by: David Collins <quic_collinsd@quicinc.com>
2022-06-01 17:30:41 -07:00
Jishnu Prakash
56477ca16f dt-bindings: iio: Update support for PM5100 ADC channels
Add scaling function for batt_therm, batt_id and usb_in_i
and update channel macros for PM5100.

Change-Id: I45d6e8b5788276dd939b60034ae7804ca8d1b73a
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
[quic_subbaram@quicinc.com: Fixed trivial merge conflict in
 include/dt-bindings/iio/qcom,spmi-vadc.h]
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
2022-06-01 17:30:41 -07:00
Jishnu Prakash
9d4f6e0a3a iio: adc: Add QCOM SPMI PMIC5 GEN3 ADC driver
Add support for QCOM SPMI PMIC5 GEN3 ADC driver that supports
hardware based offset and gain compensation.
The ADC peripheral can measure both voltage and current
channels whose input signal is connected to the PMIC ADC AMUX.

The PMIC5 GEN3 ADC peripheral uses registers defined in SDAM.
The register set and configuration have been refreshed compared
to the prior QCOM PMIC7 ADC family.

Change-Id: I3512c3c067d9102406aa92c389d66283f0b12103
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
[quic_subbaram@quicinc.com: Fixed merge conflicts in
 qcom-vadc-common.h due to location change; Made changes in
 qcom-vadc-common.c to re-use existing qcom_vadc_map_temp_voltage();
 Added entire include/linux/adc-tm-clients.h as it doesn't exist
 anymore but needed to compile qcom-spmi-adc5-gen3.c and removed
 the APIs used when CONFIG_QTI_ADC_TM is enabled.]
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
[quic_collinsd@quicinc.com: changed struct vadc_prescale_ratio to
 struct u32_fract and changed prescale "num" and "den" to
 "numerator" and "denominator" respectively]
Signed-off-by: David Collins <quic_collinsd@quicinc.com>
2022-06-01 17:30:34 -07:00
Jishnu Prakash
7945098ab3 dt-bindings: iio: Add PMIC5 GEN3 ADC support
Add definitions for ADC channels for PMIC5 GEN3 ADC driver.
Add virtual channel definitions for PM5100, to be used
by ADC clients for PMIC5 GEN3.

Change-Id: I1180553c3ee697f994324c60ebfb4e996221108e
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2022-05-24 17:47:30 -07:00
Jishnu Prakash
9e5e68e310 iio: qcom-spmi-adc5: Add AMUX2_GPIO channel to rev2 channel list
Add ADC5_GPIO2_100K_PU channel to the list of rev2 ADC channels.

Change-Id: I684c4e5124f37345e378fa552cad789d24be6a69
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
2022-05-24 17:47:30 -07:00
Subbaraman Narayanamurthy
fa248b6161 iio: adc: qcom-spmi-adc5: Update ratios for SMB_* channels for ADC7
As per the hardware recommendation, add a ratio of 41/40 (i.e.
numerator 40 and denominator 41 based on how it's used in our
calculations) for the ADC channels that use SMB_TEMP pin because
of the voltage divider circuit with a 1 K and 40 K in parallel.

IIN_FB channel should be using the same ratio as that of IIN_SMB
before. Hence, add a separate scaling factor for it.

Change-Id: I4c3d76a068edf7c964a71c5082da54b115e7eb04
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
[quic_subbaram@quicinc.com: Fixed merge conflicts in qcom-spmi-adc5.c
 because common code moved to qcom-vadc-common.c]
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
[quic_collinsd@quicinc.com: changed prescale "num" and "den"
 to "numerator" and "denominator" respectively]
Signed-off-by: David Collins <quic_collinsd@quicinc.com>
2022-05-24 17:47:30 -07:00
Subbaraman Narayanamurthy
6a3569670e dt-bindings: iio: qcom,spmi-vadc: add ADC_SCALE_* definitions
Some device tree files refers these definitions when
"qcom,scale-fn-type" is specified. Add them.

Change-Id: I559de48eff20666194b01e32320de5c647afccae
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2022-05-24 17:47:30 -07:00
Subbaraman Narayanamurthy
b2a8924fb1 iio: qcom-spmi-adc5: add ADC7_USB_IN_V_16 to adc7_chans_pmic list
Add ADC7_USB_IN_V_16 to adc7_chans_pmic list to support reading
USB VBUS voltage directly from ADC channel if needed during
testing.

Change-Id: Id27cd50c65a549c1361f0b0185afa4048b66423c
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2022-05-24 17:47:29 -07:00
Jishnu Prakash
640fa8d8d9 iio: qcom-spmi-adc5: update scaling ratios for SMB_ICHG and SMB_IIN
Update scaling ratios for SMB_ICHG and SMB_IIN ADC channels, following
HW recommendation. Update default prescaling values used for SMB_IIN
and ICHG_FB channels to match changes made in the prescaling array.

Change-Id: I2b016e021d3c9e8b76cd5400c6790030da088093
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
[quic_subbaram@quicinc.com: Fixed merge conflicts in qcom-spmi-adc5.c
 because common code moved to qcom-vadc-common.c]
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
[quic_collinsd@quicinc.com: changed prescale "num" and "den"
 to "numerator" and "denominator" respectively]
Signed-off-by: David Collins <quic_collinsd@quicinc.com>
2022-05-24 17:47:29 -07:00
Shyam Kumar Thella
a0fc6a0c06 iio: qcom-spmi-adc5: Fix HW settle time table naming for ADC5 lite
Correct the hw_settling times array defined for ADC5 lite.

Change-Id: I38eee9b3f76cb40e286f9e7e3fbf296b3f3ccfe5
Signed-off-by: Shyam Kumar Thella <sthella@codeaurora.org>
2022-05-24 17:47:29 -07:00
Subbaraman Narayanamurthy
49a1fd68db iio: adc: qcom-spmi-adc5: add an unique irq name
Currently, interrupts of qcom-spmi-adc5 driver are registered
with name "pm-adc5". However on platforms with multiple PMICs
that can have different ADC types (adc5 or adc7), this naming
is not user friendly when looking at interrupt data. Add a name
that looks unique for different adc types so that they can be
interpreted easily.

Change-Id: Iac1080dc8e02d278b30cff0d61eca40e081bc306
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
[quic_subbaram@quicinc.com: Fixed merge conflicts in
 qcom-vadc-common.h due to location change]
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
2022-05-24 17:47:29 -07:00
Jishnu Prakash
6da5d51aa7 iio: adc: Add support to read ADC5 current channels
Add scaling function required to read PMIC5 current ADC channels
so that channel 0xA5 (ADC5_PARALLEL_ISENSE) can use that.

Change-Id: I55ede0c736c6f350df8ac92ea8661db4129da13c
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
[quic_subbaram@quicinc.com: Fixed merge conflicts in
 qcom-vadc-common.h due to location change]
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
[quic_collinsd@quicinc.com: changed struct vadc_prescale_ratio to
 struct u32_fract and changed prescale "num" and "den" to
 "numerator" and "denominator" respectively]
Signed-off-by: David Collins <quic_collinsd@quicinc.com>
2022-05-24 17:47:29 -07:00
Jishnu Prakash
50f6bca490 iio: adc: spmi-adc5: Add support for PM2250 S3 die temp channel
Add support for reading S3 die_temp channel on PM2250 by
specifying the scaling function.

Change-Id: I1e8fcba0058851a540bc39adc7606d4f0ad8f6db
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
[quic_subbaram@quicinc.com: Fixed merge conflicts in
 qcom-vadc-common.h due to location change]
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
[quic_collinsd@quicinc.com: changed struct vadc_prescale_ratio to
 struct u32_fract and changed prescale "num" and "den" to
 "numerator" and "denominator" respectively]
Signed-off-by: David Collins <quic_collinsd@quicinc.com>
2022-05-24 17:47:29 -07:00
Jishnu Prakash
7aac9f426d iio: adc: Add support to read parallel charger current channel
Add support to read ADC channel 0xA5 for parallel charger
current.

Some PMICs (PMI632) the max supported current is 5A, hence
define a new config data and compatible string for it.

Change-Id: I973dfdf81ee955d322da7e2c328d8b1472d33013
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2022-05-24 17:47:29 -07:00
Subbaraman Narayanamurthy
f90d42fefa iio: qcom-spmi-adc5: add support to read current channels
Add support to read current channels on PM8350B and SMB139x
charge pumps.

IIN_FB - Input current drawn by main charger (PM8350B)
ICHG_FB - Charging current from main charger (PM8350B)
IIN_SMB - Input current drawn by one of SMB139x
ICHG_SMB - Charging current from one of SMB139x

Since, most of these channels needs prescale ratios post reading
ADC code and before scaling, add the necessary prescale ratios.

Change-Id: Id9b866f684d574813904a5fd8e658f59b1d7bcbf
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
[quic_subbaram@quicinc.com: Fixed merge conflicts in
 qcom-vadc-common.h due to location change and common code moved
 to qcom-vadc-common.c]
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
[quic_collinsd@quicinc.com: changed struct vadc_prescale_ratio to
 struct u32_fract and changed prescale "num" and "den" to
 "numerator" and "denominator" respectively]
Signed-off-by: David Collins <quic_collinsd@quicinc.com>
2022-05-24 17:47:20 -07:00
Subbaraman Narayanamurthy
5a34473338 dt-bindings: iio: update pm8350b ADC channel list
Add PM8350B_ADC7_ICHG_FB channel to read charging current for
PM8350B. Also, update qcom,spmi-vadc.h to add ADC7_ICHG_FB and
other relevant channels that are needed for reading input and
charging current for SMB139x charger pumps along with scale
function indices.

Change-Id: I4a1b53f328e1b394063cbf951f6ff978eb96d21e
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
[quic_subbaram@quicinc.com: Fixed trivial merge conflict in
 include/dt-bindings/iio/qcom,spmi-vadc.h and updated copyright]
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
2022-05-24 16:28:35 -07:00
Subbaraman Narayanamurthy
ea56889092 iio: qcom-spmi-adc5: add CHG_TEMP channel for PMIC7
Add support to read CHG_TEMP channel on PM8350B to get charger
temperature.

Change-Id: I33c69e56d47b0ab37772df8d55eae2ab0c5bad86
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
[quic_subbaram@quicinc.com: Fixed trivial merge conflict in
 qcom-vadc-common.h due to location change]
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
[quic_collinsd@quicinc.com: changed struct vadc_prescale_ratio to
 struct u32_fract]
Signed-off-by: David Collins <quic_collinsd@quicinc.com>
2022-05-24 16:28:35 -07:00
Subbaraman Narayanamurthy
dbc9f0e777 iio: qcom-spmi-adc5: add SMB_TEMP channel for PMIC7
Add support to read SMB_TEMP channel on PM8350B that is output by
charge pump (smb139x). When this virtual channel is read for
one of SMB139x charger pumps, PBS does the configuration for that
SMB139x appropriately.

Change-Id: Ia9af1ef78571c56898057d567117fcd9b7d28172
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
[quic_subbaram@quicinc.com: Fixed trivial merge conflict in
 qcom-vadc-common.h due to location change and changes from upstream
 merge]
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
[quic_collinsd@quicinc.com: changed struct vadc_prescale_ratio to
 struct u32_fract]
Signed-off-by: David Collins <quic_collinsd@quicinc.com>
2022-05-24 16:28:35 -07:00
Subbaraman Narayanamurthy
5104aa0d97 iio: qcom-spmi-adc5: Handle EOC properly
Currently, when an ADC7 channel is read, there is a wait time of
10 ms where an EOC (end of conversion) interrupt should happen
thereby completing the wait for ADC conversion. However, if this
wait times out, it is not handled and stale data can be read. Add
error logs to print when this wait times out as well as if EOC
bit is not set and return an error.

Also, this 10 ms wait time for EOC after requesting for a channel
conversion is not sufficient. As per the hardware recommendation
when multiple subsystems requests PMIC HW arbiter to read same
or different channels on different PMICs simultaneously, it could
take 15 ms for a good case i.e. where all the conversion requests
went through successfully. However, for a worst case where this
conversion request times out, it could take up to 500 ms before
an EOC interrupt is sent by PBS to SW. Hence, increase conversion
wait time to 501 ms so that no other channel reads can be made in
the worst case. Also print a warning when the wait time for EOC
is more than 15 ms.

Change-Id: I69eeade3e85f740af10cd7a3d668e67f67f6617d
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2022-05-24 16:28:35 -07:00
Jishnu Prakash
81fe95c85f iio: adc: Correct smb1398 scaling function
Correct scaling function for SMB1398 to ensure
temperature is calculated accurately.

Change-Id: I7ec497ef9d1171da7a08a97730912727c583830a
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
[quic_collinsd@quicinc.com: changed prescale "num" and "den"
 to "numerator" and "denominator" respectively]
Signed-off-by: David Collins <quic_collinsd@quicinc.com>
2022-05-24 16:28:30 -07:00
Jishnu Prakash
2b64262524 iio: adc: Add missing features in PMIC5 ADC
Add the following PMIC5 ADC features:
Update ADC polling time delay for end of conversion (EOC) to match
values on kernel 4.19.
Add missing channels in driver's channel list (bat_therm, bat_id
and some thermistor channels), which may be needed by PMIC5 clients.
Add scaling functions for bat_therm and smb_therm.

Change-Id: I0612560513fbb3f29ff3fda6ad86b939f190410e
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
[quic_subbaram@quicinc.com: Fixed trivial merge conflict in
 qcom-spmi-adc5.c and in qcom-vadc-common.h due to location change]
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
[quic_collinsd@quicinc.com: changed struct vadc_prescale_ratio to
 struct u32_fract]
Signed-off-by: David Collins <quic_collinsd@quicinc.com>
2022-05-24 16:01:00 -07:00
qctecmdr
ec8afe7e56 Merge "defconfig: pineapple-gki: Enable camcc driver" 2022-05-20 15:48:36 -07:00
qctecmdr
ad372344c0 Merge "clk: qcom: camcc-pineapple: Add initial camcc driver" 2022-05-19 17:08:57 -07:00
qctecmdr
ee1ee6f7da Merge "soc: qcom: Add support to read ddr_stats" 2022-05-19 14:34:16 -07:00
qctecmdr
b664d26496 Merge "build.config: pineapple: Enable ABL image generation" 2022-05-19 11:16:20 -07:00
Maulik Shah
a402311df4 soc: qcom: Add support to read ddr_stats
This change adds changes to read ddr statistic which can be read with
below command.

cat sys/kernel/debug/qcom_stats/ddr_stats

the output for this will be printed as,

LPM 1:  Name:0xd4       count:0 Duration (ticks):0 (~0%)
LPM 2:  Name:0xd3       count:0 Duration (ticks):0 (~0%)
LPM 3:  Name:0x11       count:0 Duration (ticks):0 (~0%)
LPM 4:  Name:0xd0       count:0 Duration (ticks):0 (~0%)
Freq 1555Mhz:   CP IDX:8        count:2 Duration (ticks):9959909 (~3%)
Freq 1708Mhz:   CP IDX:9        count:3 Duration (ticks):248315666 (~96%).

Change-Id: I3c3eb3dc651d04c0fff2ca24078ea22787e505b7
Signed-off-by: Tushar Nimkar <quic_tnimkar@quicinc.com>
Signed-off-by: Maulik Shah <quic_mkshah@quicinc.com>
2022-05-19 11:06:49 +05:30
qctecmdr
7ac860672f Merge "power: supply: qti_battery_charger: Fix FCC configuration" 2022-05-18 17:12:03 -07:00
qctecmdr
74f608451c Merge "Makefile: devicetree: Introduce support for out-of-tree dtbs" 2022-05-18 14:52:05 -07:00
Xubin Bai
d6a51201d9 defconfig: pineapple-gki: Enable camcc driver
Enable the camcc driver for Pineapple.

Change-Id: I5209a742886a9df48c9d9e11eddf406b15eff34a
Signed-off-by: Xubin Bai <quic_xubibai@quicinc.com>
2022-05-18 01:19:58 -07:00
Xubin Bai
1b4f1e3569 clk: qcom: camcc-pineapple: Add initial camcc driver
Add the camcc driver for Pineapple, which provides clocks
for the camera subsystem.

Change-Id: I27a9fbfc1e5ecb2e6e8c95e59aea7e2cc7f637cb
Signed-off-by: Xubin Bai <quic_xubibai@quicinc.com>
2022-05-18 00:58:16 -07:00
qctecmdr
3e4fe509e1 Merge "drivers: qcom: rpmh-rsc: Add hibernation support" 2022-05-18 00:18:34 -07:00
Huang Yiwei
fba091fb72 soc: qcom: Add snapshot of qtee_shmbridge driver
This is a snapshot of the qtee_shmbridge driver as of msm-5.15
commit <b85d942c19d2> ("Merge "msm_perf: Handle out of bounds
case"").

Also removed msm_ion.h include since the driver is not actually
using it.

Change-Id: I38a638d43c6791c0a7fabab534f7c8ab663f55db
Signed-off-by: Huang Yiwei <quic_hyiwei@quicinc.com>
2022-05-17 13:35:46 +08:00
Huang Yiwei
ba0e2e57a7 firmware: qcom: scm: Add snapshot of msm-5.15 SCM functions
This is a snapshot of the SCM functions as of msm-5.15
commit <b85d942c19d2> ("Merge "msm_perf: Handle out of
bounds case"").

Change-Id: I9021ab16058b988bedd476aeeae2d741d6af83df
Signed-off-by: Huang Yiwei <quic_hyiwei@quicinc.com>
2022-05-17 12:24:08 +08:00
qctecmdr
920d0d69d4 Merge "Merge keystone/android-mainline-keystone-qcom-release.5.18-rc5 (a425be2) into msm-pineapple" 2022-05-16 13:59:18 -07:00