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. --- 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@xxxxxxxxxxx/ --- Viken Dadhaniya (8): dt-bindings: qcom: geni-se: Add 'firmware-name' property for firmware loading dt-bindings: i2c: qcom,i2c-geni: Add support for selecting data transfer mode spi: dt-bindings: Add support for selecting data transfer mode dt-bindings: serial: Add support for selecting data transfer mode 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 | 7 + .../serial/qcom,serial-geni-qcom.yaml | 8 + .../bindings/soc/qcom/qcom,geni-se.yaml | 5 + .../bindings/spi/qcom,spi-geni-qcom.yaml | 7 + drivers/i2c/busses/i2c-qcom-geni.c | 7 +- drivers/soc/qcom/qcom-geni-se.c | 444 ++++++++++++++++++ drivers/spi/spi-geni-qcom.c | 7 +- drivers/tty/serial/qcom_geni_serial.c | 7 +- include/linux/soc/qcom/geni-se.h | 17 + include/linux/soc/qcom/qup-fw-load.h | 179 +++++++ 10 files changed, 682 insertions(+), 6 deletions(-) create mode 100644 include/linux/soc/qcom/qup-fw-load.h -- 2.34.1