public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/9] Add support to load QUP SE firmware from
@ 2025-03-03 12:43 Viken Dadhaniya
  2025-03-03 12:43 ` [PATCH v3 1/9] dt-bindings: qcom: geni-se: Add 'firmware-name' property for firmware loading Viken Dadhaniya
                   ` (9 more replies)
  0 siblings, 10 replies; 30+ messages in thread
From: Viken Dadhaniya @ 2025-03-03 12:43 UTC (permalink / raw)
  To: andi.shyti, robh, krzk+dt, conor+dt, gregkh, jirislaby, broonie,
	andersson, konradybcio, johan+linaro, dianders, agross,
	linux-arm-msm, linux-i2c, devicetree, linux-kernel, linux-serial,
	linux-spi
  Cc: quic_msavaliy, quic_anupkulk, Viken Dadhaniya

In Qualcomm SoCs, firmware loading for Serial Engines (SE) in the QUP
hardware has traditionally been managed by TrustZone (TZ). This setup
handled Serial Engines(SE) assignments and access control permissions,
ensuring a high level of security but limiting flexibility and
accessibility.
 
This limitation poses a significant challenge for developers who need more
flexibility to enable any protocol on any of the SEs within the QUP
hardware.
 
To address this, we are introducing a change that opens the firmware
loading mechanism to the Linux environment. This enhancement increases
flexibility and allows for more streamlined and efficient management. We
can now handle SE assignments and access control permissions directly
within Linux, eliminating the dependency on TZ.
 
We propose an alternative method for firmware loading and SE
ownership/transfer mode configuration based on device tree configuration.
This method does not rely on other execution environments, making it
accessible to all developers.
 
For SEs used prior to the kernel, their firmware will be loaded by the
respective image drivers (e.g., Debug UART, Secure or trusted SE).
Additionally, the GSI firmware, which is common to all SEs per QUPV3 core,
will not be loaded by Linux driver but TZ only. At the kernel level, only
the SE protocol driver should load the respective protocol firmware.
---
v2 -> v3:

- Add a new YAML file for QUP peripheral-specific properties for I2C, SPI, and SERIAL buses.
- Drop the 'qcom,xfer-mode' property and add the 'qcom,gsi-dma-allowed' property in protocol-specific YAML.
- Add a reference for the QUP peripheral shared YAML to protocol-specific YAML.
- Enhance error handling and remove redundant if conditions in the qcom-geni-se.c driver.
- Remove the ternary operator in the qup_fw_load function.
- Update function descriptions and use imperative mood in qcom-geni-se.c
- Load firmware during probe only if the protocol is invalid.

v2 Link: https://lore.kernel.org/linux-kernel/20250124105309.295769-1-quic_vdadhani@quicinc.com/ 
 
v1 -> v2:

- Drop the qcom,load-firmware property.
- Remove the fixed firmware path.
- Add the 'firmware-name' property in the QUP common driver.
- Add logic to read the firmware path from the device tree.
- Resolve kernel test robot warnings.
- Update the 'qcom,xfer-mode' property description.

v1 Link: https://lore.kernel.org/linux-kernel/20241204150326.1470749-1-quic_vdadhani@quicinc.com/ 
---
Viken Dadhaniya (9):
  dt-bindings: qcom: geni-se: Add 'firmware-name' property for firmware
    loading
  dt-bindings: qcom: se-common: Add QUP Peripheral-specific properties
    for I2C, SPI, and SERIAL bus
  dt-bindings: i2c: qcom,i2c-geni: document qcom,gsi-dma-allowed
  spi: dt-bindings: document qcom,gsi-dma-allowed
  dt-bindings: serial: document qcom,gsi-dma-allowed
  soc: qcom: geni-se: Add support to load QUP SE Firmware via Linux
    subsystem
  i2c: qcom-geni: Load i2c qup Firmware from linux side
  spi: geni-qcom: Load spi qup Firmware from linux side
  serial: qcom-geni: Load UART qup Firmware from linux side

 .../bindings/i2c/qcom,i2c-geni-qcom.yaml      |   3 +
 .../serial/qcom,serial-geni-qcom.yaml         |   3 +
 .../bindings/soc/qcom/qcom,geni-se.yaml       |   5 +
 .../soc/qcom/qcom,se-common-props.yaml        |  26 ++
 .../bindings/spi/qcom,spi-geni-qcom.yaml      |   3 +
 drivers/i2c/busses/i2c-qcom-geni.c            |   8 +-
 drivers/soc/qcom/qcom-geni-se.c               | 423 ++++++++++++++++++
 drivers/spi/spi-geni-qcom.c                   |   6 +
 drivers/tty/serial/qcom_geni_serial.c         |   8 +-
 include/linux/soc/qcom/geni-se.h              |  18 +
 include/linux/soc/qcom/qup-fw-load.h          | 179 ++++++++
 11 files changed, 680 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,se-common-props.yaml
 create mode 100644 include/linux/soc/qcom/qup-fw-load.h

-- 
2.34.1


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

end of thread, other threads:[~2025-06-11 11:44 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-03 12:43 [PATCH v3 0/9] Add support to load QUP SE firmware from Viken Dadhaniya
2025-03-03 12:43 ` [PATCH v3 1/9] dt-bindings: qcom: geni-se: Add 'firmware-name' property for firmware loading Viken Dadhaniya
2025-03-04  8:08   ` Krzysztof Kozlowski
2025-03-03 12:43 ` [PATCH v3 2/9] dt-bindings: qcom: se-common: Add QUP Peripheral-specific properties for I2C, SPI, and SERIAL bus Viken Dadhaniya
2025-03-04  8:10   ` Krzysztof Kozlowski
2025-03-04  8:22     ` Krzysztof Kozlowski
2025-03-03 12:43 ` [PATCH v3 3/9] dt-bindings: i2c: qcom,i2c-geni: document qcom,gsi-dma-allowed Viken Dadhaniya
2025-03-04  8:12   ` Krzysztof Kozlowski
2025-03-03 12:43 ` [PATCH v3 4/9] spi: dt-bindings: " Viken Dadhaniya
2025-03-04  8:13   ` Krzysztof Kozlowski
2025-03-03 12:43 ` [PATCH v3 5/9] dt-bindings: serial: " Viken Dadhaniya
2025-03-04  8:13   ` Krzysztof Kozlowski
2025-03-03 12:43 ` [PATCH v3 6/9] soc: qcom: geni-se: Add support to load QUP SE Firmware via Linux subsystem Viken Dadhaniya
2025-03-04  3:46   ` kernel test robot
2025-03-05 17:13   ` kernel test robot
2025-03-05 18:16   ` kernel test robot
2025-03-05 23:27   ` Bjorn Andersson
2025-04-22  6:32     ` Viken Dadhaniya
2025-06-11 11:44       ` Viken Dadhaniya
2025-05-03 11:11     ` Viken Dadhaniya
2025-05-03 11:17       ` Konrad Dybcio
2025-03-08 18:06   ` Konrad Dybcio
2025-05-03 11:17     ` Viken Dadhaniya
2025-05-03 17:21       ` Dmitry Baryshkov
2025-05-06  9:17         ` Viken Dadhaniya
2025-03-03 12:43 ` [PATCH v3 7/9] i2c: qcom-geni: Load i2c qup Firmware from linux side Viken Dadhaniya
2025-03-03 12:43 ` [PATCH v3 8/9] spi: geni-qcom: Load spi " Viken Dadhaniya
2025-03-03 12:43 ` [PATCH v3 9/9] serial: qcom-geni: Load UART " Viken Dadhaniya
2025-03-04  8:11 ` [PATCH v3 0/9] Add support to load QUP SE firmware from Krzysztof Kozlowski
2025-03-04  8:12   ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox