Commit Graph

1169355 Commits

Author SHA1 Message Date
Maulik Shah
a5b38d6ff6 cpuidle: governors: qcom-lpm: Fix runtime PM based cpuidle support
In the cpuidle-psci case, runtime PM in combination with the generic
PM domain (genpd), may be used when entering/exiting a shared idle
state. More precisely, genpd relies on runtime PM to be enabled for
the attached device (in this case it belongs to a CPU), to properly
manage the reference counting of its PM domain.

This works fine most of the time, but during system suspend in
dpm_suspend_late(), the PM core disables runtime PM for all devices.

Beyond this point, calls to pm_runtime_get_sync() to runtime resume
a device may fail and therefore it could also mess up the reference
counting in genpd.

To fix this problem, let's call wake_up_all_idle_cpus() prior to
disabling runtime PM. In this way a device that belongs to a CPU,
becomes runtime resumed through cpuidle-psci and stays like that
because idle governor will stop selecting deeper idle state when
suspend is started.

Change-Id: I8e046aa9b904ada09c0138499766d6362a9795be
Signed-off-by: Maulik Shah <quic_mkshah@quicinc.com>
2024-08-13 21:27:21 -07:00
QCTECMDR Service
7cd339d42e Merge "soc: qcom: sysmon: Add null check for add_delta_time" 2024-08-13 13:36:25 -07:00
QCTECMDR Service
4eb8957387 Merge "drivers: nvmem: qfprom: Add keepout_regions for pineapple" 2024-08-13 13:36:25 -07:00
QCTECMDR Service
ddfcd39924 Merge "icc: dt-bindings: Add snapshot of endpoint IDs for interconnects for Neo" 2024-08-13 13:36:24 -07:00
QCTECMDR Service
f19948a686 Merge "coresight: tmc: etf: Free its buffer and set NULL when etf can't be enabled" 2024-08-13 08:27:42 -07:00
QCTECMDR Service
287a3b8b89 Merge "firmware: scm: Add checks for NULL pointer dereference" 2024-08-13 08:27:41 -07:00
Kalpak Kawadkar
abe45eaade clk: qcom: clk-branch: Add support for BRANCH_HALT_POLL flag
Usecases where branch clock will be enabled pre-HLOS and
expectation from the clock provider is to poll on the clock
to ensure it is indeed enabled and not HW gated, thus add
the BRANCH_HALT_POLL flag.

Change-Id: If41a65c64755d062721266ca7ea97822102115a1
Signed-off-by: Kalpak Kawadkar <quic_kkawadka@quicinc.com>
Signed-off-by: Chintan Kothari <quic_ckothari@quicinc.com>
2024-08-13 14:17:22 +05:30
Dhaval Radiya
cce6ec546e defconfig: Enable Regulator related modules for neo
Enable Regulator related modules for neo platform.

Change-Id: I140caa8a7a39e03b18228a5ba9994a76f09edd60
Signed-off-by: Dhaval Radiya <quic_dradiya@quicinc.com>
2024-08-13 14:14:23 +05:30
Odelu Kukatla
7d4a6cb9fb interconnect: qcom: Add snapshot of interconnect provider driver for neo
Add interconnect providers for config_noc, dc_noc, gem_noc,
lpass_ag_noc, mc_virt_noc, mmss_noc, nsp_noc and system_noc. This is
interconnect provider driver snapshot from msm-5.10 branch
commit 11aa9ca0c2da ("interconnect: qcom: Add interconnect
stubs for Neo").

Change-Id: If8ed95f84dc70a7040c0dda28dd8adf3df3678cd
Signed-off-by: Odelu Kukatla <quic_okukatla@quicinc.com>
Signed-off-by: Chintan Kothari <quic_ckothari@quicinc.com>
2024-08-13 13:26:14 +05:30
Wasim Nazir
3399cbff16 power: reboot-reason: Check nvmen write return value
Check return value to get proper error logs.

Change-Id: I77b33d2ac618ff029921cd751f2d2dde226b8064
Signed-off-by: Wasim Nazir <quic_wasimn@quicinc.com>
2024-08-12 23:47:08 -07:00
QCTECMDR Service
d34faa6089 Merge "net: stmmac: Enable Deep sleep support" 2024-08-12 13:14:20 -07:00
Odelu Kukatla
085040c09f icc: dt-bindings: Add snapshot of endpoint IDs for
interconnects for Neo

Add master and slave ID constants for all Qualcomm Technologies, Inc.
Neo interconnect providers which consumers can use to set bandwidth
constraints and find paths in the NoC (Network-On-Chip) topology.
This is a snapshot taken from 5.10 kernel.
commit c1275fdbd5e2 ("icc: dt-bindings: add endpoint IDs for
interconnects for Neo").

Change-Id: I2c0e62f96ba6288b6903f0dd13a2d68aa7b3ec49
Signed-off-by: Odelu Kukatla <quic_okukatla@quicinc.com>
Signed-off-by: Chintan Kothari <quic_ckothari@quicinc.com>
2024-08-12 08:29:17 -07:00
Kamati Srinivas
34b67414cf soccp: pas: vote for interconnects in D transition
Vote for interconnect when in D0, unvote when in D3.

Change-Id: I52f6170b1651b3d6bf508482d4ab35165fd395ca
Signed-off-by: Kamati Srinivas <quic_kamasrin@quicinc.com>
2024-08-12 14:58:13 +05:30
Srinath Pandey
a94a1330a1 net: stmmac: Add support for driver remove operation
Add driver remove feature for making
rmmod dwmac-qcom-eth successful.

Change-Id: If6334979a1f603fdd6d99a8d189ed84aa3a3afc7
Signed-off-by: Srinath Pandey <quic_srinpand@quicinc.com>
2024-08-12 01:59:13 -07:00
Shashank Shekhar
ff2b9fdf51 net: stmmac: Enable Deep sleep support
Add support for Deep sleep in ethernet driver.

Change-Id: I6255580b909088c0908674e446ca9d7599051498
Signed-off-by: Shashank Shekhar <quic_sshe@quicinc.com>
2024-08-11 23:36:29 -07:00
Wasim Nazir
ebd0bcb25c soc: qcom: sysmon: Add null check for add_delta_time
sysmon_smem_power_stats_extended pointer will be NULL
in case of invalid dsp_id.
Add NULL check for invalid dsp_id cases.

Change-Id: If4fe03051ff6388307ff137b55d4e15b2e0f88f1
Signed-off-by: Wasim Nazir <quic_wasimn@quicinc.com>
2024-08-12 12:01:14 +05:30
yingdeng
8a01c3ed0f coresight: tmc: etf: Free its buffer and set NULL when etf can't be enabled
In function tmc_enable_etf_sink_sysfs, the local variable buf
was allocated and assigned to drvdata->buffer, and buf will be
freed because etf can't be enabled, but drvdata->buffer
still point to the address.
So in function tmc_read_unprepare_etb, beacause drvdata->mode
is CS_MODE_DISABLED, local variable buf was assigned by
drvdata->buf and free again.

Change-Id: I7d25e7db0a983fc134e8d8dfb954936233f0d167
Signed-off-by: yingdeng <quic_yingdeng@quicinc.com>
2024-08-11 22:35:11 -07:00
Wasim Nazir
c787ac5c9f firmware: scm: Add checks for NULL pointer dereference
Add macro to check for __scm pointer before accessing.
Also add check for device pointer.

Change-Id: Ib3ef303fd9574bedd87077dcd62a480066d7a7d8
Signed-off-by: Wasim Nazir <quic_wasimn@quicinc.com>
2024-08-12 11:02:18 +05:30
QCTECMDR Service
46f5c0a0c2 Merge "bindings: clock: qcom: Snapshot for clock bindings on NEO" 2024-08-09 20:10:24 -07:00
Kalpak Kawadkar
b4d55a4b49 clk: qcom: clk-branch: Add support for sreg branch ops
Add support for SREG branch ops as sreg register operations
are needed as part of ASSERT/DEASSERT sequence.

Change-Id: Ic0cc76d5160cd34130afc460b07d5ec4e9ed85eb
Signed-off-by: Kalpak Kawadkar <quic_kkawadka@quicinc.com>
Signed-off-by: Chintan Kothari <quic_ckothari@quicinc.com>
2024-08-09 05:41:41 -07:00
QCTECMDR Service
1d2d060fae Merge "arm64: defconfig: Enable PDC, CPUidle goverrnor, stats driver for neo" 2024-08-09 02:11:27 -07:00
Abdul Salam
5f276b6954 clk: qcom: Adding SSC_QUP clocks
Adding SSC_QUP clocks for slpi.

Change-Id: Id2f5f14bd5e40eed0c8bfa30235d3702733f5f22
Signed-off-by: Abdul Salam <quic_asalam@quicinc.com>
2024-08-09 14:12:31 +05:30
QCTECMDR Service
25804bc944 Merge "ufs: qcom: Create sysfs node "ufs_pm_mode"" 2024-08-08 22:37:29 -07:00
QCTECMDR Service
12df14f1b4 Merge "Revert "soc: qcom: hgsl: enable memflag for hgsl allocation"" 2024-08-08 14:42:22 -07:00
QCTECMDR Service
a83c3694ff Merge "rpmsg: native: Remove IRQF_ONESHOT flag" 2024-08-08 11:08:49 -07:00
Ram Kumar Dwivedi
4ab95acc04 ufs: qcom: Create sysfs node "ufs_pm_mode"
In some HQX targets (where Linux is running as guest OS),
when S2R is triggered from host OS, the GVM is sent to
Deep Sleep state.

Since Deep Sleep is getting triggered from Guest point of view,
ufs spm level is set to 5, Power OFF SSU command is sent to the
ufs device and all regulators are turned off from ufs. But since
it is actually an S2R event from Host PoV, the  regulators are
not turned off by the PMIC. This is causing power leakage.

To fix this issue, create a sysfs node "ufs_pm_mode". The Host OS
will write to this node which the event (S2R or Deep Sleep) is
getting triggered at the Host. UFS will set the correct spm level
accordingly. For S2R case, the default spm level is retained while
for Deep Sleep it is set to 5.

The default value for this node is 0( which is set during ufs init).
This means it will not set anything unless "S2R" or "DEEPSLEEP" is
explicitly written to the node.

ufs_pm_mode can have three values: "NONE","S2R","DEEPSLEEP":

1. When "NONE" is written to sysfs node: the spm level
   is set to 5 for deep sleep and existing spm value
   left unchanged for s2idle case.

2. When "S2R" is written to the node: the default spm level
   value is retained.

3. When "DEEPSLEEP" is written to the node: the spm level
   is set to 5.

Change-Id: I232449cf93a3b37652897e74a621bf219302b76b
Signed-off-by: Ram Kumar Dwivedi <quic_rdwivedi@quicinc.com>
2024-08-08 18:31:27 +05:30
Jeyaprabu J
bb0fd5f452 Revert "soc: qcom: hgsl: enable memflag for hgsl allocation"
This reverts commit 4cacf64319.

Reason for revert: Regressing Performance.

Change-Id: Ib69607b76cca91fc525cbc5cd86b4bc547b80253
Signed-off-by: Jeyaprabu J <quic_jeyaprab@quicinc.com>
Signed-off-by: Vishakh <quic_jeyaprab@quicinc.com>
2024-08-08 03:17:58 -07:00
Asit Shah
56f042d8ed soc: qcom: socinfo: Add neo-la soc-id in socinfo list
Add Neo-LA msm-id to the list of soc-ids supported.

Change-Id: I9601135db35026067fc15116879950ece40d9fbe
Signed-off-by: Asit Shah <quic_asitshah@quicinc.com>
2024-08-08 14:59:35 +05:30
Kalpak Kawadkar
9fd9595d11 bindings: clock: qcom: Snapshot for clock bindings on NEO
Add snapshot of clock handles for CAMCC/DISPCC/GCC/GPUCC/VIDEOCC/TCSRCC
on NEO so that clients can request on the clock ids,from msm-5.10 branch
commit e42f1c7f152e ("bindings: clock: qcom: Add support for
clock IDs for Neo").

Change-Id: If1ed852cb3e7cf91da1953beaaeeda309288ab14
Signed-off-by: Kalpak Kawadkar <quic_kkawadka@quicinc.com>
Signed-off-by: Chintan Kothari <quic_ckothari@quicinc.com>
2024-08-08 12:48:18 +05:30
Dhaval Radiya
0222920c9e arm64: defconfig: Enable PDC, CPUidle goverrnor, stats driver for neo
This change enables PDC, CPUidle governor and various stats drivers.

Change-Id: If2e61f913a2fc350c13ae8c9c0cbde926a4c48b7
Signed-off-by: Dhaval Radiya <quic_dradiya@quicinc.com>
2024-08-08 11:56:00 +05:30
QCTECMDR Service
9cfdeb74ee Merge "hwspinlock: qcom: Provide function to bust hwspinlock" 2024-08-07 22:47:17 -07:00
QCTECMDR Service
ffa1703968 Merge "soc: qcom: rpmh: shift spin_lock_init before cpu_pm_register_notifier" 2024-08-07 22:47:16 -07:00
Asit Shah
d58c8c7984 modules.list: neo: Add neo pinctrl related module to first stage
Added pinctrl module for neo platform in first stage module list.

Change-Id: I9131e3a89ef905d283e2bcc3fecd9d479c6fb693
Signed-off-by: Asit Shah <quic_asitshah@quicinc.com>
2024-08-07 22:42:38 -07:00
Asit Shah
247d81e484 arm64: defconfig: Enable pinctrl for neo platform
Enable TLMM pinctrl driver for neo platform in GKI build.

Change-Id: I5e9a2427e7ab96e7a56da6c0f8fbe80796d8b1d1
Signed-off-by: Asit Shah <quic_asitshah@quicinc.com>
2024-08-07 22:42:15 -07:00
Asit Shah
e5676bf12c pinctrl: qcom: Remove trace hooks from Neo pinctrl driver
Removed support of reading gpio read using trace hooks in Neo
pinctrl driver, as it is not used anymore in Kernel Platform 3.0.

Change-Id: If367c8e98a51aaa2c8ca52425b2b2da80177c059
Signed-off-by: Asit Shah <quic_asitshah@quicinc.com>
2024-08-07 22:41:53 -07:00
Asit Shah
96415a61d2 pinctrl: qcom: Add TLMM support for Neo platform
Neo pinctrl driver snapshot from msm-5.10 branch
commit 1c8fbf07237c ("drivers: pinctrl: qcom: Add gpio to pdc
mapping for neo").

Change-Id: I944d2ae61c2f80501442e2ca8d9229c4229c9a2d
Signed-off-by: Asit Shah <quic_asitshah@quicinc.com>
2024-08-07 22:41:08 -07:00
Pranav Mahesh Phansalkar
ba3c82504e rpmsg: native: Remove IRQF_ONESHOT flag
Remove IRQF_ONESHOT flag as it disables incoming interrupts
while running threaded irq.

Change-Id: Ieb045e8aee3fc3b179fc7e7517064ba1c76a4483
Signed-off-by: Pranav Mahesh Phansalkar <quic_pphansal@quicinc.com>
2024-08-07 22:04:03 -07:00
QCTECMDR Service
83cd56ed58 Merge "modules.list.msm.autogvm: Keep stub regulator to first stage" 2024-08-07 07:27:46 -07:00
QCTECMDR Service
a1c603ec59 Merge "usb: phy: qusb: Fix for USBNOC issue in stability" 2024-08-07 07:27:45 -07:00
QCTECMDR Service
88e712d907 Merge "build: Add bazel support for Neo LA" 2024-08-07 07:27:45 -07:00
QCTECMDR Service
a1e62beffe Merge "soc: qcom: rpmh: add cam_rsc check in rpmh_rsc_get_device() API" 2024-08-07 07:27:45 -07:00
QCTECMDR Service
b8f2e10b77 Merge "build: bazel: Enable compilation for Seraph SoC" 2024-08-07 07:27:44 -07:00
Richard Maina
422eacf6fc hwspinlock: qcom: Provide function to bust hwspinlock
Implement a new operation qcom_hwspinlock_bust() which
can be invoked to bust any locks that are in use when
a remoteproc is stopped or crashed.

Change-Id: I0486d5345a47007f254f17c4b88f802a6c962e3a
Signed-off-by: Richard Maina <quic_rmaina@quicinc.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
Link: https://lore.kernel.org/r/20240529-hwspinlock-bust-v3-1-c8b924ffa5a2@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Git-commit: 73100deb59c3892e280234fcc0171a5376c71788
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[quic_deesin@quicinc.com: Adding bust api in core hwspinlock module
 is breaking KMI, so exporting bust function from qcom hwspilock module
 to avoid dependency on core hwspinlock function]
Signed-off-by: Deepak Kumar Singh <quic_deesin@quicinc.com>
2024-08-07 00:46:33 -07:00
Sneh Mankad
591653de4d soc: qcom: rpmh: shift spin_lock_init before cpu_pm_register_notifier
cpu_pm_notifier is acquiring the spinlock before it is initialized,
leading to spinlock with bad magic,
hence moving the initialization prior to that.

Change-Id: Ibae81d3bc2338dd0be5f2bc509cec559b121fc73
Signed-off-by: Sneh Mankad <quic_smankad@quicinc.com>
2024-08-07 11:42:08 +05:30
Kamal Wadhwa
6103dd41dc power: supply: qti_battery_charger: Register wls_psy based on DT property
Currently, wireless power supply (wls_psy) is registered
by default to support wireless charging. However,
on some boards, wireless charging is not supported.
When the properties under wls_psy are read from the
userspace or a client, it times out and prints error
logs unnecessarily leading to a poor user experience.

Hence, add a DT property "qcom,wireless-charging-not-supported"
which if specified wouldn't register the wls_psy.

Change-Id: If4ed36957fa8425018f80dfa43d82ee746a45566
Signed-off-by: Kamal Wadhwa <quic_kamalw@quicinc.com>
Signed-off-by: Jishnu Prakash <quic_jprakash@quicinc.com>
2024-08-06 22:33:49 -07:00
Sneh Mankad
57c9b20c84 soc: qcom: rpmh: add cam_rsc check in rpmh_rsc_get_device() API
This API is only meant for getting Camera RSC device,
hence preventing any other client to use it for any other device.

Change-Id: I6b1cef1cd98eb1d0c5fa92b67a2af141022ec7a3
Signed-off-by: Sneh Mankad <quic_smankad@quicinc.com>
2024-08-06 16:45:17 +05:30
Navya Vemula
af3839c345 build: bazel: Enable compilation for Seraph SoC
Add initial files to build Seraph with bazel.

Change-Id: I5e9677c43a0a31ddec8c0808c22af7f054b8107c
Signed-off-by: Navya Vemula <quic_nvemula@quicinc.com>
2024-08-06 12:19:58 +05:30
Auditya Bhattaram
5a09efd218 drivers: nvmem: qfprom: Add keepout_regions for pineapple
Add keepout_regions for pineapple.

Change-Id: I54840adc0ec5c4f3124495d5b2d5c763bf41390d
Signed-off-by: Auditya Bhattaram <quic_audityab@quicinc.com>
2024-08-06 11:14:58 +05:30
QCTECMDR Service
1f9023b537 Merge "leds: leds-qti-flash: update HW strobe config for external LEDs" 2024-08-05 16:02:06 -07:00
QCTECMDR Service
72bc7678b1 Merge "glink: native: Check the return value of native rx" 2024-08-05 01:46:26 -07:00