Commit graph

857,118 commits

Author SHA1 Message Date
qctecmdr
447e831a2d Merge "clk: qcom: clk-rcg2: Read RCG source before calculating clk rate" 2019-09-05 00:18:10 -07:00
qctecmdr
1060c7dccd Merge "clk: qcom: rcg2: Add DIV_ROUND_CLOSEST_ULL to roundoff RCG frequency" 2019-09-04 23:32:29 -07:00
qctecmdr
9ba1baac78 Merge "clk: qcom: clk-rcg2: Fix QUPV3 DFSR M and N register mode overwrite" 2019-09-04 22:47:11 -07:00
qctecmdr
a4a89a611e Merge "soc: qcom: dcc: Support new DCC HW feature" 2019-09-04 21:56:10 -07:00
qctecmdr
76e107ce5a Merge "drivers: qcom: rpmh-rsc: optimize redundant read to determine TCS idle" 2019-09-04 21:16:36 -07:00
qctecmdr
c6522f46d9 Merge "qseecom: add uapi headfile for Lahaina bring up" 2019-09-04 20:31:44 -07:00
qctecmdr
219f28d458 Merge "pinctrl-lahaina: Correct the pinconfig base address" 2019-09-04 20:31:44 -07:00
qctecmdr
093f1c15da Merge "dt-bindings: Add dt bindings head file for dcc" 2019-09-04 19:33:58 -07:00
qctecmdr
0ac65932d2 Merge "techpack: replace type with xtype while searching for sub-dirs" 2019-09-04 18:16:52 -07:00
qctecmdr
9f20c606d9 Merge "clk: qcom: Add support for clock dependency" 2019-09-04 17:25:59 -07:00
qctecmdr
26c6b391bd Merge "soc: qcom: configure ipcc interrupt as wakeup capable" 2019-09-04 16:41:19 -07:00
qctecmdr
e1a47ae7b7 Merge "drivers: qcom: rpmh-rsc: clear active mode configuration for waketcs" 2019-09-04 15:55:46 -07:00
qctecmdr
fa0f12e7ac Merge "clk: qcom: Add RCG support for DP source" 2019-09-04 15:21:39 -07:00
qctecmdr
4e2756f8ba Merge "clk: qcom: Add support for RCGs with dynamic and fixed sources" 2019-09-04 14:42:36 -07:00
qctecmdr
99878ea10d Merge "clk: qcom: clk-rcg2: Configure the RCGs to a safe frequency as needed" 2019-09-04 14:04:08 -07:00
qctecmdr
d5f8047ce9 Merge "clk: qcom: clk-alpha-pll: add FREQ_DET support to Zonda PLL lock detection" 2019-09-04 13:23:06 -07:00
qctecmdr
37ecd1afdf Merge "clk: qcom: clk-alpha-pll: add support to reconfigure PLLs during prepare" 2019-09-04 12:46:45 -07:00
qctecmdr
c399d8b578 Merge "clk: qcom: clk-alpha-pll: Remove reconfiguration of PLLs" 2019-09-04 12:11:37 -07:00
qctecmdr
018585c0cd Merge "clk: qcom: clk-alpha-pll: add additional configuration support for PLLs" 2019-09-04 11:28:43 -07:00
Satya Durga Srinivasu Prabhala
3f7ed16d1c techpack: replace type with xtype while searching for sub-dirs
To make sure sym links (if any) gets detected during search,
switch to xtype.

Change-Id: Idc0584b134f2ca4b395e53696e079337ff377f82
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2019-09-04 11:09:24 -07:00
Prasad Sodagudi
711009936d soc: qcom: configure ipcc interrupt as wakeup capable
Configure the IPCC summary IRQ as wakeup capable interrupt.
IPCC interrupt needs to wake up the device from low power
modes when wakeup capable event is generated from remote
subsystem.

Change-Id: Iaffefc6ef68743c7de11062c39e2b1453c58b9a1
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
[eberman@codeaurora.org: Resolve merge conflicts]
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-09-04 08:38:59 -07:00
qctecmdr
7bbf48dc2d Merge "coresight: etm: Add check of trace unit power property" 2019-09-04 07:29:49 -07:00
Tingwei Zhang
57fa8d1135 coresight: etm: Add check of trace unit power property
Add check of trace unit power property to enable/disable that
keep the trace unit powered.

Change-Id: I66dbfee16df63480c9309092e61ee39b8b0cd6e8
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
2019-09-04 17:58:14 +08:00
qctecmdr
ccc1223a66 Merge "defconfig: Update test configs for debug defconfig" 2019-09-04 00:23:40 -07:00
qctecmdr
e93afc0042 Merge "drivers: GICv3: Enable logging of interrupts that triggered wakeup" 2019-09-04 00:23:39 -07:00
Lina Iyer
23c509e166 drivers: qcom: rpmh-rsc: optimize redundant read to determine TCS idle
Since the tcs_in_use flag is authoritative enough to determine the
idleness of the TCS, avoid reading the register redundantly.

Change-Id: Ic7737e60ca0029b3cf9d1cc9e613435608be7bc8
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
2019-09-03 11:57:05 -06:00
Raju P.L.S.S.S.N
0638ba6739 drivers: qcom: rpmh-rsc: clear active mode configuration for waketcs
For RSCs that have sleep & wake TCS but no dedicated active TCS, wake
TCS can be re-purposed to send active requests. Once the active requests
are sent and response is received, the active mode configuration needs
to be cleared so that controller can use wake TCS for sending wake
requests in 'solver' state while executing low power modes.

Change-Id: I0d15c290db48d08158fdbff2cd91505563dc3fd5
Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
2019-09-03 11:57:05 -06:00
Lina Iyer
c9a0851187 drivers: qcom: rpmh: add 'solver' state support for RSC controllers
Controllers may be in 'solver' state, where they could be in autonomous
mode executing low power modes for their hardware and as such are not
available for sending active votes. Device driver may notify RPMH API
that the controller is in solver mode and when in such mode, disallow
requests from platform drivers for state change using the RSC.

Change-Id: I6dccfabdf230d927b945b0bd1840233e69064c9d
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
2019-09-03 11:57:05 -06:00
Lina Iyer
896270c7ef drivers: qcom: rpmh-rsc: do not read back the register write on trigger
When triggering a TCS to send its contents, reading back the trigger
value may return an incorrect value. That is because, writing the
trigger may raise an interrupt which could be handled immediately and
the trigger value could be reset in the interrupt handler.

A write_tcs_reg_sync() would read back the value that is written and try
to match it to the value written to ensure that the value is written,
but if that value is different, we are stuck in loop forever.

Change-Id: I54866b9b9d85fa79c8df84aecd502764b9f9158a
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
2019-09-03 11:57:05 -06:00
Tingwei Zhang
777bece578 soc: qcom: dcc: Support new DCC HW feature
Add support to new register memory map, fix loop offset and
dynamic number of link list.

Change-Id: Ibadfa723842dae80cdd50bf08018d86c2ef30b94
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
2019-09-03 13:37:01 +08:00
Tingwei Zhang
de99f57c32 soc: qcom: Add snapshot of the dcc v2 driver
Add dcc v2 driver from msm-4.19 commit 034b7f3bfb2c
("msm: cvp: Fix page fault when open 16 cvp sessions").

Change-Id: I7245ddc7cde3a4156d184c8b834bf17416bd4584
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
2019-09-03 11:51:57 +08:00
Tingwei Zhang
9e5b22573f dt-bindings: Add dt bindings head file for dcc
Add dt binding head file for dcc driver. It's used by device tree
to define dcc link list.

Change-Id: Iacbfeeb2cf2763608f075f2828a8d47d662fa88f
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
2019-09-03 11:49:38 +08:00
Tingwei Zhang
8aad5e04ed soc: qcom: Add snapshot of the memory dump v2 driver
Add memory dump v2 driver from msm-4.19
commit 034b7f3bfb2c ("msm: cvp: Fix page fault when open 16 cvp sessions").
Remove dmac_flush_range since it's deprecated.

Change-Id: Ibcc42c0d737abbb304a222ac51cfdd94019af534
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
2019-09-02 17:28:52 +08:00
qctecmdr
3178aaf4dc Merge "arm64: defconfig: Enable sensors_ssc on Lahaina" 2019-08-30 12:16:12 -07:00
Zhen Kong
c52c8f7af4 qseecom: add uapi headfile for Lahaina bring up
Add qseecom.h, qcedev.h, fips_status.h for Lahaina bring up

Change-Id: I21c1747e7ce9fab1d190b8ea54ac2d54c11bd44f
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2019-08-30 11:43:28 -07:00
qctecmdr
38a75fdb0b Merge "radio: Add snapshot for FM radio support" 2019-08-29 16:17:44 -07:00
Shefali Jain
90823f3cf3 clk: qcom: clk-rcg2: Read RCG source before calculating clk rate
If the clock rate is set previously to hlos and enable
safe config is true. In that case we need to check the
rcg source to make sure recalc will return correct rate.
Rate calculation is done based on selected source rather
than 19.2 MHZ. Also, we are setting correct src value for
XO based on the parent map of a particular clock.

Change-Id: Id6d2923136a0848d55cff37fb5ef2e3b092af27a
Signed-off-by: Shefali Jain <shefjain@codeaurora.org>
2019-08-29 16:05:03 -07:00
Taniya Das
0311d36738 clk: qcom: Retrieve pre_div from freq_tbl for shared RCG
There could be cases where a simultaneous clk_disable and clk_set_rate on
the same rcg could result in a wrong recalc rate. So for shared rcgs
get the pre_div value based on the current frequency from the frequency
table.

Change-Id: Ia5730e43965b2d0ba19da05fca47825514f98865
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2019-08-29 16:05:02 -07:00
Shefali Jain
90ded952e1 clk: qcom: rcg2: Add DIV_ROUND_CLOSEST_ULL to roundoff RCG frequency
The Alpha BW for Fabia PLL is 16 bit and the calculated hw rate has
additional KHz of frequency. Due to this additional frequency, the
source is wrongly selected. Truncate the additional KHz using the
DIV_ROUND_CLOSEST_ULL.

Change-Id: Ic9c523c87277c4813b676cf8a52a1207e8f1ecc2
Signed-off-by: Shefali Jain <shefjain@codeaurora.org>
2019-08-29 16:05:00 -07:00
David Collins
51ca8f6849 clk: qcom: add null pointer checks for parent clocks
Add null pointer checks for the parent clock pointers returned
by clk_hw_get_parent() and clk_hw_get_parent_by_index() in
several qcom clock drivers.

Change-Id: I869c9e35b7ec083b34bcc70d18601aec64c3ac97
Signed-off-by: David Collins <collinsd@codeaurora.org>
2019-08-29 16:04:59 -07:00
Vivek Aknurwar
3934ca8ec6 clk: qcom: clk-rcg2: Fix QUPV3 DFSR M and N register mode overwrite
Move reading of MN counter mode register earlier to source sel
to fix overwrite of MN counter mode variable.

Change-Id: I5a318112e85c4af83fdbf9bba8770f4ec1b84326
Signed-off-by: Vivek Aknurwar <viveka@codeaurora.org>
2019-08-29 16:04:57 -07:00
David Collins
6d960dcc4f clk: qcom: clk-rcg: update DEFINE_RCG_DFS() macro
Update the DEFINE_RCG_DFS() macro to avoid the potential clock
struct name aliasing.

This modification originally came from:
commit c88b8062898c ("clk: qcom: Add cdiv clocks for gcc, video
and camera cc driver for KONA").

Change-Id: I5a8b694b5b8a8b5169639a3e09b1ab4c1936e010
Signed-off-by: David Collins <collinsd@codeaurora.org>
2019-08-29 16:04:56 -07:00
Taniya Das
228b95aa74 clk: qcom: Add support for clock dependency
Add clock ops for taking care of a dependent clock when the actual
clock requests are made.

Change-Id: I52691ef9f183da035ddf9c05fb73811f48fef74c
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Signed-off-by: David Collins <collinsd@codeaurora.org>
2019-08-29 16:04:54 -07:00
Deepak Katragadda
b3394e839b clk: Add additional checking to some clock driver functions
Fix certain functions with potential for a NULL
pointer de-reference.

Change-Id: I855ef1d883a22616db7086bd5d47ee1f8e54694a
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Signed-off-by: David Dai <daidavid1@codeaurora.org>
Signed-off-by: David Collins <collinsd@codeaurora.org>
2019-08-29 16:04:43 -07:00
Taniya Das
a41cfccad5 clk: qcom: Add RCG support for DP source
Add new RCG clock ops specific for the DP clock source.

Change-Id: I2ec5ddcfd47af8362f76d76d153e30d4e2f45370
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Signed-off-by: David Dai <daidavid1@codeaurora.org>
2019-08-29 16:04:16 -07:00
Taniya Das
fd6e6b0b16 clk: qcom: Add support for RCGs with dynamic and fixed sources
Some RCGs could have sources with dynamic frequencies and fixed sources
where if the RCG has the flag of CLK_SET_RATE_PARENT set, it would try to
propagate the clock rate to the fixed source PLLs too. To identify sources
of the RCGs where the rate should propagate to parent PLL, add a member in
freq_tbl to represent source frequency. This would be used by the
_freq_tbl_determine_rate to set its parent frequency on the PLL.

Change-Id: I7f1c0d9d84607821893a1e5d17934dae5acef5f4
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Signed-off-by: David Dai <daidavid1@codeaurora.org>
2019-08-29 16:03:46 -07:00
Deepak Katragadda
198a419f76 clk: qcom: clk-rcg2: Add support to force enable an RCG
In certain cases, it is desirable for an RCG to be turned on
explicitly instead of just relying on the enable signal from
its branch clock(s). Add support for this.

Change-Id: I2b0b81bddfe7cc7543c313e4ed13a332fb1a0fcb
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Signed-off-by: David Dai <daidavid1@codeaurora.org>
2019-08-29 16:03:15 -07:00
Deepak Katragadda
3e549714a8 clk: qcom: clk-rcg2: Configure the RCGs to a safe frequency as needed
In certain cases, an RCG might be prone to being enabled even
though the overlying software thinks that it disabled the RCG.
In order to avoid letting the RCG go into an invalid state, support
parking it at a safe frequency during clk_disable() and deferring
all the RCG configuration updates to be done during clk_enable(),
if a scaling request comes in whilst the clock is disabled.

Change-Id: I55f1d1d346182a2b480127c57d6659fc9a63331b
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Signed-off-by: David Dai <daidavid1@codeaurora.org>
Signed-off-by: David Collins <collinsd@codeaurora.org>
2019-08-29 16:02:40 -07:00
David Dai
07e8f7920d clk: qcom: clk-alpha-pll: check pcal_done from mode register
The sequence for alpha_pll_lucid_prepare is checking an incorrect bit
to determine whether or not a lucid PLL has calibrated successfully.
The bit in the status register is not observable unless pll_test_ctl[69]
is set and user_ctl[43:37] is 0 which should only be used as a fallback
option. Use the correct PCAL_DONE bit from the mode register to properly
determine PLL calibration status.

Change-Id: If952c30cacacd68c07e8d7dfd622069dbb70c909
Signed-off-by: David Dai <daidavid1@codeaurora.org>
2019-08-29 15:03:26 -07:00
Vivek Aknurwar
ca1a5818b0 clk: qcom: clk-alpha-pll: add FREQ_DET support to Zonda PLL lock detection
Some instances of the Zonda PLL do not lock correctly
in high L-VAL regions. In such cases, CFA mode
can be configured via test_ctl_val to use an alternative
locking mechanism. Add support for CFA mode by
polling FREQ_LOCK_DET instead of PLL_DET_LOCK
whenever CFA mode has been configured.

Change-Id: Ief31592250ea9f329a34ffdbc4b17cfce431677d
Signed-off-by: Vivek Aknurwar <viveka@codeaurora.org>
2019-08-29 15:03:24 -07:00