Commit Graph

1163455 Commits

Author SHA1 Message Date
Subramanian Ananthanarayanan
08a7e87926 pci: msm: Update NTN3 de-emphasis values via I2C
Change is to update the de-emphasis value of NTN3
via i2c register writes to resolve link failure
issues seen on MBB platforms.

Change-Id: If90e5efc19691a14c3d5f12af78df9ff5c2b2a25
Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org>
Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com>
Signed-off-by: Yogesh Jadav <quic_yjadav@quicinc.com>
Signed-off-by: Joco Zhang <quic_pingshen@quicinc.com>
2024-03-31 18:02:54 -07:00
Hemant Kumar
54cdccd3fc pci: msm: Add support for NTN3 switch i2c client operations
NTN3 switch requires register access over i2c when the PCIe link
is not up. Add i2c control interface for an i2c client driver.
This i2c control interface registers with an i2c client driver
and provides client specific callbacks for read, write, reset
and register dump operations.i2c control interface can support
one i2c client per root port.

Change-Id: I9e5f91cab4fd2bb2c6274ad0317fad4279db6958
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com>
Signed-off-by: Yogesh Jadav <quic_yjadav@quicinc.com>
Signed-off-by: Joco Zhang <quic_pingshen@quicinc.com>
2024-03-26 00:31:21 -07:00
Paras Sharma
e2c64c9efc pci: msm: Unlock the recovery_lock in case of return in failure
Unlock the recovery_lock in case of return in failure
in msm_pcie_pm_resume_noirq.

Change-Id: I6b71653bf64571273f443d26e49dba62027d715e
Signed-off-by: Paras Sharma <quic_parass@quicinc.com>
2024-03-07 09:54:10 -08:00
Krishna chaitanya chundru
e633b05ffe pci: msm: Park all digital clocks low before clamping phy
As per PCIE phy hardware programming guide all the clocks are
to be parked low before parking the phy in low power down mode.

As we need ahb clk enabled to access registers disable all clocks
except ahb clock and do the phy configurations and then disable
ahb clock in suspend path and do vice versa in resume path.

Change-Id: I4710cdea1a2be15bb45012dcbbe009117210d7f8
Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com>
Signed-off-by: Paras Sharma <quic_parass@quicinc.com>
2024-03-07 23:21:57 +05:30
Krishna chaitanya chundru
6107715b82 pci: msm: disable controller GDSC in PCIe suspend noirq ops
Without disabling controller GDSC, XO shutdown is not being achieved.

When GDSC is turned off, it will reset controller and it can assert
CLKREQ GPIO. With assertion of CLKREQ gpio, endpoint tries to bring
link back to L0, but since all clocks are turned off on host, this
can result in link down.

So, release the control of CLKREQ gpio also from controller by
overriding it in suspend ops.

Change-Id: I4ba54c8b23487400bc19d1c3783bfe45f63980ed
Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com>
Signed-off-by: Paras Sharma <quic_parass@quicinc.com>
2024-03-07 23:14:52 +05:30
Paras Sharma
caadbd1051 pci: msm: Update the icc bw voting based up on link speed and width
Update icc bw voting after the link is up based upon link speed and
width if there is no client based bw voting.

If there is already client based voting, vote for minimal bandwidth
which is needed to bring the PCIe link up. As client is already voting
based up on their requirement, if we vote based upon speed and width
we may end up voting for more bandwidth which may result in high power
consumption.

Change-Id: Ie0647530dddbe7493dc0e6d854d553c0b5c536ac
Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com>
Signed-off-by: Paras Sharma <quic_parass@quicinc.com>
2024-03-07 22:54:04 +05:30
Paras Sharma
a51213fac9 pci: msm: Add support for APSS based L1ss sleep
Few PCIe endpoints like NVMe are always expecting the device
to be in D0 state and the link to be active (or in l1ss) all the
time (including in S3 state). Some NVMe endpoints are treating
link down as power cycle, So turning off the link during S3 can
reduce life span of the NVMe.

For that reason adding apss-based l1ss-sleep support. With this,
all the PCIe resources can be turned off after link has entered
into L1ss in the suspend path.

This meets NVMe requirements and also at the same time lets the
system go to XO shutdown.

Change-Id: I0d28567d37c1a4cfbfdc9294a132078b5c53e10d
Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com>
Signed-off-by: Paras Sharma <quic_parass@quicinc.com>
2024-03-07 22:53:09 +05:30
qctecmdr
1d8860003e Merge "defconfig: arm64: Enable memshare driver on pitti" 2024-03-06 06:16:19 -08:00
qctecmdr
95c80e0e7c Merge "defconfig: Enable SCHED_WALT_DEBUG for niobe consolidate" 2024-03-06 03:01:32 -08:00
qctecmdr
4df657fb57 Merge "bzl: Add the rpm-smd-debug driver for pitti" 2024-03-05 10:56:58 -08:00
qctecmdr
3f4f9d3d58 Merge "defconfig: Enable ufs-phy driver for volcano" 2024-03-05 09:05:30 -08:00
qctecmdr
c7f5b277b6 Merge "pinctrl: Add support in VM for Volcano SoC" 2024-03-05 02:25:31 -08:00
qctecmdr
bcdcaa416d Merge "defconfig: Enable F_FS IPC logging and EHSET_TEST configs on pitti" 2024-03-05 02:25:31 -08:00
Ankit Sharma
61768d4e9f defconfig: Enable SCHED_WALT_DEBUG for niobe consolidate
Enable SCHED_WALT_DEBUG for consolidate builds configuration.

Change-Id: Iee5e157118672b0c9ded47f78a5722ea66dae28d
Signed-off-by: Ankit Sharma <quic_anshar@quicinc.com>
2024-03-05 11:34:24 +05:30
Ankit Sharma
868fad6404 defconfig: niobe: Enable SCHED_WALT on perf builds
Enable WALT scheduler on niobe perf builds and insmod it early
during first stage.

Change-Id: I49253543449c0e11aabf5dc23b627eeec9bf9234
Signed-off-by: Ankit Sharma <quic_anshar@quicinc.com>
2024-03-05 11:29:46 +05:30
qctecmdr
c22f2506bb Merge "pci: msm: Update the L2_entry status polling logic" 2024-03-04 01:47:31 -08:00
Manish Pandey
8a6711706d defconfig: Enable ufs-phy driver for volcano
Volcano UFS PHY is reused from crow, hence Enable
CONFIG_PHY_QCOM_UFS_V4_CROW to enable ufs-phy driver
for volcano SoCs.

Also add UFS PHY module in modules.list.msm.pineapple
so that the module is loaded automatically from the
first stage RAM disk image during Linux kernel boot up.

Change-Id: I2774b710edc1e36823da41d8a577e7c38e4e3632
Signed-off-by: Manish Pandey <quic_mapa@quicinc.com>
2024-03-04 01:33:59 -08:00
Raghavendra Kakarla
1089f4b02b bzl: Add the rpm-smd-debug driver for pitti
This patch adds the rpm-smd-debug driver.

Change-Id: I6bd08e31be4647b1a0ebdad24c2282b2df622963
Signed-off-by: Raghavendra Kakarla <quic_rkakarla@quicinc.com>
2024-03-03 22:59:50 -08:00
Prashanth K
0eacef2e09 defconfig: Enable F_FS IPC logging and EHSET_TEST configs on pitti
Enable F_FS IPC logging and EHSET_TEST_FIXTURE configs on pitti.

Change-Id: Ie3f2558c6a763d3b2c53bbfff151d384cbb7281b
Signed-off-by: Prashanth K <quic_prashk@quicinc.com>
2024-03-04 11:51:58 +05:30
qctecmdr
c3881dd90f Merge "clk: qcom: gdsc-regulator: Set retain_ff_enable only if gdsc is already ON" 2024-03-03 22:14:18 -08:00
qctecmdr
614d2170ec Merge "phy: qualcomm: Add UFS PHY support for crow" 2024-03-03 22:14:17 -08:00
qctecmdr
91bd058707 Merge "defconfig: Add pinctrl for Volcano VM" 2024-03-03 22:14:16 -08:00
Raghavendra Kakarla
a2202ca620 soc: qcom: rpm-smd-debug: snapshot of rpm-smd-debug driver
rpm-smd-debug idriver snapshot from msm-5.15 branch
'commit ba7a2cfd542d ("Merge "remoteproc: Add shutdown completion signal
in AoN RTOS Exit"")'.

Change-Id: Ia9cf2407807d45f1787c0a405cb452c652dd5ff8
Signed-off-by: Raghavendra Kakarla <quic_rkakarla@quicinc.com>
2024-03-04 11:41:03 +05:30
qctecmdr
2f7264f851 Merge "usb: redriver: Avoid disabling regulator if regmap_write fails" 2024-03-03 20:21:02 -08:00
Paras Sharma
7f9f4b16b8 pci: msm: Update the L2_entry status polling logic
Latest SNPS controller has implementation change in PM_LINKST_IN_L2,
hence status not reflecting in current register. H/W CR for the same
is QCTDD11307476.

Replace the PM_STTS register in sequence with PM_STTS_1 for checking
L2/3 entry.

PCIE_PARF_PM_STTS_1[CURNT_STATE]
			0 : L0
			1 : L0s
			2 : L1
			3 : L2
			4 : Undefined

Poll PCIE_PARF_PM_STTS_1[CURNT_STATE] for 0x3 value to confirm L2 entry.

Since this register is present across target, should be safe to use it
across targets.

Change-Id: Ia339f0e47ca7b1ff12c14b4349ba7933dda6b241
Signed-off-by: Paras Sharma <quic_parass@quicinc.com>
2024-03-03 11:24:06 +05:30
qctecmdr
e302b8dfae Merge "bazel: Add lunch target, base target dict & supported functions" 2024-03-01 14:14:53 -08:00
qctecmdr
3d4a5a7fe7 Merge "bindings: clock: qcom: Add RPMHCC bindings for LNBBCLK4" 2024-03-01 11:23:01 -08:00
Fenil Panwala
be63e36660 defconfig: arm64: Enable memshare driver on pitti
Enable memshare driver compilation necessary for
allocation of memory for the clients requesting.

Change-Id: I1512a69abb0599e82b1bd8a0d4ef1ba01ec31025
Signed-off-by: Fenil Panwala <quic_fpanwala@quicinc.com>
2024-03-01 16:52:33 +05:30
qctecmdr
d3fa5a9fb2 Merge "i2c: i2c-msm-geni: Add new function for NACK detection logic" 2024-03-01 03:15:30 -08:00
qctecmdr
916cbd3c4c Merge "remoteproc: qcom: pas: Add support to boot WPSS in volcano" 2024-03-01 01:09:23 -08:00
qctecmdr
55cf1ebcc2 Merge "soc: qcom: hab: fix UAF issue in hab_vchan_open" 2024-02-29 21:55:15 -08:00
qctecmdr
4eb9cec3e0 Merge "phy: qualcomm: Add ref_clk_pad_en clock for pitti" 2024-02-29 21:55:14 -08:00
Auditya Bhattaram
a1731ad1ba bazel: Add lunch target, base target dict & supported functions
Out of tree (OOT) modules have a requirement to compile differently
for lunch target in Android builds but still use base target's
msm-kernel bazel package.

- How get_all_lunch_target_base_target_variants is used?
  By calling this function from tech pack bazel file, It returns tuple of
  (lunch_target, base_target, variant). This is useful to define a bazel
  package sepcific to that lunch target
  <base_target>_<variant>_<lunch_target>

- How build_module.sh calls this package to run in bazel?
  When the script queries for the applicable packages under a folder,
  it will query for <base_t>_<variant>_<lunch_t>. This regex will be
  passed by individual OOT module's Makefile using
  LOCAL_MODULE_DDK_SUBTARGET_REGEX

  Syntax:
  ifeq ($(TARGET_BOARD_PLATFORM), lunch_target)
    LOCAL_MODULE_DDK_SUBTARGET_REGEX := "lunch_target_tech_regex.*"
  endif

Change-Id: Id0b79292e9ef9a7ec1562ff6f48e0ba7c131c420
Signed-off-by: Auditya Bhattaram <quic_audityab@quicinc.com>
2024-03-01 10:44:51 +05:30
Ajit Pandey
8211c55511 bindings: clock: qcom: Add RPMHCC bindings for LNBBCLK4
Add LNBBCLK4 bindings for rpmh clock support on Volcano
platform.

Change-Id: I4392f8398fb4af844b746f1df956948fda019aa9
Signed-off-by: Ajit Pandey <quic_ajipan@quicinc.com>
2024-03-01 10:18:22 +05:30
qctecmdr
e2b0be52a9 Merge "arm64: config: Enable show resume IRQs driver for pitti" 2024-02-28 21:38:56 -08:00
qctecmdr
a71d803c98 Merge "defconfig: pitti-gki: Enable panic on Kryo EDAC Uncorrectable Error(UE)" 2024-02-28 18:31:05 -08:00
qctecmdr
97d04fb111 Merge "defconfig: pitti-gki: Enable msm-sysstats driver for pitti" 2024-02-28 18:31:05 -08:00
qctecmdr
1e498bb781 Merge "defconfig: Balance anon and file reclaim on Pitti" 2024-02-28 18:31:04 -08:00
Raghavendra Kakarla
fe8e89e0e5 arm64: config: Enable show resume IRQs driver for pitti
Enable show resume IRQs driver to log wake up interrupts bringing the
SoC out of low power mode for debugging.

Change-Id: I3f9b620c9e8527abfbbdd032419d4ebe677f122b
Signed-off-by: Raghavendra Kakarla <quic_rkakarla@quicinc.com>
2024-02-28 23:36:41 +05:30
qctecmdr
0c13d2d14a Merge "arm64: defconfig: Enable msm-sdexpress driver for niobe" 2024-02-28 08:37:17 -08:00
qctecmdr
acf6bac088 Merge "usb: dwc3: msm: Handle absence of disconnect event during plug-out" 2024-02-28 08:37:17 -08:00
Deyan Wang
3cfcb05e0b soc: qcom: hab: fix UAF issue in hab_vchan_open
Thread1:                            Thread2:
write_lock(&ctx->ctx_lock);
list_add_tail(&vchan->node,
              &ctx->vchannels);
ctx->vcnt++;
write_unlock(&ctx->ctx_lock);
                                    hab_vchan_close();
*vcid = vchan->id;
------------------------------------------------------
vchan object will be freed by hab_vchan_close(), so
*vcid = vchan->id will cause Use-Afer-Free issue.

Change-Id: I8fb5e6a619914d5843564c3e36b0ba16f48953cf
Signed-off-by: Deyan Wang <quic_deyawang@quicinc.com>
2024-02-28 16:20:38 +05:30
Wasim Nazir
7e6f8ba210 defconfig: pitti-gki: Enable panic on Kryo EDAC Uncorrectable Error(UE)
Panic device when UE is detected on Pitti.

Change-Id: I4dba616847abcbad29da81607fd7380ba9b25494
Signed-off-by: Wasim Nazir <quic_wasimn@quicinc.com>
2024-02-28 01:23:14 -08:00
qctecmdr
31ddc4f8c1 Merge "soc: qcom: llcc: Add support to check for llcc device" 2024-02-27 23:28:39 -08:00
qctecmdr
f9932dd4e2 Merge "dmaengine: msm_gpi: Free the GPII IRQ in GPII in disable path" 2024-02-27 23:28:38 -08:00
qctecmdr
0d262b0708 Merge "arm64: Kconfig: Add support for anorak target" 2024-02-27 23:28:37 -08:00
Pradeep P V K
5a8822034a arm64: defconfig: Enable msm-sdexpress driver for niobe
Enable SDExpress platform driver configs for niobe.

Change-Id: Ia11ff7c95b694c91a7fecbbc45ed5bdfc2530422
Signed-off-by: Pradeep P V K <quic_pragalla@quicinc.com>
2024-02-28 11:34:21 +05:30
Krishna Kurapati
1dcc79d1f5 usb: dwc3: msm: Handle absence of disconnect event during plug-out
In some situations, it is observed that during a faulty connect
where enumeration has failed, the controller goes into a bad state
where it is not able to generate any events. As a result when a plug
out happens in this scenario, the disconnect event isn't generated
by the controller and after the 2 second timeout, we exit the start
peripheral call setting WAIT_FOR_LPM bit. But since the connected
flag was never set to false, the idle/suspend routines for core
fail and the wrapper's suspend routine too is not called. This
instability causes further Plug-In from enumerating the device and
further plug-outs to enter LPM.

As per the debug analysis done so far, this is due to either AXI
response hang or the TBT command (internal)/response hang. While
debug is in progress, SNPS suggested restarting the device mode.

Fix this by forcing disconnect during faulty plug-out and fix the
gadget connect during next plug-in. Also since the user is free to
do a composition switch after faulty plug-out and before next plug
in, ensure to check whether udc is binded or not to avoid duplicate
calls to gadget_connect.

Change-Id: Ica53db16dc6d51bf652679ecfa967347c6c5f384
Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
2024-02-28 10:37:22 +05:30
Manish Pandey
0ce40c0945 nvme: Add sdexpress support
Add a new platform driver support to detect and
power control for the new sdexpress cards.

[quic_mapa: modify below from change 67c2aa7
- replace mdelay() with usleep_range() in msm_sdexpress.c:749.
- Prefer "GPL" over "GPL v2"].

Change-Id: If042c7e9cc12d15c16856e2cda8abdec52c920df
Co-developed-by: Nitin Rawat <quic_nitirawa@quicinc.com>
Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
Signed-off-by: Pradeep P V K <quic_pragalla@quicinc.com>
Signed-off-by: Manish Pandey <quic_mapa@quicinc.com>
2024-02-28 09:29:28 +05:30
qctecmdr
baf8cfa1d0 Merge "sched: walt: fix accounting for throttled deadline task" 2024-02-27 16:40:46 -08:00