summaryrefslogtreecommitdiff
path: root/drivers/soc/qcom
AgeCommit message (Collapse)Author
2026-03-24qcom: rpmh: don't error for SLEEP requestsCasey Connolly
Just stub out non-active votes, if we return an error the caller may propagate it and not send its active vote. Since we don't suspend there's no risk of us entering a broken state due to missing votes. Link: https://patch.msgid.link/20260320-casey-qcom-rpmh-serial-fixes-v1-2-b81d05832eec@linaro.org Signed-off-by: Casey Connolly <[email protected]>
2026-01-14soc/qcom: rpmh: add RPMh readCasey Connolly
Implement support for RPMh reads, these allow reading out the current votes for RPMh controlled resources such as regulators and interconnects. Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2026-01-14soc/qcom: rpmh: correctly wait for TCS flushCasey Connolly
Several bugs were discovered in the rpmh-rsc driver which collectively meant we were never actually waiting for the TCS to flush, these were likely missed because U-Boot runs single threaded and the RPMh had typically processed the single command we sent by the time we went to send the next one. However a future patch will implement rpmh read support which requires us to properly wait for the RPMh command response so we can return the value. Fix these issues so we correctly ensure the TCS is done before returning. Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2026-01-14soc/qcom: rpmh: document rsc registersCasey Connolly
Add some comments explaining a few of the RSC registers Reviewed-by: Neil Armstrong <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2026-01-14soc: qcom: rpmh-rsc: reclaim the TCS to avoid spurious irq in LinuxNeil Armstrong
If we don't reclaim and clear the IRQ bits, we might get a spurious interrupt from this TCS in Linux: WARNING: CPU: 0 PID: 0 at drivers/soc/qcom/rpmh-rsc.c:451 tcs_tx_done+0x98/0x270 ... Call trace: tcs_tx_done+0x98/0x270 (P) __handle_irq_event_percpu+0x60/0x220 handle_irq_event+0x54/0xc0 handle_fasteoi_irq+0xa8/0x1c0 handle_irq_desc+0x3c/0x68 generic_handle_domain_irq+0x24/0x40 gic_handle_irq+0x5c/0xd0 ... Signed-off-by: Neil Armstrong <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
2025-11-18soc: qcom: cmd-db: Add cmd_db_read_slave_id() & cmd_db_read_aux_data() functionsAswin Murugan
Partially reverted commit "soc: qcom: cmd-db: drop unused functions" by restoring only the cmd_db_read_slave_id() and cmd_db_read_aux_data() functions, which were removed in that commit. These functions are required for the RPMH Power Domain Driver. Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Casey Connolly <[email protected]> Signed-off-by: Balaji Selvanathan <[email protected]> Signed-off-by: Aswin Murugan <[email protected]> Reviewed-by: Casey Connolly <[email protected]>> --- Link: https://patch.msgid.link/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-08-14soc: Tighten some soc driver dependenciesTom Rini
The Qualcomm Snapdragon "SoC" driver cannot build without access to some ARM64 specific functionality. Express that requirements in Kconfig as well. Reviewed-by: Casey Connolly <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-09-06soc: qcom: rpmh-rsc: add back __tcs_set_trigger() for SM8550/SM8650Neil Armstrong
The TCS writes has no effect after the removal of the __tcs_set_trigger() call, obviously it seems the RSC version 3 requires it to complete the transactions. Fixes: 80c5be164ad ("soc: qcom: rpmh-rsc: drop unused multi-threading and non-active TCS support") Signed-off-by: Neil Armstrong <[email protected]> Tested-by: Caleb Connolly <[email protected]> # sm8250 rb5 Reviewed-by: Caleb Connolly <[email protected]>
2024-09-06soc: qcom: cmd-db: map cmd-db regionCaleb Connolly
On at least SM8650 this region might not be included in the memory map. Use the new mmu_map_region() helper to map it during bind(). Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-09-06soc: qcom: cmd-db: use strncmp() instead of memcmp()Caleb Connolly
memcmp() can cause aborts on some platforms and generally seems to be the wrong approach here. Use strncmp() instead which is more correct. Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-07-26soc: qcom: add build infrastructureCaleb Connolly
Add Kconfig / Makefiles to build rpmh and cmd-db drivers. Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-07-26soc: qcom: rpmh: U-Boot API changesCaleb Connolly
Fix build errors, add some debug logging. Acked-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-07-26soc: qcom: rpmh: drop unused functionsCaleb Connolly
A lot of the features in here are only relevant when running multi-threaded with interrupts. Drop everything except what we need to run single-threaded with a single TCS (which is all the rpmh-rsc framework in U-Boot supports). Keep rpmh_write_async() for simplicity and make it wrap the regular rpmh_write(). Acked-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-07-26soc: qcom: rpmh: adjust headers for U-BootCaleb Connolly
Drop unused/unsupported Linux headers and add dm/device.h for U-Boot. Acked-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-07-26soc: qcom: rpmh-rsc: remaining U-Boot API changesCaleb Connolly
Minor adjustments to fix building with U-Boot and work correctly as a synchronous driver without interrupts. RPMh is fast enough that we can get away with just firing off requests and assuming they complete. U-Boot behaviour changes are annotated with a "U-Boot:" comment. Acked-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-07-26soc: qcom: rpmh-rsc: adjust probe for U-BootCaleb Connolly
Rework the rpmh-rsc initialization to use U-Boot's driver model and initialize cmd-db. Acked-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-07-26soc: qcom: rpmh-rsc: adjust headers for U-BootCaleb Connolly
Remove unsupported / unused Linux headers and add those needed for U-Boot. Acked-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-07-26soc: qcom: rpmh-rsc: drop unused multi-threading and non-active TCS supportCaleb Connolly
Since U-Boot is single threaded, we can avoid most of the complexity that comes with handling more than one in-flight TCS. Drop all the rpmh code associated with multi-threading as we'll instead wait for a response on each TCS. Acked-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-07-26soc: qcom: cmd-db: adjust for U-Boot APICaleb Connolly
Keep the header pointer in the .data section so we don't initialize it again after relocation, adjust cmd_db_get_header() to work with the U-Boot API, and skip validating the header since all cmd-db users are children of the rpmh-rsc and those children will only probe if cmd-db initializes successfully. Acked-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-07-26soc: qcom: cmd-db: adjust probe for U-BootCaleb Connolly
Integrate cmd-db into the U-Boot driver model. This is just a wrapper around an in-memory database, so we just need to get the address and validate that cmd-db is there. Since cmd_db_header will be stored in the .data section we can skip bind if it's already set. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-07-26soc: qcom: cmd-db: drop unused functionsCaleb Connolly
Due to our simpler rpmh-rsc driver and lack of debugfs, we don't need quite a few cmd-db functions, just drop them. Acked-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-07-26soc: qcom: cmd-db: adjust headers for U-BootCaleb Connolly
Replace unused/unsupported Linux headers with appropriate U-Boot alternatives. Acked-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-07-26soc: qcom: import rpmh and cmd-db drivers from LinuxCaleb Connolly
Import RPMh and cmd-db framework from Linux 6.10-rc6. Acked-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>