Commit Graph

35 Commits

Author SHA1 Message Date
Praveen koya
9576c8ce3f soc: qcom: sanity check for aon_com_dev node
Add sanity check to handle write operation on
aon_com_dev node from userspace when driver
is not initialized.

Change-Id: I1bd1fb94ee5b59ff113f8e359c303a2dd1f47430
Signed-off-by: Praveen koya <quic_pkoya@quicinc.com>
2023-12-21 09:06:22 +05:30
qctecmdr
3d98818bbe Merge "soc: qcom: disable rf_clk2 clock on aon boot" 2023-10-29 23:24:44 -07:00
qctecmdr
45f7b15cb4 Merge "soc: qcom: set rproc unload flag during RTOS exit" 2023-10-18 22:55:12 -07:00
Ganesh Keethol
d7907cb58f soc: qcom: increase glink channel open timeout
Increase in glink channel open timeout to work all
cases.

Change-Id: I5da00646701b4ae288d5fe391c10300024579ab1
Signed-off-by: Ganesh Keethol <quic_gkeethol@quicinc.com>
2023-09-27 02:39:38 -07:00
Naveen S Nair
4b48efe1cb soc: qcom: set rproc unload flag during RTOS exit
Set rproc unload flag during RTOS exit. This is required for AON rproc
coredump routine. Clear the flag on next AON load completion.

Change-Id: I78db969f82e920c668645427424151240fcbc07f
Signed-off-by: Naveen S Nair <quic_naveensn@quicinc.com>
2023-09-26 23:08:37 +05:30
Naveen S Nair
a92e5fb34e soc: qcom: Handle subsystems shutdown and powerup events
Add support to send ADSP and MPSS subsytems pre powerup & down
events to AON, which helps to handle the subsystem SSR gracefully.

Change-Id: I103efd6fcd7b44608f50d8116a325ddc874aadc9
Signed-off-by: Naveen S Nair <quic_naveensn@quicinc.com>
Signed-off-by: Praveen koya <quic_pkoya@quicinc.com>
2023-08-26 22:43:18 +05:30
Ganesh Keethol
e875645cb9 soc: qcom: disable rf_clk2 clock on aon boot
As rf_clk2 required only for AON boot, disable
on post aon boot complete.

Change-Id: I8ec0108a570dbc00f9364a43c15057b8b9e51b5b
Signed-off-by: Ganesh Keethol <quic_gkeethol@quicinc.com>
2023-07-28 19:57:29 +05:30
qctecmdr
439f1ab227 Merge "soc: qcom: add support to get aon unload state" 2023-07-04 07:09:16 -07:00
Praveen koya
4e0583af13 soc: qcom: error handling on aon load
Error handling on AON load when failed to get
remoteproc handle.

Change-Id: Ie8924e5760724e514e94a75fab0f082e31ec9b89
Signed-off-by: Praveen koya <quic_pkoya@quicinc.com>
2023-06-27 08:31:05 +05:30
Praveen koya
c723d21f5c soc: qcom: add support to get aon unload state
Add support to get current AON unload state and to
differentiate between SSR and force AON shutdown.

Change-Id: I21f94791d89ea597536d2edeaaa23d6b25aa2032
Signed-off-by: Praveen koya <quic_pkoya@quicinc.com>
2023-06-22 10:48:16 +05:30
Praveen koya
97786820aa soc: qcom: skip get rproc handle if present
Skip getting rproc handler if it is already available
on RTOS exit path.

Change-Id: Ia675a7fa17f0e4e7fa947707db34b5a924420696
Signed-off-by: Praveen koya <quic_pkoya@quicinc.com>
2023-06-14 03:17:44 -07:00
Ganesh Keethol
a67d11c8c5 soc: qcom: update correct ioctl enum
Update correct ioctl enum for aon register
read and write.

Change-Id: If31fa722ea0598e7211537bfc367dac085bebd6f
Signed-off-by: Ganesh Keethol <quic_gkeethol@quicinc.com>
2023-06-13 01:37:39 -07:00
Chandrasekhar Mattaparthy
00d28e8703 soc: qcom: handle AON ioctl call for no aon device
Handle AON ioctl call for no aon device from AON driver.

Change-Id: I69c7106a2a2f963c77f4b74fb7bbb07fcf0c8aa1
Signed-off-by: Chandrasekhar Mattaparthy <quic_cmattapa@quicinc.com>
2023-06-05 09:28:35 +05:30
Praveen koya
8a271e2bbc soc: qcom: add buffer overflow check on AON rx_buffer
Add buffer overflow check while accessing data buffer
received from AON.

Change-Id: I0472a0ad1e6edc3fe8102850fddacd89ceea4959
Signed-off-by: Praveen koya <quic_pkoya@quicinc.com>
2023-06-02 18:37:27 +05:30
Praveen koya
052fe5ddd3 soc: qcom: enable ramdump collection on TWM exit
Enable AON ramdump on TWM exit if it is crashed.

Change-Id: I65ffd25874b5b1516531429c41b05b4107d5e246
Signed-off-by: Praveen koya <quic_pkoya@quicinc.com>
2023-05-29 15:38:52 +05:30
Ganesh Keethol
e58809f026 soc:qcom: add support send aon boot status
Add support to send aon boot status as seb events.
Any client can register for aon status to seb driver
and seb driver send respective aon state to client.

Change-Id: Iacbc5eb50b35a987a27083275a84513cf1b5336d
Signed-off-by: Ganesh Keethol <quic_gkeethol@quicinc.com>
2023-05-19 09:17:05 +05:30
Praveen koya
598c2bd600 soc: qcom: add common ioctl for AON boot commands
Add common ioctl command for below AON boot cmds
to reduce the code complexity
 - SOFT_RESET.
 - TWM_EXIT.
 - AON_APP_RUNNING.
 - LOAD.
 - UNLOAD.
 - SET_BOOT_MODE.
 - GET_BOOT_MODE.
 - CMD_SAVE_AON_DUMP.
 - BOOT_STATUS.

Change-Id: I7f358a210a24e3b57d05ea0bd619c7e691e27119
Signed-off-by: Praveen koya <quic_pkoya@quicinc.com>
2023-05-15 15:38:51 +05:30
Praveen koya
cbe9a5fda5 soc: qcom: add support to collect dump on TWM exit
Add support to collect AON dumps when AON is in
crash state on TWM exit.

Add common ioctl for AON BOOT commands.

Change-Id: I3d88c74a99364a9e200cbeb6b8e70c1881bb3f38
Signed-off-by: Praveen koya <quic_pkoya@quicinc.com>
2023-05-03 12:01:15 +05:30
Praveen koya
a379be96f0 soc: qcom: add common ioctl for IPC commands
Add common ioctl command for below IPC cmds to
reduce the code complexity:
 - DEVICE_STATE_TRANSITION.
 - SEND_TIME_DATA.
 - SEND_DEBUG_CONFIG.
 - GET_VERSION.
Add support to get AON firmware version.

Change-Id: Ic0f9965f0310b9975201e0ed26ba6c2306c74e1a
Signed-off-by: Praveen koya <quic_pkoya@quicinc.com>
2023-04-19 17:55:07 +05:30
Praveen koya
122f3ffa63 soc: qcom: handle rproc AON boot failure
Handle rproc AON boot fail which allow AON
boot on re-try.

Change-Id: Ied686895497d573a89788e6d0b505f5fac1cf103
Signed-off-by: Praveen koya <quic_pkoya@quicinc.com>
2023-04-03 20:56:28 -07:00
Praveen koya
42216b28ed soc: qcom: add support for AON soft reset
Add support to send reset signal to AON via TZapp and
expose this to userspace via ioctl command.

Change-Id: Ic79d2a7d8f75baca310e25c62183e2142d343805
Signed-off-by: Praveen koya <quic_pkoya@quicinc.com>
2023-03-20 17:03:49 +05:30
Praveen koya
f9a922e87b soc: qcom: add support to set & get AON boot mode
Add support to enable API's for set & get AON boot mode.

Change-Id: I16da8f8640c6c85227a47978b999eb5753080ff3
Signed-off-by: Praveen koya <quic_pkoya@quicinc.com>
2023-03-02 22:18:49 +05:30
Praveen koya
219ed75116 soc: qcom: move the aon interface header to common path
Move the aon interface header file to common vendor
include path.

Change-Id: Iba7a66fb6632c1cef05625fa6acb0dc71a46faa6
Signed-off-by: Praveen koya <quic_pkoya@quicinc.com>
2023-02-01 02:42:07 -08:00
Praveen koya
a01f8e0540 soc: qcom: align aon_ui_data uapi structure
Align aon_ui_data uapi structure with attribute_packed macro.

Typecast the 32-bit userspace timesync packet buffer pointer
to handle it on 64-bit kernel and transfer to aon.

Change-Id: I030b10efc72a0466c96b402795d8f9d22e9fcf4a
Signed-off-by: Praveen koya <quic_pkoya@quicinc.com>
2023-01-24 16:00:54 +05:30
qctecmdr
d68ab0e133 Merge "soc:qcom: Macro modified to mitigate IOCTL encoding" 2023-01-23 12:00:03 -08:00
Vivek Yadav
6d1e7aa15e soc:qcom: Macro modified to mitigate IOCTL encoding
Modify the IOCTL macro to mitigate the problem due to
interaction between 32 bit user space and 64 bit kernel.

Change-Id: I6ecf1c6af42bfc63ca1a82303dc24ceda7c06f1c
Signed-off-by: Vivek Yadav <quic_viveyada@quicinc.com>
2023-01-23 10:58:07 +05:30
Praveen koya
be43cce0ab drivers: soc: update ssr domain for adsp & modem
Update ssr domain for adsp and modem subsystems
according remoteproc framework to register other
subsystems ssr event notification on aon interface.

Change-Id: Ibc1a1ed8914d7eae359d13795cabe0485e43c841
Signed-off-by: Praveen koya <quic_pkoya@quicinc.com>
2023-01-18 22:55:49 -08:00
Vivek Yadav
bef2ae244f soc:qcom: Modify control, event bridge and rsb channel
Modify the interface, seb and rsb channels to mitigate
the circular dependency issue.

Change-Id: I0c64e62bfc5c54c14283b746cf3e075071724f25
Signed-off-by: Vivek Yadav <quic_viveyada@quicinc.com>
2022-12-07 14:33:09 +05:30
Vivek Yadav
64480661b5 soc:qcom: Create Sysfs node for BT and DSP states
To check the BT and DSP status need to have sysfs
node.

Change-Id: Ie2781592d5a2cb06061e52f0fd8e2fe5f5b116fb
Signed-off-by: Vivek Yadav <quic_viveyada@quicinc.com>
2022-11-30 11:14:06 +05:30
Praveen koya
bc89b4077e drivers: soc: add 32-bit compat mode support
Add compat_ioctl handler inorder to support 32-bit user space
running on 64-bit kernel for aon interface module.

Change-Id: Ie07b6b8017b1f56a5a12a063aff3c856c86ecb76
Signed-off-by: Praveen koya <quic_pkoya@quicinc.com>
2022-11-25 21:11:00 +05:30
Vivek Yadav
00af1f8e3f soc:qcom: Add functionality to load and unload firmware
Add functionality to load and unload remote processor
firmware.

Change-Id: Ie3308d7dbb69dbed472070d5536ff65ac21ef705
Signed-off-by: Vivek Yadav <quic_viveyada@quicinc.com>
2022-11-21 11:27:08 +05:30
Vivek Yadav
fb2428828f soc:qcom: Remove cyclic dependency for spi client interface
Refactor the code to remove cyclic dependency between interface
and client spi driver.

Change-Id: I8df32542483fdc02260b4a5fc6c7c294d3605f6a
Signed-off-by: Vivek Yadav <quic_viveyada@quicinc.com>
2022-11-16 15:09:53 +05:30
Vivek Yadav
22cbbe3b65 soc:qcom: Remove cyclic dependency for control channel
Refactor the code to remove cyclic dependency between interface
control channel and its corresponding rpmsg driver.

Change-Id: I390d0fe3cddb38928df839be75475b59586fc6df
Signed-off-by: Vivek Yadav <quic_viveyada@quicinc.com>
2022-11-16 15:00:11 +05:30
Vivek Yadav
524912215b soc:qcom: Enable SSR for subsystems
Integrate code to enable SSR for various subsystems defined
as remote processor, adsp and modem.

Change-Id: I3f2f834d4c1a96c5889dec50e5ee0e7d59e4e6e4
Signed-off-by: Vivek Yadav <quic_viveyada@quicinc.com>
2022-11-01 09:18:40 +05:30
Praveen koya
39d7bf985e soc: qcom: port aon specific drivers from msm-5.4
Port AON specific spi & interface drivers from msm-5.4.

Snapshot is taken from msm-5.4 kernel @commit 24a8858e323279
(soc: qcom: initialize variables).

Add pm_suspend_via_firmware() to differentiate b/w
RBSC & DS instead of msm_sleep_current.

Remove dependency of aon pil & subsystem drivers.

Change-Id: Ic6860f07149e9e28b8846f43886f5e44edf59e5c
Signed-off-by: Chandrasekhar Mattaparthy <quic_cmattapa@quicinc.com>
Signed-off-by: Praveen koya <quic_pkoya@quicinc.com>
2022-07-29 17:26:39 +05:30