Commit Graph

187 Commits

Author SHA1 Message Date
Kamati Srinivas
c558e5abfe drivers: qcom: Add support to freeze-restore watchdog
Freeze the watchdog during suspend and enable it
after resume.

Change-Id: I7e09d2d78f494b8aee9d9c59f681fe6e574a4f9a
Signed-off-by: Shreyas K K <quic_shrekk@quicinc.com>
Signed-off-by: Auditya Bhattaram <quic_audityab@quicinc.com>
Signed-off-by: Kamati Srinivas <quic_kamasrin@quicinc.com>
2024-05-07 13:25:25 +05:30
qctecmdr
11b4eb9f81 Merge "soc: qcom: rpmh-rsc: Enhance check for VREG in-flight request" 2023-06-08 21:23:33 -07:00
Maulik Shah
3c5a3ee896 Revert "soc: qcom: rpmh: Remove serialization of TCS commands"
Client drivers may want to enforce serialization of TCS commands in some
cases like when LDO needs to complete the disable vote first and then go
in low power mode.

Both the commands are sent in same TCS in such cases require serialization
to maintain the order in which the commands are sent.

This reverts 'commit I341b9887a53
("soc: qcom: rpmh: Remove serialization of TCS commands")'.

Change-Id: I54c2e8dd47a8469450cca677fb62a7c6b6d6343b
Signed-off-by: Maulik Shah <quic_mkshah@quicinc.com>
2023-06-08 14:45:59 +05:30
Tengfei Fan
2b4f05c266 soc: qcom: Add support for EVA subset part in socinfo
Add support for EVA subset part in socinfo.

Change-Id: I072506d28b6e9be23e328a66a7a99526771d063b
Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
2023-05-30 20:13:34 -07:00
Tengfei Fan
98f12e6540 soc: qcom: Add support for NSP subset part in socinfo
Add support for NSP subset part in socinfo.

Change-Id: I15e15156edbbf0676c0341606dbe52274dfbac60
Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
2023-05-30 20:13:23 -07:00
Tengfei Fan
12d73dd3fd soc: qcom: socinfo: Add APIs for part count and subpart information
Add kernel APIs to provide part count and subpart information.

Change-Id: Ie0f67555ec3561efa4832c1e0a6863f5842ccb53
Signed-off-by: Naina Mehta <quic_nainmeht@quicinc.com>
Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
Signed-off-by: jianzhou <quic_jianzhou@quicinc.com>
2023-05-30 20:13:09 -07:00
Tengfei Fan
fae13c959e soc: qcom: socinfo: Add API for subpart information
Add kernel API to provide subpart information.

Change-Id: I35631fa6aeffeff8919384f45bf6240a5890233a
Signed-off-by: Naina Mehta <quic_nainmeht@quicinc.com>
Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
2023-05-22 10:40:06 +08:00
qctecmdr
bf8534b6d0 Merge "msm-5.10: Expose TrustedCameraDriver headers to camera kernel" 2023-05-10 23:12:51 -07:00
qctecmdr
e5b192854d Merge "soc: qcom: Add oem variant support for socinfo v17" 2023-05-10 03:53:48 -07:00
Rohit Soneta
80b8e9d4ee msm-5.10: Expose TrustedCameraDriver headers to camera kernel
Expose a new TrustedCameraDriver interface to camera kernel
for lane protection and configuring camera h/w ports.

Change-Id: Ieeb6e3a4817e2db968f3ec812f03eb54f9b7c4c3
Signed-off-by: Rohit Soneta <quic_rsoneta@quicinc.com>
2023-05-09 22:09:25 +05:30
Naman Jain
a093242d98 soc: qcom: Add oem variant support for socinfo v17
Add APIs and support for additional field "oem variant"
introduced in socinfo v17.

Change-Id: Ic60d9749fe6efac82b702fe6cb67aec1fb4f9a47
Signed-off-by: Naman Jain <quic_namajain@quicinc.com>
Signed-off-by: Kamati Srinivas <quic_kamasrin@quicinc.com>
2023-05-04 15:07:30 +05:30
Papanaboyina Bala Narayana
142637aff7 smcinvoke: change smci auto generated headers
Change auto generated headers related to smcinvoke as per the kernel
coding and naming conventions.

Change-Id: I9fdc24db15e0472264245b957ac3e80b43e98558
Signed-off-by: Papanaboyina Bala Narayana <quic_papanabo@quicinc.com>
2023-05-04 14:09:08 +05:30
Sandeep Singh
aa719dfa98 icnss2: Add support for WLAN WCN6450 device
Add corresponding driver support for WCN6450 device.
This change adds compatible dtsi entry, msi config,
v3 shadow register config and vreg regulator details
along with enabling bootup sequence for WCN6450 device.

Change-Id: I406c92cdc2815ffd1108331d382c4972befad998
Signed-off-by: Sandeep Singh <quic_sandsing@quicinc.com>
2023-02-16 23:11:34 +05:30
Naini Singh
d0a32664f7 soc: qcom: socinfo: Add API for subset core/part information
Add kernel API to provide subset core and part information.
Also export the information via sysfs entries.

Change-Id: I92b12d2c1248d78790381edf5cf270cbc72bbbf4
Signed-off-by: Naini Singh <quic_nainsing@quicinc.com>
2023-01-18 15:34:38 +05:30
Divisha Bisht
2557354dd5 smcinvoke: post process object release
When the QTEE is busy with a high concurrency, the objects and shared
memory bridge will not be released and deleted in time, this will lead
to memory leakage issues in the QTEE. To avoid the memory leakage in case
of EBUSY, we add 2 exclusive worker threads to postprocess the object
release and shmbridge deletion separately.
When there is a large shambridge memory which is not deleted in time,
the shambridge in QTEE might be out of memory.We met this issue in the
TVM TUI unit test. To avoid being out of shambridge memory, we should
postpone the deletion of shambridge created by smcinvoke itself.

Change-Id: I620f27cc129255abbe0c3b33c9999dd2a252dd42
Signed-off-by: Divisha Bisht <quic_divibish@quicinc.com>
2022-12-19 16:45:12 +05:30
Sandeep Singh
6b12722480 icnss2: pass fw build id in soc info to wlan host driver
Pass fw build id as part of  soc info to wlan host driver.

Change-Id: I6a8bced678ada0f88e744b5fd3f2ed58fa4173ef
Signed-off-by: Sandeep Singh <quic_sandsing@quicinc.com>
2022-10-19 14:54:23 +05:30
Mukesh Ojha
f5803b08f5 va_minidump: Fix the type 'name' in exported API's
'name' passed to the qcom_va_md_register() api should be
const char * type. while at it, Fix this at other places too.

Change-Id: Ibbe260b240989e35dbe9250c1db345f86b9ae410
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
2022-08-16 10:16:43 +05:30
qctecmdr
6f95c77b27 Merge "smcinvoke_kernel_client: Move header to /soc/qcom" 2022-07-30 00:38:28 -07:00
Nitin LNU
198f87d851 smcinvoke_kernel_client: Move header to /soc/qcom
Move header files to /soc/qcom so that any kernel client
could use that and add Auto-generated header files.
export method for get client env so that kernel client
can use the api to get root env object.

Change-Id: Iec6492144602cf09892be5912079056a5970ee85
Signed-off-by: Nitin LNU <quic_nlakra@quicinc.com>
2022-07-29 18:28:20 +05:30
Naman Jain
ed6f055465 va_minidump: Add md_unregister support for clients
Add API for unregistering a notifier block from va-minidump driver.

Change-Id: Iab7ee5e65affdb2bd90dd8eda5f6cbd8beb70f08
Signed-off-by: Naman Jain <quic_namajain@quicinc.com>
2022-07-25 21:14:32 -07:00
qctecmdr
1522b16b3e Merge "remoteproc: qcom: pas: Rename subsystem minidump elf name" 2022-06-10 12:03:20 -07:00
Mukesh Ojha
7b92fc2502 soc: qcom: ramdump: Add support to create/destroy ramdump device
There was a requirement from client drivers to create ramdump
device with a given name so that they control the name of the elf.

This change adds the support to create/destroy ramdump device.

Change-Id: I411cc92a1b41d44e8b6fef95d383613280dae0c2
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
2022-06-06 20:31:58 +05:30
Madhvapathi Sriram
b40d1b6b33 icnss2: Support for PMIC GPIO control for WLAN
Some platforms require PMIC GPIO control to trigger the
PON/POFF sequence of the WLAN chip.

Change-Id: I24023694ecb5579bc84cd897a99596fd57fa5eee
CRs-Fixed: 3209939
Signed-off-by: nakul kachhwaha <quic_nkachhwa@quicinc.com>
Signed-off-by: Madhvapathi Sriram <quic_msriram@quicinc.com>
2022-06-03 10:51:07 +05:30
Sandeep Singh
cf19c91570 icnss2: Add code to pass device configs to wlan driver
Add code to pass device configs to wlan driver.

Change-Id: I977fc564914f9fbdabc0004eff4c5c2f14a1fc7c
Signed-off-by: Sandeep Singh <quic_sandsing@quicinc.com>
2022-03-09 21:13:35 +05:30
Varun Garg
142ed59ad0 msm_perf: Enable gPLAF algo on firmware
Added scmi transaction for working of gPLAF
algorithm on firmware. Added write method as part
of PnC algo on firmware to share data.
Added few sysfs node to notify about start/stop
of game and other data.

Change-Id: I9fc16237b7d5e16a72eaed45fca7abd68f891ccc
Signed-off-by: Varun Garg <quic_gargv@quicinc.com>
2022-02-23 22:01:50 -08:00
Sandeep Singh
d210ffcf26 icnss2: Add check if wlan driver supported device existing
ICNSS2 supports both Adrastea and Moselle. ICNSS2 platform
driver should reject wlan driver registration for device
id which is not detected during icnss2 probe.

Change-Id: I3e4ebe48a5364cb92091a4e007ba4952838c2f3c
Signed-off-by: Sandeep Singh <quic_sandsing@quicinc.com>
2022-02-04 12:18:02 +05:30
Huang Yiwei
a8aeb1cade qcom: wdog: Add irq name to irq tracker output
Only print irq number is not human readable, so add
irq name and its irq_chip also to be printed at the
same time.

Change-Id: I467b6f37cccbc5a6fba8f1672ce1ca76f39348d7
Signed-off-by: Huang Yiwei <quic_hyiwei@quicinc.com>
2022-01-04 14:52:53 +08:00
Minghao Zhang
df11f0acfa soc: qcom: Modify output of ddr residency
This change provides below functionality:
1. In debugfs, ddr residency can be read; calculate duration
percentage of ddr mode and ddr freq separately.
2. Provides 3 APIs to sync ddr freq, get ddr residency and
get the count of supported ddr freq.

Change-Id: Icda97eb4de193209a9da09786dff1227ab5fb91e
Signed-off-by: Minghao Zhang <quic_minghao@quicinc.com>
2021-12-20 11:19:30 +08:00
Minghao Zhang
1399dd09d6 soc: qcom: Add has_system/subsystem_slept() APIs
This change provides two APIs to check system and subsystem
has entered sleep or not. These can be used to know after
kernel resume which subsystem may have blocked AOSD/CXSD/DDR
sleep.

Change-Id: I19d56c1415116ff82b206b931092ed123e8d4a69
Signed-off-by: Minghao Zhang <quic_minghao@quicinc.com>
2021-12-09 10:50:22 +08:00
qctecmdr
6d3bf01db7 Merge "drivers: soc: dcvs: Send updated tunables to cpucp through sysfs" 2021-09-27 12:19:30 -07:00
Rishabh Bhatnagar
54d475ed6b drivers: dcvs: memlat: Setup scmi cpucp configuration
Configure cpucp by sending scmi messages about pmu maps and tunables.
This function is invoked once the underlying scmi layer is setup.

Change-Id: I58d9eafd4df262afd7f0ef5edb91fe2b8471563e
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
2021-09-24 12:46:55 -07:00
Siddharth Gupta
fc0253777c soc: qcom: ramdump: Add support for elf64 dumps
The qcom_elf_dump() API currently only supported elf32 dumps, but
the kernel is compiled as CONFIG_BIT64=y. This results in the
addresses in the elf header being truncated. This change adds
support to specify the class of the elf file to be generated.

Change-Id: I1b72a828df0b45978891ed6ba6261273200500b0
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
2021-09-20 23:54:03 -07:00
qctecmdr
175bba5f17 Merge "soc: qcom: soc_sleep_stats: API to get bandwidth info on DDR" 2021-07-27 02:56:57 -07:00
Tushar Nimkar
3493ab926a soc: qcom: soc_sleep_stats: API to get bandwidth info on DDR
Various subsystem vote for DDR bandwidth while running use-case.
This change adds API support to know bandwidth vote information of such
subsystem on ddr.

Change-Id: I8dc9d6fccb234d10ec868b348b3c34cf84bfb231
Signed-off-by: Tushar Nimkar <tnimkar@codeaurora.org>
2021-07-26 18:04:35 +05:30
Mukesh Ojha
684136f2ed va_minidump: add support for dynamically enable/disable clients entry
This change provides sysfs interface for clients to dynamically
enable/disable their entries in final va-minidump collection.

Change-Id: Ida03e96520e51ee6b61e53fd9a67e9b5b5b4e1ed
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
2021-07-15 22:19:09 -07:00
Amir Vajid
a138240069 drivers: dcvs: add support for multiple ddr types
Add the ability to support different DDR frequency tables
for different DRAM types in qcom dcvs. This includes adding
an API for clients to retrieve the correct DT child node
that contains a "qcom,ddr-type" property with a DDR type
that matches the current hardware. Use this API in memlat
to support multiple cpufreq-memfreq tables for different
DDR types.

Change-Id: I6ce5cf9b483785ae2dbe1f28cf0979dee3432333
Signed-off-by: Amir Vajid <avajid@codeaurora.org>
2021-07-13 11:28:29 -07:00
Naman Padhiar
99e5825db4 icnss2: Add ICNSS_SMMU_FAULT uevent
Add ICNSS_SMMU_FAULT enum to be used from Host driver.

Change-Id: Ia10a103a0e24aceffe1d691ed9545f7aa59024c5
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
2021-06-14 21:18:36 -07:00
qctecmdr
599821925b Merge "qseecom : Add support for fuse syscall" 2021-06-08 20:12:30 -07:00
Monika Singh
9a6df0bac5 qseecom : Add support for fuse syscall
Add changes to support syscall to return fuse
configuration on the device. Also rename
function to improve redability.

Change-Id: Idec01fec75a5dd6a86ad6dc319d18129c4ec2740
Signed-off-by: Monika Singh <monising@codeaurora.org>
2021-06-08 04:10:58 -07:00
Rishabh Bhatnagar
db9ce95e41 drivers: firmware: pmu_vendor: Add PMU vendor protocol
Add PMU vendor protocol to share HLOS PMU configuration with
cpucp. Configuration includes the hardware counter ids for all
cpucp events and is shared when pmu scmi driver probes.
Isolating this protocol from memlat removes dependency
on memlat.

Change-Id: I17fefccdb5f041bd75dd3744ccbfca9504fde0c5
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
2021-06-07 12:21:25 -07:00
Rishabh Bhatnagar
36a41aa003 drivers: dcvs: pmu_lib: Add capability to read AMU counters
Add capability to read AMUs if support exists for the chipset.
AMU ids are read from device tree and they correspond to the enum
of supported AMU counters.

Change-Id: I15516f370de891cc9d871e13330e8ff2fcef9f26
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
2021-06-07 12:20:33 -07:00
Prateek Sood
1cf7e2cb27 va_minidump: add support for client to write parsed output in ELF
Add support for clients to register a callback, which can be used
to write parsed output in payload offset of ELF section.

Change-Id: I4629409bddf6cc062b8b7ca6f25399881834f483
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
2021-05-31 23:19:42 -07:00
qctecmdr
d76f29c148 Merge "minidump: Implement driver for VA based minidump" 2021-05-31 06:48:52 -07:00
Prateek Sood
e9dbbe68c3 minidump: Implement driver for VA based minidump
Implement driver for VA based minidump. This driver helps
in registering dynamic data structures from vendor modules
with minidump. This driver works on VA, which would be
contiguous even if physical pages are scattered.

Each client can register area with contiguous VA as a
section for ELF. This driver creates ELF in panic
notifier, combining all the section registered by client
drivers.

Change-Id: I78e5527714143dc65d2aeb3ec070da552d63e603
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
Co-developed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
2021-05-31 12:38:37 +05:30
Naman Padhiar
a153fc4b20 icnss2: Update ICNSS2 driver
Update ICNSS2 driver and related files as of msm-5.4 commit
0611102d4e900a7553201992c97a9bc9bfaa00c5.

Change-Id: Iffbc320773b4116dc938b0310948616579d8c301
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
2021-05-27 10:46:37 +05:30
Maria Yu
63e8c7c206 soc: wdog: Ensure missing user watchdog pet can trigger bite
The user watchdog was waiting the hardware watchdog bite by
stop petting it. But in the cpu suspend scenarios, the auto petting
by hardware prevent the expected watchdog bite. So add a new user pet
timer to explicitly trigger the watchdog bite by software when the user
watchdog petting is not happenned before timeout.

Change-Id: I71b1139192baa960ae00f7a27c630aedaf5a3ffa
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
2021-05-26 16:57:16 +08:00
qctecmdr
7202f44304 Merge "drivers: dcvs: pmu_lib: Update event locking scheme" 2021-03-30 23:15:50 -07:00
Amir Vajid
0f635d7d1e drivers: dcvs: pmu_lib: Import events from device tree
The events managed by pmu_lib are dynamically allocated by
clients via qcom_pmu_create/delete. This offers runtime
flexibility but requires additional synchronization with
pmu event reads and runs the risk of one client configuring
all pmu events. Instead, define the events in device tree
and provide an API for checking if a particular event is
supported in pmu_lib.

Change-Id: Ia9aad96e5f0e5900e7f863be97c79839da766f5c
Signed-off-by: Amir Vajid <avajid@codeaurora.org>
2021-03-30 18:05:37 -07:00
Mukesh Ojha
0f322f7083 minidump: Remove SLUB_DEBUG and PAGE_OWNER for compilation
Remove SLUB_DEBUG and PAGE_OWNER config guarded code in
minidump for now as some of the defination of function
is not implemented yet. And we can always bring back
this code once the change is available and functional.

Change-Id: Iad931e507437a1afe7341493182495bdc078899a
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
2021-03-23 18:00:00 +05:30
Prateek Sood
5191f11ee5 soc: wdog: Update irq stat implementation for IPI
Implementing IPI irq stats using nr_ipi and ipi_desc.
This helps in getting per cpu and total IPI count at
watchdog pet, watchdog bark and panic.

Change-Id: Ie6bba0273a232533d2d165d168fc14b102d431f8
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
2021-03-23 17:58:33 +05:30