linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 00/12] Sahara protocol enhancements.
@ 2025-08-25 10:19 Kishore Batta
  2025-08-25 10:19 ` [PATCH v1 01/12] Add documentation for Sahara protocol Kishore Batta
                   ` (11 more replies)
  0 siblings, 12 replies; 26+ messages in thread
From: Kishore Batta @ 2025-08-25 10:19 UTC (permalink / raw)
  To: jeff.hugo, bjorn.andersson, konradybcio, konrad.dybcio
  Cc: andersson, linux-arm-msm

Hi Team,                                                                        
                                                                                
I am submitting a series of patches to enhance Sahara protocol framework in     
Linux kernel.                                                                   
                                                                                
The current sahara driver is present in drivers/accel/qaic directory and it has 
Qualcomm AIC specific image table hardcoded in it. This is making Sahara        
protocol to be strictly tagged to Qualcomm AIC devices. We have another device  
called QDU100 where it uses sahara protocol for transfer of images from host    
filesytem, to collect memory dumps. To achieve this, the sahara protocol driver 
needs to be at a common location. Hence it is now moved to                      
drivers/soc/qcom/sahara directory. This change also brings in a mechanism for   
client drivers such as AIC and QDU100 to register the device specific image     
table with Sahara protocol. The Sahara driver will pick the right image table   
during runtime based on the device attached to the system.                      
                                                                                
In addition to this, during the first boot up of the device, the sahara driver  
loads the dummy DDR training data file present in the firmware filesystem.      
When this dummy data is sent to device, the device sees that the training data  
is invalid and triggers DDR training. This training data needs to be saved at   
the host end. In the subsequent bootup of the device, the saved training data is
sent to the device thus restoring the DDR training data and reduces the boot    
time of the device.                                                             
                                                                                
The handling of save and restore of DDR training data is done via the Sahara    
protocol with mode set to Command mode. The Sahara protocol at host and device  
exchanges relevant packets and once the training data is saved, the mode of     
operation again changes back to image transfer mode to continue loading of next 
images.                                                                         
                                                                                
The DDR training data is exposed to userspace via the sysfs node. There will be 
a service which is triggered by a udev rule that reads the sysfs node in every  
bootup and then saves the training data file in the firmware filesystem in the  
format - mdmddr_0x<serial_number>.mbn as each card connected will have its own  
serial number. The userspace service is hosted at this location -               
https://github.com/qualcomm/csm-utils                                           
                                                                                
Thank you for reviewing these patches. I look forward for your feedback.

Kishore Batta (12):
  Add documentation for Sahara protocol.
  drivers: accel : Move AIC specific image tables to mhi_controller.c
    file
  drivers: accel: qaic: Support for registration of image tables in
    Sahara.
  drivers: accel: Register Qualcomm AIC specific image tables with
    Sahara.
  drivers: soc: qcom: Move Sahara driver to drivers/soc/qcom directory.
  drivers: soc: qcom: Add support for Qualcomm QDU device.
  drivers: soc: qcom: Add sysfs support for DDR training data in Sahara.
  drivers: soc: qcom: Support Sahara command mode packets(READY and
    EXECUTE)
  drivers: soc: qcom: Remove is_mem_dump_mode variable.
  drivers: soc: qcom: Support for DDR training in Sahara.
  drivers: soc: qcom: Support to load saved DDR training data in Sahara.
  Add sysfs ABI documentation for DDR training data node.

 .../testing/sysfs-bus-mhi-ddr_training_data   |   19 +
 Documentation/sahara/index.rst                |   14 +
 Documentation/sahara/sahara_protocol.rst      | 1241 +++++++++++++++++
 drivers/accel/qaic/Kconfig                    |    1 +
 drivers/accel/qaic/Makefile                   |    3 +-
 drivers/accel/qaic/mhi_controller.c           |   94 ++
 drivers/accel/qaic/mhi_controller.h           |    2 +
 drivers/accel/qaic/qaic_drv.c                 |    8 +-
 drivers/soc/qcom/Kconfig                      |   20 +-
 drivers/soc/qcom/Makefile                     |    2 +
 drivers/soc/qcom/qdu.c                        |   85 ++
 drivers/soc/qcom/sahara/Kconfig               |   17 +
 drivers/soc/qcom/sahara/Makefile              |    6 +
 .../{accel/qaic => soc/qcom/sahara}/sahara.c  |  534 ++++++-
 drivers/soc/qcom/sahara/sahara_image_table.c  |  178 +++
 .../accel/qaic => include/linux}/sahara.h     |    1 +
 include/linux/sahara_image_table_ops.h        |  102 ++
 17 files changed, 2252 insertions(+), 75 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-mhi-ddr_training_data
 create mode 100644 Documentation/sahara/index.rst
 create mode 100644 Documentation/sahara/sahara_protocol.rst
 create mode 100644 drivers/soc/qcom/qdu.c
 create mode 100644 drivers/soc/qcom/sahara/Kconfig
 create mode 100644 drivers/soc/qcom/sahara/Makefile
 rename drivers/{accel/qaic => soc/qcom/sahara}/sahara.c (64%)
 create mode 100644 drivers/soc/qcom/sahara/sahara_image_table.c
 rename {drivers/accel/qaic => include/linux}/sahara.h (99%)
 create mode 100644 include/linux/sahara_image_table_ops.h


base-commit: 0f4c93f7eb861acab537dbe94441817a270537bf
-- 
2.34.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2025-08-28 14:20 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-25 10:19 [PATCH v1 00/12] Sahara protocol enhancements Kishore Batta
2025-08-25 10:19 ` [PATCH v1 01/12] Add documentation for Sahara protocol Kishore Batta
2025-08-25 10:19 ` [PATCH v1 02/12] drivers: accel : Move AIC specific image tables to mhi_controller.c file Kishore Batta
2025-08-25 21:08   ` Bjorn Andersson
2025-08-25 10:19 ` [PATCH v1 03/12] drivers: accel: qaic: Support for registration of image tables in Sahara Kishore Batta
2025-08-25 21:26   ` Bjorn Andersson
2025-08-25 10:19 ` [PATCH v1 04/12] drivers: accel: Register Qualcomm AIC specific image tables with Sahara Kishore Batta
2025-08-25 21:38   ` Bjorn Andersson
2025-08-25 10:19 ` [PATCH v1 05/12] drivers: soc: qcom: Move Sahara driver to drivers/soc/qcom directory Kishore Batta
2025-08-25 22:12   ` Bjorn Andersson
2025-08-25 10:19 ` [PATCH v1 06/12] drivers: soc: qcom: Add support for Qualcomm QDU device Kishore Batta
2025-08-25 23:24   ` Bjorn Andersson
2025-08-28 12:48     ` Kishore Batta
2025-08-28 14:19   ` Krzysztof Kozlowski
2025-08-25 10:19 ` [PATCH v1 07/12] drivers: soc: qcom: Add sysfs support for DDR training data in Sahara Kishore Batta
2025-08-25 22:37   ` Bjorn Andersson
2025-08-25 10:19 ` [PATCH v1 08/12] drivers: soc: qcom: Support Sahara command mode packets(READY and EXECUTE) Kishore Batta
2025-08-25 22:58   ` Bjorn Andersson
2025-08-28 14:20   ` Krzysztof Kozlowski
2025-08-25 10:19 ` [PATCH v1 09/12] drivers: soc: qcom: Remove is_mem_dump_mode variable Kishore Batta
2025-08-25 22:59   ` Bjorn Andersson
2025-08-25 10:19 ` [PATCH v1 10/12] drivers: soc: qcom: Support for DDR training in Sahara Kishore Batta
2025-08-25 23:14   ` Bjorn Andersson
2025-08-25 10:19 ` [PATCH v1 11/12] drivers: soc: qcom: Support to load saved DDR training data " Kishore Batta
2025-08-26  2:16   ` Bjorn Andersson
2025-08-25 10:19 ` [PATCH v1 12/12] Add sysfs ABI documentation for DDR training data node Kishore Batta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).